/* Living archive: quiet reading surfaces, a grounded collection, and one clear next step. */
:root {
  --bg: #111a16;
  --ink: #f0eee2;
  --ink-2: #c0c8ba;
  --ink-3: #9eae9d;
  --glass: #1b2720;
  --glass-edge: #3a493b;
  --accent: #c5d5a9;
  --accent-2: #d8b985;
  --good: #c5d5a9;
  --radius: 14px;
}
body { font-size: 16px; background: var(--bg); }
body::before { content: ""; position: fixed; inset: 0; background: radial-gradient(ellipse at 65% 0, #58674024, transparent 65%); pointer-events: none; }
#sky { opacity: .12; filter: saturate(.3); }
#life { opacity: .45; }
#biome { opacity: .12; }
html:has(dialog[open]) #life { visibility: hidden; }
button, input, select, textarea { font: inherit; }
button { min-height: 44px; }
select { width: 100%; padding: .65rem .8rem; background: #121d16; color: var(--ink); border: 1px solid var(--glass-edge); border-radius: 10px; min-height: 46px; }
select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.primary, #revealDlg.letter .primary {
  border-radius: 11px; background: var(--accent); color: #1a281b;
  box-shadow: none; font-weight: 600; min-height: 46px;
}
.primary:hover { background: #d5e2be; box-shadow: none; }
.ghost { border-radius: 11px; background: #ffffff04; }
.link { color: var(--ink-2); }
input:not([type=range]), textarea { background: #131e17; border-radius: 10px; }
input:focus, textarea:focus { box-shadow: 0 0 0 3px #c5d5a91c; }
.fine, .sub, .opt { color: var(--ink-3); }
.kicker { color: var(--accent-2); font-size: .72rem; letter-spacing: .13em; line-height: 1.6; }
.bar {
  flex-wrap: nowrap; height: 76px; padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-color: #ffffff09; background: #111a16f5; box-shadow: none;
}
.brand { font-size: .8rem; letter-spacing: .15em; font-weight: 500; white-space: nowrap; }
.brand .dot { width: 9px; height: 15px; border-radius: 90% 0 90% 0; background: var(--accent); box-shadow: none; transform: rotate(-15deg); }
.who { gap: 8px; }
#accountBtn { border: 1px solid var(--glass-edge); border-radius: 50%; width: 38px; height: 38px; min-height: 38px; padding: 0; font-size: .8rem; }
.sound { width: 40px; height: 40px; min-height: 40px; }
.sound[data-on=true], .calm-btn[aria-pressed=true] { color: var(--accent); filter: none; }
.app-nav {
  position: fixed; z-index: 6; top: 15px; left: 50%; transform: translateX(-50%);
  border: 0; background: #ffffff05; border-radius: 12px; padding: 2px; gap: 0;
}
.app-nav button { border-radius: 9px; padding: 7px 18px; font-size: .9rem; }
.app-nav button[aria-selected=true] { color: var(--ink); background: #cad4b91c; }
.nbadge { color: var(--ink); background: #cad4b91c; box-shadow: none; font-weight: 500; }
.fab {
  position: static; transform: none; animation: none; padding: 9px 14px; font-size: .85rem;
  min-height: 40px; border: 1px solid var(--glass-edge); border-radius: 11px;
  background: #cad4b908; color: var(--ink); box-shadow: none; backdrop-filter: none;
}
.fab span { font-size: 1em; margin: 0; }
.fab:hover { background: #cad4b914; }
.pop { background: #1b2720; border-color: var(--glass-edge); backdrop-filter: none; box-shadow: 0 20px 60px #0006; max-height: calc(100dvh - 110px); overflow-y: auto; }
.pop .skypick select { background: #131e17; }
.pop .calm-btn { width: 100%; height: auto; border-radius: 9px; margin-top: 8px; }
.pop .switch .lbl small, .pop .skypick small { font-size: .78rem; }
.home-hero {
  max-width: 1040px; margin: 30px auto 40px; padding: 20px 32px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 42px; align-items: center;
}
.home-copy { padding: 20px 0; }
.home-copy h1 { font: 400 clamp(36px, 4.1vw, 56px)/1.08 var(--serif); white-space: pre-line; letter-spacing: -.04em; margin: 12px 0 20px; }
.home-line { color: var(--ink-2); max-width: 31em; font-size: 1rem; line-height: 1.65; margin: 0; }
.home-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.home-actions .link { padding-left: 0; }
#homeNote { margin-top: 16px; font-size: .8rem; max-width: 32em; }
.home-bottle {
  display: block; width: 100%; min-width: 0; padding: 0 0 10px; margin: 0;
  border: 0; border-radius: 16px; background: transparent; color: var(--ink);
  text-align: center; touch-action: pan-y;
}
.home-bottle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 5px; }
.home-bottle-status { display: block; margin: 8px 12px 0; font-size: .95rem; color: var(--ink); line-height: 1.5; }
.home-bottle-hint { display: block; margin: 3px 12px 0; font-size: .78rem; color: var(--ink-3); line-height: 1.5; }
.home-bottle:hover .home-bottle-hint, .home-bottle:focus-visible .home-bottle-hint { color: var(--accent-2); }
[data-moment=ready] .home-bottle-status { color: var(--accent-2); }
.home-room {
  position: relative; height: 340px; isolation: isolate; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 60%, #dab67914, transparent 70%);
  border-radius: 180px 180px 0 0; overflow: hidden;
}
.home-window { position: absolute; top: 10px; bottom: 0; width: 84%; border: 1px solid #a3b78d26; border-radius: 150px 150px 0 0; }
.home-window::before { content: ""; position: absolute; left: 50%; height: 100%; border-left: 1px solid #a3b78d16; }
.home-window::after { content: ""; position: absolute; top: 130px; width: 100%; border-top: 1px solid #a3b78d16; }
.home-shelf { position: absolute; bottom: 35px; left: 0; right: 0; height: 11px; background: linear-gradient(#8a77594d, #514b3966); border-radius: 2px; box-shadow: 0 16px 22px #0004; }
.home-art { z-index: 1; width: 244px; height: 244px; margin-top: 30px; filter: drop-shadow(10px 14px 12px #0005); }
.home-art svg { width: 100%; height: 100%; overflow: visible; }
.home-art .tp-plant { animation-duration: 12s; }
.home-art.opening .tp-lid, .orb.terra.cracking .tp-lid {
  animation: archive-uncork 3.2s cubic-bezier(.22,.65,.25,1) forwards;
  transform-box: fill-box; transform-origin: center;
}
.home-art.opening .tp-fog, .orb.terra.cracking .tp-fog { animation: archive-clear 3.2s ease-in-out forwards; }
.home-art.opening > svg, .orb.terra.cracking .tp-jar { animation: archive-dissolve 3.8s ease-in-out forwards; }
.orb.cracking .sphere { animation: archive-dissolve 3.8s ease-in-out forwards; filter: none; }
.orb.terra.cracking .sphere { animation: none; }
.orb.terra.ready:not(.cracking) .tp-lid { animation: none; }
.orb.born .sphere, .orb.terra.born .tp-jar { animation: archive-arrive 1.8s ease-out both; }
@keyframes archive-uncork {
  0%, 12% { transform: translateY(0) rotate(0); opacity: 1; }
  60% { transform: translateY(-12px) rotate(-6deg); opacity: .9; }
  100% { transform: translateY(-27px) rotate(-12deg); opacity: 0; }
}
@keyframes archive-dissolve {
  0%, 18% { opacity: 1; filter: brightness(1) blur(0); }
  55% { opacity: .9; filter: brightness(1.12) blur(.4px); }
  100% { opacity: .08; filter: brightness(1.05) blur(5px); }
}
@keyframes archive-clear {
  0%, 30% { opacity: calc(var(--frost, 0) * .85); }
  100% { opacity: 0; }
}
[data-moment=ready] .home-room { background: radial-gradient(ellipse at 50% 65%, #dab67926, transparent 70%); }
.collection-head { width: min(960px, calc(100% - 48px)); margin: 22px auto 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.collection-head h2 { font: 400 25px/1.2 var(--serif); margin: 0; }
.collection-head > span { color: var(--ink-3); font-size: .8rem; }
.worldbar { border: 0; background: transparent; backdrop-filter: none; margin: 8px auto; }
.worldbar .wb { color: var(--ink-3); border: 0; min-height: 42px; border-radius: 8px; }
.worldbar .wb[aria-pressed=true] { background: #cad4b914; color: var(--ink); box-shadow: none; }
.fstatus { color: var(--ink-3); text-shadow: none; letter-spacing: 0; font-size: .8rem; margin: 8px 24px; }
.tagbar { max-width: 960px; margin: 10px auto; }
.tag { border-color: var(--glass-edge); background: transparent; min-height: 36px; }
.tag::before { box-shadow: none; opacity: .65; }
.tag[aria-pressed=true] { background: #cad4b914; border-color: #869779; box-shadow: none; }
.tag .n { color: var(--ink-2); }
.fnote { background: #283526; border-color: var(--glass-edge); box-shadow: none; }
.shelf { max-width: 960px; margin: 24px auto; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--glass-edge); border-radius: 0; backdrop-filter: none; padding: 20px 0; }
.shelf h2 { color: var(--ink-2); text-transform: none; letter-spacing: 0; font-size: .9rem; }
.shelf-row { justify-content: flex-start; }
.shelf-item { border-color: var(--glass-edge); border-radius: 10px; }
.shelf-item .gem { display: none; }
.shelf-item .lbl { max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf-item:hover { box-shadow: none; }
html.terra-on #field {
  width: min(960px, calc(100% - 32px)); margin: 0 auto 30px; padding: 20px 10px 12px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 34px 18px; align-items: start;
}
html.terra-on .orb.terra { position: relative; inset: auto; transform: none !important; justify-self: center; will-change: auto; padding-bottom: 8px; width: 158px; }
.orb.terra .sphere { width: 150px; height: 150px; touch-action: pan-y; }
.orb.terra .sphere::after {
  display: block; content: ""; position: absolute; top: calc(100% - 5px); left: -5%; width: 110%; height: 6px; inset-inline-start: -5%;
  border: 0; border-radius: 2px; filter: none; background: #83715052; box-shadow: 0 7px 12px #0004;
}
.orb.terra .halo, .orb.terra::after, .orb.terra.ready::before { display: none; }
.orb.terra .tp-jar { filter: drop-shadow(5px 8px 7px #0005) !important; }
.orb.terra.ready .tp-jar { filter: drop-shadow(0 0 10px #e2bf7435) drop-shadow(5px 8px 7px #0005) !important; }
.orb.terra .timer { margin-top: 16px; max-width: 165px; color: var(--ink-2); font-size: .8rem; letter-spacing: 0; text-shadow: none; }
.orb.terra.ready .timer { color: var(--accent-2); }
.orb.terra .caption { font-size: .75rem; color: var(--ink-3); margin-top: 3px; }
.orb.terra .pills { flex-wrap: wrap; justify-content: center; }
.orb.terra .pill { font-size: .7rem; max-width: 120px; }
.garden-section { max-width: 1040px; margin: 30px auto 70px; padding: 24px; border-top: 1px solid #a5b49225; }
.garden-section .collection-head { width: 100%; margin-top: 0; }
.garden-intro { font-size: .9rem; color: var(--ink-3); margin: 12px 0 0; }
#gardenBed { position: relative; min-height: 200px; }
.tp-garden { position: relative; height: auto; min-height: 200px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; padding: 35px 0 26px; gap: 8px; }
.tp-ground { z-index: -1; height: 85px; opacity: .6; }
.tp-echo-btn { position: relative; left: auto !important; bottom: auto !important; width: 80px !important; min-width: 64px; opacity: 1; filter: none; }
.tp-echo-btn:hover { filter: drop-shadow(0 0 7px #d8b98544); }
#allEchoes { display: block; margin: 0 auto; }
.onboard { margin: 15px auto; padding-bottom: 20px; }
#obIntro, #noTag { background: transparent; border: 0; backdrop-filter: none; }
.ob-card { background: #cad4b905; border-color: var(--glass-edge); }
.ob-card:hover { background: #cad4b914; box-shadow: none; }
.panel { background: #1b2720; backdrop-filter: none; border-color: #3a493b; max-width: 960px; margin-top: 30px; padding: 30px; border-radius: 16px; }
.panel h2 { font: 400 34px/1.2 var(--serif); letter-spacing: -.02em; }
.panel .sub { margin-top: 10px; }
dialog, #revealDlg.letter {
  background: #1b2720; color: var(--ink); border: 1px solid #4a5844;
  border-radius: 20px; padding: 30px; box-shadow: 0 28px 100px #0009; backdrop-filter: none;
  max-height: calc(100dvh - 32px);
}
dialog::backdrop { background: #090f0bd9; backdrop-filter: blur(6px); }
dialog[open] { animation: archive-arrive 1s cubic-bezier(.22,.65,.25,1) both; }
dialog[open]::backdrop { animation: archive-veil 1s ease-out both; }
dialog.motion-leaving::backdrop { animation: archive-veil-out 460ms ease-in both; }
@keyframes archive-arrive {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes archive-veil { from { opacity: 0; } to { opacity: 1; } }
@keyframes archive-veil-out { from { opacity: var(--veil-start, 1); } to { opacity: 0; } }
dialog h2, #writeDlg h2 { font: 400 32px/1.15 var(--serif); letter-spacing: -.025em; }
#writeDlg { width: min(600px, calc(100vw - 24px)); }
#writeDlg .compose { display: block; }
#writeDlg .preview { display: none; }
#writeDlg .opinion textarea { font-size: 1.1rem; height: 120px; line-height: 1.6; }
.write-starters { margin: 8px 0 18px; }
.write-starters > p { font-size: .78rem; color: var(--ink-3); margin: 0 0 8px; }
.write-starter-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.write-starter {
  text-align: left; font-size: .8rem; min-height: 44px; padding: 9px 12px;
  color: var(--ink-2); border: 1px solid var(--glass-edge); background: #cad4b906; border-radius: 10px;
}
.write-starter:hover { color: var(--ink); border-color: #859677; background: #cad4b914; }
.write-starter:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
#writeDlg .twin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
#writeDlg.letter .twin { grid-template-columns: 1fr; }
#writeDlg.letter .sure { display: none; }
#writeDlg fieldset { margin-top: 18px; }
#writeDlg .sure { min-width: 0; padding-top: 20px; }
#writeDlg .lockset { min-width: 0; }
#writeDlg .dial { width: min(240px, 100%); margin: 12px auto 4px; }
#writeDlg .crystals { margin-top: 28px; }
.meter-readout, #convWord, #newConvOut, #guessConvOut { display: block; text-align: center; color: var(--ink-2); font-size: .85rem; font-weight: 400; margin: 12px 0 0; min-height: 2.8em; line-height: 1.5; }
.crystals.untouched .shard polygon { stroke: #bdb3d280; fill: #d9d0f016; }
.crystals.untouched .shard polyline { stroke: #d9d0f045; }
.lock-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.lock-choices button { border: 1px solid var(--glass-edge); background: transparent; color: var(--ink-2); border-radius: 10px; padding: 10px 4px; min-height: 46px; font-size: .85rem; }
.lock-choices button[aria-pressed=true] { border-color: var(--accent); background: #cad4b914; color: var(--ink); }
.duration-details { margin-top: 10px; }
.duration-details summary { color: var(--ink-3); cursor: pointer; font-size: .8rem; padding: 10px 0; min-height: 40px; }
.duration-details[open] { padding-bottom: 12px; }
#unlockSummary { font-size: .8rem; margin-top: 5px; }
.more { border-radius: 10px; margin-top: 22px; background: transparent; }
.more > summary { font-size: .85rem; }
.more > summary .opt { display: none; }
.more-body .topic-inline { display: block; margin-top: 15px; }
.more-body .topic-inline input { margin-top: 8px; width: 100%; }
.more-body .topic-why { display: block; margin-top: 4px; white-space: normal; font-size: .8rem; line-height: 1.4; color: var(--ink-3); }
.more-body .swatches { grid-template-columns: repeat(5, 40px) !important; }
.prob-input { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.prob-input input { max-width: 120px; margin: 0; }
.prob-input span { color: var(--ink-3); }
.prob-input.exact-prob { justify-content: center; font-size: .8rem; margin: 14px 0 0; }
.prob-input.exact-prob input { width: 78px; min-height: 40px; text-align: center; }
.crystals svg { max-height: none; }
#newCrystals, #guessCrystals { max-width: 460px; margin: 16px auto 0; }
#guessDlg .guess-prob { width: min(280px, 100%); margin-top: 16px; }
#revealDlg { width: min(650px, calc(100vw - 24px)); }
#revTopic { font-size: 34px; }
.rev-elapsed { color: var(--ink-3); text-shadow: none; font-size: .85rem; line-height: 1.6; }
.rev-sub { font-size: .82rem; color: var(--ink-3); }
.rev-pair, .rev-pair.has-guess { display: block; }
#revealDlg .reveal, #revealDlg.letter .reveal {
  font: 400 24px/1.55 var(--serif); color: var(--ink); background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 25px 0;
  filter: none; opacity: 1; transition: none;
}
#revealDlg.fresh-reading .reveal:not(.clear) { opacity: 0; }
#revealDlg.fresh-reading .reveal.clear { animation: archive-words 1.8s cubic-bezier(.22,.65,.25,1) both; }
@keyframes archive-words {
  from { opacity: 0; transform: translateY(8px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
#guessDlg h2 { text-shadow: none; font: 400 29px/1.25 var(--serif); }
#guessDlg fieldset { margin-top: 22px; }
#guessDlg .guess-lede { margin: 12px 0 22px; line-height: 1.65; }
#guessDlg.letter .primary { background: var(--accent); color: #1a281b; box-shadow: none; }
#guessDlg .guess-btns { gap: 8px; }
.rev-guess { border-top: 1px solid var(--glass-edge); padding-top: 20px; margin-top: 20px; }
.rev-guess-text { background: transparent; color: var(--ink-2); padding: 0; border: 0; font: 400 1.1rem/1.5 var(--serif); }
.ch-h { color: var(--ink-3); }
.rev-analysis { margin: 22px 0; border-top: 1px solid var(--glass-edge); padding-top: 8px; }
.rev-analysis > summary { cursor: pointer; font-size: .85rem; color: var(--ink-2); padding: 12px 0; min-height: 44px; }
.rev-analysis .ch-card { background: #142017; border-color: var(--glass-edge); box-shadow: none; }
#revReadActions { border-top: 1px solid var(--glass-edge); padding-top: 20px; margin-top: 22px; }
#revReflection > h2 { margin: 10px 0 24px; }
#revBack { padding-left: 0; margin-bottom: 16px; }
#changeScale { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
#changeScale .chip { border-radius: 10px; justify-content: flex-start; min-height: 46px; padding: 10px 14px; }
#changeScale .chip[aria-checked=true] { color: var(--ink); border-color: var(--accent); background: #cad4b914; box-shadow: none; }
#verdictBtns { padding-top: 20px; }
.rev-done { border: 0; box-shadow: none; background: none; margin: 0; padding: 0; text-align: center; }
.rev-done-title { font: 400 32px/1.15 var(--serif); color: var(--ink); }
.rev-done-sub { font-size: .95rem; color: var(--ink-2); line-height: 1.65; margin: 18px 0; }
.rev-echo { width: 100px; height: 110px; margin: 10px auto; }
.rev-echo svg { width: 100%; height: 100%; }
.rev-done .row { justify-content: center; }
/* .keepsake-card styles live in keepsake.js (shared with the downloaded copy) */
.keepsake-tools { margin: 18px 0 26px; }
.keepsake-tools .fine { font-size: .75rem; margin: 8px auto; max-width: 30em; }
.keepsake-tools .link { display: block; margin: 0 auto; font-size: .82rem; }
.keepsake-tools .msg:empty { display: none; }
.sample-quote { font: 400 24px/1.5 var(--serif); margin: 25px 0; }
.pat-panel .tile { background: transparent; border-color: var(--glass-edge); }
.pat-first { padding: 24px 0; }
.pat-first h3 { font: 400 26px/1.3 var(--serif); margin: 0 0 14px; }
.pat-first p { color: var(--ink-2); }
.pat-first blockquote { font: 400 21px/1.5 var(--serif); margin: 20px 0; }
.entry .quote { color: var(--ink-2); line-height: 1.7; }
.lg-mh { background: transparent; color: var(--accent-2); }
#toast { background: #263322; border-color: #6c7c59; color: var(--ink); border-radius: 12px; bottom: 25px; backdrop-filter: none; }
.auth-card { background: #1b2720; backdrop-filter: none; border-color: var(--glass-edge); }
.auth-orb { display: none; }
.auth-card h1 { font-family: var(--serif); text-transform: none; letter-spacing: -.025em; font-size: 2rem; }
.auth-card .lede { margin-top: 14px; }
html.calm .home-art *, html.calm .rev-echo * { animation: none !important; }
html.calm .orb.cracking *, html.calm .orb.born *, html.calm #revealDlg.fresh-reading .reveal.clear { animation: none !important; }
html.calm dialog[open], html.calm dialog[open]::backdrop { animation: none; }
html.calm .crystals .shard.top { animation: none; }
@media (max-width: 1050px) and (min-width: 701px) {
  .new-label { display: none; }
  .app-nav button { padding-inline: 14px; }
}
@media (max-width: 700px) {
  .bar { height: auto; min-height: 64px; padding: max(10px, env(safe-area-inset-top)) 16px 10px; gap: 10px; }
  .brand { font-size: .68rem; letter-spacing: .12em; gap: 7px; }
  .who { gap: 4px; }
  .new-label { display: none; }
  .fab { width: 40px; padding: 0; font-size: 1.3rem; }
  #accountBtn { width: 36px; min-width: 36px; height: 36px; }
  .sndwrap { position: static; }
  .pop { position: absolute; top: 100%; left: 12px; right: 12px; width: auto; }
  .app-nav { top: auto; bottom: 0; left: 0; right: 0; width: 100%; transform: none; background: #152019fa; border: 0; border-top: 1px solid #3a493b; border-radius: 0; padding: 7px 12px max(7px, env(safe-area-inset-bottom)); gap: 5px; }
  .app-nav button { flex: 1; min-height: 46px; padding: 8px 5px; font-size: .85rem; }
  main { padding-bottom: 85px; }
  .home-hero { margin: 15px auto 28px; padding: 6px 24px; grid-template-columns: 1fr; gap: 0; }
  .home-copy { display: contents; }
  .home-copy .kicker { grid-row: 1; margin: 12px 0 8px; }
  .home-copy h1 { grid-row: 2; font-size: 38px; margin: 0 0 12px; line-height: 1.08; }
  .home-line { grid-row: 3; font-size: .9rem; line-height: 1.6; }
  .home-bottle { grid-row: 4; width: calc(100% + 16px); margin: 10px -8px 0; }
  .home-room { height: 230px; }
  .home-window { top: 15px; width: 80%; }
  .home-shelf { bottom: 18px; }
  .home-art { width: 200px; height: 200px; margin-top: 20px; }
  .home-actions { grid-row: 5; display: grid; gap: 0; margin-top: 10px; }
  .home-actions .primary { width: 100%; }
  .home-actions .link { text-align: center; padding: 10px; font-size: .82rem; }
  #homeNote { grid-row: 6; margin: 0; text-align: center; font-size: .75rem; }
  .collection-head { margin-top: 24px; }
  .collection-head h2 { font-size: 23px; }
  html.terra-on #field { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 8px; padding: 18px 0; }
  html.terra-on .orb.terra { width: 138px; }
  .orb.terra .sphere { width: 130px; height: 130px; }
  .orb.terra .timer { font-size: .78rem; max-width: 140px; }
  .orb.terra .caption { font-size: .72rem; }
  .shelf { width: calc(100% - 48px); }
  .shelf-item { max-width: 100%; padding-inline: 12px; }
  .garden-section { margin-bottom: 10px; padding: 24px; }
  .tp-echo-btn { width: 65px !important; }
  .panel { width: calc(100% - 24px); margin: 16px auto 25px; padding: 22px 18px; }
  dialog, #writeDlg, #revealDlg.letter { padding: 24px 20px; max-height: calc(100dvh - 20px); border-radius: 17px; }
  dialog h2, #writeDlg h2, #revTopic { font-size: 29px; }
  #revealDlg .reveal, #revealDlg.letter .reveal { font-size: 22px; }
  #revReadActions, #verdictBtns { flex-direction: column-reverse; align-items: stretch; }
  #revReadActions button, #verdictBtns button { flex: none; width: 100%; }
  #writeDlg .row.end { gap: 8px; }
  #writeDlg .row.end .primary { flex: 1; }
  .rev-done .row { flex-direction: column-reverse; align-items: stretch; }
  .rev-echo { height: 95px; }
  .write-starter { width: 100%; }
  #writeDlg .twin { grid-template-columns: 1fr; gap: 14px; }
  #writeDlg .sure { padding-top: 0; }
  #writeDlg .crystals { max-width: 340px; margin: 14px auto 0; }
  #writeDlg .dial { width: min(250px, 100%); }
  #writeDlg .lockset { border-top: 1px solid var(--glass-edge); padding-top: 18px; }
  #guessDlg .guess-btns { display: grid; grid-template-columns: 1fr 1fr; }
  #guessDlg .guess-btns .primary { grid-column: 1 / -1; grid-row: 1; }
  #guessDlg .guess-btns button[value=skip] { grid-column: 1 / -1; grid-row: 2; }
  #guessDlg .guess-btns .guess-later { order: 0; }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); font-size: .9rem; width: max-content; max-width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* account tabs: the selected tab belongs to this palette, not the default violet */
.acct-tabs { background: #0f1612; border-color: var(--glass-edge); }
.acct-tabs [role=tab][aria-selected=true] { background: #2c3a2f; color: var(--ink); box-shadow: inset 0 0 0 1px #4d5f4b; }
