:root {
  --bg: #000;
  --panel: rgba(8, 8, 8, .62);
  --panel-2: rgba(255, 255, 255, .045);
  --line: rgba(245, 197, 66, .2);
  --line-soft: rgba(255, 255, 255, .09);
  --gold: #f5c542;
  --gold-2: #ffdf80;
  --gold-d: #b8860b;
  --text: #f4f1ea;
  --mute: #a39e90;
  --bad: #ff5d5d;
  --ok: #7be495;
  --glow: 0 0 14px rgba(245, 197, 66, .45), 0 0 34px rgba(245, 197, 66, .18);
  font-family: Bahnschrift, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(245, 197, 66, .28); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(245, 197, 66, .5); }

/* ---- background layers */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; filter: blur(7px) saturate(1.15); transform: scale(1.04); z-index: 0; }
#bgimg { position: fixed; inset: -4%; z-index: 0; background: center/cover no-repeat; filter: blur(14px) brightness(.55) saturate(1.2); display: none; animation: drift 38s ease-in-out infinite alternate; }
body[data-bg="image"] #bgimg { display: block; }
body[data-bg="image"] #bg, body[data-bg="off"] #bg, body[data-bg="video"] #bg { display: none; }
@keyframes drift { to { transform: scale(1.1) translate(-2%, 1.5%); } }
#veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 30% 20%, rgba(0, 0, 0, 0), rgba(0, 0, 0, .55) 75%), linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .4)); }
html[data-motion="off"] #bgimg { animation: none; }

/* ---- layout */
#app { position: relative; z-index: 2; height: 100%; display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#side { min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .55)); backdrop-filter: blur(16px); overflow-y: auto; }
#main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
#top { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-bottom: 1px solid var(--line-soft); background: rgba(0, 0, 0, .35); backdrop-filter: blur(10px); }
#view { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 26px 28px 110px; }
.page { max-width: 980px; margin: 0 auto; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---- brand */
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 16px; }
.brand img { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 0 8px rgba(160, 80, 255, .45)); }
.brand b { display: block; font-size: 19px; letter-spacing: .14em; color: #fff; text-shadow: var(--glow); line-height: 1.05; }
.brand small { color: var(--gold); letter-spacing: .22em; font-size: 10.5px; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--mute); cursor: pointer; text-align: left; letter-spacing: .03em; transition: .15s; }
.nav i { width: 20px; text-align: center; font-style: normal; font-size: 16px; }
.nav:hover { color: #fff; background: var(--panel-2); }
.nav.on { color: #fff; background: linear-gradient(90deg, rgba(245, 197, 66, .18), rgba(245, 197, 66, .03)); border-color: var(--line); box-shadow: inset 3px 0 0 var(--gold); }
.nav.on i { color: var(--gold); text-shadow: var(--glow); }
.nav .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: var(--glow); }
.side-foot { margin-top: auto; padding: 14px 8px 0; color: var(--mute); font-size: 11.5px; line-height: 1.5; }
.side-foot a { color: var(--gold); text-decoration: none; }

/* ---- top bar */
.search { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; max-width: 460px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255, 255, 255, .04); color: var(--mute); cursor: pointer; }
.search:hover { border-color: var(--line); }
.kbd { margin-left: auto; font-size: 11px; padding: 2px 7px; border: 1px solid var(--line-soft); border-radius: 6px; color: var(--mute); }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-soft); font-size: 12px; color: var(--mute); background: rgba(0, 0, 0, .35); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.pill.ok i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill.warn i { background: var(--gold); box-shadow: var(--glow); }
.pill.bad i { background: var(--bad); }

