/* ST1M PORT4L — theme "Glass editorial".
 * Loaded after app.css: it only re-skins. Principles taken from the reference boards:
 * frosted glass panels floating on a blurred backdrop, ONE accent colour (gold), huge condensed type,
 * tiny spaced capitals, hairlines and numbering instead of boxes, white pill buttons, generous empty space. */
:root {
  --bg: #050507;
  --text: #f3f3f4;
  --mute: #8f8f98;
  --faint: #5d5d66;
  --gold: #f2c24a;
  --gold-2: #ffe08a;
  --gold-d: #b8860b;
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .1);
  --hair: rgba(255, 255, 255, .13);
  --hair-soft: rgba(255, 255, 255, .07);
  --panel: rgba(255, 255, 255, .05);
  --panel-2: rgba(255, 255, 255, .06);
  --line: var(--hair);
  --line-soft: var(--hair-soft);
  --line-gold: rgba(242, 194, 74, .4);
  --glow: 0 0 0 3px rgba(242, 194, 74, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --display: "Bahnschrift SemiCondensed", "Bahnschrift Condensed", Bahnschrift, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
}
body { background: var(--bg); font-size: 14.5px; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .3); }
#veil { background: radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, .05), transparent 55%), radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, .7), transparent 60%), rgba(0, 0, 0, .35); }

/* ---------- frame: slim rail + one floating glass panel */
#app { display: block; padding: 16px; }
#main { margin-left: 92px; height: 100%; border-radius: 30px; background: rgba(9, 9, 11, .58); backdrop-filter: blur(34px) saturate(1.35); border: 1px solid var(--hair); box-shadow: 0 40px 100px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .09); overflow: hidden; }
#top { padding: 20px 36px 6px; gap: 12px; border: 0; background: none; backdrop-filter: none; }
#view { padding: 14px 48px 130px; }
.page { max-width: 1040px; }

#side { position: absolute; z-index: 30; top: 16px; bottom: 16px; left: 16px; width: 76px; padding: 18px 12px; gap: 2px; overflow: hidden; border-radius: 30px; border: 1px solid var(--hair); background: rgba(14, 14, 17, .62); backdrop-filter: blur(34px) saturate(1.4); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .09); transition: width .42s var(--ease), box-shadow .3s, background .3s; }
#side:hover, #side:focus-within { width: 258px; background: rgba(14, 14, 17, .94); }
#side:not(:hover):not(:focus-within) { overflow: hidden; }
#side:hover, #side:focus-within { overflow-y: auto; }

.brand { padding: 2px 6px 16px; gap: 14px; flex: none; }
.brand img { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 4px 14px rgba(150, 80, 255, .4)); }
.brand > div { opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .35s var(--ease); white-space: nowrap; }
#side:hover .brand > div, #side:focus-within .brand > div { opacity: 1; transform: none; transition-delay: .08s; }
.brand b { font-family: var(--display); font-size: 17px; letter-spacing: .12em; font-weight: 700; }
.brand small { font-size: 9.5px; letter-spacing: .3em; color: var(--mute); }

