/* ========================
   CONTACT — the organiser. A pocket device in pale plastic with a
   square green screen. It says HELLO when it wakes, lists the four ways
   to reach you, and BEAM sends the card out as a real stack of four that
   floats beside it: hover to fan it, drag to spin it. contact.js runs it.
   ======================== */

.contact-page {
    position: relative;
    width: 100vw;
    /* 100svh, not 100vh. On iOS Safari `100vh` is the viewport with the browser chrome
       HIDDEN — the tallest it ever gets — so a full-height page is taller than what you
       can see, and everything pinned to its bottom (the section switch, the clock) sits
       under the toolbar: visible on the way past, never tappable. That is the whole of
       "the nav bar isn't usable". `svh` is the SMALLEST viewport, so the bottom is always
       reachable, and unlike `dvh` it does not resize while you scroll. The 100vh line
       stays first as the fallback for anything that does not know svh. */
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: var(--bg);
    --lcd: #aab59a;
    --lcd-ink: #1d2419;
    --plastic-hi: #74766d;
    --plastic: #565951;
    --plastic-lo: #3a3c35;
    --etch: rgba(255, 255, 255, 0.5);
    --card-ink: #f2f2f0;
}

body.dark .contact-page {
    --lcd: #9dc783;
    --lcd-ink: #142010;
    --plastic-hi: #4c4e47;
    --plastic: #33352f;
    --plastic-lo: #1e201b;
    --etch: rgba(255, 255, 255, 0.42);
    --card-ink: #e8e8e6;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.contact-page .readout {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 400;
    line-height: 18px;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
    white-space: pre;
}

.contact-page .dim { color: var(--secondary); }

/* ---- The desk: device on the left, the cards land on the right ---- */
.desk {
    position: absolute;
    inset: 0;
    perspective: 1400px;
}

.pda-wrap {
    position: absolute;
    left: calc(50% - 378px);
    top: 50%;
    width: 300px;
    height: 470px;
    margin-top: -235px;
    /* flat, not preserve-3d: the device below tilts in 3D, and a 3D transform
       inside a preserve-3d parent stops the browser hit-testing into it, which
       killed the rows and every key on the keypad. */
    transform-style: flat;
}

.pda {
    position: relative;
    width: 300px;
    height: 470px;
    border-radius: 26px 26px 40px 40px;
    background: linear-gradient(165deg, var(--plastic-hi) 0%, var(--plastic) 50%, var(--plastic-lo) 100%);
    box-shadow:
        inset 0 2px 1px rgba(255, 255, 255, 0.25),
        inset 0 -4px 10px rgba(0, 0, 0, 0.35),
        0 40px 70px -30px rgba(0, 0, 0, 0.45),
        0 14px 26px -14px rgba(0, 0, 0, 0.3);
    transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
    transform-origin: 50% 60%;
}

body.dark .pda {
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.12),
        inset 0 -4px 8px rgba(0, 0, 0, 0.4),
        0 40px 70px -30px rgba(0, 0, 0, 0.9);
}

.pda-brand,
.pda-model {
    position: absolute;
    top: 19px;
    font-family: var(--font);
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--etch);
}

.pda-brand { left: 60px; }
.pda-model { right: 26px; }

/* power key on the top left, and the stylus in its slot down the right edge */
.pda-power {
    position: absolute;
    left: 26px;
    top: 16px;
    width: 22px;
    height: 9px;
    border-radius: 5px;
    background: linear-gradient(var(--plastic-hi), var(--plastic-lo));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 rgba(0, 0, 0, 0.3);
}

.pda-stylus {
    position: absolute;
    right: 7px;
    top: 44px;
    width: 5px;
    height: 250px;
    border-radius: 3px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.12));
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.6);
}

