[hidden] { display: none !important; }
@font-face { font-family: "Pixelify Sans"; src: url("fonts/PixelifySans.ttf") format("truetype");
             font-weight: 400 700; font-display: swap; }

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/AtkinsonHyperlegibleNext.ttf") format("truetype");
             font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("fonts/AtkinsonHyperlegibleMono.woff2") format("woff2");
             font-weight: 200 800; font-display: swap; }
:root {
  --bg: #0b0a12; --panel: #17132d; --panel2: #120f24; --line: #2e2556; --line2: #3d3170; --ink: #f3eeff; --dim: #a79ccc;
  --violet: #b36bff; --violet-d: #6d3fb3; --teal: #5ff3e0; --gold: #ffd27a; --red: #ff6b7d; --kick: #53fc18;

  --pixel: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Consolas, monospace;
  --logo: "Pixelify Sans", "Segoe UI", system-ui, sans-serif;
  --bar-h: 3.5em; --tabs-h: 4.2em;
  --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 10px 28px rgba(0,0,0,.28);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--bg); color: var(--ink); }

html { --cb-fs: 1; }
body { font: calc(16px * var(--cb-fs, 1))/1.5 var(--pixel); -webkit-font-smoothing: antialiased;
       background:
         radial-gradient(ellipse at 50% -10%, rgba(179,107,255,.20), transparent 60%),
         radial-gradient(ellipse at 100% 100%, rgba(95,243,224,.06), transparent 50%),
         var(--bg);
       background-attachment: fixed; }
