/* off-stage-practice-www/style.css */

/* 8-bit fonts, hosted on this site (fonts/) so they never depend on Google Fonts being reachable */
@font-face { font-family: 'Silkscreen'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/silkscreen-400.woff2) format('woff2'); }
@font-face { font-family: 'Silkscreen'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/silkscreen-700.woff2) format('woff2'); }
@font-face { font-family: 'Press Start 2P'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/press-start-2p-400.woff2) format('woff2'); }

:root {
    --bg: #fbecde; /* 荷花白 #fbecde */
    --text: #1e293b;
    --pixel-border: #0f172a;
    --pixel-border-w: #fff6d4;
    }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--bg);
    font-family: 'Silkscreen', monospace;
    color: var(--text);
    overflow: auto;   /* the room is bigger than the window: scroll in any direction */
}

.header-banner {
    position: absolute; 
    top: 16px; 
    left: 16px; 
    right: 16px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    z-index: 20; 
    pointer-events: none;
}

canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#tooltip {
    position: fixed; 
    pointer-events: none; 
    opacity: 0; 
    background: #0f172a; 
    color: white; 
    padding: 6px 10px; 
    font-size: 10px; 
    z-index: 30; 
    border: 2px solid #fff; 
    transition: opacity 0.1s;
}


/* Retro Pixel Borders */
.pixel-box {
    border: 4px solid var(--pixel-border);
    box-shadow: 4px 4px 0px 0px rgba(15, 23, 42, 0.5);
    background: #ffffff;
}

/* Custom Scrollbar for Modals */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-corner {
    background: #f1f5f9;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-left: 1px solid var(--pixel-border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: #adadadb4;
    border-radius: 3px;
}

/* Status box: same plain colour square as the marker above the heads (no border) */
.sbox {
    display: inline-block;
    width: 8px;
    height: 8px;
    vertical-align: middle;
}

/* Profile popup: plain 8-bit layout */
.p-label {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #475569;
    margin: 16px 0 6px;
}
.p-label:first-child { margin-top: 0; }

