/* Inner Weather — one look: clean white panels beside a sky that shows the weather inside the body.
   The sky is the only loud thing on screen; everything else stays quiet. */
:root {
  --ink: #15201c; --muted: #5f6e68; --line: #e3e8e6; --soft: #f2f5f4; --paper: #ffffff;
  --jade: #1d7a64; --jade-soft: #e2f2ec; --storm: #c8472b; --storm-soft: #fbebe6; --sun: #c58a12; --sun-soft: #fbf1d9; --sky: #5aa6d6;
  --display: "Be Vietnam Pro", "Inter", system-ui, sans-serif; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --top: 56px; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, .handle:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0 0 .8em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .85rem; }

/* ---------- top bar ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
.top { height: var(--top); flex: none; display: flex; align-items: center; gap: 20px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--paper); z-index: 5; }
.brand { font: 800 1.05rem/1 var(--display); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px; letter-spacing: -.01em; white-space: nowrap; }
.mark { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, #8ccbef 0 50%, #4f5f6c 50% 100%); box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--line); }
.modes { display: flex; gap: 4px; background: var(--soft); border-radius: 999px; padding: 3px; }
.modes a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.modes a[aria-current="page"] { background: var(--ink); color: #fff; }
.twinchip { margin-left: auto; display: flex; align-items: center; gap: 8px; border: 0; background: var(--soft); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.twinchip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #fff; }

/* ---------- play area ---------- */
.play { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); }
.stagebox { position: relative; overflow: hidden; min-height: 0; }
#sky, #stage { position: absolute; inset: 0; width: 100%; height: 100%; }
#stage canvas { display: block; }
.panel { border-left: 1px solid var(--line); overflow-y: auto; min-height: 0; background: var(--paper); }
.pad { padding: 20px 22px 32px; }
.loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,.92); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem; display: flex; gap: 10px; align-items: center; }
.loading span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--jade); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stagebox.pang::after, .stagebox.shield::after { content: ""; position: absolute; inset: 0; pointer-events: none; animation: flash .7s ease-out forwards; }
.stagebox.pang::after { box-shadow: inset 0 0 90px 20px rgba(200, 50, 30, .55); }
.stagebox.shield::after { box-shadow: inset 0 0 90px 20px rgba(90, 170, 230, .55); }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.stagebox.jump #stage { animation: jump .6s ease-out; }
@keyframes jump { from { opacity: 0; } to { opacity: 1; } }

/* ---------- HUD over the stage ---------- */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.forecast { position: absolute; left: 16px; top: 16px; background: rgba(255,255,255,.9); backdrop-filter: blur(6px); border-radius: 14px; padding: 10px 14px; display: grid; grid-template-columns: auto auto; column-gap: 14px; align-items: end; }
.forecast .k { grid-column: 1 / -1; font-size: .72rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.forecast b { font: 800 1.25rem/1.15 var(--display); }
.forecast .sc { font: 700 1.05rem/1.2 var(--display); color: var(--muted); font-variant-numeric: tabular-nums; }
.forecast small { font-size: .7rem; }
.goal { position: absolute; right: 16px; top: 16px; max-width: 300px; background: rgba(255,255,255,.94); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; font-size: .86rem; }
.goal b { font-family: var(--display); font-size: .98rem; } .goal em { font-style: normal; font-weight: 700; color: var(--jade); }
.link { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; justify-self: start; font-size: .82rem; }
.caption { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); background: rgba(21, 32, 28, .86); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; }
.insidebtn { position: absolute; right: 16px; bottom: 24px; }
.btn.wide { width: 100%; margin-bottom: 4px; }
.parts { display: flex; flex-wrap: wrap; gap: 6px; }
.part { display: flex; align-items: center; gap: 6px; border: 0; background: var(--soft); border-radius: 999px; padding: 6px 11px; font-size: .84rem; font-weight: 600; cursor: pointer; }
.part i { width: 8px; height: 8px; border-radius: 50%; }
.part[aria-pressed="true"] { background: var(--ink); color: #fff; }
.partcard { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: .9rem; }
.partcard h4 { font-size: 1.1rem; margin-bottom: 4px; } .partcard p:last-child { margin-bottom: 0; }
.playbar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; background: rgba(255,255,255,.9); padding: 6px; border-radius: 999px; }

