.honor-stage {
    --gallery-paper: #eeece3;
    --gallery-mat: #fffdf6;
    --gallery-ink: #25493c;
    --gallery-muted: #657368;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: var(--honor-board-height);
    overflow: hidden;
    border: 1px solid #d9dbcf;
    border-radius: 18px;
    background: var(--gallery-paper);
    box-shadow: 0 8px 30px #344d3708;
}

.honor-stage [hidden] {
    display: none !important;
}

.honor-stage-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 19px 22px;
    border-bottom: 1px solid #d4d8ca;
    background: #f8f7f0;
}

.honor-stage-toolbar h2 {
    margin: 7px 0 0;
    font-size: 21px;
    letter-spacing: -0.5px;
}

.honor-mode-switch {
    display: flex;
    flex-shrink: 0;
    padding: 4px;
    gap: 3px;
    border-radius: 10px;
    background: #e7eadd;
}

.honor-mode-switch button {
    border: 0;
    border-radius: 7px;
    padding: 9px 12px;
    background: transparent;
    color: #536959;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.18s ease;
}

.honor-mode-switch button[aria-pressed='true'] {
    color: #1b5141;
    background: #fffef9;
    box-shadow: 0 2px 6px #2646320d;
}

.honor-gallery {
    min-height: 0;
    overflow: auto;
    flex: 1;
    padding: 25px;
    background: radial-gradient(ellipse at top, #fffdf659, transparent 75%);
    scrollbar-width: thin;
    scrollbar-color: #c6ccba transparent;
}

.honor-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
    align-items: start;
}

.honor-gallery-card {
    min-width: 0;
    border: 1px solid #d6d7c8;
    border-radius: 6px;
    padding: 7px;
    background: var(--gallery-mat);
    box-shadow: 0 5px 12px #3f51320a;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.honor-gallery-card.is-selected {
    border-color: #4faea3;
    box-shadow:
        0 0 0 2px #63beb033,
        0 6px 16px #3b6b4510;
}

.honor-gallery-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gallery-ink);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.honor-passepartout {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 100%;
    aspect-ratio: 1.6;
    padding: 13%;
    background: #e4e5d8;
    box-shadow: inset 0 1px 4px #3450320a;
}

.honor-exhibit-image {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 3px #314a3524);
}

.honor-gallery-title {
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.honor-gallery-meta,
.honor-compare-choice,
.honor-gallery-feedback {
    color: var(--gallery-muted);
    font-size: 11px;
    line-height: 1.6;
}

.honor-compare-choice {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid #dde0d3;
    cursor: pointer;
}

.honor-compare-choice input {
    accent-color: #348b7c;
}

.honor-pearl {
    font-size: 10px;
    color: #7b622e;
    line-height: 1.6;
}

.honor-exhibit-detail {
    margin-top: 25px;
    padding-top: 23px;
    border-top: 1px solid #cdd3c3;
}

.honor-exhibit-heading h2 {
    margin: 8px 0 18px;
    color: var(--gallery-ink);
    font-size: 25px;
    line-height: 1.4;
    letter-spacing: -0.6px;
    overflow-wrap: anywhere;
}

.honor-large-preview {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid #d8dbce;
    background: var(--gallery-mat, #fffdf6);
    border-radius: 5px;
    overflow: hidden;
    cursor: zoom-in;
}

.honor-large-preview:disabled {
    cursor: default;
    opacity: 1;
}

.honor-large-passepartout {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 100%;
    height: clamp(170px, 19vw, 280px);
    padding: 24px;
}

.honor-photo-empty {
    color: #64755f;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.honor-exhibit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0 21px;
}

.honor-exhibit-actions .button {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 11px;
    border: 1px solid #cbd6c6;
    color: #365f4a;
    background: #fafbf4;
}

.honor-curator-form label {
    display: grid;
    gap: 10px;
    font-size: 13px;
    color: var(--gallery-ink);
}

.honor-curator-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 88px;
    max-height: 250px;
    padding: 12px;
    border: 1px solid #cbd4c4;
    border-radius: 9px;
    font: inherit;
    color: var(--gallery-ink);
    background: var(--gallery-mat);
    line-height: 1.7;
}

.honor-curator-form .button {
    margin-top: 10px;
    font-size: 11px;
}

.honor-exhibit-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.8;
    color: var(--gallery-muted);
}

.honor-gallery-empty {
    grid-column: 1 / -1;
    margin: 70px 20px;
    font-size: 14px;
    line-height: 1.9;
    text-align: center;
    color: var(--gallery-muted);
}

.honor-reorder {
    display: inline-flex;
    gap: 5px;
    margin-left: auto;
}

.honor-reorder-button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 7px;
    cursor: pointer;
}

