/* Bellkeepers. A painted world, separate from the TillBell clock on purpose.
   Layout: the tower scrolls in the middle of a frozen sky; a parchment-and-brass panel sits beside it (below it on phones). */
:root {
  color-scheme: light;
  --parchment: #f4ebdd;
  --parchment-2: #eadcc4;
  --parchment-3: #dcc9a8;
  --ink: #2e241b;
  --ink-soft: #6b5a47;
  --brass: #b8863b;
  --brass-light: #e2b968;
  --brass-dark: #7a5520;
  --teal: #1f5e63;
  --teal-dark: #143f43;
  --sky-top: #3f6f9f;
  --sky-mid: #9cc3df;
  --sky-low: #f6d79a;
  --sand: #f2c45a;
  --ice: #6fb7df;
  --amber: #e3a142;
  --violet: #8e79c9;
  --rift: #2e8c86;
  --bronze: #a97142;
  --danger: #9b3b2b;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --body: 'Nunito Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(32, 22, 10, .28), 0 2px 6px rgba(32, 22, 10, .18);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--body); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--sky-mid); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--brass-light); outline-offset: 2px; }
img { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-low) 80%, #fff1d2 100%); background-size: cover; background-position: center; transition: filter 1.2s; }
.sky.has-art { background-color: var(--sky-mid); }
body.sealed .sky { filter: saturate(.55) brightness(.72) hue-rotate(-8deg); }
.motes { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- dev bar ---------- */
.devbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 12px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); background: rgba(14, 18, 24, .92); color: #d9e2ec; font: 12px/1.3 var(--mono); }
.devbar .tag { color: #f5c26b; letter-spacing: .08em; }
.devbar .clock { color: #fff; }
.devbar .grp { display: inline-flex; gap: 4px; align-items: center; }
.devbar button { background: #26303c; border: 1px solid #3a4756; border-radius: 6px; padding: 3px 8px; color: #d9e2ec; }
.devbar button:hover { background: #33404f; }
.devbar button[aria-pressed="true"] { background: #f5c26b; color: #1a1408; border-color: #f5c26b; }
.devbar label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.devbar .state { padding: 2px 6px; border-radius: 4px; background: #33404f; }
.devbar .state.class { background: #6b4d1c; }
.devbar .state.open { background: #1f5e63; }

/* ---------- app shell ---------- */
.app { position: relative; z-index: 2; height: 100%; padding-top: var(--devbar, 40px); }

/* ---------- gate (outside the realm) ---------- */
.gate { height: 100%; display: grid; place-items: center; padding-inline: 16px; padding-block: 24px; }
.gate-scene { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: center; }
.gate-card { position: relative; width: min(520px, 100%); text-align: center; display: grid; gap: 14px; justify-items: center; }
.gate-card::before { content: ""; position: absolute; inset: -60px -90px; z-index: -1; background: radial-gradient(closest-side, rgba(24, 16, 6, .55), rgba(24, 16, 6, 0)); pointer-events: none; }
.gate-card h1 { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 6vw, 50px); line-height: 1.05; margin: 0; color: #fff8ea; text-shadow: 0 2px 18px rgba(20, 12, 4, .55); text-wrap: balance; }
.gate-card h1 em { color: var(--brass-light); }
.gate-card .lede { margin: 0; color: #fff3dc; font-size: 16px; text-shadow: 0 1px 10px rgba(20, 12, 4, .6); max-width: 42ch; }
.gate-tarry { width: 180px; height: 180px; }
.gate .sheet { width: 100%; }

/* ---------- parchment sheets ---------- */
.sheet { background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-2) 100%); border: 2px solid var(--brass-dark); border-radius: var(--radius); box-shadow: var(--shadow), inset 0 0 0 4px rgba(226, 185, 104, .45), inset 0 0 0 5px rgba(122, 85, 32, .25); padding: 16px 18px; text-align: left; }
.sheet h2, .sheet h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.1; }
.sheet h2 { font-size: 28px; }
.sheet h3 { font-size: 21px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--brass), transparent); border: 0; margin: 12px 0; opacity: .7; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--brass-dark); background: linear-gradient(180deg, #2a7177 0%, var(--teal) 55%, var(--teal-dark) 100%); color: #fff6e6; font-weight: 700; letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 0 var(--brass-dark); transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { filter: grayscale(.7) brightness(.9); opacity: .6; cursor: not-allowed; }
.btn.big { min-height: 52px; font-size: 18px; padding: 10px 28px; font-family: var(--display); font-weight: 700; letter-spacing: .03em; }
.btn.gold { background: linear-gradient(180deg, #f1cf86 0%, var(--brass) 60%, var(--brass-dark) 100%); color: #2a1a06; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--brass); box-shadow: none; }
.btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }

/* ---------- realm layout ---------- */
.realm { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 410px); gap: 18px; padding-inline: 16px; padding-block: 14px; }
.tower-scroll { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding-block: 24px 40px; }
.tower { width: min(560px, 100%); margin: 0 auto; display: grid; }
.panel-wrap { overflow-y: auto; padding-block: 4px 24px; scrollbar-width: thin; }
.panel { display: grid; gap: 12px; }

/* tower pieces */
.piece { position: relative; width: 100%; aspect-ratio: 3 / 2; }
.piece > .art, .piece > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.room { border: 0; padding: 0; background: none; display: block; text-align: left; }
.room + .room { margin-top: -0.5%; }
.room .plate { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); display: inline-flex; gap: 8px; align-items: center; padding: 3px 12px 4px; border-radius: 999px; background: rgba(244, 235, 221, .92); border: 1.5px solid var(--brass-dark); font-family: var(--display); font-weight: 700; font-size: 17px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--brass-dark); background: transparent; }
.pips i.on { background: var(--brass); }
.room.locked > .art, .room.locked > img { filter: grayscale(.8) brightness(.55); }
.room.locked .plate { background: rgba(60, 50, 40, .85); color: #e7dccb; }
.room.selected .plate { background: var(--brass-light); }
.room:hover .plate { transform: translateX(-50%) translateY(-2px); }
.room.selected::after { content: ""; position: absolute; inset: 4% 7%; border-radius: 10px; box-shadow: 0 0 0 3px var(--brass-light), 0 0 30px rgba(242, 196, 90, .6); pointer-events: none; }
.island { position: relative; }
.island .hourglass { position: absolute; left: 50%; top: 2%; width: 17%; transform: translateX(-50%); }
.island .hourglass .art { aspect-ratio: 2 / 3; }
.island .tarry { position: absolute; left: 62%; top: 4%; width: 18%; }
.island .tarry .art { aspect-ratio: 1; }

/* ---------- art placeholders ---------- */
.art { position: relative; width: 100%; height: 100%; }
.art.missing { display: grid; place-items: center; border-radius: 10px; color: rgba(46, 36, 27, .65); font: 600 12px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; text-align: center; padding: 8px; }
.art.missing.k-room { background: radial-gradient(ellipse at 50% 60%, #8a7a66 0%, #5d5143 70%), #5d5143; border-top: 10px solid #cfc4b3; border-bottom: 10px solid #cfc4b3; border-radius: 4px 4px 4px 4px; color: #efe5d3; font-family: var(--display); font-size: 22px; text-transform: none; letter-spacing: 0; }
.art.missing.k-room.s1 { background: radial-gradient(ellipse at 50% 60%, #b08d5a 0%, #6d5638 70%); }
.art.missing.k-room.s2 { background: radial-gradient(ellipse at 50% 55%, #f3cf7a 0%, #b4863d 55%, #6a4b20 100%); color: #2e1f08; }
.art.missing.k-roof { background: linear-gradient(180deg, transparent 0 8%, #546474 8% 45%, #cfc4b3 45% 92%, #b9ab95 92%); clip-path: polygon(50% 0, 78% 45%, 76% 100%, 24% 100%, 22% 45%); color: #2e241b; }
.art.missing.k-island { background: radial-gradient(ellipse at 50% 10%, #cfc4b3 0 18%, transparent 19%), linear-gradient(180deg, transparent 0 14%, #7b6a55 14%); clip-path: polygon(8% 14%, 92% 14%, 80% 55%, 58% 95%, 42% 95%, 20% 55%); }
.art.missing.k-prop, .art.missing.k-cutout { background: radial-gradient(circle, rgba(244, 235, 221, .9) 0 45%, transparent 70%); border-radius: 50%; }
.art.missing.k-icon { background: radial-gradient(circle at 40% 35%, var(--brass-light), var(--brass) 60%, var(--brass-dark)); border-radius: 50%; color: #2a1a06; font-size: 0; }
.art.missing.k-card { background: radial-gradient(ellipse at 50% 40%, #fbe8bb 0%, #6a7f96 70%, #2b3a4a 100%); color: #fff6e6; }
.art.missing.k-frame { background: none; border: 8px solid var(--frame, var(--bronze)); border-radius: 46% 46% 10px 10px / 18% 18% 10px 10px; font-size: 0; }
.art.missing.k-scene { background: none; font-size: 0; }

/* ---------- panel content ---------- */
.status { display: grid; gap: 10px; }
.status-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.timer { display: inline-flex; align-items: baseline; gap: 8px; }
.timer b { font-family: var(--display); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.timer.urgent b { color: var(--danger); }
.wallet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.coin { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, .45); border: 1px solid rgba(122, 85, 32, .25); min-width: 0; }
.coin .ic { width: 28px; height: 28px; flex: none; }
.coin div { display: grid; min-width: 0; }
.coin small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.coin b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ic .art { width: 100%; height: 100%; }
.ic img { width: 100%; height: 100%; object-fit: contain; }
.ic.sand .art.missing { background: radial-gradient(circle at 40% 35%, #ffe7a3, var(--sand) 55%, #b58a2c); }
.ic.glass .art.missing { background: radial-gradient(circle at 40% 35%, #ffffff, #cfe7ef 55%, #8fb7c4); }
.ic.stillness .art.missing { background: radial-gradient(circle at 40% 35%, #e9f6ff, var(--ice) 55%, #3f86b0); }

.tarry-say { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.tarry-say .face { width: 64px; height: 64px; }
.bubble { position: relative; background: #fffaf0; border: 1.5px solid var(--brass); border-radius: 12px; padding: 8px 12px; font-family: var(--display); font-style: italic; font-size: 17px; line-height: 1.25; }
.bubble::before { content: ""; position: absolute; left: -8px; top: 50%; width: 12px; height: 12px; background: #fffaf0; border-left: 1.5px solid var(--brass); border-bottom: 1.5px solid var(--brass); transform: translateY(-50%) rotate(45deg); }

.room-detail { display: grid; gap: 10px; }
.room-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.room-head .ic { width: 44px; height: 44px; }
.rate-line .ic { width: 22px; height: 22px; margin-right: 2px; }
.stage-row { display: grid; gap: 6px; }
.effect { display: grid; grid-template-columns: 74px 1fr; gap: 8px; font-size: 14px; }
.effect span:first-child { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding-top: 2px; }
.cost { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 700; }
.cost span { display: inline-flex; gap: 4px; align-items: center; }
.cost .short { color: var(--danger); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.note { font-size: 13px; color: var(--ink-soft); }

.list { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .45); border: 1px solid rgba(122, 85, 32, .2); }
.row .ic { width: 44px; height: 44px; }
.row b { display: block; font-family: var(--display); font-size: 18px; line-height: 1.1; }
.row p { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.row.off { opacity: .55; }
.switch { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 600; }

.leave-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rate-line { font-size: 13px; color: var(--ink-soft); }

/* ---------- spell cards ---------- */
.spellbook { width: min(1080px, 100%); max-height: calc(100% - 20px); overflow-y: auto; }
.rotation { display: flex; gap: 10px; flex-wrap: wrap; }
.slot { width: 92px; aspect-ratio: 2 / 3; border-radius: 10px; border: 2px dashed var(--brass); display: grid; place-items: center; color: var(--ink-soft); font-size: 12px; text-align: center; padding: 4px; }
.slot.filled { border: 0; padding: 0; display: block; }
.slot .card { width: 100%; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.card { display: grid; gap: 8px; align-content: start; }
.card-art { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; }
.card-art > .art, .card-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-art .frame { position: absolute; inset: 0; z-index: 2; }
.card-art .frame img { width: 100%; height: 100%; object-fit: fill; }
/* Every frame's name plate spans 80.6%-89.9% of the card height; centre the name in it and size it to the card. */
.card-art { container-type: inline-size; }
.card-art .tag { position: absolute; z-index: 3; left: 50%; top: 85.25%; transform: translate(-50%, -50%); max-width: 68%; overflow: hidden; text-overflow: ellipsis; font-family: var(--display); font-style: italic; font-weight: 700; color: #fff7e6; font-size: 9cqw; line-height: 1; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 8px rgba(0, 0, 0, .5); }
.card.locked .card-art > .art, .card.locked .card-art > img { filter: grayscale(.85) brightness(.6); }
.card .meta { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.card p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.school-starter { --school: var(--bronze); }
.school-stillness { --school: var(--ice); }
.school-haste { --school: var(--amber); }
.school-echo { --school: var(--violet); }
.school-rift { --school: var(--rift); }
.card .meta .school { color: var(--school); filter: brightness(.75); }
.card-art .frame .art.missing { --frame: var(--school); }
.card.active .card-art { box-shadow: 0 0 0 3px var(--school), 0 0 24px var(--school); }
.slot .card-art { border-radius: 8px; }

/* ---------- overlay ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding-inline: 16px; padding-block: calc(var(--devbar, 40px) + 12px) 16px; background: rgba(20, 14, 6, .45); backdrop-filter: blur(3px); }
.overlay .sheet { max-height: 100%; overflow-y: auto; }
.collect { width: min(460px, 100%); text-align: center; display: grid; gap: 10px; justify-items: center; }
.collect .glass-art { width: 150px; height: 225px; }
.collect .amount { font-family: var(--display); font-size: 54px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.collect .parts { font-size: 13px; color: var(--ink-soft); }
.collect .extras { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-weight: 700; }
.newbell { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(242, 196, 90, .25); border: 1px solid var(--brass); text-align: left; }
.newbell .ic { width: 44px; height: 44px; }
.close-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--brass-dark); background: var(--parchment); font-size: 20px; line-height: 1; }
.sheet.has-close { position: relative; padding-right: 54px; }

/* ---------- crossing ---------- */
.crossing { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 244, 214, .0) 0%, rgba(255, 244, 214, .0) 40%, rgba(255, 236, 190, .9) 100%); animation: cross-fade 1.4s ease-out forwards; pointer-events: none; }
.crossing .ring { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 246, 220, .95); box-shadow: 0 0 40px 10px rgba(255, 220, 140, .8), inset 0 0 30px rgba(255, 220, 140, .8); animation: ring-out 1.4s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes ring-out { to { width: 260vmax; height: 260vmax; opacity: 0; } }
@keyframes cross-fade { 0% { background-color: rgba(255, 240, 200, 0); } 30% { background-color: rgba(255, 240, 200, .55); } 100% { background-color: rgba(255, 240, 200, 0); } }

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 45; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: min(520px, calc(100% - 32px)); padding: 10px 18px; border-radius: 999px; background: rgba(46, 36, 27, .92); color: #fff3dc; font-weight: 600; box-shadow: var(--shadow); text-align: center; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100%; }
  .realm { grid-template-columns: 1fr; height: auto; }
  .tower-scroll, .panel-wrap { overflow: visible; }
  /* Phones: status first, then the tower, then the selected room. */
  .panel-wrap, .panel { display: contents; }
  .status { order: 1; }
  .tarry-say { order: 2; }
  .tower-scroll { order: 3; }
  .room-detail { order: 4; }
  .tower-scroll { padding-block: 8px 8px; }
  .tower { width: min(440px, 100%); }
  .wallet { grid-template-columns: 1fr 1fr 1fr; }
  .coin .ic { width: 22px; height: 22px; }
  .room .plate { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .crossing, .crossing .ring { animation: none; display: none; }
  .btn, .sky { transition: none; }
}

/* ---------- Arcana detail ---------- */
button.card-art { display: block; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; }
button.card-art:hover { transform: translateY(-3px); }
.arcana-detail { width: min(860px, 100%); display: grid; gap: 12px; }
.arcana-detail .back { justify-self: start; }
.arcana-body { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 24px; align-items: start; }
.arcana-card .card-art { box-shadow: 0 12px 30px rgba(32, 22, 10, .35); }
.arcana-text { display: grid; gap: 8px; align-content: start; }
.arcana-text h2 { font-size: 36px; }
.arcana-text h3 { font-family: var(--display); font-size: 20px; margin: 8px 0 0; }
.arcana-text ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.arcana-text p { margin: 0; }
.arcana-text .school-name { color: var(--school); filter: brightness(.7); }
.arcana-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--ink-soft); padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(122, 85, 32, .2); }
.arcana-stats b { color: var(--ink); }
.arcana-tip { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; margin: 6px 0 4px; padding: 10px 12px; border-radius: 12px; background: #fffaf0; border: 1.5px solid var(--brass); }
.arcana-tip .face { width: 52px; height: 52px; }
.arcana-tip p { font-size: 14px; }
@media (max-width: 640px) {
  .arcana-body { grid-template-columns: 1fr; }
  .arcana-card { width: min(240px, 70%); justify-self: center; }
  .arcana-text h2 { font-size: 30px; }
}
.arcana-text .lore { font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.35; color: #4a3b2c; padding: 4px 0 4px 14px; border-left: 3px solid var(--brass); }

/* ---------- TillBell clock stand-in (default screen) ---------- */
body.clock { background: #000; }
body.clock .sky, body.clock .motes { display: none; }
.clock-standin { position: relative; height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px; background: #000; color: #fff; font-family: 'Helvetica Neue', Arial, sans-serif; text-align: center; }
.standin-tag { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font: 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #5d6670; white-space: nowrap; }
.clock-label { font-size: clamp(18px, 3vw, 28px); font-weight: 300; color: #c9d3de; }
.clock-time { font-size: clamp(88px, 22vw, 240px); font-weight: 200; line-height: 1; letter-spacing: -.02em; }
.clock-sub { font-size: 15px; font-weight: 300; color: #7d8894; min-height: 1.2em; }
.realm-link { position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #2a2f35; border-radius: 999px; background: transparent; color: #8a949e; font: 13px/1 'Helvetica Neue', Arial, sans-serif; }
.realm-link:hover { color: #fff; border-color: #4a525b; }
.realm-link .dot { width: 7px; height: 7px; border-radius: 50%; background: #4a525b; }
.realm-link.open { color: #f2d48c; border-color: #6b5420; }
.realm-link.open .dot { background: #f2c45a; box-shadow: 0 0 8px #f2c45a; }
.gate-back { position: fixed; z-index: 5; left: 16px; top: calc(var(--devbar, 40px) + 12px); padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 243, 220, .5); background: rgba(20, 14, 6, .45); color: #fff3dc; font-weight: 600; backdrop-filter: blur(4px); }
.gate-back:hover { background: rgba(20, 14, 6, .65); }
.tb-readout { width: 100%; display: grid; place-items: center; color: #fff; font-family: 'Helvetica Neue', Arial, sans-serif; }
.clock-standin { place-content: center stretch; }
/* The clock fills the screen at every width (on phones .app is height:auto, so 100% would collapse). */
.clock-standin { min-height: calc(100vh - var(--devbar, 40px)); min-height: calc(100dvh - var(--devbar, 40px)); }
@media (max-width: 860px) {
  .realm-link { left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }
}
