:root {
  --ink: #0b0818; --bg: #14112b; --bg2: #1d1840; --panel: #262052; --panel2: #322a68; --line: #4a3f8f;
  --text: #f4efff; --mute: #a9a0d6; --amber: #ffb84d; --amber2: #f2932e; --cyan: #5ee6e0; --green: #6fd36b;
  --red: #ef4f5b; --pink: #ff7eb6; --purple: #a06bff; --cream: #fff3d6;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 16px/1.45 var(--sans);
  background-image:
    radial-gradient(2px 2px at 20px 30px, #ffffff55 50%, transparent 51%),
    radial-gradient(2px 2px at 140px 90px, #ffffff33 50%, transparent 51%),
    radial-gradient(2px 2px at 90px 170px, #5ee6e055 50%, transparent 51%),
    radial-gradient(2px 2px at 210px 220px, #ffffff44 50%, transparent 51%),
    linear-gradient(#14112b, #1a1438);
  background-size: 260px 260px, 260px 260px, 260px 260px, 260px 260px, auto;
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.spr { image-rendering: pixelated; display: inline-block; vertical-align: middle; flex: none; }
h1, h2, h3, .mono { font-family: var(--mono); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
h1 { font-size: 26px; } h2 { font-size: 15px; } h3 { font-size: 13px; color: var(--mute); }
p { margin: 0; }
.mute { color: var(--mute); } .small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }

/* moldura pixel: cantos em degrau feitos com sombras */
.px {
  background: var(--panel); margin: 4px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink),
    inset 0 4px 0 0 #ffffff14, inset 0 -4px 0 0 #00000030;
}
.card { padding: 14px; }
.card + .card { margin-top: 16px; }
.card > h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card > h2 .tag { margin-left: auto; }
.tag { font: 800 12px var(--mono); padding: 3px 8px; background: var(--ink); color: var(--amber); white-space: nowrap; }
.tag.g { color: var(--green); } .tag.c { color: var(--cyan); } .tag.r { color: var(--red); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 16px;
  font: 800 14px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); background: var(--amber);
  margin: 4px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink),
    inset 0 -6px 0 0 #00000033, inset 0 4px 0 0 #ffffff55;
  transition: transform .06s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), inset 0 4px 0 0 #00000033; }
.btn.green { background: var(--green); } .btn.cyan { background: var(--cyan); } .btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: var(--panel2); color: var(--text); }
.btn.sm { min-height: 38px; padding: 4px 10px; font-size: 12px; }
.btn.wide { display: flex; width: calc(100% - 8px); }
.btn[disabled] { filter: grayscale(1) brightness(.7); pointer-events: none; }
.btn:focus-visible, .tile:focus-visible, .nav button:focus-visible, .slot:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }

input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; background: var(--ink); color: var(--text); border: 3px solid var(--line); padding: 10px 12px; border-radius: 0; min-height: 46px;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); }
label { display: block; font: 800 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--mute); margin-bottom: 4px; }
.field { margin-bottom: 12px; }

/* estrutura */
.shell { max-width: 760px; margin: 0 auto; padding: 12px 12px 110px; }
.shell.wide { max-width: 1180px; }
.top { display: flex; align-items: center; gap: 10px; padding: 6px 4px 12px; }
.top .who { font: 800 14px var(--mono); text-transform: uppercase; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ink); border-top: 4px solid var(--line);
  display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.nav button { flex: 1; max-width: 190px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font: 800 11px var(--mono); text-transform: uppercase; color: var(--mute); position: relative; }