/* The infrared window on the top edge, where the beam leaves from */
.pda-ir {
    position: absolute;
    top: -3px;
    left: 50%;
    width: 46px;
    height: 7px;
    margin-left: -23px;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(#5a1818, #1f0606);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pda-ir::after {
    content: '';
    position: absolute;
    inset: 1px 6px;
    border-radius: 3px;
    background: #ff3b2f;
    opacity: 0;
    filter: blur(1px);
}

.pda-ir i {
    position: absolute;
    left: 50%;
    top: -2px;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 1px solid transparent;
    border-top-color: #ff3b2f;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.pda.is-beaming .pda-ir::after { animation: ir-blink 0.18s steps(2) infinite; }
.pda.is-beaming .pda-ir i { animation: ir-wave 0.9s ease-out infinite; }
.pda.is-beaming .pda-ir i:nth-child(2) { animation-delay: 0.3s; }
.pda.is-beaming .pda-ir i:nth-child(3) { animation-delay: 0.6s; }

@keyframes ir-blink { 50% { opacity: 0.9; } }
@keyframes ir-wave {
    0% { transform: scale(0.4); opacity: 0.8; }
    100% { transform: scale(2.6); opacity: 0; }
}

/* ---- The screen ---- */
.pda-bezel {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 40px;
    height: 316px;
    padding: 8px;
    border-radius: 10px;
    background: #4a4c47;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.dark .pda-bezel {
    background: #111;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pda-screen {
    position: relative;
    width: 240px;
    height: 240px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--lcd);
    color: var(--lcd-ink);
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.28);
    font-family: var(--font);
    font-size: 10px;
    line-height: 16px;
    letter-spacing: 0.02em;
}

body.dark .pda-screen {
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.25), 0 0 30px rgba(157, 199, 131, 0.18);
}

/* pixel grid, like a real LCD */
.pda-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 3px);
}

.scr {
    position: absolute;
    inset: 0;
    padding: 8px 10px;
    visibility: hidden;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.pda[data-screen="card"] .scr-card,
.pda[data-screen="dots"] .scr-dots,
.pda[data-screen="boot"] .scr-dots {
    visibility: visible;
}

.scr-bar {
    display: flex;
    justify-content: space-between;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--lcd-ink);
    font-weight: 500;
}

.scr-who {
    display: flex;
    flex-direction: column;
    padding: 10px 0 9px;
}

.scr-who b { font-weight: 500; font-size: 12px; line-height: 16px; }

.scr-rows {
    list-style: none;
    border-top: 1px dashed rgba(0, 0, 0, 0.35);
    padding-top: 6px;
}

.scr-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    padding: 2px 4px;
    margin: 0 -4px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.scr-row[aria-selected="true"] {
    background: var(--lcd-ink);
    color: var(--lcd);
    text-shadow: none;
}

.scr-row:focus-visible { outline: 1px dashed var(--lcd-ink); outline-offset: 1px; }

.scr-foot {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 7px;
    display: flex;
    justify-content: space-between;
    padding-top: 3px;
    border-top: 1px solid var(--lcd-ink);
}

.pda:not(.has-beamed) .scr-foot span:last-child { animation: lcd-blink 1.1s steps(1) infinite; }
@keyframes lcd-blink { 50% { opacity: 0; } }

