:root{color-scheme:dark;--bg:#081b13;--surface:#142c21;--line:#345747;--gold:#f0ca76;--text:#f7f9ee;--muted:#b7cfbf;font:16px/1.45 system-ui,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text)}
.shell{width:min(100%,560px);min-height:100dvh;margin:auto;background:#0e241a;box-shadow:0 0 70px #0007}
.top{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:2;padding:calc(10px + env(safe-area-inset-top)) 18px 10px;background:linear-gradient(120deg,#1a3e2c,#10271c 62%,#363821);border-bottom:1px solid #bd944b85}
.top img{display:block;object-fit:contain}
.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.avatar{border-radius:50%;width:44px;padding:0;background:#293422;color:var(--gold);border:1px solid #a58447;font-weight:800}
main{padding:22px 17px calc(96px + env(safe-area-inset-bottom));min-height:70vh}
h1,h2,h3,p{margin:0 0 10px}
h1,h2{display:flex;align-items:center;gap:9px;line-height:1.15}
h1{font-size:30px;margin-bottom:20px;letter-spacing:-.025em}
h2{font-size:20px;margin:22px 0 10px}
h3{font-size:18px;overflow-wrap:anywhere}
svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
h1 svg,h2 svg{color:var(--gold);width:27px;height:27px}
.card,.empty{border:1px solid var(--line);border-radius:13px;padding:14px;background:var(--surface);margin-bottom:10px;overflow-wrap:anywhere}
.feature{border-color:#b39151;background:radial-gradient(ellipse at top right,#735625 0,transparent 58%),linear-gradient(125deg,#214432,#11291e 65%);box-shadow:0 6px 24px #0005}
.feature h3{font-size:24px;margin:8px 0 4px}.feature .wide{margin-top:7px}.badge{color:var(--gold);font-size:13px;font-weight:750}
small,.muted,.empty{color:var(--muted)}
button,.button,select,input,textarea{font:inherit}
button,.button{min-height:44px;border:1px solid #b9944c;border-radius:9px;padding:8px 13px;background:linear-gradient(#f6d992,#d1a34d);color:#211707;font-weight:750;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-align:center}
button:disabled{opacity:.65;cursor:wait}
.quiet{background:#1c3a2c;color:var(--text);border-color:#567764}
.compact{font-size:13px}
.wide{width:100%}
.tabs{position:fixed;z-index:3;bottom:0;width:min(100%,560px);display:grid;grid-template-columns:repeat(4,1fr);padding:3px 4px env(safe-area-inset-bottom);border-top:1px solid #626047;background:#112b20}
.tabs button{border:0;border-radius:0;background:transparent;color:#dce9dc;min-height:61px;padding:5px 1px;display:grid;gap:4px;justify-items:center;align-content:center;font-size:clamp(10px,3vw,13px);font-weight:620}
.tabs button[aria-current]{color:var(--gold);box-shadow:inset 0 2px var(--gold)}
.segment{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px}
label{display:grid;gap:5px;margin:0 0 11px;font-size:14px;font-weight:620}
input,select,textarea{min-height:44px;max-width:100%;width:100%;padding:8px 10px;background:#0a2017;color:var(--text);border:1px solid #62816e;border-radius:8px;font-size:16px}
textarea{min-height:85px;resize:vertical}
form button{margin-top:4px}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{text-align:left;padding:8px 5px;border-bottom:1px solid #385746;overflow-wrap:anywhere}
th:last-child,td:last-child{text-align:right}
th{color:var(--muted)}.mine{color:var(--gold);background:#363c24}
.deck{display:grid;grid-template-columns:64px 1fr;gap:12px}
.deck-mark{width:64px;height:72px;display:grid;place-items:center;color:#f5d69e;border:1px solid #bd944b;border-radius:9px;background:linear-gradient(145deg,#132a20,#396545,#152d22)}
.deck:nth-of-type(even) .deck-mark{border-color:#789257;background:linear-gradient(145deg,#15251e,#3b6550,#19251a)}
.deck-mark svg{width:34px;height:34px}
.deck h3{margin-bottom:3px}.deck .actions{margin-top:8px}
dialog{width:min(calc(100% - 24px),480px);max-height:85dvh;overflow:auto;border:1px solid #8f764b;border-radius:15px;background:#173225;color:var(--text);padding:17px}
dialog h2{margin-top:2px;padding-right:38px}
dialog::backdrop{background:#000b}
.close{float:right;width:44px;font-size:20px}
#notice{position:fixed;z-index:5;bottom:calc(72px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(calc(100% - 26px),460px);border:1px solid #b89252;border-radius:9px;background:#284332;color:#fff5de;padding:10px}
.error{color:#ffb1a2}.row{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
pre{white-space:pre-wrap;overflow-wrap:anywhere}
[hidden]{display:none!important}

/* Reinado Delta */
.top { border-bottom-color: #c49a52; }
.card { background: linear-gradient(155deg,#1b3c2c,#142c21 74%); }
.feature {
  background: radial-gradient(ellipse at top right,#6a5328,transparent 55%),
    linear-gradient(145deg,#25553d,#102b20 75%);
}
.tabs { background: linear-gradient(145deg,#112b20,#1b4835); border-top-color:#ae8544; }
.tabs button[aria-current] { background:#20503a; }
