/* CipherAtlas — the observatory instrument.
   Ink & parchment, luminous gold numerals, hairline engineering.
   Fraunces carries the numbers; Inter carries the interface. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Italic.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0a0d13;
  --ink-2: #0e1219;
  --panel: #121722;
  --panel-2: #171d2a;
  --hair: #202737;
  --hair-2: #2b3448;
  --text: #eae3d2;
  --dim: #8e8a7c;
  --faint: #5b5a50;
  --gold: #d8b36a;
  --gold-hi: #f2d592;
  --gold-deep: #a07f3d;
  --danger: #c96f6f;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --sheet-r: 22px;
  --spring: cubic-bezier(.32, 1.35, .5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
button { font-family: var(--sans); color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font-family: var(--sans); color: var(--text); outline: none; }
.hidden { display: none !important; }
html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; }

/* ================= app frame ================= */
#app {
  position: relative;
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 500px at 50% -8%, rgba(216, 179, 106, .055), transparent 62%),
    radial-gradient(2px 2px at 18% 22%, rgba(234, 227, 210, .07), transparent 55%),
    radial-gradient(1.6px 1.6px at 82% 12%, rgba(234, 227, 210, .06), transparent 55%),
    radial-gradient(1.6px 1.6px at 68% 38%, rgba(234, 227, 210, .045), transparent 55%),
    radial-gradient(1.4px 1.4px at 30% 58%, rgba(234, 227, 210, .05), transparent 55%),
    radial-gradient(1.8px 1.8px at 88% 72%, rgba(234, 227, 210, .045), transparent 55%),
    linear-gradient(180deg, #0c101a 0%, var(--ink) 46%, #080b10 100%);
}
@media (min-width: 560px) {
  body { background: #050708; }
  #app {
    border-left: 1px solid var(--hair);
    border-right: 1px solid var(--hair);
    box-shadow: 0 0 90px rgba(0, 0, 0, .8);
  }
}

/* ================= header ================= */
#top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 12px;
  border-bottom: 1px solid var(--hair);
}
#brand {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 4.5px;
  color: var(--dim);
}
#brand b { color: var(--text); font-weight: 650; }
.brand-glyph { color: var(--gold); margin-right: 2px; }
#top-right { display: flex; align-items: center; gap: 6px; }
#streak-pill {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 650; letter-spacing: .5px;
  color: var(--gold);
  background: rgba(216, 179, 106, .09);
  border: 1px solid rgba(216, 179, 106, .28);
  border-radius: 99px;
  padding: 5px 11px;
}
#btn-settings {
  color: var(--dim); padding: 7px;
  border-radius: 10px;
}
#btn-settings:active { color: var(--text); }

/* ================= screens ================= */
.screen { display: none; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.screen.active { display: block; }
.content { padding: 18px 18px calc(env(safe-area-inset-bottom, 0px) + 96px); }
.screen::-webkit-scrollbar { width: 0; }

h4.sec {
  font-size: 11px; font-weight: 650;
  letter-spacing: 2.8px; text-transform: uppercase;
  color: var(--faint);
  margin: 26px 2px 10px;
}
.dim-note { color: var(--faint); font-size: 13.5px; font-style: italic; }
.dim-note.pad { padding: 14px 2px; }

/* ================= decode ================= */
#decode-inputwrap { position: relative; margin-top: 10px; }
#decode-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hair-2);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 420;
  padding: 6px 40px 12px 2px;
  caret-color: var(--gold);
  transition: border-color .25s;
}
#decode-input::placeholder { color: var(--faint); font-style: italic; font-weight: 350; }
#decode-input:focus { border-bottom-color: var(--gold-deep); }
#btn-clear {
  position: absolute; right: 0; bottom: 12px;
  color: var(--faint); font-size: 24px; line-height: 1;
  padding: 4px 8px;
}

#cipher-chips {
  display: flex; gap: 7px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  padding: 16px 0 4px;
  margin: 0 -18px; padding-left: 18px; padding-right: 18px;
}
#cipher-chips::-webkit-scrollbar { display: none; }
.cchip {
  flex: none;
  font-size: 12.5px; font-weight: 550; letter-spacing: .6px;
  color: var(--dim);
  border: 1px solid var(--hair-2);
  border-radius: 99px;
  padding: 6px 13px;
  transition: all .18s;
}
.cchip.on {
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-color: transparent;
  font-weight: 650;
  box-shadow: 0 2px 10px rgba(216, 179, 106, .22);
}
.cchip.info { color: var(--faint); border-style: dashed; }