/* The silkscreened writing area under the glass */
.pda-silk {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    margin-top: 8px;
    padding: 0 6px;
    border-radius: 3px;
    background: #6f7268;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}

body.dark .pda-silk { background: #4a4d45; }

.silk-write {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 150px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 2px;
    font-family: var(--font);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
}

.silk-write em {
    position: absolute;
    left: 50%;
    top: -4px;
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.22);
    transform: rotate(14deg);
}

.silk-icon {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 2px;
}

.silk-home { border-radius: 2px 2px 8px 8px; }
.silk-find { border-radius: 50%; }

/* Big words in square pixels: HELLO, BEAM, SENT, COPIED */
.scr-dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.dots {
    display: grid;
    grid-template-columns: repeat(var(--cols, 29), 5px);
    grid-auto-rows: 5px;
    gap: 1px;
}

.dots i {
    background: var(--lcd-ink);
    opacity: 0.07;
}

.dots i.on {
    opacity: 1;
    animation: dot-in 0.16s steps(2) var(--d, 0ms) both;
}

@keyframes dot-in { from { opacity: 0.07; } }

.scr-sub {
    min-height: 16px;
    text-align: center;
    white-space: pre;
}

.bar {
    display: inline-flex;
    gap: 3px;
    vertical-align: middle;
}

.bar b {
    width: 9px;
    height: 9px;
    border: 1px solid var(--lcd-ink);
}

.bar b.on { background: var(--lcd-ink); }

/* ---- The keys ---- */
.pda-keys {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 384px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.key,
.rocker button {
    border: none;
    padding: 0;
    font: inherit;
    color: var(--etch);
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.key {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 48px;
}

.key i {
    position: relative;
    display: block;
    width: 46px;
    height: 24px;
    border-radius: 12px;
    background: radial-gradient(circle at 38% 30%, var(--plastic-hi), var(--plastic-lo) 75%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 3px 0 rgba(0, 0, 0, 0.18),
        0 5px 8px rgba(0, 0, 0, 0.16);
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.key span {
    font-family: var(--font);
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.16em;
}

.key:active i,
.key.is-pressed i {
    transform: translateY(2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 rgba(0, 0, 0, 0.2), 0 2px 3px rgba(0, 0, 0, 0.15);
}

/* BEAM carries a small red square that pulses until it's been pressed */
.key-beam i::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: #ff3b2f;
    box-shadow: 0 0 8px rgba(255, 59, 47, 0.6);
}

.pda:not(.has-beamed) .key-beam i::after { animation: beam-pulse 1.4s ease-in-out infinite; }
@keyframes beam-pulse { 50% { opacity: 0.35; } }

.rocker {
    display: flex;
    flex-direction: column;
    width: 42px;
    height: 52px;
    margin-top: -2px;
    border-radius: 21px;
    overflow: hidden;
    background: linear-gradient(var(--plastic-hi), var(--plastic-lo));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 3px 0 rgba(0, 0, 0, 0.18),
        0 5px 8px rgba(0, 0, 0, 0.16);
}

.rocker button {
    flex: 1;
    font-size: 9px;
}

.rocker button:first-child { border-bottom: 1px solid rgba(0, 0, 0, 0.12); }
.rocker button:active,
.rocker button.is-pressed { background: rgba(0, 0, 0, 0.08); }

.key:focus-visible i,
.rocker button:focus-visible {
    outline: 1.5px solid var(--primary);
    outline-offset: 2px;
}

/* ---- The device is alive: it breathes, the screen has a slow scan,
   the rows type in when it wakes, and it kicks back when it beams ---- */
.pda-wrap { animation: pda-float 7s ease-in-out infinite; }
@keyframes pda-float { 50% { transform: translateY(-6px); } }

.pda-wrap.is-recoil { animation: pda-recoil 0.6s ease; }
@keyframes pda-recoil {
    30% { transform: translateY(7px) scale(0.995); }
    65% { transform: translateY(-4px); }
}

.pda-screen::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 3;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    animation: lcd-scan 9s linear infinite;
}

@keyframes lcd-scan {
    from { transform: translateY(-100%); }
    to { transform: translateY(240%); }
}

.pda.is-waking .pda-screen { animation: lcd-wake 0.5s ease-out; }
@keyframes lcd-wake {
    0% { filter: brightness(1.8) contrast(0.35); }
    45% { filter: brightness(0.92); }
    100% { filter: none; }
}

.scr-card.is-in .scr-bar,
.scr-card.is-in .scr-who,
.scr-card.is-in .scr-row,
.scr-card.is-in .scr-foot {
    animation: row-in 0.16s steps(3) both;
}

.scr-card.is-in .scr-who { animation-delay: 80ms; }
.scr-card.is-in .scr-row { animation-delay: calc(var(--i, 0) * 70ms + 160ms); }
.scr-card.is-in .scr-foot { animation-delay: 460ms; }

@keyframes row-in {
    from { opacity: 0; transform: translateX(-5px); }
}

/* a blinking block on the selected row */
.scr-row { position: relative; }

.scr-row[aria-selected="true"]::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 4px;
    width: 5px;
    height: 10px;
    background: var(--lcd);
    animation: lcd-blink 1s steps(1) infinite;
}

/* ---- Where the cards land ---- */
.receive {
    position: absolute;
    left: calc(50% + 62px);
    top: 50%;
    width: 336px;
    height: 200px;
    margin-top: -100px;
    transform-style: preserve-3d;
}

.receive-slot {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--muted);
    background: none;
    font: inherit;
    cursor: pointer;
    transition: opacity 0.4s ease;
}

.receive.has-cards { animation: stack-float 6s ease-in-out infinite; }
@keyframes stack-float { 50% { transform: translateY(-8px); } }

.receive.has-cards .receive-slot {
    opacity: 0;
    pointer-events: none;
}

.receive-note {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 40px);
    text-align: center;
}

/* The stack: floats, leans toward the cursor, drag to spin */
.stack {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform: rotateX(var(--sx, 0deg)) rotateY(var(--sy, 0deg));
    touch-action: none;
    pointer-events: none;
}

.receive.has-cards .stack { pointer-events: auto; }

.fly {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    pointer-events: none;
}

.fly.is-flying {
    animation: card-fly 0.95s cubic-bezier(0.2, 0.7, 0.2, 1) var(--fd, 0ms) both;
}

.fly.is-returning {
    animation: card-return 0.5s cubic-bezier(0.6, 0, 0.8, 0.3) var(--fd, 0ms) both;
}

/* The 180 turn lives on the card, not on .fly, so .fly's own animation stays a
   plain translate + scale + rotateZ. Chromium can work out the largest scale of
   a transform like that and rasters the card at it; put a rotateY in the same
   animation and it gives up, rasters at the 0.12 it starts from, and blows that
   texture up — which is what made the cards mushy on the way out. */
@keyframes card-fly {
    0% {
        transform: translate3d(var(--fx), var(--fy), 0) scale(0.12) rotateZ(-30deg);
        opacity: 0;
    }
    15% { opacity: 1; }
    100% { transform: none; opacity: 1; }
}

@keyframes card-flip {
    0% {
        transform: translate3d(var(--cx, 0px), var(--cy, 0px), var(--cz, 0px))
                   rotateZ(var(--cr, 0deg)) scale(var(--cs, 1)) rotateY(-180deg);
    }
    100% {
        transform: translate3d(var(--cx, 0px), var(--cy, 0px), var(--cz, 0px))
                   rotateZ(var(--cr, 0deg)) scale(var(--cs, 1)) rotateY(0deg);
    }
}

.fly.is-flying .card {
    animation: card-flip 0.95s cubic-bezier(0.2, 0.7, 0.2, 1) var(--fd, 0ms) both;
}

@keyframes card-return {
    to {
        transform: translate3d(var(--fx), var(--fy), 0) scale(0.12) rotateZ(30deg);
        opacity: 0;
    }
}

@keyframes card-flip-out {
    to {
        transform: translate3d(var(--cx, 0px), var(--cy, 0px), var(--cz, 0px))
                   rotateZ(var(--cr, 0deg)) scale(var(--cs, 1)) rotateY(180deg);
    }
}

.fly.is-returning .card {
    animation: card-flip-out 0.5s cubic-bezier(0.6, 0, 0.8, 0.3) var(--fd, 0ms) both;
}

.card {
    position: absolute;
    inset: 0;
    display: block;
    transform-style: preserve-3d;
    transform: translate3d(var(--cx, 0px), var(--cy, 0px), var(--cz, 0px)) rotateZ(var(--cr, 0deg)) scale(var(--cs, 1));
    transform-origin: 50% 170%;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--card-ink);
    text-decoration: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-drag: none;
    user-select: none;
}

