#page-ham {
    max-width: 820px;
}

.ham-band {
    margin-bottom: 4px;
    color: var(--theme-accent);
    font-size: 1rem;
    letter-spacing: 0.12em;
}

.ham-profile {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
    gap: 28px;
    margin-top: 28px;
    padding: 24px;
    border: 2px solid #333;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 4px 4px 0 var(--theme-accent-soft);
    text-align: left;
}

/* Compact, worn station labels: subdued stock, hard cuts, overprinted type. */
.ham-station-notes {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(0, 0.8fr));
    align-items: center;
    gap: 6px;
    width: min(100%, 590px);
    margin: 20px 0 4px;
    padding: 10px 6px;
    isolation: isolate;
    text-align: left;
}
.ham-paper {
    position: relative;
    min-width: 0;
    padding: 14px 16px 16px;
    color: #e1e0d8;
    font-family: "JetBrains Mono", monospace;
    background: #30312c;
    box-shadow: 3px 4px 0 #080909;
    transform: rotate(-1.5deg);
}
.ham-paper::before {
    content: "";
    position: absolute;
    width: 46px;
    height: 16px;
    top: -8px;
    left: 14px;
    background: #181a18;
    border: 1px solid #55584d;
    clip-path: polygon(3% 0, 100% 5%, 97% 94%, 0 100%, 3% 70%, 0 40%);
    transform: rotate(5deg);
    pointer-events: none;
}
.ham-paper::after {
    content: "";
    position: absolute;
    inset: auto 0 -6px;
    height: 8px;
    background: inherit;
    clip-path: polygon(0 0, 100% 0, 100% 65%, 92% 90%, 84% 50%, 74% 100%, 63% 65%, 54% 90%, 43% 45%, 31% 100%, 22% 65%, 12% 95%, 0 60%);
}
.ham-paper dt {
    padding-bottom: 6px;
    border-bottom: 2px solid currentColor;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}
.ham-paper dd {
    margin: 10px 0 0;
    color: inherit;
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}
.ham-paper-grid dd { font-size: clamp(1.2rem, 3vw, 2.25rem); }
.ham-paper-imprint {
    display: block;
    margin-top: 10px;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
}
.ham-paper-cq {
    margin-top: 10px;
    background: #555c33;
    color: #f1f0da;
    transform: rotate(2.5deg);
    z-index: 1;
}
.ham-paper-itu {
    background: #8d8f84;
    color: #151714;
    transform: rotate(-3deg);
}
.ham-paper-cq::before { left: auto; right: 8px; transform: rotate(-12deg); }
.ham-paper-itu::before {
    width: 22px; height: 4px; top: 5px; left: auto; right: 12px;
    background: #4e5149; border: 1px solid #b9bbb2; clip-path: none; transform: rotate(3deg);
}
body:not(.glass-mode) .ham-paper { font-family: "PixelFont", monospace; }
body.glass-mode .ham-station-notes + .ham-profile { margin-top: 24px; }
@media (orientation: portrait) and (max-width: 639px) {
    .ham-station-notes {
        gap: 4px;
        margin-top: 14px;
        padding-inline: 4px;
    }
    .ham-paper { padding: 12px 8px 14px; }
    .ham-paper dd { font-size: 1.65rem; }
    .ham-paper-grid dd { font-size: clamp(1.05rem, 4.5vw, 1.65rem); }
    .ham-paper-imprint { font-size: 0.5625rem; letter-spacing: 0; }
    .ham-paper-grid .ham-paper-imprint { max-width: 12ch; line-height: 1.4; }
    .ham-paper::before { width: 32px; left: 8px; }
    .ham-paper-itu::before { width: 18px; left: auto; }
}

.ham-label,
.ham-location {
    color: #555;
}

.ham-label {
    margin-bottom: 6px;
}

.ham-identity h2 {
    color: #111;
    font-size: clamp(2.8rem, 8vw, 5rem);
    line-height: 0.95;
    overflow-wrap: anywhere;
}

.ham-location {
    margin-top: 14px;
}

.ham-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ham-copy p {
    max-width: 60ch;
    margin-bottom: 72px;
    color: #333;
    font-size: 1.08rem;
    line-height: 1.8;
    text-wrap: pretty;
}

.ham-copy .btn-black {
    position: static;
    margin-top: auto;
}

body.glass-mode #page-ham.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 15vh 7vw 12vh;
}

body.glass-mode #page-ham > h1 {
    position: relative;
    display: inline-block;
    align-self: flex-start;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0;
    mix-blend-mode: normal;
}

body.glass-mode #page-ham > h1::after {
    content: attr(data-outline-text);
    position: absolute;
    inset: 0;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 3.5px #fff;
    mix-blend-mode: difference;
    pointer-events: none;
    white-space: nowrap;
}

body.glass-mode .ham-band {
    margin-bottom: 2vh;
    color: #ccff00;
    font-family: "JetBrains Mono", monospace;
    font-weight: 800;
    text-transform: uppercase;
}

body.glass-mode .ham-profile {
    width: min(100%, 1050px);
    margin-top: 7vh;
    padding: clamp(2rem, 5vw, 4.5rem);
    border: 2px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    background: rgb(18, 18, 18);
    box-shadow: none;
    color: #fff;
}

body.glass-mode .ham-label,
body.glass-mode .ham-location,
body.glass-mode .ham-copy p {
    color: rgba(255, 255, 255, 0.76);
    font-family: "JetBrains Mono", monospace;
}

body.glass-mode .ham-label {
    color: #ccff00;
    font-weight: 800;
    text-transform: uppercase;
}

body.glass-mode .ham-identity h2 {
    color: #fff;
    font-family: "Inter", sans-serif;
    font-weight: 900;
    letter-spacing: -0.04em;
}

body.glass-mode .ham-copy p {
    margin-bottom: 2.5rem;
}

@media (orientation: portrait) and (max-width: 800px) {
    body:not(.glass-mode) #page-ham { margin-top: 28px; }
    #page-ham {
        width: calc(100vw - 32px);
        margin-top: 118px;
        padding: 18px 14px;
    }

    .ham-profile {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    body.glass-mode #page-ham {
        width: 100vw;
        margin: 0;
        padding: 126px 18px 96px;
    }

    body.glass-mode #page-ham > h1 {
        font-size: clamp(2.3rem, 12vw, 4rem);
    }

    body.glass-mode .ham-profile {
        gap: 24px;
        margin-top: 36px;
        padding: 1.4rem;
    }

    body.glass-mode .ham-copy p {
        font-size: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ham-profile,
    .btn-black {
        transition: none !important;
    }
}