#decode-actions {
  display: flex; gap: 6px; justify-content: flex-end;
  padding: 6px 0 0;
}
#decode-actions button {
  color: var(--faint);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 7px 11px;
  transition: all .18s;
}
#decode-actions button:active { transform: scale(.94); }
#decode-actions button.on { color: var(--gold); border-color: rgba(216, 179, 106, .4); }

#decode-results { margin-top: 10px; }
.empty-hint {
  padding: 44px 8px;
  text-align: center;
  color: var(--faint);
  font-size: 14.5px;
  line-height: 1.8;
  font-style: italic;
}
.cipher-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 13px 2px 11px;
  border-bottom: 1px solid var(--hair);
  transition: background .2s;
}
.cipher-row.open { background: linear-gradient(90deg, transparent, rgba(216, 179, 106, .04), transparent); }
.cr-left { display: flex; align-items: baseline; gap: 9px; cursor: pointer; min-width: 0; }
.cr-name {
  font-size: 13px; font-weight: 550;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cr-life {
  font-size: 10.5px; color: var(--faint);
  border: 1px solid var(--hair);
  border-radius: 6px;
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}
.cr-value {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 40px;
  line-height: 1;
  color: var(--gold-hi);
  text-shadow: 0 0 26px rgba(216, 179, 106, .22);
  padding: 0 2px;
  display: inline-flex;
}
.cr-value:active { filter: brightness(1.25); }

/* odometer */
.od-digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
}
.od-strip {
  display: inline-block;
  line-height: 1;
  transition: transform .55s var(--spring);
  will-change: transform;
}
.od-sep { display: inline-block; }

/* letter ribbon */
.ribbon-holder { overflow: hidden; }
.ribbon {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 12px 2px 14px;
  border-bottom: 1px solid var(--hair);
  animation: rib-in .35s var(--spring);
}
@keyframes rib-in { from { opacity: 0; transform: translateY(-6px); } }
.rib-cell {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 26px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 7px;
  padding: 4px 5px 3px;
}
.rib-cell b { font-family: var(--serif); font-size: 15px; font-weight: 560; }
.rib-cell i { font-style: normal; font-size: 10.5px; color: var(--gold); font-variant-numeric: tabular-nums; }
.rib-eq {
  align-self: center;
  font-family: var(--serif); font-size: 17px; color: var(--gold-hi);
  padding: 0 6px;
}