/* buttons: solid black pill, flat grey secondary */
.btn { border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; padding: 11px 20px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #2c3934; }
.btn.ghost { background: var(--soft); color: var(--ink); } .btn.ghost:hover { background: var(--line); }
.btn.small { padding: 7px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .35; cursor: default; }
.actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- panel: tabs ---------- */
.tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 999px; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--soft); color: var(--ink); }
.tabbody { padding: 16px 20px 32px; }
.pzline { display: none; margin: 12px 20px 0; padding: 10px 12px; border-radius: 12px; background: var(--sun-soft); font-size: .86rem; }
.h { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--body); font-weight: 700; margin: 22px 0 10px; }
.h:first-child { margin-top: 4px; }
.h2 { font-size: 1.35rem; margin: 18px 0 12px; }
.lede { font-size: 1rem; }

/* day ring + controls */
.ringwrap { display: flex; justify-content: center; }
#ring { width: 100%; max-width: 300px; height: auto; touch-action: none; user-select: none; }
.handle { cursor: grab; }
.ctls { display: grid; gap: 4px; margin-top: 8px; }
.ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ctl-l { display: grid; min-width: 0; flex: 1 1 160px; } .ctl-l span { font-size: .8rem; color: var(--muted); }
.step { display: flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 999px; padding: 3px; }
.step button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; font-size: 1.15rem; cursor: pointer; }
.step output { min-width: 72px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9rem; }
.glasses { display: flex; gap: 4px; flex-wrap: wrap; }
.glass { width: 20px; height: 28px; border: 2px solid #9cc7e2; border-top-width: 1px; border-radius: 3px 3px 6px 6px; background: #fff; cursor: pointer; padding: 0; }
.glass[aria-pressed="true"] { background: linear-gradient(180deg, #fff 0 22%, #8fcdf0 22% 100%); }

/* plate */
.platehead { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 8px; }
.toggle { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--jade); }
.food { border-top: 1px solid var(--line); padding: 12px 0; }
.food-h { display: flex; align-items: baseline; gap: 8px; }
.food-h b { font-family: var(--display); color: var(--fc); } .food-h span { font-size: .8rem; color: var(--muted); }
.food-h .cnt { margin-left: auto; font-weight: 700; color: var(--ink); font-size: .95rem; }
.mini { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--soft); cursor: pointer; }
.tiles { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.tile { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font-size: .85rem; cursor: pointer; }
.tile:hover { border-color: var(--fc); }
.dots { display: flex; gap: 4px; flex-wrap: wrap; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--fc); }
.dots i.on { background: var(--fc); } .dots i.over { border-style: dashed; }

/* inside */
.meters { display: grid; gap: 9px; }
.meter { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 2.2em; gap: 10px; align-items: center; font-size: .88rem; }
.meter b { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; display: block; }
.bar i { display: block; height: 100%; border-radius: 999px; transition: width .4s; }
.whys { display: grid; gap: 14px; }
.why p { font-size: .9rem; margin: 6px 0 0; }
.chain { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chain li { font-size: .78rem; font-weight: 600; background: var(--soft); padding: 4px 9px; border-radius: 999px; }
.chain li + li::before { content: "→"; color: var(--muted); margin-right: 6px; font-weight: 400; }
.chain li:last-child { background: var(--storm-soft); color: var(--storm); }
.storm { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 18px 0 4px; font-size: .88rem; }
.storm .bar i { background: var(--storm); }
.gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.gear div { background: var(--soft); border-radius: 12px; padding: 10px; display: grid; gap: 2px; font-size: .8rem; }
.gear b { font: 800 1.15rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--jade); }
.gear .low b { color: var(--storm); } .gear small { color: var(--muted); font-size: .72rem; }
.chart { margin: 0; } .chart svg { width: 100%; height: auto; }
.chart figcaption { font-size: .78rem; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.chart figcaption i { display: inline-block; width: 10px; height: 3px; margin-right: -6px; }

/* cards */
.cards { display: grid; gap: 10px; margin-top: 12px; }
.card { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; cursor: pointer; font-size: .88rem; color: var(--muted); }
.card b { color: var(--ink); font-family: var(--display); font-size: 1rem; }
.card:hover { border-color: #c5cfcb; }
.card em { font-style: normal; font-weight: 700; font-size: .8rem; color: var(--ink); }
.card em.ok { color: var(--jade); }
.card.big { background: var(--ink); color: #c9d3cf; border-color: var(--ink); }
.card.big b, .card.big em { color: #fff; }
.card.soon { cursor: default; opacity: .55; }
.tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }

/* Healer Hai */
.hai { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--soft); border-radius: 16px; padding: 12px; margin-bottom: 14px; }
.hai img { width: 52px; height: 52px; border-radius: 50%; background: #fff; object-fit: cover; }
.hai p { margin: 0; font-size: .92rem; } .hai b { display: block; font-family: var(--display); font-size: .85rem; }
.flags { margin: 0 0 12px; padding-left: 18px; font-size: .9rem; } .flags li { margin: 3px 0; }
.note { background: var(--jade-soft); color: #145a49; border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.atlas { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.atlas div { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; display: grid; font-size: .78rem; color: var(--muted); }
.atlas b { font-family: var(--display); color: var(--muted); font-size: .9rem; }
.atlas .on { border-style: solid; border-color: #f0cf7c; background: var(--sun-soft); } .atlas .on b { color: var(--ink); }

/* case HUD */
.beats { position: absolute; left: 16px; top: 16px; list-style: none; margin: 0; padding: 4px; display: flex; gap: 2px; background: rgba(255,255,255,.9); border-radius: 999px; font-size: .8rem; font-weight: 600; }
.beats li { padding: 6px 12px; border-radius: 999px; color: var(--muted); }
.beats li.now { background: var(--ink); color: #fff; } .beats li.done { color: var(--jade); }
.stormcard { position: absolute; right: 16px; top: 16px; background: rgba(28, 36, 44, .82); color: #fff; border-radius: 14px; padding: 10px 14px; display: grid; gap: 6px; min-width: 150px; }
.stormcard b { font-family: var(--display); }
.anchors { display: flex; gap: 6px; } .anchors i { width: 12px; height: 12px; border-radius: 3px; background: #9aa7b2; transform: rotate(45deg); }
.anchors i.off { background: #ffd36b; opacity: .35; }
.feeders { display: flex; gap: 4px; flex-wrap: wrap; } .feeders span { font-size: .72rem; font-weight: 700; background: rgba(255,255,255,.16); padding: 3px 8px; border-radius: 999px; }
.moments { display: grid; gap: 8px; }
.moment { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 4px; }
.moment p { margin: 0; font-size: .9rem; }
.moment .why { color: var(--muted); font-size: .86rem; border-left: 3px solid var(--line); padding-left: 10px; }
.moment.pinned { border-color: #9aa7b2; background: #f3f5f7; } .moment.pinned .why { border-left-color: var(--storm); }
.moment.clue { background: var(--storm-soft); border-color: transparent; }
.moment .btn { justify-self: start; margin-top: 4px; }
.m-h { display: flex; gap: 10px; align-items: baseline; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.m-h time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); font-size: .82rem; min-width: 3.4em; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--jade); margin-bottom: 6px; }
.gate { font-size: 1.5rem; display: grid; } .gate .vi { font-size: 1.9rem; letter-spacing: -.01em; }
.gate small { font: 600 .8rem/1.4 var(--body); color: var(--muted); }
.lens { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 14px 0; font-size: .92rem; }
.lens dt { font-weight: 700; } .lens dd { margin: 0; }
.two-lens { display: grid; gap: 10px; margin: 12px 0; }
.two-lens > div { background: var(--soft); border-radius: 14px; padding: 12px; font-size: .9rem; }
.two-lens h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; color: var(--muted); }
.two-lens p:last-child { margin-bottom: 0; }
.grade { font-size: .8rem; color: var(--muted); } .grade span { display: inline-block; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-right: 4px; }
.g-strong span { background: var(--jade-soft); color: var(--jade); } .g-good span { background: var(--sun-soft); color: #8a6208; }
.g-early span { background: #eef0f2; color: #55606a; } .g-story span { background: #f1ebf6; color: #6b4b85; }
.feel { color: var(--storm); font-weight: 600; font-size: .9rem; }
.warm { position: fixed; z-index: 30; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; pointer-events: none;
  border: 3px solid hsl(calc(210 - var(--w, 0) * 180), 85%, 55%); background: hsla(calc(210 - var(--w, 0) * 180), 90%, 60%, calc(.08 + var(--w, 0) * .3));
  transform: scale(calc(.8 + var(--w, 0) * .4)); transition: transform .12s, border-color .12s; }
.warm::after { content: attr(data-t); position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 6px; font: 700 .78rem/1 var(--body); color: #fff; background: rgba(21,32,28,.8); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.warm[data-t=""]::after { display: none; }
.press { position: fixed; z-index: 20; width: 0; height: 0; pointer-events: none; }
.breath { position: absolute; width: 150px; height: 150px; left: -75px; top: -75px; border-radius: 50%; background: radial-gradient(circle, rgba(255,226,140,.5), rgba(255,226,140,.12) 62%, transparent 70%); transform: scale(var(--s, .7)); display: grid; place-items: center; transition: transform .08s linear; }
.breath span { transform: scale(calc(1 / var(--s, .7))); font-weight: 700; font-size: .82rem; color: #fff; background: rgba(21,32,28,.72); padding: 4px 10px; border-radius: 999px; white-space: nowrap; margin-top: 140px; }
.arcp { position: absolute; width: 96px; height: 96px; left: -48px; top: -48px; }
.meterline { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; align-items: center; font-size: .86rem; margin: 8px 0; }
.meterline .bar i { background: #e7b33e; } .meterline .steady i { background: var(--sky); }
.gearline { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; } .gearline span { font-size: .78rem; font-weight: 700; background: var(--jade-soft); color: var(--jade); padding: 4px 9px; border-radius: 999px; }
.gearline .low { background: var(--storm-soft); color: var(--storm); }
.fed { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .85rem; margin-bottom: 12px; } .fed b { background: #e9edf0; padding: 3px 9px; border-radius: 999px; font-size: .78rem; }
.swaps { display: grid; gap: 8px; }
.swap { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; cursor: pointer; font-size: .86rem; color: var(--muted); }
.swap b { color: var(--ink); font-size: .95rem; }
.swap[aria-pressed="true"] { border-color: var(--ink); background: var(--soft); }
.swap[aria-pressed="true"] b::before { content: "✓ "; color: var(--jade); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(15, 22, 20, .35); display: flex; align-items: flex-end; justify-content: flex-end; }
.sheet { background: #fff; width: min(440px, 100%); height: 100%; overflow-y: auto; padding: 24px 24px 32px; box-shadow: -12px 0 40px rgba(0,0,0,.12); }
.sheet h2 { font-size: 1.4rem; margin-bottom: 8px; }
.maker { display: grid; gap: 14px; margin-top: 14px; }
.field { display: grid; gap: 6px; } .field .lab { font-weight: 700; font-size: .85rem; }
.field input { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.chip { border: 0; background: var(--soft); border-radius: 999px; padding: 7px 12px; font-size: .84rem; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; justify-self: start; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .86rem; cursor: pointer; }
.hcard { border: 2px solid var(--ink); border-radius: 16px; padding: 18px; }
.hcard h2 small { display: block; font: 500 .9rem/1.3 var(--body); color: var(--muted); }
.hcard h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 4px; }
.hcard ul { margin: 0; padding-left: 18px; font-size: .9rem; }
.tryon { margin-top: 18px; background: var(--sun-soft); border-radius: 16px; padding: 16px; }
.tryon h3 { font-size: 1.05rem; margin-bottom: 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem; transition: .25s; z-index: 50; pointer-events: none; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the road ---------- */
.land { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; } .land span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.road { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; }
.road::before { content: ""; position: absolute; left: 27px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.road li { position: relative; display: grid; gap: 4px; }
.node { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 10px 12px; cursor: pointer; }
.node .num { width: 32px; height: 32px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font: 800 .9rem/1 var(--display); }
.node .t { display: grid; font-size: .84rem; color: var(--muted); min-width: 0; } .node .t b { color: var(--ink); font-family: var(--display); font-size: .98rem; }
.node .t em { font-style: normal; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.node .stars { color: #d39a12; font-size: 1rem; letter-spacing: 1px; white-space: nowrap; }
.road .next .node { background: var(--ink); border-color: var(--ink); } .road .next .node .t, .road .next .node .t b { color: #fff; } .road .next .node .t span { color: #c9d3cf; }
.road .next .node .num { background: #ffd36b; color: var(--ink); }
.road .locked .node { opacity: .5; cursor: default; }
.land { margin-top: 18px; } .land:first-of-type { margin-top: 0; }
.node .stars { display: grid; justify-items: end; gap: 5px; }
.lvs { display: flex; gap: 3px; } .lvs i { width: 14px; height: 4px; border-radius: 2px; background: var(--line); } .lvs i.on { background: var(--ink); }
.road .next .node .lvs i { background: #4a5753; } .road .next .node .lvs i.on { background: #fff; }
/* storm strength: one flat grey bar, the chosen strength a solid black pill */
.lvl { display: flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 999px; padding: 4px; margin: 4px 0 6px; }
.lvl span { font-size: .78rem; font-weight: 600; color: var(--muted); padding: 0 8px 0 10px; white-space: nowrap; }
.lvl button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 9px 10px; font: 600 .86rem/1 var(--body, inherit); color: var(--ink); cursor: pointer; }
.lvl button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.road .link { margin-left: 58px; }
.lands { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; } .lands span { font-size: .78rem; font-weight: 600; border: 1px dashed var(--line); border-radius: 999px; padding: 5px 10px; color: var(--muted); }
.atlas .r3 { border-color: var(--jade); background: var(--jade-soft); }

/* ---------- friends: Gate Tag ---------- */
.cards.two { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.tagplayers { display: grid; gap: 6px; margin-bottom: 8px; } .tagplayers div { display: flex; gap: 6px; }
.tagplayers input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; }
.check { display: flex; gap: 8px; align-items: center; margin: 12px 0; font-size: .9rem; } .check input { width: 18px; height: 18px; accent-color: var(--ink); }
.scores { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.scores span { display: grid; justify-items: center; min-width: 64px; background: var(--soft); border-radius: 12px; padding: 8px 10px; font-size: .78rem; color: var(--muted); }
.scores b { font: 800 1.2rem/1.1 var(--display); color: var(--ink); } .scores .caller { box-shadow: inset 0 0 0 2px var(--ink); }
.who { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; } .who .btn { white-space: normal; }
.gt .btn.small { margin: 2px 0 6px; } .gt .gate { margin-bottom: 8px; } .gt .note { margin: 8px 0; } .seg button[disabled] { opacity: .4; cursor: default; }

/* ---------- the tiny-healer level ---------- */
body[data-full] .play { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
body[data-full] .panel { display: none; }
body[data-full] .stagebox { touch-action: none; user-select: none; -webkit-user-select: none; }
.rhud-top { position: absolute; left: 14px; right: 14px; top: 12px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.rhud-top > * { pointer-events: auto; }
.hearts { display: flex; gap: 4px; background: rgba(255,255,255,.9); padding: 7px 10px; border-radius: 999px; }
.hearts svg { width: 20px; height: 18px; fill: #d5dbd8; } .hearts svg.on { fill: #e0483c; }
.rgates { display: flex; gap: 4px; flex-wrap: wrap; }
.rgates span { font: 700 .74rem/1 var(--display); background: rgba(21,32,28,.55); color: rgba(255,255,255,.75); padding: 7px 10px; border-radius: 999px; }
.rgates span.on { background: #ffd36b; color: var(--ink); } .rgates span.boss { background: rgba(40,48,58,.9); color: #ffe14d; letter-spacing: .08em; }
.rback { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .82rem; }
.rexit + .rexit { margin-left: 0; }
.rexit { margin-left: auto; font-weight: 600; font-size: .82rem; color: var(--ink); background: rgba(255,255,255,.85); padding: 7px 12px; border-radius: 999px; text-decoration: none; }
.rpow { position: absolute; left: 14px; top: 58px; display: grid; gap: 4px; }
.rpow span { font-size: .72rem; font-weight: 700; background: rgba(255,255,255,.85); padding: 4px 9px; border-radius: 999px; justify-self: start; }
.stick { position: absolute; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; border: 2px solid rgba(255,255,255,.65); background: rgba(255,255,255,.12); pointer-events: none !important; }
.stick i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 50%; background: rgba(255,255,255,.8); }
.dashbtn { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-content: center;
  color: #fff; font-weight: 700; background: conic-gradient(rgba(21,32,28,.35) calc(var(--cd, 0) * 360deg), var(--ink) 0); box-shadow: 0 0 0 4px rgba(255,255,255,.5); }
.dashbtn small { font-weight: 500; opacity: .7; font-size: .7rem; }
.rcard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow-y: auto; background: #fff; border-radius: 20px; padding: 20px 22px; box-shadow: 0 18px 60px rgba(0,0,0,.28); font-size: .92rem; }
.dashbtn.p0 { right: auto; left: max(18px, env(safe-area-inset-left)); box-shadow: 0 0 0 4px #ff7a59; } .dashbtn.p1 { box-shadow: 0 0 0 4px #4da3ff; }
.hearts b { font: 700 .74rem/1 var(--display); align-self: center; margin-right: 4px; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hearts em { font-style: normal; font-weight: 700; font-size: .74rem; color: var(--storm); }
.hearts.p0 { box-shadow: inset 0 0 0 2px #ff7a59; } .hearts.p1 { box-shadow: inset 0 0 0 2px #4da3ff; }
.pdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; } .pdot.p0 { background: #ff7a59; } .pdot.p1 { background: #4da3ff; }
.rcard .gate { margin-bottom: 10px; } .rcard p { margin-bottom: .6em; }
.rcard .power { background: var(--sun-soft); border-radius: 12px; padding: 10px 12px; }
.rcard .actions { margin-top: 14px; } .rcard a.btn { text-decoration: none; display: inline-block; }
.how { margin: 0 0 4px; padding-left: 18px; } .how li { margin: 4px 0; }
.loadout { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.loadout div { background: var(--soft); border-radius: 12px; padding: 8px 10px; display: grid; font-size: .74rem; color: var(--muted); }
.loadout b { font: 800 1.05rem/1.2 var(--display); color: var(--jade); } .loadout .low b { color: var(--storm); }

/* ---------- phones ---------- */
@media (max-width: 820px) {
  .play { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48vh minmax(0, 1fr); }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .top { gap: 10px; } .brand { font-size: 0; gap: 0; } .brand .mark { width: 26px; height: 26px; }
  .modes a { padding: 7px 11px; font-size: .84rem; }
  .twinchip span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .forecast { left: 10px; top: 10px; padding: 8px 10px; } .forecast b { font-size: 1.05rem; }
  .goal { left: auto; right: 10px; top: 10px; bottom: auto; max-width: 52%; padding: 8px 10px; font-size: .78rem; }
  .goal span { display: none; } .goal b { font-size: .84rem; } .pzline { display: block; }
  .playbar { bottom: 10px; } .insidebtn { right: 10px; bottom: auto; top: 64px; padding: 8px 12px; font-size: .82rem; } .playbar .btn { padding: 9px 13px; font-size: .84rem; }
  .beats { left: 10px; top: 10px; font-size: .72rem; } .beats li { padding: 5px 8px; }
  .stormcard { right: 10px; top: 52px; min-width: 0; padding: 6px 10px; gap: 4px; }
  .stormcard b { font-size: .8rem; } .stormcard .feeders { display: none; } .anchors i { width: 9px; height: 9px; }
  .caption { top: auto; bottom: 64px; white-space: normal; text-align: center; }
  body[data-full] .caption { top: 104px; bottom: auto; }
  .rgates span { padding: 5px 7px; font-size: .64rem; } .rpow { top: 96px; } .rhud-top { gap: 6px; left: 8px; right: 8px; flex-wrap: wrap; }
  .hearts { padding: 6px 8px; gap: 2px; } .hearts svg { width: 16px; height: 15px; } .rexit { padding: 6px 9px; font-size: .74rem; }
  .sheet { height: 88%; border-radius: 20px 20px 0 0; }
  .modal { align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- dreams (js/dream.js) ---------- */
.hearts:empty { display: none; }
.stagebox.drowse::after { content: ""; position: absolute; inset: 0; pointer-events: none; animation: flash .9s ease-out forwards; box-shadow: inset 0 0 110px 30px rgba(104, 92, 180, .6); }
.stagebox.sleepy #stage { filter: saturate(.55) brightness(.82); }
.dfade { position: absolute; inset: 0; background: #0b0d1a; opacity: 0; pointer-events: none; transition: opacity .6s; }
.dfade.on { opacity: 1; }
.dline { position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100% - 32px)); background: rgba(21, 32, 28, .9); color: #fff; border-radius: 18px; padding: 14px 18px; font-size: .95rem; line-height: 1.45; }
.dline b { display: block; font-family: var(--display); color: #ffd36b; margin-bottom: 2px; }
.rcard.low { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-height: 64%; }
.asks { display: grid; gap: 8px; } .asks .btn { text-align: left; width: 100%; } .asks .btn[disabled] { opacity: .45; text-decoration: line-through; cursor: default; }
.hai.drift { background: #2c2948; color: #fff; }
.dface { width: 52px; height: 52px; border-radius: 50%; background: #1a1830; position: relative; display: block; }
.dface::before, .dface::after { content: ""; position: absolute; top: 23px; width: 13px; height: 4px; background: #ffb648; }
.dface::before { left: 10px; transform: rotate(16deg); } .dface::after { right: 10px; transform: rotate(-16deg); }
.tool .small { margin: .4em 0 0; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; } .tools span { font: 700 .76rem/1 var(--display); background: var(--sun-soft); padding: 7px 10px; border-radius: 999px; }
.node.sub { margin-left: 46px; background: #20233f; border-color: #20233f; } .node.sub .t, .node.sub .t span { color: #c5c9e6; } .node.sub .t b { color: #fff; }
.node.sub .num { background: #ffd36b; box-shadow: inset -9px -3px 0 0 #20233f; } .node.sub .stars { color: #ffd36b; }
.road .locked .node.sub, .node.sub[disabled] { opacity: .45; cursor: default; }
.stagebox.cine .dashbtn, .stagebox.cine .stick { display: none; } .stagebox.cine .rback { visibility: hidden; }
.rcard.side { left: auto; right: 18px; transform: translateY(-50%); width: min(400px, 40%); }
.gpin { position: absolute; transform: translate(-50%, calc(-100% - 26px)); background: #ffd36b; color: var(--ink); padding: 7px 13px; border-radius: 14px; font: 800 .92rem/1.15 var(--display); white-space: nowrap; pointer-events: none; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.gpin small { display: block; font: 600 .72rem/1.2 var(--body, inherit); opacity: .8; }
.gpin::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 22px; margin-left: -1px; background: #ffd36b; }
.bmap { position: absolute; right: 14px; top: 58px; height: min(210px, 30%); border-radius: 12px; box-shadow: 0 0 0 2px rgba(21,32,28,.55), 0 8px 24px rgba(0,0,0,.2); pointer-events: none; }
.bmap b, .bmap i { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: rgba(21,32,28,.45); }
.bmap b.on { background: #ffb400; } .bmap b.hid { display: none; } .bmap b.next { background: #fff; box-shadow: 0 0 0 2px #ffb400; animation: mapdot 1s ease-in-out infinite alternate; }
.bmap i { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: #e0483c; box-shadow: 0 0 0 2px #fff; } .bmap i.p0 { background: #ff7a59; } .bmap i.p1 { background: #4da3ff; }
@keyframes mapdot { from { transform: scale(1); } to { transform: scale(1.7); } }
@media (max-width: 760px) { .bmap { top: 168px; right: 8px; height: min(132px, 20%); } }
.rgates .dbar { align-self: center; width: 110px; height: 12px; background: rgba(21,32,28,.6); border-radius: 999px; overflow: hidden; box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
.rgates .dbar i { display: block; height: 100%; width: 0; background: #8fe3ff; } .rgates .dbar.gap i { background: #ffb648; animation: mapdot .5s ease-in-out infinite alternate; }

/* the look pass: dew counter, sound switch */
.rgates span.dew { background: rgba(233,248,255,.92); color: #1f4d63; }
.rhud-top button.rexit { border: 0; cursor: pointer; font-family: inherit; }
.rcard details.more { margin: 2px 0 10px; } .rcard details.more > summary { display: inline-block; list-style: none; cursor: pointer; font-weight: 500; font-size: .86rem; color: var(--ink); background: #f2f2f2; padding: 7px 12px; border-radius: 999px; }
.rcard details.more > summary::-webkit-details-marker { display: none; } .rcard details.more[open] > summary { margin-bottom: 8px; }

/* ---------- the story scenes ---------- */
.st-top { position: absolute; left: 14px; right: 14px; top: 12px; display: flex; align-items: center; gap: 12px; pointer-events: none; } .st-top > * { pointer-events: auto; }
.st-ch { font-size: .82rem; font-weight: 600; background: rgba(255,255,255,.88); padding: 7px 13px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.st-ch b { font-family: var(--display); margin-right: 8px; }
.st-cap { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(620px, calc(100% - 24px)); }
.st-box { background: #fff; border-radius: 20px; padding: 16px 18px 12px; box-shadow: 0 14px 44px rgba(0,0,0,.22); animation: stIn .28s ease-out; }
@keyframes stIn { from { opacity: 0; transform: translateY(8px); } }
.st-text { margin: 0; font-size: 1.04rem; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.st-who { margin: 0 0 4px; font: 700 .8rem/1.2 var(--display); color: var(--jade); display: flex; align-items: center; gap: 8px; }
.st-who img { width: 26px; height: 26px; border-radius: 50%; background: var(--soft); object-fit: cover; }
.st-who.mom { color: #a8553f; } .st-who.doc { color: #3b6fb6; } .st-who.tini { color: #b8860b; }
.st-box.letter { background: #fbf5e3; } .st-box.letter .st-text { font-style: italic; } .st-box.letter .st-who { color: #7a6a4a; }
.st-sign { margin: 6px 0 0; text-align: right; font-size: .9rem; font-weight: 600; color: #7a6a4a; }
.st-box.note { background: var(--ink); } .st-box.note .st-text { color: #fff; font-size: .98rem; } .st-box.note .st-foot span { color: #c9d3cf; } .st-box.note .btn { background: #fff; color: var(--ink); }
.st-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; } .st-foot span { flex: 1; text-align: center; font-size: .78rem; font-weight: 600; color: var(--muted); }
.st-fade { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .28s; pointer-events: none !important; } .st-fade.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .st-box { animation: none; } }
/* the story on the road */
.storycard { background: var(--ink); color: #c9d3cf; border-radius: 18px; padding: 16px 18px; margin: 0 0 18px; }
.storycard .eyebrow { color: #ffd36b; } .storycard h3 { margin: 0 0 4px; color: #fff; font: 800 1.15rem/1.25 var(--display); } .storycard p { margin: 0 0 12px; font-size: .92rem; }
.storycard .btn { background: #fff; color: var(--ink); } .storycard .btn:hover { background: #e9eeec; }
.storycard .prog { display: flex; gap: 4px; margin: 12px 0 0; } .storycard .prog i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); } .storycard .prog i.on { background: #ffd36b; }
.chap { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: var(--soft); border-radius: 14px; padding: 10px 14px; margin: 0 0 8px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.chap:hover { background: var(--line); } .chap::before { content: ""; flex: none; border-left: 9px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin: 0 2px 0 3px; }
.chap b { font-family: var(--display); font-size: .92rem; } .chap span { flex: 1; font-size: .84rem; color: var(--muted); min-width: 0; } .chap em { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--jade); white-space: nowrap; }

/* ---------- skills carried by the healer, and the choice of two powers ---------- */
.skills { position: absolute; right: max(26px, calc(env(safe-area-inset-right) + 8px)); bottom: calc(max(22px, env(safe-area-inset-bottom)) + 100px); display: grid; gap: 10px; }
.skbtn { position: relative; width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-content: center; color: #fff; font: 700 .84rem/1.1 var(--body); box-shadow: 0 0 0 4px rgba(255,255,255,.5); }
.skbtn.calm { background: #1d7a64; } .skbtn.rest { background: #3b4a9a; } .skbtn small { font-weight: 500; opacity: .75; font-size: .68rem; }
.skbtn i { position: absolute; right: -4px; top: -4px; min-width: 24px; height: 24px; border-radius: 12px; background: #fff; color: var(--ink); font: 800 .78rem/24px var(--display); font-style: normal; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.skbtn.none { background: rgba(21,32,28,.38); } .skbtn.none i { opacity: .7; }
.stagebox.cine .skills { display: none; }
.pick2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pw { border: 0; border-radius: 16px; background: var(--ink); color: #c9d3cf; padding: 12px 14px; text-align: left; cursor: pointer; font: inherit; display: grid; gap: 4px; align-content: start; }
.pw:hover { background: #2c3934; } .pw b { color: #fff; font: 700 .98rem/1.2 var(--display); } .pw span { font-size: .84rem; line-height: 1.4; }
@media (max-width: 520px) { .pick2 { grid-template-columns: 1fr; } .skbtn { width: 60px; height: 60px; } }

.rankcard { border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; margin: 0 0 14px; } .rankcard h3 { font: 800 1.1rem/1.25 var(--display); margin: 0 0 4px; } .rankcard p { margin: 0 0 8px; font-size: .9rem; }
.rankcard .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 2px 0 8px; } .rankcard .bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }

.langbtn { border: 0; background: var(--soft); color: var(--ink); font: 600 .82rem/1 var(--body); padding: 9px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap; margin-left: auto; } .langbtn:hover { background: var(--line); }
.langbtn + .twinchip { margin-left: 0; }