.stack.is-spinning .card { transition: none; }

.card-face {
    position: absolute;
    inset: 0;
    border-radius: 7px;
    background: linear-gradient(165deg, var(--plastic-hi) 0%, var(--plastic) 55%, var(--plastic-lo) 100%);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 0.5px rgba(0, 0, 0, 0.18),
        0 20px 34px -20px rgba(0, 0, 0, 0.5);
    font-family: var(--font);
    font-size: 10px;
    line-height: 14px;
    letter-spacing: 0.02em;
}

body.dark .card-face {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4),
        0 0 0 0.5px rgba(255, 255, 255, 0.12),
        0 20px 34px -20px rgba(0, 0, 0, 0.8);
}

.card-back { transform: rotateY(180deg); }

/* Etched plastic type, like the lettering on the device */
.card-etch {
    position: absolute;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--etch);
}

.card-brand { left: 18px; top: 16px; }
.card-model { right: 18px; top: 16px; }
.card-who { left: 18px; bottom: 16px; letter-spacing: 0.14em; }

/* The little screen on the front of the card */
.card-lcd {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 40px;
    height: 104px;
    padding: 8px 10px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--lcd);
    color: var(--lcd-ink);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.5);
}

.card-lcd::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 3px);
}

.lcd-bar {
    display: flex;
    justify-content: space-between;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--lcd-ink);
    font-weight: 500;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.lcd-value {
    display: block;
    padding-top: 16px;
    font-size: 17px;
    line-height: 22px;
    letter-spacing: 0;
    white-space: nowrap;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.lcd-chip {
    position: absolute;
    right: 10px;
    bottom: 8px;
    padding: 2px 5px;
    background: var(--lcd-ink);
    color: var(--lcd);
    font-weight: 500;
}

/* Two keys, one with the beam light, like the device */
.card-keys {
    position: absolute;
    right: 16px;
    bottom: 13px;
    display: flex;
    gap: 8px;
}

.card-keys i {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 30%, var(--plastic-hi), var(--plastic-lo) 75%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 0 rgba(0, 0, 0, 0.18);
}

.card-keys i:last-child::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    margin: -2px 0 0 -2px;
    background: #ff3b2f;
}