.p-row3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.p-block {
    border: 2px solid var(--pixel-border);
    padding: 6px;
    min-height: 84px;
    font-size: 10px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.p-bhead { font-size: 9px; margin-bottom: 4px; }
.p-tag { color: #475569; }
.p-status { margin-bottom: 4px; }
.p-note { color: #876865; margin-top: 2px; }

.p-calhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 10px;
}
.p-nav {
    border: 2px solid var(--pixel-border);
    background: #ffffff;
    font-family: inherit;
    font-size: 10px;
    padding: 2px 8px;
    cursor: pointer;
}
.p-cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.p-dow {
    font-size: 8px;
    text-align: center;
    color: #475569;
    padding: 2px 0;
}
.p-cell {
    border: 2px solid #cbd5e1;
    min-height: 58px;
    padding: 3px;
    font-size: 8px;
    line-height: 1.3;
    overflow: hidden;
}
.p-cell.p-empty { border-color: transparent; }
.p-cell.p-today { border-color: var(--pixel-border); }
.p-dn { font-size: 9px; margin-bottom: 2px; }
.p-cc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    margin-top: 2px;
}

.p-items { display: flex; flex-wrap: wrap; gap: 6px; }
.p-item {
    border: 2px solid var(--pixel-border);
    padding: 3px 6px;
    font-size: 10px;
}

/* Hashtagged events in the bulletin board cells */
.b-tag {
    display: block;
    font-size: 8px;
    line-height: 1.3;
    color: #475569;
    overflow-wrap: anywhere;
}

/* Calendar: days without any json info are greyed out (same grey as the calendar border) */
.p-cell.p-nodata { color: #cbd5e1; }
.p-nav:disabled {
    color: #cbd5e1;
    border-color: #cbd5e1;
    cursor: default;
}

/* reason + feeling, shown under the hashtag events */
.p-reason { color: #475569; margin-bottom: 2px; }
.p-feel { margin-bottom: 4px; }
.p-cell .p-reason {
    font-size: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.p-cell .p-feel { font-size: 8px; margin-bottom: 2px; }

/* Calendar days are clickable; the clicked day's info shows in the detail box under the calendar */
.p-cell { cursor: pointer; }
.p-cell.p-empty { cursor: default; }
.p-cell.p-other { opacity: 0.4; }   /* last month's days in the first week: normal contents, faint */
.p-cell.p-sel { background: #e2e8f0; border-color: var(--pixel-border); }
.p-detail {
    border: 2px solid var(--pixel-border);
    padding: 8px;
    margin-top: 8px;
    font-size: 10px;
    line-height: 1.4;
    min-height: 44px;
    overflow-wrap: anywhere;
}
.p-hint { color: #94a3b8; }

/* Small screens: the three past days stack one per row, calendar cells show just the day + status */
@media (max-width: 560px) {
    .p-row3 { grid-template-columns: 1fr; }
    .win-body { padding: 12px; }
    .p-cell { min-height: 40px; padding: 2px; }
    .p-cell .p-tag, .p-cell .p-reason, .p-cell .p-feel, .p-cell .p-cc { display: none; }
}

/* Road sign (top-left): three rows separated by white lines, like a Taiwan highway direction sign */
.road-sign {
    background: #1e7a3c;
    color: #ffffff;
    border: 3px solid #ffffff;
    border-radius: 2px;
    outline: 1px solid #14562a;
    box-shadow: 4px 4px 3px 0 rgba(15, 23, 42, 0.5);
    min-width: 150px;
    pointer-events: auto;
}
.sign-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    color: #ffffff;
    text-decoration: none;
}
.sign-row + .sign-row { border-top: 2px solid #ffffff; }
.sign-link:hover { background: rgba(255, 255, 255, 0.18); }
.sign-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.sign-zh { font-size: 13px; letter-spacing: 2px; }
.sign-title { font-size: 11px; letter-spacing: 0; }
.sign-en { font-size: 8px; letter-spacing: 1px; }
.sign-arrow { width: 22px; height: 15px; fill: #ffffff; flex: none; }
.sign-shield {
    flex: none;
    width: 36px;
    height: 26px;
    background: #2a4fb5;
    border: 2px solid #ffffff;
    border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* On phones the sign scrolls away with the room instead of covering the screen */
@media (max-width: 560px) {
    .header-banner { position: absolute; }
    .road-sign { min-width: 0; }
}

/* Violin case window: donation button (greyed out until the link exists) */
.donate-btn {
    display: inline-block;
    border: 3px solid var(--pixel-border-w);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 11px;
    color: var(--pixel-border-w);
    background: #931201;
    text-decoration: none;
    cursor: pointer;
}
.donate-btn:hover {
    border: 3px solid var(--pixel-border);
    font-size: 11px;
    background: #aa1906;
}
.donate-btn.is-disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #cbd5e1;
    cursor: default;
}

/* ---------- Popup windows (profile calendar, weekly bulletin, violin case) ----------
   Tweak their look with these colours; everything else is in the .win-* rules below. */
:root {
    --win-bar: #1e7a3c;        /* title bar (same green as the road sign) */
    --win-bar-red: #931201;
    --win-bar-text: #ffffff;
    --win-paper: #fbf8ef;      /* window background */
    --win-ink: #0f172a;        /* borders */
}
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
}
.win {
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--win-paper);
    border: 3px solid var(--win-ink);
    border-radius: 20px 20px 7px 20px;
    box-shadow: 3px 6px 6px 0 rgba(15, 23, 42, 0.55);
}
.win-wide { max-width: 650px; }
.win-narrow { max-width: 420px; }
.win-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    background: var(--win-bar-red);
    background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.10) 0 2px, transparent 2px 4px);   /* pinstripes */
    border-bottom: 3px solid var(--win-ink);
    border-radius: 16px 16px 0 0;
}
.win-title {
    margin: 0;
    padding: 1px 8px;
    min-width: 0;
    background: none;                 /* no separate patch behind the title: it sits on the bar itself */
    color: var(--win-bar-text);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 20px 20px 0 0;
}
.win-close {
    margin-left: auto;
    flex: none;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 2px solid var(--win-ink);
    border-radius: 5px;
    background: var(--win-paper);
    color: var(--win-ink);
    font-family: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.win-close:hover { 
  background: var(--win-bar-red); 
  border: 3px solid var(--win-ink);
  font-size: 18px;
}
.win-body {
    padding: 16px;
    overflow-y: auto;
    font-size: 11px;
    line-height: 1.6;
    border-radius: 20px;
}

/* Sound on/off button (fixed, top right) */
.sound-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 25;
    width: 44px;
    height: 44px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 3px solid var(--pixel-border);
    border-radius: 50%;
    box-shadow: 2px 2px 10px 0 rgba(15, 23, 42, 0.5);
    cursor: pointer;
}
.sound-btn svg { width: 100%; height: 100%; fill: var(--pixel-border); }
.sound-btn .waves { display: none; }
.sound-btn.is-on { background: #e8e6e6; }
.sound-btn.is-on .waves { display: inline; }
.sound-btn.is-on .xmark { display: none; }
.sound-btn:hover { background: #d9d9d9; }

/* "weekly bulletin" label above the board: real text in a normal font (placed by script.js) */
.world-label {
    position: absolute;
    transform: translate(-50%, -100%);
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
    font-family: 'Silkscreen', 'Press Start 2P', monospace;   /* 8-bit pixel font */
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #7a2626;
    -webkit-font-smoothing: none;
}




.footer-banner {
    position: absolute; 
    top: 900px; 
    left: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    z-index: 20; 
    pointer-events: none;
}

/* Scaled Taiwan Address Plate (2x size of previous version) */
.address-plate {
    background: #ffffff;
    color: #1e7a3c;
    border: 2px solid #1e7a3c;
    outline: 2px solid #14562a;
    box-shadow: 2px 2px 0 0 rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    overflow: hidden;
    pointer-events: auto;
    min-width: 100px;
    position: relative;
}

.plate-top {
    background: #1e7a3c;
    color: #ffffff;
    text-align: center;
    padding: 1px 6px 3px 36px;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 3px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.plate-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 40px;
    height: 40px;
    background: #ffffff;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Scaled Flower Seal Badge */
.plate-badge {
    position: absolute;
    top: -17px;
    left: 2px;
    width: 36px;
    height: 36px;
    border: 2px solid #1e7a3c;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.flower-icon {
    width: 32px;
    height: 32px;
}

/* Vertical Text Elements */
.plate-vertical {
    writing-mode: vertical-rl;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e7a3c;
    font-weight: bold;
}

/* "台北©" */
.text-left {
    position: absolute;
    left: 2px;
    bottom: 3px;
    font-size: 8px;
    letter-spacing: 1px;
}

.plate-number {
    font-size: 18px;
    font-weight: 900;
    color: #1e7a3c;
    text-align: start;
    flex: 1;
    line-height: 1;
}

/* Right Group Container */
.plate-right-group {
    position: absolute;
    right: 6px;
    top: 2px;
    bottom: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.name-text {
    font-size: 8px;
    letter-spacing: 1.5px;
    font-weight: bold;
}

.sub-text {
    font-size: 6px;
    color: #38704d;
    letter-spacing: 0.2px;
    font-weight: normal;
    white-space: nowrap;
}

.p-tz { color: #94a3b8; text-transform: none; letter-spacing: 0; }

/* ---------- The violin case window (a violin-shaped case that opens) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.case-scene { width: min(94vw, 640px); }
.case-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 600 / 440;
    perspective: 1400px;
    filter: drop-shadow(6px 6px 0 rgba(15, 23, 42, 0.5));
    animation: case-pop 0.3s ease-out;
}
@keyframes case-pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.case-base-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.case-lid3d {                       /* the lid: hinged on its bottom edge, folded shut over the base until .is-open */
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 49.5454%;               /* 218 / 440 */
    transform-origin: 50% 100%;
    transform-style: preserve-3d;
    transform: rotateX(180deg);
    transition: transform 0.9s cubic-bezier(0.25, 0.8, 0.3, 1);
}
.case-stage.is-open .case-lid3d { transform: rotateX(0deg); }
.case-lid-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.case-lid-out { transform: rotateX(180deg); }
.case-lid-face svg { width: 100%; height: 100%; display: block; }
.case-content {                     /* the text, on the velvet of the lid */
    position: absolute;
    left: 33.3%;
    top: 51.4%;
    width: 56.7%;
    height: 38.5%;
    overflow: auto;
    color: #f6ecd9;
    font-size: clamp(9px, 1.9vw, 12px);
    line-height: 1.6;
    opacity: 0;
    transition: opacity 0.4s ease 0.75s;
}
.case-stage.is-open .case-content { opacity: 1; }
.case-text { margin-bottom: 8px; }
.case-lock {                        /* the lock in the middle of the front = the close button */
    position: absolute;
    left: 50%;
    top: 81.2%;
    width: 10.7%;
    height: 6.8%;
    min-width: 46px;
    min-height: 28px;
    transform: translate(-50%, -50%);
    z-index: 3;
    padding: 0;
    background: #c8ccd2;            /* silver */
    border: 3px solid #5b6068;
    box-shadow: inset 3px 3px 0 #eceff3, inset -3px -3px 0 #9fa4ab;
    color: #16110f;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.case-lock:hover { background: #8a8f96; box-shadow: inset 3px 3px 0 #a3a8af, inset -3px -3px 0 #6c7178; }   /* silver -> grey */
@media (prefers-reduced-motion: reduce) {
    .case-lid3d { transition: none; }
    .case-stage { animation: none; }
}

/* ---------- Population board (Taiwan Highway Sign Green Style) ---------- */
.led-board {
  position: absolute;               /* placed by script.js (LED_BOARD) */
  z-index: 4;
  pointer-events: none;             /* lets you still drag the room around over it */
  width: 100%;
  max-width: 180px;
  margin: 0;
  background-color: #1b6b39;        /* Iconic Taiwan highway sign green */
  outline: 1px solid #14562a;
  border: 3px solid #ffffff;        /* White highway sign border */
  border-radius: 4px;
  color: #ffffff;
  font-family: "Courier New", Courier, monospace;
  padding: 8px 6px;
  box-sizing: border-box;
  user-select: none;
  image-rendering: pixelated;
  box-shadow: 4px 6px 3px rgba(0, 0, 0, 0.4); /* Retro solid shadow matching the address plate */
}

.led-header { 
  text-align: center; 
  border-bottom: 2px solid #ffffff; 
  padding-bottom: 4px; 
  margin-bottom: 4px; 
}

.led-title-zh { 
  font-size: 10px; 
  font-weight: bold; 
  letter-spacing: 1px; 
  color: #ffffff; 
}

.led-title-en { 
  font-size: 5px; 
  font-family: 'Press Start 2P', monospace; 
  color: #ffffff; 
  margin-top: 2px; 
}

.led-date-row { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  gap: 4px; 
  margin: 6px 0; 
  color: #ffffff;
}

.led-sub-header { 
  text-align: center; 
  border-top: 1px solid #ffffff; 
  border-bottom: 2px solid #ffffff; 
  padding: 3px 0; 
}

.led-sub-title-zh { 
  font-size: 9px; 
  letter-spacing: 2px; 
  color: #ffffff; 
}

.led-table { 
  width: 100%; 
  border-collapse: collapse; 
  margin-top: 2px; 
}

.led-table td { 
  border: 1px solid #ffffff; 
  padding: 3px 2px; 
  vertical-align: middle; 
}

.label-cell { 
  text-align: center; 
  width: 45%; 
  background-color: #14532b;        /* Deeper green contrast for label cells */
}

.label-zh { 
  font-size: 8px; 
  font-weight: bold; 
  display: block; 
  color: #ffffff; 
}

.label-en { 
  font-size: 4.5px; 
  font-family: 'Press Start 2P', monospace; 
  color: #ffffff; 
  display: block; 
  margin-top: 1px; 
}

.label-split { 
  display: flex; 
  justify-content: space-around; 
  align-items: center; 
}

.led-display-container { 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
  gap: 3px; 
  padding-right: 2px; 
}

/* ONLY the numbers on the right are yellow, set against a dark green display box */
.led-digits {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #fde047;                   /* Yellow digits */
  background-color: #12381f;        /* Dark green digital display box */
  padding: 2px 4px;
  letter-spacing: 1px;
  text-shadow: 0 0 3px #eab308;     /* Retro LED glow effect */
  border: 1px solid #ffffff;
  min-width: 28px;
  text-align: right;
}

.unit-tag { 
  font-size: 6px; 
  color: #ffffff;                   /* Unit tag remains white */
  font-weight: normal; 
}


/* =====================================================================
   Nokia 3310 (the css phone from manz.dev, flattened from nested CSS; see nokia.js)
   ===================================================================== */
@font-face {
  font-family: "Conthrax SB";
  src:
    url(fonts/conthrax-sb.woff2) format("woff2"),
    url(fonts/conthrax-sb.woff) format("woff");
  font-display: block;   /* never show a stand-in font while this one loads */
}

@font-face {
  font-family: "Nokia Cellphone FC";
  src:
    url(fonts/nokia-cellphone-fc.woff2) format("woff2"),
    url(fonts/nokia-cellphone-fc.woff) format("woff");
  font-display: block;   /* never show a stand-in font while this one loads */
}

@font-face {
  font-family: "Rubber Nipple Factory";
  src:
    url(fonts/rubber-nipple-factory.woff2) format("woff2"),
    url(fonts/rubber-nipple-factory.woff) format("woff");
  font-display: block;   /* never show a stand-in font while this one loads */
}

:root {
  --nokia-bgcolor: #3f3d46;
  --nokia-radius-shape: 16% 16% 14% 14% / 31% 31% 54% 54%;
  --nokia-logo-font: "Conthrax SB";
  --nokia-phone-font: "Nokia Cellphone FC", monospace;
  --nokia-number-font: "Rubber Nipple Factory", monospace;
}

.nk-help { font-family: system-ui, sans-serif; }

.nokia3310 {
  width: 170px;
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--nokia-bgcolor);
  background-image:
    linear-gradient(to right, #0005 15%, transparent),
    linear-gradient(111deg, #2f2b31, #7d8299);
  box-shadow: 0 0 8px 4px #0006, 0 0 8px 4px #0005 inset;
  border-radius: var(--nokia-radius-shape);
  position: relative;
}

.nokia3310 .nokia-head-container {
  width: 90%;
  height: 61%;
  border-radius: 25% 25% 60% 60% / 40% 40% 50% 50%;
  transform: translateY(5px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  box-shadow:
      0 6px 0 #ddd inset,
      -8px -16px 0 #ddd inset,
      -12px -16px 0 #aaa inset,
      8px -16px 0 #ddd inset,
      12px -16px 0 #eee inset;
}

.nokia3310 .nokia-head-container .speaker {
  box-shadow: 6px 0 8px #aaa3 inset, -2px 0 6px #000a inset;
  margin-top: 8px;
  margin-bottom: 3px;
  border-radius: 50%;
  width: 9px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 2px 0;
}

.nokia3310 .nokia-head-container .speaker .hole {
  background: #000;
  width: 4px;
  height: 2px;
  border-radius: 50%;
  box-shadow: 0 0 2px #0009;
}

.nokia3310 .nokia-head-container .logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 55px;
  height: 15px;
  font-family: var(--nokia-logo-font);
  font-size: 12px;
  color: #dfdfda;
  background: #111;
  margin-bottom: 8px;
  border-left: 1px solid #444;
  border-right: 1px solid #444;
}

.nokia3310 .nokia-head-container .screen-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #78a47f;
  width: 106px;
  height: 78px;
  border-radius: 8px / 10px 10px 35px 35px;
  border: 1px solid #000a;
  border-top: 2px solid #000a;
  box-shadow: 0 0 8px #000 inset, -4px 0 2px #fff8, 4px 0 2px #2228;
  font-family: var(--nokia-phone-font);
  font-size: 12px;
  color: #2e4434;
  transition: filter 0.5s, background 1s;
}

.nokia3310 .nokia-head-container .bottom-oval {
  margin-top: auto;
  width: 100%;
  height: 50px;
  background: #ddd;
  border-radius: 60%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nokia3310 .nokia-head-container .bottom-oval .big.button.top {
  background: #ddd;
  background-image: linear-gradient(110deg, #ddd, #aaa);
  border: 2px solid #000a;
  width: 75px;
  height: 20px;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  transform: translateY(-4px);
  display: flex;
  justify-content: center;
}

.nokia3310 .nokia-head-container .bottom-oval .big.button.top::before {
  content: "";
  display: block;
  width: 30px;
  height: 4px;
  border: 4px solid #2992a1;
  border-radius: 50%;
  transform: translateY(1px);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

.nokia3310 .bottom-buttons {
  width: 80%;
  display: flex;
  justify-content: space-between;
  position: absolute;
}

.nokia3310 .bottom-buttons .big.button {
  position: relative;
  transform: translateY(200px);
}

.nokia3310 .bottom-buttons .big.button.left {
  background: #ccc;
  background-image: linear-gradient(to bottom, #ddd 55%, #aaa);
  border: 2px solid #000a;
  width: 40px;
  height: 20px;
  border-radius: 31px 11px 11px 21px / 22px 20px 20px;
  transform: translate(5px, 189px) rotate(36deg);
  overflow: hidden;
}

.nokia3310 .bottom-buttons .big.button.left::after {
  content: "";
  background-color: #eee;
  height: 100%;
  width: 100%;
  border-radius: 50%;
  position: absolute;
  transform: translateY(-100%);
  z-index: -1;
}

.nokia3310 .bottom-buttons .big.button.right {
  background: #ddd;
  background-image: linear-gradient(to bottom, #ddd 55%, #aaa);
  border: 2px solid #000a;
  width: 55px;
  height: 25px;
  border-radius: 7px 48px 36px 30px / 5px 16px 11px 15px;
  transform: translateY(189px) rotate(-34deg) skew(-12deg);
  display: flex;
  justify-content: space-around;
  overflow: hidden;
}

.nokia3310 .bottom-buttons .big.button.right::after {
  content: "";
  background-color: #eee;
  height: 100%;
  width: 100%;
  border-radius: 50%;
  position: absolute;
  transform: translateY(-50%);
  z-index: -1;
}

.nokia3310 .bottom-buttons .big.button.right span {
  font-family: var(--nokia-phone-font);
  font-size: 12px;
  display: block;
  transform: translate(0, 4px);
}

.nokia3310 .keyboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 6px;
  width: 85%;
  height: 110px;
  margin-top: 8px;
}

.nokia3310 .keyboard .button-key-container {
  font-family: var(--nokia-number-font);
  font-weight: bold;
  font-size: 14px;
}

.nokia3310 .keyboard .button-key-container.invert .button-key .special {
  order: 2;
}

.nokia3310 .keyboard .button-key-container:nth-child(1) {
  transform: translate(-1px, -5px);
}

.nokia3310 .keyboard .button-key-container:nth-child(4) {
  transform: translate(2px, -2px);
}

.nokia3310 .keyboard .button-key-container:nth-child(7) {
  transform: translate(5px, 1px);
}

.nokia3310 .keyboard .button-key-container:nth-child(10) {
  transform: translate(8px, 4px);
}

.nokia3310 .keyboard .button-key-container:nth-child(2) {
  transform: translate(1px, 0);
}

.nokia3310 .keyboard .button-key-container:nth-child(5) {
  transform: translate(1px, 3px);
}

.nokia3310 .keyboard .button-key-container:nth-child(8) {
  transform: translate(1px, 6px);
}

.nokia3310 .keyboard .button-key-container:nth-child(11) {
  transform: translate(1px, 9px);
}

.nokia3310 .keyboard .button-key-container:nth-child(3) {
  transform: translate(2px, -5px);
}

.nokia3310 .keyboard .button-key-container:nth-child(6) {
  transform: translate(-1px, -2px);
}

.nokia3310 .keyboard .button-key-container:nth-child(9) {
  transform: translate(-4px, 1px);
}

.nokia3310 .keyboard .button-key-container:nth-child(12) {
  transform: translate(-7px, 4px);
}

.nokia3310 .keyboard .button-key-container .button-key {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 0;
  user-select: none;
}

.nokia3310 .keyboard .button-key-container .button-key:active {
  cursor: pointer;
  transform: translateY(1px);
}

.nokia3310 .keyboard .button-key-container .button-key:active.middle {
  transform: translateY(6px);
}

.nokia3310 .keyboard .button-key-container .button-key:active::before {
  box-shadow: 0 2px 0 #0004;
}

.nokia3310 .keyboard .button-key-container .button-key.left .minitext {
  transform: translate(0, 3px);
}

.nokia3310 .keyboard .button-key-container .button-key.left::before {
  --rotation: 15deg;
  border-radius: 33% 67% 43% 36% / 58% 72% 28% 42%;
}

.nokia3310 .keyboard .button-key-container .button-key.middle {
  transform: translateY(5px);
}

.nokia3310 .keyboard .button-key-container .button-key.middle::before {
  border-radius: 48% 52% 50% 50% / 40% 40% 60% 60%;
}

.nokia3310 .keyboard .button-key-container .button-key.right::before {
  --rotation: -15deg;
  border-radius: 67% 33% 36% 43% / 72% 58% 42% 28%;
}

.nokia3310 .keyboard .button-key-container .button-key::before {
  --y: -5px;
  content: "";
  display: block;
  width: 37px;
  height: 20px;
  position: absolute;
  background: #dedee0;
  background-image: linear-gradient(#dedee0, #aaa);
  border-radius: 50%;
  border: 2px solid #000c;
  box-shadow: 0 0 3px #0004;
  z-index: -1;
  transform: translateY(var(--y, 0)) rotate(var(--rotation, 0));
}

.nokia3310 .keyboard .button-key-container .button-key span {
  font-family: var(--nokia-phone-font);
  font-size: 8px;
  font-weight: lighter;
  color: #111;
}

.nokia3310 .keyboard .button-key-container .button-key span.special {
  font-weight: bolder;
  font-size: 10px;
  color: #000;
}

.nokia3310 .keyboard .button-key-container .button-key span.minitext.rotate {
  display: block;
  transform: translateX(4px) rotate(-90deg);
}

.nokia3310 .keyboard .button-key-container .button-key span.minitext {
  transform: translateY(4px);
}

.nokia3310 .keyboard .home {
  border: 1px solid #000;
  border-top: 0;
  width: 4px;
  height: 4px;
  margin-right: 2px;
  margin-top: 2px;
  display: block;
}

.nokia3310 .keyboard .home::before,
.nokia3310 .keyboard .home::after {
  content: "";
  display: block;
  width: 1px;
  height: 5px;
  border-left: 1px solid #000;
  position: absolute;
  transform: translate(0, -3px) rotate(45deg);
}

.nokia3310 .keyboard .home::after {
  transform: translate(3px, -4px) rotate(-45deg);
}

.nokia3310 .keyboard .compact {
  letter-spacing: -4px;
}

/* ---- how the phone sits in the room ---- */
.nk-wrap { position: absolute; width: 0; height: 0; z-index: 6; }
.nk-scale { position: absolute; left: -85px; bottom: 0; width: 170px; height: 360px; transform-origin: 50% 100%; }
.nk-shadow { position: absolute; left: -130px; bottom: -9px; width: 260px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.22), transparent); pointer-events: none; }
.nokia3310, .nokia3310 *, .nokia3310 *::before, .nokia3310 *::after { box-sizing: content-box; }   /* the sample assumes the browser default */
.nokia3310 [data-act] { cursor: pointer; }

/* ---- the screen ---- */
.nokia3310 .nk-lcd { width: 100%; height: 100%; box-sizing: border-box; padding: 3px 9px 8px; display: flex; flex-direction: column;
    font-family: var(--nokia-phone-font); font-size: 8px; line-height: 9px; color: #2e4434; overflow: hidden; text-align: left; border-radius: inherit; }
.nokia3310 .nk-head { display: flex; justify-content: space-between; align-items: flex-end; height: 9px; border-bottom: 1px solid rgba(46, 68, 52, 0.4); margin-bottom: 2px; }
.nokia3310 .nk-sig { display: flex; gap: 1px; align-items: flex-end; height: 7px; width: 13px; flex: none; }
.nokia3310 .nk-sig i { display: block; width: 2px; background: #2e4434; }
.nokia3310 .nk-sig i:nth-child(1) { height: 3px; } .nokia3310 .nk-sig i:nth-child(2) { height: 5px; } .nokia3310 .nk-sig i:nth-child(3) { height: 7px; }
.nokia3310 .nk-sig i.off { opacity: 0.25; }
.nokia3310 .nk-status { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; }
.nokia3310 .nk-clock { flex: none; white-space: nowrap; text-align: right; }
.nokia3310 .nk-log { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.nokia3310 .nk-line { overflow-wrap: anywhere; }
.nokia3310 .nk-sys { opacity: 0.6; }
.nokia3310 .nk-log.nk-gate { justify-content: center; text-align: center; }
.nokia3310 .nk-g1 { font-size: 10px; line-height: 14px; white-space: pre; }
.nokia3310 .nk-type { display: flex; height: 11px; border-top: 1px solid rgba(46, 68, 52, 0.4); margin-top: 2px; padding-top: 1px; }
.nokia3310 .nk-prompt { font-style: normal; margin-right: 3px; }
.nokia3310 .nk-typed { flex: 1; min-width: 0; white-space: pre; overflow: hidden; }
.nokia3310 .nk-cur { font-weight: normal; animation: nk-blink 1s steps(1) infinite; }
@keyframes nk-blink { 50% { opacity: 0; } }

/* ---- blue-line key: number of people in the call ---- */
.nokia3310 .nk-count { position: absolute; left: 0; right: 0; top: 1px; text-align: center; font-family: var(--nokia-number-font); font-size: 11px; color: #2a3140; }
.nk-wrap.nk-in .nokia3310 .bottom-oval .big.button.top::before { animation: nk-pulse 1s steps(1) infinite; }
@keyframes nk-pulse { 50% { border-color: #7fd0ff; } }

/* ---- left button (the sample's "C"): longer, split in two ---- */
.nokia3310 .bottom-buttons .big.button.left { display: flex; width: 54px; height: 24px; transform: translate(3px, 188px) rotate(36deg); }
.nokia3310 .nk-half { flex: 1; display: flex; align-items: center; justify-content: center; }
.nokia3310 .nk-half:active { filter: brightness(0.78); }
.nokia3310 .nk-red { border-left: 1px solid #0006; }
.nokia3310 .nk-ico { width: 20px; height: 15px; transform: rotate(-36deg); }          /* stands the icons upright again */
.nokia3310 .nk-red .nk-ico { opacity: 0.6; }
.nk-wrap.nk-act .nokia3310 .nk-red .nk-ico { opacity: 1; }
.nokia3310 .nk-ico-mic, .nokia3310 .nk-ico-muted { display: none; }
.nk-wrap.nk-in .nokia3310 .nk-ico-call { display: none; }
.nk-wrap.nk-in .nokia3310 .nk-ico-mic { display: block; }
.nk-wrap.nk-in.nk-muted .nokia3310 .nk-ico-mic { display: none; }
.nk-wrap.nk-in.nk-muted .nokia3310 .nk-ico-muted { display: block; }

/* ---- right button: "<" deletes, ">" sends (bigger click area, same layout) ---- */
.nokia3310 .bottom-buttons .big.button.right span { padding: 7px 9px; margin: -7px -9px; }
.nokia3310 .bottom-buttons .big.button.right span:active { filter: brightness(0.7); }


/* ---------- Weather / daylight button (fixed, under the sound button) + the tint layer ---------- */
.weather-btn {
    position: fixed;
    top: 70px;                      /* sound button: top 16 + height 44, plus a 10px gap */
    right: 16px;
    z-index: 25;
    width: 44px;
    height: 44px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 3px solid var(--pixel-border);
    border-radius: 50%;
    box-shadow: 2px 2px 10px 0 rgba(15, 23, 42, 0.5);
    cursor: pointer;
}
.weather-btn svg { width: 100%; height: 100%; fill: var(--pixel-border); }
.weather-btn .sun { display: none; }
.weather-btn.is-on { background: #e8e6e6; }
.weather-btn.is-on .sun { display: inline; }
.weather-btn.is-on .xmark { display: none; }
.weather-btn:hover { background: #d9d9d9; }

/* a see-through colour layer over the whole room; "multiply" keeps the pixel art visible underneath */
.daylight-overlay {
    position: fixed;                /* PERF: window-sized, not room-sized */
    inset: 0;                       /* NOT 100vw / 100vh: on iPhone, when the page is pinched out, vw / vh stay at the phone's normal size while the fixed area grows, so the tint stopped short */
    z-index: 7;                     /* above the room, the LED board and the Nokia; below the buttons, header and windows */
    pointer-events: none;
    mix-blend-mode: multiply;
    background-color: rgb(255, 255, 255);
    transition: background-color 1.5s linear, opacity 1s;
}


/* ---------- Phone button (fixed, under the weather button): shows / hides the Nokia ---------- */
.phone-btn {
    position: fixed;
    top: 124px;                     /* weather button: top 70 + height 44, plus a 10px gap */
    right: 16px;
    z-index: 25;
    width: 44px;
    height: 44px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 3px solid var(--pixel-border);
    border-radius: 50%;
    box-shadow: 2px 2px 10px 0 rgba(15, 23, 42, 0.5);
    cursor: pointer;
}
.phone-btn svg { width: 100%; height: 100%; fill: var(--pixel-border); }
.phone-btn .waves { display: none; }
.phone-btn.is-on { background: #e8e6e6; }
.phone-btn.is-on .waves { display: inline; }
.phone-btn.is-on .xmark { display: none; }
.phone-btn:hover { background: #d9d9d9; }
/* a little dot on the button: green = in a call, orange = a new message while the phone is hidden */
.phone-btn.in-call::after, .phone-btn.has-new::after {
    content: ''; position: absolute; top: -4px; left: -4px; width: 12px; height: 12px;
    border: 2px solid var(--pixel-border); border-radius: 50%; background: #22c55e;
}
.phone-btn.has-new::after { background: #f97316; animation: phone-dot 1s steps(1) infinite; }
@keyframes phone-dot { 50% { opacity: 0.25; } }

/* the Nokia no longer stands in the room: it is fixed on the screen (nokia.js places it), above the daylight tint, under the buttons and windows */
.nk-wrap.nk-hud { position: fixed; z-index: 22; }
.nk-wrap.nk-hud .nk-shadow { display: none; }


/* ---------- The old TV (click the bonfire): a grey CRT set. The screen itself is a canvas (script.js) ---------- */
.tv {
    position: relative;
    width: min(63vw, 400px, calc((100vh - 40px) * 480 / 346 * 2 / 3));   /* 2/3 of the earlier size (94vw, 600px) */
    aspect-ratio: 480 / 346;
    animation: tv-on 0.4s steps(8) both;
    cursor: pointer;
}
.tv svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tv-canvas, .tv-glass {                  /* the glass: x 26-454, y 24-286 of the 480 x 346 drawing */
    position: absolute;
    left: 5.417%; top: 6.936%;
    width: 89.167%; height: 75.723%;
}
.tv-canvas { display: block; }
.tv-glass {                              /* on the glass: a faint sheen and darker corners (add radial-gradient lights here for reflections) */
    border-radius: 7% / 11.45%;
    pointer-events: none;
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.07), transparent 38%),
        radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.4));
}
@keyframes tv-on {                       /* an old set switching on: a thin line that opens up */
    from { transform: scale(1, 0.04); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* ---------- The 平安袋 paper (click the undersea cable) ---------- */
.amulet {
    position: relative;
    width: min(78vw, 80px);
    aspect-ratio: 12 / 32;
    border: 4px double #490601;
    border-radius: 3px;
    background: #cbad77;
    cursor: pointer;
    animation: amulet-rise 0.5s steps(8) both;
}
.amulet-text {                                   /* two columns, read from the right: 海纜平安 then 永不斷線 */
    position: absolute;
    left: 50%; bottom: 30%;
    transform: translateX(-50%);
    writing-mode: vertical-rl;
    font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: #14100c;
    white-space: nowrap;
}
.amulet-seal {                                   /* the red stamp, bottom left: 祖保 / 媽庇 */
    position: absolute;
    left: 3px; bottom: 3px;
    font-size: 8px;                              /* the text size: the box below follows it */
    width: 2.9em; height: 2.9em;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    writing-mode: vertical-rl;
    border: 2px solid #7d1f18;
    border-radius: 3px;
    background: rgba(160, 40, 30, 0.1);
    color: #7d1f18;
    font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
@keyframes amulet-rise { from { transform: translateY(40px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .amulet { animation: none; } }

/* ---------- The 郵政明信片 postcard (click the red mailbox). Everything inside is sized in cqw = 1% of the card's width, so it scales as one piece ---------- */
.postcard {
    position: relative;
    container-type: inline-size;
    width: min(34vw, 373px);   /* (min-width keeps it readable on a phone) */
    min-width: min(96vw, 400px);
    aspect-ratio: 1178 / 830;
    background: #fff;
    border: 6px double #33556b;
    border-radius: 4px;
    font-family: var(--nokia-phone-font);
    color: #d23a26;
    cursor: default;
    animation: postcard-rise 0.5s steps(8) both;
}
.postcard > * { position: absolute; margin: 0; }
.pc-title { transform: translateX(-50%); font-family: var(--nokia-phone-font); font-size: max(23px, 2.9cqw); letter-spacing: 0.06em; color: #c8392b; white-space: nowrap; }
.pc-block { display: flex; flex-direction: column; gap: 0.7em; }       /* the rows, one under the other: they follow the font-size below */
.pc-field { display: flex; flex-direction: column; gap: 3px; }
.pc-label { font-size: max(16px, 1.85cqw); line-height: 1.15; white-space: nowrap; }
.pc-text { font-size: max(16px, 1.9cqw); line-height: 1.15; letter-spacing: 0.05em; color: #1b1b1f; white-space: nowrap; }
.pc-suffix { margin-left: 1.6em; }
.pc-link { color: #1b1b1f; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; cursor: pointer; }   /* the e-mail address: a link */
.pc-link:hover, .pc-link:focus-visible { color: #d23a26; text-decoration-style: solid; outline: none; }
.pc-stamp svg { display: block; width: 100%; height: auto; }
.pc-note { text-align: center; font-size: max(9px, 1.85cqw); line-height: 1.5; white-space: nowrap; }
@keyframes postcard-rise { from { transform: translateY(40px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .postcard { animation: none; } }

/* ---------- the upright side of the postcard (green mailbox) ---------- */
.postcard-v { width: min(90vw, 340px); min-width: 0; aspect-ratio: 360 / 514; }
.postcard-v .pc-label { font-size: max(12px, 3.4cqw); }
.postcard-v .pc-note { font-size: max(11px, 3cqw); }
.pc-boxes { display: flex; align-items: center; }
.pc-box { box-sizing: border-box; display: flex; align-items: center; justify-content: center; color: #1b1b1f; border: max(1.5px, 0.55cqw) solid #c8392b; }
.pc-dash { background: #c8392b; }
.pc-boxes-big { gap: 1.1cqw; --bw: 7.8cqw; }
.pc-boxes-big .pc-box { flex: none; width: var(--bw); height: 9.4cqw; font-size: max(10px, calc(var(--bw) * 0.67)); }
.pc-boxes-big .pc-dash { flex: none; width: 3.4cqw; height: 0.9cqw; }
.pc-boxes-small { gap: 0.55cqw; }
.pc-boxes-small .pc-box { width: 4.3cqw; height: 6.1cqw; font-size: max(9px, 3cqw); border-width: max(1px, 0.4cqw); }
.pc-boxes-small .pc-dash { width: 2.2cqw; height: 0.6cqw; }
/* "recipient" + the choice beside it */
.pc-to { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
.pc-select { font: inherit; font-size: max(12px, 3.2cqw); color: #1b1b1f; background: #fff; border: max(1.5px, 0.5cqw) solid #c8392b; border-radius: 0; padding: 1px 2px; max-width: 100%; cursor: pointer; }
.pc-select:focus-visible { outline: 2px solid #33556b; outline-offset: 1px; }
/* the place to write: an empty one shows a flashing | so the visitor sees they can type; once it has the focus the browser's own flashing cursor takes over */
.pc-write { overflow-y: auto; padding: 2px; font-size: max(14px, 4.2cqw); line-height: 1.4; color: #1b1b1f; white-space: pre-wrap; word-break: break-word; caret-color: #c8392b; outline: none; cursor: text; }
.pc-write:empty:not(:focus)::before { content: '|'; color: #c8392b; animation: pc-blink 1s steps(1) infinite; }
@keyframes pc-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pc-write:empty:not(:focus)::before { animation: none; } }
/* the end-greeting bar, the send icon and the "are you sure" question */
.pc-greeting { font-size: max(11px, 3cqw); text-overflow: ellipsis; }
.pc-send { box-sizing: border-box; padding: 0; margin: 0; border: 0; background: none; width: 12cqw; min-width: 30px; color: #c8392b; cursor: pointer; }
.pc-send svg { display: block; width: 100%; height: auto; }
.pc-send:hover:not(:disabled), .pc-send:focus-visible { color: #c8392b; outline: none; }
.pc-send:disabled { color: #cfcfcf; cursor: not-allowed; }
.pc-confirm { inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(51, 85, 107, 0.55); z-index: 5; cursor: default; }
.pc-confirm-box { box-sizing: border-box; width: 82%; padding: 5cqw 4cqw; background: #fff; border: 4px double #33556b; border-radius: 4px; text-align: center; color: #1b1b1f; }
.pc-confirm-box p { margin: 0 0 4cqw; font-size: max(13px, 4.2cqw); line-height: 1.35; }
.pc-confirm-btns { display: flex; justify-content: center; gap: 4cqw; }
.pc-confirm-btns button { font: inherit; font-size: max(13px, 4cqw); padding: 1.2cqw 4cqw; color: #33556b; background: #fff; border: 2px solid #33556b; border-radius: 0; cursor: pointer; }
.pc-confirm-btns button[data-a="yes"] { color: #fff; background: #c8392b; border-color: #c8392b; }
.pc-confirm-btns button:hover, .pc-confirm-btns button:focus-visible { outline: 2px solid #33556b; outline-offset: 2px; }
.pc-from { display: flex; align-items: baseline; gap: 6px; }
.pc-name { flex: 1; min-width: 0; box-sizing: border-box; font: inherit; font-size: max(13px, 3.6cqw); color: #1b1b1f; background: transparent; border: 0; border-bottom: max(1.5px, 0.5cqw) solid #c8392b; border-radius: 0; padding: 0 2px; caret-color: #c8392b; outline: none; }
.pc-name::placeholder { color: #d9b4ad; }
.pc-name:focus { border-bottom-color: #33556b; }
/* the location pin: grey beside the name (click = add a location row), red at the start of that row; the cross at its end takes the row away again */
.pc-pin { flex: none; box-sizing: border-box; width: max(18px, 5.4cqw); padding: 0; margin: 0; border: 0; background: none; color: #cfcfcf; cursor: pointer; align-self: center; line-height: 0; }
.pc-pin svg { display: block; width: 100%; height: auto; }
button.pc-pin:hover, button.pc-pin:focus-visible { color: #b5b5b5; outline: none; }
.pc-pin.is-on { color: #c8392b; cursor: default; }
.pc-loc { display: flex; align-items: center; gap: 6px; }
.pc-from-loc { align-items: center; }
.pc-x { flex: none; padding: 0 2px; margin: 0; border: 0; background: none; font: inherit; font-size: max(18px, 5cqw); line-height: 1; color: #c8392b; cursor: pointer; }
.pc-x:hover, .pc-x:focus-visible { color: #33556b; outline: none; }
/* the inbox (the postcards you may read) and its login */
.pc-linkbtn { font: inherit; font-size: max(12px, 3.2cqw); color: #33556b; background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; cursor: pointer; }
.pc-linkbtn:hover, .pc-linkbtn:focus-visible { color: #c8392b; text-decoration-style: solid; outline: none; }
.pc-back { left: 5%; top: 2.5%; }
.pc-inbox-body { left: 6%; right: 6%; top: 14%; bottom: 11%; overflow-y: auto; display: flex; flex-direction: column; gap: 3cqw; font-size: max(12px, 3.6cqw); color: #1b1b1f; }
.pc-empty { margin: 0; color: #888; }
.pc-mail { border-bottom: 1px dotted #c8392b; padding-bottom: 2.5cqw; }
.pc-mail-head { font-size: max(11px, 3cqw); color: #c8392b; margin-bottom: 1cqw; }
.pc-mail-text { white-space: pre-wrap; word-break: break-word; line-height: 1.4; }
.pc-mail-sign { white-space: pre-wrap; margin-top: 1.5cqw; color: #33556b; }
.pc-inbox-foot { left: 6%; right: 6%; bottom: 3%; font-size: max(11px, 3cqw); color: #666; }
.pc-login { display: flex; flex-direction: column; gap: 2.5cqw; align-items: flex-start; }
.pc-login p { margin: 0; }
.pc-login .pc-name { width: 100%; flex: none; }
.pc-login-msg { color: #c8392b; min-height: 1.2em; }

/* ---- Walk button (under the weather button) + the "walk as" window ---- */
.walk-btn {
    position: fixed;
    top: 124px;                     /* weather button: top 70 + height 44, plus a 10px gap */
    right: 16px;
    z-index: 25;
    width: 44px;
    height: 44px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 3px solid var(--pixel-border);
    border-radius: 50%;
    box-shadow: 2px 2px 10px 0 rgba(15, 23, 42, 0.5);
    cursor: pointer;
}
.walk-btn svg { width: 100%; height: 100%; fill: var(--pixel-border); stroke: var(--pixel-border); }
.walk-btn svg g { fill: none; }
.walk-btn:hover { background: #d9d9d9; }
.walk-btn.is-on { background: #d04c27; } 
.walker-help { margin: 0 0 12px; font-size: 14px; line-height: 1.4; }
.walker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.walker-pick {
    display: flex; align-items: center; gap: 8px; text-align: left;
    padding: 8px 10px; background: #fff; color: inherit; font: inherit; cursor: pointer;
    border: 3px solid var(--pixel-border);
}
.walker-pick:hover { background: #eee; }
.walker-pick.is-me { background: #f9dcc3; }
.walker-pick .dot { flex: none; width: 18px; height: 18px; border: 2px solid var(--pixel-border); }
.walker-pick b { display: block; font-size: 14px; }
.walker-pick small { display: block; font-size: 11px; opacity: .7; }
.walker-pick:disabled { opacity: .45; cursor: not-allowed; }
.walker-stop { margin-top: 12px; padding: 8px 12px; font: inherit; cursor: pointer; background: #fff; border: 3px solid var(--pixel-border); }
.walker-stop:hover { background: #eee; }
/* the red number on the MAIL box (how many unread postcards) */
.mail-badge {
    position: absolute; top: -9px; right: -9px;
    display: none; align-items: center; justify-content: center;
    box-sizing: border-box; min-width: 20px; height: 20px; padding: 0 4px;
    border: 2px solid #fff; border-radius: 10px;
    background: #d83a2a; color: #fff;
    font: 700 11px/1 Arial, 'Helvetica Neue', Helvetica, sans-serif;
    box-shadow: 1px 2px 0 rgba(15, 23, 42, 0.45);
}

/* an opened postcard (read-only) with its postmark */
.pc-postmark { color: rgba(30, 55, 105, 0.9); mix-blend-mode: multiply; pointer-events: none; }
.pc-postmark svg { display: block; width: 100%; height: auto; }
.pc-read { cursor: default; overflow-y: auto; }
.pc-read-val { font-size: max(13px, 3.6cqw); color: #1b1b1f; word-break: break-word; }
.pc-read-greeting { font-size: max(13px, 3.4cqw); color: #1b1b1f; }
.pc-mail { cursor: pointer; }
.pc-mail:hover, .pc-mail:focus-visible { background: #fff5f3; outline: none; }
.pc-mail-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }   /* the list shows a preview; "open" shows it all */
.pc-mail-open { margin-top: 1.5cqw; font-size: max(11px, 3cqw); color: #c8392b; text-align: right; }
/* the stamp on the upright card is a button: it opens the stamp window */
.pc-stamp.is-pick { cursor: pointer; }
.pc-stamp.is-pick:hover, .pc-stamp.is-pick:focus-visible { outline: 2px dashed #33556b; outline-offset: 3px; }
.pc-stamp-box { max-height: 88%; overflow-y: auto; }
.pc-stamp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5cqw; margin-bottom: 3cqw; }
.pc-stamp-tile { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 1cqw; padding: 1.5cqw; font: inherit; font-size: max(11px, 3cqw); color: #33556b; background: none; border: 2px solid transparent; cursor: pointer; }
.pc-stamp-tile svg { display: block; width: 100%; height: auto; }
.pc-stamp-tile:hover, .pc-stamp-tile:focus-visible { border-color: #33556b; outline: none; }
.pc-stamp-tile.is-on { border-color: #c8392b; }
.pc-stamp-mine { margin-bottom: 3cqw; font-size: max(12px, 3.4cqw); line-height: 1.35; color: #33556b; }
.pc-stamp-mine .pc-stamp-msg { margin: 0 0 2.5cqw; font-size: max(12px, 3.4cqw); }
.pc-stamp-mine .pc-confirm-btns { flex-wrap: wrap; gap: 2.5cqw; }