/* ---- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .05); cursor: pointer; letter-spacing: .03em; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--gold); color: #fff; background: rgba(245, 197, 66, .1); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #120d00; border-color: var(--gold); font-weight: 700; box-shadow: var(--glow); }
.btn.gold:hover { filter: brightness(1.1); color: #000; }
.btn.danger:hover { border-color: var(--bad); background: rgba(255, 93, 93, .12); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.big { padding: 16px 24px; font-size: 17px; border-radius: 14px; }

/* ---- cards & text */
h1 { font-size: 26px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 4px; text-shadow: var(--glow); }
h2 { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 26px 0 10px; }
.lead { color: var(--mute); margin: 0 0 20px; line-height: 1.55; }
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); backdrop-filter: blur(14px); padding: 6px 18px; }
.card.pad { padding: 18px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { text-align: left; border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; background: var(--panel); backdrop-filter: blur(14px); cursor: pointer; transition: .18s; display: flex; flex-direction: column; gap: 6px; }
.tile:hover { border-color: var(--gold); box-shadow: var(--glow); transform: translateY(-2px); }
.tile.accent { border-color: var(--gold); background: linear-gradient(160deg, rgba(245, 197, 66, .16), rgba(0, 0, 0, .6)); }
.tile b { font-size: 16px; letter-spacing: .05em; }
.tile span { color: var(--mute); font-size: 13px; line-height: 1.45; }
.hero { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(120deg, rgba(0, 0, 0, .72), rgba(30, 22, 0, .45)); backdrop-filter: blur(16px); box-shadow: var(--glow); }
.hero img { width: 170px; height: 170px; filter: drop-shadow(0 0 20px rgba(160, 80, 255, .5)); }
.hero h1 { font-size: 34px; letter-spacing: .16em; }
.hero p { color: var(--mute); margin: 6px 0 16px; line-height: 1.5; }
.row-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-soft); color: var(--mute); }
.tag.heavy { color: #ff9d7a; border-color: rgba(255, 157, 122, .4); }
.tag.medium { color: var(--gold); border-color: var(--line); }
.tag.light { color: #9ad3ff; border-color: rgba(154, 211, 255, .3); }
.note { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(245, 197, 66, .07); color: var(--gold-2); font-size: 13px; line-height: 1.5; }
.note.bad { border-color: rgba(255, 93, 93, .4); background: rgba(255, 93, 93, .08); color: #ffb4b4; }

/* ---- setting rows */
.set { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); position: relative; }
.set:last-child { border-bottom: 0; }
.set.off { opacity: .45; }
.set.hit { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { background: rgba(245, 197, 66, .22); box-shadow: 0 0 0 6px rgba(245, 197, 66, .22); } }
.set h4 { margin: 0; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.set p { margin: 3px 0 0; color: var(--mute); font-size: 12.5px; line-height: 1.45; max-width: 560px; }
.set .key { font-family: Consolas, monospace; font-size: 11px; color: #6f6a5c; }
.chg { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: var(--glow); }
.ctl { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.undo { background: none; border: 0; color: var(--gold); cursor: pointer; font-size: 15px; padding: 2px 6px; }

.switch { position: relative; width: 48px; height: 26px; border-radius: 99px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .08); cursor: pointer; padding: 0; transition: .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #bbb; transition: .2s; }
.switch.on { background: rgba(245, 197, 66, .3); border-color: var(--gold); box-shadow: var(--glow); }
.switch.on::after { left: 25px; background: var(--gold-2); }
.seg { display: inline-flex; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { background: none; border: 0; padding: 7px 13px; cursor: pointer; color: var(--mute); border-right: 1px solid var(--line-soft); font-size: 13px; }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: #fff; background: var(--panel-2); }
.seg button.on { background: rgba(245, 197, 66, .22); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.seg button.cur { text-decoration: underline dotted var(--mute); text-underline-offset: 4px; }
input[type=range] { accent-color: var(--gold); width: 220px; }
.num { min-width: 52px; text-align: right; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.inp, select.inp, textarea.inp { background: rgba(0, 0, 0, .5); border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px 11px; outline: none; }
.inp:focus { border-color: var(--gold); box-shadow: var(--glow); }
input.inp[type=number] { width: 110px; }
textarea.inp { width: 100%; min-height: 96px; font-family: Consolas, monospace; font-size: 12px; resize: vertical; word-break: break-all; }
input[type=color] { width: 44px; height: 34px; padding: 0; border: 1px solid var(--line-soft); border-radius: 8px; background: none; cursor: pointer; }
.reticle { display: flex; gap: 12px; align-items: center; }
.reticle .prev { width: 54px; height: 54px; border-radius: 10px; background: rgba(0, 0, 0, .6); border: 1px solid var(--line-soft); display: grid; place-items: center; }
.reticle .prev i { width: 22px; height: 22px; border: 2px solid; border-radius: 50%; position: relative; }
.reticle .prev i::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: currentColor; }

/* ---- binds */
.bind { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.bind:last-child { border-bottom: 0; }
.keycap { font-family: Consolas, monospace; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(245, 197, 66, .08); color: var(--gold-2); text-align: center; }
.cmd { font-family: Consolas, monospace; color: #dcd7c8; }

/* ---- pending bar / modal / toast / palette */
#pending { position: fixed; z-index: 20; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(140%); transition: .3s; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 20px; border-radius: 16px; border: 1px solid var(--gold); background: rgba(10, 8, 0, .9); backdrop-filter: blur(16px); box-shadow: var(--glow); }
#pending.show { transform: translateX(-50%) translateY(0); }
#pending b { color: var(--gold-2); }
#modal { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); }
#modal[hidden] { display: none; }
.dlg { width: min(760px, 94vw); max-height: 86vh; overflow: auto; border: 1px solid var(--gold); border-radius: 18px; background: rgba(9, 8, 4, .96); padding: 22px; box-shadow: var(--glow); animation: rise .25s ease; }
.dlg h3 { margin: 0 0 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.dlg .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.diff { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px 14px; align-items: center; font-size: 13.5px; }
.diff .h { color: var(--mute); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; }
.diff code { font-family: Consolas, monospace; }
.diff .old { color: #ff9d9d; text-decoration: line-through; opacity: .8; }
.diff .new { color: var(--ok); }
.pal { align-self: start; margin-top: 12vh; width: min(620px, 94vw); }
.pal input { width: 100%; font-size: 17px; padding: 14px 16px; }
.pal ul { list-style: none; margin: 10px 0 0; padding: 0; max-height: 52vh; overflow: auto; }
.pal li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.pal li.sel, .pal li:hover { background: rgba(245, 197, 66, .15); }
.pal li small { margin-left: auto; color: var(--mute); }
#toasts { position: fixed; z-index: 50; right: 20px; top: 20px; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--gold); background: rgba(10, 8, 0, .92); box-shadow: var(--glow); animation: rise .25s ease; max-width: 420px; }
.toast.bad { border-color: var(--bad); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--gold-2); cursor: pointer; text-decoration: underline; }
.mono { font-family: Consolas, monospace; font-size: 12px; word-break: break-all; color: var(--gold-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lbl { color: var(--mute); font-size: 12px; letter-spacing: .06em; margin: 10px 0 6px; display: block; }
.plist > div { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.plist > div:last-child { border-bottom: 0; }
.plist b { flex: 1; }

@media (max-width: 860px) {
  #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  #side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .brand, .side-foot { display: none; }
  .nav span { display: none; }
  .hero { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .set { grid-template-columns: 1fr; }
  .ctl { justify-content: flex-start; }
  #view { padding: 18px 14px 110px; }
}

/* ---- previews */
.eye { background: none; border: 1px solid var(--line); color: var(--gold); border-radius: 8px; padding: 3px 9px; cursor: pointer; font-size: 12px; letter-spacing: .05em; }
.eye:hover { background: rgba(245, 197, 66, .15); box-shadow: var(--glow); }
.cmp { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; cursor: ew-resize; user-select: none; touch-action: none; }
.cmp canvas, .cmp img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.cmp .top { clip-path: inset(0 0 0 50%); }
.cmp .bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1px; background: var(--gold); box-shadow: var(--glow); pointer-events: none; }
.cmp .bar::after { content: '⇆'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #0a0800; border: 2px solid var(--gold); color: var(--gold-2); display: grid; place-items: center; font-size: 16px; }
.cmp .lab { position: absolute; top: 10px; padding: 3px 10px; border-radius: 6px; background: rgba(0, 0, 0, .65); border: 1px solid var(--line); font-size: 12px; letter-spacing: .08em; pointer-events: none; }
.cmp .lab.l { left: 10px; } .cmp .lab.r { right: 10px; }
.fx { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: rgba(245, 197, 66, .06); border-radius: 0 10px 10px 0; color: #e8e2d0; font-size: 13.5px; line-height: 1.5; }
.sel2 { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.sel2 label { color: var(--mute); font-size: 12px; letter-spacing: .08em; }

/* ---- overlay tab */
.anc { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; }
.anc button { width: 34px; height: 26px; border-radius: 6px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .05); cursor: pointer; }
.anc button.on { background: rgba(245, 197, 66, .35); border-color: var(--gold); box-shadow: var(--glow); }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-soft); cursor: pointer; padding: 0; }
.swatch.on { border-color: #fff; box-shadow: 0 0 10px currentColor; }
.ovprev { display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 14px; background: repeating-conic-gradient(rgba(255,255,255,.04) 0 25%, rgba(0,0,0,.35) 0 50%) 0 0 / 22px 22px; padding: 10px; }
.ovprev iframe { border: 0; width: 380px; height: 380px; max-width: 100%; background: transparent; color-scheme: normal; }

/* ---- movement lab */
.navsec { margin: 14px 8px 4px; font-size: 10.5px; letter-spacing: .22em; color: var(--gold); opacity: .8; }
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.filters .inp[data-hin=q] { width: 100%; }
.chips2 { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.df { font: inherit; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.04); color: var(--mute); cursor: pointer; }
.df.on, span.df { color: #000; }
.df-basic { --c: #9ad3ff; } .df-easy { --c: #7be495; } .df-medium { --c: #f5c542; } .df-hard { --c: #ff9d5c; } .df-master { --c: #ff4d6d; } .df-concept { --c: #b8a3ff; } .df-mystery { --c: #888; } .df-removed { --c: #666; }
.df[class*="df-"] { border-color: color-mix(in srgb, var(--c) 50%, transparent); color: var(--c); }
.df.on, span.df.on { background: var(--c); color: #000; box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
span.df { cursor: default; }
.grp { margin: 22px 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
.tlist { display: grid; gap: 8px; }
.tcard { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel); backdrop-filter: blur(10px); }
.tcard:hover { border-color: var(--gold); }
.tmain { flex: 1; display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: left; cursor: pointer; padding: 6px 4px; }
.tmain b { font-weight: 600; } .tmain .has { color: var(--gold); font-style: normal; font-size: 12px; }
.pd { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--mute); background: none; cursor: pointer; padding: 0; }
.pd.p1 { border-color: var(--gold); background: linear-gradient(90deg, var(--gold) 50%, transparent 50%); } .pd.p2 { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.st { font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-soft); color: var(--mute); white-space: nowrap; }
.st-ok { color: var(--ok); border-color: rgba(123,228,149,.35); } .st-patched { color: #ff9d5c; border-color: rgba(255,157,92,.4); } .st-broken { color: var(--bad); border-color: rgba(255,93,93,.4); }
.st.unv { opacity: .7; }
.hint { color: var(--mute); font-size: 12px; margin: 8px 0 0; line-height: 1.5; }
.keystrip { display: flex; gap: 14px; flex-wrap: wrap; }
.ks { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .ks span { font-size: 11px; color: var(--mute); letter-spacing: .08em; text-transform: uppercase; }
kbd { font-family: Consolas, monospace; font-size: 13px; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.06); color: var(--mute); margin-right: 4px; }
kbd.mine { color: var(--gold-2); border-color: var(--gold); background: rgba(245,197,66,.12); }
.vid { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); } .vid:last-child { border: 0; } .vid a, .news a { color: var(--gold-2); text-decoration: none; } .vid a:hover { text-decoration: underline; }
a.btn { text-decoration: none; color: inherit; }
.xpt { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; } .xpt b { font-size: 22px; letter-spacing: .08em; color: var(--gold-2); text-shadow: var(--glow); }
.bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold-2)); box-shadow: var(--glow); transition: width .4s; }
.badge { padding: 4px 12px; border-radius: 99px; border: 1px dashed var(--line-soft); color: var(--mute); font-size: 12.5px; } .badge.got { border: 1px solid var(--gold); color: var(--gold-2); background: rgba(245,197,66,.1); box-shadow: var(--glow); }
.tchip { display: inline-flex; align-items: center; gap: 6px; }
.grid.lg { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.lcard { border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px; background: var(--panel); backdrop-filter: blur(12px); display: flex; flex-direction: column; gap: 8px; } .lcard.top { border-color: var(--gold); box-shadow: var(--glow); }
.lcard .lh { display: flex; justify-content: space-between; align-items: center; } .lcard p { margin: 0; color: var(--mute); font-size: 13px; line-height: 1.5; flex: 1; }
.mob { display: inline-flex; gap: 3px; } .mob i { width: 9px; height: 14px; border-radius: 3px; background: rgba(255,255,255,.12); transform: skewX(-12deg); } .mob i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.news h3 { margin: 6px 0 4px; } .news p { color: var(--mute); margin: 0 0 6px; line-height: 1.5; } .news { margin-bottom: 12px; }
/* trainers */
.mbar { position: relative; height: 46px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line-soft); overflow: visible; }
.mbar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 12px 0 0 12px; background: linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,.28)); }
.mbar .mz { position: absolute; top: 0; bottom: 0; border-radius: 0 12px 12px 0; background: rgba(245,197,66,.22); border-left: 2px solid var(--gold); box-shadow: inset 0 0 18px rgba(245,197,66,.35); }
.mk { position: absolute; top: -12px; transform: translateX(-50%); font-size: 11px; font-weight: 700; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #000; } .mj { background: #7cff3a; } .mc { background: #35d9ff; }
.sgres { display: flex; gap: 18px; align-items: center; } .sgres .big { font-size: 46px; font-weight: 800; letter-spacing: .04em; min-width: 120px; text-align: center; } .sgres p { margin: 6px 0 0; color: var(--mute); }
.big.g, .spark i.g { color: var(--ok); background-color: var(--ok); } .big.y { color: var(--gold); } .big.o { color: #ff9d5c; } .big.r { color: var(--bad); }
.big.g, .big.y, .big.o, .big.r { background: none !important; text-shadow: 0 0 18px currentColor; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; } .stats div { display: flex; flex-direction: column; } .stats b { font-size: 24px; color: var(--gold-2); } .stats span { color: var(--mute); font-size: 12px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 70px; } .spark i { flex: 1 1 0; max-width: 22px; min-width: 4px; border-radius: 3px 3px 0 0; background: var(--mute); }
.spark i.y { background: var(--gold); } .spark i.o { background: #ff9d5c; } .spark i.r { background: var(--bad); } .spark i.g { background: var(--ok); } .spark.hist { height: 90px; }
.beat { width: 90px; height: 90px; margin: 4px auto; border-radius: 50%; border: 3px solid var(--gold); box-shadow: var(--glow); }
.beat.run { animation: pulse var(--beat, 500ms) ease-in-out infinite; } @keyframes pulse { 0%, 100% { transform: scale(.82); opacity: .6; } 50% { transform: scale(1.05); opacity: 1; } }
.beat.flash { animation: flash2 .18s ease-out; } @keyframes flash2 { from { transform: scale(1.18); background: var(--gold); } to { transform: scale(1); background: transparent; } }
.whpad { min-height: 220px; display: flex; flex-direction: column; justify-content: center; }

/* =====================================================================================================
 * Refinement layer (v1.2): calmer, more legible, professional. Overrides the rules above.
 * Principles: neutral surfaces, gold only for the one primary action and the active state, no glow,
 * clear type hierarchy, smooth but short motion (150–420 ms), everything honours the Animations setting.
 * ===================================================================================================== */
:root {
  --panel: rgba(15, 15, 17, .74);
  --panel-2: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .11);
  --line-soft: rgba(255, 255, 255, .07);
  --line-gold: rgba(245, 197, 66, .38);
  --mute: #9d9a91;
  --text: #f2f0ea;
  --glow: 0 0 0 3px rgba(245, 197, 66, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  font-size: 15px;
}
body { font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, .brand b, .xpt b, .big.g, .big.y, .big.o, .big.r, .hero h1 { text-shadow: none !important; }

/* ---- surfaces */
#veil { background: radial-gradient(ellipse at 30% 10%, rgba(0, 0, 0, .1), rgba(0, 0, 0, .62) 80%), linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .5)); }
#side { padding: 20px 12px 14px; gap: 2px; border-right: 1px solid var(--line-soft); background: rgba(7, 7, 9, .84); }
#top { padding: 12px 28px; border-bottom: 1px solid var(--line-soft); background: rgba(7, 7, 9, .5); }
#view { padding: 32px 36px 120px; scroll-behavior: smooth; }
.page { max-width: 1000px; animation: none; }
.card { border: 1px solid var(--line-soft); border-radius: 14px; background: var(--panel); padding: 4px 20px; }
.card.pad { padding: 20px; }

/* ---- type */
h1 { font-size: 25px; letter-spacing: .05em; font-weight: 700; margin: 0 0 6px; }
h2 { font-size: 11.5px; letter-spacing: .18em; font-weight: 600; color: var(--mute); margin: 34px 0 12px; }
h3 { font-weight: 650; letter-spacing: .01em; }
.lead { font-size: 14.5px; color: var(--mute); margin: 0 0 22px; max-width: 70ch; }
.hint { color: var(--mute); }
.tag { letter-spacing: .06em; border-radius: 5px; }

/* ---- brand + nav */
.brand { padding: 2px 8px 18px; gap: 12px; }
.brand img { width: 40px; height: 40px; filter: none; }
.brand b { font-size: 14.5px; letter-spacing: .14em; font-weight: 700; }
.brand small { font-size: 10px; letter-spacing: .24em; color: var(--mute); }
.navsec { margin: 20px 10px 6px; font-size: 10px; letter-spacing: .2em; color: var(--mute); opacity: .75; font-weight: 600; }
.nav { position: relative; padding: 9px 12px; gap: 12px; font-size: 14px; letter-spacing: 0; border-radius: 8px; color: #b3afa4; }
.nav i { width: 18px; font-size: 14px; opacity: .8; }
.nav:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav.on { color: #fff; background: rgba(255, 255, 255, .08); border-color: transparent; box-shadow: none; }
.nav.on::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--gold); }
.nav.on i { color: var(--gold); text-shadow: none; opacity: 1; }
.nav .dot { box-shadow: none; width: 7px; height: 7px; }
.side-foot { font-size: 11.5px; color: #78756d; }

/* ---- top bar */
.search { border-radius: 9px; background: rgba(255, 255, 255, .05); padding: 8px 13px; font-size: 13.5px; }
.search:hover { border-color: rgba(255, 255, 255, .2); }
.pill { background: transparent; font-size: 12px; }
.pill.ok i, .pill.warn i { box-shadow: none; }

/* ---- buttons */
.btn { padding: 9px 16px; border-radius: 9px; font-weight: 500; letter-spacing: .01em; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-soft); }
.btn:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .22); color: #fff; }
.btn:active { transform: scale(.975); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #181200; font-weight: 650; box-shadow: none; }
.btn.gold:hover { background: var(--gold-2); border-color: var(--gold-2); filter: none; }
.btn.big { padding: 12px 22px; font-size: 15px; border-radius: 11px; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.btn.danger:hover { background: rgba(255, 93, 93, .12); }

/* ---- tiles, hero */
.grid { gap: 12px; }
.tile { padding: 16px 18px; border-radius: 13px; border: 1px solid var(--line-soft); background: var(--panel); gap: 4px; }
.tile:hover { border-color: rgba(255, 255, 255, .22); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); transform: translateY(-2px); background: rgba(24, 24, 27, .8); }
.tile:active { transform: translateY(0) scale(.99); }
.tile.accent { box-shadow: none; border-color: var(--line-gold); background: linear-gradient(160deg, rgba(245, 197, 66, .1), var(--panel)); }
.tile b { font-size: 14.5px; letter-spacing: .01em; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.tile b i { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; font-style: normal; font-size: 14px; color: var(--gold); background: rgba(245, 197, 66, .1); flex: none; }
.tile span { font-size: 12.5px; }
.hero { grid-template-columns: auto 1fr; gap: 28px; padding: 30px 32px; border-radius: 18px; border: 1px solid var(--line-soft); background: linear-gradient(135deg, rgba(20, 20, 24, .86), rgba(12, 12, 14, .78)); }
.hero { box-shadow: none; }
.hero img { width: 92px; height: 92px; filter: drop-shadow(0 6px 22px rgba(150, 80, 255, .35)); }
.hero h1 { font-size: 32px; letter-spacing: .1em; margin: 0; }
.hero p { margin: 10px 0 20px; max-width: 58ch; font-size: 14.5px; }
.hero .by { margin-left: 10px; vertical-align: middle; color: var(--mute); }
.chips { margin-top: 16px; gap: 14px; }
.chips .pill { padding: 0; border: 0; background: none; font-size: 12px; }
.note { border-radius: 10px; background: rgba(245, 197, 66, .06); border-color: rgba(245, 197, 66, .22); color: #e9d9a3; }
.fold { border: 1px solid var(--line-soft); border-radius: 14px; background: var(--panel); padding: 0; }
.fold > summary { cursor: pointer; list-style: none; padding: 14px 20px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; color: #d6d2c6; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: '+'; color: var(--mute); font-size: 18px; transition: transform .25s var(--ease); }
.fold[open] > summary::after { transform: rotate(45deg); }
.fold > div { padding: 0 20px 20px; }

/* ---- settings rows */
.set { padding: 16px 0; }
.set h4 { font-size: 14.5px; font-weight: 600; }
.set p { font-size: 13px; }
.switch { transition: background .22s var(--ease), border-color .22s, box-shadow .22s; }
.switch::after { transition: left .26s var(--spring), background .2s; }
.switch.on { background: rgba(245, 197, 66, .28); box-shadow: none; }
.seg button.on { box-shadow: inset 0 -2px 0 var(--gold); background: rgba(255, 255, 255, .09); }
.inp:focus { border-color: var(--gold); box-shadow: var(--glow); }
.chg { box-shadow: none; }

/* ---- floating UI */
#pending { border-radius: 14px; background: rgba(14, 14, 17, .94); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); transition: transform .4s var(--ease), opacity .3s; opacity: 0; }
#pending.show { opacity: 1; }
#modal { background: rgba(0, 0, 0, .66); backdrop-filter: blur(8px); }
#modal:not([hidden]) { animation: fadeIn .2s ease both; }
.dlg { border: 1px solid var(--line); border-radius: 16px; background: rgba(14, 14, 17, .97); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); animation: dlgIn .3s var(--ease) both; }
.dlg h3 { color: #fff; letter-spacing: .06em; }
.toast { border: 1px solid var(--line); background: rgba(14, 14, 17, .96); box-shadow: 0 14px 40px rgba(0, 0, 0, .55); border-radius: 12px; animation: toastIn .35s var(--ease) both; }
.toast.bad { border-color: rgba(255, 93, 93, .5); }
.pal li.sel, .pal li:hover { background: rgba(255, 255, 255, .08); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }

/* ---- page + content entrance (only when the tab changes: .enter is set by the app) */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
#view.enter .page > * { animation: rise .42s var(--ease) both; }
#view.enter .page > :nth-child(2) { animation-delay: .04s; }
#view.enter .page > :nth-child(3) { animation-delay: .08s; }
#view.enter .page > :nth-child(4) { animation-delay: .12s; }
#view.enter .page > :nth-child(5) { animation-delay: .16s; }
#view.enter .page > :nth-child(6) { animation-delay: .2s; }
#view.enter .page > :nth-child(n+7) { animation-delay: .24s; }
#view.enter .grid > * { animation: rise .45s var(--ease) both; }
#view.enter .grid > :nth-child(1) { animation-delay: .10s; } #view.enter .grid > :nth-child(2) { animation-delay: .14s; }
#view.enter .grid > :nth-child(3) { animation-delay: .18s; } #view.enter .grid > :nth-child(4) { animation-delay: .22s; }
#view.enter .grid > :nth-child(5) { animation-delay: .26s; } #view.enter .grid > :nth-child(6) { animation-delay: .30s; }
#view.enter .grid > :nth-child(n+7) { animation-delay: .34s; }
.bar i { transition: width .7s var(--ease); }
.btn, .tile, .nav, .seg button, .inp, .search, .tcard, .df { transition: background .18s, border-color .18s, color .18s, transform .18s var(--ease), box-shadow .2s; }

/* ---- stretched-resolution preview */
.sprev { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pnl .stage { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.pnl canvas { display: block; width: 100%; height: auto; background: #000; }
.pnl .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--mute); }
.pnl .cap b { color: #fff; font-weight: 600; font-size: 13.5px; }
.pnl .grid-ov { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px) 0 0 / 100% 12.5%, linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px) 0 0 / 12.5% 100%; opacity: 0; transition: opacity .25s; }
.sprev.grid-on .grid-ov { opacity: 1; }
.sprev-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 860px) { .sprev { grid-template-columns: 1fr; } #view { padding: 22px 16px 120px; } }

/* ---- intro splash */
#intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000; transition: opacity .55s ease, visibility .55s; }
#intro.out { opacity: 0; visibility: hidden; pointer-events: none; }
#intro .in { display: flex; flex-direction: column; align-items: center; gap: 20px; }
#intro img { width: 132px; height: 132px; opacity: 0; transform: scale(.84); filter: drop-shadow(0 0 30px rgba(150, 80, 255, .42)); animation: introLogo 1.05s .12s var(--ease) forwards; }
#intro .wm { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: .6em; opacity: 0; padding-left: .6em; animation: introWm 1.1s .5s var(--ease) forwards; }
#intro .by { font-size: 11px; letter-spacing: .34em; color: var(--gold); text-transform: uppercase; opacity: 0; animation: introBy .8s .95s ease forwards; }
#intro .ln { width: 150px; height: 2px; margin-top: 6px; background: linear-gradient(90deg, transparent, var(--gold), transparent); transform: scaleX(0); animation: introLn 1.1s .75s var(--ease) forwards; }
@keyframes introLogo { to { opacity: 1; transform: scale(1); } }
@keyframes introWm { to { opacity: 1; letter-spacing: .22em; padding-left: .22em; } }
@keyframes introBy { to { opacity: .9; } }
@keyframes introLn { to { transform: scaleX(1); } }

html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }

/* ---- pro profile cards + chooser */
.pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.pcard { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--panel); cursor: pointer; }
.pcard:hover { border-color: rgba(255, 255, 255, .24); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); }
.pcard:active { transform: scale(.99); }
.pcard.mine { border-color: var(--line-gold); background: linear-gradient(150deg, rgba(245, 197, 66, .08), var(--panel)); }
.pcard .tag { position: absolute; top: 12px; right: 12px; }
.pc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-main b { font-size: 15.5px; font-weight: 650; }
.pc-sub { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, hsl(var(--h) 45% 34%), hsl(calc(var(--h) + 40) 40% 18%)); border: 2px solid rgba(255, 255, 255, .14); }
.av b { font-size: 20px; letter-spacing: .04em; color: #fff; opacity: .9; }
.av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #101012; }
.av.lg { width: 84px; height: 84px; } .av.lg b { font-size: 26px; }
.pm-head { display: flex; align-items: center; gap: 18px; }
.pm-head h3 { margin: 0; font-size: 24px; letter-spacing: .02em; text-transform: none; color: #fff; }
.opts { display: grid; gap: 8px; }
.opt { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; cursor: pointer; transition: border-color .18s, background .18s; }
.opt:hover { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .04); }
.opt.on { border-color: var(--line-gold); background: rgba(245, 197, 66, .06); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid rgba(255, 255, 255, .3); display: grid; place-items: center; transition: background .18s, border-color .18s; }
.opt.on .box { background: var(--gold); border-color: var(--gold); }
.opt.on .box::after { content: ''; width: 5px; height: 10px; border: solid #181200; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.otxt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.otxt b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; }
.otxt small { color: var(--mute); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.dlg .foot .spacer { flex: 1; }