/* The back: the mark moulded into the plastic */
.card-bigmark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 76px;
    height: 76px;
    margin: -48px 0 0 -38px;
}

.card-bigmark::before,
.card-bigmark::after {
    content: '';
    position: absolute;
    width: 56px;
    height: 56px;
}

.card-bigmark::before {
    z-index: 2;
    background: var(--etch);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.card-bigmark::after {
    left: 20px;
    top: 20px;
    border: 1px solid var(--etch);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.card-url {
    left: 0;
    right: 0;
    bottom: 34px;
    text-align: center;
    letter-spacing: 0.12em;
}

.card-sn {
    left: 0;
    right: 0;
    bottom: 16px;
    text-align: center;
    opacity: 0.7;
}

.card.is-copied .lcd-chip { background: #1DB954; color: #fff; }

/* ---- Readouts around the page ---- */
/* The keys live in the corner the name used to hold. Centred along the bottom they
   read as a caption about the page; in the corner, in a well, they read as what they
   are — the controls for the thing above them. Same well as the section switch on the
   work pages, so the corner is the same object across the site. */
.contact-keys {
    position: absolute;
    left: 13px;
    bottom: 13px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--ui-well, rgba(0, 0, 0, 0.05));
    font-family: var(--font);
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--secondary);
    white-space: nowrap;
}
body.dark .contact-keys { background: rgba(255, 255, 255, 0.08); }
.contact-keys span { display: flex; align-items: center; gap: 5px; padding: 4px 7px 4px 4px; }
.contact-keys b {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 16px; padding: 0 4px;
    border-radius: 5px;
    background: var(--bg, #fff);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    font-weight: 500; font-size: 9.5px;
    color: var(--primary);
}
body.dark .contact-keys b { background: rgba(255,255,255,.12); box-shadow: 0 0 0 1px rgba(255,255,255,.10); }

/* The same New York clock the index carries, opposite the name */
.contact-clock {
    position: absolute;
    right: 13px;
    bottom: 13px;
    left: auto;
    z-index: 50;
    display: flex;
    gap: 14px;
    font-family: var(--font);
    font-size: 12px;
    line-height: 1.144;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    white-space: pre;
}
.contact-clock .dim { color: var(--secondary); }
/* same even spacing as the index: place, date, time, one gap between each */
@media (max-width: 860px) {
    .contact-clock { display: none; }
}

/* ========================
   SMALLER SCREENS — the cards land above the device, and the page scrolls
   ======================== */

@media (max-width: 860px) {

    body.loaded { overflow: auto; }

    .contact-page {
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        padding: 72px 0 72px;
    }

    .desk {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 56px;
    }

    .receive,
    .pda-wrap {
        position: relative;
        left: auto;
        top: auto;
        margin: 0;
        flex: none;
    }

    .receive { width: 300px; height: 180px; }
    .card-value { font-size: 16px; }
    .receive-note { top: calc(100% + 6px); }

    .contact-keys { display: none; }
    .contact-caption { left: 12px; bottom: 16px; }
}