.honor-stage .honor-map-panel {
    border: 0;
    border-radius: 0;
    min-height: 0;
    flex: 1;
    height: auto;
    background: var(--map-water, #e6ede3);
    box-shadow: inset 0 0 24px #a2ad8b12;
}

.honor-frame-border {
    fill: var(--frame-edge, #bacabc);
    stroke: var(--frame-stroke, #6c8c79);
    stroke-width: 0.7px;
    vector-effect: non-scaling-stroke;
}

.honor-frame:hover .honor-frame-border,
.honor-frame.is-selected .honor-frame-border,
.honor-frame:focus-visible .honor-frame-border {
    fill: var(--frame-active, #68b5a6);
    stroke: var(--frame-active-stroke, #287e6e);
    stroke-width: 0.8px;
}
.honor-frame-bevel {
    fill: none;
    stroke: var(--frame-glint, #f8fff4);
    stroke-width: 0.65px;
    vector-effect: non-scaling-stroke;
    opacity: 0.8;
}
.honor-frame-mat {
    fill: var(--frame-mat, #f6f7ef);
}
.honor-frame-corners {
    fill: none;
    stroke: var(--frame-stroke, #6c8c79);
    stroke-width: 0.6px;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.honor-comparison {
    width: min(1200px, calc(100vw - 50px));
    max-width: 1200px;
    background: var(--paper);
    padding: 26px;
}

.honor-comparison::backdrop {
    background: #19372c65;
    backdrop-filter: blur(5px);
}

.honor-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.honor-comparison-column {
    min-width: 0;
}

.honor-comparison-column h3 {
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.honor-comparison-side {
    margin: 19px 0 8px;
    font-size: 12px;
    color: var(--muted);
}

.honor-picker .dialog-header {
    position: sticky;
    top: -26px;
    z-index: 2;
    padding: 14px 0;
    background: var(--paper);
}

.honor-picker #picker-message {
    position: sticky;
    top: 66px;
    z-index: 1;
    background: var(--paper);
    padding: 8px 0;
}

.honor-stage button:focus-visible,
.honor-stage textarea:focus-visible,
.honor-comparison button:focus-visible {
    outline: 2px solid #2d9282;
    outline-offset: 3px;
}

:root[data-theme='dark'] .honor-stage {
    --gallery-paper: #1c3028;
    --gallery-mat: #243c31;
    --gallery-ink: #e3eee5;
    --gallery-muted: #adbeaf;
    border-color: var(--line);
    background: var(--gallery-paper);
}

:root[data-theme='dark'] .honor-stage-toolbar {
    background: #233a2e;
    border-color: var(--line);
}

:root[data-theme='dark'] .honor-gallery-select,
:root[data-theme='dark'] .honor-gallery-card .honor-gallery-meta,
:root[data-theme='dark'] .honor-compare-choice {
    color: var(--gallery-ink);
}

:root[data-theme='dark'] .honor-curator-form textarea {
    color: var(--gallery-ink);
}
:root[data-theme='dark'] .honor-gallery {
    background: radial-gradient(ellipse at top, #2a443570, transparent 80%);
    scrollbar-color: #4d6856 transparent;
}
:root[data-theme='dark'] .honor-gallery-card,
:root[data-theme='dark'] .honor-large-preview {
    border-color: #476050;
    background: var(--gallery-mat);
}
:root[data-theme='dark'] .honor-gallery-card.is-selected {
    border-color: #77bca9;
    box-shadow:
        0 0 0 2px #77bca91f,
        0 8px 22px #071c1540;
}
:root[data-theme='dark'] .honor-passepartout {
    background: #1a3026;
    box-shadow: inset 0 1px 7px #081b1540;
}
:root[data-theme='dark'] .honor-mode-switch {
    background: #172c22;
}
:root[data-theme='dark'] .honor-mode-switch button {
    color: #aec1b2;
}
:root[data-theme='dark'] .honor-mode-switch button[aria-pressed='true'] {
    background: #365c49;
    color: #e6f4e9;
}
:root[data-theme='dark'] .honor-exhibit-actions .button {
    background: #2b4839;
    color: #deeee2;
    border-color: #4a6653;
}
:root[data-theme='dark']
    :is(
        .honor-compare-choice,
        .honor-exhibit-detail,
        .honor-curator-form textarea
    ) {
    border-color: #46604e;
}
:root[data-theme='dark'] .honor-pearl {
    color: #d5c18b;
}

@media (max-width: 1250px) {
    .honor-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .honor-gallery {
        padding: 18px;
    }
    .honor-stage-toolbar {
        padding: 16px;
    }
}

@media (max-width: 600px) {
    .honor-stage {
        height: 650px;
    }
    .honor-stage-toolbar h2 {
        font-size: 18px;
    }
    .honor-gallery-grid {
        gap: 12px;
    }
    .honor-comparison-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