/* matches */
#decode-matches { margin-top: 22px; }
.matches-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.matches-head h4 {
  font-size: 11px; font-weight: 650; letter-spacing: 2.8px;
  text-transform: uppercase; color: var(--faint);
}
.chip {
  font-size: 10.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--hair-2);
  border-radius: 99px;
  padding: 3px 9px;
}
.chip.gold { color: var(--gold); border-color: rgba(216, 179, 106, .35); background: rgba(216, 179, 106, .07); }
.reveal-btn {
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--hair-2);
  border-radius: 14px;
  padding: 15px 17px;
  font-size: 15.5px; font-weight: 600;
  color: var(--gold-hi);
  transition: all .2s;
}
.reveal-btn span { display: block; font-weight: 400; font-size: 13px; color: var(--dim); margin-top: 2px; }
.reveal-btn:active { transform: scale(.985); }
.match-line {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--hair);
}
.match-cipher {
  flex: none;
  font-size: 11px; font-weight: 650; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--gold);
  min-width: 86px;
  font-variant-numeric: tabular-nums;
}
.match-word {
  font-size: 13.5px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 4px 10px;
  transition: all .15s;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match-line { min-width: 0; }
.match-word:active { transform: scale(.95); }
.match-word.phrase { border-color: rgba(216, 179, 106, .32); }
.match-word.person { border-color: rgba(160, 180, 235, .32); }
.match-word.team { border-color: rgba(140, 200, 160, .3); }
.match-word.org { border-color: rgba(200, 150, 200, .3); }
.match-word.bible { border-color: rgba(220, 190, 130, .35); }
.match-word.place { border-color: rgba(130, 190, 210, .26); }
.match-cipher em { font-style: normal; color: var(--faint); font-weight: 500; margin-left: 4px; }
.match-more {
  font-size: 12px; font-weight: 650; letter-spacing: .6px;
  color: var(--gold);
  border: 1px dashed rgba(216, 179, 106, .4);
  border-radius: 8px;
  padding: 4px 10px;
}

/* ================= today / tools shared ================= */
.today-hero { padding: 16px 2px 2px; }
.th-date { font-family: var(--serif); font-size: 33px; font-weight: 480; }
.th-sub { color: var(--dim); font-size: 13.5px; margin-top: 2px; }

.formula-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
}
.formula-card {
  text-align: left;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 13px 15px 12px;
  transition: transform .15s, border-color .2s;
}
.formula-card:active { transform: scale(.97); }
.formula-card b {
  display: block;
  font-family: var(--serif); font-size: 30px; font-weight: 550; line-height: 1.05;
  background: linear-gradient(180deg, var(--gold-hi) 20%, var(--gold) 78%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.formula-card span { display: block; font-size: 12.5px; color: var(--text); margin-top: 4px; }
.formula-card i { display: block; font-style: normal; font-size: 11px; color: var(--faint); margin-top: 1px; }
.dot-gold {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
  vertical-align: 6px; margin-left: 3px;
}
.gold-num { font-style: normal; color: var(--gold-hi); font-weight: 650; }

.fig-list { display: flex; flex-direction: column; }
.fig-row {
  text-align: left;
  padding: 11px 2px;
  border-bottom: 1px solid var(--hair);
  transition: background .15s;
}
.fig-row b { font-size: 15.5px; font-weight: 560; display: block; }
.fig-row span { font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.fig-row:active { background: rgba(216, 179, 106, .04); }

.scanner textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--hair-2);
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 14.5px;
  resize: vertical;
}
.scanner textarea:focus { border-color: var(--gold-deep); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: var(--ink);
  font-weight: 700; font-size: 14.5px; letter-spacing: .4px;
  border-radius: 12px;
  padding: 11px 22px;
  margin-top: 10px;
  box-shadow: 0 3px 16px rgba(216, 179, 106, .2);
  transition: transform .15s;
}
.btn-gold:active { transform: scale(.97); }
.btn-gold.wide { width: 100%; display: block; }
.btn-ghost {
  color: var(--dim);
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13.5px;
  margin-top: 10px;
  transition: color .2s;
}
.btn-ghost:active { color: var(--text); }
.btn-ghost.wide { width: 100%; }
.btn-ghost.danger { color: var(--danger); border-color: rgba(201, 111, 111, .3); }

.scan-row { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.scan-row.hit { background: linear-gradient(90deg, rgba(216, 179, 106, .05), transparent); }
.scan-line { text-align: left; font-size: 14.5px; font-weight: 550; width: 100%; }
.scan-vals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.scan-vals.pad { padding: 4px 0 10px; }
.scan-val {
  font-size: 12px; color: var(--dim);
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 3px 9px;
  font-variant-numeric: tabular-nums;
}
.scan-val b { color: var(--gold-hi); font-weight: 650; }

/* subtabs */
.subtabs {
  display: flex; gap: 6px;
  padding: 6px 0 16px;
}
.subtab {
  font-size: 13px; font-weight: 550; letter-spacing: .4px;
  color: var(--dim);
  border: 1px solid var(--hair-2);
  border-radius: 99px;
  padding: 7px 15px;
  transition: all .18s;
}
.subtab.sel {
  color: var(--text);
  border-color: var(--gold-deep);
  background: rgba(216, 179, 106, .07);
}

.tool-intro { color: var(--dim); font-size: 13.5px; font-style: italic; padding: 2px 2px 14px; }
.date-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.date-row.compact { margin: 10px 0; }
.date-row label { color: var(--faint); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.date-to { color: var(--gold); font-size: 18px; }
input[type="date"] {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 15px;
  color-scheme: dark;
}
input[type="date"]:focus { border-color: var(--gold-deep); }
input[type="search"], .num-search input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 15.5px;
  margin-bottom: 4px;
}
input[type="search"]:focus, .num-search input:focus { border-color: var(--gold-deep); }

.num-search { display: flex; gap: 9px; align-items: stretch; }
.num-search input { margin: 0; flex: 1; }
.num-search .btn-gold { margin: 0; flex: none; }
.lore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.lore-card {
  text-align: left;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 12px 14px;
  transition: transform .15s;
}
.lore-card:active { transform: scale(.97); }
.lore-card b {
  font-family: var(--serif); font-size: 26px; font-weight: 560;
  background: linear-gradient(180deg, var(--gold-hi) 20%, var(--gold) 78%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lore-card span {
  display: block; font-size: 11.5px; color: var(--dim);
  margin-top: 3px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ================= library ================= */
.entry-list { display: flex; flex-direction: column; }
.entry-row { display: flex; align-items: center; border-bottom: 1px solid var(--hair); }
.entry-main { flex: 1; text-align: left; padding: 11px 2px; min-width: 0; }
.entry-main b { font-size: 15px; font-weight: 560; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-vals { display: flex; gap: 8px; margin-top: 2px; }
.entry-vals i { font-style: normal; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.entry-x { color: var(--faint); font-size: 19px; padding: 8px 10px; }
.case-row {
  text-align: left;
  padding: 13px 2px;
  border-bottom: 1px solid var(--hair);
  width: 100%;
}
.case-row b { font-family: var(--serif); font-size: 18px; font-weight: 520; display: block; }
.case-row span { font-size: 12.5px; color: var(--dim); }
.case-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.case-head h3 { font-family: var(--serif); font-weight: 520; font-size: 21px; flex: 1; text-align: center; }
.case-head .btn-ghost { margin: 0; padding: 7px 12px; font-size: 12.5px; }
.case-note {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  min-height: 64px;
  resize: vertical;
  margin: 8px 0 14px;
}
.case-pick {
  display: flex; justify-content: space-between; align-items: baseline;
  width: 100%;
  text-align: left;
  padding: 13px 4px;
  border-bottom: 1px solid var(--hair);
  font-size: 15.5px; font-weight: 550;
}
.case-pick span { font-size: 12px; color: var(--dim); }
.case-pick.new { color: var(--gold); border-bottom: none; }

/* ================= tabbar ================= */
#tabbar {
  position: relative;
  display: flex;
  border-top: 1px solid var(--hair);
  background: linear-gradient(180deg, #0d1119, #0a0d13);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 0 9px;
  color: var(--faint);
  transition: color .2s;
  position: relative;
}
.tab svg { width: 21px; height: 21px; }
.tab span { font-size: 10px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; }
.tab.active { color: var(--gold-hi); }
.tab.active::before {
  content: "";
  position: absolute; top: -1px; left: 25%; right: 25%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ================= sheets ================= */
#veil {
  position: fixed; inset: 0;
  background: rgba(4, 5, 9, .6);
  opacity: 0; pointer-events: none;
  transition: opacity .28s;
  z-index: 40;
}
#veil.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 50%; bottom: 0;
  transform: translate(-50%, 105%);
  width: 100%; max-width: 520px;
  max-height: 86dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--ink-2) 70%);
  border: 1px solid var(--hair-2);
  border-bottom: none;
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  padding: 10px 22px calc(env(safe-area-inset-bottom, 0px) + 22px);
  z-index: 41;
  transition: transform .42s var(--spring);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .55);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-grip {
  width: 40px; height: 4px;
  background: var(--hair-2);
  border-radius: 2px;
  margin: 4px auto 14px;
}
.sheet h3 {
  font-family: var(--serif);
  font-size: 22px; font-weight: 520;
  text-align: center;
  margin-bottom: 14px;
}
.sheet-close {
  display: block;
  margin: 16px auto 0;
  color: var(--faint);
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  padding: 8px 18px;
}

/* number sheet */
#num-big {
  font-family: var(--serif);
  font-size: 76px; font-weight: 560;
  text-align: center;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold-hi) 15%, var(--gold) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 44px rgba(216, 179, 106, .18);
}
#num-tags { display: flex; gap: 6px; justify-content: center; margin: 10px 0 6px; flex-wrap: wrap; }
#num-body h5, .set-block h5, .pay-features h5 {
  font-size: 10.5px; font-weight: 650; letter-spacing: 2.6px; text-transform: uppercase;
  color: var(--faint);
  margin: 16px 0 7px;
}
.num-lore p { font-size: 14.5px; line-height: 1.6; color: var(--text); }
.num-facts p { font-size: 13.5px; color: var(--dim); padding: 2px 0; }

/* cipher sheet */
.cs-row { padding: 12px 2px; border-bottom: 1px solid var(--hair); }
.cs-top { display: flex; justify-content: space-between; align-items: baseline; }
.cs-top b { font-size: 15.5px; font-weight: 600; }
.cs-toggle {
  font-size: 11px; font-weight: 650; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--hair-2);
  border-radius: 99px;
  padding: 3px 11px;
  cursor: pointer;
}
.cs-row.on .cs-toggle { color: var(--gold); border-color: rgba(216, 179, 106, .4); }
.cs-row p { font-size: 13px; color: var(--dim); margin-top: 4px; line-height: 1.5; }