#app { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; }
body.framed #app { padding-top: calc(var(--bar-h) + 18px); }
body.tabbed #app { padding-bottom: calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom)); }
.screen { max-width: 520px; margin: 0 auto; }
.screen.wide { max-width: 1120px; }
.screen { display: none; }
.screen.on { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

.logo { font-family: var(--logo); font-weight: 700; font-size: 2.6em; letter-spacing: .25em; padding-left: .25em; text-align: center;
        margin: 12vh 0 .2em; text-shadow: 0 0 18px rgba(179,107,255,.65), 0 3px 0 #3a2470; }
h2 { font-family: var(--pixel); font-weight: 800; font-size: 1.6em; letter-spacing: 0; margin: 6vh 0 .3em; line-height: 1.15; }
h3 { font-family: var(--pixel); font-weight: 700; font-size: .95em; margin: 20px 0 8px; color: var(--dim); letter-spacing: .08em;
     text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
h3::before { content: ""; width: .5em; height: .5em; background: var(--violet); box-shadow: 0 0 8px var(--violet); flex: none; }
.lead { color: var(--dim); text-align: center; margin-bottom: 1.2em; max-width: 46em; }
h2 + .lead { text-align: left; }
.dim { color: var(--dim); }
.small { font-size: .85em; }
.err { color: var(--red); margin-top: .8em; text-align: center; }
.hint { color: var(--dim); font-size: .85em; margin: .6em 0 0; }
.tight { margin-top: 6px; }
.right { text-align: right; }
.center { text-align: center; margin: 14px 0 10px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.reward { color: var(--gold); font-weight: 700; margin-top: 8px; }
.ok { color: var(--teal); font-weight: 700; }

.card { background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--line); border-radius: 12px;
        padding: 18px; margin: 12px 0; box-shadow: var(--shadow); }
.card.good { border-color: rgba(95,243,224,.6); color: var(--teal); background: linear-gradient(180deg, rgba(95,243,224,.10), var(--panel2)); }
.card.bad { border-color: rgba(255,107,125,.6); color: var(--red); background: linear-gradient(180deg, rgba(255,107,125,.10), var(--panel2)); }
.card.pick { border-color: var(--violet); scroll-margin-top: calc(var(--bar-h) + 16px); }

.btn { display: block; width: 100%; padding: 12px 16px 13px; border: 0; border-radius: 9px; cursor: pointer;
       font-family: var(--pixel); font-size: 1em; font-weight: 800; letter-spacing: 0; color: #140f26;
       background: linear-gradient(180deg, #c88bff, var(--violet)); box-shadow: 0 3px 0 var(--violet-d), 0 6px 14px rgba(179,107,255,.25);
       transition: transform .06s, box-shadow .06s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--violet-d); }
.btn:disabled { opacity: .5; cursor: default; filter: saturate(.4); transform: none; }
.btn.alt { background: linear-gradient(180deg, #332a63, #2a2350); color: var(--ink); box-shadow: 0 3px 0 #1a1535, 0 6px 14px rgba(0,0,0,.2); }
.btn.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line2); width: auto; box-shadow: none; font-family: inherit;
             font-weight: 700; }
.btn.ghost:hover { color: var(--ink); border-color: var(--violet); }
.btn.small { padding: 6px 12px 7px; font-size: .88em; border-radius: 7px; }
.btn.kick { background: linear-gradient(180deg, #7dff4d, var(--kick)); box-shadow: 0 3px 0 #2c9a05; }
.btn.discord { background: linear-gradient(180deg, #6f7af5, #5865f2); color: #fff; margin: 10px 0 8px; box-shadow: 0 3px 0 #3b44a8; }
.btn.copy { margin: 10px 0 6px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .03em;
            background: linear-gradient(180deg, #8ff7ea, var(--teal)); box-shadow: 0 3px 0 #23a594; }
.codebtn { display: block; margin: 0 auto; }
.or { display: flex; align-items: center; gap: 10px; color: var(--dim); margin: 18px 0; font-size: .85em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gbtn { display: flex; justify-content: center; min-height: 44px; }

input, select { font: inherit; color: var(--ink); background: #0e0c1d; border: 1px solid var(--line2); border-radius: 8px; }
input { width: 100%; padding: 12px 14px; margin-bottom: 12px; font-size: 1.05em; }
input:focus, select:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
input.num { width: 6.5em; margin: 0; padding: 6px 8px; font-size: .85em; }
input.num.small { width: 4em; }
#link-out input { margin: 8px 0 0; font-family: ui-monospace, Consolas, monospace; }

#bar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: var(--bar-h); display: flex; align-items: center; gap: 12px;
       padding: 0 max(12px, calc((100vw - 1120px) / 2 + 16px)); padding-top: env(safe-area-inset-top);
       background: rgba(12,10,22,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
       border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.me { display: flex; align-items: center; gap: .6em; min-width: 0; flex: 0 1 auto; overflow: hidden; color: var(--ink); cursor: pointer; font: inherit; text-align: left;
      padding: .25em .7em .25em .3em; border-radius: 12px; border: 1px solid var(--line2);
      background: linear-gradient(180deg, rgba(36,28,70,.9), rgba(18,14,36,.9)); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 4px 14px rgba(0,0,0,.35);
      transition: border-color .15s, box-shadow .15s; }
.me:hover, .me.open { border-color: rgba(179,107,255,.7); box-shadow: 0 0 0 1px rgba(179,107,255,.25), 0 4px 18px rgba(179,107,255,.2); }
.me:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.portrait { position: relative; flex: none; width: 2.6em; height: 2.6em; display: grid; place-items: center; border-radius: 9px;
            background: radial-gradient(circle at 50% 35%, rgba(179,107,255,.35), rgba(10,8,20,.95) 70%);
            border: 2px solid transparent; background-clip: padding-box; box-shadow: 0 0 0 1px rgba(255,210,122,.55), 0 0 10px rgba(255,190,90,.18) inset; }
.portrait .sprite { width: 2.2em; height: 2.2em; }
.portrait em { position: absolute; right: -.45em; bottom: -.45em; min-width: 1.45em; height: 1.45em; padding: 0 .25em; display: grid; place-items: center;
               border-radius: 999px; font-style: normal; font-family: var(--mono); font-weight: 800; font-size: .68em; color: #2a1a00;
               background: linear-gradient(180deg, #ffe3a3, #d9a441); box-shadow: 0 0 0 2px #120f24; }
.portrait em:empty { display: none; }
.portrait.big { width: 4.2em; height: 4.2em; border-radius: 12px; }
.portrait.big .sprite { width: 3.6em; height: 3.6em; }
.me .who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.15; gap: .2em; }
.me .who b { font-family: var(--pixel); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 10em; }
.me .lvl { display: flex; align-items: center; gap: .45em; }
.me .lvl i { font-style: normal; font-size: .72em; color: var(--dim); white-space: nowrap; }
.xpbar { position: relative; display: block; height: .32em; min-width: 1.5em; width: 4.5em; flex: 1 1 auto; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.xpbar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--teal));
           box-shadow: 0 0 6px rgba(95,243,224,.5); transition: width .6s ease-out; }
.me .caret { flex: none; width: .45em; height: .45em; margin-left: .1em; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim);
             transform: rotate(45deg) translateY(-25%); transition: transform .2s; }
.me.open .caret { transform: rotate(225deg) translate(-10%, -10%); }
.purse { margin-left: auto; flex: none; display: flex; gap: 6px; flex-wrap: nowrap; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--ink); }
.coin { display: flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: #120f24; border: 1px solid var(--line);
        font-size: .82em; white-space: nowrap; }
.purse:hover .coin { border-color: var(--line2); }
.coin i, .wrow i { width: .7em; height: .7em; transform: rotate(45deg); flex: none; }
.coin b { font-family: var(--mono); font-weight: 700; }
.coin.dust i, .wrow.dust i { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.wrow.scrap i { background: #9aa3b5; }
.wrow.whispers i { background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.wrow.embers i { background: #ff7a45; box-shadow: 0 0 6px #ff7a45; }
.wrow.kudos i { background: #f0a6ff; box-shadow: 0 0 6px #f0a6ff; }
.purse .coin { font-size: .95em; padding: .3em .8em; }
@media (max-width: 560px) {
  #bar { gap: 8px; }
  .me { padding: .2em .55em .2em .25em; gap: .5em; }
  .me .who b { max-width: 7.5em; font-size: .92em; }
  .purse .coin { font-size: .85em; padding: .3em .65em; }
}
@media (max-width: 360px) { .me .who b { max-width: 5.5em; } .me .caret { display: none; } }

.memenu { position: fixed; z-index: 40; top: calc(var(--bar-h) + env(safe-area-inset-top) + 6px); left: max(8px, calc((100vw - 1120px) / 2 + 8px));
          width: min(23em, calc(100vw - 16px)); max-height: calc(100dvh - var(--bar-h) - 20px); overflow-y: auto; overscroll-behavior: contain;
          padding: .9em; border-radius: 16px; border: 1px solid var(--line2);
          background: linear-gradient(180deg, rgba(30,24,58,.98), rgba(14,11,28,.98)); box-shadow: 0 20px 50px rgba(0,0,0,.6);
          animation: mmin .18s ease-out; transform-origin: top left; }
.memenu[hidden] { display: none; }
@keyframes mmin { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.mmhead { display: flex; align-items: center; gap: .9em; padding-bottom: .8em; border-bottom: 1px solid var(--line); }
.mmhead .grow { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .15em; }
.mmhead b { font-size: 1.15em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmhead .xpbar { height: .45em; margin-top: .3em; flex: none; }
.mmlab { margin: .8em 0 .4em; font-size: .72em; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.wallet { display: grid; gap: .3em; }
.wrow { display: flex; align-items: center; gap: .7em; padding: .4em .6em; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.wrow span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 700; font-size: .92em; line-height: 1.2; }
.wrow small { font-weight: 400; font-size: .82em; color: var(--dim); }
.wrow b { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.mmnav { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; margin-top: .8em; padding-top: .8em; border-top: 1px solid var(--line); }
.mmnav button { display: flex; align-items: center; gap: .55em; padding: .6em .7em; border-radius: 10px; border: 1px solid var(--line);
                background: rgba(255,255,255,.03); color: var(--ink); font: inherit; font-weight: 700; font-size: .92em; cursor: pointer; text-align: left; }
.mmnav button .ic { width: 1.25em; height: 1.25em; color: var(--violet); }
.mmnav button:hover, .mmnav button:focus-visible { border-color: var(--violet); background: rgba(179,107,255,.12); outline: none; }
.mmnav button.out { color: #ffb3bf; }
.mmnav button.out .ic { color: #ff8a9a; }

#tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(6, 1fr);
        background: rgba(12,10,22,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
#tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: 0;
               color: var(--dim); cursor: pointer; font: inherit; font-size: .8em; font-weight: 700; font-family: var(--pixel); position: relative; }
#tabs button.on { color: var(--ink); }
#tabs button.on::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; background: var(--violet);
                          box-shadow: 0 0 10px var(--violet); border-radius: 0 0 3px 3px; }
#tabs button.on .ic { background: var(--violet); }
@media (min-width: 820px) {

  :root { --bar-h: 6.4em; }
  #tabs { top: 3.3em; bottom: auto; height: 3.1em; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
          display: flex; justify-content: center; gap: 4px; padding: 0 16px; }
  #tabs button { flex-direction: row; gap: 8px; font-size: .95em; padding: 0 16px; border-radius: 8px 8px 0 0; }
  #tabs button:hover { color: var(--ink); background: rgba(179,107,255,.08); }
  #tabs button.on { background: linear-gradient(180deg, rgba(179,107,255,.18), rgba(179,107,255,0)); }
  #tabs button.on::before { top: auto; bottom: 0; left: 12%; right: 12%; border-radius: 3px 3px 0 0; }
  #bar { align-items: flex-start; padding-top: .55em; }
  body.tabbed #app { padding-bottom: 40px; }
  .coin { font-size: .9em; padding: 4px 10px; }
}
@media (min-width: 820px) and (max-height: 560px) {

  :root { --bar-h: 3.4em; }
  #bar { align-items: center; padding-top: 0; }

  #tabs { top: 0; height: 3.4em; left: 17em; right: auto; transform: none; padding: 0; gap: 2px; }
  #tabs button { padding: 0 14px; border-radius: 0; }
  #tabs button span { display: none; }
  h2 { margin-top: 2vh; }
}
body.tabbed .back[data-go="home"] { display: none; }

.ic { width: 1.5em; height: 1.5em; background: currentColor; flex: none;
      -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ic-home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M6 1h0v1h1v1h1v1h1v1h1v1h-1v5H7V8H5v3H3V6H2V5h1V4h1V3h1V2h1z'/%3E%3C/svg%3E"); }
.ic-seam { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 11V5h2V3h2v2h1V1h2v4h1V3h2v8z M4 7v2h1V7z M7 7v2h1V7z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ic-board { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 1h10v8H7v2H5V9H1z M3 3v1h6V3z M3 5v1h5V5z M3 7v1h4V7z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ic-quests { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M5 1h2v1h1v3h3v2H8v4H4V7H1V5h3V2h1z'/%3E%3C/svg%3E"); }
.ic-gear { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M9 1h2v2h-1v1H9v1H8v1H7v1H6v1H5v1H4v1H3v1H1V9h1V8h1V7h1V6h1V5h1V4h1V3h1V2h1z M2 1h2v1h1v1H4v1H3V3H2z M8 8h1v1h1v1h1v1H9v-1H8z'/%3E%3C/svg%3E"); }
.ic-exped { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M6 1h1v1h1v2h1v2h1v2h1v3H1V8h1V6h1V4h1V2h1V1z M5 8v3h2V8z' fill-rule='evenodd'/%3E%3C/svg%3E"); }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; min-height: 2em; }
.who { font-family: var(--pixel); font-weight: 800; font-size: 1.35em; overflow-wrap: anywhere; }

.classes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.cl { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 14px; cursor: pointer;
      background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--line); border-radius: 12px; color: var(--ink);
      font: inherit; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.cl:hover, .cl:focus-visible { border-color: var(--violet); transform: translateY(-2px); }
.cl b { display: block; font-family: var(--pixel); font-weight: 800; font-size: 1.2em; }
.cl .role { color: var(--teal); font-size: .8em; letter-spacing: .08em; text-transform: uppercase; }
.cl .sig { color: var(--dim); font-size: .85em; }
.cl .count { display: block; color: var(--dim); font-size: .8em; margin-top: 2px; }
.cl .count em { font-style: normal; color: #120f22; background: var(--gold); border-radius: 4px; padding: 0 6px; font-weight: 800; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin-top: 8px; }
.st { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .78em; color: var(--dim); }
.st i { display: flex; gap: 2px; }
.st b { width: 7px; height: 7px; border-radius: 1px; background: #2a2350; }
.st b.on { background: var(--teal); box-shadow: 0 0 4px rgba(95,243,224,.6); }
.sprite { image-rendering: pixelated; image-rendering: crisp-edges; flex: none; width: 48px; height: 48px; }
.sprite.big { width: 88px; height: 88px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }

.hero { display: flex; gap: 16px; align-items: center; background: radial-gradient(ellipse at 15% 50%, rgba(179,107,255,.22), transparent 60%),
        linear-gradient(180deg, var(--panel), var(--panel2)); }
.cls { font-family: var(--pixel); font-weight: 700; font-size: 1.4em; }
.bar { height: 8px; background: #0e0c1d; border-radius: 4px; overflow: hidden; margin: 8px 0 4px; border: 1px solid #221b42; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--teal)); transition: width .5s;
         box-shadow: 0 0 8px rgba(95,243,224,.5); }
.money { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.money div { background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
             box-shadow: var(--shadow); }
.money b { display: block; font-family: var(--mono); font-weight: 700; font-size: 1.35em; color: var(--gold); }
.money span { color: var(--dim); font-size: .8em; }
.nav3 { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 12px 0; }
@media (min-width: 560px) { .nav3 { grid-template-columns: repeat(2, 1fr); } }
.homegrid { display: grid; gap: 12px; margin-top: 8px; }
.homegrid > .card, .homegrid > .nav3 { margin: 0; }
#d-on { margin-top: 8px; }
@media (min-width: 820px) {
  .homegrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .homegrid .nav3 { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; margin: 0; }
  .homegrid .money { grid-auto-rows: 1fr; }
  .homegrid .dcard { display: flex; flex-direction: column; justify-content: center; }
}

.list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.list.three { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.list.four { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.list.items { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.district, .beast, .quest, .slot, .itembtn, .branch {
  background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--line); border-radius: 12px; color: var(--ink);
  box-shadow: var(--shadow); }
button.district, button.beast, .slot, .itembtn { transition: border-color .15s, transform .15s; }
.district:hover, .district:focus-visible, .beast:hover, .itembtn:hover, .slot:not(.empty):hover { border-color: var(--violet); transform: translateY(-1px); }

.district, .beast, .quest { display: flex; flex-direction: column; }
.district .who, .beast .weak { margin-top: auto; padding-top: 6px; }
.quest .btn { margin-top: auto; }

.district { width: 100%; text-align: left; padding: 14px 14px 14px 72px; cursor: pointer; font: inherit; position: relative; min-height: 6.2em; }
.district .dface { position: absolute; left: 12px; top: 14px; width: 48px; height: 48px; background: radial-gradient(circle, rgba(179,107,255,.25), transparent 70%);
                   border-radius: 50%; }
.district b { display: block; font-family: var(--pixel); font-weight: 800; font-size: 1.15em; padding-right: 3.5em; }
.district .what { color: var(--dim); font-size: .85em; }
.district .who { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85em; font-weight: 600; }
.district .new { position: absolute; top: 12px; right: 12px; background: var(--gold); color: #120f22; font-weight: 800;
                 font-size: .75em; border-radius: 4px; padding: 1px 7px; box-shadow: 0 0 10px rgba(255,210,122,.5); }
.chip { font-size: .75em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px;
        background: #2a2350; color: var(--dim); white-space: nowrap; }
.chip.friend { background: rgba(95,243,224,.15); color: var(--teal); }
.chip.close_friend { background: rgba(255,210,122,.18); color: var(--gold); }
.pips { color: var(--dim); letter-spacing: 2px; }

.npchead { display: flex; gap: 16px; align-items: center; background: radial-gradient(ellipse at 8% 40%, rgba(179,107,255,.25), transparent 55%),
           linear-gradient(180deg, var(--panel), var(--panel2)); }
.sprite.face { width: 96px; height: 96px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.55)); }
.npchead h2 { margin: 0 0 4px; }
blockquote { margin: 6px 0 8px; padding: 8px 12px; border-left: 3px solid var(--violet); background: rgba(179,107,255,.08);
             border-radius: 0 8px 8px 0; font-style: italic; }
.trustrow { justify-content: flex-start; }
.trustrow .bar { margin: 0; max-width: 16em; }
@media (max-width: 480px) { .sprite.face { width: 64px; height: 64px; } .npchead { align-items: flex-start; } }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px 0 10px; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; font-family: var(--pixel); font-weight: 700; font-size: .95em; padding: 8px 14px; border-radius: 999px; cursor: pointer;
       background: #120f24; color: var(--dim); border: 1px solid var(--line); white-space: nowrap; }
.tab:hover { color: var(--ink); border-color: var(--line2); }
.tab.on { background: linear-gradient(180deg, #c88bff, var(--violet)); color: #140f26; border-color: var(--violet); box-shadow: 0 0 12px rgba(179,107,255,.35); }
.steps { list-style: none; display: grid; gap: 6px; }
.steps li { padding: 9px 12px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); font-size: .9em; }
.steps li.done { color: var(--dim); }
.steps li.done::before { content: "✓ "; color: var(--teal); }
.steps li.now { border-color: var(--violet); background: linear-gradient(90deg, rgba(179,107,255,.15), var(--panel2)); }
.steps li.locked { color: #5d5585; }
#n-story .card { margin-top: 0; }
.ask { margin: 8px 0 12px; }
.choices { display: grid; gap: 8px; }
.choices.twist .btn { white-space: normal; text-align: left; box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; }

.shoptop { display: grid; gap: 8px; margin-bottom: 10px; }
.shoptop > .btn { width: auto; justify-self: start; }
.pane.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: stretch; }
.pane.grid > .wide { grid-column: 1 / -1; }
.srow { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; font-size: .92em; background: linear-gradient(180deg, var(--panel), var(--panel2));
        border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.srow > .grow > b:first-child { font-family: var(--pixel); font-weight: 800; font-size: 1.1em; }
.sbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.sbtns .btn { width: auto; white-space: nowrap; }
.lock { color: #8a7fb5; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skill { background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.skill b { font-family: var(--pixel); font-weight: 800; font-size: 1.1em; }
.skill .bar { margin: 6px 0 2px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.picks select { font-size: .85em; max-width: 100%; padding: 6px 8px; border-radius: 6px; }

#sl-list .srow, #sl-mine .srow, #sl-sell .srow { flex-direction: row; align-items: center; background: none; border: 0; border-top: 1px solid var(--line);
                                               border-radius: 0; box-shadow: none; padding: 10px 0; }
#sl-list .srow:first-child, #sl-mine .srow:first-child, #sl-sell .srow:first-child { border-top: 0; }
#sl-list .sbtns, #sl-mine .sbtns, #sl-sell .sbtns { margin: 0; flex: none; justify-content: flex-end; max-width: 55%; }
@media (max-width: 420px) {
  #sl-list .srow, #sl-mine .srow, #sl-sell .srow { flex-direction: column; align-items: stretch; }
  #sl-list .sbtns, #sl-mine .sbtns, #sl-sell .sbtns { max-width: none; justify-content: flex-start; }
}

.contract { display: block; width: 100%; text-align: left; padding: 16px; cursor: pointer; font: inherit;
            background: linear-gradient(180deg, #f6efda, #ece2c6); color: #2b2116; border: 0; border-radius: 3px;
            box-shadow: 0 2px 0 #b9a77e, 0 10px 20px rgba(0,0,0,.35); position: relative; font-family: Georgia, "Times New Roman", serif;
            transition: transform .15s; }
.contract:nth-child(odd) { transform: rotate(-.6deg); } .contract:nth-child(even) { transform: rotate(.5deg); }
.contract:hover { transform: rotate(0) translateY(-2px); }
.contract::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
                    background: radial-gradient(circle at 35% 35%, #ff9aa8, #b3283c); box-shadow: 0 2px 2px rgba(0,0,0,.4); }
.contract .signed { display: block; margin-top: 8px; font-style: italic; font-size: .9em; color: #6b5a3e; }
.contract .meta { display: flex; gap: 8px; margin-top: 8px; font-family: inherit; font-size: .8em; color: #6b5a3e; }
.contract.done { opacity: .45; }
.contract .stamp { position: absolute; top: 10px; right: 12px; color: #a33; font-weight: 800; transform: rotate(-8deg);
                   border: 2px solid #a33; padding: 0 6px; font-family: system-ui, sans-serif; font-size: .8em; }
.note { background: linear-gradient(180deg, #f6efda, #ece2c6); color: #2b2116; padding: 18px; border-radius: 3px; font-family: Georgia, serif;
        font-size: 1.05em; box-shadow: 0 2px 0 #b9a77e, 0 10px 20px rgba(0,0,0,.35); margin: 8px 0; }
.note i { display: block; margin-top: 10px; color: #6b5a3e; font-size: .9em; }
.beast { width: 100%; text-align: left; padding: 11px 13px; cursor: pointer; font: inherit; }
.beast.pick { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(255,210,122,.25); }
.beast b { display: block; font-family: var(--pixel); font-weight: 800; font-size: 1.1em; }
.beast ul { margin: 6px 0 0 16px; color: var(--dim); font-size: .82em; line-height: 1.35; }
.beast ul li { margin: 2px 0; }
.beast .weak { font-size: .8em; color: var(--teal); font-weight: 700; }

.quest { padding: 14px; }
.quest b { font-family: var(--pixel); font-weight: 800; font-size: 1.1em; }
.quest .kind { color: var(--teal); font-size: .75em; letter-spacing: .08em; text-transform: uppercase; }
.quest .prog { color: var(--dim); font-size: .85em; margin: 6px 0 10px; }
.quest.done { opacity: .55; }
#e-run:empty { display: none; }

#fight { margin: 10px 0; }
#fight .grid { display: block; margin: 0 auto; border: 2px solid var(--line2); border-radius: 8px; touch-action: manipulation; cursor: pointer;
               box-shadow: 0 0 0 4px #120f24, 0 14px 30px rgba(0,0,0,.45); }
.fbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.fbar .fb { width: 100%; padding: 10px 4px; }
.fbar .fb:not(.on) { background: linear-gradient(180deg, #332a63, #2a2350); color: var(--ink); box-shadow: 0 3px 0 #1a1535; }
.fbar .fb.on { background: linear-gradient(180deg, #8ff7ea, var(--teal)); color: #120f22; box-shadow: 0 3px 0 #23a594; }
.flog p { font-size: .9em; margin: 2px 0; }
.flog p.old { color: var(--dim); font-size: .82em; }
.fside #f-end { margin-top: 10px; }

.r-normal { color: #d9d3ee; } .r-magic { color: #7fb2ff; } .r-rare { color: var(--gold); }
.r-super_rare { color: #ff9a4d; } .r-ultra { color: #e08bff; } .r-raid_trophy { color: var(--teal); }
.q-crude { color: #b8a98c; } .q-standard { color: var(--ink); } .q-fine { color: #7fb2ff; }
.q-masterwork { color: var(--gold); } .q-flawless { color: #e08bff; } .q-volatile { color: #ff9a4d; }
.iline { min-width: 0; }
.iline b { display: block; overflow-wrap: anywhere; font-family: var(--pixel); font-weight: 800; font-size: 1.05em; }
.iline > span.small { display: block; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { font-style: normal; font-size: .75em; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #2a2350; color: var(--dim); }
.tag.unk { background: rgba(167,156,204,.15); }
.tag.curse { background: rgba(255,107,125,.18); color: var(--red); }
.tag.bless { background: rgba(255,210,122,.18); color: var(--gold); }
.tag.worn { background: rgba(255,154,77,.15); color: #ff9a4d; }
.tag.on { background: rgba(95,243,224,.15); color: var(--teal); }
.tag.q-fine { color: #7fb2ff; } .tag.q-masterwork { color: var(--gold); } .tag.q-flawless { color: #e08bff; }
.tag.q-volatile { color: #ff9a4d; } .tag.q-crude { color: #b8a98c; }
.slots { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.slot, .itembtn { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; cursor: pointer; font: inherit; }
.itembtn.on { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), var(--shadow); }
.slot.empty { cursor: default; opacity: .55; box-shadow: none; background: transparent; border-style: dashed; }
.slot .sl { color: var(--teal); font-size: .72em; letter-spacing: .08em; text-transform: uppercase; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chipbtn { font: inherit; font-size: .8em; font-weight: 700; padding: 5px 11px; border-radius: 999px; cursor: pointer;
           background: #120f24; color: var(--dim); border: 1px solid var(--line); }
.chipbtn:hover { color: var(--ink); }
.chipbtn.on { background: linear-gradient(180deg, #c88bff, var(--violet)); color: #120f22; border-color: var(--violet); }
.card.pick .affixes { margin: 8px 0 4px 18px; font-size: .9em; }
.card.pick p { margin-top: 6px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; margin-top: 12px; }
.row.wrap .btn { width: auto; }
#s-gear .top .btn, #s-perks .top .btn { width: auto; }
.branch { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.branch .bname { font-family: var(--pixel); font-weight: 800; font-size: 1.2em; }
.perk { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.perk.have b { color: var(--teal); }
.perk.locked { opacity: .5; }
.perk .pm { display: flex; align-items: center; gap: 6px; flex: none; }
.perk .pm .btn { width: 2.2em; padding: 5px 0; }
.perk .rank { min-width: 2.4em; text-align: center; font-size: .85em; color: var(--dim); }
.perk .tag { font-size: .68em; vertical-align: 2px; font-weight: 700; }
.pouch { display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.pch { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.pch .cnt { flex: none; color: var(--dim); font-family: var(--mono); }

.cols { display: block; }
@media (min-width: 820px) {
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cols .col.wide2 { grid-column: auto; }

  #s-contract .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .col.sticky { position: sticky; top: calc(var(--bar-h) + 16px); }
  @media (max-height: 700px) { .col.sticky { position: static; } }
  #bestiary.list.two { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  h3.first { margin-top: 8px; }
  #s-fight > .row { margin-bottom: 4px; }
  #fight { margin: 4px 0; display: grid; grid-template-columns: auto minmax(260px, 360px); gap: 20px; align-items: start; justify-content: center; }
  #fight .grid { margin: 0; }
  #fight .fside { min-width: 0; }
  #n-story .cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
.pane.grid > .btn.wide { justify-self: start; width: auto; }

.iconbtn { flex: none; width: 2.4em; height: 2.4em; display: grid; place-items: center; border-radius: 9px; cursor: pointer;
           background: #120f24; border: 1px solid var(--line); color: var(--dim); }
.iconbtn:hover { color: var(--ink); border-color: var(--violet); }
.ic-set { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M5 0h2v2h1V1h1v1h1v1H9v1h1v1h2v2h-2v1h-1v1h1v1H9v1H8v-1H7v2H5v-2H4v1H3v-1H2V9h1V8H2V7H0V5h2V4h1V3H2V2h1V1h1v1h1z M5 4v1H4v2h1v1h2V7h1V5H7V4z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.preview { margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: #0e0c1d; border: 1px solid var(--line); }
.slider { display: grid; grid-template-columns: 6em 1fr 3.5em; gap: 10px; align-items: center; margin: 12px 0; }
.slider input { margin: 0; padding: 0; accent-color: var(--violet); }
.slider b { font-family: var(--mono); text-align: right; }
.slider input { border: 0; background: none; width: 100%; }
.btn.ghost { white-space: nowrap; }

.worldcard { background: radial-gradient(ellipse at 90% 0%, rgba(255,210,122,.18), transparent 60%), linear-gradient(180deg, var(--panel), var(--panel2)); }
.worldcard b { font-size: 1.15em; }
#rs-open { margin: 10px 0; }
.raidcard.big { border-color: rgba(255,210,122,.5); }
.raidcard .btn { margin-top: auto; }
.raidcard .hpbar { margin: 8px 0; }
.rrow { flex-direction: row; align-items: center; width: 100%; cursor: pointer; color: var(--ink); font: inherit; text-align: left; margin-bottom: 6px; }
.bosscard { background: radial-gradient(ellipse at 50% 0%, rgba(255,107,125,.22), transparent 60%), linear-gradient(180deg, var(--panel), var(--panel2));
            border-color: rgba(255,107,125,.35); }
.bosscard h2 { font-size: 1.8em; margin: 6px 0 2px; }
.bosscard .row.wrap0 { justify-content: flex-start; }
.mods { display: flex; flex-wrap: wrap; gap: 4px; }
.hpbar { position: relative; height: 1.5em; background: #1a0d18; border: 1px solid #4a1f33; border-radius: 6px; overflow: hidden; margin: 12px 0 8px; }
.hpbar.thin { height: .6em; }
.hpbar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #ff4d6a, #ff8a5b); transition: width .6s;
           box-shadow: 0 0 12px rgba(255,77,106,.5); }
.hpbar span { position: relative; display: block; text-align: center; font-family: var(--mono); font-size: .8em; line-height: 1.85em; font-weight: 700;
              text-shadow: 0 1px 2px #000; }
.timer { font-family: var(--mono); font-size: 1.3em; color: var(--gold); }
.tell { margin: 10px 0; padding: 12px 14px; border-radius: 10px; background: linear-gradient(90deg, rgba(255,210,122,.16), rgba(255,210,122,.04));
        border: 1px solid rgba(255,210,122,.45); color: var(--gold); font-weight: 700; }
.stances { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stance { display: flex; flex-direction: column; gap: 2px; align-items: center; padding: 10px 6px; border-radius: 10px; cursor: pointer; font: inherit;
          background: #120f24; color: var(--dim); border: 1px solid var(--line); text-align: center; }
.stance b { font-size: 1.1em; color: var(--ink); }
.stance span { font-size: .75em; }
.stance.on { background: linear-gradient(180deg, #c88bff, var(--violet)); border-color: var(--violet); box-shadow: 0 3px 0 var(--violet-d); }
.stance.on b, .stance.on span { color: #140f26; }
#rd-act .btn { margin-top: 10px; }
.members { display: grid; gap: 6px; }
.member { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
.member.me { border-color: var(--violet); }
.member.down { opacity: .6; }
.rlog { list-style: none; display: grid; gap: 6px; }
.rlog li { padding: 8px 12px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); font-size: .9em; }
.rlog li:first-child { border-color: var(--line2); }
.stage { display: block; width: 100%; height: 13em; margin: 4px 0 10px; border-radius: 12px; border: 1px solid var(--line2);
         image-rendering: pixelated; box-shadow: var(--shadow); }
@media (min-width: 820px) { .stage { height: 16em; } }
.advice { margin: 4px 0 10px; padding: 8px 12px; border-radius: 8px; background: rgba(95,243,224,.08); border: 1px solid rgba(95,243,224,.35);
          color: var(--teal); font-weight: 700; }
.stance { position: relative; }
.stance.want::after { content: "advised"; position: absolute; top: -.7em; right: .5em; font-size: .62em; font-weight: 800; padding: 0 .5em;
                      border-radius: 4px; background: var(--teal); color: #120f22; text-transform: uppercase; letter-spacing: .05em; }

#s-raid .raidgrid { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px;
                    height: calc(100dvh - var(--bar-h) - var(--tabs-h) - 60px - env(safe-area-inset-bottom)); min-height: 24em; }
.arena { position: relative; min-height: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); box-shadow: var(--shadow); }
.arena .stage { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.hud { position: absolute; left: 0; right: 0; top: 0; padding: 10px 12px 14px;
       background: linear-gradient(180deg, rgba(8,6,18,.92), rgba(8,6,18,.6) 70%, transparent); }
.hudtop { display: flex; gap: 10px; align-items: flex-start; }
.hudtop .btn { padding: 4px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.bossname { display: block; font-size: 1.35em; line-height: 1.15; margin-top: 2px; }
.hud .sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .hpbar { margin: 8px 0 4px; }
.hud .timer { font-size: 1.5em; }
.arena .tell { position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; background: rgba(20,14,6,.88); }
.arena .tell:empty { display: none; }
.endcard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90%, 28em); margin: 0; text-align: center; z-index: 2; }
.side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.actbox { padding: 10px; border-radius: 12px; background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 1px solid var(--line); }
.actbox .advice { margin: 0 0 12px; }
.actbox #rd-role { margin-top: 6px; }
.actbox .btn { margin-top: 8px; }
.more { border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); min-height: 0; }
.more summary { cursor: pointer; padding: 10px 12px; font-weight: 800; color: var(--dim); }
.more[open] { overflow: auto; }
.more .members, .more .rlog { padding: 0 10px 10px; }
@media (max-width: 819px) {
  #rd-role { display: none; }
  .hud .mods, .hud .sub { display: none; }
  .stance span { display: none; }
  .stance { padding: 12px 6px; }
}
@media (min-width: 820px) {
  #s-raid .raidgrid { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr) minmax(18em, 22em);
                      height: calc(100dvh - var(--bar-h) - 62px); }
  .side .more { flex: 1; }
  .bossname { font-size: 1.8em; }
}
@media (min-width: 820px) and (max-height: 560px) {
  #s-raid .raidgrid { height: calc(100dvh - var(--bar-h) - 62px); min-height: 0; }
  .hud .sub { display: none; }
  .bossname { font-size: 1.25em; }
}
@media (max-width: 819px) and (max-height: 780px) {
  .actbox .advice, #rd-oil p { display: none; }
  .actbox { padding: 8px; }
}

.reveal { overflow: hidden; }
.strip { position: relative; height: 4.2em; overflow: hidden; border-radius: 10px; background: #0b0918; border: 1px solid var(--line2); margin-bottom: 12px; }
.belt { display: flex; gap: 6px; padding: 6px; will-change: transform; }
.tile { flex: none; width: 3.6em; height: 3.2em; border-radius: 8px; border: 2px solid rgba(255,255,255,.12); }
.t-normal { background: #3a3555; } .t-magic { background: #2c4f8f; } .t-rare { background: #8a6d22; }
.t-super_rare { background: #a2551f; } .t-ultra { background: linear-gradient(135deg, #b36bff, #ff7ad8); box-shadow: 0 0 12px #e08bff; }
.needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.got { cursor: default; animation: fade .4s ease; }
.r-glow-rare { box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(255,210,122,.3); }
.r-glow-super_rare { box-shadow: 0 0 0 1px #ff9a4d, 0 0 20px rgba(255,154,77,.35); }
.r-glow-ultra { box-shadow: 0 0 0 1px #e08bff, 0 0 26px rgba(224,139,255,.5); }
.casecard.ember { border-color: rgba(255,122,69,.45); background: radial-gradient(ellipse at 90% 0%, rgba(255,122,69,.18), transparent 60%), linear-gradient(180deg, var(--panel), var(--panel2)); }
.odds { display: grid; gap: 3px; margin: 8px 0; }
.odd { display: flex; justify-content: space-between; font-size: .9em; padding: 3px 8px; border-radius: 6px; background: #0e0c1d; }
.odd b { font-family: var(--mono); }
.casecard .row.wrap { margin-top: auto; }
#sh-gate select { min-width: 9em; }

.passhead .lvl { font-size: 1.4em; }
.passhead .btn { margin-top: 10px; }
.tasks { display: grid; gap: 6px; }
.task { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
.task.done { opacity: .6; }
.task .btn { width: auto; }
.levels { display: grid; gap: 6px; max-height: 70vh; overflow: auto; padding-right: 4px; }
.plevel { display: grid; grid-template-columns: 2.6em 1fr 1fr; gap: 6px; align-items: stretch; }
.plevel .pn { display: grid; place-items: center; border-radius: 8px; background: #120f24; border: 1px solid var(--line); font-family: var(--mono); color: var(--dim); }
.plevel.reached .pn { background: linear-gradient(180deg, #c88bff, var(--violet)); color: #140f26; border-color: var(--violet); }
.plevel.big .pn { box-shadow: 0 0 0 1px var(--gold); }
.ptrack { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); min-width: 0; }
.ptrack.premium { background: linear-gradient(180deg, rgba(255,122,69,.1), var(--panel2)); border-color: rgba(255,122,69,.3); }
.ptrack .btn { width: auto; align-self: flex-start; }
.ptrack select { font-size: .85em; padding: 4px 6px; }
@media (max-width: 480px) { .plevel { grid-template-columns: 2.2em 1fr; } .plevel .ptrack.premium { grid-column: 2; } }

.iwrap { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.iwrap > .iline { flex: 1; }
.icon { flex: none; width: 2.6em; height: 2.6em; image-rendering: pixelated; image-rendering: crisp-edges; border-radius: 8px; padding: .25em;
        border: 1px solid var(--line2); background: radial-gradient(circle at 50% 40%, #2a2350, #120f24); }
.r-bg-magic { border-color: #3d6fc4; background: radial-gradient(circle at 50% 40%, #233c6e, #0f1428); }
.r-bg-rare { border-color: #b8902b; background: radial-gradient(circle at 50% 40%, #5c4818, #1c1608); }
.r-bg-super_rare { border-color: #d0702b; background: radial-gradient(circle at 50% 40%, #6b3514, #1f1008); }
.r-bg-ultra { border-color: #e08bff; background: radial-gradient(circle at 50% 40%, #5e2a7a, #1b0c26); box-shadow: 0 0 10px rgba(224,139,255,.5); }
.r-bg-raid_trophy { border-color: var(--teal); background: radial-gradient(circle at 50% 40%, #1d5550, #0a1c1b); }

#opener { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
          background: radial-gradient(ellipse at 50% 40%, rgba(60,30,110,.85), rgba(6,4,14,.97)); backdrop-filter: blur(4px); }
body.opening { overflow: hidden; }
.op-in { width: min(100%, 1000px); display: flex; flex-direction: column; gap: 16px; align-items: center; }
.op-title { font-weight: 800; font-size: 1.3em; letter-spacing: .04em; color: var(--gold); text-transform: uppercase; }
.op-reel { position: relative; width: 100%; height: 9em; overflow: hidden; border-radius: 12px; background: #07060f;
           border: 2px solid #3a2f66; box-shadow: inset 0 0 40px rgba(0,0,0,.9), 0 20px 50px rgba(0,0,0,.6);
           -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.op-belt { display: flex; gap: 8px; height: 100%; padding: 10px 0; will-change: transform; }
.op-card { flex: none; width: 7.2em; height: 100%; position: relative; border-radius: 8px; display: grid; place-items: center;
           background: linear-gradient(180deg, #1d1a33, #100e1e); border: 1px solid #2c2650; }
.op-card i { position: absolute; left: 0; right: 0; bottom: 0; height: .45em; border-radius: 0 0 8px 8px; background: #6a6390; }
.op-card.c-magic i { background: #4b86e8; } .op-card.c-rare i { background: #e6b23a; } .op-card.c-super_rare i { background: #ff8a3d; }
.op-card.c-ultra i { background: linear-gradient(90deg, #b36bff, #ff7ad8); }
.op-card.c-rare { background: linear-gradient(180deg, #2d2612, #120f08); }
.op-card.c-super_rare { background: linear-gradient(180deg, #34200f, #140b06); }
.op-card.c-ultra { background: linear-gradient(180deg, #3a1850, #160a20); }
.op-card.c-magic { background: linear-gradient(180deg, #172644, #0b1020); }
.op-icon { width: 4.2em; height: 4.2em; image-rendering: pixelated; image-rendering: crisp-edges; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.op-card.won { outline: 3px solid #fff; box-shadow: 0 0 30px rgba(255,255,255,.6); animation: won .6s ease 2; }
@keyframes won { 50% { transform: scale(1.06); } }
.op-needle { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--gold); border-radius: 2px;
             box-shadow: 0 0 14px var(--gold), 0 0 4px #fff; z-index: 2; }
.op-needle::before, .op-needle::after { content: ""; position: absolute; left: 50%; margin-left: -.55em; border: .55em solid transparent; }
.op-needle::before { top: 0; border-top-color: var(--gold); }
.op-needle::after { bottom: 0; border-bottom-color: var(--gold); }
.op-needle.tk { animation: tick .09s ease; }
@keyframes tick { 50% { transform: rotate(-6deg); } }
.op-win { width: min(100%, 26em); text-align: center; padding: 18px; border-radius: 14px; background: linear-gradient(180deg, #1d1a33, #100e1e);
          border: 2px solid #6a6390; animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.op-win.c-magic { border-color: #4b86e8; box-shadow: 0 0 40px rgba(75,134,232,.45); }
.op-win.c-rare { border-color: #e6b23a; box-shadow: 0 0 50px rgba(230,178,58,.5); }
.op-win.c-super_rare { border-color: #ff8a3d; box-shadow: 0 0 60px rgba(255,138,61,.55); }
.op-win.c-ultra { border-color: #e08bff; box-shadow: 0 0 80px rgba(224,139,255,.7); }
.op-rar { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.op-big { width: 6em; height: 6em; image-rendering: pixelated; image-rendering: crisp-edges; margin: 8px auto; display: block;
          filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.op-win .iwrap { justify-content: center; text-align: left; }
.op-win .iwrap .icon { display: none; }
.op-all { width: 100%; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(14em, 100%), 1fr)); max-height: 60vh; overflow: auto; }
.op-small { padding: 10px; border-radius: 10px; background: #14112a; border: 1px solid #2c2650; }
.op-small.c-rare { border-color: #e6b23a; } .op-small.c-super_rare { border-color: #ff8a3d; } .op-small.c-ultra { border-color: #e08bff; }
.op-btns { display: flex; gap: 10px; }
.op-btns .btn { width: auto; min-width: 10em; }
@media (max-width: 480px) { .op-card { width: 5.6em; } .op-icon { width: 3.4em; height: 3.4em; } .op-reel { height: 7.4em; } }

.passtop { display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
           background: radial-gradient(ellipse at 0% 50%, rgba(179,107,255,.28), transparent 50%), radial-gradient(ellipse at 100% 0%, rgba(255,122,69,.18), transparent 50%), linear-gradient(180deg, var(--panel), var(--panel2)); }
.passtop h2 { margin: 0 0 6px; }
.lvbadge { flex: none; width: 5.2em; height: 5.2em; border-radius: 50%; display: grid; place-content: center; text-align: center;
           background: radial-gradient(circle at 35% 30%, #d9a8ff, var(--violet) 55%, #5a2a99); box-shadow: 0 0 0 4px #120f24, 0 0 0 6px var(--violet), 0 0 24px rgba(179,107,255,.6); }
.lvbadge b { font-family: var(--mono); font-size: 2em; line-height: 1; color: #140f26; }
.lvbadge span { font-size: .6em; font-weight: 800; letter-spacing: .15em; color: #2a1650; }
.bar.big { height: 12px; }
.gold { color: var(--gold); font-weight: 700; }
.pcta { flex: none; }
.pcta .btn { width: auto; line-height: 1.25; background: linear-gradient(180deg, #ffa06b, #ff7a45); box-shadow: 0 3px 0 #a8441c, 0 8px 18px rgba(255,122,69,.3); }
.pcta .btn small { font-weight: 600; font-size: .75em; }
.pown { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,122,69,.5); background: rgba(255,122,69,.1); color: #ffb08a; }
@media (max-width: 640px) { .pcta { width: 100%; } .pcta .btn { width: 100%; } }
.trackhead { margin-top: 6px; }
.trackhead .btn { width: auto; }
.trackwrap { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px; }
.tracklabels { display: grid; grid-template-rows: 1fr 2.4em 1fr; padding: 0 0 10px; }
.tl { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: .75em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
      border-radius: 8px; padding: 6px 4px; }
.tl.prem { grid-row: 1; background: rgba(255,122,69,.14); color: #ffb08a; }
.tl.free { grid-row: 3; background: rgba(179,107,255,.12); color: var(--dim); }
.track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 0 0 10px; scrollbar-width: thin; }
.lvcol { flex: none; width: 8.4em; display: grid; grid-template-rows: 1fr 2.4em 1fr; gap: 0; scroll-snap-align: start; }
.lvnum { position: relative; display: grid; place-items: center; }
.lvnum::before { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 4px; margin-top: -2px; background: #2a2350; }
.lvcol.reached .lvnum::before { background: linear-gradient(90deg, var(--violet), var(--teal)); }
.lvnum b { position: relative; width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: .85em;
           background: #120f24; border: 2px solid var(--line2); color: var(--dim); }
.lvcol.reached .lvnum b { background: var(--violet); border-color: #e2c8ff; color: #140f26; }
.lvcol.next .lvnum b { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(255,210,122,.6); }
.lvcol.big .lvnum b { width: 2.4em; height: 2.4em; }
.rcell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; min-height: 8.6em; border-radius: 12px;
         font: inherit; color: var(--ink); cursor: default; text-align: center; background: linear-gradient(180deg, #1b1733, #110e22); border: 1px solid var(--line); }
.rcell.premium { background: linear-gradient(180deg, #2c1a18, #150d10); border-color: rgba(255,122,69,.3); }
.rcell.empty { opacity: .25; }
.ricon { width: 3em; height: 3em; image-rendering: pixelated; image-rendering: crisp-edges; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.rtext { font-size: .75em; line-height: 1.25; color: var(--dim); }
.rcell.can { cursor: pointer; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(255,210,122,.35); animation: glow 1.6s ease-in-out infinite; }
.rcell.can::after { content: "CLAIM"; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); font-size: .65em; font-weight: 800; letter-spacing: .1em;
                    padding: 1px 8px; border-radius: 4px; background: var(--gold); color: #140f26; }
@keyframes glow { 50% { box-shadow: 0 0 0 1px var(--gold), 0 0 28px rgba(255,210,122,.55); } }
.rcell.claimed { opacity: .55; }
.rcell.claimed::after { content: "✓"; position: absolute; top: 6px; right: 8px; color: var(--teal); font-weight: 800; }
.rcell.lockp::after { content: "🔒"; position: absolute; top: 6px; right: 8px; font-size: .8em; opacity: .8; }
.rcell.locked .ricon { opacity: .6; }
.trknav { position: absolute; top: 50%; z-index: 2; width: 2.2em; height: 2.2em; margin-top: -1.1em; border-radius: 50%; cursor: pointer; font: inherit; font-weight: 800;
          background: #120f24; color: var(--ink); border: 1px solid var(--line2); box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.trknav.l { left: 2em; } .trknav.r { right: -6px; }
@media (max-width: 640px) { .trknav { display: none; } .lvcol { width: 7em; } }
.taskgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(15em, 100%), 1fr)); }
.tcard { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: linear-gradient(180deg, var(--panel), var(--panel2));
         border: 1px solid var(--line); box-shadow: var(--shadow); }
.tcard .kind { color: var(--teal); font-size: .72em; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.tcard .bar { margin: 2px 0; }
.tcard .btn { margin-top: auto; }
.tcard.ready { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,210,122,.25); }
.tcard.done { opacity: .55; }
.pickslot b { display: block; margin-bottom: 10px; color: var(--ink); }
.slotpick { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(7em, 1fr)); }
.slotbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 10px; cursor: pointer; font: inherit; font-size: .85em;
           color: var(--ink); background: #120f24; border: 1px solid var(--line2); }
.slotbtn:hover { border-color: var(--gold); }
#opener { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.op-in, .op-reel { min-width: 0; max-width: 100%; }
.rcell.empty { opacity: 1; background: none; border: 1px dashed rgba(255,255,255,.07); box-shadow: none; }
.rcell.premium.empty { border-color: rgba(255,122,69,.12); }

#s-gear h2 { display: none; }
.gearwrap { --t: 3.6em; display: block; }
.doll { margin: 0 0 16px; padding: 14px; }
.dollhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.dollhead b { display: block; font-weight: 800; font-size: 1.25em; line-height: 1.1; }
.dollhead .pow { text-align: right; }
.dollhead .pow b { font-family: var(--mono); font-size: 1.6em; color: var(--gold); text-shadow: 0 0 12px rgba(255,210,122,.35); }
.dollhead .pow span { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .7em; }
.dollgrid { display: grid; gap: .45em; grid-template-columns: var(--t) minmax(0, 1fr) var(--t);
            grid-template-areas: "head hero amulet" "chest hero main_weapon" "hands hero off_hand" "legs hero ring1" "feet hero ring2"; }
.dollgrid .hero { grid-area: hero; display: grid; place-items: center; border-radius: 12px; min-width: 0;
                  background: radial-gradient(ellipse at 50% 62%, rgba(179,107,255,.28), rgba(179,107,255,0) 65%),
                              radial-gradient(ellipse at 50% 92%, rgba(95,243,224,.18), rgba(0,0,0,0) 45%); }
.dollgrid .hero canvas { width: min(100%, 9em); aspect-ratio: 1; image-rendering: pixelated; image-rendering: crisp-edges;
                         filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.doll .curse { color: var(--red); margin-top: 10px; text-align: center; }
.dollbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.dollbtns .btn { width: 100%; margin: 0; }
.dollbtns #g-best { grid-column: 1 / -1; }
.btn.glow { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 10px rgba(255,210,122,.3); }
.doll .gnote { margin-top: 10px; text-align: center; color: var(--teal); }

.gtile { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: .35em; border-radius: 10px;
         border: 1px solid var(--line2); background: radial-gradient(circle at 50% 40%, #2a2350, #120f24); cursor: pointer; font: inherit;
         color: var(--ink); transition: transform .12s, border-color .12s, box-shadow .12s; }
.gtile canvas { width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: none; }
button.gtile:not(:disabled):hover { transform: translateY(-2px); border-color: var(--violet); }
.gtile.on { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet), 0 0 16px rgba(179,107,255,.55); }
.gtile.empty { border-style: dashed; background: rgba(18,15,36,.6); }
.gtile.empty canvas { opacity: .16; filter: grayscale(1) brightness(1.6); }
.gtile.hole { border-style: dashed; border-color: var(--line); background: transparent; opacity: .45; cursor: default; }
.gtile.listed { opacity: .5; }
.gtile:disabled { cursor: default; }
.bdg { position: absolute; font-style: normal; font-family: var(--mono); font-weight: 800; font-size: .62em; line-height: 1.25;
       padding: 0 .3em; border-radius: 4px; background: rgba(8,6,16,.85); pointer-events: none; }
.bdg.ench { right: 3px; bottom: 3px; color: var(--gold); }
.bdg.qty { right: 3px; bottom: 3px; color: var(--ink); }
.bdg.unk { left: 3px; top: 3px; color: var(--dim); }
.bdg.curse { left: 3px; top: 3px; color: var(--red); }
.bdg.bound { left: 3px; top: 3px; color: var(--dim); }
.bdg.up { right: 3px; top: 3px; color: #53e07a; background: rgba(20,60,30,.9); }
.dura { position: absolute; left: 4px; bottom: 2px; height: 3px; max-width: calc(100% - 8px); border-radius: 2px; background: #ff9a4d; pointer-events: none; }

.bagtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.bagtab { font: inherit; font-weight: 800; font-size: 1.05em; padding: .5em 1em; background: none; border: 0; color: var(--dim); cursor: pointer;
          border-bottom: 3px solid transparent; margin-bottom: -1px; }
.bagtab.on { color: var(--ink); border-bottom-color: var(--violet); }
.bagtab span { font-family: var(--mono); font-size: .8em; margin-left: .2em; }
.baggrid { display: grid; gap: .45em; grid-template-columns: repeat(auto-fill, minmax(var(--t), 1fr)); }
.baggrid .bagempty { grid-column: 1 / -1; padding: 6px 0 4px; }

.shade { position: fixed; inset: 0; z-index: 39; background: rgba(4,3,10,.6); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
         animation: fade .2s ease; }
body.sheet-open { overflow: hidden; }

.pickpane { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; max-height: 86dvh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
            margin: 0; border-radius: 16px 16px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
            transform: translateY(105%); transition: transform .22s ease; visibility: hidden; }
.pickpane.open { transform: none; visibility: visible; }
.pphead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.pphead b { color: var(--teal); font-size: .78em; letter-spacing: .08em; text-transform: uppercase; }
.pphead .x { width: auto; margin: 0; }
.pptop { display: flex; gap: 12px; align-items: center; }
.pptop .gtile.big { width: 4.6em; flex: none; }
.pptop .iline b { font-size: 1.2em; }
.ppow { display: flex; gap: 16px; align-items: stretch; margin: 14px 0 10px; padding: 10px 12px; border-radius: 10px; background: #0e0c1d; border: 1px solid var(--line); }
.ppow > div:first-child span { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .7em; }
.ppow > div:first-child b { font-family: var(--mono); font-size: 1.6em; color: var(--gold); line-height: 1.1; }

.cmp { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: center;
       border-left: 1px solid var(--line); padding-left: 12px; }
.cmprow { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.cmprow span { flex: 1; min-width: 0; overflow: hidden; overflow-wrap: anywhere;
               display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.cmprow b { font-family: var(--mono); flex: none; }
.plus { color: #53e07a; } .minus { color: var(--red); } .same { color: var(--dim); }
.pickpane .affixes { margin: 10px 0 4px 18px; font-size: .92em; }
.pickpane p { margin-top: 8px; }
.pickpane .tags { margin-top: 2px; }
.pickpane .iwrap.big .icon { width: 3.6em; height: 3.6em; }
.pickpane .qtyline { font-family: var(--mono); font-size: 1.4em; color: var(--gold); }
.ppact { display: grid; gap: 8px; margin-top: 14px; }
.ppact .btn { width: 100%; margin: 0; }
.btn.warn { background: linear-gradient(180deg, #ff9a6b, #e0563f); border-color: #e0563f; color: #1a0a06; }
p.warn { color: #ff9a4d; }
.pphint { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 30px 10px; }
.pphint canvas { width: 4em; height: 4em; image-rendering: pixelated; opacity: .5; }
.lorow { padding: 10px 0; border-top: 1px solid var(--line); }
.lotop { display: flex; gap: 10px; align-items: center; }
.lon { flex: none; width: 1.8em; height: 1.8em; display: grid; place-items: center; border-radius: 50%; background: var(--violet-d);
       font-weight: 800; font-family: var(--mono); }
.lotop input { margin: 0; padding: 8px 10px; font-size: 1em; }
.lobot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.lobot .loinfo { margin-right: auto; }
.lobot .btn { width: auto; margin: 0; }

@media (min-width: 700px) {
  .gearwrap { display: grid; grid-template-columns: 19em minmax(0, 1fr); gap: 20px; align-items: start; }
  .doll { margin: 0; position: sticky; top: calc(var(--bar-h) + 16px); }

  .pickpane { left: auto; top: 0; width: min(26em, 92vw); max-height: none; border-radius: 16px 0 0 16px;
              padding: calc(16px + env(safe-area-inset-top)) 18px 20px; transform: translateX(105%); }
}
@media (min-width: 700px) and (max-height: 560px) {
  .gearwrap { --t: 3.1em; }
  .doll { position: static; padding: 10px; }
  .dollgrid .hero canvas { width: min(100%, 6em); }
}
@media (min-width: 1100px) {
  .gearwrap { grid-template-columns: 18em minmax(0, 1fr) 21em; }
  .pickpane { position: sticky; top: calc(var(--bar-h) + 16px); z-index: auto; width: auto; max-height: calc(100dvh - var(--bar-h) - 32px);
              border-radius: 12px; padding: 14px 16px; transform: none; visibility: visible; transition: none; }
  .pickpane:not(.open) { background: transparent; border-style: dashed; box-shadow: none; }
  .shade { display: none; }
}
@media (max-width: 699px) {

  .gearwrap { --t: 3.1em; }
  .doll { padding: 12px; }
  .dollhead { margin-bottom: 8px; }
  .dollgrid .hero canvas { width: min(100%, 7em); }
  .dollbtns { margin-top: 10px; gap: 6px; }
  .dollbtns .btn { padding: 9px 10px 10px; }
  .baggrid { grid-template-columns: repeat(auto-fill, minmax(3.5em, 1fr)); }
}

.s-pyre { --el: #ff7a45; } .s-rime { --el: #7fd8ff; } .s-blight { --el: #8fdc5a; } .s-chapel { --el: #c9e3ff; }
.s-dawn { --el: #ffd27a; } .s-moon { --el: #d6d9e8; } .s-curse { --el: var(--red); }
.bdg.set { left: 3px; bottom: 3px; color: var(--el); text-shadow: 0 0 6px var(--el); }
.setrow { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.setchip { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: .78em; font-weight: 700; padding: 3px 9px; border-radius: 999px;
           background: #120f24; border: 1px solid var(--line2); color: var(--dim); cursor: pointer; }
.setchip i { font-style: normal; color: var(--el); }
.setchip.on { color: var(--ink); border-color: var(--el); box-shadow: 0 0 8px color-mix(in srgb, var(--el) 40%, transparent); }
.setbox { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--el) 45%, var(--line)); background: #0e0c1d; }
.settitle { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.settitle i { font-style: normal; color: var(--el); }
.settitle b { color: var(--el); }
.settitle span { margin-left: auto; }
.setb { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; color: var(--dim); font-size: .9em; }
.setb b { flex: none; width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2);
          font-family: var(--mono); font-size: .85em; }
.setb.on { color: var(--ink); }
.setb.on b { background: var(--el); color: #120f22; border-color: var(--el); }
.setbox p { margin-top: 6px; }

.hollowcard { margin-top: 14px; border-color: #3a5a3a;
              background: radial-gradient(ellipse at 10% 100%, rgba(83,224,122,.14), transparent 60%), linear-gradient(180deg, #121a16, #0b0f0d); }
.hollowcard b { font-size: 1.15em; color: #9fe8b0; }
.hollowcard p { margin: 4px 0 10px; }
.btn.hollowbtn { background: linear-gradient(180deg, #4f9b62, #2f6b40); color: #eafff0; box-shadow: 0 3px 0 #1b3d25; }

#s-map.on { display: flex; flex-direction: column; height: calc(100dvh - var(--bar-h) - 18px - 28px); }
body.tabbed #s-map.on { height: calc(100dvh - var(--bar-h) - var(--tabs-h) - 18px - 36px - env(safe-area-inset-bottom)); }
@media (min-width: 820px) { body.tabbed #s-map.on { height: calc(100dvh - var(--bar-h) - 18px - 40px); } }
.maphead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.maphead .btn { width: auto; margin: 0; }
.mapname { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.mapname b { font-weight: 800; font-size: 1.15em; letter-spacing: .06em; }
.mapview { position: relative; flex: 1; min-height: 14em; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2);
           background: #07060f; box-shadow: var(--shadow); touch-action: none; }
.mapview #mp-cv { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; cursor: pointer; }

.maptip { flex-basis: 100%; margin: 0; padding: .45em .8em; border-radius: 10px; background: rgba(8,6,16,.82); color: var(--ink);
          font-size: .85em; line-height: 1.3; pointer-events: none; animation: tipin .25s ease-out; }
.maptip:empty { display: none; }
@keyframes tipin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
body.world #s-map .maptip { flex: none; max-width: calc(100% - 11.2em - 16px);
                            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@media (max-width: 560px) { body.world #s-map .maptip { max-width: calc(100% - 8.7em - 14px); } }

.panelx { display: none; }
body.world #s-map { display: flex; position: fixed; z-index: 1; left: 0; right: 0; top: var(--bar-h);
                    bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); height: auto !important; margin: 0; max-width: none; }
body.world #s-map .mapview { border-radius: 0; border: 0; box-shadow: none; }

body.world #s-map { animation: none; }
body.world #s-map .maphead { position: absolute; z-index: 2; left: 12px; top: calc(var(--hud, 0px) + 10px); right: 12px; margin: 0; pointer-events: none;
                             flex-direction: column; align-items: flex-start; gap: 6px; }
body.world #s-map .maphead .btn { display: none; }
body.world #s-map .mapname { flex: none; background: rgba(8,6,16,.72); padding: 6px 12px; border-radius: 10px; backdrop-filter: blur(4px);
                             -webkit-backdrop-filter: blur(4px); }
body.world:not(.panel-open) #app { display: none; }
body.world.panel-open #s-map::after { content: ""; position: absolute; inset: 0; z-index: 3; background: rgba(4,3,10,.55); }
body.world.panel-open #app { position: fixed; z-index: 15; left: 0; right: 0; max-width: none; margin: 0;
                             top: calc(var(--bar-h) + 7vh); bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
                             padding: 54px 16px 28px; overflow-y: auto; overscroll-behavior: contain;
                             background: linear-gradient(180deg, #151129, var(--bg) 30%); border-top: 1px solid var(--line2);
                             border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.55); animation: panelup .22s ease; }

body.world.panel-open #app::before { content: ""; position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--bar-h) + 7vh + 10px);
                                     width: 42px; height: 4px; border-radius: 2px; background: var(--line2); }
@keyframes panelup { from { opacity: 0; transform: translateY(24px); } }
body.world.panel-open .panelx { display: grid; place-items: center; position: fixed; z-index: 16; top: calc(var(--bar-h) + 7vh + 8px); right: 12px;
                                width: 2.1em; height: 2.1em; border-radius: 50%; border: 1px solid var(--line2); background: rgba(18,15,36,.92);
                                color: var(--ink); font: inherit; font-size: 1.15em; line-height: 1; cursor: pointer; }
body.world.panel-open .panelx:hover { border-color: var(--violet); }

body.world.panel-open .doll { top: 8px; }
body.world.panel-open .screen h2 { margin-top: 4px; }
body.world.panel-open .screen .top .back[data-go="home"] { display: none; }
@media (min-width: 820px) {
  body.world #s-map { bottom: 0; }
  body.world.panel-open #app { top: calc(var(--bar-h) + 14px); bottom: 14px; left: max(12px, calc((100vw - 1152px) / 2)); right: max(12px, calc((100vw - 1152px) / 2));
                               border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.6); padding: 58px 24px 28px; }
  body.world.panel-open #app::before { display: none; }
  body.world.panel-open .panelx { top: calc(var(--bar-h) + 24px); right: max(24px, calc((100vw - 1152px) / 2 + 12px)); }
}
@media (min-width: 1100px) { body.world.panel-open .pickpane { top: 8px; max-height: calc(100dvh - var(--bar-h) - 80px); } }
@media (prefers-reduced-motion: reduce) { body.world.panel-open #app { animation: none; } }

@media (max-width: 699px) { body.world.panel-open .pickpane { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); max-height: 72dvh; } }
@media (min-width: 700px) and (max-width: 1099px) { body.world.panel-open .pickpane { top: var(--bar-h); } }

.mapcard { position: absolute; z-index: 4; left: 50%; bottom: calc(var(--dock, 0px) + 14px); transform: translateX(-50%); width: min(30em, calc(100% - 24px));
           padding: 14px 16px; border-radius: 12px; background: linear-gradient(180deg, #f3ead2, #e4d6b0); color: #2b2116;
           box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: .95em; }
.mapcard b { display: block; font-size: .8em; letter-spacing: .08em; text-transform: uppercase; color: #6b5a3e; }
.mapcard p { margin: 6px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 1.05em; line-height: 1.45; }
.mapcard .btn { width: auto; margin: 0; color: #2b2116; border-color: #b8a77f; }

.minimap { position: absolute; z-index: 2; top: 10px; right: 10px; width: 9.5em; height: 6.4em; border-radius: 10px;
           border: 2px solid rgba(255,210,122,.55); background: #07060f; box-shadow: 0 6px 18px rgba(0,0,0,.5); cursor: pointer;
           image-rendering: pixelated; }
@media (max-width: 560px) { .minimap { width: 7.4em; height: 5em; } }
.worldmap { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: calc(var(--hud, 0px) + 10px) 10px 10px;
            background: rgba(7,6,15,.94); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.wmhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wmhead .btn { width: auto; margin: 0; }
.wmhead #wm-x { margin-left: auto; font-size: 1.1em; }
.wmtabs { display: flex; gap: 4px; }
.wmtab { font: inherit; font-weight: 800; padding: .4em .9em; border-radius: 999px; border: 1px solid var(--line2); background: #120f24;
         color: var(--dim); cursor: pointer; }
.wmtab.on { color: #120f22; background: linear-gradient(180deg, #ffe2a3, var(--gold)); border-color: var(--gold); }

.wmbox { position: relative; flex: 1; min-height: 0; }
.worldmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 10px; background: #0e0c1d; image-rendering: pixelated; cursor: crosshair; }
.wmtip { text-align: center; margin: 0; }
.wmkey { display: flex; flex-wrap: wrap; justify-content: center; gap: .25em .9em; font-size: .85em; color: var(--dim, #a79ccc); }
.wmkey span { display: inline-flex; align-items: center; gap: .35em; white-space: nowrap; }
.wmkey i { width: .7em; height: .7em; border-radius: 50%; display: inline-block; }
.wmkey i.ring { border: 2px solid #ffd27a; width: .6em; height: .6em; }
.wmkey i.ring.big { width: .8em; height: .8em; border-width: 1.5px; }
.wmkey i.sq { border: 2px solid #5ff3e0; border-radius: 2px; width: .6em; height: .6em; }
.wmkey i.bar { width: 1em; height: .25em; border-radius: 2px; background: #5ff3e0; }
.wmkey[hidden] { display: none; }
.gskills { margin: 0 0 10px; }
.cookrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; } .cookrow span { flex: 1 1 10em; }

.ridebtn { position: absolute; z-index: 2; top: calc(10px + 6.4em + 8px); right: 10px; width: 9.5em; margin: 0; padding: .45em .6em;
           font: 800 1em var(--pixel, inherit); letter-spacing: .04em; color: #ffd27a; background: rgba(30,18,10,.88);
           border: 2px solid rgba(255,154,60,.6); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.5), 0 0 12px rgba(255,120,40,.25); cursor: pointer; }
.ridebtn.on { color: #2b1608; background: linear-gradient(180deg, #ffb35c, #ff7a2e); border-color: #ffd27a; }
@media (max-width: 560px) { .ridebtn { top: calc(10px + 5em + 8px); width: 7.4em; font-size: .9em; } }

.talkbox { position: absolute; z-index: 4; left: 50%; bottom: calc(var(--dock, 0px) + 14px); transform: translateX(-50%); width: min(34em, calc(100% - 24px));
           display: flex; gap: .9em; align-items: flex-start; padding: .9em 1em; border-radius: 12px;
           background: linear-gradient(180deg, #f3e7c8, #e2d0a6); color: #2b2116; border: 3px solid #6b4f2c;
           box-shadow: 0 10px 28px rgba(0,0,0,.55), inset 0 0 0 2px rgba(255,255,255,.35); }
.tkface { width: 4.2em; height: 4.2em; flex: none; image-rendering: pixelated; background: #2b2116; border: 2px solid #6b4f2c; border-radius: 8px; }
.tkbody { flex: 1 1 auto; min-width: 0; }
.tkbody b { display: block; font-family: var(--pixel, inherit); font-size: 1em; letter-spacing: .04em; color: #6b2f12; }
.tkbody p { margin: .3em 0 .6em; font-size: 1em; line-height: 1.45; overflow-wrap: anywhere; }
.tkopts { display: flex; flex-wrap: wrap; gap: .45em; }
.tkopts button { margin: 0; width: auto; padding: .45em .9em; font: 700 .95em inherit; border-radius: 8px; cursor: pointer;
                 color: #2b2116; background: #fff6df; border: 2px solid #9c7a48; }
.tkopts button.main { background: #6b2f12; color: #ffe7b8; border-color: #3a180a; }
.tkopts button:focus-visible { outline: 3px solid #ff9a3c; outline-offset: 2px; }

body.world #s-map .mapname { max-width: calc(100% - 9.5em - 16px); }
@media (max-width: 560px) { body.world #s-map .mapname { max-width: calc(100% - 7.4em - 14px); } }
body.world #s-map .mapname b { display: block; }
@media (max-width: 480px) { body.world #s-map .mapname b { font-size: .8em; letter-spacing: .02em; } body.world #s-map .mapname span { font-size: .8em; } }

@media (max-width: 480px) {
  .talkbox { gap: .6em; padding: .65em .75em; bottom: calc(var(--dock, 0px) + 8px); width: calc(100% - 16px); }
  .tkface { width: 2.8em; height: 2.8em; }
  .tkbody b { font-size: .95em; }
  .tkbody p { margin: .2em 0 .45em; font-size: .95em; line-height: 1.35; }
  .tkopts { gap: .35em; }
  .tkopts button { padding: .35em .7em; font-size: .9em; }
}

body.guest .purse { display: none; }
.guestbtn { margin: 0 0 0 auto; width: auto; padding: .45em .9em; font: 800 .9em inherit; border-radius: 999px; cursor: pointer;
            color: #2b1608; background: linear-gradient(180deg, #ffd27a, #ff9a3c); border: 2px solid #ffe3a6; white-space: nowrap; }
@media (max-width: 400px) { .guestbtn { font-size: .8em; padding: .4em .7em; } }
#b-guest { width: 100%; }

#s-bank { --t: 3.6em; }
#s-bank .baggrid { margin-bottom: 1.2em; }
#s-bank h3 { margin: .2em 0 .5em; }
@media (max-width: 560px) { #s-bank { --t: 3.1em; } }

.buildbtn { color: #ffe7b8; border-color: rgba(255,210,122,.6); }
.buildbtn.on { color: #2b1608; background: linear-gradient(180deg, #ffd27a, #ffb35c); }
body.world #s-map .mapcard .btn { margin: .25em .3em 0 0; }

.buildtray { position: absolute; z-index: 4; left: 50%; bottom: calc(var(--dock, 0px) + 10px); transform: translateX(-50%); width: min(40em, calc(100% - 16px));
             padding: .6em .7em; border-radius: 12px; background: rgba(20,14,10,.94); border: 2px solid rgba(255,210,122,.5);
             box-shadow: 0 10px 28px rgba(0,0,0,.55); color: #ffe7b8; }
.buildtray .tline { margin: 0 0 .5em; font-size: .95em; }
.buildtray .trow { display: flex; flex-wrap: wrap; gap: .4em; max-height: 9.5em; overflow-y: auto; }
.buildtray .tbtn { display: inline-flex; align-items: center; gap: .4em; margin: 0; width: auto; padding: .4em .7em; font: 700 .9em inherit;
                   border-radius: 8px; cursor: pointer; color: #2b2116; background: #f3e7c8; border: 2px solid #9c7a48; }
.buildtray .tbtn canvas { width: 1.6em; height: 1.6em; image-rendering: pixelated; }
.buildtray .tbtn.on { background: #ffd27a; border-color: #ff9a3c; box-shadow: 0 0 0 2px rgba(255,154,60,.45); }
.buildtray .tbtn.ghost { background: transparent; color: #ffe7b8; border-color: rgba(255,210,122,.5); }

html { -webkit-tap-highlight-color: transparent; }
#s-map, #s-map canvas { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#mp-cv { touch-action: none; }

.musehead { grid-column: 1 / -1; display: grid; gap: .4em; margin: .2em 0 .6em; }
.musehead .bar { height: .55em; }
.musecat { grid-column: 1 / -1; margin: .5em 0; }
.muset { font-weight: 800; margin-bottom: .35em; color: var(--gold, #ffd27a); }
.musegrid { display: flex; flex-wrap: wrap; gap: .3em; }
.musechip { font-size: .82em; padding: .2em .5em; border-radius: 6px; border: 1px solid var(--line); color: var(--dim); background: rgba(255,255,255,.03); }
.musechip.found { color: var(--ink); border-color: rgba(255,210,122,.45); background: rgba(255,210,122,.08); }
.musechip.given { color: #5ff3e0; border-color: rgba(95,243,224,.5); }
.recallbtn { top: calc(10px + 6.4em + 8px + 2.7em); color: #5ff3e0; border-color: rgba(95,243,224,.55); }
@media (max-width: 560px) { .recallbtn { top: calc(10px + 5em + 8px + 2.6em); } }

.rgme { display: grid; grid-template-columns: auto 1fr; gap: .4em 1.2em; align-items: center; margin: 1em 0; }
.rgrating { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 6.5em; padding: .5em .8em;
            border-radius: 12px; background: radial-gradient(circle at 50% 30%, rgba(255,210,122,.18), transparent 70%), rgba(0,0,0,.25);
            border: 1px solid rgba(255,210,122,.35); }
.rgrating b { font-size: 2.2em; line-height: 1; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.rgrating span { font-size: .75em; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: .3em; }
.rginfo { display: flex; flex-direction: column; gap: .2em; min-width: 0; }
.rginfo > b { font-size: 1.15em; }
.rgleft { color: var(--teal); font-weight: 700; }
.rgleft.none { color: var(--dim); font-weight: 400; }
.rgtitles { grid-column: 1 / -1; margin: .2em 0 0; }
.rgoffer { display: grid; gap: .6em; }
.rgfoe { display: flex; align-items: center; gap: .8em; padding: .6em .8em; border-radius: 12px; border: 1px solid var(--line);
         background: linear-gradient(180deg, var(--panel), var(--panel2)); }
.rgfoe .grow, .rgtop .grow, .rgduel .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rgfoe .sprite { width: 2.75em; height: 2.75em; }
.rgfoe .btn { width: auto; margin: 0; flex: none; }
.rgchip { flex: none; font-family: var(--mono); font-weight: 700; font-size: .9em; padding: .15em .55em; border-radius: 999px;
          background: rgba(255,210,122,.12); color: var(--gold); border: 1px solid rgba(255,210,122,.3); }
.rgfriend { display: flex; gap: .6em; margin: .4em 0; }
.rgfriend input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: rgba(0,0,0,.3); border: 1px solid var(--line2);
                  border-radius: 10px; padding: .55em .8em; }
.rgfriend input:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.rgfriend .btn { width: auto; margin: 0; }
.rgtop { list-style: none; display: grid; gap: .4em; margin: .4em 0 0; }

.rktabs { display: flex; gap: .4em; margin: .8em 0 .6em; flex-wrap: wrap; }
.rktabs .tab { flex: 1 1 8em; }
.rkpick { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .6em; margin: 0 0 .8em; }
.rkpick span { flex: none; font-weight: 800; color: var(--dim); }
.rkpick select { flex: 1 1 14em; min-width: 0; font: inherit; font-weight: 700; color: var(--ink); background: #120f24; border: 1px solid var(--line2);
                 border-radius: 10px; padding: .55em .7em; }
.rkpick select:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.rkme { display: flex; align-items: center; gap: .8em; flex-wrap: wrap; margin: 0 0 .8em; }
.rkme .grow { flex: 1; min-width: 0; }
.rkme .rkval { font-family: var(--mono); font-weight: 800; font-size: 1.3em; color: var(--gold); }
.rknote { margin-top: 1em; }

.syhead { display: flex; align-items: center; gap: .8em; flex-wrap: wrap; margin: 0 0 .8em; }
.syhead .grow { flex: 1 1 12em; min-width: 0; }
.syhead .rkval { font-family: var(--mono); font-weight: 800; font-size: 1.3em; color: var(--gold); }
.sylist { display: grid; gap: .7em; }
.sycard { padding: .9em 1em; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.sycard.active { border-color: var(--violet); background: rgba(179,107,255,.08); }
.sycard.claim { border-color: var(--gold); background: rgba(255,210,122,.08); }
.sycard.locked { opacity: .72; }
.sycard .sytitle { margin: 0 0 .15em; font-size: 1.1em; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.sycard .symeta { font-size: .8em; color: var(--dim); font-weight: 700; }
.sycard .systory { margin: .45em 0 0; color: var(--dim); }
.sycard .systep { margin: .6em 0 0; }
.sycard .systep b { color: var(--gold); }
.sycard .sybar { height: .45em; border-radius: 99px; background: rgba(255,255,255,.08); margin: .5em 0 0; overflow: hidden; }
.sycard .sybar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--teal)); }
.sycard .sybtns { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .7em; }
.sycard .sybtns .btn { width: auto; margin: 0; }
.sycard .syreward { margin: .5em 0 0; font-weight: 700; }
.sycard select { font: inherit; color: var(--ink); background: #120f24; border: 1px solid var(--line2); border-radius: 10px; padding: .45em .6em; max-width: 100%; }

.mmtitle { display: block; font-size: .78em; font-weight: 800; color: var(--gold); letter-spacing: .02em; overflow-wrap: anywhere; }
.chtitle { display: block; font-size: .75em; font-weight: 800; color: var(--gold); overflow-wrap: anywhere; margin-top: .1em; }
.rgtop li { display: flex; align-items: center; gap: .7em; padding: .45em .7em; border-radius: 10px; background: rgba(255,255,255,.03);
            border: 1px solid var(--line); }
.rgtop li.you { border-color: var(--violet); background: rgba(179,107,255,.1); }
.rgtop li.empty { display: block; }
.rgplace { flex: none; width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 50%; font-weight: 800;
           background: rgba(255,255,255,.06); color: var(--dim); font-variant-numeric: tabular-nums; }
.rgplace.p1 { background: linear-gradient(180deg, #ffe3a3, #d9a441); color: #2a1a00; }
.rgplace.p2 { background: linear-gradient(180deg, #eef1f8, #a9b0c2); color: #1c1f2a; }
.rgplace.p3 { background: linear-gradient(180deg, #f0b98a, #a8693c); color: #2a1406; }
.rgrecent { display: grid; gap: .4em; }
.rgduel { display: flex; align-items: center; gap: .7em; width: 100%; padding: .55em .75em; border-radius: 10px; cursor: pointer;
          font: inherit; color: var(--ink); text-align: left; background: rgba(255,255,255,.03); border: 1px solid var(--line);
          border-left: 4px solid var(--dim); }
.rgduel:hover { background: rgba(255,255,255,.06); }
.rgduel.won { border-left-color: var(--teal); }
.rgduel.won > b { color: var(--teal); }
.rgduel.lost { border-left-color: var(--red); }
.rgduel.lost > b { color: var(--red); }
.rgduel > b { flex: none; width: 2.6em; }
.rgdelta { flex: none; font-family: var(--mono); font-weight: 700; }
@media (max-width: 480px) {
  .rgme { grid-template-columns: 1fr; text-align: center; }
  .rgrating { justify-self: center; }
  .rgfoe { flex-wrap: wrap; }
  .rgfoe .btn { flex-basis: 100%; }
  .rgduel .small.dim { display: none; }
}

#s-duel.on { display: flex; }
.duel { display: flex; flex-direction: column; gap: 12px; width: 100%; min-height: calc(100vh - 48px); min-height: calc(100dvh - 48px); }
.dustage { position: relative; flex: 1; min-height: 18em; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
           gap: .5em; padding: 3em 1em 2.2em; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); box-shadow: var(--shadow);
           background: radial-gradient(ellipse at 50% 110%, rgba(255,140,60,.22), transparent 60%),
                       radial-gradient(ellipse at 50% -20%, rgba(179,107,255,.25), transparent 60%), #0d0a1a; }
.dufloor { position: absolute; left: 0; right: 0; bottom: 0; height: 48%; pointer-events: none;
           background: linear-gradient(180deg, rgba(60,40,30,0), rgba(60,40,30,.55)),
                       repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 2px, transparent 2px 48px); }
.dufloor::before { content: ""; position: absolute; left: 8%; right: 8%; top: 4%; height: 26%; border-radius: 50%;
                   border: 2px solid rgba(255,210,122,.25); box-shadow: 0 0 30px rgba(255,170,80,.18) inset; }
.duhead { position: absolute; z-index: 1; left: 0; right: 0; top: .9em; text-align: center; font-size: .75em; letter-spacing: .18em;
          text-transform: uppercase; color: var(--dim); }
.dufighter { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.duname { font-weight: 800; font-size: 1.15em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dufighter.me .duname { color: var(--teal); }
.dufighter.foe .duname { color: #ffb3bf; }
.dusub { margin-bottom: .4em; }
.dusp { position: relative; width: 10em; height: 10em; max-width: 100%; }
.dusp canvas { width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges;
               filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)); }
.dufighter.foe .dusp canvas { transform: scaleX(-1); }
.dufighter .hpbar { width: 100%; max-width: 12em; height: .8em; margin: .6em 0 .3em; }
.dufighter .hpbar i { transition: width .35s ease-out; }
.dufighter.me .hpbar i { background: linear-gradient(90deg, #2fc9b5, #5ff3e0); }
.dufighter .hpbar.low i { background: linear-gradient(90deg, #ff4d6a, #ff8a5b); }
.duhp { font-family: var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.duvs { z-index: 1; align-self: center; font-family: var(--logo); font-size: 1.6em; color: var(--gold); text-shadow: 0 0 14px rgba(255,170,80,.6); }
.dufighter.me.lunge .dusp { animation: lungeR .32s ease-out; }
.dufighter.foe.lunge .dusp { animation: lungeL .32s ease-out; }
.dufighter.hurt .dusp canvas { animation: hurt .3s linear; }
.dufighter.down .dusp { transform: rotate(var(--fall, 80deg)) translateY(1.2em); opacity: .55; transition: transform .6s ease-in, opacity .6s; }
.dufighter.me.down .dusp { --fall: -80deg; }
.dufighter.win .dusp { animation: winhop .7s ease-out 2; }
@keyframes lungeR { 40% { transform: translateX(28%); } }
@keyframes lungeL { 40% { transform: translateX(-28%); } }
@keyframes hurt { 0%, 100% { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)); } 30% { filter: brightness(2.2) sepia(1) hue-rotate(-40deg) saturate(5); translate: -4px 0; } 60% { translate: 4px 0; } }
@keyframes winhop { 40% { transform: translateY(-14%); } }
.dufloat { position: absolute; z-index: 2; left: 50%; top: 4%; translate: -50% 0; font-family: var(--mono); font-weight: 800; font-size: 1.3em;
           color: #fff; text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,.8); pointer-events: none; white-space: nowrap;
           animation: dufloat 1.1s ease-out forwards; }
.dufloat.crit { color: var(--gold); font-size: 1.75em; }
.dufloat.miss { color: var(--dim); font-size: 1em; }
.dufloat.heal { color: var(--teal); }
@keyframes dufloat { 0% { opacity: 0; transform: translateY(0) scale(.7); } 15% { opacity: 1; transform: translateY(-10%) scale(1.15); }
                     100% { opacity: 0; transform: translateY(-120%) scale(1); } }
.duend { display: flex; flex-direction: column; align-items: center; gap: .1em; padding: .7em 1.4em; border-radius: 14px; text-align: center;
         background: rgba(8,6,16,.88); border: 1px solid var(--line2); box-shadow: 0 12px 40px rgba(0,0,0,.6);
         animation: duend .45s cubic-bezier(.2,1.4,.4,1); }
.duend[hidden] { display: none; }
.duend.won { border-color: rgba(255,210,122,.5); }
.duend .kicker { font-size: .75em; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.duend b { font-family: var(--logo); font-size: 2.4em; line-height: 1.05; }
.duend.won b { color: var(--gold); text-shadow: 0 0 18px rgba(255,190,90,.55); }
.duend.lost b { color: #ffb3bf; }
.duend span:last-child { font-family: var(--mono); font-weight: 700; }
.duend.won span:last-child { color: var(--teal); }
@keyframes duend { from { opacity: 0; transform: scale(.85); } }
.dulog { min-height: 7.5em; display: flex; flex-direction: column; gap: .2em; padding: .7em .9em; border-radius: 12px;
         background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.dulog p { font-size: .92em; opacity: .55; }
.dulog p:first-child { opacity: 1; }
.dulog p.mine { color: #c9fff6; }
.dulog p.theirs { color: #ffd6dd; }
.dulog p.big { color: var(--gold); font-weight: 700; }
.dubtns { display: flex; gap: .6em; justify-content: center; }
.dubtns .btn { width: auto; min-width: 12em; margin: 0; }
@media (max-width: 480px) {
  .dustage { padding: 1em .5em 1.8em; gap: .2em; }
  .dusp { width: 7.5em; height: 7.5em; }
  .duvs { font-size: 1.2em; }
  .duend b { font-size: 1.9em; }
  .dubtns .btn { flex: 1; min-width: 0; }
  .dusub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-height: 800px) { .dulog { min-height: 0; } .dulog p:nth-child(n+4) { display: none; } }

@media (max-height: 480px) {
  .duel { gap: 8px; min-height: calc(100dvh - 32px); }
  .dustage { min-height: 0; padding: 1.8em .8em .8em; }
  .dusp { width: 5.5em; height: 5.5em; }
  .dusub { display: none; }
  .dufighter .hpbar { margin: .3em 0 .1em; }
  .dulog { padding: .4em .8em; }
  .dulog p:nth-child(n+3) { display: none; }
  .duend { padding: .4em 1em; flex-direction: row; gap: .8em; align-items: baseline; justify-content: center; }
  .duend b { font-size: 1.5em; }
}

.btn.danger { color: #ffb3bf; border-color: rgba(255,107,125,.45); }
.btn.danger:hover { background: rgba(255,107,125,.12); }
.gdtag { flex: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; min-width: 3.2em; padding: .25em .5em; border-radius: 8px;
         font-family: var(--mono); font-weight: 800; letter-spacing: .06em; color: var(--gold);
         background: linear-gradient(180deg, rgba(255,210,122,.16), rgba(255,210,122,.05)); border: 1px solid rgba(255,210,122,.4); }
.gdtag::before { content: "["; opacity: .55; } .gdtag::after { content: "]"; opacity: .55; }
.gdtag.big { font-size: 1.35em; min-width: 4.2em; padding: .45em .6em; }
.gdwait { border-color: rgba(95,243,224,.35); }
.gdlist, #gd-apps { display: grid; gap: .6em; margin-bottom: .6em; }
.gdrow { display: flex; align-items: center; gap: .8em; padding: .7em .8em; border-radius: 12px; border: 1px solid var(--line);
         background: linear-gradient(180deg, var(--panel), var(--panel2)); }
.gdrow .grow, .gdmem .grow, .gdhead .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gdrow .btn, .gdmem .btn { width: auto; margin: 0; flex: none; }
.gdmottoline { color: var(--dim); font-style: italic; margin-top: .15em; }
.gdfound { display: flex; flex-direction: column; gap: .3em; }
.gdfound label { display: flex; flex-direction: column; gap: .25em; margin-top: .5em; }
.gdfound label span, .gdlab { font-weight: 700; font-size: .9em; }
.gdlab { display: block; margin-top: .7em; }
.gdfound input, .gdmotto input, .gdsend input { font: inherit; color: var(--ink); background: rgba(0,0,0,.3); border: 1px solid var(--line2);
         border-radius: 10px; padding: .55em .8em; min-width: 0; width: 100%; }
.gdfound input:focus, .gdmotto input:focus, .gdsend input:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.gdtagin { text-transform: uppercase; font-family: var(--mono); max-width: 8em; }
.gdfound .btn { margin-top: .8em; }
.gdhead { display: flex; align-items: center; gap: 1em; margin: .6em 0 .8em; }
.gdhead h2 { margin: 0; }
.gdhead #gd-motto { font-style: italic; margin: .1em 0; }
.gdpane { margin-top: .4em; }

.gdmsgs { height: clamp(13em, calc(100vh - 31em), 30em); height: clamp(13em, calc(100dvh - 31em), 30em); overflow-y: auto; overscroll-behavior: contain; display: flex;
          flex-direction: column; gap: .45em; padding: .7em; border-radius: 12px; background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.gdmsgs > :first-child { margin-top: auto; }
.gdmsg { max-width: 88%; align-self: flex-start; padding: .45em .7em; border-radius: 12px 12px 12px 4px; background: rgba(255,255,255,.06);
         border: 1px solid var(--line); }
.gdmsg.mine { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: rgba(179,107,255,.16); border-color: rgba(179,107,255,.4); }
.gdmtop { display: flex; align-items: baseline; gap: .5em; }
.gdmtop b { font-size: .9em; color: var(--teal); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gdmsg.mine .gdmtop b { color: #d9b8ff; }
.gdmsg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.gdmore { margin-left: auto; flex: none; min-width: 2.2em; min-height: 1.8em; font: inherit; font-weight: 800; line-height: 1; color: var(--dim);
          background: none; border: 0; border-radius: 8px; cursor: pointer; }
.gdmore:hover, .gdmore:focus-visible { color: var(--ink); background: rgba(255,255,255,.08); }
.gdact { display: flex; flex-wrap: wrap; gap: .4em; margin-top: .4em; }
.gdact .btn { width: auto; margin: 0; }
.gdempty { margin: auto; text-align: center; }
.gdsend { display: flex; gap: .6em; margin: .6em 0 .3em; }
.gdsend .btn { width: auto; margin: 0; flex: none; }
.gdmlist, #gd-applist { display: grid; gap: .5em; }
#gd-applist:not(:empty) { margin-bottom: .6em; }
.gdmem { display: flex; flex-wrap: wrap; align-items: center; gap: .7em; padding: .55em .7em; border-radius: 12px; border: 1px solid var(--line);
         background: rgba(255,255,255,.03); }
.gdmem.you { border-color: rgba(179,107,255,.5); }
.gdmem.ask { border-color: rgba(95,243,224,.45); }
.gdmem .sprite { width: 2.5em; height: 2.5em; }
.gdmem .gdact { flex-basis: 100%; justify-content: flex-end; }
.gdmem .online { color: var(--teal); }
.gdname { display: flex; flex-wrap: wrap; align-items: center; gap: .2em .5em; }
.gdname b { min-width: 0; overflow-wrap: anywhere; }
.gdbtns { display: flex; gap: .4em; flex: none; }
.gdrole { flex: none; font-size: .78em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .2em .6em; border-radius: 999px;
          color: var(--dim); border: 1px solid var(--line2); }
.gdrole.leader { color: #2a1a00; background: linear-gradient(180deg, #ffe3a3, #d9a441); border-color: transparent; }
.gdrole.officer { color: var(--teal); border-color: rgba(95,243,224,.45); }
.gdlog { list-style: none; display: grid; gap: .35em; margin: .4em 0 1em; }
.gdlog li { padding: .4em .7em; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.gdmotto { display: block; }
.gdmotto + .btn { width: auto; margin-top: .5em; }
.gdleave { gap: .6em; }
.gdleave .btn { width: auto; margin: 0; }
.gdreport { padding: .6em 0; border-top: 1px solid var(--line); }
.gdreport p { margin: .3em 0 .5em; overflow-wrap: anywhere; }
.gdreport .btn { width: auto; margin: 0 .4em .3em 0; }
@media (max-width: 480px) {
  .gdhead { align-items: flex-start; }
  .gdhead .gdtag.big { font-size: 1.05em; min-width: 3.4em; }
  .gdrow { flex-wrap: wrap; }
  .gdrow .btn { flex-basis: 100%; }
  .gdmem.ask .gdbtns { flex-basis: 100%; }
  .gdmem.ask .gdbtns .btn { flex: 1; }
  .gdmsg { max-width: 94%; }
}

.askwrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4,3,10,.66);
           backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s ease; }
.askwrap[hidden] { display: none; }
.askbox { width: min(26em, 100%); display: flex; flex-direction: column; gap: .5em; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.askbox b { font-size: 1.15em; overflow-wrap: anywhere; }
.askbox .row { justify-content: flex-end; gap: .6em; margin-top: .6em; flex-wrap: wrap; }
.askbox .btn { width: auto; margin: 0; flex: 1 1 8em; }

@media (max-width: 560px) { .gdmsgs { height: clamp(12em, calc(100vh - 39em), 30em); height: clamp(12em, calc(100dvh - 39em), 30em); } }

.ic-guild { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 1h1v10H2z M3 1h7v6H8V6H7v1H6V6H5v1H3z'/%3E%3C/svg%3E"); }
.ic-ranks { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 1h8v1h1v3h-1v1H9v1H7v2h2v2H3V9h2V7H3V6H2V5H1V2h1z M2 2v2h1V2z M9 2v2h1V2z'/%3E%3C/svg%3E"); }
.ic-ring { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 1h2v1h1v1h1v1h1v1h1v1H6v1H5V6H4V5H3V4H2V3H1z M11 1H9v1H8v1H7v1h1v1h1V4h1V3h1z M2 8h1V7h1v1h1v1H4v1h1v1H3v-1H2V9H1V8z M10 8H9V7H8v1H7v1h1v1H7v1h2v-1h1V9h1V8z'/%3E%3C/svg%3E"); }
.ic-out { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 1h6v3H6V2H2v8h4V8h1v3H1z M8 3h1v1h1v1h1v2h-1v1H9v1H8V7H4V5h4z'/%3E%3C/svg%3E"); }

#bar { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none;
       padding: calc(env(safe-area-inset-top) + 10px) 12px 0; height: auto; align-items: flex-start; right: auto; }
#bar > * { pointer-events: auto; }
#bar .purse { display: none; }
#bar .me { background: linear-gradient(180deg, rgba(34,26,66,.94), rgba(14,11,28,.94)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
           box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 8px 24px rgba(0,0,0,.45); max-width: min(19em, calc(100vw - 9.5em - 40px)); }
@media (max-width: 560px) { #bar .me { max-width: calc(100vw - 7.4em - 36px); } }
:root { --bar-h: 3.9em; }
body.world #s-map { top: 0; --hud: calc(var(--bar-h) + env(safe-area-inset-top)); }
body.world #s-map .maphead { right: auto; max-width: calc(100% - 9.5em - 36px); }
@media (max-width: 560px) { body.world #s-map .maphead { max-width: calc(100% - 7.4em - 32px); } }
body.world #s-map .mapname { max-width: none; }
body.world #s-map .maptip { max-width: none; }
.memenu { top: calc(var(--bar-h) + env(safe-area-inset-top) + 6px); left: 12px; }

.mmnav .tabbed-only { display: none; }
@media (min-width: 820px) {
  :root { --bar-h: 4em; }
  #tabs { display: none !important; }
  .mmnav .tabbed-only { display: flex; }
  body.tabbed #app { padding-bottom: 40px; }
  body.world.panel-open #app { top: calc(var(--bar-h) + 12px); bottom: 14px; }
  body.world.panel-open .panelx { top: calc(var(--bar-h) + 22px); }
}

.gdbankdust { display: flex; flex-direction: column; gap: .3em; margin-bottom: .6em; }
.gdbig { display: flex; align-items: baseline; gap: .6em; flex-wrap: wrap; }
.gdbig b { font-family: var(--mono); font-size: 1.9em; color: var(--gold); line-height: 1.1; }
.gdbig span { color: var(--dim); }
#gb-form .btn { flex: none; }
#gb-form input { min-width: 0; }
@media (max-width: 480px) { #gb-form { flex-wrap: wrap; } #gb-form input { flex-basis: 100%; } #gb-form .btn { flex: 1; } }
.gdweek, .gdseason { margin-bottom: .8em; }
.gdwhead { display: flex; align-items: center; justify-content: space-between; gap: .6em; flex-wrap: wrap; margin-bottom: .3em; }
.gdwhead b { font-size: 1.1em; }
.gdwbar { position: relative; height: 1.6em; margin: .6em 0 .4em; border-radius: 8px; background: rgba(0,0,0,.35); border: 1px solid var(--line2); overflow: hidden; }
.gdwbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #6d3fb3, var(--violet), var(--teal)); transition: width .6s ease-out; }
.gdwbar.done i { background: linear-gradient(90deg, #d9a441, var(--gold)); }
.gdwbar span { position: relative; display: block; text-align: center; font-family: var(--mono); font-weight: 700; font-size: .85em; line-height: 1.85em;
               text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.gdwtop { list-style: none; display: grid; gap: .25em; margin-top: .5em; counter-reset: wk; }
.gdwtop li { display: flex; justify-content: space-between; gap: .6em; padding: .3em .6em; border-radius: 8px; background: rgba(255,255,255,.03); counter-increment: wk; }
.gdwtop li::before { content: counter(wk); color: var(--dim); width: 1.2em; flex: none; }
.gdwtop li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gdwtop li.you { background: rgba(179,107,255,.12); }
.gdwtop b { font-family: var(--mono); }
.gdslist { margin-top: .6em; }
.gdslist .gdtag { font-size: .85em; min-width: 3em; }

.gdtag.f1 { border-color: #ffd27a; box-shadow: 0 0 0 2px rgba(255,210,122,.35), 0 0 14px rgba(255,190,90,.45); }
.gdtag.f2 { border-color: #d9dfee; color: #eef1f8; box-shadow: 0 0 0 2px rgba(220,226,240,.3), 0 0 12px rgba(220,226,240,.3); }
.gdtag.f3 { border-color: #d08a55; color: #f0b98a; box-shadow: 0 0 0 2px rgba(208,138,85,.3), 0 0 12px rgba(208,138,85,.3); }
#gd-bank { --t: 3.6em; }
@media (max-width: 560px) { #gd-bank { --t: 3.1em; } }

#gd-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35em; }
#gd-tabs .tab { display: flex; align-items: center; justify-content: center; gap: .35em; padding: .5em .3em; min-width: 0; }
.gdbadge { min-width: 1.4em; height: 1.4em; padding: 0 .3em; display: inline-grid; place-items: center; border-radius: 999px; font-style: normal;
           font-size: .75em; font-weight: 800; color: #140f26; background: var(--teal); }
@media (max-width: 420px) { #gd-tabs { grid-template-columns: repeat(2, 1fr); } }

.legalnote { margin-top: 1.2em; text-align: center; }
.legalnote a, #s-settings .card a { color: var(--teal); }
.setdel { margin-top: .8em; padding: .8em; border-radius: 10px; border: 1px solid rgba(255,107,125,.45); background: rgba(255,107,125,.06); }
#set-del { width: auto; margin-top: .4em; }
#set-admdel { flex-wrap: wrap; }
#set-admdel input { flex: 1 1 10em; margin: 0; }
#set-del-f input { margin: 0; }
.btn.danger:not(.ghost) { color: #2a0a10; background: linear-gradient(180deg, #ff9aa8, #ff5a72); border-color: #ff8a9a; box-shadow: 0 4px 0 #a8324a; }

.onlinepill { position: absolute; z-index: 2; left: 10px; bottom: calc(var(--dock, 0px) + 10px); display: flex; align-items: center; gap: .45em;
              padding: .3em .75em; border-radius: 999px; font-size: .82em; pointer-events: none;
              background: rgba(14,11,28,.82); border: 1px solid var(--line2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
              box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.onlinepill[hidden] { display: none; }
.onlinepill i { width: .55em; height: .55em; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: onlinepulse 2s ease-out infinite; }
.onlinepill b { font-family: var(--mono); color: var(--ink); }
.onlinepill span { color: var(--dim); }
@keyframes onlinepulse { 70% { box-shadow: 0 0 0 .5em rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
@media (prefers-reduced-motion: reduce) { .onlinepill i { animation: none; } }

#s-map:has(.talkbox:not([hidden]), .mapcard:not([hidden]), .buildtray:not([hidden])) .onlinepill { display: none; }

.ski-mining { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 1h6v1h2v1h1v2h-1V4H9V3H7V2H2z M6 4h1v1h1v1H7v1H6v1H5v1H4v1H3v1H1v-2h1V9h1V8h1V7h1V6h1z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ski-foraging { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M3 2h6v1h1v1h1v2h-1v1H2V6H1V4h1V3h1z M5 7h2v4H4v-1h1z M4 4h1v1H4z M7 3h1v1H7z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ski-fishing { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 6h1V5h1V4h5v1h1v1h1V5h1V4h1v5h-1V8H9V7H8v1H7v1H3V8H2V7H1z M7 5v1h1V5z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ski-hunting { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 3h2v2H2z M5 1h2v2H5z M8 3h2v2H8z M4 6h4v1h1v3H8v1H4v-1H3V7h1z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ski-cooking { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 4h10v2h-1v4H9v1H3v-1H2V6H1z M3 1h1v2H3z M6 1h1v2H6z M8 2h1v1H8z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ski-forging { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 3h8v1h2v1H9v2H7v1h1v2h1v1H2v-1h1V8h1V7h1V6H3V5H1z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ski-alchemy { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M4 1h4v1H7v3h1v1h1v1h1v4H9v1H3v-1H2V6h1V5h1V4h1V2H4z M3 8v1h6V8z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ski-combat { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M9 1h2v2h-1v1H9v1H8v1H7v1H6v1H5V7H4V6h1V5h1V4h1V3h1V2h1z M2 6h1v1h1v1h1v1h1v1H5v1H4v-1H3V9H2V8H1V7h1z M8 8h1v1h1v1h1v1H9v-1H8z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ic-skills { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 1h4v4H1z M7 1h4v4H7z M1 7h4v4H1z M7 7h4v4H7z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.skic { display: inline-block; width: 1.6em; height: 1.6em; flex: none; background: currentColor;
        -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; filter: drop-shadow(0 0 6px currentColor); }
.skic.big { width: 3em; height: 3em; }
.skgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55em; margin-top: .8em; }
@media (min-width: 700px) { .skgrid { grid-template-columns: repeat(4, 1fr); } }
.sktile { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; gap: .1em .55em;
          padding: .65em .7em .9em; border-radius: 12px; cursor: pointer; font: inherit; color: var(--ink); text-align: left;
          background: linear-gradient(180deg, #221b3e, #15112a); border: 1px solid var(--line2);
          box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 4px 12px rgba(0,0,0,.3); transition: transform .12s, border-color .15s; }
.sktile:hover { border-color: var(--sk); transform: translateY(-1px); }
.sktile.on { border-color: var(--sk); box-shadow: 0 0 0 1px var(--sk), 0 0 18px color-mix(in srgb, var(--sk) 35%, transparent); }
.sktile .skic { grid-row: 1 / 3; }
.sklv { display: flex; align-items: baseline; gap: .1em; justify-self: end; }
.sklv b { font-family: var(--mono); font-size: 1.45em; line-height: 1; color: #fff; text-shadow: 0 1px 0 #000; }
.sklv small { font-family: var(--mono); color: var(--dim); font-size: .8em; }
.sknm { grid-column: 2; justify-self: end; font-size: .78em; font-weight: 700; color: var(--dim); white-space: nowrap; }
.skbar { position: absolute; left: .7em; right: .7em; bottom: .4em; height: .25em; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.skbar i { position: absolute; inset: 0 auto 0 0; background: var(--sk); border-radius: inherit; }
.sktile.maxed { background: linear-gradient(180deg, color-mix(in srgb, var(--sk) 22%, #221b3e), #15112a); }
.sktile.maxed .sklv b { color: var(--gold); }
.sktotal { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: .6em .9em; border-radius: 12px;
           background: linear-gradient(90deg, rgba(255,210,122,.14), rgba(255,210,122,.04)); border: 1px solid rgba(255,210,122,.4); }
.sktotal span { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .85em; color: var(--gold); }
.sktotal b { font-family: var(--mono); font-size: 1.2em; }
.skdetail { border-color: var(--sk); margin-bottom: .4em; animation: fade .25s ease; }
.skhead { display: flex; align-items: center; gap: .9em; }
.skhead .grow { min-width: 0; flex: 1; }
.skhead h3 { margin: 0; color: var(--sk); }
.skhead .btn { width: auto; margin: 0; align-self: flex-start; }
.skbiglv b { font-family: var(--mono); font-size: 1.5em; }
.skxpbar { position: relative; height: 1.5em; margin: .8em 0 .4em; border-radius: 8px; background: rgba(0,0,0,.35); border: 1px solid var(--line2); overflow: hidden; }
.skxpbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--sk) 55%, #1a1430), var(--sk)); transition: width .6s; }
.skxpbar span { position: relative; display: block; text-align: center; font-family: var(--mono); font-weight: 700; font-size: .82em; line-height: 1.85em; text-shadow: 0 1px 2px #000; }
.sklab { margin: 1em 0 .4em; font-size: .75em; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.skrows { list-style: none; display: grid; gap: .3em; max-height: 26em; overflow-y: auto; overscroll-behavior: contain; padding-right: .2em; }
.skrows li { display: flex; align-items: center; gap: .7em; padding: .45em .6em; border-radius: 10px; background: rgba(255,255,255,.025); border: 1px solid var(--line); opacity: .6; }
.skrows li.got { opacity: 1; }
.skrows li.next { opacity: 1; border-color: var(--sk); background: color-mix(in srgb, var(--sk) 10%, transparent); }
.skrows .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.skrowlv { flex: none; min-width: 2.3em; text-align: center; font-family: var(--mono); font-weight: 800; padding: .15em .3em; border-radius: 8px;
           color: #140f26; background: var(--sk); }
.skrows li:not(.got) .skrowlv { color: var(--sk); background: transparent; border: 1px solid var(--sk); }
.skrowst { flex: none; color: var(--sk); font-weight: 800; width: 1em; }

.gskrow { display: flex; gap: .4em; flex-wrap: wrap; }
.gsk { display: flex; align-items: center; gap: .35em; padding: .3em .6em .3em .4em; border-radius: 10px; font: inherit; cursor: pointer; color: var(--ink);
       background: rgba(0,0,0,.25); border: 1px solid var(--line2); }
.gsk:hover { border-color: var(--sk); }
.gsk .skic { width: 1.3em; height: 1.3em; }
.gsk b { font-family: var(--mono); }
.gskall { width: auto; margin: .5em 0 0; }

.lvlup { position: fixed; z-index: 55; left: 50%; top: calc(var(--bar-h) + env(safe-area-inset-top) + 14px); transform: translateX(-50%);
         width: min(24em, calc(100vw - 24px)); display: flex; flex-direction: column; align-items: center; gap: .2em; padding: 1em 1.2em .9em;
         border-radius: 16px; text-align: center; cursor: pointer; overflow: hidden;
         background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--sk) 30%, transparent), transparent 70%), linear-gradient(180deg, #241c45, #120e24);
         border: 2px solid var(--sk); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 18px 50px rgba(0,0,0,.6), 0 0 30px color-mix(in srgb, var(--sk) 40%, transparent); }
.lvlup[hidden] { display: none; }
.lvlup.in { animation: lvin .45s cubic-bezier(.2,1.5,.4,1) both; }
.lvlup.out { animation: lvout .28s ease-in both; }
@keyframes lvin { from { opacity: 0; transform: translate(-50%, -18px) scale(.85); } }
@keyframes lvout { to { opacity: 0; transform: translate(-50%, -12px) scale(.95); } }
.lvlup .lvfw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lvlup .skic { position: relative; animation: lvicon .9s ease-out; }
@keyframes lvicon { 30% { transform: scale(1.35) rotate(-8deg); } 60% { transform: scale(.95) rotate(4deg); } }
.lvlup .lvk { position: relative; font-size: .78em; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.lvlup b { position: relative; font-family: var(--logo); font-size: 1.7em; line-height: 1.1; color: #fff; text-shadow: 0 0 14px var(--sk); }
.lvlup b .lvat { white-space: nowrap; }
.lvlup b .lvdig { font-family: var(--pixel); font-weight: 800; }
.lvlup .small { position: relative; color: #d9d0f5; }
.lvlup .lvnew { position: relative; margin-top: .35em; font-size: .85em; font-weight: 700; color: var(--sk); }
@media (prefers-reduced-motion: reduce) { .lvlup.in, .lvlup.out, .lvlup .skic { animation: none; } }

.skrewards { margin: .8em 0; }
.skrwh { display: flex; flex-direction: column; gap: .4em; }
.skrwh b { font-size: 1.05em; color: var(--gold); }
.skmbar { position: relative; height: .6em; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid var(--line2); }
.skmbar span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #d9a441, var(--gold)); }
.skmbar i { position: absolute; top: -.25em; width: .25em; height: 1.1em; margin-left: -.12em; border-radius: 2px; background: var(--line2); }
.skmbar i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.skms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(9.5em, 100%), 1fr)); gap: .4em; margin: .8em 0; }
.skm { display: flex; flex-direction: column; gap: .15em; padding: .5em .6em; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); opacity: .6; position: relative; }
.skm b { font-family: var(--mono); font-size: 1.15em; }
.skm.ready { opacity: 1; border-color: var(--gold); background: rgba(255,210,122,.08); }
.skm.done { opacity: 1; }
.skm .btn { width: auto; margin: .3em 0 0; }
.skmok { position: absolute; top: .4em; right: .6em; color: var(--teal); font-weight: 800; }
.skcapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4em; }
@media (min-width: 700px) { .skcapes { grid-template-columns: repeat(8, 1fr); } }
.skcape { display: flex; flex-direction: column; align-items: center; gap: .2em; padding: .5em .3em; border-radius: 10px; border: 1px solid var(--line);
          background: rgba(0,0,0,.2); text-align: center; opacity: .45; min-width: 0; }
.skcape canvas { width: 2.6em; height: 2.6em; image-rendering: pixelated; image-rendering: crisp-edges; filter: grayscale(.8); }
.skcape.owned, .skcape.ready { opacity: 1; }
.skcape.owned canvas, .skcape.ready canvas { filter: drop-shadow(0 0 6px var(--sk)); }
.skcape.ready { border-color: var(--sk); background: color-mix(in srgb, var(--sk) 10%, transparent); }
.skcape.worn { border-color: var(--sk); box-shadow: 0 0 0 1px var(--sk); }
.skcape .small { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.skcape .btn { width: 100%; margin: .2em 0 0; padding: .3em .2em; font-size: .78em; }
.hallgrid { display: flex; flex-wrap: wrap; gap: .35em; }
.hallchip { display: inline-flex; align-items: center; gap: .3em; padding: .25em .55em .25em .35em; border-radius: 999px; border: 1px solid var(--line2); background: rgba(0,0,0,.25); }
.hallchip .skic { width: 1.15em; height: 1.15em; }
.hallchip b { font-family: var(--mono); }
.hallchip.maxed { border-color: var(--sk); }
.hallchip.maxed b { color: var(--gold); }

.btn.gnative { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f;
  box-shadow: 0 3px 0 #b9b6c9; font-family: inherit; font-weight: 700; }
.btn.gnative i { font-style: normal; font-weight: 800; font-size: 1.15em; width: 1.4em; height: 1.4em; display: grid; place-items: center;
  border-radius: 50%; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); color: #fff; }

.buycard { border-color: rgba(255,210,122,.4); background: radial-gradient(ellipse at 10% 0%, rgba(255,210,122,.14), transparent 60%), linear-gradient(180deg, var(--panel), var(--panel2)); }
.buycard .kind { color: var(--gold); font-size: .75em; letter-spacing: .08em; text-transform: uppercase; }
.buycard .sub { display: block; margin-top: 14px; font-size: .9em; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(7.2em, 40%), 1fr)); gap: 8px; margin-top: 8px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line2); background: rgba(255,122,69,.08); color: var(--ink); font: inherit; text-align: center; }
.pack b { font-family: var(--pixel); font-size: 1em; color: #ffb38a; }
.pack span { font-size: .9em; font-weight: 700; }
.pack s { color: var(--dim); font-weight: 400; }
.pack.item { background: rgba(255,255,255,.04); }
.pack.item.r-rare b { color: var(--gold); } .pack.item.r-ultra b { color: #e08bff; }
.pack:hover { border-color: var(--gold); }
.pack:disabled { opacity: .5; cursor: default; }

#b-day { white-space: nowrap; }

.vpad { position: absolute; z-index: 6; width: 8.5em; height: 8.5em; transform: translate(-50%, -50%); pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, rgba(18,13,38,.55) 0 58%, rgba(18,13,38,.3) 70%, transparent 72%);
  border: 2px solid rgba(214,160,255,.45); box-shadow: 0 0 18px rgba(179,107,255,.25); }
.vpad i { position: absolute; width: 2.2em; height: 2.2em; border-radius: .5em; background: rgba(239,231,255,.14); border: 1px solid rgba(239,231,255,.3); }
.vpad i::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border: .45em solid transparent; }
.vpad .vu { left: 50%; top: .45em; transform: translateX(-50%); } .vpad .vu::after { border-bottom-color: #efe7ff; margin-top: .25em; }
.vpad .vd { left: 50%; bottom: .45em; transform: translateX(-50%); } .vpad .vd::after { border-top-color: #efe7ff; margin-bottom: .25em; }
.vpad .vl { top: 50%; left: .45em; transform: translateY(-50%); } .vpad .vl::after { border-right-color: #efe7ff; margin-left: .25em; }
.vpad .vr { top: 50%; right: .45em; transform: translateY(-50%); } .vpad .vr::after { border-left-color: #efe7ff; margin-right: .25em; }
.vpad i.on { background: rgba(179,107,255,.75); border-color: #e0c4ff; box-shadow: 0 0 10px rgba(179,107,255,.8); }
.vpad .knob { position: absolute; left: 50%; top: 50%; width: 2.9em; height: 2.9em; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #f3e9ff, #b36bff 60%, #6d3fb3); box-shadow: 0 2px 8px rgba(0,0,0,.5); display: none; }
.vpad.stick .knob { display: block; }
.vpad.stick i { background: none; border-color: transparent; }
.vpad.stick i.on { background: none; box-shadow: none; }
.vpad.stick i.on::after { filter: drop-shadow(0 0 4px #b36bff); }
#set-ctrl-more .seg { margin-top: 12px; }

.boughtwrap { z-index: 61; }
.boughtbox { width: min(22em, 100%); text-align: center; align-items: center; display: flex; flex-direction: column; gap: .35em; padding: 1.6em 1.2em 1.2em;
  border-color: rgba(255,210,122,.55); background: radial-gradient(ellipse at 50% 0%, rgba(255,122,69,.25), transparent 65%), linear-gradient(180deg, var(--panel), var(--panel2));
  box-shadow: 0 0 40px rgba(255,140,60,.25), 0 20px 60px rgba(0,0,0,.6); animation: btpop .45s cubic-bezier(.2,1.4,.4,1); }
.boughtbox .btorb { width: 4.2em; height: 4.2em; border-radius: 50%; margin-bottom: .3em;
  background: radial-gradient(circle at 40% 35%, #fff3d6, #ffb04d 35%, #ff6a2b 65%, #7a1f0c); box-shadow: 0 0 30px rgba(255,140,60,.8), 0 0 60px rgba(255,90,40,.35);
  animation: btglow 1.6s ease-in-out infinite alternate; }
.boughtbox .btkind { color: var(--gold); font-size: .75em; letter-spacing: .1em; text-transform: uppercase; }
.boughtbox b { font-family: var(--pixel); font-size: 1.7em; color: #ffd27a; }
.boughtbox p { margin: 0 0 .6em; color: var(--ink); }
.boughtbox .row { width: 100%; gap: 8px; }
.boughtbox.r-rare .btorb { background: radial-gradient(circle at 40% 35%, #fffbe6, #ffd27a 40%, #b8862e); box-shadow: 0 0 30px rgba(255,210,122,.8); }
.boughtbox.r-ultra { border-color: rgba(224,139,255,.6); }
.boughtbox.r-ultra .btorb { background: radial-gradient(circle at 40% 35%, #fff, #e08bff 40%, #6d3fb3); box-shadow: 0 0 34px rgba(224,139,255,.9); }
.boughtbox.r-ultra b { color: #e08bff; }
@keyframes btpop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes btglow { from { transform: scale(.94); filter: brightness(.95); } to { transform: scale(1.04); filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .boughtbox, .boughtbox .btorb { animation: none; } }

.setver { margin-top: 1.4em; font-family: var(--mono); }

.intro { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4em;
  background: radial-gradient(ellipse at 50% 42%, #2a1650, #120b26 55%, #07060f); overflow: hidden; opacity: 1; transition: opacity .45s ease;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); }
.intro[hidden] { display: none; }
.intro.out { opacity: 0; }
.intro .in-glow { position: absolute; left: 50%; top: 62%; width: 140vmin; height: 34vmin; transform: translate(-50%, -50%) scale(.4); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(214,160,255,.55), rgba(179,107,255,.25) 40%, transparent 70%); opacity: 0; transition: opacity 1.6s ease, transform 2.4s ease; }
.intro.on .in-glow { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.intro .in-logo { font-family: var(--logo); font-weight: 700; font-size: 2.7em; letter-spacing: .25em; padding-left: .25em; margin: 0; color: #efe7ff;
  text-shadow: 0 0 .35em rgba(179,107,255,.9), 0 0 1em rgba(179,107,255,.5); opacity: 0; transform: translateY(.4em) scale(.96); transition: opacity 1.1s ease .2s, transform 1.4s cubic-bezier(.2,.8,.2,1) .2s; }
.intro .in-tag { margin: 0 0 2.2em; color: #c9bde6; opacity: 0; transition: opacity 1s ease 1.1s; text-align: center; }
.intro.on .in-logo, .intro.on .in-tag { opacity: 1; transform: none; }
.intro .in-line { position: relative; display: flex; gap: 1.1em; z-index: 1; }
.intro .in-line canvas { width: 3.6em; height: 3.6em; image-rendering: pixelated; opacity: 0; transform: translateY(.6em);
  filter: drop-shadow(0 .25em .3em rgba(0,0,0,.55)); transition: opacity .6s ease, transform .7s cubic-bezier(.2,1.3,.4,1); }
.intro.on .in-line canvas { opacity: 1; transform: none; }
.intro.on .in-line canvas:nth-child(1) { transition-delay: 1.7s; } .intro.on .in-line canvas:nth-child(2) { transition-delay: 2s; }
.intro.on .in-line canvas:nth-child(3) { transition-delay: 2.3s; } .intro.on .in-line canvas:nth-child(4) { transition-delay: 2.6s; }
.intro.on .in-line canvas:nth-child(5) { transition-delay: 2.9s; }
.intro .in-ground { width: min(26em, 92vw); height: .5em; margin-top: -.1em; border-radius: 50%; background: radial-gradient(ellipse, rgba(214,160,255,.7), transparent 70%);
  opacity: 0; transition: opacity 1s ease 1.6s; }
.intro.on .in-ground { opacity: 1; }
.intro .in-skip { position: absolute; bottom: calc(2em + env(safe-area-inset-bottom)); margin: 0; font-size: .8em; color: rgba(201,189,230,.6); letter-spacing: .08em;
  opacity: 0; transition: opacity .8s ease 2s; }
.intro.on .in-skip { opacity: 1; }
@media (max-width: 380px) { .intro .in-line { gap: .6em; } .intro .in-line canvas { width: 3em; height: 3em; } .intro .in-logo { font-size: 2.2em; } }
@media (prefers-reduced-motion: reduce) { .intro *, .intro { transition-duration: .01s !important; transition-delay: 0s !important; } }

:root { --bar-h: calc(env(safe-area-inset-top) + .4em); --tabs-h: 4.7em; }
.ic-steed { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M5 1h2v1h1v1h2v1h1v2H9V5H8v2H7v4H2V9h1V7h1V3h1z'/%3E%3C/svg%3E"); }
.ic-recall { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M3 1h6v1h1v1h1v4h-1v1H9V7h1V3H9V2H3v1H2v4h1v1h3v1h1v1h1v1H6v-1H5v-1H3V8H2V7H1V3h1V2h1z M5 4h2v2H5z'/%3E%3C/svg%3E"); }
.ic-build { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 1h7v1h1v3H8V4H7v7H5V4H2z'/%3E%3C/svg%3E"); }

nav#tabs.dock { display: flex; align-items: center; gap: .55em; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; top: auto; transform: none;
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding: .4em .7em calc(.4em + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(30,22,58,.92), rgba(10,8,22,.96)); border: 0; border-top: 1px solid rgba(179,107,255,.35);
  box-shadow: 0 -10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 18px 18px 0 0; grid-template-columns: none; }
nav#tabs.dock[hidden] { display: none !important; }
.dock .dockme { flex: none; display: flex; }
.dock .dockplaces { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); min-width: 0; height: 100%; }
nav#tabs.dock .dockplaces button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25em;
  background: none; border: 0; color: var(--dim); font: inherit; font-size: .78em; font-weight: 700; letter-spacing: .02em; cursor: pointer; padding: 0; border-radius: 12px; }
nav#tabs.dock .dockplaces button .ic { width: 1.6em; height: 1.6em; }
@media (hover: hover) { nav#tabs.dock .dockplaces button:hover { color: var(--ink); background: rgba(179,107,255,.08); } }
nav#tabs.dock .dockplaces button.on { color: var(--ink); }
nav#tabs.dock .dockplaces button.on .ic { background: var(--violet); filter: drop-shadow(0 0 6px rgba(179,107,255,.8)); }
nav#tabs.dock .dockplaces button.on::before { content: ""; position: absolute; top: -.25em; left: 30%; right: 30%; height: 3px; border-radius: 3px; background: var(--violet);
  box-shadow: 0 0 8px var(--violet); }
nav#tabs.dock .dockplaces button span { white-space: nowrap; }

nav#tabs.dock .me { background: none; border: 0; box-shadow: none; padding: 0; gap: .55em; max-width: none; overflow: visible; backdrop-filter: none; -webkit-backdrop-filter: none; }
nav#tabs.dock .me .portrait { width: 3.1em; height: 3.1em; border-radius: 14px; box-shadow: 0 0 0 2px rgba(179,107,255,.55), 0 4px 12px rgba(0,0,0,.5); }
nav#tabs.dock .me .who { display: none; }
nav#tabs.dock .me .caret { display: none; }
nav#tabs.dock .me:hover .portrait, nav#tabs.dock .me.open .portrait { box-shadow: 0 0 0 2px #e0c4ff, 0 0 14px rgba(179,107,255,.7); }

nav#tabs.dock .dockact { position: fixed; z-index: 21; right: 12px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 14px); flex: none;
  display: flex; flex-direction: column-reverse; align-items: center; gap: .6em; pointer-events: none; }
nav#tabs.dock .dockact > * { pointer-events: auto; }
body.panel-open nav#tabs.dock .dockact, body:not(.world) nav#tabs.dock .dockact { display: none; }
nav#tabs.dock .dockbtn { position: static; inset: auto; width: auto; height: auto; min-width: 0; margin: 0; padding: 0; display: flex; flex-direction: column;
  align-items: center; gap: .3em; background: none; border: 0; box-shadow: none; border-radius: 0; font: inherit; font-size: .72em; font-weight: 800;
  letter-spacing: .02em; line-height: 1; color: var(--ink); cursor: pointer; }

nav#tabs.dock .dockbtn .ring { display: grid; place-items: center; width: 3.6em; height: 3.6em; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(84,64,150,.96), rgba(30,22,58,.97)); border: 2px solid rgba(179,107,255,.6);
  box-shadow: 0 4px 0 rgba(10,8,22,.9), 0 8px 20px rgba(0,0,0,.45); }
nav#tabs.dock .dockbtn span { white-space: nowrap; padding: .2em .5em; border-radius: 6px; background: rgba(8,6,16,.78); color: var(--ink); text-shadow: none; }
nav#tabs.dock .dockbtn[hidden] { display: none; }
nav#tabs.dock .dockbtn .ic { width: 1.8em; height: 1.8em; }

nav#tabs.dock .dockbtn:active .ring { transform: translateY(2px); box-shadow: 0 1px 0 rgba(10,8,22,.9); }
nav#tabs.dock .dockbtn.on .ring { color: #2b1608; background: radial-gradient(circle at 50% 30%, #ffd08a, #ff8a3a); border-color: #ffd27a; box-shadow: 0 4px 0 #a24d14, 0 0 16px rgba(255,160,70,.55); }
nav#tabs.dock .dockbtn.on .ic { background: #2b1608; }
nav#tabs.dock .recallbtn .ring { color: #5ff3e0; border-color: rgba(95,243,224,.6); }
nav#tabs.dock .buildbtn .ring { color: #ffe7b8; border-color: rgba(255,210,122,.65); }
nav#tabs.dock .buildbtn.on .ring { color: #2b1608; background: radial-gradient(circle at 50% 30%, #ffe6a8, #ffb35c); }
@media (max-width: 380px) { nav#tabs.dock { gap: .35em; padding-left: .5em; padding-right: .5em; } }

.memenu { top: auto; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 10px); left: 10px; max-height: calc(100dvh - var(--tabs-h) - env(safe-area-inset-bottom) - 40px); }
.mmnav .tabbed-only { display: none !important; }

body.tabbed #app { padding-bottom: calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom)); }
body.framed #app { padding-top: calc(env(safe-area-inset-top) + 14px); }
body.world #s-map { top: 0; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); --hud: env(safe-area-inset-top); }
body.world.panel-open #app { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }

@media (min-width: 820px) {
  nav#tabs.dock:not([hidden]) { display: flex !important; left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); width: min(40em, calc(100vw - 24px));
    height: var(--tabs-h); padding: .4em .8em; border-radius: 20px; border: 1px solid rgba(179,107,255,.35); }
  nav#tabs.dock .me .who { display: flex; } nav#tabs.dock .me .who b { max-width: 8em; font-size: .9em; }
  .memenu { bottom: calc(var(--tabs-h) + 26px); left: calc(50% - min(20em, 50vw - 12px)); }
  body.world #s-map { bottom: 0; }
  body.tabbed #app { padding-bottom: calc(var(--tabs-h) + 40px); }
  body.world.panel-open #app { top: calc(env(safe-area-inset-top) + 14px); bottom: calc(var(--tabs-h) + 28px); }
  body.world.panel-open .panelx { top: calc(env(safe-area-inset-top) + 24px); }
}

body.world #s-map .mapname { position: fixed; z-index: 4; left: 50%; top: calc(env(safe-area-inset-top) + 16vh); transform: translate(-50%, 0); max-width: calc(100vw - 32px) !important;
  background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 1s ease, transform 1s ease; }
body.world #s-map .mapname.fresh { opacity: 1; animation: bannerIn 1s cubic-bezier(.2,.8,.2,1); }
body.world #s-map .mapname.gone { opacity: 0; transform: translate(-50%, -.4em); }
body.world #s-map .mapname { padding: .9em 2.2em !important; background: radial-gradient(ellipse at center, rgba(8,6,16,.62), rgba(8,6,16,.35) 45%, transparent 72%) !important; }
body.world #s-map .mapname b { display: block; font-family: var(--logo); font-size: min(1.55em, 6.4vw) !important; letter-spacing: .1em !important; white-space: nowrap; color: #efe7ff;
  text-shadow: 0 0 .4em rgba(179,107,255,.9), 0 2px 0 rgba(0,0,0,.7), 0 0 1.2em rgba(0,0,0,.6); }
body.world #s-map .mapname span { display: block; margin-top: .3em; font-size: 1em !important; color: #e3d9ff; text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 .8em rgba(0,0,0,.7); }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, .6em) scale(.96); letter-spacing: .3em; } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { body.world #s-map .mapname.fresh { animation: none; } }

body.world #s-map .maphead { top: calc(env(safe-area-inset-top) + 10px); max-width: calc(100% - 9.5em - 36px); }
@media (max-width: 560px) { body.world #s-map .maphead { max-width: calc(100% - 7.4em - 32px); } }
body.mini-left.world #s-map .maphead { left: auto; right: 12px; }

body.world .minimap { top: calc(env(safe-area-inset-top) + 10px); }
body.mini-left .minimap { right: auto; left: 10px; }
body.world .onlinepill { left: auto; right: 10px; top: calc(env(safe-area-inset-top) + 10px + 6.4em + 6px); bottom: auto; padding: .2em .55em;
  background: rgba(8,6,16,.72); }
body.world .onlinepill b, body.world .onlinepill span { font-size: .78em; }
@media (max-width: 560px) { body.world .onlinepill { top: calc(env(safe-area-inset-top) + 10px + 5em + 6px); } }
body.mini-left.world .onlinepill { right: auto; left: 10px; }
nav#tabs.dock .dockbtn::before { display: none !important; }

.ic-chat { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 1h8v1h1v6h-1v1H6v1H5v1H4V9H2V8H1V2h1z M3 4v1h6V4z M3 6v1h4V6z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
nav#tabs.dock .dockplaces { grid-template-columns: repeat(5, 1fr); }
.dockbadge, .tabbadge { position: absolute; top: .1em; right: 18%; min-width: 1.5em; height: 1.5em; padding: 0 .35em; border-radius: .75em; display: grid; place-items: center;
  font-style: normal; font-size: .78em; font-weight: 800; color: #fff; background: #ff4d6d; box-shadow: 0 0 0 2px rgba(10,8,22,.95); }
.dockbadge[hidden], .tabbadge[hidden] { display: none; }
.tabbadge { position: static; display: inline-grid; margin-left: .4em; vertical-align: middle; }
#ch-tabs { margin: .4em 0 .8em; }
.chname { font: inherit; font-size: .9em; font-weight: 800; color: var(--teal); background: none; border: 0; padding: 0; cursor: pointer; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.chname:hover { text-decoration: underline; }
.gdmsg.mine .chname { color: #d9b8ff; }
.chrow { display: flex; align-items: center; gap: .6em; padding: .5em 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chrow > :first-child { flex: 1; min-width: 6em; overflow-wrap: anywhere; }
.chrow .btn { width: auto; margin: 0; }
.chfriend { display: flex; align-items: center; gap: .7em; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  padding: .65em .8em; margin: 0 0 .45em; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.chfriend:hover { border-color: rgba(179,107,255,.55); }
.chfriend .grow { display: flex; flex-direction: column; min-width: 0; gap: .15em; }
.chfriend .grow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chdot, .chonline i { flex: none; width: .65em; height: .65em; border-radius: 50%; background: #555170; }
.chfriend.on .chdot, .chonline i { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.7); }
.chonline { display: flex; align-items: center; gap: .5em; margin: .2em 0 .3em; }
.chthead { display: flex; align-items: center; gap: .7em; margin-bottom: .3em; flex-wrap: wrap; }
.chthead .btn { width: auto; margin: 0; }
.chthead b { font-size: 1.1em; }
.chforget { margin: .2em 0 .5em; color: rgba(201,189,230,.55); font-style: italic; text-align: center; }
.chblocked { margin: 1em 0 .5em; }
.chblocked summary { cursor: pointer; }
.chblocked[hidden] { display: none; }

@media (min-width: 820px) { body.world #s-map { --dock: calc(var(--tabs-h) + 14px); } }

.worldmap { padding-bottom: calc(var(--dock, 0px) + 10px); }
body:has(#mp-world:not([hidden])) nav#tabs.dock .dockact { display: none; }

body:has(#mp-talk:not([hidden]), #mp-card:not([hidden])) nav#tabs.dock .dockact { display: none; }

body:has(#mp-tray:not([hidden])) nav#tabs.dock .dockact { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 14px + var(--trayh, 9em)); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.chat-on.world.panel-open #app { top: 0; padding: 0; overflow: hidden; border-radius: 0; border: 0; background: linear-gradient(180deg, #120e24, #0b0918); animation: none; }
body.chat-on.world.panel-open #app::before { display: none; }
body.chat-on #s-chat.on { display: flex; flex-direction: column; height: 100%; margin: 0; max-width: none; padding: calc(env(safe-area-inset-top) + 10px) 12px 0; }
body.chat-on .panelx { top: calc(env(safe-area-inset-top) + 10px) !important; right: 12px !important; }
#s-chat .chtabs { flex: none; margin: 0 3em .6em 0; }
#s-chat #ch-err { flex: none; margin: 0 0 .4em; }
#s-chat .gdpane:not([hidden]) { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
#s-chat .gdmsgs { flex: 1; height: auto; min-height: 0; margin: 0; border-radius: 14px; }
#s-chat #ch-thread:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
#s-chat #ch-flist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }
#s-chat .gdsend { flex: none; margin: 0; padding: 8px 0 10px; }
#s-chat .gdsend input { min-width: 0; flex: 1; }
#s-chat .chthead { flex: none; }
#s-chat .chforget { flex: none; }
#s-chat #ch-guild:not([hidden]) { overflow-y: auto; }

.gdmsgs, #s-chat #ch-flist { scrollbar-width: thin; scrollbar-color: rgba(179,107,255,.45) transparent; }
.gdmsgs::-webkit-scrollbar, #s-chat #ch-flist::-webkit-scrollbar { width: 6px; }
.gdmsgs::-webkit-scrollbar-thumb, #s-chat #ch-flist::-webkit-scrollbar-thumb { background: rgba(179,107,255,.45); border-radius: 3px; }
.gdmsgs::-webkit-scrollbar-track, #s-chat #ch-flist::-webkit-scrollbar-track { background: transparent; }

.chnew { position: absolute; z-index: 3; left: 50%; bottom: 4.4em; transform: translateX(-50%); font: inherit; font-size: .85em; font-weight: 800; cursor: pointer;
  color: #140f26; background: linear-gradient(180deg, #d9b8ff, var(--violet)); border: 0; border-radius: 999px; padding: .45em 1.1em;
  box-shadow: 0 4px 14px rgba(0,0,0,.5), 0 0 12px rgba(179,107,255,.6); animation: btpop .3s ease; }
.chnew[hidden] { display: none; }

@media (min-width: 820px) {
  body.chat-on.world.panel-open #app { left: auto; right: 12px; top: 12px; bottom: calc(var(--tabs-h) + 26px); width: min(30em, 42vw);
    border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
  body.chat-on.world.panel-open #s-map::after { background: rgba(4,3,10,.18); }
  body.chat-on #s-chat.on { padding: 12px 14px 0; }
  body.chat-on .panelx { top: 22px !important; right: 24px !important; }
}
#s-chat #ch-err.chnote { text-align: center; }

body.chat-side.world #app { display: block; position: fixed; z-index: 15; left: auto; right: 12px; max-width: none; margin: 0; padding: 0; overflow: hidden;
  top: calc(env(safe-area-inset-top) + 10px + 6.4em + 14px); bottom: calc(var(--tabs-h) + 26px); width: min(26em, 36vw);
  border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.55); background: linear-gradient(180deg, #141029, #0b0918);
  animation: none; transform: none; }
body.chat-side #s-chat { display: flex !important; flex-direction: column; height: 100%; margin: 0; max-width: none; padding: 12px 14px 0; }
body.chat-side .panelx { display: grid; place-items: center; position: fixed; z-index: 16; top: calc(env(safe-area-inset-top) + 10px + 6.4em + 24px) !important; right: 24px !important;
  width: 2.1em; height: 2.1em; border-radius: 50%; border: 1px solid var(--line2); background: rgba(18,15,36,.92); color: var(--ink); font: inherit; font-size: 1.15em; line-height: 1; cursor: pointer; }

body.chat-side.world #s-map .maphead { max-width: calc(100% - min(26em, 36vw) - 40px); }
body.chat-side #s-chat .gdmsgs { background: #08060f; }

.ic-help { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M4 1h4v1h1v1h1v3H9v1H7v2H5V6h1V5h2V3H5v1H3V2h1z M5 10h2v2H5z'/%3E%3C/svg%3E"); }
.helplist { display: flex; flex-direction: column; gap: .5em; margin-top: .6em; }
.helpitem { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); }
.helpitem[open] { border-color: rgba(179,107,255,.55); background: linear-gradient(180deg, rgba(179,107,255,.08), rgba(255,255,255,.03)); }
.helpitem summary { list-style: none; cursor: pointer; padding: .8em 1em; font-weight: 800; display: flex; align-items: center; gap: .6em; }
.helpitem summary::-webkit-details-marker { display: none; }
.helpitem summary::after { content: ""; margin-left: auto; width: .5em; height: .5em; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim);
  transform: rotate(45deg); transition: transform .2s ease; flex: none; }
.helpitem[open] summary::after { transform: rotate(225deg); }
.helpbody { padding: 0 1em .9em; line-height: 1.55; }
.helpbody p { margin: .2em 0 .7em; }
.helpbody ul { margin: .2em 0 .6em; padding-left: 1.2em; }
.helpbody li { margin: .3em 0; }
.helpbody code { font-family: var(--mono); color: var(--teal); background: rgba(95,243,224,.08); padding: .05em .35em; border-radius: 4px; }
.helpbody a { color: var(--teal); }

.ic-shop { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 3h10v8H1z M4 1h4v2H7V2H5v1H4z M3 5v1h6V5z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ic-pass { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 2h10v3h-1v2h1v3H1V7h1V5H1z M4 4v1h4V4z M4 7v1h4V7z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ic-raid { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 1h2v1h1v1h2V2h1V1h2v4H9v2H8v1H7v3H5V8H4V7H3V5H2z M4 4v1h1V4z M7 4v1h1V4z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.ic-phone { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h6v1h1v10H9v1H3v-1H2V1h1z M4 2v7h4V2z M5 10h2v1H5z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.mmnav button.wide { grid-column: 1 / -1; }
html.native .mmnav .webonly { display: none; }
.mmnav .webonly { color: var(--gold); border-color: rgba(255,210,122,.4); background: rgba(255,210,122,.06); }
.mmnav .webonly .ic { color: var(--gold); }
.webembers { border-color: rgba(255,210,122,.45); margin-top: .8em; }
.webembers .btn { width: auto; margin-top: .4em; }
.webembers[hidden] { display: none; }

.sheetwrap { z-index: 62; }
.sheetbox { width: min(40em, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; padding: 0; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); border-color: rgba(179,107,255,.45); }
.sheethead { flex: none; display: flex; align-items: center; gap: .8em; padding: .9em 1em .8em 1.2em; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(179,107,255,.12), transparent); }
.sheethead b { flex: 1; font-size: 1.15em; }
.sheetx { flex: none; width: 2.1em; height: 2.1em; border-radius: 50%; border: 1px solid var(--line2); background: rgba(18,15,36,.92); color: var(--ink);
  font: inherit; font-size: 1.1em; line-height: 1; cursor: pointer; }
.sheetx:hover { border-color: var(--violet); }
.sheetbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .6em 1.2em 1.4em; line-height: 1.6; scrollbar-width: thin; scrollbar-color: rgba(179,107,255,.45) transparent; }
.legalbody h2 { font-size: 1.05em; margin: 1.3em 0 .4em; color: var(--ink); }
.legalbody h3 { font-size: .95em; margin: 1em 0 .3em; }
.legalbody p, .legalbody li { color: #d7cdf0; }
.legalbody .updated { color: var(--dim); font-size: .85em; }
.legalbody .lead { color: var(--ink); }
.legalbody ul { padding-left: 1.2em; }
.legalbody a { color: var(--teal); }
.legalbody code { font-family: var(--mono); color: var(--teal); }
.legalbody .tablewrap { overflow-x: auto; }
.legalbody table { border-collapse: collapse; width: 100%; font-size: .9em; }
.legalbody th, .legalbody td { text-align: left; padding: .45em .6em; border-bottom: 1px solid var(--line); vertical-align: top; }
.legalbody .reveal { font: inherit; color: var(--teal); background: none; border: 1px dashed rgba(95,243,224,.5); border-radius: 6px; padding: .1em .5em; cursor: pointer; }
.legalbody .card { border: 1px solid var(--line2); border-radius: 12px; padding: .8em 1em; margin: .8em 0; background: rgba(255,255,255,.03); }
.apponly ul { padding-left: 1.2em; } .apponly li { margin: .4em 0; }
.legalbody .lead { text-align: left; }

body.guest.world #s-map .maphead { top: calc(env(safe-area-inset-top) + 10px + 3.2em); }
#bar .guestbtn { position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 12px; z-index: 21; }

.cbseal { position: relative; display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: -.12em;
  background: radial-gradient(circle at 38% 34%, #e0504a, #8e1d1d 62%, #5c1010); box-shadow: 0 0 0 .1em #ffd27a, 0 0 .35em rgba(255,210,122,.45); }
.cbseal::after { content: ''; position: absolute; inset: 24%; border-radius: 50%; border: .07em solid rgba(255,210,122,.8);
  background: radial-gradient(circle, rgba(255,210,122,.85) 0 22%, transparent 26%); }
.cbseal.big { width: 1.6em; height: 1.6em; }
.sealrow { display: flex; align-items: center; gap: .5em; }
.sealtxt { font-weight: 800; color: #ffd27a; letter-spacing: .04em; }
.lkcheck { display: flex; align-items: center; gap: .55em; margin: 0 0 .7em; font-weight: 700; cursor: pointer; }
.lkcheck input { width: 1.2em; height: 1.2em; flex: none; accent-color: #5fb8f3; }

.brq { margin: .2em 0 .6em; font-style: italic; color: var(--ink); border-left: 3px solid var(--violet); padding-left: .7em; }

.wmkey i.tri { width: 0; height: 0; border-radius: 0; border-left: .4em solid transparent; border-right: .4em solid transparent; border-bottom: .7em solid #ff6a1f; }

.hallpick { display: flex; flex-wrap: wrap; gap: .5em; margin: .2em 0 .6em; }
.hallpick select { flex: 1 1 12em; min-width: 0; font: inherit; font-weight: 700; color: var(--ink); background: #120f24; border: 1px solid var(--line2, #3a3360); border-radius: 10px; padding: .5em .6em; }
.hallgrid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(7.2em, 1fr)); gap: .5em; margin: .3em 0 .8em; }
.hallcase { display: flex; flex-direction: column; align-items: center; gap: .2em; padding: .6em .4em; min-height: 7.4em; text-align: center; border-radius: 12px;
  background: linear-gradient(180deg, rgba(160,200,255,.10), rgba(20,16,40,.6) 60%); border: 1px solid rgba(160,200,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.hallcase canvas { width: 3em; height: 3em; image-rendering: pixelated; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.hallcase b { font-size: .82em; line-height: 1.2; overflow-wrap: anywhere; }
.hallcase span { font-size: .72em; color: var(--dim); overflow-wrap: anywhere; }
.hallcase:not(.full) { border-style: dashed; background: rgba(20,16,40,.35); justify-content: center; }
.hallcase.champ { border-color: #ffd27a; box-shadow: 0 0 0 1px rgba(255,210,122,.35) inset; }
.hallcase:not(.full) b { color: var(--dim); font-weight: 600; }
.hallcase.mine { border-color: var(--gold, #ffd27a); box-shadow: 0 0 0 1px rgba(255,210,122,.4), 0 0 14px rgba(255,210,122,.15); }

.drillpill { position: absolute; z-index: 2; left: 10px; top: 10px; display: flex; align-items: baseline; gap: .45em; max-width: calc(100% - 10em);
             padding: .3em .75em; border-radius: 999px; font-size: .82em; pointer-events: none; flex-wrap: wrap;
             background: rgba(14,11,28,.82); border: 1px solid rgba(255,210,122,.55); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.drillpill[hidden] { display: none; }
.drillpill b { font-family: var(--mono); color: #ffd27a; }
.drillpill span { color: var(--ink); }
body.world .drillpill { top: calc(env(safe-area-inset-top) + 10px); }
body.mini-left .drillpill { left: auto; right: 10px; }

.ic-heart { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 2h3v1h2V2h3v1h1v3h-1v1H9v1H8v1H7v1H5V9H4V8H3V7H2V6H1V3h1z'/%3E%3C/svg%3E"); }
.chthome { display: flex; gap: .4em; margin-left: auto; flex-wrap: wrap; }
.gdmsg .homecall { margin-top: .4em; width: auto; }

.lghead { display: flex; flex-direction: column; align-items: flex-start; gap: .25em; width: 100%; background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.lgchips { display: flex; flex-wrap: wrap; gap: .35em; margin-top: .2em; }
.lgchip { font-style: normal; font-size: .78em; padding: .15em .6em; border-radius: 999px; border: 1px solid var(--line2); color: var(--dim); white-space: nowrap; }
.lgchip.ready { color: #2a1a00; background: #ffd27a; border-color: #ffd27a; font-weight: 700; }
.lgchip.got { color: #4ade80; border-color: rgba(74,222,128,.5); }
.lgtier { margin-top: .8em; }
.lgtier .btn { width: auto; margin-top: .4em; }
.lgtasks { list-style: none; margin: .35em 0; padding: 0; display: flex; flex-direction: column; gap: .3em; }
.lgtasks li { display: flex; gap: .6em; justify-content: space-between; align-items: baseline; font-size: .92em; }
.lgtasks li span { min-width: 0; }
.lgtasks li em { font-style: normal; font-family: var(--mono); color: var(--dim); white-space: nowrap; }
.lgtasks li.done span { color: var(--dim); text-decoration: line-through; }
.lgtasks li.done em { color: #4ade80; }
