.stamp-page {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: clamp(0.9rem, 3vw, 2rem);
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.stamp-page-back {
    display: inline-block;
    margin-bottom: 1rem;
    color: #fff;
}

.stamp-hero {
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    align-items: center;
    min-height: 385px;
    overflow: hidden;
    border: 1px solid #7391aa;
    border-radius: 16px;
    background: radial-gradient(ellipse at 77% 46%, #32648a 0%, #1c4667 47%, #133044 83%);
    color: #fff;
}

.stamp-intro {
    z-index: 1;
    padding: clamp(1.3rem, 4vw, 3.25rem);
}

.stamp-intro h1 {
    margin: 0 0 0.8rem;
    color: #fff;
    font: bold clamp(2rem, 4.3vw, 3.9rem)/1.05 Georgia, serif;
}

.stamp-intro p {
    max-width: 32rem;
    margin: 0 0 1.4rem;
    color: #e9e8e7;
    font-size: 1.03rem;
    line-height: 1.55;
}

.stamp-launch {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.78rem 1.05rem;
    border: 1px solid #d8818a;
    border-radius: 8px;
    background: #a21221;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.stamp-launch:hover {
    background: #bd2635;
    color: #fff;
}

.stamp-hero-art {
    position: relative;
    width: 100%;
    max-width: 650px;
    aspect-ratio: 1.48;
    isolation: isolate;
}

.stamp-preview {
    position: absolute;
    display: block;
    width: 49%;
    border-radius: 8px;
    filter: drop-shadow(0 10px 10px #081c2b9c);
    transition: transform 180ms ease, filter 180ms ease;
}

.stamp-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.stamp-preview-left {
    top: 20%;
    left: 3%;
    transform: rotate(-12deg);
}

.stamp-preview-right {
    top: 15%;
    right: 4%;
    transform: rotate(13deg);
}

.stamp-preview-front {
    top: 18%;
    left: 25%;
    width: 53%;
}

.stamp-preview:hover,
.stamp-preview:focus-visible {
    z-index: 2;
    transform: translateY(-8px);
    filter: drop-shadow(0 14px 14px #081c2bdd);
}

.stamp-sources {
    margin-top: 1.2rem;
    line-height: 1.5;
}

.stamp-sources summary {
    cursor: pointer;
    font-weight: bold;
}

html:has(.stamp-viewer[open]) {
    overflow: hidden;
}

.stamp-viewer:not([open]) {
    display: none;
}

.stamp-viewer {
    position: fixed;
    inset: 0;
    width: min(1140px, calc(100% - 2rem));
    max-width: none;
    max-height: calc(100% - 2rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    box-sizing: border-box;
    border: 1px solid #95afc2;
    border-radius: 16px;
    background: rgba(12, 34, 52, 0.81);
    color: #fff;
    box-shadow: 0 20px 60px #07152196;
    font-family: Arial, sans-serif;
}

.stamp-viewer::backdrop {
    background: rgba(7, 21, 33, 0.32);
    backdrop-filter: blur(2px);
}

.stamp-viewer-inner {
    padding: clamp(0.8rem, 2.8vw, 1.8rem);
}

.stamp-viewer-header,
.stamp-controls,
.stamp-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.stamp-viewer-header h2 {
    margin: 0;
    color: #fff;
    font: bold clamp(1.2rem, 3vw, 1.7rem)/1.2 Georgia, serif;
}

.stamp-controls {
    margin: 0.7rem 0 1rem;
    flex-wrap: wrap;
}

.stamp-select-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    color: #fff;
    font-size: 0.92rem;
    font-weight: bold;
}

.stamp-viewer button,
.stamp-viewer select {
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #8ca9bf;
    border-radius: 7px;
    padding: 0.45rem 0.7rem;
    background: #1b405f;
    color: #fff;
    font: inherit;
}

.stamp-viewer button {
    cursor: pointer;
    font-weight: bold;
}

.stamp-viewer button:hover {
    background: #315d80;
}

.stamp-viewer .stamp-close {
    flex: 0 0 44px;
    padding: 0;
    background: #a21221;
    font-size: 1.7rem;
    line-height: 1;
}

.stamp-viewer .stamp-close:hover {
    background: #bd2635;
}

.stamp-viewer :focus-visible,
.stamp-page :focus-visible {
    outline: 3px solid #ffdb87;
    outline-offset: 3px;
}

#stamp-counter {
    min-width: 4.5rem;
    text-align: center;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.stamp-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.13fr) minmax(0, 0.87fr);
    align-items: start;
    gap: clamp(0.8rem, 2.5vw, 1.7rem);
}

.stamp-art {
    display: grid;
    place-items: center;
    align-self: center;
    aspect-ratio: 1;
    width: min(100%, 74vh, 775px);
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid #abc2d33b;
    border-radius: 12px;
    box-sizing: border-box;
    background: radial-gradient(ellipse, #5481a442, #0e2d4526 73%);
}

.stamp-art img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 9px 10px #071521b5);
}

.stamp-art [hidden] {
    display: none;
}

.stamp-art-message {
    max-width: 24ch;
    padding: 1rem;
    color: #fff;
    text-align: center;
}

.stamp-sheet {
    overflow-wrap: anywhere;
    padding: clamp(0.9rem, 2.4vw, 1.5rem);
    border: 1px solid #d8e3eb;
    border-top: 4px solid #a21221;
    border-radius: 10px;
    background: rgba(247, 246, 242, 0.96);
    color: #172e44;
}

.stamp-sheet-heading p {
    margin: 0 0 0.26rem;
    color: #8c1924;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.stamp-sheet-heading h3 {
    margin: 0 0 0.75rem;
    color: #172e44;
    font: bold clamp(1.55rem, 3.5vw, 2.35rem)/1.06 Georgia, serif;
}

.stamp-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 0.8rem;
    margin: 0;
}

.stamp-specs > div {
    padding: 0.48rem 0;
    border-top: 1px solid #c8d1d7;
}

.stamp-wide {
    grid-column: 1 / -1;
}

.stamp-specs dt {
    margin-bottom: 0.15rem;
    color: #3d5267;
    font-size: 0.77rem;
    font-weight: bold;
}

.stamp-specs dd {
    margin: 0;
    color: #172e44;
    font-size: 0.94rem;
    line-height: 1.32;
}

.stamp-fact {
    margin-top: 0.45rem;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid #a21221;
    border-radius: 4px;
    background: #e6edf4;
}

.stamp-fact h4 {
    margin: 0 0 0.24rem;
    color: #7d1822;
    font-size: 0.92rem;
}

.stamp-fact p {
    margin: 0;
    color: #172e44;
    font-size: 0.92rem;
    line-height: 1.4;
}

.stamp-census {
    margin: 0.6rem 0 0;
    color: #3d5267;
    font-size: 0.75rem;
}

.stamp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 700px) {
    .stamp-hero,
    .stamp-slide {
        grid-template-columns: 1fr;
    }

    .stamp-hero {
        min-height: 0;
    }

    .stamp-hero-art {
        max-width: 500px;
        margin: -0.9rem auto 0;
    }

    .stamp-viewer {
        width: calc(100% - 1rem);
        max-height: calc(100% - 1rem);
    }

    .stamp-art {
        width: min(100%, 390px, 50vh);
    }

    .stamp-navigation {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stamp-preview {
        transition: none;
    }
}

.stamp-page p,
.stamp-viewer p {
    padding-right: 0;
    text-align: left;
}

.stamp-intro p,
.stamp-sources p,
.stamp-fact p,
.stamp-census {
    font-weight: normal;
}

.stamp-viewer .stamp-art-message {
    text-align: center;
}

.stamp-sheet,
.stamp-fact h4 {
    text-align: left;
}

.stamp-intro h1,
.stamp-viewer-header h2,
.stamp-sheet-heading h3,
.stamp-fact h4 {
    text-shadow: none;
}

@media (max-width: 700px) {
    .stamp-toolbar {
        position: sticky;
        z-index: 1;
        top: 0;
        margin: -0.8rem -0.8rem 0.7rem;
        padding: 0.8rem 0.8rem 0.1rem;
        border-bottom: 1px solid #7797b176;
        background: rgba(12, 34, 52, 0.94);
    }

    .stamp-controls {
        margin-bottom: 0.6rem;
    }
}