/* settings */
.set-block { margin-bottom: 8px; }
.prof-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 15px;
  margin-bottom: 4px;
}
.prof-input:focus { border-color: var(--gold-deep); }
.fine { font-size: 12.5px; color: var(--faint); line-height: 1.6; }

/* paywall */
.pay-mark {
  text-align: center;
  font-size: 34px;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(216, 179, 106, .35);
  margin-top: 4px;
}
.pay-features { margin: 6px 0 16px; }
.pay-features p { font-size: 14.5px; padding: 4px 0; }
.pay-features span { color: var(--faint); font-size: 12px; margin-left: 6px; }
.pay-plans { display: flex; gap: 8px; margin-bottom: 14px; }
.pay-plans button {
  flex: 1;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--hair-2);
  border-radius: 14px;
  padding: 14px 6px 11px;
  text-align: center;
  transition: all .18s;
}
.pay-plans button.sel {
  border-color: var(--gold);
  background: rgba(216, 179, 106, .08);
  box-shadow: 0 0 0 1px var(--gold);
}
.pay-plans b { display: block; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.pay-plans span { display: block; font-size: 11px; color: var(--dim); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
.pay-plans i {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-style: normal;
  font-size: 9.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
}

.notif-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14.5px; cursor: pointer;
  padding: 4px 2px;
}
.notif-row input { width: 17px; height: 17px; accent-color: var(--gold-deep); margin-top: 2px; }
.notif-row small { display: block; color: var(--faint); font-size: 12px; }

/* ask dialog */
.ask-text { font-size: 14.5px; color: var(--dim); line-height: 1.6; margin-bottom: 12px; text-align: center; }
.ask-field { margin-bottom: 10px; }
.ask-field label {
  display: block;
  font-size: 10.5px; font-weight: 650; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--faint);
  margin: 0 2px 6px;
}
.ask-btns { display: flex; gap: 10px; margin-top: 14px; }
.ask-btns .btn-ghost, .ask-btns .btn-gold { flex: 1; margin-top: 0; }
.btn-gold.danger-solid { background: linear-gradient(180deg, #d98a8a, var(--danger)); box-shadow: 0 3px 16px rgba(201, 111, 111, .25); }

/* streak sheet */
#streak-big {
  font-family: var(--serif);
  font-size: 84px; font-weight: 560; line-height: 1;
  text-align: center;
  background: linear-gradient(180deg, var(--gold-hi) 15%, var(--gold) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#streak-sub { text-align: center; color: var(--dim); font-size: 13.5px; letter-spacing: 2px; text-transform: uppercase; margin: 4px 0 14px; }
#streak-facts p { font-size: 14px; color: var(--dim); padding: 3px 0; }
#streak-facts b { color: var(--text); }

/* intro */
.intro-steps p { font-size: 14.5px; color: var(--dim); padding: 7px 0; line-height: 1.6; }
.intro-steps b { color: var(--gold-hi); font-weight: 650; }

/* toasts */
#toasts {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 86px);
  z-index: 60;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 8px;
  width: min(92vw, 480px);
  pointer-events: none;
}
.toast {
  background: #171d2a;
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13.5px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .55);
  animation: toast-in .3s var(--spring), toast-out .5s ease 2.9s forwards;
}
.toast.good { border-color: rgba(216, 179, 106, .45); }
.toast.warn { border-color: rgba(201, 111, 111, .5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