.navsec { position: relative; margin: 16px 6px 6px; height: 12px; line-height: 12px; font-size: 9.5px; letter-spacing: .26em; font-weight: 600; color: transparent; white-space: nowrap; overflow: hidden; transition: color .25s; }
.navsec::after { content: ''; position: absolute; left: 14px; top: 6px; width: 18px; height: 1px; background: var(--hair); transition: opacity .2s; }
#side:hover .navsec, #side:focus-within .navsec { color: #7d7d87; }
#side:hover .navsec::after, #side:focus-within .navsec::after { opacity: 0; }
.nav { position: relative; flex: none; height: 44px; padding: 0 14px; gap: 16px; border-radius: 16px; font-size: 14px; letter-spacing: .01em; color: #a7a7b0; white-space: nowrap; }
.nav i { width: 20px; flex: none; text-align: center; font-size: 16px; opacity: .85; }
.nav span:not(.dot) { opacity: 0; transform: translateX(-6px); transition: opacity .22s, transform .35s var(--ease); }
#side:hover .nav span:not(.dot), #side:focus-within .nav span:not(.dot) { opacity: 1; transform: none; }
.nav:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav.on { color: #fff; background: rgba(255, 255, 255, .11); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.nav.on::before { display: none; }
.nav.on i { color: var(--gold); opacity: 1; }
.nav .dot { position: absolute; right: 12px; top: 18px; width: 6px; height: 6px; margin: 0; background: var(--gold); box-shadow: none; }
.side-foot { padding: 14px 10px 0; font-size: 11px; color: var(--faint); white-space: nowrap; opacity: 0; transition: opacity .25s; }
#side:hover .side-foot, #side:focus-within .side-foot { opacity: 1; }
.side-foot a { color: var(--mute); }

/* ---------- top bar */
.search { max-width: 380px; padding: 10px 18px; border-radius: 999px; background: var(--glass); border: 1px solid var(--hair); font-size: 13.5px; color: var(--mute); backdrop-filter: blur(14px); }
.search:hover { background: var(--glass-2); border-color: rgba(255, 255, 255, .24); }
.kbd { border-radius: 999px; padding: 2px 9px; border-color: var(--hair); }
.pill { padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--hair-soft); font-size: 12px; }
.chips .pill { padding: 0; border: 0; background: none; backdrop-filter: none; }

/* ---------- buttons: glass pills, one white primary */
.btn { padding: 10px 20px; border-radius: 999px; font-weight: 500; letter-spacing: .01em; background: var(--glass); border: 1px solid var(--hair); backdrop-filter: blur(14px); }
.btn:hover { background: var(--glass-2); border-color: rgba(255, 255, 255, .28); }
.btn:active { transform: scale(.97); }
.btn.gold { background: #fff; color: #0a0a0c; border-color: #fff; font-weight: 650; box-shadow: none; }
.btn.gold:hover { background: #e7e7ea; border-color: #e7e7ea; }
.btn.big { padding: 14px 28px; font-size: 15px; }
.btn.sm { padding: 6px 15px; font-size: 12.5px; }
.btn.danger:hover { background: rgba(255, 93, 93, .14); border-color: rgba(255, 93, 93, .5); }

/* ---------- type */
h1 { font-family: var(--display); font-size: 54px; line-height: 1; font-weight: 700; letter-spacing: -.005em; text-transform: uppercase; margin: 4px 0 14px; }
.lead { font-size: 15px; color: var(--mute); max-width: 62ch; margin: 0 0 26px; }
.page { counter-reset: sec; }
h2 { counter-increment: sec; display: flex; align-items: center; gap: 14px; margin: 52px 0 20px; font-size: 10.5px; font-weight: 600; letter-spacing: .26em; color: var(--mute); }
h2::before { content: counter(sec, decimal-leading-zero); color: var(--gold); letter-spacing: .12em; }
h2::after { content: ''; flex: 1; height: 1px; background: var(--hair-soft); }
h3 { font-weight: 600; }
.hint { color: var(--mute); }
.tag { border-radius: 999px; padding: 3px 10px; border-color: var(--hair); letter-spacing: .1em; font-size: 10px; background: rgba(255, 255, 255, .03); }

/* ---------- surfaces */
.card, .fold { border-radius: 24px; border: 1px solid var(--hair-soft); background: var(--glass); backdrop-filter: blur(26px) saturate(1.3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.card { padding: 6px 26px; }
.card.pad { padding: 26px; }
.note { border-radius: 16px; border: 1px solid var(--hair-soft); background: var(--glass); color: #d9d9dd; }
.set { padding: 20px 0; border-bottom: 1px solid var(--hair-soft); }
.set h4 { font-size: 15px; font-weight: 600; }
.set p { font-size: 13px; color: var(--mute); }
.inp, select.inp, textarea.inp { border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--hair-soft); padding: 10px 14px; }
.inp:focus { border-color: var(--gold); box-shadow: var(--glow); }
.switch { width: 52px; height: 30px; background: rgba(255, 255, 255, .12); border: 0; }
.switch::after { top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: left .3s var(--spring); }
.switch.on { background: var(--gold); box-shadow: none; }
.switch.on::after { left: 25px; background: #fff; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--hair-soft); overflow: visible; }
.seg button { border: 0; border-radius: 999px; padding: 8px 17px; color: var(--mute); background: none; transition: background .22s var(--ease), color .22s; }
.seg button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.seg button.on { background: #fff; color: #0a0a0c; box-shadow: none; font-weight: 600; }
input[type=range] { accent-color: var(--gold); }
.bar { height: 6px; }

/* ---------- editorial tiles: numbered columns, no boxes */
.grid { counter-reset: tile; gap: 8px 36px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile { counter-increment: tile; position: relative; padding: 58px 4px 22px; border: 0; border-top: 1px solid var(--hair); border-radius: 0; background: none; backdrop-filter: none; box-shadow: none; gap: 6px; transition: transform .35s var(--ease), border-color .25s; }
.tile::before { content: counter(tile, decimal-leading-zero); position: absolute; top: 16px; left: 4px; font-family: var(--display); font-size: 30px; font-weight: 300; line-height: 1; color: var(--faint); transition: color .25s; }
.tile b { font-size: 17px; font-weight: 650; letter-spacing: .005em; }
.tile b i { display: none; }
.tile span { font-size: 13px; color: var(--mute); }
.tile:hover { transform: translateY(-3px); background: none; box-shadow: none; border-top-color: #fff; }
.tile:hover::before { color: var(--gold); }
.tile.accent { border-top-color: var(--gold); background: none; }
.tile.accent::before { color: var(--gold); }

.hero { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 40px; padding: 10px 0 8px; border: 0; background: none; backdrop-filter: none; box-shadow: none; }
.hero img { width: 150px; height: 150px; filter: drop-shadow(0 10px 40px rgba(150, 80, 255, .45)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 { font-size: 84px; letter-spacing: -.01em; margin: 0; }
.hero .by { font-family: inherit; font-size: 11px; letter-spacing: .3em; color: var(--gold); border-color: var(--line-gold); margin-left: 16px; vertical-align: middle; }
.hero p { max-width: 46ch; margin: 18px 0 28px; font-size: 15.5px; color: var(--mute); }

/* ---------- lists and rows used by other pages */
.tcard, .lcard { border-radius: 20px; border: 1px solid var(--hair-soft); background: var(--glass); backdrop-filter: blur(20px); }
.tcard:hover, .lcard:hover { border-color: rgba(255, 255, 255, .26); }
.keycap { border-radius: 10px; background: rgba(255, 255, 255, .06); border-color: var(--hair); color: #fff; }
.bind { padding: 12px 0; border-color: var(--hair-soft); }
.diff .h { letter-spacing: .2em; }
.fold > summary { padding: 18px 26px; }
.fold > div { padding: 0 26px 26px; }

/* ---------- pro profiles */
.pgrid { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pcard { padding: 18px 20px; gap: 16px; border-radius: 26px; border: 1px solid var(--hair-soft); background: var(--glass); backdrop-filter: blur(24px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transition: transform .35s var(--ease), border-color .25s, background .25s; }
.pcard:hover { border-color: rgba(255, 255, 255, .3); background: var(--glass-2); transform: translateY(-4px); box-shadow: 0 24px 50px rgba(0, 0, 0, .45); }
.pcard.mine { border-color: var(--line-gold); background: linear-gradient(150deg, rgba(242, 194, 74, .09), var(--glass)); }
.pc-main b { font-family: var(--display); font-size: 20px; letter-spacing: .02em; text-transform: uppercase; font-weight: 700; }
.av { width: 68px; height: 68px; border: 2px solid rgba(255, 255, 255, .16); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.av.lg { width: 92px; height: 92px; }
.pm-head h3 { font-family: var(--display); font-size: 34px; letter-spacing: .01em; text-transform: uppercase; }
.opt { border-radius: 18px; padding: 15px 16px; border-color: var(--hair-soft); background: rgba(255, 255, 255, .03); }
.opt.on { border-color: var(--line-gold); background: rgba(242, 194, 74, .07); }
.opt .box { border-radius: 50%; }
.opt.on .box { background: var(--gold); border-color: var(--gold); }

/* ---------- floating UI */
#pending { border-radius: 999px; padding: 10px 12px 10px 24px; background: rgba(18, 18, 22, .86); backdrop-filter: blur(30px); border: 1px solid var(--hair); box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
#modal { background: rgba(0, 0, 0, .55); backdrop-filter: blur(14px) saturate(1.2); }
.dlg { border-radius: 30px; border: 1px solid var(--hair); background: rgba(16, 16, 20, .84); backdrop-filter: blur(40px) saturate(1.3); box-shadow: 0 40px 110px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .09); padding: 30px; }
.dlg h3 { color: #fff; }
.toast { border-radius: 18px; border: 1px solid var(--hair); background: rgba(18, 18, 22, .88); backdrop-filter: blur(24px); box-shadow: 0 20px 60px rgba(0, 0, 0, .55); }
.pal li { border-radius: 14px; }
.pal li.sel, .pal li:hover { background: rgba(255, 255, 255, .09); }

/* ---------- stretched-resolution preview */
.sprev { gap: 22px; }
.pnl .stage { border-radius: 20px; border: 1px solid var(--hair); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.pnl .cap { margin-top: 14px; }
.sprev-bar { margin-bottom: 18px; }

/* ---------- motion: only on tab change (the app sets #view.enter) */
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
#view.enter .page > * { animation: rise .6s var(--ease) both; }
#view.enter .page > :nth-child(2) { animation-delay: .05s; } #view.enter .page > :nth-child(3) { animation-delay: .1s; }
#view.enter .page > :nth-child(4) { animation-delay: .15s; } #view.enter .page > :nth-child(5) { animation-delay: .2s; }
#view.enter .page > :nth-child(6) { animation-delay: .25s; } #view.enter .page > :nth-child(n+7) { animation-delay: .3s; }
#view.enter .grid > *, #view.enter .pgrid > * { animation: rise .6s var(--ease) both; }
#view.enter .grid > :nth-child(1), #view.enter .pgrid > :nth-child(1) { animation-delay: .12s; } #view.enter .grid > :nth-child(2), #view.enter .pgrid > :nth-child(2) { animation-delay: .17s; }
#view.enter .grid > :nth-child(3), #view.enter .pgrid > :nth-child(3) { animation-delay: .22s; } #view.enter .grid > :nth-child(4), #view.enter .pgrid > :nth-child(4) { animation-delay: .27s; }
#view.enter .grid > :nth-child(5), #view.enter .pgrid > :nth-child(5) { animation-delay: .32s; } #view.enter .grid > :nth-child(6), #view.enter .pgrid > :nth-child(6) { animation-delay: .37s; }
#view.enter .grid > :nth-child(n+7), #view.enter .pgrid > :nth-child(n+7) { animation-delay: .4s; }
#modal:not([hidden]) { animation: fadeIn .25s ease both; }
.dlg { animation: dlgIn .45s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px); } }
.fold > summary::after { content: '+'; color: var(--mute); font-size: 20px; transition: transform .3s var(--ease); }
.fold[open] > summary::after { transform: rotate(45deg); }
.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.fold > summary::-webkit-details-marker { display: none; }

/* ---------- launch splash */
#intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000; transition: opacity .6s ease, visibility .6s; }
#intro.out { opacity: 0; visibility: hidden; pointer-events: none; }
#intro .in { display: flex; flex-direction: column; align-items: center; gap: 22px; }
#intro img { width: 128px; height: 128px; opacity: 0; transform: scale(.84); filter: drop-shadow(0 0 34px rgba(150, 80, 255, .45)); animation: introLogo 1.1s .12s var(--ease) forwards; }
#intro .wm { font-family: var(--display); font-size: 34px; font-weight: 700; color: #fff; letter-spacing: .6em; opacity: 0; padding-left: .6em; animation: introWm 1.2s .5s var(--ease) forwards; }
#intro .by { font-size: 10.5px; letter-spacing: .38em; color: var(--gold); text-transform: uppercase; opacity: 0; animation: introBy .8s .95s ease forwards; }
#intro .ln { width: 150px; height: 1px; margin-top: 4px; 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: .26em; padding-left: .26em; } }
@keyframes introBy { to { opacity: .9; } }
@keyframes introLn { to { transform: scaleX(1); } }

@media (max-width: 900px) {
  #app { padding: 8px; }
  #side { position: static; width: auto; height: auto; flex-direction: row; border-radius: 22px; margin-bottom: 8px; }
  #side:hover, #side:focus-within { width: auto; }
  #main { margin-left: 0; height: calc(100% - 76px); }
  .hero { flex-direction: column-reverse; align-items: flex-start; }
  .hero h1 { font-size: 52px; }
  #view { padding: 10px 20px 120px; }
  .sprev { grid-template-columns: 1fr; }
}
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; }

/* =====================================================================================================
 * HOME POSTER — key-art layout (HBO / Arcane / Broly / Arkham boards): the animated Apex landscape as the
 * backdrop, a giant two-line title on the left, a cut-out character slot on the right that overlaps the title,
 * numbered index on the far right, tiny captions and a single call to action.
 * The character slot reads img/home-hero.png (transparent PNG); when the file is absent the slot stays empty.
 * ===================================================================================================== */
#veil::after { content: ''; position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
#main, #bg { transition: background .9s ease, opacity .9s ease, border-color .6s ease, box-shadow .6s ease; }
body[data-tab=home] #main { background: transparent; backdrop-filter: none; border-color: rgba(255, 255, 255, .08); box-shadow: none; }
body[data-bg=landscape] #bg { filter: none; transform: none; }
body[data-tab=home][data-bg=landscape] #veil { background: radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, .55), transparent 60%), rgba(0, 0, 0, .05); }
#view[data-tab=home] { padding: 0; overflow: hidden; }
.page.home { --pad: clamp(48px, 7vw, 130px); position: relative; max-width: none; height: 100%; min-height: 520px; margin: 0; }
.par { transform: translate(calc(var(--mx, 0) * var(--k, 0) * 1px), calc(var(--my, 0) * var(--k, 0) * .7px)); transition: transform .7s cubic-bezier(.2, .7, .2, 1); will-change: transform; }

.h-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(5, 5, 7, .8) 0%, rgba(5, 5, 7, .42) 42%, rgba(5, 5, 7, .05) 100%), radial-gradient(ellipse at 74% 46%, rgba(242, 194, 74, .2), transparent 58%), linear-gradient(0deg, rgba(5, 5, 7, .72), transparent 34%), linear-gradient(180deg, rgba(5, 5, 7, .55), transparent 22%); }

.h-title { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding-left: var(--pad); font-family: var(--display); font-weight: 700; line-height: .92; pointer-events: none; font-size: clamp(72px, min(20vmin, 12.5vw), 300px); letter-spacing: -.005em; padding-bottom: 15vmin; }
.h-title span { display: block; width: max-content; padding: .06em .05em .04em; -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-title .t1 { background-image: linear-gradient(180deg, #fff 28%, #a2a2ac); }
.h-title .t2 { margin-left: .42em; background-image: linear-gradient(180deg, #ffe9a8 10%, #f2c24a 70%, #b8860b); filter: drop-shadow(0 0 40px rgba(242, 194, 74, .25)); }
.h-title small { display: flex; align-items: center; gap: 16px; margin: 22px 0 0 .35rem; font-family: inherit; font-size: 12px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: #cfcfd6; text-shadow: 0 0 14px rgba(0, 0, 0, .8); }
.h-title small::before { content: ''; width: 46px; height: 1px; background: var(--gold); }

.h-heroart { position: absolute; z-index: 3; right: 4%; bottom: 0; width: 50%; height: 98%; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.h-hero { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 0 70px rgba(242, 194, 74, .22)) drop-shadow(0 30px 50px rgba(0, 0, 0, .6)); }

.h-side { position: absolute; z-index: 4; right: 40px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 6px; }
.h-item { display: flex; align-items: center; gap: 14px; padding: 9px 0; background: none; border: 0; color: #c9c9d1; cursor: pointer; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; text-shadow: 0 0 14px rgba(0, 0, 0, .9); transition: color .25s, transform .4s var(--ease); }
.h-item i { font-style: normal; font-family: var(--display); font-size: 13px; letter-spacing: .08em; color: var(--gold); order: 2; }
.h-item span { position: relative; padding-bottom: 3px; }
.h-item span::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.h-item:hover { color: #fff; transform: translateX(-6px); }
.h-item:hover span::after { transform: scaleX(1); transform-origin: left; }

.h-edge { position: absolute; z-index: 4; left: 30px; top: 0; bottom: 0; display: flex; align-items: center; gap: 18px; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; letter-spacing: .44em; color: var(--faint); }
.h-edge::before { content: ''; width: 1px; height: 72px; background: var(--gold); }
.h-cta { position: absolute; z-index: 4; left: var(--pad); bottom: 12%; display: flex; align-items: center; gap: 18px; }
.h-play { width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .5); backdrop-filter: blur(14px); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform .35s var(--spring), background .25s, border-color .25s, color .25s; }
.h-play svg { margin-left: 3px; }
.h-play:hover { background: #fff; color: #0a0a0c; border-color: #fff; transform: scale(1.1); }
.h-foot { position: absolute; z-index: 4; left: var(--pad); bottom: 34px; display: flex; align-items: center; gap: 18px; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--mute); }
.h-dots { display: inline-flex; gap: 6px; }
.h-dots i { width: 6px; height: 6px; border-radius: 50%; background: #4a4a52; }
.h-dots i.ok { background: var(--ok); }
.h-demo { color: var(--gold); }

/* entrance (only when arriving on the page) */
@keyframes titleIn { from { opacity: 0; transform: translateX(-80px); filter: blur(16px); } }
@keyframes heroIn { from { opacity: 0; transform: translateX(80px) scale(.96); filter: blur(10px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } }
#view.enter .page.home > * { animation: none; }
#view.enter .home .t1 { animation: titleIn 1.3s .1s var(--ease) both; }
#view.enter .home .t2 { animation: titleIn 1.3s .25s var(--ease) both; }
#view.enter .home .h-hero { animation: heroIn 1.4s .35s var(--ease) both; }
#view.enter .home #view.enter .home .h-item { animation: fadeUp .8s var(--ease) both; }
#view.enter .home .h-item:nth-child(1) { animation-delay: .7s; } #view.enter .home .h-item:nth-child(2) { animation-delay: .78s; }
#view.enter .home .h-item:nth-child(3) { animation-delay: .86s; } #view.enter .home .h-item:nth-child(4) { animation-delay: .94s; }
#view.enter .home .h-item:nth-child(5) { animation-delay: 1.02s; } #view.enter .home .h-item:nth-child(6) { animation-delay: 1.1s; }
#view.enter .home .h-cta { animation: fadeUp 1s .9s var(--ease) both; }
#view.enter .home .h-edge, #view.enter .home .h-foot { animation: fadeUp 1s 1.1s ease both; }
@media (max-width: 1500px) { .h-side { display: none; } }
@media (max-width: 900px) { .h-edge { display: none; } .h-title { font-size: clamp(64px, 20vw, 160px); } .h-heroart { width: 80%; right: 0; opacity: .55; } }
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; }

/* =====================================================================================================
 * VIDEO BACKDROP + UNIFIED MENU
 * One glass panel holds menu and content (no more separate floating rail): the menu is plain text, numbered
 * sections, a gold bar on the active entry, and the backdrop shows through it.
 * ===================================================================================================== */
#bgvid { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; display: none; transform: scaleX(-1) scale(1.03); filter: saturate(1.12) contrast(1.06) brightness(.85) blur(.5px); }
body[data-bg=video] #bgvid { display: block; }
body[data-bg=video] #veil { background: radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, .04), transparent 55%), linear-gradient(180deg, rgba(5, 5, 8, .42), rgba(5, 5, 8, .6)); }
body[data-bg=video][data-tab=home] #veil { background: linear-gradient(90deg, rgba(5, 5, 8, .88) 0%, rgba(5, 5, 8, .5) 42%, rgba(5, 5, 8, .08) 100%), linear-gradient(0deg, rgba(5, 5, 8, .62), transparent 40%), linear-gradient(180deg, rgba(5, 5, 8, .5), transparent 22%); }

#app { position: relative; display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); margin: 16px; padding: 0; height: calc(100% - 32px); border-radius: 30px; border: 1px solid var(--hair); background: rgba(9, 9, 11, .5); backdrop-filter: blur(34px) saturate(1.35); box-shadow: 0 40px 100px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .09); overflow: hidden; transition: background .9s ease, border-color .6s ease, box-shadow .6s ease; }
#side, #side:hover, #side:focus-within { position: static; width: auto; margin: 0; padding: 28px 14px 16px; gap: 1px; border: 0; border-right: 1px solid var(--hair-soft); border-radius: 0; background: rgba(0, 0, 0, .18); backdrop-filter: none; box-shadow: none; overflow-x: hidden; overflow-y: auto; transition: background .6s ease; }
#main { margin: 0; height: 100%; border: 0; border-radius: 0; background: none; backdrop-filter: none; box-shadow: none; }
.brand { padding: 0 12px 22px; gap: 14px; }
.brand img { width: 36px; height: 36px; }
.brand > div, #side:hover .brand > div { opacity: 1; transform: none; }
.navsec { height: auto; line-height: 1; margin: 24px 12px 8px; font-size: 9.5px; letter-spacing: .28em; color: #85858f; overflow: visible; }
.navsec::after { display: none; }
.nav { height: 38px; padding: 0 14px; gap: 0; border-radius: 10px; font-size: 13.5px; color: #b9b9c2; transition: padding .25s var(--ease), background .2s, color .2s; }
.nav i { display: none; }
.nav span:not(.dot), #side:hover .nav span:not(.dot) { opacity: 1; transform: none; }
.nav:hover { background: rgba(255, 255, 255, .07); color: #fff; padding-left: 19px; }
.nav.on { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.nav.on::before { display: block; content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--gold); }
.nav .dot { right: 14px; top: 16px; }
.side-foot, #side:hover .side-foot { opacity: 1; padding: 18px 14px 0; }
body[data-tab=home] #app { background: transparent; backdrop-filter: none; border-color: rgba(255, 255, 255, .09); box-shadow: none; }
body[data-tab=home] #side { background: none; border-right-color: transparent; }
body[data-tab=home] .h-shade { display: none; }
@media (max-width: 900px) {
  #app { display: flex; flex-direction: column; margin: 8px; height: calc(100% - 16px); }
  #side, #side:hover, #side:focus-within { flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--hair-soft); padding: 10px; flex: none; }
  .brand, .side-foot, .navsec { display: none; }
  .nav { flex: none; }
}

/* links on dark glass: readable gold instead of the default blue */
a { color: var(--gold-2); }
a.btn, .side-foot a { color: inherit; }

/* ---------- PC optimisation */
.optim-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.optim-card { display: flex; flex-direction: column; gap: 10px; }
.optim-card.accent { border-color: var(--gold); background: linear-gradient(160deg, rgba(245, 197, 66, .14), rgba(0, 0, 0, .55)); }
.optim-card.on { box-shadow: var(--glow); }
.optim-card .hint { margin: 0; }
.optim-card .row-btns { margin-top: auto; }
.optim-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.optim-top h3 { margin: 0; }
.optim-gain { flex: none; font-weight: 700; font-size: 13px; color: #120d00; background: linear-gradient(180deg, var(--gold-2), var(--gold)); padding: 3px 9px; border-radius: 99px; box-shadow: var(--glow); }
.optim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--mute); }
.optim-list b { display: inline-block; min-width: 82px; color: var(--text, #fff); font-weight: 600; }
.optim-list code { font-size: 12px; color: var(--gold-2); }
.note.warn { border-color: rgba(255, 170, 60, .45); background: rgba(255, 140, 40, .08); color: #ffd7a8; }
.optim-steps { margin: 14px 0; padding-left: 20px; display: grid; gap: 10px; }
.optim-steps li { padding-left: 4px; }
.optim-steps li > span { margin-right: 10px; }
.optim-steps li > span code { color: var(--gold-2); }
.potato-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.potato-seg button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 10px 12px; white-space: normal; }
.potato-seg button small { font-size: 11.5px; opacity: .75; font-weight: 400; }
@media (max-width: 720px) { .potato-seg { grid-template-columns: 1fr; } }
