/* Pixelify Sans draws 5 almost as S and 2 almost as Z, so the digits 0-9 in running text come from Silkscreen
   (Jason Kottke, SIL Open Font License), kept here as a 0-9 subset. At full size its digits are as tall as the
   capitals and wider, so they looked a size too big; 88 % sits them just under the capitals. */
@font-face { font-family: "Questlog tal"; src: url("/assets/fonts/silkscreen-digits.woff2") format("woff2"); unicode-range: U+30-39; size-adjust: 88%; font-display: swap; }
/* Questlog: an old handheld RPG for real life.
   The page is a green dot-matrix screen; every panel is a double-ruled dialog box; bars are HP bars;
   the top is the console bezel. Four game-colour accents mark the dimensions, three mark state. */
:root {
  --lcd: #dcebc0;        /* screen */
  --lcd-2: #c6dba3;      /* screen shade, bar troughs */
  --box: #f6f9ec;        /* dialog box paper */
  --ink: #10291a;        /* darkest pixel: text, borders */
  --mid: #3c6648;        /* secondary text */
  --soft: #8fb87c;       /* grid lines, quiet fills */
  --bezel: #3b3a4a;      /* console plastic */
  --bezel-2: #57566a;
  --gold: #a86a00;       /* XP, coins, rewards */
  --good: #2c8a3a; --mid-st: #b07a10; --low: #b8342c;
  --krop: #c83c30; --sind: #2c64b0; --ro: #1f8a6a; --energi: #c88a10; --forbindelse: #7a3fa0;
  --f-pixel: "Press Start 2P", ui-monospace, monospace;
  --f-text: "Questlog tal", "Pixelify Sans", ui-rounded, system-ui, sans-serif;   /* the digits come from "Questlog tal", the letters stay Pixelify */
  --f-num: "VT323", ui-monospace, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--lcd) repeating-linear-gradient(0deg, rgba(16,41,26,.035) 0 1px, transparent 1px 3px);
  color: var(--ink); font: 17px/1.45 var(--f-text);
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px dashed var(--ink); outline-offset: 2px; }
a { color: var(--sind); }
.noscroll { overflow: hidden; }

