/* ЛитРПГ landing + play — epic fantasy: ink-dark sky, ember gold, rune cyan for the System. */
:root {
  --bg: #05060c; --bg2: #0b0d18; --panel: rgba(12, 14, 26, .72);
  --ink: #ece6d6; --muted: #a39a86; --gold: #e0b35a; --gold2: #ffd98a;
  --rune: #7fe7ff; --rune2: rgba(127, 231, 255, .25);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 900; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.9vw, 4.3rem); line-height: 1.06; max-width: 15ch; text-shadow: 0 6px 40px rgba(0, 0, 0, .8); }
h1 em { font-style: italic; color: var(--gold2); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.9rem); line-height: 1.1; }
h3 { font-size: 1.2rem; font-weight: 700; }
.accent { color: var(--gold); }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.kicker { text-transform: uppercase; letter-spacing: .26em; font-size: .74rem; color: var(--rune); margin: 0 0 .8rem; }
.sub { color: var(--muted); max-width: 760px; font-size: 1.05rem; }
.fine { color: var(--muted); font-size: .85rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border-radius: 999px; padding: .8em 1.7em; font-weight: 600; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: var(--ink); cursor: pointer; transition: transform .2s, background .2s, box-shadow .3s; font-size: 1rem; font-family: var(--sans); }
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .12); }
.btn.big { padding: 1em 2.2em; font-size: 1.1rem; }
.btn.small { padding: .5em 1.1em; font-size: .9rem; }
.btn.primary { background: linear-gradient(135deg, #f0c56a, #c9902f); color: #1a1206; border-color: transparent; }
.btn.primary:hover { background: linear-gradient(135deg, #ffd98a, #d9a13a); }
.btn.glow { box-shadow: 0 0 0 0 rgba(224, 179, 90, .6); animation: pulse 2.6s ease-out infinite; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 179, 90, .55); } 70% { box-shadow: 0 0 0 18px rgba(224, 179, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 179, 90, 0); } }

/* ===== hero ===== */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: -1; background: #05060c; }
.hero-layers { position: absolute; inset: -3%; transform: translate(var(--px, 0), var(--py, 0)); transition: transform .6s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.hero-poster, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-poster { background: url(/static/game/poster.jpg) center/cover no-repeat; animation: kenburns 28s ease-in-out infinite alternate; }
.hero-video { opacity: 0; transition: opacity 1.6s ease; animation: kenburns 28s ease-in-out infinite alternate; }
.hero-video.on { opacity: 1; }
@keyframes kenburns { from { transform: scale(1.04) translate(0, 0); } 50% { transform: scale(1.1) translate(-1.2%, -.8%); } to { transform: scale(1.16) translate(1%, -1.6%); } }
.hero-fog { position: absolute; inset: -20% -40%; pointer-events: none; mix-blend-mode: screen; opacity: .55;
  background:
    radial-gradient(38% 30% at 20% 62%, rgba(120, 150, 190, .34), transparent 70%),
    radial-gradient(30% 24% at 62% 74%, rgba(90, 120, 170, .28), transparent 70%),
    radial-gradient(44% 26% at 86% 58%, rgba(140, 160, 200, .22), transparent 70%);
  filter: blur(28px); animation: fogdrift 46s linear infinite; }
.hero-fog.b { opacity: .38; animation-duration: 71s; animation-direction: reverse;
  background:
    radial-gradient(34% 22% at 34% 70%, rgba(160, 175, 210, .28), transparent 70%),
    radial-gradient(40% 30% at 74% 66%, rgba(110, 130, 180, .3), transparent 70%); }
@keyframes fogdrift { from { transform: translateX(-8%) scaleY(1); } 50% { transform: translateX(6%) scaleY(1.08); } to { transform: translateX(-8%) scaleY(1); } }
.hero-glow { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(28% 32% at 58% 44%, rgba(255, 190, 110, .42), rgba(255, 150, 70, .12) 45%, transparent 72%);
  animation: torch 3.4s ease-in-out infinite; }
@keyframes torch { 0%, 100% { opacity: .55; transform: scale(1); } 23% { opacity: .85; transform: scale(1.04); } 47% { opacity: .62; } 68% { opacity: .92; transform: scale(1.07); } 84% { opacity: .7; } }
.hero-rays { position: absolute; inset: -30%; pointer-events: none; mix-blend-mode: screen; opacity: .28;
  background: conic-gradient(from 200deg at 58% 30%, transparent 0 8%, rgba(255, 220, 160, .18) 10%, transparent 13%, transparent 30%, rgba(255, 220, 160, .12) 33%, transparent 36%, transparent 60%, rgba(200, 230, 255, .14) 63%, transparent 66%);
  filter: blur(18px); animation: rays 60s linear infinite; }
@keyframes rays { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.hero-shade { position: absolute; inset: 0; background:
  radial-gradient(120% 80% at 50% 100%, rgba(5, 6, 12, .95) 0%, rgba(5, 6, 12, .35) 45%, rgba(5, 6, 12, 0) 70%),
  linear-gradient(180deg, rgba(5, 6, 12, .75) 0%, rgba(5, 6, 12, .15) 30%, rgba(5, 6, 12, .55) 75%, var(--bg) 100%); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 26px; position: relative; z-index: 2; }
.brand { font-family: var(--serif); font-weight: 900; font-size: 1.5rem; letter-spacing: .02em; }
.brand span { color: var(--gold); }
.nav-links { display: flex; gap: 22px; font-size: .95rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.hero-content { position: relative; z-index: 2; margin: auto 0; padding: 8vh 22px 14vh; max-width: 1140px; width: 100%; margin-left: auto; margin-right: auto; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #d9d2c2; max-width: 720px; margin: 1.2em 0 1.8em; text-shadow: 0 2px 20px rgba(0, 0, 0, .8); }
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta.center { flex-direction: column; text-align: center; margin-top: 3rem; }
.sys-line { display: inline-flex; align-items: center; gap: .5em; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .95rem; color: var(--rune); background: rgba(6, 20, 28, .55); border: 1px solid var(--rune2); border-radius: 8px; padding: .5em .9em; margin-bottom: 1.4rem; box-shadow: 0 0 30px rgba(127, 231, 255, .12), inset 0 0 20px rgba(127, 231, 255, .05); backdrop-filter: blur(6px); }
.sys-tag { color: #bff3ff; font-weight: 700; }
.caret { width: .55em; height: 1.1em; background: var(--rune); display: inline-block; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.live { display: flex; gap: 34px; margin-top: 3rem; flex-wrap: wrap; }
.live-item { display: flex; flex-direction: column; }
.live-item b { font-family: var(--serif); font-size: 2rem; color: var(--gold2); line-height: 1; }
.live-item span { color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 14px; z-index: 2; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }

/* ===== sections ===== */
.block { padding: clamp(70px, 10vw, 130px) 0; position: relative; }
.block.alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, var(--bg) 100%); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2.4rem; }

/* ===== promo trailer ===== */
.play-btn { gap: .7em; }
.play-ico { display: inline-flex; width: 1.7em; height: 1.7em; border-radius: 50%; align-items: center; justify-content: center; font-size: .75em; padding-left: .15em; background: linear-gradient(135deg, #f0c56a, #c9902f); color: #1a1206; box-shadow: 0 0 18px rgba(224, 179, 90, .5); }
.block.promo { padding-top: 0; margin-top: -40px; }
.promo-frame { display: block; width: 100%; aspect-ratio: 16 / 9; margin-top: 2rem; padding: 0; border: 1px solid rgba(224, 179, 90, .35); border-radius: 22px; overflow: hidden; position: relative; cursor: pointer; background: radial-gradient(ellipse at 50% 40%, #2a1f3a 0%, #0b0d18 70%); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04) inset; transition: transform .35s, box-shadow .35s; }
.promo-frame:hover { transform: translateY(-4px) scale(1.005); box-shadow: 0 40px 90px rgba(0, 0, 0, .7), 0 0 60px rgba(224, 179, 90, .18); }
.promo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .35s, transform 6s ease-out; }
.promo-frame:hover img { opacity: 1; transform: scale(1.04); }
.promo-play { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f0c56a, #c9902f); color: #1a1206; font-size: 2rem; box-shadow: 0 0 0 0 rgba(224, 179, 90, .6); animation: pulse 2.6s ease-out infinite; }
.promo-play span { padding-left: 6px; }
.promo-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 24px; text-align: left; font-size: .95rem; color: var(--ink); background: linear-gradient(0deg, rgba(5, 6, 12, .85), transparent); font-family: var(--sans); }
.promo-points { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; }
.promo-points li { padding: .45em 1em; border-radius: 999px; border: 1px solid rgba(127, 231, 255, .3); color: var(--rune); font-size: .9rem; background: rgba(127, 231, 255, .06); }
.promo-modal { position: fixed; inset: 0; z-index: 100; background: rgba(3, 4, 8, .94); display: grid; place-items: center; padding: 4vh 4vw; backdrop-filter: blur(6px); }
.promo-modal[hidden] { display: none; }
.promo-modal video { width: min(100%, 1400px); max-height: 92vh; aspect-ratio: 16 / 9; border-radius: 14px; box-shadow: 0 40px 120px rgba(0, 0, 0, .8), 0 0 80px rgba(224, 179, 90, .15); background: #000; outline: none; }
.promo-close { position: absolute; top: 18px; right: 24px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: var(--ink); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.promo-close:hover { background: rgba(224, 179, 90, .25); border-color: var(--gold); }
body.modal-open { overflow: hidden; }
.card { background: var(--panel); border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; padding: 28px 26px; backdrop-filter: blur(8px); transition: transform .3s, border-color .3s; }
.card:hover { transform: translateY(-6px); border-color: rgba(224, 179, 90, .45); }
.card .ico { font-size: 1.9rem; margin-bottom: .6rem; filter: drop-shadow(0 0 12px rgba(224, 179, 90, .5)); }
.card p { color: var(--muted); margin: 0; }

/* map teaser */
.map-teaser { margin-top: 2.6rem; height: 300px; border-radius: 22px; position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 48% 52%, rgba(224, 179, 90, .35), transparent 22%),
    radial-gradient(circle at 63% 39%, rgba(224, 179, 90, .25), transparent 14%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 40px),
    linear-gradient(160deg, #141a2c, #0a0d18); }
.map-fog { position: absolute; inset: 0; background: radial-gradient(ellipse 34% 40% at 52% 48%, transparent 45%, rgba(5, 6, 12, .92) 100%); animation: fog 9s ease-in-out infinite alternate; }
@keyframes fog { to { background: radial-gradient(ellipse 44% 50% at 54% 46%, transparent 45%, rgba(5, 6, 12, .9) 100%); } }
.map-labels span { position: absolute; transform: translate(-50%, -50%); font-family: var(--serif); font-weight: 700; color: var(--gold2); font-size: .95rem; text-shadow: 0 0 10px rgba(0, 0, 0, .9); padding: .25em .6em; border-radius: 6px; background: rgba(5, 6, 12, .55); }
.map-labels span.dim { color: var(--rune); opacity: .6; font-family: ui-monospace, monospace; }

/* races / classes */
.races, .classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 2rem; }
.pick { background: var(--panel); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 18px; cursor: pointer; transition: border-color .25s, transform .25s, background .25s; }
.pick:hover, .pick.on { border-color: var(--gold); background: rgba(224, 179, 90, .08); transform: translateY(-3px); }
.pick b { font-family: var(--serif); font-size: 1.15rem; display: block; margin-bottom: .3rem; }
.pick small { color: var(--muted); display: block; line-height: 1.4; }
.pick .bon { color: var(--rune); font-family: ui-monospace, monospace; font-size: .78rem; margin-top: .5rem; display: block; }
.syspanel { margin-top: 2rem; border: 1px solid var(--rune2); border-radius: 14px; background: rgba(6, 20, 28, .6); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; box-shadow: 0 0 40px rgba(127, 231, 255, .08); overflow: hidden; }
.sys-head { padding: .6em 1em; color: #bff3ff; border-bottom: 1px solid var(--rune2); font-weight: 700; font-size: .9rem; }
.sys-body { padding: 1em; color: var(--rune); font-size: .9rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .4em 1.5em; }
.sys-body div span { color: #dff9ff; }

/* split */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.split.rev .split-text { order: 2; }
.split-text p { color: var(--muted); font-size: 1.05rem; }
.ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.ticks li { padding-left: 1.8em; position: relative; margin: .55em 0; color: #d9d2c2; }
.ticks li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); }

/* 3D book */
.book3d { position: relative; width: 260px; height: 370px; margin: 0 auto; perspective: 1200px; }
.book-cover { position: absolute; inset: 0; border-radius: 6px 14px 14px 6px; padding: 26px 22px; display: flex; flex-direction: column; justify-content: space-between; color: #1a1206; transform: rotateY(-22deg); transform-origin: left center; transition: transform .6s;
  background: linear-gradient(135deg, #f1cd7b 0%, #c98f2e 40%, #8a5a12 100%); box-shadow: 20px 30px 60px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(255, 255, 255, .25); }
.book3d:hover .book-cover { transform: rotateY(-38deg); }
.book-cover small { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.book-cover b { font-family: var(--serif); font-size: 1.9rem; line-height: 1.05; font-weight: 900; }
.book-cover i { font-family: var(--serif); font-style: italic; }
.book-pages { position: absolute; top: 6px; bottom: 6px; left: 14px; right: -14px; border-radius: 2px 10px 10px 2px; background: repeating-linear-gradient(90deg, #efe7d3 0 2px, #d9cfb8 2px 3px); transform: rotateY(-22deg) translateZ(-18px); transform-origin: left center; z-index: -1; }

/* film reel */
.reel { position: relative; height: 340px; }
.frame { position: absolute; width: 62%; aspect-ratio: 16/9; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); background-size: cover; background-position: center; }
.frame.f1 { left: 0; top: 0; background-image: linear-gradient(135deg, #2a1c3d, #0d0a16), url(/static/game/poster.jpg); background-blend-mode: soft-light; transform: rotate(-6deg); }
.frame.f2 { left: 20%; top: 26%; background-image: linear-gradient(135deg, rgba(224, 179, 90, .3), rgba(5, 6, 12, .6)), url(/static/game/poster.jpg); transform: rotate(3deg); z-index: 2; }
.frame.f3 { left: 38%; top: 54%; background-image: linear-gradient(135deg, rgba(127, 231, 255, .25), rgba(5, 6, 12, .7)), url(/static/game/poster.jpg); transform: rotate(-2deg); }
.play-badge { position: absolute; right: 6%; top: 8%; background: rgba(5, 6, 12, .8); border: 1px solid var(--gold); color: var(--gold2); border-radius: 999px; padding: .4em 1em; font-weight: 700; z-index: 3; }

/* steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 2.4rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li { position: relative; background: var(--panel); border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; padding: 30px 26px 26px; }
.steps li b { position: absolute; top: -18px; left: 22px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f0c56a, #c9902f); color: #1a1206; font-family: var(--serif); font-weight: 900; box-shadow: 0 6px 20px rgba(224, 179, 90, .4); }
.steps li p { color: var(--muted); margin: 0; }

.foot { border-top: 1px solid rgba(255, 255, 255, .08); padding: 40px 0 60px; color: var(--muted); text-align: center; }
.foot .brand { margin-bottom: .6rem; }
.foot a { color: var(--gold); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .grid3, .steps { grid-template-columns: 1fr; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 30px; }
  .split.rev .split-text { order: 0; }
  .nav-links { display: none; }
  .live { gap: 22px; }
  .reel { height: 260px; }
  .frame { width: 70%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video, .hero-poster, .hero-fog, .hero-glow, .hero-rays { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .btn.glow { animation: none; }
}

/* ===== play (world client) ===== */
.play { min-height: 100svh; background: var(--bg); }
.play .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(5, 6, 12, .85); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.play .topbar .right { display: flex; gap: 10px; align-items: center; }
.hidden { display: none !important; }
.screen { max-width: 1140px; margin: 0 auto; padding: 22px; }
.creator { display: grid; grid-template-columns: 1fr 340px; gap: 26px; }
.creator .panel { background: var(--panel); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.field input, .field textarea, .field select { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); color: var(--ink); border-radius: 10px; padding: .7em .9em; font: inherit; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { border-radius: 999px; padding: .45em 1em; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); color: var(--ink); cursor: pointer; font: inherit; }
.seg button.on { background: rgba(224, 179, 90, .18); border-color: var(--gold); }
.stats { display: grid; grid-template-columns: 1fr; gap: 8px; font-family: ui-monospace, monospace; font-size: .92rem; }
.stat { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: .4em .7em; border-radius: 8px; background: rgba(127, 231, 255, .06); border: 1px solid var(--rune2); color: var(--rune); }
.stat .ctl { display: flex; gap: 6px; align-items: center; }
.stat .ctl button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rune2); background: transparent; color: var(--rune); cursor: pointer; }
.stat .val { color: #dff9ff; min-width: 2ch; text-align: center; }
.err { color: #ff9c9c; min-height: 1.4em; margin-top: .4em; }

/* ---- world: full-screen stage + chronicle ---- */
.play.in-world { height: 100svh; overflow: hidden; }
.play .topbar .where { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.play .topbar .where b { font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play .topbar .where small { color: var(--muted); font-size: .75rem; }
.menu { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.menu button { border-radius: 999px; padding: .4em .9em; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); color: var(--ink); cursor: pointer; font-size: .85rem; }
.menu button:hover { border-color: var(--gold); }
.menu .wallet { margin-left: 6px; border-radius: 999px; padding: .4em .9em; border: 1px solid var(--gold); color: var(--gold); font-family: ui-monospace, monospace; font-size: .85rem; cursor: pointer; background: rgba(224, 179, 90, .08); }

.world { display: grid; grid-template-columns: 1fr 420px; height: calc(100svh - 58px); }
.stage { position: relative; overflow: hidden; background: #0a0d18; }
.stage .art { position: absolute; inset: 0; background: #0a0d18 center/cover no-repeat; transition: background-image .6s ease; transform: scale(1.02); }
.stage .art-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 6, 12, .55) 0%, rgba(5, 6, 12, 0) 30%, rgba(5, 6, 12, 0) 55%, rgba(5, 6, 12, .85) 100%); pointer-events: none; }
.stage .gen { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-family: ui-monospace, monospace; color: var(--rune); font-size: .85rem; background: rgba(5, 6, 12, .7); padding: .4em .8em; border-radius: 8px; border: 1px solid var(--rune2); }
.stage .clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 5; cursor: pointer; background: #000; }
.stage.map-view .art, .stage.map-view .loc-desc, .stage.map-view .exits, .stage.map-view .minimap, .stage.map-view .here-people, .stage.map-view .stage-actions { display: none; }

.hero-chip { position: absolute; left: 16px; top: 14px; z-index: 3; display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 8px 12px 8px 8px; background: rgba(5, 6, 12, .72); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; cursor: pointer; backdrop-filter: blur(6px); min-width: 230px; }
.hero-chip .face img, .hero-chip .face .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #1a1d2e; display: grid; place-items: center; color: var(--muted); font-size: .7rem; text-align: center; }
.hero-chip b { font-family: var(--serif); font-size: 1.05rem; display: block; }
.hero-chip small { color: var(--muted); display: block; font-size: .75rem; }
.bars { margin-top: 5px; display: grid; gap: 3px; }
.bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; }
.bar.hp i { background: #e5555a; } .bar.mp i { background: #5aa7ff; } .bar.xp i { background: var(--gold); }

.here-people { position: absolute; right: 16px; top: 14px; z-index: 3; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; max-height: 46%; overflow: auto; }
.person { display: flex; align-items: center; gap: 8px; background: rgba(5, 6, 12, .72); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: .85rem; backdrop-filter: blur(6px); }
.person img, .person .ph { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #1a1d2e; display: inline-grid; place-items: center; font-size: .8rem; }
.person.npc { border-color: rgba(224, 179, 90, .45); cursor: pointer; }
.person.npc:hover, .person.npc.on { background: rgba(224, 179, 90, .22); border-color: var(--gold); }
.person.item { border-color: var(--rune2); cursor: pointer; }

.view-tabs { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 3; display: flex; gap: 2px; background: rgba(5, 6, 12, .72); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 3px; }
.view-tabs button { border: 0; background: transparent; color: var(--muted); padding: .35em 1em; border-radius: 999px; cursor: pointer; }
.view-tabs button.on { background: rgba(224, 179, 90, .22); color: var(--gold); }

.loc-desc { position: absolute; left: 16px; right: 16px; bottom: 132px; z-index: 3; color: #ece6d6; font-family: var(--serif); font-size: 1.05rem; line-height: 1.45; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); max-width: 62%; white-space: pre-line; max-height: 30%; overflow: auto; }
.exits { position: absolute; left: 16px; bottom: 16px; z-index: 3; display: flex; gap: 8px; flex-wrap: wrap; max-width: 62%; }
.exits button { border-radius: 12px; padding: .5em .9em; border: 1px solid rgba(255, 255, 255, .18); background: rgba(5, 6, 12, .72); color: var(--ink); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 1px; backdrop-filter: blur(6px); }
.exits button:hover { border-color: var(--gold); }
.exits button small { color: var(--muted); font-size: .72rem; }
.exits button.new { border-color: var(--rune2); }
.exits button.new small { color: var(--rune); }
.minimap { position: absolute; right: 16px; bottom: 60px; z-index: 3; width: 300px; height: 190px; border-radius: 12px; border: 1px solid rgba(224, 179, 90, .4); background: rgba(5, 6, 12, .75); overflow: hidden; cursor: pointer; backdrop-filter: blur(6px); }
.minimap canvas { width: 100%; height: 100%; display: block; }
.stage-actions { position: absolute; right: 16px; bottom: 16px; z-index: 3; display: flex; gap: 8px; }
.stage-actions .btn { background: rgba(5, 6, 12, .75); backdrop-filter: blur(6px); }
.bigmap { position: absolute; inset: 0; z-index: 4; background: radial-gradient(ellipse at 50% 40%, #182038 0%, #0a0d18 70%); }
.bigmap canvas { width: 100%; height: 100%; display: block; }
.bigmap .legend { position: absolute; left: 16px; bottom: 16px; display: grid; gap: 4px; background: rgba(5, 6, 12, .75); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 10px 14px; font-size: .85rem; max-width: 60%; }

.story { display: flex; flex-direction: column; border-left: 1px solid rgba(255, 255, 255, .08); background: var(--panel); min-height: 0; }
.story-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 6px; }
.feed { flex: 1; overflow: auto; padding: 4px 16px 10px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { border-radius: 12px; padding: 10px 12px; font-size: .97rem; line-height: 1.5; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); }
.msg b { display: block; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.msg.act, .msg.say { background: rgba(224, 179, 90, .08); border-color: rgba(224, 179, 90, .25); align-self: flex-end; max-width: 92%; }
.msg.act b, .msg.say b { color: var(--gold); }
.msg.gm { font-family: var(--serif); font-size: 1.02rem; color: #ece6d6; background: rgba(255, 255, 255, .035); position: relative; }
.msg.gm .mini { position: absolute; right: 8px; bottom: 6px; border: 1px solid rgba(255, 255, 255, .15); background: transparent; color: var(--muted); border-radius: 999px; font-size: .7rem; padding: .15em .6em; cursor: pointer; opacity: 0; transition: opacity .2s; }
.msg.gm:hover .mini { opacity: 1; }
.msg.talk { background: rgba(127, 231, 255, .06); border-color: rgba(127, 231, 255, .2); font-family: var(--serif); font-size: 1.02rem; }
.msg.talk b { color: var(--rune); }
.msg.system { font-family: ui-monospace, monospace; font-size: .85rem; color: var(--rune); background: rgba(6, 20, 28, .6); border-color: var(--rune2); }
.msg.move { color: #dff9ff; font-size: .9rem; }
.msg.clip video { width: 100%; border-radius: 10px; margin-top: 6px; display: block; background: #000; }
.msg.clip small, .msg .pending { color: var(--muted); font-size: .8rem; }
.msg.thinking { opacity: .6; }
.npc-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 6px 16px 0; }
.npc-chips button { border-radius: 999px; padding: .25em .8em; border: 1px solid rgba(224, 179, 90, .35); background: transparent; color: var(--ink); cursor: pointer; font-size: .8rem; }
.npc-chips button.on { background: rgba(224, 179, 90, .22); border-color: var(--gold); color: var(--gold); }
.composer { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: stretch; padding: 10px 16px 4px; }
.composer .mode { display: flex; flex-direction: column; gap: 4px; }
.composer .mode button { border-radius: 8px; padding: .3em .7em; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: var(--muted); cursor: pointer; font-size: .78rem; }
.composer .mode button.on { border-color: var(--gold); color: var(--gold); background: rgba(224, 179, 90, .12); }
.composer textarea { resize: none; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); color: var(--ink); border-radius: 10px; padding: .6em .8em; font: inherit; font-size: .95rem; }
.composer textarea:focus { outline: none; border-color: var(--gold); }
.composer .btn { padding: 0 1.1em; }
.composer-hint { padding: 0 16px 10px; color: var(--muted); }

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5, 6, 12, .7); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(4px); }
.overlay.intro { z-index: 60; background: rgba(3, 4, 8, .92); }
.intro-box { position: relative; width: min(1100px, 100%); }
.intro-box video { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.intro-box .btn { position: absolute; right: 14px; bottom: 14px; }
.sheet-box { width: min(720px, 100%); max-height: 90svh; overflow: auto; background: var(--panel); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 18px 22px 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.sheet-head h3 { margin: 0; }
.sheet-body .big-face img, .sheet-body .big-face .ph { width: 160px; height: 160px; border-radius: 14px; object-fit: cover; float: left; margin: 0 16px 10px 0; background: #1a1d2e; }
.sysgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: ui-monospace, monospace; font-size: .9rem; color: var(--rune); }
.sysgrid div { padding: .35em .7em; border-radius: 8px; background: rgba(127, 231, 255, .05); border: 1px solid rgba(127, 231, 255, .15); }
.item-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.item-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.item-row small { color: var(--muted); display: block; }
.home-img { width: 100%; border-radius: 12px; margin-bottom: 10px; }
.book .msg { margin-bottom: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(5, 6, 12, .92); border: 1px solid var(--gold); color: var(--gold); padding: .7em 1.2em; border-radius: 12px; z-index: 60; max-width: 92vw; font-size: .95rem; text-align: center; }

@media (max-width: 900px) {
  .creator { grid-template-columns: 1fr; }
  .play.in-world { height: auto; overflow: auto; }
  .play .topbar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  .play .topbar .where { order: 3; width: 100%; }
  .world { grid-template-columns: 1fr; grid-template-rows: 62svh auto; height: auto; }
  .stage { min-height: 62svh; }
  .hero-chip { min-width: 0; grid-template-columns: 44px 1fr; padding: 6px 10px 6px 6px; left: 10px; top: 10px; }
  .hero-chip .face img, .hero-chip .face .ph { width: 44px; height: 44px; }
  .here-people { right: 10px; top: 60px; }
  .person span:last-child { display: none; }
  .person { padding: 3px; }
  .view-tabs { top: 10px; left: auto; right: 10px; transform: none; }
  .loc-desc { max-width: none; bottom: 150px; font-size: .95rem; left: 10px; right: 10px; max-height: 28%; }
  .exits { max-width: none; left: 10px; right: 10px; bottom: 10px; }
  .exits button { padding: .4em .7em; font-size: .85rem; }
  .minimap { width: 120px; height: 84px; right: 10px; bottom: 100px; }
  .stage-actions { right: 10px; bottom: 60px; }
  .story { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); min-height: 40svh; }
  .feed { max-height: 42svh; }
  .composer { grid-template-columns: 1fr auto; }
  .composer .mode { grid-column: 1 / -1; flex-direction: row; }
}
.packs { display: grid; gap: 8px; margin: 10px 0; }
.packs .pack { text-align: left; border-radius: 12px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: var(--ink); cursor: pointer; display: grid; gap: 2px; }
.packs .pack.pass { border-color: var(--gold); background: rgba(224, 179, 90, .08); }
.packs .pack b { font-family: var(--serif); font-size: 1.05rem; }
.packs .pack small { color: var(--muted); }

/* ---- landing: freedom / compare / price ---- */
.dialogue { max-width: 760px; margin: 28px auto 0; display: grid; gap: 10px; }
.dl { border-radius: 14px; padding: 12px 16px; line-height: 1.5; font-size: 1.02rem; border: 1px solid rgba(255, 255, 255, .08); background: var(--panel); }
.dl b { display: block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.dl.you { justify-self: end; max-width: 70%; background: rgba(224, 179, 90, .1); border-color: rgba(224, 179, 90, .35); }
.dl.you b { color: var(--gold); }
.dl.gm { font-family: var(--serif); color: #ece6d6; }
.dl.npc { font-family: var(--serif); background: rgba(127, 231, 255, .06); border-color: rgba(127, 231, 255, .2); }
.dl.npc b { color: var(--rune); }
.dl.sys { font-family: ui-monospace, monospace; font-size: .88rem; color: var(--rune); background: rgba(6, 20, 28, .7); border-color: var(--rune2); }
.compare { max-width: 860px; margin: 18px auto 0; border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; overflow: hidden; background: var(--panel); }
.cmp-head, .cmp-row { display: grid; grid-template-columns: 1fr 120px 120px 130px; align-items: center; }
.cmp-head { background: rgba(255, 255, 255, .04); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cmp-head span, .cmp-row span { padding: 12px 14px; text-align: center; border-top: 1px solid rgba(255, 255, 255, .06); }
.cmp-row span:first-child { text-align: left; }
.cmp-head span:first-child { border-top: 0; }
.cmp-head .us { color: var(--gold); }
.cmp-row .us { background: rgba(224, 179, 90, .08); font-weight: 700; }
.cmp-row .y { color: #7fe7a2; } .cmp-row .n { color: rgba(255, 255, 255, .35); }
.price .card.featured { border-color: var(--gold); box-shadow: 0 0 40px rgba(224, 179, 90, .15); }
@media (max-width: 700px) {
  .cmp-head, .cmp-row { grid-template-columns: 1fr 58px 58px 70px; font-size: .85rem; }
  .cmp-head span, .cmp-row span { padding: 10px 8px; }
  .dl.you { max-width: 90%; }
}

/* ---- heroes with heroes (W3) ---- */
.person.player { cursor: pointer; }
.person.player:hover { border-color: var(--gold); background: rgba(224, 179, 90, .16); }
.person.player.mate { border-color: rgba(127, 231, 255, .6); box-shadow: 0 0 0 1px rgba(127, 231, 255, .25) inset; }
.person.off { opacity: .55; }
.menu button { position: relative; }
.menu .badge { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--gold); color: #1a1408; font-size: .7rem; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.msg.dm, .msg.party { background: rgba(127, 231, 255, .07); border-color: rgba(127, 231, 255, .3); }
.msg.dm b, .msg.party b { color: var(--rune); }
.msg.trade, .msg.duel { font-family: var(--serif); font-size: .98rem; background: rgba(224, 179, 90, .06); border-color: rgba(224, 179, 90, .3); }
.msg.trade b, .msg.duel b { color: var(--gold); }
.hero-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.dm-row { display: flex; gap: 8px; margin: 10px 0; }
.dm-row input { flex: 1; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: var(--ink); padding: .5em .8em; font: inherit; }
.hero-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.invite { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.invite > div:nth-child(2) { flex: 1; font-size: .92rem; }
.invite .acts { display: flex; gap: 6px; }
.party-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.party-list .person { align-self: flex-start; }
.item-row input[type=checkbox] { accent-color: var(--gold); width: 18px; height: 18px; }
.item-row .qty { width: 64px; margin-left: auto; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: var(--ink); padding: .3em .5em; font: inherit; }
.trade-gold { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; font-size: .9rem; color: var(--muted); }
.trade-gold input { width: 80px; margin-left: 6px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: var(--ink); padding: .3em .5em; font: inherit; }
.invite .face img, .invite .face .ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #1a1d2e; display: grid; place-items: center; }
.hero-head .big-face img, .hero-head .big-face .ph { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; float: none; margin: 0; background: #1a1d2e; display: grid; place-items: center; }
