.penreq-page {
    max-width: 1020px;
    margin: 0 auto;
    padding: 28px 18px 52px;
    color: var(--text);
}

.penreq-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.penreq-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: 0;
}

.penreq-hero p,
.penreq-section-head p {
    margin: 0;
    color: var(--text-dim);
    line-height: 1.7;
}

.penreq-vote-meter {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 122, 47, .45);
    background: rgba(255, 122, 47, .12);
    color: #ffb27f;
    border-radius: 999px;
    padding: 8px 13px;
    font-weight: 800;
}

.penreq-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.penreq-open-add {
    flex: 0 0 auto;
}

.penreq-active-head {
    align-items: center;
}

.penreq-add-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 0 0 auto;
    max-width: 280px;
    text-align: right;
}

.penreq-add-help {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.penreq-card {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
}

.penreq-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.penreq-section-head h2 {
    margin: 0 0 5px;
    font-size: 18px;
    letter-spacing: 0;
}

.penreq-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.penreq-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
}

.penreq-form input,
.penreq-form textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 11px;
    font: inherit;
}

.penreq-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.penreq-form-wide,
.penreq-form-actions {
    grid-column: 1 / -1;
}

.penreq-form-actions {
    display: flex;
    justify-content: flex-end;
}

.penreq-primary,
.penreq-secondary,
.penreq-vote-btn,
.penreq-login-required button {
    border: 1px solid rgba(255, 255, 255, .12);
    background: #ff7a2f;
    color: #fff;
    border-radius: 8px;
    min-height: 38px;
    padding: 0 14px;
    font-weight: 800;
    cursor: pointer;
}

.penreq-secondary {
    background: var(--surface2);
    color: var(--text);
    border-color: var(--border);
}

.penreq-vote-btn {
    min-width: 96px;
}

.penreq-vote-btn.is-voted {
    background: var(--surface2);
    color: #ffb27f;
    border-color: rgba(255, 122, 47, .55);
}

.penreq-vote-btn:disabled {
    opacity: .52;
    cursor: default;
}

.penreq-login-required {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(255, 122, 47, .34);
    background: rgba(255, 122, 47, .10);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
}

.penreq-list {
    display: flex;
    flex-direction: column;
}

.penreq-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.penreq-item.has-rank {
    grid-template-columns: 38px minmax(0, 1fr) auto;
}

.penreq-item:last-child {
    border-bottom: 0;
}

.penreq-rank {
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    margin-top: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    line-height: 1;
}

.penreq-rank.is-top {
    color: #1a1a1a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.penreq-rank.is-rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb400 100%);
}

.penreq-rank.is-rank-2 {
    background: linear-gradient(135deg, #e6e6e6 0%, #b8b8b8 100%);
}

.penreq-rank.is-rank-3 {
    background: linear-gradient(135deg, #d49066 0%, #a36540 100%);
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.penreq-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.penreq-title {
    font-weight: 850;
    font-size: 16px;
}

.penreq-artist {
    color: var(--text-dim);
    font-weight: 700;
}

.penreq-note {
    margin-top: 7px;
    color: var(--text-dim);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.penreq-status {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    background: var(--surface2);
    color: var(--text-dim);
}

.penreq-status.status-open {
    background: rgba(255, 122, 47, .16);
    color: #ffb27f;
}

.penreq-status.status-investigating,
.penreq-status.status-planned {
    background: rgba(80, 148, 255, .17);
    color: #9fc2ff;
}

.penreq-status.status-implemented {
    background: rgba(0, 214, 143, .15);
    color: #5ee3b3;
}

.penreq-status.status-unsupported {
    background: rgba(255, 82, 82, .16);
    color: #ff9a9a;
}

.penreq-admin-note {
    margin-top: 8px;
    border-left: 3px solid rgba(255, 122, 47, .7);
    padding-left: 9px;
    color: var(--text);
    line-height: 1.6;
}

.penreq-side {
    display: flex;
    align-items: center;
    gap: 10px;
}

.penreq-count {
    min-width: 54px;
    text-align: right;
    font-weight: 850;
    color: #ffb27f;
}

.penreq-empty {
    color: var(--text-dim);
    padding: 12px 0;
}

.penreq-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .62);
}

.penreq-modal-panel {
    position: relative;
    width: min(640px, 100%);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-modal);
}

.penreq-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface2);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 640px) {
    .penreq-page {
        padding: 18px 12px 42px;
    }
    .penreq-hero,
    .penreq-section-head,
    .penreq-item {
        display: block;
    }
    .penreq-vote-meter {
        display: inline-flex;
        margin-top: 10px;
    }
    .penreq-hero-actions {
        justify-content: flex-start;
        margin-top: 10px;
    }
    .penreq-add-cta {
        align-items: stretch;
        max-width: none;
        margin-top: 12px;
        text-align: left;
    }
    .penreq-add-help {
        font-size: 12px;
    }
    .penreq-form {
        grid-template-columns: 1fr;
    }
    .penreq-item.has-rank {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
    }
    .penreq-side {
        grid-column: 2;
        margin-top: 12px;
        justify-content: space-between;
    }
    .penreq-count {
        text-align: left;
    }
    .penreq-modal {
        align-items: flex-start;
        padding: 58px 12px 12px;
    }
    .penreq-modal-panel {
        padding: 18px 14px;
        max-height: calc(100dvh - 76px);
    }
}