/* ---------- console bezel ---------- */
.top { position: sticky; top: 0; z-index: 8; background: var(--bezel); border-bottom: 4px solid var(--ink);
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.brand { font-family: var(--f-pixel); font-size: 14px; color: #f6f9ec; letter-spacing: 1px; display: flex; gap: 10px; align-items: baseline; }
.brand small { font-size: 8px; color: #b9b6d0; letter-spacing: 0; }
/* the day you look at, right after the page tabs; the slot keeps its width on every page (empty there), so the bezel never changes shape */
.topdate { width: 124px; flex: none; display: flex; align-items: center; }
.topdate .datenav { gap: 6px; }
.topdate .datenav h1 { font-size: 9px; color: #f6f9ec; white-space: nowrap; }
.topdate .datenav button { width: 24px; height: 24px; font-size: 8px; border-width: 2px; background: var(--bezel-2); color: #e8e6f4; box-shadow: 2px 2px 0 var(--ink); }
@media (max-width: 1440px) { .brand small { display: none; } } /* room for the day slot, on every page alike */
@media (max-width: 1100px) { .helpbtn .hl { display: none; } }
@media (min-width: 761px) { nav { flex-wrap: nowrap; } } /* the tabs move down as one row instead of breaking in two */
@media (min-width: 761px) and (max-width: 1199px) { .brand { flex-basis: 100%; } } /* name on its own line, tabs + day + help below */
@media (max-width: 760px) { .topdate:empty { display: none; } }
.brand i { width: 10px; height: 10px; background: #e2574c; display: inline-block; box-shadow: 0 0 6px #e2574c; align-self: center; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav button { background: var(--bezel-2); color: #e8e6f4; border: 2px solid var(--ink); padding: 6px 10px; font-family: var(--f-pixel); font-size: 9px; box-shadow: 2px 2px 0 var(--ink); }
nav button.on { background: var(--lcd); color: var(--ink); }
nav button.on::before { content: "▶ "; }
.helpbtn { margin-left: auto; background: #e2574c; color: #fff; border: 2px solid var(--ink); height: 34px; padding: 0 10px; font-family: var(--f-pixel); font-size: 9px; box-shadow: 2px 2px 0 var(--ink); }

/* ---------- layout and boxes ---------- */
.wrap { max-width: 1060px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.win { background: var(--box); border: 3px solid var(--ink); border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--ink), 4px 4px 0 rgba(16,41,26,.28);
  padding: 18px 20px; min-width: 0; }
.label { font-family: var(--f-pixel); font-size: 9px; letter-spacing: .5px; text-transform: uppercase; color: var(--mid); line-height: 1.6; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.dim { color: var(--mid); }
.small { font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.center { display: flex; justify-content: center; }
.empty { color: var(--mid); font-size: 15px; }
.shelf-h { font-family: var(--f-pixel); font-size: 11px; text-transform: uppercase; margin: 2px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shelf-h::before { content: "◆"; color: var(--gold); }
.shelf-h small { text-transform: none; font-family: var(--f-text); font-size: 14px; color: var(--mid); }

/* ---------- buttons, switches ---------- */
.btn { background: var(--box); color: var(--ink); border: 3px solid var(--ink); padding: 7px 12px; font-family: var(--f-pixel); font-size: 10px; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink); line-height: 1.3; }
.btn:hover { background: var(--lcd); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.small { padding: 4px 8px; font-size: 8px; box-shadow: 2px 2px 0 var(--ink); }
.btn.primary { background: var(--ink); color: var(--lcd); }
.btn.primary:hover { background: #24452f; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--sind); font-family: var(--f-pixel); font-size: 9px; text-transform: uppercase; }
.linkbtn::after { content: " ▶"; }
.seg { display: inline-flex; border: 3px solid var(--ink); background: var(--box); box-shadow: 2px 2px 0 var(--ink); }
.seg button { background: none; border: 0; border-left: 2px solid var(--ink); padding: 5px 10px; font-family: var(--f-pixel); font-size: 8px; color: var(--mid); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--ink); color: var(--lcd); }
.libtabs { display: flex; gap: 8px; flex-wrap: wrap; }
.libtabs button { background: var(--box); border: 3px solid var(--ink); padding: 7px 14px; font-family: var(--f-pixel); font-size: 10px; box-shadow: 3px 3px 0 var(--ink); }
.libtabs button.on { background: var(--ink); color: var(--lcd); }
.libtabs button.on::before { content: "▶ "; }

/* ---------- HP-style bars ---------- */
.mdbar, .sbar, .xpbar { height: 12px; background: var(--lcd-2); border: 2px solid var(--ink); position: relative; overflow: hidden; }
.mdbar i, .sbar i, .xpbar i { position: absolute; inset: 0 auto 0 0; display: block; }
.mdbar::after, .sbar::after, .xpbar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(16,41,26,.22) 6px 8px); pointer-events: none; }
.xpbar i { background: var(--gold); }
.st-good { color: var(--good); } .st-mid { color: var(--mid-st); } .st-low { color: var(--low); }
.bg-good { background: var(--good); } .bg-mid { background: var(--mid-st); } .bg-low { background: var(--low); }
.balance-pill { font-family: var(--f-pixel); font-size: 9px; padding: 4px 8px; border: 2px solid currentColor; background: var(--box); }

/* ---------- hero: status screen ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.wheel { width: 100%; max-width: 460px; display: block; margin: 0 auto; }
.hero-side { display: grid; gap: 12px; align-content: center; }
.datenav { display: flex; align-items: center; gap: 10px; }
.datenav h1 { font-family: var(--f-pixel); font-weight: 400; font-size: 12px; margin: 0; text-transform: uppercase; }
.datenav button { background: var(--box); border: 3px solid var(--ink); width: 34px; height: 34px; font-family: var(--f-pixel); font-size: 11px; box-shadow: 2px 2px 0 var(--ink); }
.datenav button:disabled { opacity: .35; }
.lvl-row { display: flex; gap: 12px; align-items: center; }
.lvl-badge { min-width: 54px; height: 54px; display: grid; place-items: center; font-family: var(--f-pixel); font-size: 8px; text-align: center; line-height: 1.3; background: var(--gold); color: var(--box); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.lvl-badge b { font-family: var(--f-num); font-size: 32px; font-weight: 400; display: block; line-height: .8; }
.statlines { display: grid; gap: 7px; }
.statline { display: grid; grid-template-columns: 104px minmax(0, 1fr) 76px; gap: 10px; align-items: center; }
.statline span { font-family: var(--f-pixel); font-size: 9px; color: var(--c); }
.statline .mdbar i { background: var(--c); }
.statline b { font-family: var(--f-num); font-weight: 400; font-size: 21px; text-align: right; }
.bestnext { display: grid; gap: 6px; justify-items: start; border: 3px solid var(--ink); background: var(--lcd); padding: 10px 12px; box-shadow: inset 0 0 0 3px var(--c); }
.bestnext b { font-weight: 600; font-size: 18px; }

/* ---------- quests (action cards) ---------- */
.acts { display: grid; gap: 12px; }
.acts.grid2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.act { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--box); border: 3px solid var(--ink); box-shadow: inset 5px 0 0 var(--c), 3px 3px 0 rgba(16,41,26,.28); padding: 10px 12px 10px 16px; }
.act-img { width: 66px; height: 88px; overflow: hidden; display: grid; place-items: center; font-size: 30px; background: var(--lcd); border: 2px solid var(--ink); }
.act-img img { width: 100%; height: 100%; object-fit: cover; }
.act-img.meditation { background: radial-gradient(circle at 60% 30%, #9fe0c8, #2f7a68); }
.act-body { display: grid; gap: 3px; min-width: 0; }
.act-tag { font-family: var(--f-pixel); font-size: 8px; color: var(--c); text-transform: uppercase; line-height: 1.5; }
.act-body b { font-weight: 600; font-size: 16px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.act-body small { color: var(--mid); font-size: 13px; }
.gains { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.gains span { font-family: var(--f-num); font-size: 17px; line-height: 1; padding: 3px 6px; border: 2px solid var(--ink); background: var(--lcd); }
.gains em { font-style: normal; font-family: var(--f-pixel); font-size: 7px; margin-right: 4px; color: var(--mid); vertical-align: 1px; }
.g-pts { color: var(--gold); } .g-sub { color: var(--c); } .g-bal { color: var(--good); }

/* ---------- category status cards ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.cat { display: grid; gap: 10px; align-content: start; cursor: pointer; box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--c), 4px 4px 0 rgba(16,41,26,.28); }
.cat:hover { transform: translate(-1px, -1px); }
.cat header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cat header b { font-family: var(--f-pixel); font-weight: 400; color: var(--c); font-size: 12px; }
.cat .big { font-family: var(--f-num); font-size: 32px; }
.cat .mdbar i { background: var(--c); }
.catsubs { display: grid; gap: 8px; }
.catsub { display: grid; grid-template-columns: 128px minmax(0, 1fr) 46px 110px; gap: 8px; align-items: center; font-size: 15px; }
.catsub span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catsub b { font-family: var(--f-num); font-weight: 400; font-size: 19px; text-align: right; }
.go { background: var(--box); border: 2px solid var(--ink); padding: 3px 6px; font-family: var(--f-pixel); font-size: 7px; box-shadow: 2px 2px 0 var(--ink); text-align: left; white-space: nowrap; }
.go small { font-family: var(--f-num); font-size: 15px; color: var(--gold); }
.go:hover { background: var(--ink); color: var(--lcd); }
.cattip { margin: 0; font-size: 14px; color: var(--mid); }

/* ---------- dialog boxes: coaches, tips, letters ---------- */
.coachrow, .coachgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.coachgrid { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.coach { display: grid; gap: 10px; align-content: start; box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--c), 4px 4px 0 rgba(16,41,26,.28); }
.coach header { display: flex; gap: 10px; align-items: center; }
.coach header canvas { width: 72px; height: 72px; image-rendering: pixelated; background: var(--lcd); border: 3px solid var(--ink); object-fit: cover; object-position: 0 -6px; }
.coach header b { font-family: var(--f-pixel); font-weight: 400; font-size: 11px; color: var(--c); }
.coach header small { display: block; color: var(--mid); font-size: 13px; }
.bubble, .livetip { position: relative; background: var(--box); border: 3px solid var(--ink); box-shadow: inset 0 0 0 2px var(--box), inset 0 0 0 4px var(--ink); padding: 12px 14px 18px; }
.bubble p, .livetip p { margin: 4px 0; font-size: 16px; }
.bubble::after, .livetip::after { content: "▼"; position: absolute; right: 10px; bottom: 2px; font-size: 11px; animation: blink 1s steps(2) infinite; }
.livetip { display: grid; gap: 6px; justify-items: start; background: var(--lcd); box-shadow: inset 0 0 0 2px var(--lcd), inset 0 0 0 4px var(--ink); }
@keyframes blink { 50% { opacity: 0; } }
.picks { display: grid; gap: 8px; }
.pick { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; background: var(--box); border: 2px solid var(--ink); padding: 6px; text-align: left; box-shadow: 2px 2px 0 var(--ink); }
.pick:hover { background: var(--lcd); }
.pick-img { width: 48px; height: 64px; overflow: hidden; display: grid; place-items: center; font-size: 24px; background: var(--lcd); border: 2px solid var(--ink); }
.pick-img img { width: 100%; height: 100%; object-fit: cover; }
.pick small { display: block; color: var(--mid); font-size: 13px; }
.pick em { display: block; font-style: normal; font-family: var(--f-pixel); font-size: 7px; color: var(--sind); margin-bottom: 2px; }
.old { border-top: 2px dashed var(--soft); padding-top: 8px; margin-top: 8px; }
details summary { cursor: pointer; }

/* ---------- covers, shelves, grids ---------- */
.tile { background: none; border: 0; padding: 0; text-align: left; display: grid; gap: 6px; align-content: start; min-width: 0; position: relative; }
.cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--lcd-2); border: 3px solid var(--ink); box-shadow: 3px 3px 0 rgba(16,41,26,.35); transition: transform .12s; }
.tile.wide .cover { aspect-ratio: 16 / 9; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 52px; background: var(--box); }
.cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; font-family: var(--f-pixel); font-size: 9px; line-height: 1.5; }
.cover::after { content: ""; position: absolute; left: 0; bottom: 0; height: 5px; width: var(--p, 0%); background: var(--gold); }
.cover[data-seen]::before { content: "SET"; position: absolute; top: 6px; right: 6px; z-index: 1; background: var(--good); color: var(--box); border: 2px solid var(--ink); font-family: var(--f-pixel); font-size: 7px; padding: 2px 4px; }
button.tile:hover .cover, button.tile:focus-visible .cover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 rgba(16,41,26,.45); }
.cover-cap b { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cover-cap small { display: block; color: var(--mid); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 18px 14px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 14px; overflow-x: auto; padding: 4px 6px 12px 2px; }
.shelf .tile.wide { grid-column: span 2; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select, .note input, .note select, .outside input { background: var(--box); border: 3px solid var(--ink); padding: 5px 8px; }
.filters input { flex: 1; min-width: 180px; }
#libBody { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.medgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.med-tile { position: relative; aspect-ratio: 1; border: 3px solid var(--ink); padding: 12px; text-align: left; display: grid; align-content: end; gap: 2px; overflow: hidden; width: 100%;
  background: radial-gradient(circle at 70% 25%, var(--a), transparent 60%), linear-gradient(160deg, var(--a), var(--b)); color: #fff; box-shadow: 3px 3px 0 rgba(16,41,26,.35); }
.med-tile svg { position: absolute; top: 12px; left: 12px; width: 44px; }
.med-tile .mt-min { position: absolute; top: 8px; right: 12px; font-family: var(--f-num); font-size: 34px; line-height: 1; text-shadow: 2px 2px 0 rgba(0,0,0,.35); }
.med-tile .mt-min small { font-size: 14px; margin-left: 2px; }
.med-tile .mt-title { font-size: 14px; line-height: 1.25; text-shadow: 1px 1px 0 rgba(0,0,0,.5); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.med-tile .mt-sub { font-size: 12px; opacity: .95; }
.med-tile .mt-play { position: absolute; left: 10px; top: 52px; font-family: var(--f-pixel); font-size: 7px; background: rgba(16,41,26,.7); padding: 3px 6px; }
.shelf .med-tile { aspect-ratio: 2 / 3; }

/* ---------- day log ---------- */
.strip { position: relative; height: 30px; background: var(--lcd-2); border: 2px solid var(--ink); margin: 12px 0 24px; }
.strip i { position: absolute; top: 3px; bottom: 3px; }
.strip .now { position: absolute; top: -5px; bottom: -5px; width: 3px; background: var(--ink); }
.strip span { position: absolute; top: 32px; font-family: var(--f-num); font-size: 15px; color: var(--mid); }
.ledger { display: grid; }
.lrow { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 2px dashed var(--soft); }
.lrow:first-child { border-top: 0; }
.lthumb { width: 46px; height: 46px; overflow: hidden; background: var(--lcd); border: 2px solid var(--ink); display: grid; place-items: center; font-size: 20px; }
.lthumb img { width: 100%; height: 100%; object-fit: cover; }
.what { min-width: 0; }
.what b { font-weight: 600; }
.what small { display: block; color: var(--mid); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-family: var(--f-num); font-size: 17px; line-height: 1; padding: 3px 6px; background: var(--box); border: 2px solid var(--c); color: var(--c); white-space: nowrap; }
.chip.neg { border-color: var(--low); color: var(--low); }
.del { background: none; border: 0; color: var(--mid); font-size: 14px; }
.note { display: grid; gap: 10px; }
.note .row button { background: var(--box); border: 2px solid var(--ink); padding: 4px 10px; box-shadow: 2px 2px 0 var(--ink); }
.note input[type=number] { width: 90px; }

/* ---------- diary ---------- */
.bigstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bigstat { background: var(--box); border: 3px solid var(--ink); box-shadow: inset 0 -6px 0 var(--c), 3px 3px 0 rgba(16,41,26,.28); padding: 12px 12px 16px; display: grid; }
.bigstat b { font-family: var(--f-num); font-weight: 400; font-size: 40px; line-height: .9; }
.bigstat span { font-family: var(--f-pixel); font-size: 8px; color: var(--c); }
.bigstat small { color: var(--mid); font-size: 13px; }
.routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.route { display: grid; gap: 4px; font-size: 14px; }
.route canvas { width: 100%; aspect-ratio: 4 / 3; background: var(--lcd-2); border: 3px solid var(--ink); display: block; }
.route-ic { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 48px; background: var(--lcd-2); border: 3px solid var(--ink); }
.meals { display: flex; flex-wrap: wrap; gap: 6px; font-size: 28px; }
.screenlist { display: grid; gap: 6px; }
.screenlist div { display: grid; grid-template-columns: 180px minmax(0, 1fr) 70px; gap: 10px; align-items: center; }
.screenlist i { height: 12px; background: var(--low); border: 2px solid var(--ink); }
.screenlist b { font-family: var(--f-num); font-weight: 400; font-size: 19px; text-align: right; }

/* ---------- insights ---------- */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.chart-wrap { overflow-x: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; margin-top: 6px; }
.legend i { display: inline-block; width: 14px; height: 6px; vertical-align: middle; margin-right: 6px; border: 1px solid var(--ink); }
.streaks { display: grid; gap: 10px; margin-top: 10px; }
.streak { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; align-items: center; }
.flame { width: 44px; height: 44px; display: grid; place-items: center; border: 3px solid var(--ink); background: color-mix(in srgb, var(--krop) calc(var(--n) * 100%), var(--lcd)); }
.flame b { font-family: var(--f-num); font-weight: 400; font-size: 26px; }
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.rec { background: var(--lcd); border: 2px solid var(--ink); padding: 8px 10px; display: grid; }
.rec b { font-family: var(--f-num); font-weight: 400; font-size: 32px; line-height: 1; color: var(--gold); }
.rec span { font-size: 12px; color: var(--mid); }
.rec small { font-size: 13px; }
.pairs { display: grid; gap: 14px; margin-top: 10px; }
.pair-t { font-size: 16px; margin-bottom: 4px; }
.pair-bars { display: grid; grid-template-columns: 44px minmax(0, 1fr) 56px; gap: 8px; align-items: center; font-size: 13px; color: var(--mid); }
.pair-bars i { height: 12px; display: block; border: 2px solid var(--ink); }
.pair-bars b { font-family: var(--f-num); font-weight: 400; font-size: 19px; color: var(--ink); }

/* ---------- setup ---------- */
.steps { margin: 6px 0; padding-left: 22px; display: grid; gap: 8px; }
.copy { display: flex; gap: 6px; align-items: center; background: var(--lcd); border: 2px solid var(--ink); padding: 6px 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; overflow-x: auto; }
.copy code { white-space: nowrap; }
.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable td, .ptable th { padding: 5px 6px; border-bottom: 2px dashed var(--soft); text-align: left; }
.ptable th { font-family: var(--f-pixel); font-weight: 400; font-size: 8px; color: var(--mid); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(16,41,26,.82); display: flex; flex-direction: column; }
.workout-ov, .focus-ov, .reader-ov { background: var(--lcd); }
.video-ov { background: #000; }
.ov-bar { display: flex; gap: 12px; align-items: center; padding: 10px max(16px, env(safe-area-inset-left, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); background: var(--bezel); color: #f6f9ec; border-bottom: 4px solid var(--ink); }
.ov-bar b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--f-pixel); font-size: 10px; }
.ov-bar .dim { color: #c8c6dc; }
.r-music { display: flex; gap: 6px; align-items: center; flex: none; }
.r-music select { font: inherit; font-size: 14px; max-width: 150px; padding: 2px 4px; background: var(--box); color: var(--ink); border: 2px solid var(--ink); }
.r-music input { width: 70px; accent-color: var(--gold); }
.r-tracks { position: absolute; right: 16px; top: 56px; z-index: 5; width: min(340px, calc(100vw - 32px)); max-height: calc(100% - 72px); overflow-y: auto; display: grid; gap: 2px; padding: 8px; background: var(--box); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.r-tracks .label { margin-bottom: 4px; }
.r-tracks button { text-align: left; background: none; border: 0; padding: 4px 6px; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.r-tracks button:hover { background: var(--lcd); } .r-tracks button.on { background: var(--ink); color: var(--lcd); }
.r-tracks small { margin-top: 4px; font-size: 12px; }
@media (max-width: 760px) { .r-music input, #rLog, #rMusic, #rSkip { display: none; } .r-music select { max-width: 130px; } }
.video-ov video { flex: 1; width: 100%; min-height: 0; background: #000; }
.detail-ov { align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.detail { position: relative; width: min(920px, 100%); overflow: hidden; border: 4px solid var(--ink); background: var(--box); box-shadow: 6px 6px 0 rgba(0,0,0,.4); }
.detail::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; background: var(--art, none) center / cover; opacity: .55; }
.detail::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; background: linear-gradient(180deg, transparent, var(--box)); }
.detail-body { position: relative; z-index: 1; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; padding: 28px; }
.detail-poster img { width: 100%; border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(16,41,26,.4); }
.detail-text h2 { margin: 0 0 6px; font-family: var(--f-pixel); font-weight: 400; font-size: 16px; line-height: 1.5; }
.detail-text p { max-width: 62ch; }
.detail-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.pts { font-family: var(--f-num); font-size: 19px; }
.eps { display: grid; gap: 8px; margin-top: 12px; max-height: 46vh; overflow-y: auto; }
.ep { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--box); border: 2px solid var(--ink); padding: 6px; text-align: left; }
.ep:hover { background: var(--lcd); }
.ep-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--lcd-2); border: 2px solid var(--ink); }
.ep-img img { width: 100%; height: 100%; object-fit: cover; }
.ep-img .seen { position: absolute; top: 4px; right: 4px; background: var(--good); color: var(--box); font-style: normal; font-family: var(--f-pixel); font-size: 7px; padding: 2px 4px; }
.ep small { display: block; color: var(--mid); }
.reader-wrap { flex: 1; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; min-height: 0; background: #f2f6e4; }
#book { min-height: 0; height: 100%; }
.turn { background: none; border: 0; color: var(--mid); font-family: var(--f-pixel); font-size: 18px; }
.turn:hover { color: var(--ink); background: rgba(16,41,26,.05); }

/* category drawer */
.dim-ov { align-items: flex-end; }
.drawer { width: min(580px, 100%); height: 100%; overflow-y: auto; background: var(--box); border-left: 5px solid var(--ink); box-shadow: inset 6px 0 0 var(--c); padding: 18px 18px 18px 24px; padding-top: calc(18px + env(safe-area-inset-top, 0px)); display: grid; gap: 14px; align-content: start; }
.drawer h2 { margin: 0; font-family: var(--f-pixel); font-weight: 400; font-size: 16px; }
.dim-today { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: center; }
.dim-today b { font-family: var(--f-num); font-weight: 400; font-size: 48px; line-height: .9; }
.dim-today .mdbar i { background: var(--c); }
.subs.big { display: grid; gap: 12px; }
.subrow { display: grid; grid-template-columns: 132px minmax(0, 1fr) 58px; gap: 4px 10px; align-items: center; }
.subrow b { font-family: var(--f-num); font-weight: 400; font-size: 21px; text-align: right; }
.subrow small { grid-column: 2 / 4; color: var(--mid); font-size: 13px; }
.feeds { display: flex; flex-wrap: wrap; gap: 6px; }
.feed { background: var(--lcd); border: 2px solid var(--ink); padding: 3px 8px; font-size: 14px; }
.feed b { font-family: var(--f-num); font-weight: 400; font-size: 17px; color: var(--good); }
.feed.neg b { color: var(--low); }
.drawer .act { grid-template-columns: 52px minmax(0, 1fr) auto; }
.drawer .act-img { width: 52px; height: 70px; }

/* workout and focus */
.wo { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; text-align: center; }
.wo-phase { font-family: var(--f-pixel); font-size: 11px; padding: 6px 12px; border: 3px solid var(--ink); background: var(--box); }
.wo-phase.work { background: var(--krop); color: var(--box); } .wo-phase.rest { background: var(--ro); color: var(--box); }
.wo-name { font-family: var(--f-pixel); font-size: clamp(18px, 4vw, 34px); line-height: 1.4; }
.wo-time { font-family: var(--f-num); font-size: clamp(120px, 26vw, 240px); line-height: .8; }
.wo-cue { max-width: 46ch; font-size: 18px; color: var(--mid); min-height: 3em; }
.wo-bar { width: min(520px, 80vw); height: 16px; border: 3px solid var(--ink); background: var(--lcd-2); overflow: hidden; }
.wo-bar i { display: block; height: 100%; background: var(--gold); transition: width 1s linear; }
.focus { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px 16px; --rs: min(300px, 70vw, 40vh); }
.f-dial { position: relative; width: var(--rs); flex-shrink: 0; }
.ring { width: 100%; display: block; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--lcd-2); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--sind); stroke-width: 12; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1s linear; }
.focus-time { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; font-family: var(--f-num); font-size: min(80px, calc(var(--rs) / 3.6)); line-height: 1; }
.focus-time small { font-family: var(--f-pixel); font-size: 8px; color: var(--mid); margin-top: 6px; }
.f-len { max-width: 100%; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; }
.f-len .seg button { padding: 5px 9px; }
.f-own { font-family: var(--f-pixel); font-size: 8px; color: var(--mid); display: flex; gap: 6px; align-items: center; }
.f-own input { width: 56px; font: 14px var(--f-num); padding: 3px 5px; border: 2px solid var(--ink); background: var(--box); text-align: right; }
.f-sound { max-width: 100%; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; align-items: center; }
.f-now { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.f-now i { font-style: normal; } .f-now small { font-family: var(--f-pixel); font-size: 7px; color: var(--mid); }
.f-lib { position: absolute; inset: 0; top: 48px; z-index: 2; display: grid; place-items: center; padding: 12px 16px; background: rgba(16,41,26,.55); }
.f-lib-box { width: min(760px, 100%); max-height: 100%; display: grid; grid-template-rows: auto auto 1fr; gap: 6px; min-height: 0; }
.f-lib-box p { margin: 0; }
.f-lib-list { overflow-y: auto; min-height: 0; display: grid; gap: 4px; align-content: start; }
.f-lib-list .label { margin-top: 6px; }
.f-scapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 5px; }
.f-scapes button { display: flex; gap: 7px; align-items: center; text-align: left; background: var(--box); border: 2px solid var(--ink); padding: 4px 7px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; min-width: 0; }
.f-scapes button span { display: grid; min-width: 0; } .f-scapes button b { font-weight: 400; }
.f-scapes button small { font-size: 12px; color: var(--mid); line-height: 1.1; }
.f-scapes button em { font-style: normal; font-family: var(--f-pixel); font-size: 7px; color: var(--gold); }
.f-scapes button i { font-style: normal; font-size: 15px; }
.f-scapes button.on { background: var(--ink); color: var(--lcd); }
.f-scapes button.locked { opacity: .65; border-style: dashed; }
.f-vol { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.f-vol input { width: 160px; accent-color: var(--sind); }
.outside { max-width: 540px; display: grid; gap: 10px; }
.apick { width: min(620px, 100%); max-height: calc(100vh - 40px); grid-template-rows: auto 1fr; }
.ap-list { overflow-y: auto; display: grid; gap: 6px; min-height: 0; }
.ap-list h3 { margin: 6px 0 0; font-family: var(--f-pixel); font-weight: 400; font-size: 10px; }
.ap-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; text-align: left; background: var(--box); border: 3px solid var(--ink); padding: 6px; cursor: pointer; font: inherit; color: inherit; }
.ap-row:hover { background: var(--lcd); }
.ap-row img, .ap-row .ap-ic { width: 64px; height: 48px; object-fit: cover; display: grid; place-items: center; font-size: 22px; }
.ap-row span { display: grid; gap: 2px; min-width: 0; }
.ap-row small { opacity: .75; }
.ap-row em { font-style: normal; font-size: 13px; opacity: .8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.outside h2 { margin: 0; font-family: var(--f-pixel); font-weight: 400; font-size: 14px; line-height: 1.5; }

/* ---------- player and toast ---------- */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; display: grid; grid-template-columns: 50px minmax(0, 1fr) 38px; gap: 12px; align-items: center;
  background: var(--bezel); color: #f6f9ec; border-top: 4px solid var(--ink);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.pbtn { width: 46px; height: 46px; border: 3px solid var(--ink); background: var(--lcd); color: var(--ink); font-size: 16px; box-shadow: 2px 2px 0 var(--ink); }
#pClose { width: 34px; height: 34px; font-size: 12px; }
.ptitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player input[type=range] { width: 100%; accent-color: var(--ro); }
.ptime { display: flex; justify-content: space-between; font-family: var(--f-num); font-size: 17px; color: #c8c6dc; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom, 0px)); background: var(--box); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 8px 14px; z-index: 60; max-width: calc(100% - 32px); }

/* ---------- help: ? markers, explanation boxes, the guided tour ---------- */
.q { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--ink); background: var(--box); font-family: var(--f-pixel); font-size: 9px; color: var(--ink); vertical-align: middle; margin-left: 6px; padding: 0; box-shadow: 1px 1px 0 var(--ink); flex: none; }
.q:hover { background: var(--ink); color: var(--lcd); }
.helpbox { position: fixed; z-index: 55; width: min(460px, calc(100vw - 32px)); background: var(--box); border: 4px solid var(--ink); box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--ink), 6px 6px 0 rgba(16,41,26,.45); padding: 16px 18px 22px; }
.helpbox h3 { margin: 0 0 6px; font-family: var(--f-pixel); font-weight: 400; font-size: 11px; line-height: 1.6; }
.helpbox p { margin: 6px 0; font-size: 16px; }
.helpbox .row { margin-top: 12px; justify-content: space-between; }
.helpbox::after { content: "▼"; position: absolute; right: 12px; bottom: 4px; font-size: 12px; animation: blink 1s steps(2) infinite; }
.tour-shade { position: fixed; z-index: 50; border: 4px solid #e2574c; box-shadow: 0 0 0 9999px rgba(16,41,26,.6); pointer-events: none; transition: all .2s; }
.help-scrim { position: fixed; inset: 0; z-index: 49; }

@media (max-width: 760px) {
  .hero, .two { grid-template-columns: minmax(0, 1fr); }
  .acts.grid2, .cats { grid-template-columns: minmax(0, 1fr); }
  .act { grid-template-columns: 54px minmax(0, 1fr); }
  .act-img { width: 54px; height: 72px; }
  .act-go { grid-column: 1 / -1; }
  .catsub { grid-template-columns: 100px minmax(0, 1fr) 40px 96px; font-size: 14px; }
  .detail-body { grid-template-columns: minmax(0, 1fr); }
  .detail-poster { max-width: 160px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .medgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-wrap { grid-template-columns: 28px minmax(0, 1fr) 28px; }
  .screenlist div { grid-template-columns: 120px minmax(0, 1fr) 56px; }
  .ep { grid-template-columns: 110px minmax(0, 1fr); }
  .subrow { grid-template-columns: 100px minmax(0, 1fr) 50px; }
  .lrow { grid-template-columns: 40px minmax(0, 1fr); }
  .lrow .chips { grid-column: 2; justify-content: flex-start; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bubble::after, .livetip::after, .helpbox::after { animation: none; } * { transition: none !important; } }

/* ===== NU: purse, energy, windows, mood, quest board, quick start ===== */
.hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hudbox { display: grid; gap: 8px; align-content: start; padding: 14px 16px; }
.tagchip { font-family: var(--f-pixel); font-size: 7px; padding: 3px 6px; border: 2px solid var(--c, var(--ink)); color: var(--c, var(--mid)); background: var(--box); line-height: 1.4; }
.coin { display: inline-block; width: 18px; height: 18px; background: radial-gradient(circle at 35% 35%, #ffe680, #d49a10 60%, #8a5a00); border: 2px solid var(--ink); border-radius: 50%; vertical-align: -3px; margin-right: 4px; }
.coins { display: flex; align-items: center; gap: 6px; }
.coins .coin { width: 28px; height: 28px; }
.coins b { font-family: var(--f-num); font-weight: 400; font-size: 48px; line-height: .8; }
.mayi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mi { background: var(--lcd); border: 2px solid var(--ink); padding: 4px 4px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); display: grid; justify-items: center; line-height: 1.2; }
.mi span { font-size: 18px; }
.mi:hover { background: var(--ink); color: var(--lcd); }
.kbars { display: grid; gap: 6px; }
.kbars > div { display: grid; grid-template-columns: 74px minmax(0, 1fr) 54px; gap: 8px; align-items: center; font-size: 14px; }
.kbars b { font-family: var(--f-num); font-weight: 400; font-size: 20px; text-align: right; }
.kres { font-family: var(--f-num); font-size: 24px; line-height: 1; }
.wins { display: grid; gap: 8px; }
.w { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border: 2px solid var(--ink); background: var(--lcd); }
.w.open { box-shadow: inset 4px 0 0 var(--low); animation: pulse 2s steps(2) infinite; }
.w.later { opacity: .75; }
.w b { font-weight: 600; font-size: 15px; display: block; line-height: 1.2; }
.w small { display: block; color: var(--mid); font-size: 13px; }
@keyframes pulse { 50% { box-shadow: inset 4px 0 0 var(--mid-st); } }
.moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.moods button { background: var(--lcd); border: 2px solid var(--ink); padding: 4px 0; display: grid; justify-items: center; font-size: 22px; line-height: 1.1; }
.moods button small { font-size: 10px; }
.moods button.on { background: var(--ink); color: var(--lcd); transform: translateY(-2px); box-shadow: 0 3px 0 var(--gold); }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.qcard { position: relative; display: grid; gap: 6px; align-content: start; background: var(--box); border: 3px solid var(--ink); box-shadow: inset 0 6px 0 var(--c), 4px 4px 0 rgba(16,41,26,.3); padding: 18px 14px 14px; }
.qcard.done { background: color-mix(in srgb, var(--gold) 14%, var(--box)); }
.qcard .tier { justify-self: start; font-family: var(--f-pixel); font-size: 8px; color: var(--box); padding: 3px 6px; border: 2px solid var(--ink); }
.qcard b { font-weight: 600; font-size: 17px; line-height: 1.25; }
.qcard small { color: var(--mid); font-size: 13px; }
.reward { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--f-num); font-size: 20px; color: var(--gold); }
.reward span { font-size: 18px; color: var(--sind); }
.reward .dim { color: var(--mid); }
.stamp { justify-self: start; font-family: var(--f-pixel); font-size: 10px; color: var(--good); border: 3px solid var(--good); padding: 4px 8px; transform: rotate(-4deg); }

.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qk { display: grid; justify-items: start; gap: 2px; text-align: left; background: var(--box); border: 3px solid var(--ink); box-shadow: inset 0 -5px 0 var(--c), 3px 3px 0 rgba(16,41,26,.3); padding: 10px 10px 14px; }
.qk:hover { transform: translate(-1px, -1px); background: var(--lcd); }
.qk:active { transform: translate(2px, 2px); box-shadow: inset 0 -5px 0 var(--c); }
.qk-ic { font-size: 26px; line-height: 1; }
.qk b { font-weight: 600; font-size: 15px; }
.qk small { color: var(--mid); font-size: 12px; }

/* dialogs from NU */
.mayi-box, .food-box, .summary { width: min(640px, 100%); display: grid; gap: 10px; max-height: calc(100vh - 40px); overflow-y: auto; }
.mayi-box h3, .food-box h3, .summary h3 { margin: 0; font-family: var(--f-pixel); font-weight: 400; font-size: 16px; line-height: 1.5; }
.foods { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.fd { display: grid; justify-items: start; gap: 1px; text-align: left; background: var(--box); border: 2px solid var(--ink); box-shadow: inset 4px 0 0 var(--c), 2px 2px 0 var(--ink); padding: 6px 8px 6px 10px; }
.fd span { font-size: 22px; } .fd b { font-weight: 600; font-size: 14px; line-height: 1.2; } .fd small { color: var(--mid); font-size: 12px; }
.fd.picked { background: var(--lcd); }
.sum-total { display: grid; justify-items: center; }
.sum-total b { font-family: var(--f-num); font-weight: 400; font-size: 84px; line-height: .9; color: var(--gold); }
.sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.sum-grid > div { border: 2px solid var(--ink); background: var(--lcd); padding: 8px 4px; display: grid; justify-items: center; }
.sum-grid b { font-family: var(--f-num); font-weight: 400; font-size: 30px; line-height: 1; }
.sum-grid small { font-size: 12px; color: var(--mid); }
.grow { width: 0; animation: grow 1.2s steps(12) forwards; }
@keyframes grow { to { width: var(--w); } }
.breath { flex: 1; display: grid; place-content: center; justify-items: center; gap: 24px; }
.bsq { width: min(260px, 60vw); aspect-ratio: 1; background: var(--ro); border: 6px solid var(--ink); box-shadow: 8px 8px 0 rgba(16,41,26,.3); transform: scale(.45); transition: transform 4s linear; }
.bword { font-family: var(--f-pixel); font-size: 18px; }
iframe.article { flex: 1; width: 100%; border: 0; background: #f2f6e4; }

/* celebrations */
.fanfare { position: fixed; inset: 0; z-index: 70; pointer-events: none; display: grid; place-items: center; }
.fanfare b { font-family: var(--f-pixel); font-size: clamp(18px, 4vw, 30px); background: var(--box); border: 4px solid var(--ink); padding: 16px 22px; box-shadow: 6px 6px 0 var(--ink); animation: pop .5s steps(5); }
.fanfare i { position: absolute; top: -10px; left: var(--x); width: 10px; height: 10px; background: var(--c); animation: fall 1.8s var(--d) steps(18) forwards; }
@keyframes pop { from { transform: scale(.2); } }
@keyframes fall { to { transform: translateY(105vh) rotate(180deg); } }
.levelup-ov { align-items: center; justify-content: center; background: rgba(16,41,26,.9); }
.levelup { display: grid; justify-items: center; gap: 14px; background: var(--box); border: 5px solid var(--ink); box-shadow: inset 0 0 0 4px var(--gold), 8px 8px 0 #000; padding: 30px 40px; text-align: center; }
.lu-title { font-family: var(--f-pixel); font-size: clamp(22px, 5vw, 36px); color: var(--gold); animation: blink .6s steps(2) 4; }
.levelup canvas { width: 176px; height: 128px; image-rendering: pixelated; border: 3px solid var(--ink); background: var(--lcd); }
.lu-lvl { font-family: var(--f-pixel); font-size: 12px; } .lu-lvl b { font-family: var(--f-num); font-weight: 400; font-size: 48px; display: block; }

@media (max-width: 1000px) { .hud { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hud, .board { grid-template-columns: minmax(0, 1fr); }
  .sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.vwrap { flex: 1; position: relative; min-height: 0; display: flex; }
.vwrap video { flex: 1; width: 100%; background: #000; }
.vmsg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #f6f9ec; text-align: center; background: rgba(0,0,0,.7); }
.ov-bar a.btn { text-decoration: none; }

/* ===== hero, story, legend ===== */
.legend-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.lg { font-family: var(--f-pixel); font-size: 8px; padding: 6px 8px; border: 2px solid var(--ink); background: var(--box); box-shadow: 2px 2px 0 rgba(16,41,26,.3); }
.lg.quest { box-shadow: inset 0 -4px 0 var(--gold), 2px 2px 0 rgba(16,41,26,.3); }
.lg.goal { box-shadow: inset 0 -4px 0 var(--good), 2px 2px 0 rgba(16,41,26,.3); }
.lg.advice { box-shadow: inset 0 -4px 0 var(--sind), 2px 2px 0 rgba(16,41,26,.3); }
.lg.now { box-shadow: inset 0 -4px 0 var(--low), 2px 2px 0 rgba(16,41,26,.3); }
.goals { border: 3px solid var(--good); background: color-mix(in srgb, var(--good) 6%, var(--box)); padding: 8px 10px; }
.statline.met span { color: var(--good); }
.cattip { background: color-mix(in srgb, var(--sind) 8%, var(--box)); border: 2px solid var(--sind); padding: 6px 8px; color: var(--ink); }
.cattip b { font-family: var(--f-pixel); font-size: 7px; color: var(--sind); font-weight: 400; margin-right: 4px; }
.livetip { box-shadow: inset 0 0 0 2px var(--lcd), inset 0 0 0 4px var(--sind); }
.qribbon { position: absolute; top: -12px; right: 10px; font-family: var(--f-pixel); font-size: 7px; background: var(--gold); color: var(--box); border: 2px solid var(--ink); padding: 3px 6px; }
.act { position: relative; }
.story { display: grid; gap: 6px; box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--gold), 4px 4px 0 rgba(16,41,26,.28); }
.story-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.story-head b { font-family: var(--f-pixel); font-weight: 400; font-size: 10px; }
.story p { margin: 0; }
.beats { display: inline-flex; gap: 4px; }
.beats i { width: 14px; height: 14px; border: 2px solid var(--ink); background: var(--lcd-2); }
.beats i.on { background: var(--gold); }
.beats i.next { background: var(--box); animation: blink 1s steps(2) infinite; }

/* creator */
.creator { width: min(900px, 100%); display: grid; gap: 12px; max-height: calc(100vh - 40px); overflow-y: auto; }
.creator h3, .storybox h3 { margin: 0; font-family: var(--f-pixel); font-weight: 400; font-size: 15px; line-height: 1.5; }
.creator-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
.creator-prev { display: grid; gap: 10px; justify-items: center; align-content: start; position: sticky; top: 0; }
.creator-prev canvas { width: 264px; height: 192px; background-image: radial-gradient(ellipse at 36% 92%, rgba(16,41,26,.25) 0 18%, transparent 19%); image-rendering: pixelated; background: var(--lcd); border: 4px solid var(--ink); box-shadow: 4px 4px 0 rgba(16,41,26,.35); }
.creator-prev input { width: 100%; text-align: center; font-family: var(--f-pixel); font-size: 12px; padding: 8px; background: var(--box); border: 3px solid var(--ink); }
.creator-opts { display: grid; gap: 10px; }
.copt { display: grid; gap: 4px; }
.sw { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 30px; height: 30px; background: var(--sw); border: 3px solid var(--ink); padding: 0; font-size: 12px; display: inline-grid; place-items: center; }
.swatch.on { outline: 3px solid var(--gold); outline-offset: 2px; }
.chipbtn { background: var(--box); border: 2px solid var(--ink); padding: 4px 8px; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); }
.chipbtn.on { background: var(--ink); color: var(--lcd); }
.locked { opacity: .45; cursor: not-allowed; box-shadow: none; }
.storybox { width: min(560px, 100%); display: grid; gap: 10px; }
.storybox p { font-size: 18px; min-height: 3em; }
.reward-line { background: var(--lcd); border: 2px solid var(--gold); padding: 6px 10px; }
.newgear { display: grid; gap: 8px; }
.ng { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 10px; align-items: center; border: 2px solid var(--ink); padding: 6px; background: var(--lcd); font-size: 22px; }
.ng b { font-size: 16px; } .ng small { grid-column: 2; font-size: 13px; color: var(--mid); }

/* adventure page */
.sheet { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: center; }
.sheet h2 { margin: 0; font-family: var(--f-pixel); font-weight: 400; font-size: 18px; }
.sheet-fig { display: grid; gap: 8px; justify-items: center; }
.sheet-fig canvas { width: 264px; height: 192px; background-image: radial-gradient(ellipse at 36% 92%, rgba(16,41,26,.25) 0 18%, transparent 19%); image-rendering: pixelated; background: var(--lcd); border: 4px solid var(--ink); }
.chapter { display: grid; gap: 8px; margin-bottom: 14px; }
.chapter.current { box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--gold), 4px 4px 0 rgba(16,41,26,.28); }
.chapter h3 { margin: 0; font-family: var(--f-pixel); font-weight: 400; font-size: 12px; }
.beatlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.beatlist li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; }
.beatlist li p { margin: 2px 0; }
.beatlist .bm { font-family: var(--f-pixel); font-size: 12px; }
.beatlist li.done .bm { color: var(--good); }
.beatlist small { color: var(--gold); }
.wardrobe { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.wslot { display: grid; gap: 6px; align-content: start; }
.witem { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 8px; }
.witem small { grid-column: 2; color: var(--mid); font-size: 12px; }
.witem.locked { cursor: default; }

/* unlockable screen palettes */
:root[data-palette="pocket"] { --lcd: #d6d6cc; --lcd-2: #bdbdb2; --box: #f2f2ea; --ink: #222226; --mid: #55555c; --soft: #9a9a92; }
:root[data-palette="solnedgang"] { --lcd: #f6dcc0; --lcd-2: #ecc29a; --box: #fff6ea; --ink: #3a1a14; --mid: #7a4630; --soft: #d89a70; }
:root[data-palette="nat"] { --lcd: #1c2a3a; --lcd-2: #2a3c50; --box: #24364a; --ink: #e8f0f8; --mid: #a8bccc; --soft: #4a6070; color-scheme: dark; }

/* the figure stays in view while you look through the choices */
.creator-prev { align-self: start; z-index: 3; }
@media (max-width: 760px) {
  .creator-grid, .sheet { grid-template-columns: minmax(0, 1fr); }
  /* on a phone: a compact bar at the top, the figure on the left, its card on the right */
  .creator-prev { position: sticky; top: -12px; background: var(--box); grid-template-columns: 112px minmax(0, 1fr); justify-items: stretch; gap: 6px 10px; padding: 6px 0; border-bottom: 3px solid var(--ink); }
  .creator-prev canvas#cPrev { width: 112px; height: 82px; grid-row: 1 / span 3; }
  .creator-prev .cturn { justify-content: flex-start; flex-wrap: nowrap; gap: 4px; }
  .creator-prev .cturn .btn { padding: 4px 7px; } .creator-prev .cturn .seg button { padding: 4px 6px; font-size: 9px; }
  .creator:not(.first) .creator-prev #cName, .creator:not(.first) .creator-prev #cRand { display: none; }
  .creator-prev #cCard { max-height: 92px; overflow-y: auto; font-size: 12px; }
  .creator-prev .icard { padding: 4px 6px; } .creator-prev .icard p { font-size: 12px; }
}

/* ===== workout with photos ===== */
.wo2 { flex: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 24px; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); min-height: 0; overflow-y: auto; align-items: center; }
.wo-stage { display: grid; gap: 12px; }
.wo-frame { position: relative; aspect-ratio: 3 / 2; border: 5px solid var(--ink); box-shadow: inset 0 0 0 4px var(--box), 8px 8px 0 rgba(16,41,26,.35); overflow: hidden; background: #222; }
.wo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wo-frame #wB { opacity: 0; transition: opacity .35s steps(4); }
.wo-badge { position: absolute; top: 12px; left: 12px; font-family: var(--f-pixel); font-size: 11px; padding: 6px 10px; border: 3px solid var(--ink); background: var(--box); }
.wo-badge.work { background: var(--krop); color: var(--box); } .wo-badge.rest { background: var(--ro); color: var(--box); }
.wo-dots { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.wo-dots i { width: 14px; height: 14px; border: 2px solid var(--ink); background: var(--lcd-2); }
.wo-dots i.on { background: var(--gold); } .wo-dots i.now { background: var(--krop); animation: blink .8s steps(2) infinite; }
.wo-side { display: grid; gap: 14px; justify-items: center; text-align: center; }
.wo-ring { position: relative; width: min(220px, 50vw); aspect-ratio: 1; }
.wo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wo-ring .rb { fill: var(--box); stroke: var(--lcd-2); stroke-width: 10; }
.wo-ring .rf { fill: none; stroke: var(--krop); stroke-width: 10; stroke-dasharray: 100; transition: stroke-dashoffset 1s linear; }
.wo-ring .rf.rest { stroke: var(--ro); }
.wo-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-num); font-weight: 400; font-size: clamp(64px, 12vw, 110px); }
.wo-next { display: grid; grid-template-columns: auto 80px auto; gap: 10px; align-items: center; min-height: 56px; }
.wo-next img { width: 80px; height: 54px; object-fit: cover; border: 2px solid var(--ink); }
.wo-next b { font-weight: 600; }
.bwrap { position: relative; display: grid; place-items: center; }
.bwrap .bword { position: absolute; color: var(--box); text-shadow: 2px 2px 0 var(--ink); }
.bsq { transition-timing-function: ease-in-out; }
@media (max-width: 760px) { .wo2 { grid-template-columns: minmax(0, 1fr); } }
.progs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.prog { display: grid; grid-template-rows: auto 1fr; text-align: left; padding: 0; background: var(--box); border: 3px solid var(--ink); box-shadow: inset 0 -6px 0 var(--c), 4px 4px 0 rgba(16,41,26,.3); overflow: hidden; }
.prog:hover { transform: translate(-2px, -2px); box-shadow: inset 0 -6px 0 var(--c), 6px 6px 0 rgba(16,41,26,.4); }
.prog-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 3px solid var(--ink); background: #222; }
.prog-img img { width: 100%; height: 100%; object-fit: cover; }
.prog-min { position: absolute; right: 10px; bottom: 8px; font-family: var(--f-num); font-size: 38px; line-height: 1; color: #fff; text-shadow: 2px 2px 0 #000; }
.prog-min small { font-size: 16px; margin-left: 2px; }
.prog-body { display: grid; gap: 4px; padding: 12px 14px 18px; justify-items: start; }
.prog-body b { font-weight: 600; font-size: 18px; }
.prog-body small { color: var(--mid); font-size: 14px; }
.prog-strip { display: flex; gap: 4px; margin: 4px 0 6px; }
.prog-strip img { width: 44px; height: 30px; object-fit: cover; border: 2px solid var(--ink); }
.bimg { background: linear-gradient(160deg, #9fe0c8, #2f7a68); display: grid; place-items: center; }
.bmini { width: 60px; height: 60px; background: var(--ro); border: 4px solid var(--ink); animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.5); } 50% { transform: scale(1.1); } }

/* audio player and audiobooks */
.player { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.pcover { width: 46px; height: 46px; object-fit: cover; border: 2px solid var(--ink); }
.pctl { display: flex; gap: 6px; align-items: center; }
.pbtn.small { width: 38px; height: 34px; font-family: var(--f-num); font-size: 16px; }
.chapters { display: grid; gap: 4px; max-height: 40vh; overflow-y: auto; margin-top: 10px; }
.chap { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; background: var(--box); border: 2px solid var(--ink); padding: 6px 8px; }
.chap span { font-family: var(--f-num); font-size: 18px; color: var(--mid); }
.chap.heard span { color: var(--good); } .chap.now { box-shadow: inset 4px 0 0 var(--gold); background: var(--lcd); }
.chap small { font-family: var(--f-num); font-size: 16px; color: var(--mid); }
@media (max-width: 760px) { .player { grid-template-columns: auto minmax(0, 1fr); } .pcover { display: none; } .player .pctl:last-child { grid-column: 1 / -1; justify-content: center; } }

/* ===== habits, chest, trophies ===== */
.habits { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .habits { grid-template-columns: minmax(0, 1fr); } }
.habit { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--box); border: 3px solid var(--ink); box-shadow: 3px 3px 0 rgba(16,41,26,.3); padding: 10px; }
.habit.done { background: color-mix(in srgb, var(--good) 10%, var(--box)); }
.hflame { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border: 3px solid var(--ink); background: var(--lcd-2); }
.hflame span { font-size: 30px; filter: grayscale(1) opacity(.4); }
.hflame b { position: absolute; bottom: -4px; right: -4px; background: var(--ink); color: var(--lcd); font-family: var(--f-num); font-weight: 400; font-size: 20px; padding: 0 5px; line-height: 1.1; }
.hflame.small span { filter: none; font-size: 26px; } .hflame.mid span { filter: none; font-size: 34px; animation: flick 1s steps(2) infinite; } .hflame.big span { filter: drop-shadow(0 0 6px #ffb040); font-size: 40px; animation: flick .6s steps(2) infinite; }
.hflame.mid, .hflame.big { background: color-mix(in srgb, #ffb040 30%, var(--lcd)); }
@keyframes flick { 50% { transform: translateY(-2px) scale(1.06); } }
.hbody { display: grid; gap: 4px; min-width: 0; }
.hbody b { font-weight: 600; }
.hbody small { color: var(--mid); font-size: 12px; }
.hdays { display: flex; gap: 2px; }
.hdays i { width: 12px; height: 12px; border: 2px solid var(--ink); background: var(--lcd-2); }
.hdays i.on { background: #e8902a; } .hdays i.saved { background: var(--sind); }
.stamp.small { font-size: 12px; padding: 2px 6px; }
.chest-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; background: var(--box); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--gold), 3px 3px 0 rgba(16,41,26,.3); padding: 10px; }
.chest-card b { font-family: var(--f-pixel); font-weight: 400; font-size: 10px; }
.chest-card small { display: block; color: var(--mid); font-size: 12px; margin: 2px 0 6px; }
.chest { width: 60px; height: 60px; display: grid; place-items: center; border: 3px solid var(--ink); background: var(--lcd-2); font-size: 32px; }
.chest.bronze { background: #e0b088; } .chest.sølv { background: #d8d8e4; } .chest.guld { background: #f4d870; animation: flick 1s steps(2) infinite; }
.ctrack { display: flex; gap: 3px; margin-top: 4px; }
.ctrack i { width: 18px; height: 14px; border: 2px solid var(--ink); background: var(--lcd-2); position: relative; }
.ctrack i.on { background: var(--gold); }
.ctrack i.b::after, .ctrack i.s::after, .ctrack i.g::after { content: ""; position: absolute; top: -7px; left: 4px; width: 6px; height: 4px; }
.ctrack i.b::after { background: #b0703a; } .ctrack i.s::after { background: #a8a8b8; } .ctrack i.g::after { background: #e0b030; }
.habitpick { display: flex; flex-wrap: wrap; gap: 8px; }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.trophy { display: grid; gap: 4px; justify-items: center; text-align: center; background: var(--box); border: 3px solid var(--ink); padding: 12px 10px; box-shadow: 3px 3px 0 rgba(16,41,26,.3); }
.trophy .sbar { width: 100%; }
.trophy b { font-weight: 600; } .trophy small { font-size: 12px; }
.medal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: radial-gradient(circle at 35% 30%, #fff8, transparent 50%), var(--m); border: 4px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.trophy:not(.won) .medal span { filter: grayscale(1) opacity(.5); }
.trophy.won .medal { animation: none; box-shadow: 0 4px 0 var(--ink), 0 0 12px var(--m); }

.cover[data-square] { aspect-ratio: 1; }
.shelf .tile:has(.cover[data-square]) { align-self: start; }

/* ===== the valley ===== */
.world-wrap { display: grid; gap: 10px; }
.world-head { display: flex; justify-content: space-between; align-items: end; gap: 10px; flex-wrap: wrap; }
.world-head b { display: block; font-family: var(--f-pixel); font-weight: 400; font-size: 12px; margin-top: 4px; }
.world-frame { position: relative; border: 5px solid var(--ink); box-shadow: inset 0 0 0 3px var(--box), 6px 6px 0 rgba(16,41,26,.35); overflow: hidden; background: #3c7a48; }
#world { display: block; width: 100%; height: auto; image-rendering: pixelated; aspect-ratio: 40 / 24; }
.world-tip { position: absolute; left: 12px; bottom: 12px; max-width: 360px; background: var(--box); border: 3px solid var(--ink); box-shadow: inset 0 0 0 2px var(--box), inset 0 0 0 4px var(--ink); padding: 10px 12px; }
.world-tip p { margin: 4px 0 0; font-size: 15px; }
.world-frame.building .world-tip { bottom: auto; top: 40px; max-width: 440px; }
.world-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.wl { background: var(--box); border: 2px solid var(--ink); padding: 4px 8px; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); display: grid; text-align: left; }
.wl small { font-size: 11px; color: var(--mid); }
.wl.locked { opacity: .7; }
.npc-talk canvas { width: 96px; height: 96px; image-rendering: pixelated; background: var(--lcd); border: 3px solid var(--ink); }
/* realm prototype */
.realm-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.rs { display: grid; background: var(--box); border: 2px solid var(--ink); padding: 4px 10px; box-shadow: 2px 2px 0 var(--ink); }
.rs b { font-family: var(--f-num); font-weight: 400; font-size: 22px; line-height: 1; }
.rs small { font-size: 11px; color: var(--mid); }
.rs.stam { margin-left: auto; background: color-mix(in srgb, var(--gold) 18%, var(--box)); }
#mini { position: absolute; right: 10px; top: 10px; width: 180px; height: 120px; border: 3px solid var(--ink); image-rendering: pixelated; cursor: crosshair; }
.costs { display: flex; flex-wrap: wrap; gap: 6px; }
.costs span { font-family: var(--f-num); font-size: 19px; border: 2px solid var(--ink); padding: 2px 8px; }
.costs .ok { background: color-mix(in srgb, var(--good) 15%, var(--box)); } .costs .short { background: color-mix(in srgb, var(--low) 12%, var(--box)); }
/* covers keep their own box: the column decides the width, the aspect ratio the height, the image only fills it */
.cover { width: 100%; max-width: 100%; height: auto; min-height: 0; align-self: start; justify-self: stretch; }
.tile { grid-template-columns: minmax(0, 1fr); }
.cover img { position: absolute; inset: 0; }
.shelf, .grid { align-items: start; }
/* treasures still hidden in Dalen */
.cover[data-locked] img { filter: grayscale(1) brightness(.45); }
.cover[data-locked]::before { content: "🔒 FIND I DALEN"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; white-space: nowrap; background: var(--ink); color: var(--gold); border: 2px solid var(--gold); font-family: var(--f-pixel); font-size: 7px; padding: 4px 5px; }
.locked-note { border: 2px dashed var(--ink); padding: 10px 12px; background: color-mix(in srgb, var(--gold) 14%, var(--box)); }
#mini { width: 180px; height: 124px; }
.chest-find .cover { box-shadow: 4px 4px 0 var(--ink); }
.yt-wrap { width: min(1200px, 94vw, calc((100vh - 110px) * 16 / 9)); display: grid; gap: 10px; margin: auto; }
.yt-wrap iframe { width: 100%; aspect-ratio: 16 / 9; border: 3px solid var(--ink); background: #000; }
.yt-bar { justify-content: space-between; background: var(--box); border: 3px solid var(--ink); padding: 8px 12px; }
.yt-setup input { font: inherit; border: 2px solid var(--ink); padding: 6px 8px; background: var(--box); }
/* battles */
.battle-ov { background: rgba(10,20,14,.92); align-items: center; justify-content: center; padding: 16px; }
.battle { width: min(820px, 100%); display: grid; gap: 10px; }
.b-scene { position: relative; border: 4px solid var(--ink); box-shadow: 6px 6px 0 rgba(0,0,0,.4); }
.b-scene canvas { display: block; width: 100%; image-rendering: pixelated; }
.b-foe, .b-me { position: absolute; background: var(--box); border: 3px solid var(--ink); padding: 6px 10px; min-width: 200px; display: grid; gap: 4px; }
.b-foe { left: 12px; top: 12px; } .b-me { right: 12px; bottom: 12px; }
.b-foe b, .b-me b { font-family: var(--f-pixel); font-size: 10px; display: flex; gap: 8px; align-items: center; }
.b-me small { font-family: var(--f-num); font-size: 17px; }
.b-bar { height: 10px; border: 2px solid var(--ink); background: #d8d8c8; } .b-bar i { display: block; height: 100%; background: #4fb04f; transition: width .4s; }
.b-bar.mp i { background: #5a8ae0; }
.b-text { background: var(--box); border: 4px solid var(--ink); padding: 14px 16px; min-height: 64px; font-family: var(--f-pixel); font-size: 12px; line-height: 1.7; cursor: pointer; }
.b-menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.b-mv { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; text-align: left; background: var(--box); border: 3px solid var(--ink); padding: 8px 10px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.b-mv span { grid-row: span 2; font-size: 22px; align-self: center; } .b-mv b { font-family: var(--f-pixel); font-size: 10px; } .b-mv small { color: var(--mid); font-size: 12px; }
.b-mv.on, .b-mv:hover:not(:disabled) { background: color-mix(in srgb, var(--gold) 30%, var(--box)); transform: translate(-1px, -1px); }
.b-mv:disabled { opacity: .4; cursor: default; }
@media (max-width: 600px) { .b-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); } .b-foe, .b-me { min-width: 140px; } }
/* the big world */
.quest-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; background: var(--ink); color: #f6f9ec; padding: 8px 12px; border: 3px solid var(--ink); }
.quest-bar b { font-family: var(--f-pixel); font-size: 10px; color: var(--gold); } .quest-bar small { margin-left: auto; color: #c8e0c0; }
.rs.hpbox b { color: #c83c30; }
#mini { width: 210px; height: 140px; }
.region-name { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); font-family: var(--f-pixel); font-size: 14px; color: #f6f9ec; text-shadow: 2px 2px 0 #10291a; opacity: 0; pointer-events: none; }
.region-name.show { animation: regionIn 3.2s ease forwards; }
@keyframes regionIn { 0% { opacity: 0; transform: translate(-50%, -8px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.dlg { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 12px; align-items: flex-start; background: var(--box); border: 4px solid var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,.35); padding: 12px 14px; cursor: pointer; }
.dlg canvas { image-rendering: pixelated; border: 2px solid var(--ink); background: var(--lcd-2); flex: none; }
.dlg b { font-family: var(--f-pixel); font-size: 10px; } .dlg p { margin: 6px 0 2px; font-size: 17px; line-height: 1.45; min-height: 50px; }
.dlg small { display: block; text-align: right; color: var(--mid); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chapter-ov { background: rgba(10,14,12,.9); align-items: center; justify-content: center; }
.chapter-card { text-align: center; color: #f6f9ec; display: grid; gap: 14px; justify-items: center; padding: 24px; animation: regionIn 0s; }
.chapter-card h2 { font-family: var(--f-pixel); font-size: 20px; color: var(--gold); line-height: 1.5; margin: 0; }
.chapter-card p { font-size: 19px; max-width: 520px; margin: 0; } .chapter-card small { color: #c8e0c0; }
.world-fade { position: absolute; inset: 0; background: #10291a; animation: fadeHome 1.2s ease; pointer-events: none; }
@keyframes fadeHome { 0% { opacity: 0; } 45%, 60% { opacity: 1; } 100% { opacity: 0; } }
/* the chronicle */
.chronicle { width: min(980px, 100%); max-height: 88vh; overflow: auto; display: grid; gap: 12px; }
.chronicle h3 { margin: 0; }
.chron-list { display: grid; gap: 6px; }
.chron-row { display: grid; gap: 2px; border: 2px solid var(--ink); padding: 8px 12px; background: var(--box); }
.chron-row b { font-family: var(--f-pixel); font-size: 10px; } .chron-row small { color: var(--mid); font-size: 15px; }
.chron-row.now { background: color-mix(in srgb, var(--gold) 22%, var(--box)); } .chron-row.later { opacity: .55; }
.chron-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.chron-unknown { display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--lcd-2), var(--lcd-2) 6px, var(--lcd) 6px, var(--lcd) 12px); }
.chron-unknown span { font-family: var(--f-pixel); font-size: 22px; color: var(--mid); }
.beasts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.beast { display: flex; gap: 10px; border: 2px solid var(--ink); padding: 8px; background: var(--box); align-items: flex-start; }
.beast canvas { image-rendering: pixelated; background: var(--lcd-2); border: 2px solid var(--ink); flex: none; }
.beast div { display: grid; gap: 3px; } .beast b { font-family: var(--f-pixel); font-size: 10px; } .beast small { font-size: 14px; }
.beast.unknown { opacity: .6; }
.quest-bar .btn { margin-left: 8px; }
.chest-find.tier-guld { border-color: #b8860b; box-shadow: 0 0 0 4px #f2c14e, 0 0 60px rgba(255,220,100,.7); animation: goldIn .6s ease; }
.chest-find.tier-sølv { box-shadow: 0 0 0 4px #b8b8c8; }
@keyframes goldIn { 0% { transform: scale(.8); opacity: 0; } 60% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
.vault-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; border: 2px solid var(--ink); background: color-mix(in srgb, var(--gold) 14%, var(--box)); padding: 8px 12px; margin: 0 0 14px; font-size: 14px; }
.vault-bar span { margin-left: auto; font-family: var(--f-pixel); font-size: 10px; }
.cover[data-locked] { cursor: pointer; }
.locked-note .btn { margin-left: 4px; }
/* spoils: what a deed wins back */
.loot { max-width: 640px; }
.loot-ov.big .loot { max-width: 940px; box-shadow: 0 0 0 4px var(--gold), 0 0 60px color-mix(in srgb, var(--gold) 60%, transparent); }
.loot-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 14px 0 16px; }
.loot-item { width: 128px; display: grid; gap: 3px; align-content: start; text-align: center; animation: lootIn .55s var(--d, 0s) both; }
.loot-item .cover { width: 128px; box-shadow: 0 0 0 3px var(--ink), 0 0 22px color-mix(in srgb, var(--gold) 70%, transparent); }
.loot-item b { font-size: 13px; line-height: 1.25; }
.loot-item small { font-size: 11px; }
@keyframes lootIn { from { opacity: 0; transform: translateY(24px) scale(.6) rotate(-4deg); } 60% { opacity: 1; transform: translateY(-6px) scale(1.06); } to { opacity: 1; transform: none; } }
/* the body */
.body-card .body-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.body-score { display: grid; justify-items: center; gap: 2px; }
.rring text { font-family: var(--f-pixel); font-size: 18px; fill: var(--ink); }
.body-main { flex: 1; min-width: 240px; }
.body-main p { margin: 0 0 8px; }
.bstats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 6px; }
.bstat { display: grid; }
.bstat b { font-size: 18px; }
.bstat small { font-size: 11px; }
.bcharts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 18px; margin-top: 10px; }
.bchart { border: 2px solid var(--soft); padding: 8px 10px; }
.spark-empty { height: 46px; display: grid; place-items: center; }
.lessons { margin-top: 12px; }
.lesson { margin: 6px 0; padding: 6px 10px; border-left: 4px solid; }
.lesson.good { border-color: #2f8a4a; } .lesson.bad { border-color: #c83c30; }
/* connect your watch */
.connect-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; margin-top: 12px; }
@media (max-width: 760px) { .connect-grid { grid-template-columns: 1fr; } }
.connect-grid h4, #connect h4 { margin: 14px 0 6px; font-family: var(--f-pixel); font-size: 11px; }
.qrbox { display: grid; gap: 8px; justify-items: center; align-content: start; }
#cQr { background: #fff; padding: 8px; border: 2px solid var(--ink); }
.qrbox .copy code { word-break: break-all; font-size: 11px; }
.hlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.hrow { display: flex; gap: 10px; border: 2px solid var(--soft); padding: 8px 10px; }
.hrow > div { display: grid; gap: 2px; }
.hrow small { font-size: 12px; }
.hmark { font-family: var(--f-pixel); font-size: 14px; width: 18px; }
.hrow.ok .hmark { color: var(--good); } .hrow.miss .hmark { color: var(--low); } .hrow.old .hmark { color: var(--mid); }
.hrow.miss { border-color: color-mix(in srgb, var(--low) 45%, transparent); }
.hfix { color: var(--ink); background: color-mix(in srgb, var(--gold) 16%, transparent); padding: 3px 6px; margin-top: 3px; }
/* here and now */
.vitals { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.vitals:empty { display: none; }
.vitals span { display: grid; line-height: 1.15; }
.vitals em { font-style: normal; font-family: var(--f-pixel); font-size: 8px; opacity: .75; }
.vitals b { font-size: 18px; }
.vitals small { font-size: 10px; opacity: .7; }
.justdid { border: 2px solid var(--ink); padding: 8px 10px; margin: 10px 0 8px; background: color-mix(in srgb, var(--good) 10%, var(--box)); display: grid; gap: 4px; }
.justdid.neg { background: color-mix(in srgb, var(--low) 10%, var(--box)); }
.justdid .fx { display: flex; flex-wrap: wrap; gap: 6px; }
.justdid .fx span { border: 2px solid var(--c, var(--ink)); padding: 2px 6px; font-weight: 700; }
.justdid .fx em { font-style: normal; font-family: var(--f-pixel); font-size: 8px; margin-right: 5px; color: var(--c, var(--ink)); }
.justdid .fx small { font-weight: 400; opacity: .7; margin-left: 3px; }
.fxlesson { opacity: .85; }
/* I dag, top: wheel and the day's account on the left, you and your goals on the right */
.hero { align-items: start; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); }
.hero-left { display: grid; gap: 10px; align-content: start; }
/* two rows: the wheel beside the hero card (same height, the four boxes at the bottom of both), then the day below */
.hero { row-gap: 12px; }
.hero > .herocard { align-self: stretch; display: grid; } .hero > .herocard .hc-in { align-content: space-between; }
.hero-wheel { align-self: stretch; display: flex; flex-direction: column; gap: 8px; border: 3px solid var(--ink); border-radius: 4px; background: var(--box); padding: 10px 10px 25px; box-shadow: 4px 4px 0 rgba(16,41,26,.28); }
.hero-wheel .wheel { width: 352px; max-width: 100%; margin: auto; }
.bw-title { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.bw-name { font-family: var(--f-pixel); font-size: 9px; text-transform: uppercase; padding-left: 1px; }
.bw-name::before, .bw-name::after { content: "◆"; color: var(--gold); margin: 0 6px; }
/* the day's account fills its row, so its box ends with the right column */
.hero > .hero-left { align-self: stretch; align-content: stretch; }
.hero-left .deeds { display: flex; flex-direction: column; } .hero-left .deeds > .linkbtn { margin-top: auto; }
/* a mentor's word right now: a full line between the two rows, gone without a gap when there is none */
.hero > #tNudge { grid-column: 1 / -1; } .hero > #tNudge:empty { display: none; }
.hero > #tFire { grid-column: 1 / -1; } .hero > #tFire:empty { display: none; }
.hero > #tThreat { grid-column: 1 / -1; } .hero > #tThreat:empty { display: none; }
.hero > #tChallenge { grid-column: 1 / -1; } .hero > #tChallenge:empty { display: none; }
.hero > #tDuel { grid-column: 1 / -1; } .hero > #tDuel:empty { display: none; }
.duel-icon { font-size: 34px; line-height: 60px; color: var(--c); } .duel-bar { opacity: .75; } .duel-bar.me { opacity: 1; }
.duel-pick { display: grid; gap: 8px; padding: 10px 12px; border: 3px solid var(--ink); background: var(--box); box-shadow: 3px 3px 0 rgba(16,41,26,.3); } .duel-pick .fire-chips { margin: 0; }
.ch .thr-pic canvas { object-fit: contain; } .ch-won .thr-pic canvas { transform: translateY(-4px); }

/* what the mentor suggests: its cover or icon, the title and what pressing it does */
.nd-go { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; text-align: left; background: var(--box); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); padding: 4px 8px 4px 4px; font: inherit; color: var(--ink); cursor: pointer; }
.nd-go:hover { background: var(--lcd); } .nd-go:active { transform: translate(2px, 2px); box-shadow: none; }
.nd-go .bq-cover { width: 40px; height: 56px; } .nd-go .bq-cover i { font-size: 20px; }
.nd-go b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.2; }
.nd-go small { display: block; margin-top: 4px; font-family: var(--f-pixel); font-size: 8px; color: var(--c); }
/* a question from a mentor: the answers as buttons, or your own words */
.nd-kind { font-family: var(--f-pixel); font-size: 7px; background: var(--c); color: #f6f9ec; padding: 2px 4px 1px 5px; vertical-align: 1px; }
.nd-ans { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nd-ans button { font: inherit; font-size: 14px; color: var(--ink); background: var(--box); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); padding: 3px 10px; cursor: pointer; }
.nd-ans button:hover { background: var(--lcd); } .nd-ans button:active { transform: translate(2px, 2px); box-shadow: none; }
.nd-ans button.own { border-style: dashed; box-shadow: none; color: var(--mid); }
.nd-own { display: flex; gap: 6px; margin-top: 8px; } .nd-own[hidden] { display: none; }
.nd-own input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 4px 8px; border: 2px solid var(--ink); background: var(--box); color: var(--ink); }

.hero-side { align-content: start; }
.legend-bar .linkbtn { margin-left: auto; }
.deeds { border: 3px solid var(--ink); background: var(--box); padding: 8px 10px; display: grid; gap: 6px; }
.deedlist { display: grid; }
.deed { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--soft); font-size: 14px; }
.deed small { opacity: .65; font-variant-numeric: tabular-nums; }
.deed > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfx { display: flex; gap: 4px; }
.dfx i { font-style: normal; font-family: var(--f-pixel); font-size: 8px; padding: 3px 5px; border: 2px solid var(--c); color: var(--c); background: var(--box); white-space: nowrap; }
.justdid { margin: 0; }
/* quest cards: the button sits at the bottom whatever the title length */
.qcard { grid-template-rows: auto auto auto auto auto 1fr; }
.qcard > .btn, .qcard > .stamp { align-self: end; }
.hud { align-items: start; }
/* four coaches: one row when there is room, otherwise two by two, never three and one */
.coachrow, .coachgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .coachrow, .coachgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .coachrow, .coachgrid { grid-template-columns: minmax(0, 1fr); } }
/* the character sheet: figure and name on top, four equal readings across the bottom */
.pc-lvl { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.pc-lvl .lvl-badge { min-width: 46px; height: 46px; }
.pc-lvl .lvl-badge b { font-size: 26px; }
.pc-xp { flex: 1; display: grid; gap: 3px; }
.pc-xp small { font-size: 11px; opacity: .8; }
.pc-xp small b { display: inline; font-family: var(--f-num); font-size: 15px; }
.vt { display: grid; gap: 1px; border: 2px solid var(--ink); background: var(--lcd); padding: 5px 8px 6px; box-shadow: 2px 2px 0 rgba(16,41,26,.25); }
.vt em { font-style: normal; font-family: var(--f-pixel); font-size: 8px; opacity: .8; white-space: nowrap; }
.vt b { font-family: var(--f-num); font-size: 26px; font-weight: 400; line-height: 1; }
.vt small { font-size: 10px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* each reading has its own colour stripe; the number turns green, amber or red by how it stands today */
.vt { --vc: var(--ink); border-left: 6px solid var(--vc); background: color-mix(in srgb, var(--vc) 9%, var(--lcd)); }
.vt em { color: var(--vc); opacity: 1; }
.vt-energi { --vc: #c88a10; } .vt-puls { --vc: #c8344a; } .vt-hrv { --vc: #2a7fb0; } .vt-hvile { --vc: #b0457a; } .vt-soevn { --vc: #6a4fc0; } .vt-skridt { --vc: #3f8f3f; }
.vt.is-good b { color: var(--good); } .vt.is-mid b { color: #b07a10; } .vt.is-low b { color: var(--low); }
.diag { border: 2px dashed var(--ink); padding: 8px 12px; margin: 12px 0 4px; font-size: 13px; background: color-mix(in srgb, var(--gold) 10%, var(--box)); }
.diag p { margin: 6px 0 0; }
.qrbox { min-width: 0; }
.qrbox .copy { display: grid; gap: 6px; width: 100%; }
.qrbox .copy code { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
/* food: search, choose an amount, log */
.food-box { max-width: 760px; }
.fsearch { display: flex; gap: 8px; margin: 10px 0 8px; }
.fsearch input { flex: 1; font-size: 16px; padding: 8px 10px; }
.fres { display: grid; gap: 4px; max-height: 300px; overflow: auto; }
.frow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; background: var(--box); border: 2px solid var(--soft); padding: 7px 10px; cursor: pointer; font: inherit; }
.frow:hover { border-color: var(--ink); }
.frow i { width: 10px; height: 10px; background: var(--c); border: 1px solid var(--ink); }
.frow small { opacity: .7; white-space: nowrap; }
.fscan { position: relative; display: grid; gap: 6px; justify-items: center; border: 3px solid var(--ink); background: #111; padding: 6px; margin-bottom: 8px; }
.fscan video { width: 100%; max-height: 38vh; object-fit: cover; display: block; }
.fscan video.mirror { transform: scaleX(-1); }
.fscan i { position: absolute; left: 12%; right: 12%; top: calc(6px + min(19vh, 25%)); height: 2px; background: #e33; box-shadow: 0 0 6px #e33; pointer-events: none; }
.fscan p { color: #eee; margin: 0; text-align: center; }
.fchosen { display: grid; gap: 8px; border: 3px solid var(--ink); box-shadow: inset 6px 0 0 var(--c); padding: 10px 12px 10px 18px; margin-bottom: 8px; background: var(--lcd); }
.fchosen small { display: block; opacity: .75; }
.fstar { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink); padding: 0 4px; align-self: flex-start; }
.fstar.on { color: #c88a10; }
.ffav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.ffav:empty { display: none; }
.famount { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.famount input { width: 80px; font-size: 18px; text-align: right; padding: 4px 6px; }
.fparse { display: grid; gap: 6px; }
.fpl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 70px 16px 70px; gap: 8px; align-items: center; border-bottom: 1px dashed var(--soft); padding: 4px 0; }
.fpl input { width: 70px; text-align: right; }
.ftoday { margin: 12px 0; border-top: 3px solid var(--ink); padding-top: 8px; }
.flog { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.flog span { border: 2px solid var(--soft); padding: 3px 8px; font-size: 13px; }
.fpresets summary { cursor: pointer; margin: 6px 0; }
.vt-kcal { --vc: #2f8a6a; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.vt-kcal:hover { box-shadow: 3px 3px 0 rgba(16,41,26,.45); }
/* yoga videos: the YouTube picture is wide, so it gets a wide frame */
.yt-progs { margin-top: 10px; }
.yt-img { aspect-ratio: 16 / 9; height: auto; }
.yt-img img { width: 100%; height: 100%; object-fit: cover; }
.yt-body .seg { margin-top: 4px; }
/* what you have won back: a calm gold frame so it stands apart from the rest of the library */
.opened { border: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--box)); padding: 10px 12px 4px; margin-bottom: 16px; }
.opened .shelf-h { margin-top: 0; }
.opened-row .label { margin: 6px 0 2px; }
.vault-bar { display: block; overflow: hidden; }
.vault-bar span { float: right; margin-left: 12px; }
/* the journal */
.journal-box { max-width: 720px; display: grid; gap: 12px; }
.jq { display: grid; gap: 6px; }
.jq textarea { width: 100%; font: inherit; font-size: 15px; padding: 8px 10px; border: 2px solid var(--ink); background: var(--box); resize: vertical; }
.jmoods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.jmood { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border: 2px solid var(--soft); background: var(--box); cursor: pointer; font: inherit; }
.jmood span { font-size: 26px; } .jmood small { font-size: 11px; }
.jmood.on { border-color: var(--ink); background: color-mix(in srgb, var(--gold) 25%, var(--box)); box-shadow: 2px 2px 0 rgba(16,41,26,.35); }
.jchips { display: flex; flex-wrap: wrap; gap: 6px; }
.jchip { border: 2px solid var(--soft); background: var(--box); padding: 5px 9px; cursor: pointer; font: inherit; font-size: 14px; }
.jchip small { opacity: .65; }
.jchip.on { background: var(--ink); color: var(--lcd); border-color: var(--ink); }
.jchip.on::before { content: "✓ "; }
[data-gave].on { border-color: var(--good); background: color-mix(in srgb, var(--good) 18%, var(--box)); }
[data-drained].on { border-color: var(--low); background: color-mix(in srgb, var(--low) 15%, var(--box)); }
.jquestion { font-size: 17px; font-weight: 600; margin: 0; }
.jq summary { cursor: pointer; }
.jcard { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 3px solid var(--ink); background: color-mix(in srgb, var(--gold) 12%, var(--box)); padding: 10px 14px; box-shadow: 4px 4px 0 rgba(16,41,26,.3); margin-bottom: 16px; }
.jcard > span { font-size: 28px; }
.jcard small { display: block; opacity: .8; }
.jcard.done { background: color-mix(in srgb, var(--good) 10%, var(--box)); }
.journal .jcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 10px 0; }
.jtallies { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.jtally { border: 2px solid var(--soft); padding: 3px 8px; font-size: 13px; }
.jtally.up { border-color: var(--good); } .jtally.down { border-color: var(--low); }
.jpat p, .jback p { margin: 6px 0; }
.jback { border-top: 2px dashed var(--soft); margin-top: 10px; padding-top: 6px; font-size: 14px; }
.jtoday p { margin: 6px 0; }
@media (max-width: 640px) { .journal .jcols { grid-template-columns: minmax(0, 1fr); } }
/* eight numbers: two rows of four, never six and two */
.bigstats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .bigstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* a coach stepping in */
.nudge { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: start; border: 3px solid var(--ink); box-shadow: inset 6px 0 0 var(--c), 3px 3px 0 rgba(16,41,26,.3); background: var(--box); padding: 8px 12px 8px 16px; margin: 0; }
.nudge canvas { width: 52px; height: 52px; image-rendering: pixelated; border: 2px solid var(--ink); background: var(--lcd); }
.nudge .label { color: var(--c); }
.nudge p { margin: 4px 0 0; font-size: 15px; }
.nudge .row { gap: 12px; align-items: center; }
.nd-snooze { background: none; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); padding: 3px 6px 2px; font-family: var(--f-pixel); font-size: 8px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.nd-snooze:hover { background: var(--lcd); } .nd-snooze:active { transform: translate(2px, 2px); box-shadow: none; }
.bcharts { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
@media (max-width: 760px) { .bcharts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rhythm { display: grid; gap: 4px; margin-top: 8px; }
.rrow { display: grid; grid-template-columns: 110px minmax(0, 1fr) 130px; gap: 10px; align-items: center; }
.rrow b { font-size: 14px; } .rrow small { font-size: 12px; opacity: .75; }
.rcells { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.rcells i { height: 16px; border-radius: 1px; }
.rhead .rcells span { font-size: 10px; opacity: .6; }
.trophy { min-width: 0; }
.trophy b { font-size: 14px; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
/* the ten readings in Dalen: one row when wide, two rows of five otherwise, never nine and one */
.realm-bar { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.realm-bar .rs { min-width: 0; }
.realm-bar .rs small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1400px) { .realm-bar { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 640px) { .realm-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the character sheet */
.csheet { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.csheet .sheet-fig { display: grid; gap: 6px; justify-items: center; }
.csheet .sheet-fig canvas { width: 140px; height: 102px; image-rendering: pixelated; background: var(--lcd); border: 3px solid var(--ink); }
.csheet-main { display: grid; gap: 10px; }
.cs-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cs-name h2 { margin: 0; }
.cs-name select { font: inherit; font-size: 13px; padding: 4px 6px; border: 2px solid var(--ink); background: var(--box); }
.dimlvls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dimlvl { border: 2px solid var(--ink); border-left: 6px solid var(--c); background: color-mix(in srgb, var(--c) 7%, var(--box)); padding: 7px 9px; display: grid; gap: 4px; }
.dimlvl b { font-family: var(--f-pixel); font-size: 9px; color: var(--c); }
.dl-badge { font-family: var(--f-pixel); font-size: 9px; background: var(--c); color: #fff; padding: 2px 5px; }
.dimlvl small { font-size: 11px; opacity: .8; }
.dl-next b { font-family: inherit; font-size: inherit; color: inherit; }
.cs-push { margin: 16px 0; align-items: stretch; }
.challenge { border-left: 6px solid var(--c); display: grid; gap: 6px; align-content: start; }
.challenge h3 { margin: 2px 0 0; }
.challenge p { margin: 0; }
.challenge .reward { font-family: var(--f-pixel); font-size: 9px; }
.challenge.done { background: color-mix(in srgb, var(--good) 10%, var(--box)); }
.near { display: grid; gap: 8px; align-content: start; }
.nearrow { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 8px; align-items: center; }
.nearrow .ni { font-size: 22px; text-align: center; }
.nearrow small { font-size: 12px; opacity: .8; }
.talents { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tcol { display: grid; gap: 6px; align-content: start; border-top: 6px solid var(--c); }
.talent { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: start; opacity: .55; }
.talent.open { opacity: 1; }
.talent .tlv { font-family: var(--f-pixel); font-size: 9px; border: 2px solid var(--c); color: var(--c); text-align: center; padding: 3px 0; }
.talent.open .tlv { background: var(--c); color: #fff; }
.talent b { font-size: 14px; } .talent small { display: block; font-size: 12px; }
.latest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.lchip { border: 2px solid var(--m); padding: 2px 8px; font-size: 13px; background: color-mix(in srgb, var(--m) 15%, var(--box)); }
.achv.secret .medal span { filter: none; font-family: var(--f-pixel); }
.wardrobe-box summary { cursor: pointer; }
.wardrobe-box .wardrobe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.wslot { display: grid; gap: 4px; align-content: start; }
.witem { font-size: 13px; } .witem.locked { opacity: .6; } .witem small { display: block; font-size: 11px; }
.medal.small { width: 34px; height: 34px; }
@media (max-width: 760px) { .dimlvls, .talents { grid-template-columns: repeat(2, minmax(0, 1fr)); } .csheet { grid-template-columns: minmax(0, 1fr); } }
/* maps */
.rmap { width: 100%; height: 180px; border: 2px solid var(--ink); background: var(--lcd); overflow: hidden; }
.allmap { height: 360px; border: 2px solid var(--ink); margin-top: 8px; }
.leaflet-container { font-family: var(--f-text); }
/* maps stay below the sticky menu */
.rmap, .allmap { position: relative; z-index: 0; isolation: isolate; }
/* pages for what you did */
.detail-page { max-width: 760px; display: grid; gap: 10px; }
.detail-page h2 { margin: 0; }
.dstats { display: flex; flex-wrap: wrap; gap: 8px; }
.dstat { display: grid; border: 2px solid var(--ink); background: var(--lcd); padding: 6px 10px; min-width: 110px; }
.dstat small { font-size: 11px; } .dstat b { font-family: var(--f-num); font-size: 22px; font-weight: 400; }
.hrchart { width: 100%; height: auto; } .hrchart text { font-size: 11px; fill: var(--ink); opacity: .6; }
.zones { display: flex; gap: 2px; } .zones div { background: color-mix(in srgb, var(--c) 25%, var(--box)); border-top: 4px solid var(--c); padding: 3px 6px; display: grid; min-width: 0; }
.zones b { font-size: 13px; } .zones small { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.splits { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.splits div { border: 2px solid var(--soft); padding: 4px 8px; display: grid; } .splits span { font-family: var(--f-num); font-size: 18px; }
.dpts { display: flex; gap: 6px; } .dpts span { border: 2px solid var(--c); color: var(--c); font-family: var(--f-pixel); font-size: 9px; padding: 4px 6px; }
.rmap.big { height: 260px; }
.trow { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: start; }
.tcover { width: 120px; }
.stars { display: flex; gap: 4px; } .stars button { font-size: 26px; background: none; border: 0; cursor: pointer; color: var(--soft); padding: 0 2px; } .stars button.on { color: #e0b030; }
.detail-page textarea { width: 100%; font: inherit; padding: 8px; border: 2px solid var(--ink); background: var(--box); }
.tlist { display: grid; max-height: 220px; overflow: auto; } .tlist button { display: grid; grid-template-columns: 130px minmax(0, 1fr) 70px; gap: 8px; text-align: left; font: inherit; font-size: 13px; background: none; border: 0; border-bottom: 1px dashed var(--soft); padding: 5px 0; cursor: pointer; }
.deed[data-aid], .route[data-aid], [data-tkey], .justdid[data-aid] { cursor: pointer; }
.deed[data-aid]:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
/* discoveries */
.disc { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; border: 3px solid var(--ink); border-left: 6px solid var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 7%, var(--box)); padding: 10px 12px; }
.disc canvas { width: 52px; height: 52px; image-rendering: pixelated; border: 2px solid var(--ink); background: var(--lcd); }
.disc .label { color: var(--c); } .disc b { display: block; font-size: 15px; margin: 2px 0; } .disc p { margin: 2px 0 0; font-size: 13px; }
.disc.wait { grid-template-columns: 1fr; }
#tDisc { display: grid; gap: 4px; margin-top: 10px; }
.discs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.dwait { display: flex; flex-wrap: wrap; gap: 6px; } .dwait span { border: 2px dashed var(--soft); padding: 4px 8px; font-size: 13px; }
@media (max-width: 760px) { .discs { grid-template-columns: minmax(0, 1fr); } .trow { grid-template-columns: 1fr; } }
.discs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.discs > .disc:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 760px) { .discs { grid-template-columns: minmax(0, 1fr); } }

.vt-stale { grid-column: 1 / -1; margin: 0; font-size: 11px; opacity: .8; }

/* weight beside the character's name */
/* the hero card on I dag: a gold collector's card with your figure standing in Dalen's grass */
.herocard { position: relative; background: var(--gold); border: 3px solid var(--ink); border-radius: 8px; padding: 8px; box-shadow: 4px 4px 0 rgba(16,41,26,.28); }
.herocard::before { content: ""; position: absolute; inset: 2px; pointer-events: none; background: linear-gradient(var(--ink), var(--ink)) 0 0 / 8px 8px no-repeat, linear-gradient(var(--ink), var(--ink)) 100% 0 / 8px 8px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 100% / 8px 8px no-repeat, linear-gradient(var(--ink), var(--ink)) 100% 100% / 8px 8px no-repeat; }
.hc-in { background: var(--box); border: 3px solid var(--ink); border-radius: 4px; padding: 8px 10px 14px; display: grid; gap: 8px; }
.hc-head { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.hc-who { display: grid; gap: 2px; min-width: 0; }
.hc-name { display: flex; align-items: center; gap: 8px; }
.hc-name b { font-family: var(--f-pixel); font-size: 13px; font-weight: 400; line-height: 1.3; white-space: nowrap; }
.hc-who .cls { font-family: var(--f-pixel); font-size: 8px; color: var(--gold); }
/* the level on a shield; the pixel font sits on its 8 px grid and leaves a blank column on the right, hence the nudges */
.lv-shield { position: relative; flex: none; width: 58px; height: 68px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%); font-family: var(--f-pixel); color: var(--box); }
.lv-shield::before { content: ""; position: absolute; inset: 4px 4px 5px; background: var(--gold); clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%); }
.lv-shield > span { position: absolute; left: 0; right: 0; top: 11px; display: grid; gap: 4px; justify-items: center; line-height: 1; }
.lv-shield small { font-size: 8px; line-height: 8px; transform: translateX(.5px); }
.lv-shield b { font-size: 24px; line-height: 24px; font-weight: 400; transform: translateX(1.5px);
  text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink); }
.lv-shield b.two { font-size: 16px; line-height: 24px; transform: translateX(1px); }
.hc-scene { position: relative; height: 130px; border: 3px solid var(--ink); overflow: hidden; background: #8a8a3a; }
.hc-ground { position: absolute; left: 0; top: 0; width: 640px; height: 130px; image-rendering: pixelated; }
.hc-shadow { position: absolute; left: 50%; bottom: 10px; width: 60px; height: 12px; transform: translateX(-50%); background: rgba(16,41,26,.35); border-radius: 50%; }
#heroSprite { position: absolute; left: 50%; bottom: 4px; width: auto; height: 128px; transform: translateX(-50%); image-rendering: pixelated; }
.hc-edit { position: absolute; left: 8px; top: 8px; background: var(--box); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); font-family: var(--f-pixel); font-size: 8px; padding: 5px 7px; }
/* today's EXP as a gold seal; the light ring fills towards yesterday's total and never turns red */
.hc-seal { position: absolute; right: 12px; top: 8px; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  background: conic-gradient(#f0c060 0 var(--f), var(--gold) var(--f) 100%); color: var(--box); text-align: center; }
.hc-seal > div { width: 66px; height: 66px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); display: grid; place-content: center; gap: 4px; }
.hc-seal b { font-family: var(--f-num); font-size: 28px; font-weight: 400; line-height: .8; }
.hc-seal small { font-family: var(--f-pixel); font-size: 8px; }
.hc-seal.beat > div { background: #c8860a; box-shadow: inset 0 0 0 2px #ffe08a; }
.hc-yd { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); background: var(--ink); color: var(--lcd); font-family: var(--f-num); font-size: 15px; line-height: 1.2; padding: 0 6px; white-space: nowrap; }
.hc-ribbon { justify-self: center; margin-top: -24px; position: relative; background: var(--krop); color: #fff; font-family: var(--f-pixel); font-size: 9px; padding: 5px 14px; border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); max-width: 90%; text-align: center; }
.hc-xp { display: flex; align-items: center; gap: 8px; }
.hc-xp .label { color: var(--gold); }
.hc-xp .xpbar { flex: 1; height: 18px; }
.hc-xp .xpbar i.td { background: #f0c060; animation: hc-td 1.2s steps(2) infinite; }
@keyframes hc-td { 50% { background: #ffe08a; } }
.hc-sub { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: -2px; }
.hc-sub small { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.hc-sub b { font-family: var(--f-num); font-size: 17px; font-weight: 400; }
.hc-sub .balance-pill { font-size: 8px; padding: 2px 4px; }
.herocard .vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.herocard .vt { position: relative; }
.vt-tr { position: absolute; right: -3px; bottom: -9px; background: var(--box); border: 2px solid currentColor; padding: 0 3px; font-style: normal; font-family: var(--f-num); font-size: 13px; line-height: 11px; white-space: nowrap; }
.vt-tr.good { color: var(--good); } .vt-tr.bad { color: var(--low); }
@media (max-width: 520px) { .herocard .vitals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hc-seal { transform: scale(.85); transform-origin: top right; } }
@media (prefers-reduced-motion: reduce) { .hc-xp .xpbar i.td { animation: none; } }
.pc-wt { margin-left: auto; display: inline-flex; align-items: baseline; gap: 4px; flex-wrap: nowrap; border: 0; background: none; padding: 0 2px; font: inherit; color: var(--ink); cursor: pointer; white-space: nowrap; font-size: 12px; line-height: 1; }
.pc-wt > * { display: inline; margin: 0; }
.pc-wt b { font-family: var(--f-num); font-size: 22px; font-weight: 400; }
.pc-wt i { font-style: normal; font-family: var(--f-num); font-size: 19px; }
.pc-wt i.down { color: #2f8a4a; } .pc-wt i.up { color: #b8342c; }
.pc-wt small { opacity: .6; }
.pc-wt:hover { text-decoration: underline; }
.wt-box { display: grid; gap: 10px; width: min(320px, calc(100vw - 32px)); }
.wt-box input { width: 120px; font-family: var(--f-num); font-size: 24px; padding: 4px 8px; border: 2px solid var(--ink); background: var(--lcd); }
.wt-err { color: #b8342c; }

/* goals: the wheel note, today's box and the area pop-up */
.gw-note { display: grid; gap: 1px; font-size: 13px; }
.gw-low { color: #b8342c; } .gw-good { color: #2f8a4a; } .gw-lag { color: #a86a00; }
.gtoday { border: 3px solid var(--ink); background: var(--box); padding: 8px 10px; display: grid; gap: 6px; }
.gt-head { margin: 0; font-size: 15px; font-weight: 700; }
.gt-head.st-good { color: #2f8a4a; } .gt-head.st-mid { color: #a86a00; } .gt-head.st-low { color: #b8342c; }
.gt-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.gt-grid > .gt { flex: 1 1 calc(33.3% - 6px); min-width: 0; }
.gt { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; align-items: center; text-align: left; padding: 4px 6px; border: 2px solid var(--ink); font: inherit; color: var(--ink); cursor: pointer;
  background: linear-gradient(90deg, color-mix(in srgb, #c88a10 22%, var(--box)) var(--p, 0%), var(--box) var(--p, 0%)); }
.gt > span { grid-row: span 2; font-size: 16px; }
.gt b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt small { font-size: 10px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt.gt-over { border-color: #b8342c; background: color-mix(in srgb, #b8342c 12%, var(--box)); }
.gt.gt-over b, .gt.gt-over small { color: #b8342c; opacity: 1; }
.gt-done { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.gt-done .label { margin-right: 2px; }
.gt-ic { border: 2px solid #2f8a4a; background: color-mix(in srgb, #2f8a4a 12%, var(--box)); padding: 0 3px; font-size: 13px; cursor: pointer; line-height: 1.2; }
.gt-ic.dim { border-color: var(--soft); background: var(--box); opacity: .7; }
.area-box { width: min(440px, calc(100vw - 32px)); display: grid; gap: 6px; }
.area-box p { margin: 0; }
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ab-grid div { border: 2px solid var(--ink); background: var(--lcd); padding: 6px 8px; display: grid; }
.ab-grid b { font-family: var(--f-num); font-size: 22px; font-weight: 400; }
.ab-grid b.st-good { color: #2f8a4a; } .ab-grid b.st-mid { color: #a86a00; } .ab-grid b.st-low { color: #b8342c; }
.goals-box { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; display: grid; gap: 4px; }
.gq-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.gq-row label { display: grid; gap: 2px; font-size: 12px; }
.gq-row input, .gq-row select { width: 100%; font: inherit; padding: 4px 6px; border: 2px solid var(--ink); background: var(--lcd); }
.gq-err { color: #b8342c; }
@media (max-width: 760px) { .gq-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gt-grid > .gt { flex-basis: calc(50% - 6px); } }

/* the four categories under the wheel */
.bw-dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bw-dim { position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr; padding: 0; border: 2px solid var(--ink); background: color-mix(in srgb, var(--c) 9%, var(--lcd)); box-shadow: 2px 2px 0 rgba(16,41,26,.25); font: inherit; color: var(--ink); cursor: pointer; text-align: center; }
.bw-dim b { font-family: var(--f-pixel); font-size: 8px; font-weight: 400; background: var(--c); color: #f6f9ec; padding: 4px 0 3px 1px; border-bottom: 2px solid var(--ink); }
.bw-dim span { font-family: var(--f-num); font-size: 26px; line-height: 1; display: block; padding: 8px 0 10px; }
.bw-dim .up { font-style: normal; color: #2f8a4a; } .bw-dim .dn { font-style: normal; color: #b8342c; }
/* the bar at the bottom: the category out of 100, in its state colour */
.bw-dim::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p); background: #2f8a4a; }
.bw-dim.st-mid::after { background: #c88a10; } .bw-dim.st-low::after { background: #b8342c; }

/* pop-ups behind the vitals */
button.vt { font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.vt-pop { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; display: grid; gap: 8px; }
.vt-pop p { margin: 0; }
.vp-big { font-family: var(--f-num); font-size: 56px; line-height: 1; } .vp-big small { font-size: 20px; opacity: .6; }
.vp-big.st-good { color: #2f8a4a; } .vp-big.st-mid { color: #a86a00; } .vp-big.st-low { color: #b8342c; }
.vp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.vp-cell { border: 2px solid var(--ink); background: var(--lcd); padding: 5px 8px; display: grid; }
.vp-cell b { font-family: var(--f-num); font-size: 24px; font-weight: 400; line-height: 1.1; }
.vp-cell b.st-good { color: #2f8a4a; } .vp-cell b.st-low { color: #b8342c; }
.vp-cell small { font-size: 10px; }
.vp-bars { position: relative; display: flex; align-items: flex-end; justify-content: flex-end; gap: 3px; height: 90px; border-bottom: 2px solid var(--ink); padding-top: 4px; }
.vp-bars span { flex: 1; max-width: 32px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.vp-bars i { width: 100%; background: #3c6648; } .vp-bars i.ok { background: #2f8a4a; } .vp-bars i.no { background: #c88a10; } .vp-bars i.none { background: transparent; }
.vp-bars small { font-size: 9px; opacity: .6; margin-top: 2px; position: absolute; bottom: -14px; }
.vp-bars span { position: relative; }
.vp-goal { position: absolute; left: 0; right: 0; border-top: 2px dashed #10291a; opacity: .5; }
.vt-pop .label + .vp-bars { margin-bottom: 14px; }
.vp-stages { display: flex; height: 16px; border: 2px solid var(--ink); }
.vp-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.vp-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--c); margin-right: 4px; }
.fburn { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
.fburn span { border: 2px solid var(--soft); padding: 3px 6px; display: grid; } .fburn small { font-size: 10px; opacity: .7; } .fburn b { font-family: var(--f-num); font-size: 20px; font-weight: 400; }
.fburn b.st-good { color: #2f8a4a; } .fburn b.st-low { color: #b8342c; }
.vp-bars em { font-style: normal; font-size: 10px; white-space: nowrap; margin-bottom: 2px; }

/* area pop-up: start something, a coach's suggestion */
.ab-starts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ab-starts .label { grid-column: 1 / -1; }
.ab-start { display: grid; text-align: left; padding: 6px 8px; border: 2px solid var(--ink); background: var(--box); font: inherit; color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 rgba(16,41,26,.25); }
.ab-start:hover { background: var(--lcd); }
.ab-start b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ab-start small { font-size: 11px; opacity: .7; }
.ab-starts > .ab-start:last-child:nth-child(even) { grid-column: 1 / -1; }
.ab-sugg { border: 2px dashed #2c64b0; padding: 6px 8px; display: grid; gap: 4px; }
/* building goals */
.gq-steps { display: flex; gap: 4px; margin: 4px 0 8px; }
.gq-steps button { flex: 1; font: inherit; font-size: 12px; padding: 4px; border: 2px solid var(--ink); background: var(--box); cursor: pointer; color: var(--ink); }
.gq-steps button.on { background: var(--ink); color: var(--lcd); }
.gl-table { display: grid; gap: 2px; }
.gl-dim { font-family: var(--f-pixel); font-size: 9px; margin-top: 8px; opacity: .7; }
.gl-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; grid-template-areas: "name now in" "name rec in"; column-gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--soft); }
.gl-name { grid-area: name; font-size: 14px; } .gl-now { grid-area: now; font-size: 11px; } .gl-rec { grid-area: rec; font-size: 11px; opacity: .65; }
.gl-in { grid-area: in; font-size: 13px; white-space: nowrap; }
.gl-in input { width: 60px; font: inherit; padding: 2px 4px; border: 2px solid var(--ink); background: var(--lcd); text-align: right; }
.gl-in select { font: inherit; border: 2px solid var(--ink); background: var(--lcd); }
@media (max-width: 760px) { .gl-row { grid-template-columns: 1fr; grid-template-areas: "name" "now" "in" "rec"; } }
.pc-today { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pc-today .balance-pill { font-size: 8px; padding: 2px 4px; }
.pc-today .q { transform: scale(.8); }
.g-sub.g-reach { border-color: #2f8a4a; color: #2f8a4a; }
.fx .fxgoal { --c: #3c6648; } .fx .fxgoal.ok { --c: #2f8a4a; } .fx .fxgoal.bad { --c: #b8342c; }
.gn-move { border-left: 5px solid #2f8a4a; padding: 2px 8px; } .gn-move.ned { border-left-color: #c88a10; }
.gn-move p { margin: 2px 0 0; } .gn-move s { opacity: .6; }
.gn-list { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.gn-row { display: inline-flex; gap: 6px; align-items: baseline; border: 2px solid var(--soft); padding: 2px 6px; }
.gn-row.good { border-color: #2f8a4a; } .gn-row.low { border-color: #b8342c; } .gn-row.mid { border-color: #c88a10; }
.gn-row small { opacity: .7; }
/* the phone page: big buttons for logging */
.mlog .top { flex-wrap: nowrap; }
.mlog-full { margin-left: auto; color: var(--lcd); }
.mlog-head { margin: 10px 0; font-size: 14px; }
.mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mbtn { display: grid; justify-items: start; gap: 2px; padding: 12px; border: 3px solid var(--ink); background: var(--box); font: inherit; color: var(--ink); text-align: left; cursor: pointer; box-shadow: 3px 3px 0 rgba(16,41,26,.3); min-height: 84px; }
.mbtn span { font-size: 26px; line-height: 1; } .mbtn b { font-size: 16px; } .mbtn small { font-size: 11px; opacity: .7; }
.mbtn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(16,41,26,.3); }
.mgrid > .mbtn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mlog-list { margin-top: 14px; display: grid; gap: 4px; }
.mrow { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed var(--soft); padding: 4px 0; }
.vt-stale { opacity: .6; } .vt-stale.old { opacity: 1; color: #a86a00; }
.mdel { border: 0; background: none; font: inherit; color: #b8342c; cursor: pointer; padding: 2px 8px; }
@media (max-width: 760px) {
  .food-box { width: calc(100vw - 24px); max-width: none; box-sizing: border-box; overflow-x: hidden; }
  .food-box .fsearch { flex-wrap: wrap; } .food-box .fsearch input { min-width: 0; flex: 1 1 100%; }
  .fburn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .food-box .fchosen { grid-template-columns: minmax(0, 1fr); } .food-box .famount { flex-wrap: wrap; }
  .food-box .ftoday .spread { flex-wrap: wrap; }
}
.vt-old { color: #a86a00; font-weight: 700; }

/* Ilse: weight loss */
.ilse-box { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; display: grid; gap: 8px; }
.ilse-box p, .ilse-block p { margin: 0; }
.ilse-head { display: flex; align-items: center; gap: 8px; } .ilse-head canvas { width: 40px; height: 40px; image-rendering: pixelated; border: 2px solid var(--ink); background: var(--lcd); }
.ilse-head b { display: block; } .ilse-head small { opacity: .7; }
.ilse-kostbtn { display: grid; justify-items: start; gap: 2px; width: 100%; text-align: left; margin-top: 4px; }
.ilse-kostbtn small { font-size: 11px; opacity: .75; font-weight: 400; text-transform: none; letter-spacing: 0; }
.kost-box { max-height: 92vh; overflow: auto; }
.kost-focus { display: grid; gap: 2px; border: 2px solid var(--ink); background: var(--lcd); padding: 8px 10px; box-shadow: inset 5px 0 0 #c88a10; }
.kost-focus p { margin: 2px 0 0; }
.kost-spark { width: 100%; max-width: 420px; height: auto; display: block; color: var(--ink); }
.kost-good { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ilse-block { display: grid; gap: 6px; border-left: 5px solid #c88a10; padding: 4px 8px; }
.ilse-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ilse-nums span { border: 2px solid var(--ink); background: var(--lcd); padding: 4px 8px; display: grid; }
.ilse-nums small { font-size: 10px; } .ilse-nums b { font-family: var(--f-num); font-size: 22px; font-weight: 400; }
.ilse-prot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.ilse-chart { width: 100%; height: auto; border: 2px solid var(--ink); background: var(--lcd); }
.ilse-in { align-items: center; gap: 6px; } .ilse-in input { width: 90px; font-family: var(--f-num); font-size: 20px; padding: 2px 6px; border: 2px solid var(--ink); background: var(--lcd); }
.ilse-card { margin-top: 8px; }
.fburn { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 760px) { .fburn { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* a coach's own page */
.coach[data-coach] { cursor: pointer; } .coach[data-coach]:hover { box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--c), 6px 6px 0 rgba(16,41,26,.32); }
.coach-page { width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; display: grid; gap: 12px; box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 5px var(--c); }
.cp-head { display: flex; gap: 10px; align-items: center; } .cp-head canvas { width: 56px; height: 56px; image-rendering: pixelated; border: 3px solid var(--ink); background: var(--lcd); }
.cp-head b { display: block; font-size: 18px; } .cp-head small { opacity: .7; }
.cp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cp-sec { display: grid; gap: 6px; align-content: start; border: 2px solid var(--soft); padding: 8px 10px; }
.cp-area { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t n" "b b"; gap: 2px 8px; text-align: left; border: 2px solid var(--ink); background: var(--box); padding: 5px 8px; font: inherit; color: var(--ink); cursor: pointer; }
.cp-area > span { grid-area: t; display: grid; } .cp-area small { font-size: 11px; opacity: .7; } .cp-area em { grid-area: n; font-style: normal; font-family: var(--f-num); font-size: 20px; }
.cp-area em.st-good { color: #2f8a4a; } .cp-area em.st-mid { color: #a86a00; } .cp-area em.st-low { color: #b8342c; }
.cp-bars { grid-area: b; display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.cp-bars i { flex: 1; background: #b8342c; opacity: .8; } .cp-bars i.ok { background: #2f8a4a; } .cp-bars i.part { background: #c88a10; } .cp-bars i.none { background: transparent; }
.cp-recent { display: grid; } .cp-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 6px; padding: 3px 0; border-bottom: 1px dashed var(--soft); cursor: pointer; font-size: 13px; }
.cp-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cp-row em { font-style: normal; font-weight: 700; } .cp-row em.st-good { color: #2f8a4a; } .cp-row em.st-low { color: #b8342c; }
.cp-nums { display: flex; flex-wrap: wrap; gap: 6px; } .cp-nums span { border: 2px solid var(--ink); background: var(--lcd); padding: 2px 6px; display: grid; } .cp-nums b { font-family: var(--f-num); font-size: 18px; }
.cp-disc { border-left: 4px solid var(--c); padding: 2px 8px; } .cp-disc p { margin: 2px 0 0; }
.cp-thread { display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.cp-msg { border: 2px solid var(--soft); background: var(--box); padding: 4px 8px; margin-left: 15%; } .cp-msg p { margin: 2px 0; }
.cp-form { display: grid; gap: 6px; } .cp-form textarea { font: inherit; padding: 6px 8px; border: 2px solid var(--ink); background: var(--lcd); width: 100%; box-sizing: border-box; resize: vertical; }
@media (max-width: 760px) { .cp-grid { grid-template-columns: minmax(0, 1fr); } }
.deeds-note { margin: 0 0 4px; font-size: 12px; opacity: .8; }
.bw-dim span small { font-size: 15px; opacity: .6; }
.acct-btn { border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; padding: 0; } .acct-btn:hover { text-decoration: underline; }
.acct-box { width: min(560px, calc(100vw - 32px)); display: grid; gap: 8px; }
.acct-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.acct-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--soft); font-size: 13px; }
@media (max-width: 760px) { .acct-cols { grid-template-columns: 1fr; } }

/* the next quests, with a cover each */
.bestnext { justify-items: stretch; }
.bq { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding-top: 6px; border-top: 2px dashed var(--soft); }
.bq.first { border-top: 0; padding-top: 0; }
/* both quests alike: the same cover, title and button, so neither looks like the lesser choice */
.bq-body { display: grid; gap: 4px; min-width: 0; } .bq-body b { font-size: 16px; }
.bq-cover { width: 60px; height: 86px; border: 2px solid var(--ink); background: var(--box); display: grid; place-items: center; overflow: hidden; }
.bq .btn { min-width: 92px; padding: 6px 10px; font-size: 9px; justify-content: center; text-align: center; margin-right: 4px; }
.bq-cover img { width: 100%; height: 100%; object-fit: cover; } .bq-cover i { font-style: normal; font-size: 28px; }

/* the four boxes under the top: same height, the last thing in each at the bottom */
.hud { align-items: stretch; }
.hudbox { display: flex; flex-direction: column; }
.hud-foot { margin-top: auto; }
.quicknow { display: grid; gap: 4px; margin-top: 4px; } .quicknow .btn { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moodweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 4px; text-align: center; }
.moodweek span { display: grid; } .moodweek i { font-style: normal; font-size: 16px; } .moodweek small { font-size: 9px; opacity: .6; }
.kbars b { white-space: nowrap; }

/* moments: a row of small cards under the four boxes */
.moments { display: grid; gap: 12px; }
.moments:not(:has(.mcard, .jcard, .fire)) { display: none; }
.moments #tJournal:empty { display: none; }
.moments .jcard { margin-bottom: 0; height: 100%; box-sizing: border-box; }
.mcard { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 3px solid var(--ink); border-left: 6px solid var(--c); background: color-mix(in srgb, var(--c) 9%, var(--box)); padding: 8px 12px; box-shadow: 4px 4px 0 rgba(16,41,26,.3); }
.mcard canvas { width: 44px; height: 44px; image-rendering: pixelated; border: 2px solid var(--ink); background: var(--lcd); }
.mcard b { display: block; font-size: 14px; } .mcard small { display: block; opacity: .85; font-size: 12px; }
.moments .jcard small, .mcard small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mpop { width: min(460px, calc(100vw - 32px)); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 6px var(--c); }
.mpop canvas { width: 64px; height: 64px; image-rendering: pixelated; border: 3px solid var(--ink); background: var(--lcd); }
.mpop h3 { margin: 4px 0; } .mpop p { margin: 0 0 10px; }
/* the evening campfire: the day told as one story by the fire */
.fire { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 12px; align-items: stretch; border: 3px solid var(--ink); border-left: 6px solid var(--krop); background: color-mix(in srgb, var(--energi) 8%, var(--box)); padding: 8px 12px 8px 8px; box-shadow: 4px 4px 0 rgba(16,41,26,.3); }
/* lit and waiting for you: a warm glow that breathes, so the card is seen in the row without a pop-up */
.fire.lit { border-left-color: #e87820; animation: firelit 1.6s steps(4) infinite alternate; }
@keyframes firelit { from { box-shadow: 4px 4px 0 rgba(16,41,26,.3), 0 0 0 0 rgba(232,120,32,0); } to { box-shadow: 4px 4px 0 rgba(16,41,26,.3), 0 0 0 4px rgba(232,120,32,.45); } }
.fire.lit #fireTalk { animation: firelit 1.6s steps(4) infinite alternate; }
.fire-scene { position: relative; min-height: 88px; border: 2px solid var(--ink); overflow: hidden; background: radial-gradient(circle at 50% 100%, rgba(232,120,32,.45), transparent 55%), radial-gradient(1px 1px at 18% 22%, #fff 99%, transparent), radial-gradient(1px 1px at 72% 14%, #fff 99%, transparent), radial-gradient(1px 1px at 88% 36%, #dfe8ff 99%, transparent), radial-gradient(1px 1px at 40% 10%, #dfe8ff 99%, transparent), linear-gradient(#18203a 0 64%, #24361f 64%); }
.fire-scene::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 92%, rgba(248,208,64,.25), transparent 40%); animation: fireglow 1.3s steps(3) infinite alternate; pointer-events: none; }
@keyframes fireglow { to { opacity: .45; } }
.fire-pit { position: absolute; left: 50%; bottom: 4px; width: 48px; height: 48px; transform: translateX(-50%); image-rendering: pixelated; z-index: 1; }
.fire-guest { position: absolute; bottom: 3px; image-rendering: pixelated; } .fire-guest.g0 { left: 0; } .fire-guest.g1 { right: 0; }
.fire-body { min-width: 0; font-size: 13px; }
.fire-h { display: flex; gap: 10px; align-items: baseline; } .fire-h b { font-size: 15px; }
.fire-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: baseline; margin-top: 3px; }
.fire-row small { opacity: .8; } .fire-beat { color: var(--gold); font-style: normal; font-weight: bold; }
.fire-mon { display: inline-block; margin-right: 10px; } .fire-mon.here { color: var(--low); } .fire-mon.gone { color: var(--good); }
.fire-quip { margin: 6px 0 0; padding-top: 4px; border-top: 2px dashed var(--soft); font-style: italic; }
.fire-arm, .fire-armed { font: inherit; font-size: 11px; margin-left: 4px; padding: 1px 6px; border: 2px solid var(--ink); background: var(--box); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; }
.fire-armed { background: var(--ink); color: var(--lcd); }
.fire-mon.t-holdt { color: var(--good); } .fire-mon.t-brudt { color: var(--low); } .fire-mon.t-venter { color: var(--mid); }
.fire-threat { margin-top: 6px; padding: 6px 8px; border: 2px dashed var(--krop); display: grid; gap: 5px; }
.fire-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.fire-chips .jchip { font-size: 12px; padding: 3px 8px; } .fire-time { font: inherit; font-size: 12px; border: 2px solid var(--soft); background: var(--box); color: var(--ink); padding: 1px 4px; }
.fire-guest.hop { animation: firehop .5s steps(3) 2; } @keyframes firehop { 50% { transform: translateY(-6px); } }
.fire.talk { grid-template-columns: 200px minmax(0, 1fr); }
.fire-npc { position: absolute; bottom: 4px; width: 44px; height: 44px; image-rendering: pixelated; z-index: 2; }
.fire-npc.n0 { left: 2px; } .fire-npc.n1 { left: 34px; bottom: 14px; z-index: 0; } .fire-npc.n2 { right: 34px; bottom: 14px; z-index: 0; } .fire-npc.n3 { right: 2px; }
.fire-npc.come { animation: firecome .9s steps(6) both; } .fire-npc.n2.come, .fire-npc.n3.come { animation-name: firecomeR; }
@keyframes firecome { from { transform: translateX(-90px); } } @keyframes firecomeR { from { transform: translateX(90px); } }
.fire-guest.flee { animation: fireflee 1s steps(5) forwards; } .fire-guest.g1.flee { animation-name: firefleeR; }
@keyframes fireflee { to { transform: translateX(-120px); opacity: 0; } } @keyframes firefleeR { to { transform: translateX(120px); opacity: 0; } }
.fire.talk .fire-scene { min-height: 120px; }
.ft-lines { display: flex; flex-direction: column; gap: 4px; max-height: 210px; overflow: auto; margin: 4px 0; padding-right: 4px; }
.ft-line { border-left: 4px solid var(--c); padding: 1px 0 1px 8px; } .ft-line b { color: var(--c); margin-right: 4px; }
.ft-q { background: color-mix(in srgb, var(--c) 10%, var(--box)); padding: 4px 8px; border: 2px solid var(--c); border-left-width: 5px; }
.ft-me { align-self: flex-end; max-width: 80%; border-right: 4px solid var(--ink); background: var(--lcd); padding: 2px 8px; } .ft-me b { margin-right: 4px; }
.ft-wait { margin: 2px 0; font-style: italic; color: var(--mid); animation: fireglow 1s steps(2) infinite alternate; }
.ft-ins { border: 2px dashed var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--box)); padding: 4px 8px; } .ft-ins p { margin: 3px 0; }
.ft-own { display: flex; gap: 6px; margin-top: 5px; } .ft-own input { flex: 1; min-width: 0; font: inherit; font-size: 13px; border: 2px solid var(--ink); background: var(--box); color: var(--ink); padding: 3px 6px; }
.fire-go small { max-width: 160px; }
.cp-firq { border-left: 4px solid var(--c); padding: 2px 8px; margin: 4px 0; } .cp-firq p { margin: 1px 0; font-size: 14px; }
.cp-fins { margin: 3px 0; font-size: 14px; }
/* the evening in Dagbog */
.dfire { display: grid; gap: 8px; margin-bottom: 16px; }
.dfire-in { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; } .dfire .fire-scene { min-height: 110px; }
.dfire-talk .ft-lines { max-height: 360px; } .dfire-talk > summary { cursor: pointer; }
.dlog { display: grid; gap: 2px; border-top: 2px dashed var(--soft); padding-top: 6px; }
.dlog-row { display: grid; grid-template-columns: 44px 130px minmax(0, 1fr); gap: 8px; align-items: baseline; text-align: left; font: inherit; font-size: 13px; color: var(--ink); background: none; border: 0; border-left: 4px solid var(--c); padding: 2px 6px; cursor: pointer; }
.dlog-row span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; white-space: pre-line; } .dlog-row.open span { -webkit-line-clamp: unset; }
.dlog-row b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dlog-row:hover { background: color-mix(in srgb, var(--c) 8%, transparent); }
.dins { margin-bottom: 16px; } .dins p { margin: 3px 0; } .dins-day { display: block; margin-top: 8px; color: var(--mid); }
@media (max-width: 760px) { .dfire-in { grid-template-columns: minmax(0, 1fr); } .dlog-row { grid-template-columns: 40px minmax(0, 1fr); } .dlog-row span { grid-column: 1 / -1; } }
.fire-go { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; }
@media (max-width: 760px) { .fire, .fire.talk { grid-template-columns: minmax(0, 1fr); } .fire-go { flex-direction: row; justify-content: flex-start; } }
/* the morning council */
.council { display: grid; gap: 8px; }
.overlay .council { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.cn-faces { display: flex; gap: 10px; justify-content: center; }
.cn-faces canvas { width: 52px; height: 52px; image-rendering: pixelated; border: 3px solid var(--c); background: var(--lcd); opacity: .8; }
.cn-faces canvas.lead { width: 64px; height: 64px; opacity: 1; box-shadow: 3px 3px 0 rgba(16,41,26,.3); }
.cn-faces { align-items: end; }
.cn-advice { border: 3px solid var(--ink); border-left: 6px solid var(--c); background: color-mix(in srgb, var(--c) 10%, var(--box)); padding: 8px 12px; }
.cn-advice h3 { margin: 2px 0 4px; } .cn-advice p { margin: 0; }
.cn-arg { border-left: 4px solid var(--c); padding: 2px 0 2px 10px; }
.cn-arg small { color: var(--dim, #556); margin-left: 6px; } .cn-arg p { margin: 2px 0 0; font-size: .92em; }
.cn-why { background: var(--lcd); border: 2px dashed var(--ink); padding: 6px 10px; } .cn-why p { margin: 2px 0 0; }
.cn-fold { display: grid; gap: 8px; } .cn-fold[open] > summary { margin-bottom: 8px; } .cn-fold > * + * { margin-top: 8px; } .cn-fold > summary { cursor: pointer; }
.cp-reply { border: 2px solid var(--c); border-left-width: 5px; background: color-mix(in srgb, var(--c) 8%, var(--box)); padding: 4px 8px; margin-right: 15%; } .cp-reply b { display: block; margin-top: 2px; } .cp-reply p { margin: 2px 0; }
/* talking with the mentors */
.ch-thread { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; padding: 2px; }
.ch-me, .ch-them { max-width: 85%; padding: 4px 9px; border: 2px solid var(--ink); }
.ch-me { align-self: flex-end; background: var(--lcd); } .ch-me small { display: block; text-align: right; opacity: .6; }
.ch-them { align-self: flex-start; border-color: var(--c); border-left-width: 5px; background: color-mix(in srgb, var(--c) 8%, var(--box)); }
.ch-them.err { opacity: .6; border-style: dashed; }
.ch-me p, .ch-them p { margin: 2px 0; white-space: pre-line; } .ch-them small { opacity: .7; }
.ch-them.typing p { display: flex; gap: 4px; padding: 4px 0; } .ch-them.typing i { width: 6px; height: 6px; background: var(--c); animation: chdot 1s infinite; }
.ch-them.typing i:nth-child(2) { animation-delay: .2s; } .ch-them.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes chdot { 50% { opacity: .2; } }
.ch-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-top: 8px; align-items: end; }
.ch-form textarea { width: 100%; resize: vertical; }
.cn-update { display: block; margin-top: 4px; opacity: .8; }
/* the creator's tabs and turning */
.creator-side { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ctabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 3px solid var(--ink); padding-bottom: 6px; }
.ctabs button { font-family: var(--f-pixel); font-size: 10px; padding: 6px 8px; border: 2px solid var(--ink); background: var(--box); cursor: pointer; }
.ctabs button.on { background: var(--ink); color: var(--box); }
.ctabs small { opacity: .7; font-size: 9px; }
.cturn { gap: 6px; align-items: center; justify-content: center; }
.creator .chipbtn.locked { cursor: help; }
/* wardrobe tiles: a picture of the thing on you, framed by how rare it is */
:root { --r-common: #8a948a; --r-rare: #2c64b0; --r-epic: #7a3fa0; --r-legendary: #d4a017; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.tiles .tile { position: relative; display: grid; justify-items: center; gap: 2px; padding: 4px 3px 3px; background: var(--box); border: 3px solid var(--rc, var(--r-common)); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; min-height: 78px; }
.tiles .tile canvas { width: 54px; height: 46px; object-fit: contain; image-rendering: pixelated; background: var(--lcd); }
.tiles .tile small { font-size: 10px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.tiles .tile.on { outline: 3px solid var(--ink); outline-offset: 1px; background: color-mix(in srgb, var(--rc, var(--r-common)) 18%, var(--box)); }
.tiles .tile.locked canvas { opacity: .35; } .tiles .tile.locked small { opacity: .6; }
.tiles .tile .tl { position: absolute; top: 18px; font-size: 14px; } .tiles .tile .tq { position: absolute; top: 12px; font-family: var(--f-pixel); font-size: 20px; color: var(--r-legendary); text-shadow: 2px 2px 0 var(--ink); }
.tiles .tile .tnone { display: grid; place-items: center; width: 54px; height: 46px; font-size: 11px; opacity: .6; border: 2px dashed var(--soft); }
.r-common { --rc: var(--r-common); } .r-rare { --rc: var(--r-rare); } .r-epic { --rc: var(--r-epic); } .r-legendary { --rc: var(--r-legendary); }
.tiles .tile.r-legendary { box-shadow: 2px 2px 0 var(--ink), 0 0 8px color-mix(in srgb, var(--r-legendary) 60%, transparent); }
.chipbtn.r-rare, .chipbtn.r-epic, .chipbtn.r-legendary { border-color: var(--rc); }
.nb { position: absolute; top: -7px; right: -6px; font-style: normal; font-family: var(--f-pixel); font-size: 8px; background: #c83c30; color: #fff; padding: 2px 4px; border: 2px solid var(--ink); }
.chipbtn .nb, .ctabs .nb { position: static; margin-left: 4px; }
.cfilter { justify-self: start; }
.icard { border: 3px solid var(--rc, var(--r-common)); border-left-width: 6px; background: color-mix(in srgb, var(--rc, var(--r-common)) 8%, var(--box)); padding: 8px 10px; display: grid; gap: 4px; width: 100%; }
.icard .label { color: var(--rc); } .icard p { margin: 0; font-size: 13px; } .icard .ipow { font-size: 12px; } .icard .ipow small { opacity: .7; }
#cCard { width: 100%; }
/* the bag of tools */
.toolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.toolc { display: grid; gap: 4px; opacity: .75; } .toolc.have { opacity: 1; border-color: var(--gold); }
.toolc p { margin: 0; font-size: 13px; }
/* gifts: a chest that wiggles, then the things inside one by one */
.giftbox { width: min(480px, calc(100vw - 32px)); display: grid; gap: 8px; text-align: center; box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 6px var(--rc, var(--r-common)), 0 0 24px color-mix(in srgb, var(--rc, var(--r-common)) 50%, transparent); }
.giftbox h3 { margin: 0; font-family: var(--f-pixel); font-weight: 400; font-size: 15px; }
.giftbox p { margin: 0; }
.chest { justify-self: center; display: grid; place-items: center; background: none; border: none; cursor: pointer; padding: 8px; }
.chest span { font-size: 64px; display: block; animation: chestw 1.2s infinite; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--rc, #d4a017) 70%, transparent)); }
.chest.open span { animation: chestpop .5s forwards; } .chest.open small { visibility: hidden; }
@keyframes chestw { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-8deg); } 85% { transform: rotate(8deg); } 92% { transform: rotate(-4deg); } }
@keyframes chestpop { 50% { transform: scale(1.3); } 100% { transform: scale(.8); opacity: .4; } }
.gitems { display: grid; gap: 6px; text-align: left; }
.gitem { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; border: 3px solid var(--rc, var(--r-common)); padding: 6px 8px; background: color-mix(in srgb, var(--rc, var(--r-common)) 10%, var(--box)); animation: gin .4s ease-out; }
.gitem canvas { width: 64px; height: 56px; object-fit: contain; image-rendering: pixelated; background: var(--lcd); }
.gitem .gicon { font-size: 36px; text-align: center; } .gitem .label { color: var(--rc); } .gitem p { font-size: 12px; } .gitem .ipow { font-size: 11px; }
.gitem.r-legendary { box-shadow: 0 0 14px color-mix(in srgb, var(--r-legendary) 70%, transparent); }
@keyframes gin { from { transform: translateY(10px) scale(.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chest span, .gitem { animation: none; } }
.nextgift { display: block; color: var(--gold); font-weight: 700; margin-top: 2px; }
.gitem .label { display: block; }
/* choosing a path */
.tpair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: stretch; width: 100%; }
.topt { display: grid; gap: 2px; text-align: left; padding: 6px 8px; border: 2px solid var(--soft); background: var(--box); cursor: pointer; font: inherit; }
.topt small { font-size: 11px; opacity: .85; } .topt.on { border: 3px solid var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 12%, var(--box)); }
.topt:disabled { cursor: default; } .talent:not(.open) .topt { opacity: .55; }
.topt[data-talent]:hover, .tpick .topt:hover { border-color: var(--c, var(--gold)); }
.tor { align-self: center; font-style: normal; font-size: 10px; opacity: .6; }
.tpend { grid-column: 1 / -1; color: var(--c, var(--gold)); font-weight: 700; }
.tchoice > div { min-width: 0; }
.tpick { width: min(520px, calc(100vw - 32px)); display: grid; gap: 8px; box-shadow: inset 0 0 0 3px var(--box), inset 0 0 0 6px var(--c); }
.tpick h3 { margin: 0; font-family: var(--f-pixel); font-weight: 400; font-size: 15px; } .tpick p { margin: 0; }
.tpair.big .topt { padding: 12px; } .tpair.big .topt b { font-size: 15px; } .tpair.big .topt small { font-size: 13px; }
@media (max-width: 760px) { .tpair { grid-template-columns: minmax(0, 1fr); } .tor { justify-self: center; } }
/* in the narrow talent columns the two paths stand above each other */
.tcol .tpair { grid-template-columns: minmax(0, 1fr); gap: 3px; }
.tcol .tor { justify-self: start; padding-left: 8px; }
.tcol .topt b { overflow-wrap: anywhere; }
/* gear: tool tiers, legendary chips and sets */
.ttier { display: grid; gap: 2px; border-left: 5px solid var(--tc); padding-left: 8px; } .ttier b { color: var(--tc); font-family: var(--f-pixel); font-size: 10px; }
.ttier .sbar i { background: var(--tc); }
.gearbox { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; align-items: start; }
.gchip { border: 3px solid var(--rc); padding: 6px 8px; background: color-mix(in srgb, var(--rc) 12%, var(--box)); font-weight: 700; }
.gset { display: grid; gap: 2px; border: 2px dashed var(--soft); padding: 6px 8px; background: var(--box); } .gset.on { border: 3px solid var(--gold); }

/* the HUD lives inside the game: one thin see-through strip along the top; the frame itself is untouched */
.world-frame { width: min(100%, calc((100dvh - 126px) * 40 / 24)); margin-inline: auto; container-type: inline-size; }
.gbar { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 3px 8px; background: rgba(16,41,26,.7); color: #f6f9ec; pointer-events: none; }
.gbar > * { pointer-events: auto; }
.world-frame #mini { top: 36px; }
.world-frame .region-name { top: 48px; }
.gbar-vit { display: flex; gap: 8px; flex: none; }
.hv { display: grid; grid-template-columns: 14px 42px auto; gap: 4px; align-items: center; }
.hv-i { font-size: 12px; text-align: center; }
.hv-bar { height: 8px; background: #0a1a10; border: 1px solid #3c5a44; position: relative; }
.hv-bar i { position: absolute; inset: 0 auto 0 0; background: #e2574c; box-shadow: inset 0 2px 0 rgba(255,255,255,.25); }
.hv.mp .hv-bar i { background: #5a8ae0; }
.hv.st .hv-bar i { background: #f2c14e; }
.hv b { font-family: var(--f-num); font-weight: 400; font-size: 15px; line-height: 1; }
.gbar-q { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.gbar-q b { font-family: var(--f-pixel); font-size: 8px; color: #f2c14e; margin-right: 4px; }
.gbar-own { display: flex; gap: 9px; align-items: center; flex: none; }
.hud-chip { display: flex; gap: 3px; align-items: baseline; font-size: 12px; white-space: nowrap; }
.hud-chip b { font-family: var(--f-num); font-weight: 400; font-size: 15px; }
.hud-btn { font: inherit; font-size: 12px; line-height: 1; color: #10291a; background: #f6f9ec; border: 2px solid #10291a; padding: 2px 4px; cursor: pointer; }
.hud-btn:disabled { opacity: .5; cursor: default; }
@container (max-width: 1000px) { .gbar-q { display: none; } .gbar-own { margin-left: auto; } }
@container (max-width: 640px) {
  .gbar { gap: 2px 8px; padding: 2px 6px; flex-wrap: wrap; }
  .hv { grid-template-columns: 12px 30px auto; } .hv b { font-size: 13px; }
  .gbar-own { gap: 6px; } .hud-chip { font-size: 10px; } .hud-chip b { font-size: 13px; }
  .world-frame #mini { width: 150px; height: 100px; top: 54px; }
  .world-frame .region-name { top: 66px; }
}

/* build mode: the catalogue is a bar along the bottom of the game, so it never hides the plot */
.bpanel { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; display: grid; grid-template-columns: auto minmax(0, 1fr) 160px; grid-template-areas: "h g i" "t g i"; gap: 4px 8px; align-items: start; background: rgba(16,41,26,.92); color: #f6f9ec; border: 3px solid #10291a; box-shadow: inset 0 0 0 1px rgba(246,249,236,.25), 3px 3px 0 rgba(0,0,0,.3); padding: 6px; }
.bpanel[hidden] { display: none; }
.bp-h { grid-area: h; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--f-pixel); font-size: 8px; color: #f2c14e; }
.bp-size { margin-right: auto; color: #cfd8c0; font-size: 7px; }
.bp-tabs { grid-area: t; display: flex; gap: 3px; }
.bp-tab { width: 30px; font-size: 15px; line-height: 1; padding: 3px 0; background: rgba(246,249,236,.1); border: 2px solid #3c5a44; color: inherit; cursor: pointer; }
.bp-tab.on { border-color: #f2c14e; background: rgba(242,193,78,.2); }
.bp-grid { grid-area: g; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.bp-item { flex: none; width: 50px; display: grid; justify-items: center; gap: 1px; padding: 3px 0 2px; background: rgba(246,249,236,.08); border: 2px solid #3c5a44; color: inherit; cursor: pointer; }
.bp-item.on { border-color: #f2c14e; background: rgba(242,193,78,.2); }
.bp-item.no { opacity: .45; }
.bp-item canvas { width: 36px; height: 36px; image-rendering: pixelated; }
.bp-item small { font-size: 10px; white-space: nowrap; }
.bp-info { grid-area: i; }
.bp-hint { margin: 0 0 3px; font-size: 12px; line-height: 1.25; color: #c8e0c0; }
.bp-why { margin: 0 0 3px; font-size: 12px; line-height: 1.25; color: #f2c14e; min-height: 15px; }
.bp-have { margin: 0; font-size: 13px; }
@container (max-width: 640px) { .bpanel { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "h g" "t g"; } .bp-info { display: none; } .bp-item { width: 40px; } .bp-item canvas { width: 28px; height: 28px; } .bp-item small { font-size: 9px; } }

.dedit { display: grid; gap: 6px; border-top: 2px dashed var(--soft); padding-top: 8px; margin-top: 4px; }
.dedit .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dedit input { width: 90px; font-size: 16px; padding: 4px 6px; }
.btn.danger { color: var(--low); border-color: var(--low); }

/* the coach's word as a scene from an old RPG: the mentor in the valley's grass with a name plate, the
   words typed out, big answers (keys 1–4); on an answer the mentor hops and a heart rises */
.nudge.nd-big { grid-template-columns: 136px minmax(0, 1fr) auto; gap: 0 18px; align-items: start; padding: 10px 14px 10px 18px; }
.nd-portrait { position: relative; height: 136px; border: 3px solid var(--ink); overflow: hidden; background: #8a8a3a; box-shadow: 3px 3px 0 rgba(16,41,26,.3); }
.nd-portrait .nd-ground { position: absolute; left: 0; top: 0; width: 320px; height: 130px; image-rendering: pixelated; border: 0; background: none; }
.nd-shadow { position: absolute; left: 50%; bottom: 24px; width: 54px; height: 10px; transform: translateX(-50%); background: rgba(16,41,26,.35); border-radius: 50%; }
.nudge .nd-npc { position: absolute; left: 50%; bottom: 22px; width: 128px; height: 128px; transform: translateX(-50%); image-rendering: pixelated; border: 0; background: none; }
.nd-name { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); background: var(--c); color: #fff; font-family: var(--f-pixel); font-size: 9px; font-weight: 400; text-transform: uppercase; padding: 5px 10px 3px 11px; border: 3px solid var(--ink); border-bottom: 0; white-space: nowrap; }
.nd-talk { display: grid; align-content: start; gap: 8px; min-height: 136px; padding-top: 2px; }
.nd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nd-big .nd-kind { font-size: 8px; padding: 4px 6px 3px 7px; border: 2px solid var(--ink); vertical-align: 0; }
.nd-about { font-family: var(--f-pixel); font-size: 8px; color: var(--mid); text-transform: uppercase; }
.nudge .nd-text { margin: 0; font-size: 19px; line-height: 1.35; min-height: 1.35em; }
.nd-more.in { animation: nd-in .3s steps(3); }
@keyframes nd-in { from { opacity: 0; transform: translateY(6px); } }
.nd-big .nd-ans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.nd-big .nd-ans button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; font-size: 16px; text-align: left; transition: opacity .2s; }
.nd-big .nd-ans button:hover { background: color-mix(in srgb, var(--c) 14%, var(--box)); }
.nd-ans kbd { flex: none; font-family: var(--f-pixel); font-size: 8px; color: #fff; background: var(--c); border: 2px solid var(--ink); padding: 3px 4px 2px 5px; }
.nd-big .nd-ans button.picked { background: var(--c); color: #fff; transform: translate(2px, 2px); box-shadow: none; }
.nd-big .nd-ans button.picked kbd { background: var(--ink); }
.nd-big .nd-ans button.gone { opacity: .3; }
.nd-ownrow { margin-top: 8px; }
.nd-ownbtn { font: inherit; font-size: 13px; color: var(--mid); background: none; border: 2px dashed var(--soft); padding: 3px 10px; cursor: pointer; }
.nd-ownbtn:hover { border-color: var(--c); color: var(--ink); }
.nd-big .nd-own { margin-top: 0; }
.nd-big .nd-go { max-width: 360px; }
.nd-ok { margin-top: 2px; }
.nudge .nd-npc.hop { animation: nd-hop .5s steps(4); }
@keyframes nd-hop { 0%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -16px); } }
.nd-heart { position: absolute; left: 50%; top: 6px; font-family: var(--f-pixel); font-size: 10px; color: #fff; background: var(--c); border: 2px solid var(--ink); padding: 3px 5px 2px 6px; white-space: nowrap; animation: nd-heart 1.6s steps(8) forwards; }
@keyframes nd-heart { from { transform: translate(-50%, 0); opacity: 1; } 70% { opacity: 1; } to { transform: translate(-50%, -30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nd-more.in, .nudge .nd-npc.hop, .nd-heart { animation: none; } .nd-heart { display: none; } }
@media (max-width: 760px) { .nudge.nd-big { grid-template-columns: 96px minmax(0, 1fr); padding-left: 14px; } .nd-portrait { height: 104px; } .nudge .nd-npc { width: 96px; height: 96px; } .nd-big > .row { grid-column: 2; } .nd-big .nd-ans { grid-template-columns: minmax(0, 1fr); } }
.nd-offer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nd-other, .nd-moreq { font: inherit; font-size: 14px; color: var(--ink); background: var(--box); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); padding: 5px 10px; cursor: pointer; }
.nd-other:hover, .nd-moreq:hover { background: color-mix(in srgb, var(--c) 14%, var(--box)); }
.nd-other:active, .nd-moreq:active { transform: translate(2px, 2px); box-shadow: none; }
.nd-moreq { margin-top: 10px; border-style: dashed; box-shadow: none; color: var(--mid); }
.nd-endrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .nd-endrow .nd-moreq { margin-top: 0; }
.nd-idle { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 3px solid var(--ink); background: var(--box); padding: 6px 12px; box-shadow: 3px 3px 0 rgba(16,41,26,.3); font-size: 15px; color: var(--mid); }
.nd-idle .nd-moreq { margin: 0; }
/* a mentor asking for data: how far they have come, and the mood or weight given right in the box */
.nd-prog { position: relative; width: 90px; height: 12px; border: 2px solid var(--ink); background: var(--lcd-2); overflow: hidden; }
.nd-prog i { position: absolute; inset: 0 auto 0 0; background: var(--c); box-shadow: inset 0 2px 0 rgba(255,255,255,.35); }
.nd-moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 460px; }
.nd-moods button { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; font: inherit; color: var(--ink); background: var(--box); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; }
.nd-moods button span { font-size: 24px; line-height: 1.1; } .nd-moods button small { font-size: 12px; }
.nd-moods button:hover { background: color-mix(in srgb, var(--c) 14%, var(--box)); }
.nd-moods button.picked { background: var(--c); color: #fff; transform: translate(2px, 2px); box-shadow: none; }
.nd-kg { max-width: 260px; align-items: center; } .nd-kg span { font-size: 15px; }
/* the mentor's case for what is offered */
.nd-pitch { margin: 8px 0 0; padding-left: 12px; border-left: 3px solid var(--c); font-size: 15px; line-height: 1.4; color: var(--ink); max-width: 640px; }
.nd-pitch:empty { display: none; }
.tilewrap { display: grid; align-content: start; gap: 4px; min-width: 0; } .tilewrap > .tile { width: 100%; } .tilewrap .linkbtn { justify-self: center; font-size: 8px; color: var(--mid); }
.nd-shelve { color: var(--mid); box-shadow: none; border-style: dashed; }
.tilewrap.shelved .tile { opacity: .45; }

/* the habit monsters in the hero card's grass, and their card */
.mon { position: absolute; bottom: 2px; z-index: 1; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer; line-height: 0; }
.mon:hover canvas { filter: drop-shadow(0 0 3px #fff6c0); }
.mon.flee { animation: mon-flee 1.6s steps(12) forwards; pointer-events: none; }
.mon-home { position: relative; overflow: visible; }
/* a monster behind the value it feeds on: the card hides its body, its eyes look over the edge, its hands grip the border */
.mon-box { position: relative; }
.mon-box > .mon-home { position: relative; z-index: 1; }
.mon-peek { position: absolute; z-index: 0; cursor: pointer; line-height: 0; }
.mon-peek canvas { image-rendering: pixelated; display: block; }
.mon-hands { position: absolute; z-index: 2; height: 4px; display: flex; justify-content: space-between; cursor: pointer; line-height: 0; }
.mon-hands canvas { width: 5px; height: 4px; image-rendering: pixelated; }
.mon-hands:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nd-how { margin: 0 0 8px; font-weight: 600; }
.nudge .nd-npc.nd-mon { bottom: 24px; max-width: 128px; object-fit: contain; object-position: bottom; }
.hc-seal, .hc-edit { z-index: 2; }
/* depth in the grass: the tall straws stand in front of the monsters further back, behind the ones in front */
#heroSprite, .hc-tufts { z-index: 1; } .hc-ribbon { z-index: 3; }
.mon-ov { align-items: center; justify-content: center; }
.mon-dlg { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; max-width: 560px; width: calc(100vw - 32px); padding: 14px; }
.mon-stage { background: #8a8a3a linear-gradient(#9aa24a, #7d8a36); border: 3px solid var(--ink); padding: 8px; display: grid; place-items: end center; min-width: 140px; min-height: 130px; }
.mon-txt { display: grid; gap: 8px; min-width: 0; }
.mon-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mon-name b { font-family: var(--f-pixel); font-size: 13px; font-weight: 400; }
.mon-size { font-family: var(--f-pixel); font-size: 8px; background: var(--ink); color: var(--lcd); padding: 3px 5px; }
.mon-lore { font-style: italic; margin: 0; }
.mon-quip, .mon-why, .mon-how { margin: 0; }
.mon-why { font-size: 13px; opacity: .75; }
.mon-how { font-weight: 600; }
.mon-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .mon-dlg { grid-template-columns: 1fr; } .mon-stage { min-height: 110px; } }

/* the day's challenges at the top of I dag */
.thr-card { border: 3px solid var(--ink); background: var(--box); box-shadow: 3px 3px 0 rgba(16,41,26,.3); padding: 4px 10px; margin: 0; }
.thr { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0 6px 10px; box-shadow: inset 4px 0 0 var(--c); }
.thr + .thr { border-top: 2px dashed rgba(16,41,26,.2); }
.thr-pic { height: 60px; display: flex; align-items: flex-end; justify-content: center; }
/* every monster has its own size: fit the whole drawing in the box, standing on the bottom */
.thr-pic canvas { width: 88px !important; height: 60px !important; object-fit: contain; object-position: center bottom; image-rendering: pixelated; transition: transform .4s; }
.thr-head { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; } .thr-head .label { width: 100%; color: var(--c); } .thr-head span:last-child { font-size: .9em; }
.thr-bar { position: relative; height: 16px; border: 2px solid var(--ink); background: rgba(16,41,26,.08); margin: 4px 0 2px; max-width: 460px; }
.thr-bar i { position: absolute; inset: 0 auto 0 0; background: var(--c); transition: width .8s steps(8); }
.thr-bar span { position: relative; display: block; font-size: 11px; line-height: 12px; padding: 0 6px; font-weight: 700; }
.thr-clock { background: repeating-linear-gradient(90deg, rgba(16,41,26,.08) 0 8px, transparent 8px 16px); }
.thr-say { margin: 0; font-size: .9em; opacity: .85; }
/* what you can do sits in the text column, under what the monster says, like the message line */
.thr-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; } .thr-acts:empty { display: none; }
.thr-acts > .btn { margin: 0; } .thr-give { font-size: 8px; color: var(--mid); line-height: 1.4; padding: 2px 0; }
.thr.won .thr-pic canvas { filter: grayscale(1); opacity: .45; transform: translateX(14px) rotate(8deg); }
.thr.quitting .thr-pic canvas { transform: scale(1.25); transform-origin: bottom; }
.thr-won { font-size: 22px; color: var(--c); font-weight: 700; padding-right: 4px; }
.thr-quit:empty { display: none; } .thr-quit { margin-top: 6px; } .thr-quit p { margin: 0 0 6px; font-size: .9em; } .thr-quit .row { gap: 10px; align-items: center; }
.thr-plea { border-left: 4px solid var(--c); padding-left: 8px; } .thr-gloat { font-style: italic; }
.thr-hold { position: relative; overflow: hidden; } .thr-hold i { position: absolute; inset: 0 100% 0 0; background: #b0413e; opacity: .35; }
.thr-hold.holding i { right: 0; transition: right 2.5s linear; } .thr-hold span { position: relative; }
@media (max-width: 600px) { .thr { grid-template-columns: 66px minmax(0, 1fr); } .thr-pic canvas { width: 66px !important; height: 46px !important; } .thr-pic { height: 46px; } }

/* ---------- Ankomsten: the welcome and the first week's card ---------- */
.ar-intro, .ar-meet { max-width: 560px; }
.ar-intro h3 { margin: 6px 0 8px; }
.ar-intro p { margin: 8px 0; }
.ar-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: flex-end; margin: 10px 0; }
.ar-row figure { margin: 0; text-align: center; }
.ar-row figure canvas { width: 56px; height: 56px; image-rendering: pixelated; border: 2px solid var(--ink); background: var(--lcd); }
.ar-row figcaption { display: grid; font-size: 12px; }
.ar-row.mons canvas { image-rendering: pixelated; }
.ar-day { padding-left: 20px; margin: 8px 0; }
.ar-day li { margin: 6px 0; }
.ar-day b { display: inline-block; min-width: 54px; }
.ar-dots { letter-spacing: 3px; color: var(--mid); }
.ar-mentors { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 8px; }
.ar-mentor { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; text-align: left; background: var(--box); color: var(--ink); border: 3px solid var(--ink); border-left: 6px solid var(--c); padding: 8px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.ar-mentor:hover { background: var(--lcd); }
.ar-mentor canvas { width: 52px; height: 52px; image-rendering: pixelated; border: 2px solid var(--ink); background: var(--lcd); }
.ar-mentor span { display: grid; gap: 2px; }
.ar-mentor small { color: var(--mid); }
.ar-mentor i { font-size: 13px; }
.acard .asteps { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.acard .asteps li.done { color: var(--mid); }
.acard .asteps li.todo { color: var(--soft); }
.acard .asteps li.next { border: 2px dashed var(--ink); padding: 8px 10px; display: grid; gap: 6px; }
.acard .asteps li.next p { margin: 0; }
.ar-flash { outline: 4px solid var(--gold, #c88a10); outline-offset: 3px; transition: outline-color .3s; }
.chatcard { width: min(540px, calc(100vw - 32px)); }
.chatcard .ch-thread { max-height: 38vh; }
.copy a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: inherit; }