.nav button.on { color: var(--amber); background: var(--bg2); }
.nav button.on::before { content: ""; position: absolute; top: -4px; left: 0; right: 0; height: 4px; background: var(--amber); }
.nav .dot { position: absolute; top: 6px; right: calc(50% - 24px); min-width: 18px; height: 18px; background: var(--red); color: #fff; font: 800 11px/18px var(--mono); text-align: center; }

/* cena da mina */
.scene { position: relative; height: 230px; overflow: hidden; margin: 4px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink); }
.scene .air { position: absolute; inset: 0 0 38% 0; }
.scene .glow { position: absolute; left: 50%; bottom: 30%; width: 260px; height: 200px; transform: translateX(-50%);
  background: radial-gradient(closest-side, #ffb84d55, transparent); animation: flicker 2.4s infinite steps(4); }
.scene .ground { position: absolute; inset: 62% 0 0 0; background-size: 256px 128px; image-rendering: pixelated; border-top: 8px solid; }
.scene .twinkle { position: absolute; width: 4px; height: 4px; background: #fff; animation: twinkle 2s infinite steps(2); }
.scene .cloud { position: absolute; height: 12px; background: #ffffffcc; box-shadow: 12px -8px 0 0 #ffffffcc, 28px 0 0 0 #ffffffcc; animation: drift 40s linear infinite; }
.scene .hero { position: absolute; left: 50%; bottom: 38%; transform: translateX(-50%); display: flex; align-items: flex-end; }
.scene .hero .me { animation: bob 1.2s infinite steps(2); }
.scene .hero .tool { margin-left: -10px; margin-bottom: 14px; transform-origin: 50% 90%; animation: swing 1.6s infinite steps(4); }
.scene .hud { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 8px; align-items: flex-start; }
.scene .plate { background: #0b0818cc; padding: 6px 10px; font: 800 13px var(--mono); text-transform: uppercase; }
.scene .plate small { display: block; color: var(--amber); font-size: 11px; }
.scene .depth { position: absolute; left: 10px; bottom: 8px; font: 800 11px var(--mono); text-transform: uppercase; color: #ffffffcc; background: #0b081899; padding: 2px 6px; }
.scene .spark { position: absolute; width: 4px; height: 4px; background: #fff; animation: twinkle 1.4s infinite steps(2); }
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes swing { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(38deg); } }
@keyframes twinkle { 50% { opacity: .15; } }
@keyframes flicker { 50% { opacity: .7; } }
@keyframes drift { from { transform: translateX(-80px); } to { transform: translateX(820px); } }

.xpbar { display: flex; gap: 3px; height: 22px; background: var(--ink); padding: 4px; margin: 4px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink); }
.xpbar i { flex: 1; background: #2b2558; }
.xpbar i.f { background: var(--cyan); box-shadow: inset 0 -4px 0 0 #1fa7b8, inset 0 3px 0 0 #c9fffc; }
.xpbar i.h { background: linear-gradient(90deg, var(--cyan) 50%, #2b2558 50%); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.stat { padding: 8px 6px; text-align: center; }
.stat b { display: block; font: 800 20px var(--mono); }
.stat span { font: 800 10px var(--mono); text-transform: uppercase; color: var(--mute); }

/* missões */
.quest { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel2); margin: 4px 4px 12px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink); width: calc(100% - 8px); text-align: left; }
.quest:last-child { margin-bottom: 4px; }
.quest .t { font-weight: 700; } .quest .s { font-size: 13px; color: var(--mute); }
.quest.done { background: #1f4a3a; } .quest.done .t { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .8; }
.quest.wait { background: #4a3a1f; }
.quest .box { width: 30px; height: 30px; background: var(--ink); border: 3px solid var(--line); display: grid; place-items: center; font: 800 18px var(--mono); flex: none; }
.quest.done .box { background: var(--green); color: var(--ink); border-color: var(--ink); }
.quest.wait .box { background: var(--amber); color: var(--ink); border-color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--panel2); margin: 4px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink);
  font: 800 12px var(--mono); text-transform: uppercase; text-align: center; }
.tile .spr { filter: grayscale(1) brightness(.6); transition: filter .2s; }
.tile.lit .spr { filter: none; }
.tile.on { background: #1f4a3a; } .tile.on .spr { filter: none; animation: pop .35s steps(3); }
.tile small { color: var(--mute); font-size: 10px; }
@keyframes pop { 50% { transform: scale(1.35); } }
.picks { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.picks .spr.off { filter: grayscale(1) brightness(.45); }
.meter { display: flex; gap: 3px; flex-wrap: wrap; }
.meter i { width: 14px; height: 14px; background: var(--ink); border: 2px solid var(--line); }
.meter i.f { background: var(--amber); border-color: var(--ink); }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 10px; }
.chip { flex: none; padding: 6px 10px; font: 800 12px var(--mono); color: var(--ink); background: #cfd8dc; border: 3px solid var(--ink); }
.chip small { display: block; font-weight: 700; opacity: .7; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px; background: linear-gradient(90deg, #5a3d10, #7a4a12); }
.banner.cool { background: linear-gradient(90deg, #0f4a5c, #15607a); }

/* mapa da semana */
.days { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin-bottom: 8px; }
.days button { flex: 1; min-width: 44px; padding: 8px 4px; font: 800 12px var(--mono); text-transform: uppercase; background: var(--panel); color: var(--mute); border: 3px solid var(--ink); }
.days button.on { background: var(--amber); color: var(--ink); }
.days button.today { border-color: var(--cyan); }
.grid { display: grid; gap: 6px; }
.slot { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border: 3px solid var(--ink); background: var(--panel); width: 100%; text-align: left; }
.slot .h { font: 800 11px var(--mono); color: var(--mute); width: 46px; flex: none; }
.slot.lesson { color: var(--ink); font-weight: 800; } .slot.lesson .h { color: #0b0818aa; }
.slot.fixed { background: #1a1638; color: var(--mute); font-size: 14px; }
.slot.free { border-style: dashed; border-color: var(--line); color: var(--mute); }
.slot.k-study { background: #2f7d43; color: #fff; } .slot.k-play { background: #2f6fd0; color: #fff; }
.slot.k-sport { background: #d9822b; color: #fff; } .slot.k-family { background: #8a55d6; color: #fff; }
.slot[class*="k-"] .h { color: #ffffffbb; }
.slot .n { font-size: 13px; opacity: .85; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; margin: 10px 4px; }
.legend i { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--ink); vertical-align: -2px; margin-right: 5px; }
.week7 { display: none; }
@media (min-width: 980px) {
  .week7 { display: grid; grid-template-columns: 56px repeat(7, 1fr); gap: 4px; }
  .week7 .hd { font: 800 12px var(--mono); text-transform: uppercase; text-align: center; padding: 6px 2px; background: var(--ink); }
  .week7 .hd.today { color: var(--amber); }
  .week7 .hr { font: 800 11px var(--mono); color: var(--mute); display: grid; place-items: center; }
  .week7 .slot { min-height: 46px; padding: 4px 6px; font-size: 13px; justify-content: center; text-align: center; flex-direction: column; gap: 0; }
  .week7 .slot .h { display: none; }
  .day1 { display: none; }
}

/* diário */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin-bottom: 10px; }
.tabs button { flex: 1; padding: 10px 8px; font: 800 12px var(--mono); text-transform: uppercase; background: var(--panel); color: var(--mute); border: 3px solid var(--ink); white-space: nowrap; }
.tabs button.on { background: var(--cyan); color: var(--ink); }
.subj { padding: 10px; background: var(--panel2); border-left: 10px solid; margin-bottom: 10px; }
.subj .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 800; }
.hearts { display: flex; gap: 2px; margin-left: auto; }
.hearts button { padding: 3px; } .hearts .off { filter: grayscale(1) brightness(.5); }
.gauge { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gauge .lb { width: 76px; font: 800 12px var(--mono); text-transform: uppercase; color: var(--mute); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 26px; height: 26px; accent-color: var(--green); flex: none; }

/* caminho */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier { padding: 10px 6px; text-align: center; background: var(--panel2); border: 3px solid var(--ink); font: 800 12px var(--mono); text-transform: uppercase; }
.tier small { display: block; color: var(--mute); } .tier.lock { opacity: .5; } .tier.lock .spr { filter: grayscale(1) brightness(.5); }
.tier.now { border-color: var(--amber); background: #4a3a1f; }
.region { font: 800 12px var(--mono); text-transform: uppercase; margin: 12px 4px 6px; }
.trail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; }
.node { position: relative; padding: 10px 4px; text-align: center; }
.node::before { content: ""; position: absolute; top: 28px; left: 0; right: 0; height: 6px; background: repeating-linear-gradient(90deg, #7a5a2b 0 8px, #5c3a1a 8px 16px); z-index: 0; }
.node:first-child::before { left: 50%; } .node:last-child::before { right: 50%; }
.node .b { position: relative; z-index: 1; width: 44px; height: 44px; margin: 0 auto 4px; display: grid; place-items: center; background: var(--ink); border: 3px solid var(--line); font: 800 12px var(--mono); }
.node.past .b { background: var(--green); color: var(--ink); border-color: var(--ink); }
.node.cur .b { background: var(--amber); color: var(--ink); border-color: var(--ink); animation: bob 1s infinite steps(2); }
.node small { font: 800 11px var(--mono); color: var(--mute); }
table.xp { width: 100%; border-collapse: collapse; font-size: 14px; }
table.xp td { padding: 7px 4px; border-bottom: 2px solid var(--ink); } table.xp td:last-child { text-align: right; font: 800 13px var(--mono); color: var(--green); white-space: nowrap; }

/* entrada */
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 22px; }
.logo { text-align: center; } .logo h1 { font-size: 34px; color: var(--amber); text-shadow: 4px 4px 0 var(--ink); }
.logo p { color: var(--mute); margin-top: 6px; }
.faces { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.face { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 18px; min-width: 124px; background: var(--panel); margin: 4px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), 0 10px 0 0 #00000055;
  font: 800 14px var(--mono); text-transform: uppercase; }
.face:hover .spr, .face:focus-visible .spr { animation: bob .5s infinite steps(2); }
.pin { display: flex; gap: 12px; justify-content: center; margin: 14px 0; }
.pin i { width: 22px; height: 22px; background: var(--ink); border: 3px solid var(--line); } .pin i.f { background: var(--amber); border-color: var(--ink); }
.pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 6px; justify-content: center; }
.pad button { height: 64px; font: 800 24px var(--mono); background: var(--panel2); border: 4px solid var(--ink); }
.pad button:active { background: var(--amber); color: var(--ink); }
.shake { animation: shake .3s steps(4); } @keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* folhas (modais) e efeitos */
#sheet:empty, #overlay:empty { display: none; }
#sheet { position: fixed; inset: 0; z-index: 40; background: #0b0818cc; display: flex; align-items: flex-end; justify-content: center; }
#sheet .panel { width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; background: var(--panel); border-top: 6px solid var(--amber); padding: 18px 16px 26px; animation: up .18s steps(4); }
@media (min-width: 700px) { #sheet { align-items: center; } #sheet .panel { border: 6px solid var(--ink); outline: 4px solid var(--amber); } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
#overlay { position: fixed; inset: 0; z-index: 50; background: radial-gradient(circle at 50% 40%, #2a2160, #0b0818); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; text-align: center; }
.clock { font: 800 clamp(64px, 22vw, 150px)/1 var(--mono); color: var(--amber); text-shadow: 6px 6px 0 var(--ink); }
.clock.rest { color: var(--green); }
.rock { position: relative; width: 180px; height: 130px; }
.rock .stone { position: absolute; right: 8px; bottom: 0; width: 84px; height: 72px; background: #6b7280; box-shadow: inset -12px -12px 0 0 #4b5160, inset 8px 8px 0 0 #8b93a3, 0 0 0 4px var(--ink); }
.rock .stone::after { content: ""; position: absolute; left: 22px; top: 20px; width: 12px; height: 12px; background: var(--cyan); box-shadow: 24px 18px 0 0 var(--cyan), 6px 30px 0 0 var(--amber); animation: twinkle 1.2s infinite steps(2); }
.rock .me { position: absolute; left: 0; bottom: 0; }
.rock .tool { position: absolute; left: 52px; bottom: 34px; transform-origin: 50% 90%; animation: swing 1s infinite steps(4); }
.rock.rest .tool { animation: none; transform: rotate(60deg); } .rock.rest .me { animation: bob 1s infinite steps(2); }
.ring { width: min(420px, 86vw); }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.float { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); font: 800 34px var(--mono); color: var(--cyan); text-shadow: 4px 4px 0 var(--ink); animation: rise 1.3s steps(12) forwards; white-space: nowrap; }
@keyframes rise { to { transform: translate(-50%, -150px); opacity: 0; } }
.bit { position: absolute; width: 8px; height: 8px; animation: burst .9s steps(8) forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: 92vw; padding: 10px 16px; background: var(--ink); border: 3px solid var(--amber); font-weight: 700; text-align: center; animation: toast 3.2s steps(1) forwards; }
.toast.err { border-color: var(--red); } @keyframes toast { 0% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
.levelup h1 { font-size: 38px; color: var(--amber); text-shadow: 5px 5px 0 var(--ink); animation: pop .6s steps(4) infinite; }

/* guardião */
.kid { display: flex; gap: 12px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 10px 0; }
.note { background: var(--ink); padding: 10px; border-left: 6px solid var(--line); font-size: 14px; margin-bottom: 8px; white-space: pre-wrap; }
.note b { display: block; font: 800 11px var(--mono); text-transform: uppercase; color: var(--mute); margin-bottom: 2px; }
.list > div { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 2px solid var(--ink); }
.list > div:last-child { border: 0; }
.dayset { display: flex; gap: 4px; flex-wrap: wrap; }
.dayset button { width: 42px; height: 42px; font: 800 12px var(--mono); background: var(--ink); border: 3px solid var(--line); color: var(--mute); }
.dayset button.on { background: var(--green); color: var(--ink); border-color: var(--ink); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 40px; height: 40px; border: 4px solid var(--ink); } .swatches button.on { outline: 4px solid var(--amber); }
.tt { overflow-x: auto; } .tt table { border-collapse: collapse; min-width: 560px; width: 100%; }
.tt th { font: 800 11px var(--mono); text-transform: uppercase; color: var(--mute); padding: 4px; }
.tt td { padding: 2px; } .tt select { min-height: 36px; padding: 2px 4px; font-size: 13px; border-width: 2px; }
.icons { display: flex; gap: 6px; flex-wrap: wrap; } .icons button { padding: 6px; border: 3px solid var(--line); background: var(--ink); } .icons button.on { border-color: var(--amber); background: var(--panel2); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* loja, avatar */
.avbtn { padding: 2px; border: 3px solid var(--line); background: var(--ink); line-height: 0; }
.avbtn:hover, .avbtn:focus-visible { border-color: var(--amber); outline: none; }
.avstage { padding: 14px; margin-bottom: 12px; background: linear-gradient(#2f5fd0, #8fd0ff 70%, #6fd36b 70%, #6fd36b 76%, #8a5a2b 76%); border: 4px solid var(--ink); position: sticky; top: -18px; z-index: 2; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { padding: 6px 4px 4px; min-width: 76px; border: 3px solid var(--line); background: var(--ink); font: 800 10px var(--mono); text-transform: uppercase; text-align: center; color: var(--mute); }
.opt.on { border-color: var(--amber); background: var(--panel2); color: var(--text); }
.opt.lock { opacity: .6; }
.banner h1 { font-size: 40px; color: var(--amber); text-shadow: 4px 4px 0 var(--ink); line-height: 1; }
div.quest { flex-wrap: wrap; }
div.quest .grow { min-width: 150px; }
#sheet .panel.still { animation: none; }

/* cena v3: mineiro a trabalhar, paralaxe e partículas */
.scene { height: 256px; }
.scene .air { inset: 0 0 36% 0; }
.scene .ground { inset: 64% 0 0 0; background-size: 288px 144px; z-index: 3; }
.scene .far { position: absolute; left: 0; width: 300%; bottom: 36%; height: 60px; background-size: 512px 60px; background-repeat: repeat-x; image-rendering: pixelated; animation: pan 70s linear infinite; z-index: 1; }
.scene.under .far { opacity: .75; height: 44px; background-size: 512px 44px; }
.scene .stal { position: absolute; left: 0; right: 0; top: 0; height: 48px; background-size: 420px 48px; background-repeat: repeat-x; image-rendering: pixelated; z-index: 1; }
@keyframes pan { to { transform: translateX(-512px); } }
.scene .sun { position: absolute; right: 13%; top: 56px; width: 28px; height: 28px; background: #fff3a0; box-shadow: 0 0 0 4px #ffd23f, 0 0 0 8px #ffd23f55; animation: flicker 3s infinite steps(2); z-index: 1; }
.scene .moon { position: absolute; right: 13%; top: 56px; width: 26px; height: 26px; background: #efeaff; box-shadow: inset -7px -5px 0 0 #b9b2e6, 0 0 0 6px #ffffff18; z-index: 1; }
.scene .cloud { z-index: 1; }
.scene .twinkle { z-index: 1; }
.scene .glow { left: 17%; top: 4px; bottom: auto; width: 220px; height: 170px; transform: translateX(-45%); z-index: 1; }
.scene .lampw { position: absolute; left: 17%; top: 40px; margin-left: -17px; line-height: 0; z-index: 2; transform-origin: 50% -30px; animation: sway 3.2s infinite steps(6); }
@keyframes sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.scene .mote { position: absolute; bottom: 38%; width: 3px; height: 3px; opacity: 0; animation: mote 9s linear infinite; z-index: 2; }
@keyframes mote { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .85; } 100% { transform: translate(22px, -140px); opacity: 0; } }
.scene .rail { position: absolute; left: 0; right: 0; bottom: 36%; height: 4px; background: repeating-linear-gradient(90deg, #4a5064 0 12px, #17122b 12px 16px); z-index: 2; }
.scene .cartw { position: absolute; bottom: calc(36% + 1px); left: -60px; line-height: 0; z-index: 2; animation: cart 20s linear infinite; }
@keyframes cart { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(1300px); } }
.scene .spark { z-index: 3; }
.scene .stage { position: absolute; left: 50%; bottom: 36%; transform: translateX(-50%); display: flex; align-items: flex-end; z-index: 4; }
.scene .stage .me { position: relative; line-height: 0; animation: work 1.1s steps(1) infinite; }
@keyframes work { 0% { transform: translateY(0); } 50% { transform: translateY(3px); } 70% { transform: translateY(0); } }
.scene .stage .tool { margin-left: -20px; margin-bottom: 22px; line-height: 0; transform-origin: 12% 88%; animation: strike 1.1s steps(1) infinite; }
@keyframes strike { 0% { transform: rotate(-58deg); } 28% { transform: rotate(-25deg); } 50% { transform: rotate(34deg); } 70% { transform: rotate(4deg); } }
.scene .stage .rk { margin-left: -4px; line-height: 0; position: relative; animation: shake 1.1s steps(1) infinite; }
@keyframes shake { 0%, 49% { transform: none; } 50% { transform: translate(3px, 1px); } 60% { transform: translate(-1px, 0); } 70% { transform: none; } }
.shard { position: absolute; left: 8px; top: 20px; width: 5px; height: 5px; opacity: 0; animation: shard 1.1s linear infinite; }
@keyframes shard { 0%, 49% { opacity: 0; transform: none; } 50% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(var(--cx), var(--cy)); } }
.pop { position: absolute; left: 26px; top: 0; line-height: 0; opacity: 0; animation: pop2 4.4s linear infinite; }
@keyframes pop2 { 0%, 72% { opacity: 0; transform: none; } 76% { opacity: 1; transform: translateY(-8px); } 100% { opacity: 0; transform: translateY(-78px); } }
@keyframes blink { 0%, 94% { opacity: 0; } 95%, 100% { opacity: 1; } }
.flames { display: flex; align-items: center; gap: 2px; }
.flames .off { filter: grayscale(1) brightness(.35); }
.flames .lit { animation: bob 1s infinite steps(2); }
.flames .lit:nth-child(even) { animation-delay: -.5s; }
.xpbar.goal i.f { background: var(--amber); box-shadow: inset 0 -4px 0 0 var(--amber2), inset 0 3px 0 0 #fff0a0; }
.xpbar.goal.met i.f { background: var(--green); box-shadow: inset 0 -4px 0 0 #2f9e52, inset 0 3px 0 0 #b6f09a; }
.weeknav { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
textarea:disabled, input:disabled { opacity: .8; border-style: dashed; }
.scene .hud, .scene .depth { z-index: 6; }
.scene .stage .tool { margin-left: -8px; margin-bottom: 16px; }
.quest { flex-wrap: wrap; }
.quest .grow { min-width: 140px; }
.days button { min-width: 36px; padding: 8px 2px; }

/* rotina e bloqueios */
.slot.blocked { background: repeating-linear-gradient(135deg, #1a1638 0 10px, #241e4a 10px 20px); color: var(--mute); border-color: var(--ink); }
.week7 .slot.blocked { flex-direction: row; }
.ttday { display: grid; gap: 4px; }
.ttrow { display: flex; align-items: center; gap: 10px; margin: 0; padding: 4px 6px; background: var(--ink); border-left: 6px solid var(--line); color: var(--text); text-transform: none; letter-spacing: 0; font: inherit; }
.ttrow .mono { width: 52px; flex: none; font-size: 12px; color: var(--mute); }
.ttrow select { min-height: 38px; padding: 4px 8px; }
.ttrow.ls { border-left-color: var(--cyan); } .ttrow.rt { border-left-color: var(--amber); } .ttrow.blk { border-left-color: var(--red); }
#sheet .days { padding: 4px 0; }

/* economia */
.float.coin { top: 52%; color: var(--amber); display: flex; align-items: center; gap: 6px; }
.econ { display: grid; gap: 8px; }
.econ label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 8px; background: var(--ink); color: var(--text); text-transform: none; letter-spacing: 0; font: 600 14px var(--sans); }
.econ input { width: 84px; flex: none; margin-left: auto; min-height: 40px; padding: 4px 8px; }
.econ span { width: 64px; flex: none; color: var(--mute); font-size: 13px; }

/* sequência diária, orbe de XP e ícones grandes nas tarefas */
.streak.risk { box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), inset 0 0 0 3px var(--amber); }
.bigflame { position: relative; line-height: 0; flex: none; }
.bigflame b { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font: 800 18px/1 var(--mono); color: #fff; text-shadow: 2px 2px 0 var(--ink); }
.bigflame .off + b { color: var(--mute); }
.weekflames { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin: 12px 0 4px; text-align: center; }
.weekflames div { padding: 4px 0; line-height: 0; }
.weekflames small { display: block; margin-top: 4px; font: 800 10px/1 var(--mono); text-transform: uppercase; color: var(--mute); }
.weekflames .now { background: var(--ink); }
.weekflames .now small { color: var(--amber); }
.spr.dim { opacity: .35; }
.xpbar i.f { background: #7ee05a; box-shadow: inset 0 -4px 0 0 #2f9e52, inset 0 3px 0 0 #d6ffb0; }
.float { color: #9df07a; display: flex; align-items: center; gap: 6px; }


/* avatar v4 */
.spr .lid { opacity: 0; animation: blink 4.2s steps(1) infinite; }
.avstage { padding: 10px; }
.avtabs { margin: 0 -4px 10px; }
.opt { min-width: 84px; }

/* mineiro em fotogramas: preparar (1) → balançar (2) → bater (3) → balançar (2) → preparar (1) */
.miner .mf2, .miner .mf3 { opacity: 0; }
.miner .mf { animation: 1.1s linear infinite; }
.miner .mf1 { animation-name: mf1; } .miner .mf2 { animation-name: mf2; } .miner .mf3 { animation-name: mf3; }
@keyframes mf1 { 0%, 37.9% { opacity: 1; } 38%, 89.9% { opacity: 0; } 90%, 100% { opacity: 1; } }
@keyframes mf2 { 0%, 37.9% { opacity: 0; } 38%, 49.9% { opacity: 1; } 50%, 79.9% { opacity: 0; } 80%, 89.9% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes mf3 { 0%, 49.9% { opacity: 0; } 50%, 79.9% { opacity: 1; } 80%, 100% { opacity: 0; } }
.scene .stage .rk { margin-left: -18px; }
.scene .stage .me { z-index: 2; }
.rock { width: 210px; }
.rock .me { line-height: 0; }

/* avisos: recompensa entregue, nota vista */
.notice { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gift { position: relative; width: 200px; height: 190px; }
.gift .chestbox { position: absolute; left: 40px; bottom: 0; line-height: 0; animation: chestshake .7s steps(6) 1; }
.gift .prize { position: absolute; left: 52px; bottom: 34px; line-height: 0; opacity: 0; animation: prize 1s .65s steps(10) forwards, bob 1s 1.7s infinite steps(2); }
.gift .rays { position: absolute; left: 50%; top: 46%; width: 240px; height: 240px; margin: -120px 0 0 -120px; opacity: 0;
  background: repeating-conic-gradient(#ffd23f33 0 12deg, transparent 12deg 30deg); border-radius: 50%; }
.notice.happy .rays { animation: rays 8s .7s linear infinite, fadein .4s .7s forwards; }
@keyframes chestshake { 20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); } }
@keyframes prize { 0% { opacity: 0; transform: translateY(40px) scale(.4); } 60% { opacity: 1; transform: translateY(-70px) scale(1.15); } 100% { opacity: 1; transform: translateY(-58px) scale(1); } }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes fadein { to { opacity: 1; } }

/* bateria de ecrã */
.battery { display: flex; gap: 3px; padding: 5px; height: 42px; min-width: 120px; flex: 1; max-width: 240px; background: var(--ink); border: 4px solid #cfd6e0; }
.battery i { flex: 1; background: #2b2558; }
.battery i.f { background: var(--green); box-shadow: inset 0 -5px 0 0 #2f9e52, inset 0 4px 0 0 #b6f09a; }
.battery.low i.f { background: var(--amber); box-shadow: inset 0 -5px 0 0 var(--amber2), inset 0 4px 0 0 #fff0a0; }
.battery.empty { border-color: var(--red); }
.nub { width: 7px; height: 18px; background: #cfd6e0; margin-left: -10px; flex: none; }
.cells { display: flex; gap: 3px; flex: none; }
.cells i { width: 10px; height: 18px; background: var(--cyan); border: 2px solid var(--ink); box-shadow: inset 0 3px 0 0 #c9fffc; }
.slot.k-screen { background: #b83f8f; color: #fff; }
.slot.free.scr { border-color: #b83f8f; color: #e9a9d2; }
.ttrow.scr { border-left-color: #b83f8f; }
.scrbtn { flex: none; padding: 5px; line-height: 0; background: var(--panel); border: 3px solid var(--line); }
.scrbtn .spr { filter: grayscale(1) brightness(.55); }
.scrbtn.on { border-color: #b83f8f; background: #4a1f3c; } .scrbtn.on .spr { filter: none; }
.scrbtn[disabled] { opacity: .25; }

/* evolução: gráficos de barras de uma série */
.chart { margin: 14px 0 4px; }
.chart h3 { color: var(--text); margin-bottom: 2px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 18px 2px 0; border-bottom: 2px solid var(--line); margin-bottom: 18px; }
.barcol { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; outline: none; }
.barcol i { display: block; width: 62%; max-width: 30px; min-height: 2px; background: var(--cyan); }
.barcol i.zero { background: var(--line); }
.barcol .val { font: 800 11px var(--mono); color: var(--text); margin-bottom: 3px; min-height: 13px; }
.barcol small { position: absolute; bottom: -17px; font: 700 10px var(--mono); color: var(--mute); white-space: nowrap; }
.barcol:hover i, .barcol:focus i { background: #c9fffc; }
.barcol:hover::after, .barcol:focus::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); z-index: 5; white-space: nowrap;
  background: var(--ink); color: var(--text); border: 2px solid var(--cyan); padding: 4px 8px; font: 700 12px var(--sans); pointer-events: none; }
.barcol:first-child:hover::after, .barcol:first-child:focus::after { left: 0; transform: none; }
.barcol:last-child:hover::after, .barcol:last-child:focus::after { left: auto; right: 0; transform: none; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 34px; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.hbar div { height: 14px; background: var(--ink); } .hbar i { display: block; height: 100%; background: var(--cyan); }
.hbar b { font: 800 13px var(--mono); text-align: right; }
.mtable { border-collapse: collapse; font-size: 13px; margin-top: 10px; min-width: 620px; }
.mtable th, .mtable td { padding: 5px 8px; border-bottom: 2px solid var(--ink); text-align: right; white-space: nowrap; }
.mtable th:first-child, .mtable td:first-child { text-align: left; }
.mtable th { font: 800 11px var(--mono); text-transform: uppercase; color: var(--mute); }
.nav button { min-width: 0; }
@media (prefers-reduced-motion: reduce) { .gift .prize { opacity: 1; transform: translateY(-58px); } .notice.happy .rays { opacity: 1; } }
.chart { margin-top: 24px; }

.battery.big { height: auto; min-height: 42px; flex-wrap: wrap; max-width: none; gap: 2px; }
.battery.big i { flex: 0 0 calc(5% - 2px); min-width: 8px; height: 14px; }
.battery i.x { background: #1d4a5c; } .battery i.x.f { background: var(--cyan); box-shadow: inset 0 -4px 0 0 #1b8fb0, inset 0 3px 0 0 #bff3ff; }

/* ============ experiência: toques, transições, leitor, mina em corte ============ */
[data-a="poke"] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.iconbtn { width: 38px; height: 38px; font: 800 20px var(--mono); color: var(--amber); background: var(--ink); border: 3px solid var(--line); line-height: 1; }
.iconbtn.off { color: var(--mute); text-decoration: line-through; }
.shell.enter > *:not(.top) { animation: enter .28s steps(6) backwards; }
.shell.enter > *:nth-child(3) { animation-delay: .05s; } .shell.enter > *:nth-child(4) { animation-delay: .1s; } .shell.enter > *:nth-child(n+5) { animation-delay: .15s; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } }
.nav button.hop .spr { animation: hop .35s steps(5); }
@keyframes hop { 40% { transform: translateY(-9px) scale(1.2); } }
.nav button:active .spr { transform: scale(.88); }
.tile:active, .quest:active, .qchip:active { transform: translateY(2px); }

/* atalhos das missões de hoje */
.quests { display: flex; gap: 6px; margin: 12px 4px 4px; }
.qchip { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; background: var(--panel2); color: var(--text);
  box-shadow: 0 0 0 3px var(--ink), inset 0 -4px 0 0 #00000040; }
.qchip b { font: 800 13px var(--mono); color: var(--amber); }
.qchip.done { background: #1f4a2c; } .qchip.done b { color: var(--green); font-size: 16px; line-height: 13px; }
.qchip:not(.done) .spr { animation: bob 1.6s infinite steps(2); }
.qchip:nth-child(2) .spr { animation-delay: -.3s; } .qchip:nth-child(3) .spr { animation-delay: -.6s; } .qchip:nth-child(4) .spr { animation-delay: -.9s; }
.card.flash { animation: flash .9s steps(6); }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px var(--amber), 0 0 24px 6px #ffd23f66; } }

/* cena de Hoje: reações ao toque */
.scene .stage .me.jump { animation: jump .5s steps(8); }
@keyframes jump { 40% { transform: translateY(-34px); } 70% { transform: translateY(-8px); } }
.say { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 6px; padding: 5px 9px; white-space: nowrap; font: 800 13px/1.2 var(--mono);
  color: var(--ink); background: #fff; box-shadow: 0 0 0 3px var(--ink); animation: say 1.7s steps(10) forwards; z-index: 8; pointer-events: none; }
.say::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -4px; width: 8px; height: 8px; background: #fff; box-shadow: 3px 0 0 0 var(--ink), -3px 0 0 0 var(--ink), 0 3px 0 0 var(--ink); }
@keyframes say { 0% { opacity: 0; transform: translate(-50%, 8px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
.scene .stage .rk.hit { animation: rkhit .25s steps(4); }
@keyframes rkhit { 25% { transform: translate(5px, 2px) scale(.96, 1.03); } 60% { transform: translate(-3px, 0); } }
.miner.whack .mf { animation-duration: .34s; }
.chipfx { position: absolute; left: 14px; top: 26px; width: 6px; height: 6px; animation: chipfx .5s steps(8) forwards; pointer-events: none; }
@keyframes chipfx { to { transform: translate(var(--cx), var(--cy)); opacity: 0; } }
.gemfx { position: absolute; left: 22px; top: 0; line-height: 0; animation: gemfx 1s steps(12) forwards; pointer-events: none; z-index: 7; }
@keyframes gemfx { 0% { transform: scale(.3); opacity: 0; } 25% { transform: translateY(-26px) scale(1.5); opacity: 1; } 100% { transform: translateY(-96px) scale(1); opacity: 0; } }
.sun.spin, .moon.spin { animation: skyspin .8s steps(10) !important; }
@keyframes skyspin { 50% { transform: rotate(180deg) scale(1.5); } 100% { transform: rotate(360deg); } }
.cloud.puff { animation-play-state: paused; opacity: .25; transition: opacity .2s; }
.lampw.bright { filter: brightness(1.9) drop-shadow(0 0 14px #ffd23f); }
.cartw.honk { filter: brightness(1.5); margin-bottom: 8px; }

/* foco: aventureiro a folhear o livro */
.reader .rf2, .reader .rf3, .reader .rf4 { opacity: 0; }
.reader .rf { animation: 3.6s linear infinite; }
.reader .rf1 { animation-name: rf1; } .reader .rf2 { animation-name: rf2; } .reader .rf3 { animation-name: rf3; } .reader .rf4 { animation-name: rf4; }
@keyframes rf1 { 0%, 81.9% { opacity: 1; } 82%, 100% { opacity: 0; } }
@keyframes rf2 { 0%, 81.9% { opacity: 0; } 82%, 87.9% { opacity: 1; } 88%, 100% { opacity: 0; } }
@keyframes rf3 { 0%, 87.9% { opacity: 0; } 88%, 93.9% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes rf4 { 0%, 93.9% { opacity: 0; } 94%, 100% { opacity: 1; } }
.me.flip .reader .rf { animation-duration: .45s; }
.study { position: relative; width: 260px; height: 190px; }
.study .halo { position: absolute; left: 50%; top: 46%; width: 240px; height: 240px; transform: translate(-50%, -50%); background: radial-gradient(circle, #ffd23f2e 0, #ffd23f12 45%, transparent 68%); animation: flicker 2.4s infinite steps(2); }
.study.rest .halo { background: radial-gradient(circle, #6fd36b33 0, transparent 66%); }
.study .me { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); line-height: 0; z-index: 2; animation: nod 3.6s steps(1) infinite; }
@keyframes nod { 0%, 84% { margin-bottom: 0; } 85%, 96% { margin-bottom: -3px; } }
.study.rest .me { animation: bob2 1s infinite steps(2); }
@keyframes bob2 { 50% { margin-bottom: 5px; } }
.study .desk { position: absolute; left: 6px; right: 6px; bottom: 0; height: 14px; background: #7a4a24; box-shadow: inset 0 4px 0 0 #a56a38, inset 0 -4px 0 0 #4f2e14, 0 0 0 4px var(--ink); z-index: 1; }
.study .lampw { position: absolute; left: 14px; bottom: 16px; line-height: 0; z-index: 2; transition: filter .2s; }
.study .pile { position: absolute; right: 12px; bottom: 16px; line-height: 0; z-index: 2; }
.study .glyph { position: absolute; bottom: 60%; font: 800 16px var(--mono); font-style: normal; color: var(--amber); opacity: 0; animation: glyph 5.4s linear infinite; z-index: 3; text-shadow: 2px 2px 0 var(--ink); }
.study .glyph:nth-of-type(odd) { color: var(--cyan); }
@keyframes glyph { 0% { transform: translateY(20px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(10px, -90px); opacity: 0; } }

/* caminho: a mina em corte */
.mine { margin: 4px; box-shadow: 0 0 0 4px var(--ink); position: relative; overflow: hidden; }
.msky { position: relative; height: 74px; overflow: hidden; }
.msky .sun, .msky .moon { position: absolute; right: 12%; top: 16px; width: 26px; height: 26px; }
.msky .sun { background: #fff3a0; box-shadow: 0 0 0 4px #ffd23f, 0 0 0 8px #ffd23f55; animation: flicker 3s infinite steps(2); }
.msky .moon { background: #efeaff; box-shadow: inset -7px -5px 0 0 #b9b2e6, 0 0 0 6px #ffffff18; }
.msky .cloud { position: absolute; height: 12px; background: #ffffffcc; box-shadow: 12px -8px 0 0 #ffffffcc, 28px 0 0 0 #ffffffcc; animation: drift 46s linear infinite; }
.msky .plate { position: absolute; left: 76px; top: 10px; background: #0b0818cc; padding: 6px 10px; font: 800 13px var(--mono); display: flex; align-items: center; gap: 6px; }
.msky .hoist { position: absolute; left: 14px; bottom: 0; width: 54px; height: 40px; border: 5px solid #5f3d1e; border-bottom: 0; box-shadow: inset 0 5px 0 0 #9a6a3a; }
.msky .hoist::after { content: ""; position: absolute; left: 50%; top: -3px; margin-left: -6px; width: 12px; height: 12px; background: #cfd6e0; box-shadow: 0 0 0 3px var(--ink); animation: rays 2s steps(8) infinite; }
.strata { position: relative; }
.lay { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; height: 66px; padding: 0 10px 0 78px; text-align: left; color: #fff;
  background-size: 288px 144px; image-rendering: pixelated; border-top: 6px solid; }
.lay.lock::before { content: ""; position: absolute; inset: 0; background: #0b0818b0; }
.lay.lock .lbl, .lay.lock .tag { position: relative; }
.lay.lock .lbl .spr { filter: grayscale(.6) brightness(.8); }
.lay .lbl > span { min-width: 0; }
.lay .tag { flex: none; }
.lay.now { box-shadow: inset 0 0 0 3px var(--amber); }
.lay .lbl { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; background: #0b0818b8; padding: 5px 8px; }
.lay .lbl b { display: block; font: 800 12px var(--mono); text-transform: uppercase; }
.lay .lbl small { display: block; font-size: 11px; color: #ffffffcc; }
.lay .tag.here { background: var(--amber); color: var(--ink); animation: flicker 1.2s infinite steps(2); }
.lay .tag.lk { display: flex; align-items: center; gap: 4px; color: #fff; }
.lay .spark { position: absolute; width: 5px; height: 5px; animation: twinkle 1.4s infinite steps(2); }
.lay.ping { animation: ping .5s steps(5); } @keyframes ping { 40% { filter: brightness(1.6); } }
.lay.nope { animation: nope .3s steps(4); } @keyframes nope { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.strata .shaft { position: absolute; left: 14px; top: 0; bottom: 0; width: 54px; background: #0b0818; box-shadow: inset 5px 0 0 0 #5f3d1e, inset -5px 0 0 0 #5f3d1e; pointer-events: none;
  background-image: repeating-linear-gradient(180deg, transparent 0 28px, #5f3d1e55 28px 33px); }
.strata .rope { position: absolute; left: 40px; top: 0; width: 3px; height: calc(var(--li) * 66px + 10px); background: #cfd6e0; pointer-events: none; animation: rope 1.6s steps(12) backwards; }
@keyframes rope { from { height: 0; } }
.strata .lift { position: absolute; left: 19px; top: calc(var(--li) * 66px + 10px); width: 44px; height: 50px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; line-height: 0;
  background: #17122b; box-shadow: inset 0 0 0 3px #f2a93b, 0 0 14px 2px #ffd23f55; animation: descend 1.6s steps(12) backwards; z-index: 2; }
@keyframes descend { from { top: -44px; } }
.strata .lift .spr { animation: bob 1.2s infinite steps(2); }
.strata .lift.ride { animation: ride 1.4s steps(14); }
@keyframes ride { 35% { transform: translateY(-40px); } 55% { transform: translateY(-40px); } 85% { transform: translateY(4px); } }

.study { height: 200px; }
.study .me { bottom: 4px; }
.study .desk { height: 40px; z-index: 3; box-shadow: inset 0 6px 0 0 #a56a38, inset 0 -6px 0 0 #4f2e14, inset 8px 0 0 0 #6a3e1c, inset -8px 0 0 0 #6a3e1c, 0 0 0 4px var(--ink); }
.study .lampw, .study .pile { bottom: 44px; z-index: 4; }
.study.rest .me { bottom: 44px; }
.study .me { bottom: 18px; }
.study.rest .me { bottom: 44px; }
.scene .stage { z-index: 7; }

/* ---- beta: boas-vindas, códigos, ligações */
.codein { text-transform: uppercase; letter-spacing: 3px; font: 800 20px var(--mono); text-align: center; }
.codebox { font: 800 22px var(--mono); letter-spacing: 3px; text-align: center; padding: 12px 8px; background: var(--ink); color: var(--amber); user-select: all; word-break: break-all; border: 3px dashed var(--line); }
.linkbtn { background: none; border: 0; padding: 4px; color: var(--cyan); font: inherit; text-decoration: underline; cursor: pointer; }
.gate a, .card a { color: var(--cyan); }

/* ---- ajuda (i), introdução e primeiros passos */
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; padding: 0; margin-left: 2px;
  font: 800 14px/1 Georgia, serif; font-style: italic; color: var(--ink); background: var(--cyan); border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 2px var(--ink); vertical-align: middle; }
.ibtn:hover, .ibtn:focus-visible { background: #fff; outline: none; }
.ibtn.big { width: 44px; height: 44px; font-size: 26px; }
.chipline { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--ink); font: 800 13px var(--mono); }
.tour { position: relative; width: min(440px, 92vw); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: up .3s steps(6); }
.tour h2 { font-size: 24px; color: var(--amber); text-shadow: 3px 3px 0 var(--ink); justify-content: center; }
.tour p { color: var(--text); font-size: 17px; line-height: 1.5; max-width: 360px; }
.tart { min-height: 130px; display: flex; align-items: flex-end; justify-content: center; gap: 10px; }
.tart .spr { animation: bob 1.4s infinite steps(2); }
.tdots { display: flex; gap: 8px; margin: 4px 0; }
.tdots i { width: 10px; height: 10px; background: var(--line); } .tdots i.on { background: var(--amber); }
.tskip { position: absolute; top: -34px; right: 0; color: var(--mute); }
.onb { border: 0; box-shadow: 0 0 0 4px var(--amber), 0 0 0 8px var(--ink); }
.onb .box { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--amber); font: 800 14px var(--mono); flex: none; }
.onb .okstep { opacity: .55; } .onb .okstep .box { background: var(--green); color: var(--ink); }

/* ---- modo visual */
.vischk { margin: 4px 0 14px; padding: 10px; background: var(--ink); align-items: flex-start; }
.shell.vis .card > h2 { font-size: 20px; }
.shell.vis .qchip .spr { width: 40px; height: 40px; }
.shell.vis .qchip b { font-size: 16px; }
.wizard { display: flex; align-items: flex-end; gap: 10px; width: calc(100% - 8px); margin: 12px 4px 4px; text-align: left; color: var(--text); background: linear-gradient(135deg, #2a1d5c, #3b2a7a); cursor: pointer; }
.wizard .wz { line-height: 0; flex: none; animation: bob 2s infinite steps(2); }
.wizard .bubble { position: relative; flex: 1; padding: 10px 12px; background: #fff; color: var(--ink); font: 700 16px/1.35 var(--sans, system-ui); box-shadow: 0 0 0 3px var(--ink); margin-bottom: 18px; }
.wizard .bubble::before { content: ""; position: absolute; left: -9px; bottom: 10px; width: 10px; height: 10px; background: #fff; box-shadow: -3px 0 0 0 var(--ink), 0 3px 0 0 var(--ink); }
.wizard .say-ic { float: right; margin-left: 6px; }
.wizard .wz.jump { animation: jump .5s steps(8); }
.ctiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ctile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 10px; margin: 4px; background: var(--panel2); color: var(--text);
  font: 800 13px var(--mono); text-transform: uppercase; text-align: center; box-shadow: 0 0 0 3px var(--ink), inset 0 -5px 0 0 #00000040; }
.ctile .mark { position: absolute; top: 4px; right: 6px; font: 800 13px var(--mono); color: var(--green); }
.ctile.done { background: #1f4a2c; } .ctile.done .spr { opacity: .6; } .ctile.done .mark { font-size: 22px; }
.ctile.wait { background: #4a3a1f; } .ctile:active { transform: translateY(2px); }
.picks.big { justify-content: center; gap: 14px; }
.btn.big { font-size: 20px; padding: 16px; }
.vflame h2 { font-size: 22px; margin-bottom: 8px; }

/* ---- relíquias */
.relicbar i.f { background: var(--amber); box-shadow: inset 0 -4px 0 0 var(--amber2), inset 0 3px 0 0 #fff0a0; }
.scene .wallrelic { position: absolute; z-index: 2; line-height: 0; filter: drop-shadow(0 0 6px #ffd23f88); animation: bob 2.4s infinite steps(2); }
.scene.aura .stage .me .miner { filter: drop-shadow(0 0 6px #ffd23f) drop-shadow(0 0 14px #ffd23f88); }
.scene.legend .stage .me .miner { filter: drop-shadow(0 0 6px #fff3a0) drop-shadow(0 0 16px #ff7eb6aa); }
.scene .st { position: absolute; width: 5px; height: 5px; background: #fff3a0; box-shadow: 0 0 6px #ffd23f; animation: trail 1.8s infinite steps(6); }
.scene .st.s1 { left: 10%; top: 20%; } .scene .st.s2 { left: 70%; top: 10%; animation-delay: -.6s; } .scene .st.s3 { left: 40%; top: 0; animation-delay: -1.2s; }
@keyframes trail { 0% { opacity: 0; transform: translate(0, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-30px, 40px); } }
.lay.deep { box-shadow: inset 0 0 0 3px #ffd23f, inset 0 0 30px #ffd23f55; }
.relics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.relic { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; background: var(--ink); color: var(--text); font: 800 10.5px var(--mono); text-transform: uppercase; text-align: center; }
.relic.lock .spr { filter: grayscale(1) brightness(.35); } .relic.lock span { color: var(--mute); }
button.relic:active { transform: translateY(2px); }
@media (max-width: 380px) { .relics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- avatar: abas com ícones */
.avtabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; }
.avtabs .avic { font-size: 24px; line-height: 1; }
.shell.vis ~ #sheet .avtabs .avic, .vis .avtabs .avic { font-size: 30px; }
/* ---- mapa: tarefas e vista da semana */
.slot.k-chore { background: #1f8f86; color: #fff; }
.slot .short { display: none; }
.ctile .when { display: block; font: 800 11px var(--mono); font-style: normal; color: var(--cyan); }
.mapview { margin-top: -4px; }
.week7 .hd { border: 0; color: var(--text); cursor: pointer; }
.week7 .hr .mm { opacity: .6; }
@media (max-width: 979px) {
  .mapc.wk .day1 { display: none; }
  .mapc.wk .week7 { display: grid; grid-template-columns: 26px repeat(7, minmax(0, 1fr)); gap: 3px; }
  .mapc.wk .week7 .hd { font: 800 11px var(--mono); text-transform: uppercase; text-align: center; padding: 6px 0; background: var(--ink); }
  .mapc.wk .week7 .hd.today { color: var(--amber); }
  .mapc.wk .week7 .hr { font: 800 10px var(--mono); color: var(--mute); display: grid; place-items: center; }
  .mapc.wk .week7 .hr .mm { display: none; }
  .mapc.wk .week7 .slot { min-height: 34px; padding: 2px; gap: 0; justify-content: center; align-items: center; text-align: center; font: 800 9px var(--mono); border-width: 2px; overflow: hidden; }
  .mapc.wk .week7 .slot .h, .mapc.wk .week7 .full { display: none; }
  .mapc.wk .week7 .short { display: inline; }
  .mapc.wk .week7 .slot.lesson span, .mapc.wk .week7 .slot.fixed span { font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
}
@media (min-width: 980px) { .mapview { display: none; } .week7 .short { display: none; } }

/* ---- ligar dispositivos */
.qrhint { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 10px; background: var(--ink); border: 3px dashed var(--line); }
.qrhint .spr { flex: none; }
.qrbox { display: grid; place-items: center; padding: 8px; background: #fff; border: 4px solid var(--ink); width: fit-content; margin: 0 auto; }
.qrbox svg { width: min(240px, 64vw); height: auto; display: block; }
.linkline { margin: 10px 0 6px; padding: 8px; background: var(--ink); font: 700 11px var(--mono); word-break: break-all; color: var(--mute); }

/* ---- mapa: datas */
.days button .dn, .week7 .hd .dn { display: block; font-size: 15px; color: inherit; }
.tabs button .wkd { display: block; font-size: 10px; font-weight: 700; opacity: .8; text-transform: none; margin-top: 2px; }
/* ---- Hoje: cartões arrumáveis */
.hcards { display: grid; gap: 16px; }
.hcard { position: relative; }
.hcard > section { margin: 0 !important; }
.hcard > .hmin { position: absolute; top: 8px; right: 8px; z-index: 3; width: 28px; height: 28px; padding: 0; font: 800 16px var(--mono); line-height: 1; background: var(--ink); color: var(--mute); border: 2px solid var(--line); }
.hcard:not(.edit) > section > h2 { padding-right: 34px; }
.hcard.min > section > :not(h2) { display: none !important; }
.hcard.min > section { padding-bottom: 10px; opacity: .85; }
.hcard.min > section > h2 { margin: 0; }
.hcard.edit { outline: 3px dashed var(--amber); outline-offset: 3px; }
.hcard.edit > section { pointer-events: none; max-height: 140px; overflow: hidden; }
.hbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin-bottom: 6px; background: var(--amber); color: var(--ink); font-weight: 800; }
.hbar .btn { padding: 4px 8px; }
.hbar .grip { font-size: 26px; line-height: 1; cursor: grab; touch-action: none; padding: 0 6px; user-select: none; }
.hcard.dragging { opacity: .7; transform: scale(1.02); z-index: 5; }
.hcard.dragging .grip { cursor: grabbing; }
