/* FETİH — Black & White Editorial / Swiss */
:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --bg-3: #111111;
  --paper: #f4f1ea;
  --paper-2: #ebe7de;
  --ink: #000000;
  --ink-2: #1a1a1a;
  --muted: #6b6b6b;
  --muted-2: #9a9a9a;
  --line: #ffffff;
  --line-ink: #000000;
  --line-soft: rgba(255,255,255,.18);
  --line-ink-soft: rgba(0,0,0,.18);
  --land: #1c1c1c;
  --land-empty: #242424;
  --ocean: #000000;
  --danger: #111;
  --ok: #111;
  --r: 0;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-d: 'Instrument Serif', 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-g: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-x: 'Unbounded', 'Archivo Black', Impact, sans-serif;
  --font-xb: 'Archivo Black', 'Unbounded', Impact, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  --t: 120ms ease;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font); color: #fff; font-size: 14px; line-height: 1.45;
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
.upper { text-transform: uppercase; }
.muted { color: var(--muted-2); font-size: 12px; }
.bg-grid, .map-glow, .vignette, #auth-bg-canvas, #bg-canvas { display: none !important; }

/* —— Screens —— */
.screen { position: fixed; inset: 0; z-index: 1; overflow: auto; background: var(--bg); color: #fff; }

/* —— Buttons —— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border: 1px solid #fff; background: transparent; color: #fff;
  font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 12px;
  transition: background var(--t), color var(--t), border-color var(--t);
  border-radius: 0;
}
.btn:hover:not(:disabled) { background: #fff; color: #000; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-primary, .btn-play, .btn-violet, .btn-gold, .btn-red {
  background: #fff; color: #000; border-color: #fff;
}
.btn-primary:hover:not(:disabled), .btn-play:hover:not(:disabled),
.btn-violet:hover:not(:disabled), .btn-gold:hover:not(:disabled),
.btn-red:hover:not(:disabled) { background: transparent; color: #fff; }
.btn-outline { background: transparent; border: 1px solid #fff; color: #fff; }
.btn-outline:hover:not(:disabled) { background: #fff; color: #000; }
.btn-outline.danger, .btn.danger { border-color: #fff; }
.btn-ghost { border: 0; color: #fff; padding: 10px 14px; letter-spacing: .04em; }
.btn-ghost:hover { background: transparent; text-decoration: underline; }
.btn.big { padding: 16px 28px; font-size: 13px; }
.btn.full, .btn.wide { width: 100%; }
.btn.sm { padding: 8px 12px; font-size: 11px; gap: 6px; }
.btn .arr { transition: transform var(--t); }
.btn:hover .arr { transform: translateX(3px); }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff;
}
.icon-btn:hover { background: #fff; color: #000; border-color: #fff; }
.icon-btn.danger:hover { background: #fff; color: #000; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.on { background: #fff; color: #000; }

/* Paper-context buttons (auth form, white panels) */
.paper .btn, .auth-form-side .btn, .sel-card .btn, .lobby-col .btn, .room-card .btn, .modal-card .btn, .flag-designer .btn {
  border-color: #000; color: #000; background: transparent;
}
.paper .btn:hover:not(:disabled), .auth-form-side .btn:hover:not(:disabled),
.sel-card .btn:hover:not(:disabled), .lobby-col .btn:hover:not(:disabled),
.room-card .btn:hover:not(:disabled), .modal-card .btn:hover:not(:disabled),
.flag-designer .btn:hover:not(:disabled) { background: #000; color: #fff; }
.paper .btn-primary, .auth-form-side .btn-primary, .auth-form-side .btn-gold,
.sel-card .btn-primary, .sel-card .btn-gold, .sel-card .btn-red, .sel-card .btn-violet,
.room-card .btn-primary, .lobby-bottom .btn-violet, .modal-card .btn-primary {
  background: #000; color: #fff; border-color: #000;
}
.paper .btn-primary:hover:not(:disabled), .auth-form-side .btn-primary:hover:not(:disabled),
.auth-form-side .btn-gold:hover:not(:disabled),
.sel-card .btn-primary:hover:not(:disabled), .sel-card .btn-gold:hover:not(:disabled),
.sel-card .btn-red:hover:not(:disabled), .room-card .btn-primary:hover:not(:disabled),
.lobby-bottom .btn-violet:hover:not(:disabled) { background: transparent; color: #000; }
.paper .icon-btn, .sel-card .icon-btn, .lobby-col .icon-btn, .room-card .icon-btn, .modal-card .icon-btn {
  border-color: rgba(0,0,0,.35); color: #000;
}
.paper .icon-btn:hover, .sel-card .icon-btn:hover { background: #000; color: #fff; border-color: #000; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field label em { text-transform: none; font-style: normal; color: var(--muted-2); font-weight: 400; letter-spacing: 0; }
.input-ic {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 48px;
  border: 1px solid #000; background: #fff; border-radius: 0;
}
.input-ic:focus-within { outline: 1px solid #000; outline-offset: 1px; }
.input-ic > svg.lucide { color: #000; opacity: .45; width: 16px; height: 16px; }
.input-ic input { flex: 1; background: none; border: 0; outline: 0; height: 100%; min-width: 0; color: #000; }
.input-ic input::placeholder { color: #9a9a9a; }
.input-ic .ok { color: #000; }
.counter { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  min-width: 48px; height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.4);
  background: transparent; font-weight: 600; font-size: 12px; letter-spacing: .06em;
}
.pill:hover { border-color: #fff; }
.pill.active { background: #fff; color: #000; border-color: #fff; }
.paper .pill, .room-card .pill, .flag-designer .pill {
  border-color: rgba(0,0,0,.35); color: #000;
}
.paper .pill.active, .room-card .pill.active, .flag-designer .pill.active {
  background: #000; color: #fff; border-color: #000;
}

/* Glass → flat panels */
.glass {
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: none;
}

/* ═══ LANDING V4 — immersive grotesk, NOT editorial split ═══ */
#screen-landing.land-v4 {
  --lg: var(--font-g);
  --lx: var(--font-x);
  --lxb: var(--font-xb);
  background: #000;
  color: #fff;
  position: fixed; inset: 0;
  overflow-x: hidden; overflow-y: auto;
  font-family: var(--lg);
  min-height: 0; height: 100%;
}
#screen-landing.land-v4.hidden { display: none !important; }
/* v4 fake cursor removed — site uses PNG cursors (cursors.css) */

/* burger */
.v4-burger {
  position: fixed; top: 22px; right: 22px; z-index: 200;
  width: 48px; height: 48px; border-radius: 999px;
  background: #fff; color: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 0;
}
.v4-burger i { display: block; width: 18px; height: 2px; background: #000; transition: transform .25s; }
.v4-burger.is-open i:first-child { transform: translateY(4px) rotate(45deg); }
.v4-burger.is-open i:last-child { transform: translateY(-4px) rotate(-45deg); }

.v4-menu {
  position: fixed; inset: 0; z-index: 190;
  background: #000; color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 48px;
}
.v4-menu[hidden] { display: none !important; }
.v4-menu-close {
  position: absolute; top: 22px; left: 22px;
  font-size: 36px; line-height: 1; color: #fff; background: none; border: 0;
}
.v4-menu nav { display: flex; flex-direction: column; gap: 8px; }
.v4-menu nav a {
  font-family: var(--lx); font-weight: 800; font-size: clamp(40px, 8vw, 96px);
  letter-spacing: -.04em; line-height: 1; color: #fff;
  transition: opacity .2s;
}
.v4-menu nav a:hover { opacity: .45; }
.v4-menu-auth { margin-top: 48px; display: flex; gap: 14px; flex-wrap: wrap; }
.v4-menu-auth button {
  font-family: var(--lg); font-weight: 600; font-size: 14px; letter-spacing: .08em;
  text-transform: uppercase; padding: 14px 24px;
  border: 1px solid #fff; background: transparent; color: #fff;
}
.v4-menu-auth button.solid { background: #fff; color: #000; }

/* floating pill */
.v4-pill {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 180;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.v4-pill.is-hide { opacity: 0; transform: translateX(-50%) translateY(-20px); }
.v4-pill-mark { font-family: var(--lxb); font-size: 12px; letter-spacing: .2em; }
.v4-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: v4blink 1.4s infinite; }
@keyframes v4blink { 50% { opacity: .25; } }
.v4-pill-live b { font-weight: 600; }

/* HERO */
.v4-hero {
  position: relative; height: 100vh; min-height: 640px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
.v4-globe {
  position: absolute; left: 50%; top: 48%;
  width: min(120vh, 1100px); height: min(120vh, 1100px);
  transform: translate(-50%, -50%) scale(var(--globe-scale, 1));
  pointer-events: none; opacity: .95;
}
.v4-hero-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 20%, #000 72%);
  pointer-events: none;
}
.v4-wordmark {
  position: relative; z-index: 2; margin: 0;
  font-family: var(--lxb);
  font-size: clamp(64px, 18vw, 240px);
  font-weight: 400; letter-spacing: -.06em; line-height: .85;
  text-align: center; text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
}
.v4-wordmark span {
  display: inline-block;
  transform: translateY(120%) rotate(6deg);
  opacity: 0;
  transition: transform 1s cubic-bezier(.16,1,.3,1), opacity .6s, color .4s, -webkit-text-stroke .4s;
}
.v4-wordmark.is-in span { transform: none; opacity: 1; }
.v4-wordmark span:nth-child(1) { transition-delay: .05s; }
.v4-wordmark span:nth-child(2) { transition-delay: .12s; }
.v4-wordmark span:nth-child(3) { transition-delay: .19s; }
.v4-wordmark span:nth-child(4) { transition-delay: .26s; }
.v4-wordmark span:nth-child(5) { transition-delay: .33s; }
.v4-wordmark.is-outline {
  color: transparent;
  -webkit-text-stroke: 2px #fff;
  text-stroke: 2px #fff;
  mix-blend-mode: normal;
}
.v4-tagline {
  position: relative; z-index: 2; margin: 22px 0 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .32em;
  color: rgba(255,255,255,.55); text-align: center;
  opacity: 0; transform: translateY(12px);
  transition: opacity .8s .5s, transform .8s .5s;
}
.v4-hero.is-ready .v4-tagline { opacity: 1; transform: none; }

.v4-bottombar {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; gap: 10px; align-items: center;
  padding: 8px; border-radius: 999px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.v4-bb-ghost, .v4-bb-solid {
  font-family: var(--lg); font-weight: 600; font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 14px 22px; border-radius: 999px; border: 0;
  transition: transform .2s, background .2s, color .2s;
}
.v4-bb-ghost { background: transparent; color: #fff; }
.v4-bb-ghost:hover { background: rgba(255,255,255,.1); }
.v4-bb-solid { background: #fff; color: #000; }
.v4-bb-solid:hover { transform: scale(1.04); }

.v4-scrollcue {
  position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 48px; background: rgba(255,255,255,.2); overflow: hidden;
}
.v4-scrollcue span {
  display: block; width: 100%; height: 40%; background: #fff;
  animation: v4cue 1.5s ease-in-out infinite;
}
@keyframes v4cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(250%); } }

/* HORIZONTAL SCROLL */
.v4-hscroll { position: relative; height: 400vh; }
.v4-hscroll-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center; overflow: hidden;
}
.v4-hscroll-track {
  display: flex; gap: 28px; padding: 0 10vw;
  will-change: transform;
}
.v4-card {
  flex: 0 0 min(72vw, 520px);
  height: min(70vh, 560px);
  border: 1px solid rgba(255,255,255,.3);
  background: #0a0a0a;
  padding: 36px 32px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.v4-card-idx {
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em;
  color: rgba(255,255,255,.45); margin-bottom: 18px;
}
.v4-card h2 {
  font-family: var(--lx); font-weight: 800; font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -.04em; margin: 0 0 14px; line-height: .95;
}
.v4-card p {
  margin: 0; color: rgba(255,255,255,.65); font-size: 16px; max-width: 28ch; line-height: 1.45;
}
.v4-card canvas {
  margin-top: auto; width: 100%; height: auto; max-height: 200px;
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px;
}

/* TICKER */
.v4-ticker {
  border-top: 1px solid #fff; border-bottom: 1px solid #fff;
  overflow: hidden; padding: 22px 0; background: #000;
}
.v4-ticker-track {
  display: flex; gap: 28px; width: max-content; white-space: nowrap;
  font-family: var(--lx); font-weight: 700; font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.03em; animation: v4tick 28s linear infinite;
}
.v4-ticker-track i { font-style: normal; opacity: .3; }
@keyframes v4tick { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }

/* GIANT COUNTERS */
.v4-counters {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 80px 48px; gap: 0;
  border-bottom: 1px solid rgba(255,255,255,.2);
}
.v4-count {
  padding: 24px; border-right: 1px solid rgba(255,255,255,.2);
  text-align: center;
}
.v4-count:last-child { border-right: 0; }
.v4-count b {
  display: block; font-family: var(--lx); font-weight: 800;
  font-size: clamp(48px, 8vw, 104px); letter-spacing: -.05em; line-height: 1;
}
.v4-count span {
  display: block; margin-top: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  color: rgba(255,255,255,.45);
}

/* INVERTED WHITE */
.v4-invert {
  background: #fff; color: #000;
  padding: 100px 48px 80px;
}
.v4-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: .28em; margin: 0 0 16px;
}
.v4-invert-head h2 {
  font-family: var(--lx); font-weight: 800;
  font-size: clamp(40px, 7vw, 96px); letter-spacing: -.05em;
  line-height: .95; margin: 0 0 56px;
}
.v4-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid #000;
}
.v4-steps li {
  display: flex; gap: 20px; padding: 28px 24px;
  border-bottom: 1px solid #000; border-right: 1px solid #000;
}
.v4-steps li:nth-child(2n) { border-right: 0; }
.v4-steps b {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; min-width: 28px;
}
.v4-steps h3 {
  font-family: var(--lx); font-weight: 700; font-size: 22px;
  letter-spacing: -.02em; margin: 0 0 6px;
}
.v4-steps p { margin: 0; color: #333; font-size: 14px; }

/* BENTO */
.v4-bento {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px; padding: 48px;
  background: #000;
}
.v4-bento-cell {
  border: 1px solid rgba(255,255,255,.28);
  background: #0a0a0a; padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 220px; overflow: hidden;
  transition: background .3s, transform .3s;
}
.v4-bento-cell:hover { background: #111; transform: translateY(-2px); }
.v4-bento-cell.tall { grid-row: span 2; min-height: 460px; }
.v4-bento-cell.wide { grid-column: 2 / span 2; }
.v4-bento-cell h3 {
  font-family: var(--lx); font-weight: 800; font-size: 22px;
  letter-spacing: -.03em; margin: 0;
}
.v4-bento-cell p { margin: 0; color: rgba(255,255,255,.6); font-size: 13px; max-width: 36ch; }
.v4-bento-cell canvas { width: 100%; height: auto; flex: 1; min-height: 80px; }

/* SPOTLIGHT CTA */
.v4-cta {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px 24px;
  background: #000; overflow: hidden;
}
.v4-spot {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.14) 0%, transparent 60%);
  pointer-events: none; transform: translate(-50%, -50%);
  left: 50%; top: 50%;
  transition: opacity .3s;
}
.v4-cta h2 {
  position: relative; z-index: 1;
  font-family: var(--lxb); font-weight: 400;
  font-size: clamp(56px, 12vw, 160px); letter-spacing: -.06em;
  line-height: .9; margin: 0 0 20px;
}
.v4-cta p {
  position: relative; z-index: 1;
  font-family: var(--mono); letter-spacing: .2em; font-size: 12px;
  color: rgba(255,255,255,.55); margin: 0 0 36px;
}
.v4-cta-btn {
  position: relative; z-index: 1;
  font-family: var(--lx); font-weight: 800; font-size: 16px; letter-spacing: .08em;
  padding: 20px 40px; background: #fff; color: #000; border: 0;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.v4-cta-btn:hover { transform: scale(1.06); }

.v4-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 48px; border-top: 1px solid rgba(255,255,255,.2);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: rgba(255,255,255,.5);
}
.v4-foot span:first-child {
  font-family: var(--lxb); font-size: 14px; letter-spacing: .18em; color: #fff;
}
.v4-foot a:hover { color: #fff; }

@media (max-width: 900px) {
  .v4-pill { display: none; }
  .v4-counters { grid-template-columns: 1fr 1fr; }
  .v4-count:nth-child(2n) { border-right: 0; }
  .v4-count { border-bottom: 1px solid rgba(255,255,255,.2); }
  .v4-steps { grid-template-columns: 1fr; }
  .v4-steps li { border-right: 0; }
  .v4-bento { grid-template-columns: 1fr; padding: 24px; }
  .v4-bento-cell.tall, .v4-bento-cell.wide { grid-row: auto; grid-column: auto; min-height: 220px; }
  .v4-hscroll { height: auto; }
  .v4-hscroll-sticky { position: relative; height: auto; overflow: visible; }
  .v4-hscroll-track { flex-direction: column; padding: 40px 20px; transform: none !important; }
  .v4-card { flex: none; width: 100%; height: auto; min-height: 320px; }
  .v4-invert { padding: 64px 20px; }
  .v4-foot { flex-direction: column; gap: 12px; text-align: center; padding: 20px; }
  .v4-bottombar { width: calc(100% - 32px); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .v4-ticker-track { animation: none; }
  .v4-scrollcue span, .v4-pill-dot { animation: none; }
  .v4-wordmark span { transform: none; opacity: 1; transition: none; }
}

#screen-auth {
  display: grid; grid-template-columns: minmax(380px, 1.05fr) minmax(420px, 1fr);
  overflow: hidden; background: #000;
}
.auth-brand-side {
  background: #000; color: #fff; position: relative; overflow: hidden;
  padding: 36px 48px 0; display: flex; flex-direction: column; min-height: 100%;
}
.auth-frame {
  pointer-events: none; position: absolute; inset: 18px;
  border: 1px solid rgba(255,255,255,.14);
}
.auth-frame::before, .auth-frame::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 1px solid rgba(255,255,255,.55);
}
.auth-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.auth-frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.auth-brand-top {
  position: relative; z-index: 2;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
}
.auth-brand-side .land-brand { font-size: 28px; letter-spacing: .12em; }
.auth-live {
  font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 11px; letter-spacing: .04em; color: rgba(255,255,255,.55);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.auth-live b { color: #fff; font-weight: 500; }
.auth-live .dot { opacity: .45; }
.auth-quote-block {
  position: relative; z-index: 2;
  margin: clamp(48px, 12vh, 110px) 0 auto;
  max-width: 16ch;
}
.auth-quote {
  font-family: var(--font-d); font-size: clamp(32px, 4.2vw, 54px); font-weight: 400;
  line-height: 1.18; margin: 0; letter-spacing: -0.01em;
}
.auth-caption {
  margin: 18px 0 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.42); max-width: 28ch;
}
.auth-globe-wrap {
  position: absolute; left: -18%; bottom: -28%;
  width: min(92%, 720px); aspect-ratio: 1; z-index: 1;
  pointer-events: none; opacity: .92;
}
.auth-globe-wrap svg { width: 100%; height: 100%; display: block; }
#auth-globe .globe-disk { fill: #050505; }
#auth-globe-grat path {
  fill: none; stroke: rgba(255,255,255,.18); stroke-width: 0.45;
}
#auth-globe-land path {
  fill: url(#globe-stipple); stroke: none;
}
#auth-globe-coast path {
  fill: none; stroke: rgba(255,255,255,.78); stroke-width: 0.7; stroke-linejoin: round;
}
.auth-form-side {
  background: var(--paper); color: #000; position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 48px 48px; overflow: auto;
}
.auth-form-inner {
  width: 100%; max-width: 420px; margin: 0 auto;
}
.auth-tabs {
  display: flex; gap: 32px; margin-bottom: 32px;
  border-bottom: 1px solid rgba(0,0,0,.14);
}
.auth-tabs .auth-tab, .auth-tabs .pill, .auth-tabs button {
  background: none; border: 0; border-radius: 0; min-width: 0; height: auto;
  padding: 0 0 14px; font-size: 15px; font-weight: 500; color: rgba(0,0,0,.38);
  letter-spacing: 0; text-transform: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer;
}
.auth-tabs .auth-tab.active, .auth-tabs .pill.active, .auth-tabs button.active {
  color: #000; border-bottom-color: #000; background: none;
}
.auth-greet {
  font-family: var(--font-d); font-size: clamp(30px, 3.2vw, 40px); font-weight: 400;
  margin: 0 0 16px; line-height: 1.15; letter-spacing: -0.01em;
}
.auth-rule { height: 1px; background: rgba(0,0,0,.18); margin: 0 0 30px; border: 0; width: 48px; }
.auth-form .field { margin-bottom: 18px; }
.auth-form .field label { color: #111; margin-bottom: 8px; display: block; }
.auth-form-side .input-ic {
  border: 1px solid #000; background: #fff; height: 48px; transition: border-width .12s ease, padding .12s ease;
  padding: 0 12px;
}
.auth-form-side .input-ic:focus-within {
  outline: none; border-width: 2px; padding: 0 11px;
}
.auth-form-side .input-ic input { font-size: 14px; font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace); }
.pw-toggle {
  border: 0; background: transparent; padding: 6px; cursor: pointer; color: #000; opacity: .45;
  display: inline-flex; align-items: center; justify-content: center;
}
.pw-toggle:hover { opacity: .9; }
.pw-toggle svg { width: 16px; height: 16px; }
.field-help { display: block; margin-top: 7px; font-size: 12px; color: #666; }
.pw-meter {
  margin-top: 8px; height: 2px; background: rgba(0,0,0,.12); overflow: hidden;
}
.pw-meter span {
  display: block; height: 100%; width: 0%; background: #000; transition: width .2s ease;
}
.auth-check {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 22px;
  font-size: 13px; color: #333; cursor: pointer; user-select: none;
}
.auth-check input { width: 14px; height: 14px; accent-color: #000; }
.auth-err {
  color: #000; background: transparent; border: 1px solid #000;
  padding: 10px 12px; font-size: 13px; margin: 0 0 14px; line-height: 1.4;
}
.auth-submit {
  height: 50px; letter-spacing: .12em; font-size: 13px; font-weight: 600;
}
.auth-submit.loading { opacity: .7; pointer-events: none; }
.auth-submit .btn-loading { font-family: var(--font); letter-spacing: .04em; text-transform: none; font-weight: 500; }
.auth-switch { margin-top: 20px; font-size: 13px; color: #555; text-align: center; }
.auth-switch button {
  text-decoration: underline; font-weight: 600; color: #000; padding: 0;
  background: none; border: 0; cursor: pointer; font: inherit;
}
.auth-foot {
  margin-top: 36px; text-align: center; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(0,0,0,.35);
}
.auth-back {
  position: absolute; top: 24px; right: 24px; z-index: 3;
  font-size: 12px; letter-spacing: .06em;
  color: #000; border: 1px solid #000; padding: 8px 12px; background: transparent; cursor: pointer;
}
.auth-back:hover { background: #000; color: #fff; }
@media (max-width: 1100px) {
  #screen-auth { grid-template-columns: 0.95fr 1.05fr; }
  .auth-quote { font-size: clamp(28px, 3.6vw, 42px); }
}
@media (max-width: 860px) {
  #screen-auth { grid-template-columns: 1fr; }
  .auth-brand-side { display: none; }
  .auth-form-side { padding: 72px 24px 40px; min-height: 100%; align-items: flex-start; }
  .auth-form-inner { max-width: 420px; }
}

/* ════════════════ MAIN (logged-in home) ════════════════ */
/* ════════════════ MAIN DASH V2 ════════════════ */
#screen-main.dash-v2 {
  background: #000; color: #fff;
  font-family: var(--font-g);
  overflow: hidden;
}
#screen-main.dash-v2 .menu-globe {
  position: absolute; left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 0; opacity: .9;
}
#screen-main.dash-v2 .menu-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 20%, rgba(0,0,0,.72) 70%, #000 100%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 18%, transparent 75%, rgba(0,0,0,.85) 100%);
}
#screen-main.dash-v2 > *:not(.menu-globe):not(.menu-vignette) { position: relative; z-index: 2; }

.dash-top {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px; pointer-events: none;
}
.dash-top > * { pointer-events: auto; }
.dash-brand {
  font-family: var(--font-xb); font-size: 14px; letter-spacing: .2em;
  margin-right: auto;
}
.dash-sep { width: 1px; height: 12px; background: rgba(255,255,255,.25); }
.profile-wrap { margin-left: auto; position: relative; }
.profile-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px); transition: border-color .2s, transform .2s;
}
.profile-pill:hover { border-color: #fff; }
.profile-pill .chev { opacity: .6; transition: transform .2s; }
.profile-pill[aria-expanded="true"] .chev { transform: rotate(180deg); }
.profile-drop {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 200px; padding: 8px;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(8,8,8,.95); backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  z-index: 20;
}
.profile-drop .drop-meta {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 10px 12px; font-size: 11px; color: rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 6px;
}
.profile-drop .drop-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 10px; font-size: 13px; letter-spacing: .04em;
  text-align: left; transition: background .15s;
}
.profile-drop .drop-item:hover { background: rgba(255,255,255,.08); }
.profile-drop .drop-item.danger:hover { background: rgba(255,255,255,.12); }

.dash-v2 .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #fff; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--mono); background: #111; color: #fff;
}
.dash-v2 .who-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.dash-v2 .who-txt b { font-size: 13px; font-family: var(--font-g); font-weight: 600; }
.dash-v2 .who-txt span { font-size: 10px; color: rgba(255,255,255,.5); font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.dash-body {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 28px; padding: 12px 40px 24px; max-width: 1280px; margin: 0 auto;
  height: calc(100vh - 120px); align-items: center;
}
.dash-hero { max-width: 640px; }
.dash-greet {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  color: rgba(255,255,255,.55); text-transform: uppercase; margin: 0 0 10px;
}
.dash-greet b { color: #fff; font-weight: 600; }
.lvl-box { margin-top: 8px; }
.lvl-box.hidden { display: none; }
.lvl-top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: rgba(255,255,255,.62); }
.lvl-top b { color: #fff; font-weight: 600; }
.lvl-bar { margin-top: 6px; height: 4px; background: rgba(255,255,255,.16); }
.lvl-bar i { display: block; height: 100%; width: 0; background: #fff; }
.dash-lvl { max-width: 280px; margin: 0 0 14px; }
.profile-drop .lvl-box { padding: 0 12px 10px; margin-top: 0; }
.lvl-rank { margin-top: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.rank-screen {
  position: fixed; inset: 0; z-index: 90; background: #000; color: #fff;
  display: grid; place-items: center;
}
.rank-screen.hidden { display: none; }
.rs-card { width: min(560px, 92vw); text-align: center; }
.rs-kicker { margin: 0; letter-spacing: .28em; font-size: 12px; color: rgba(255,255,255,.45); font-family: var(--mono); }
#rs-result { font-size: clamp(52px, 10vw, 84px); letter-spacing: .12em; margin: 6px 0 18px; line-height: .9; }
#rs-result.lose { color: rgba(255,255,255,.55); }
.rs-hex {
  width: 128px; height: 144px; margin: 0 auto 14px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  display: grid; place-items: center;
  background: #161616; color: #fff;
  font-size: 32px; letter-spacing: .06em;
}
.rs-hex.t-demir { background: #3a3f46; }
.rs-hex.t-bronz { background: #8a4b22; }
.rs-hex.t-gumus { background: #8b95a1; color: #111; }
.rs-hex.t-altin { background: #c9a227; color: #111; }
.rs-hex.t-zumrut { background: #0f766e; }
.rs-hex.t-elmas { background: #0369a1; }
.rs-hex.t-fetih { background: #f4f1ea; color: #111; }
.rs-hex.t-padisah { background: #7f1d1d; }
.rs-rank { margin: 0; font-size: 22px; letter-spacing: .16em; text-transform: uppercase; }
.rs-delta { margin: 8px 0 18px; font-family: var(--mono); letter-spacing: .14em; }
.rs-delta.up { color: #d9f99d; }
.rs-delta.down { color: #fca5a5; }
.rs-xp { text-align: left; }
.rs-xp-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.7); }
.rs-bar { height: 8px; background: #1c1c1c; margin-top: 8px; }
.rs-bar i { display: block; height: 100%; width: 0; background: #fff; }
.rs-note { min-height: 1.2em; color: rgba(255,255,255,.55); font-size: 13px; }
.rs-board { margin-top: 18px; text-align: left; border-top: 1px solid rgba(255,255,255,.14); }
.rs-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.rs-row b { font-weight: 600; letter-spacing: .04em; }
.rs-row span, .rs-row em { font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: .08em; color: rgba(255,255,255,.5); }
.rs-row.me b { color: #fff; }
.rs-row.win span { color: #d9f99d; }
#rs-go { margin-top: 18px; min-width: 180px; background: #fff; color: #000; border: 0; }
.queue-card { position: relative; color: #111; }
.queue-card .rs-kicker { color: rgba(0,0,0,.45); }
.queue-time { font-size: 42px; letter-spacing: .08em; margin: 8px 0; color: #111; }
.modal.settings-modal { background: rgba(0,0,0,.45); z-index: 80; align-items: center; }
.settings-panel {
  width: min(760px, 94vw); background: #0c0c0c; color: #fff;
  border: 1px solid rgba(255,255,255,.22); border-radius: 22px; overflow: hidden;
}
.set-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 22px 0; }
.set-kicker { margin: 0; font-family: var(--mono); letter-spacing: .22em; font-size: 11px; color: rgba(255,255,255,.45); }
.set-head h2 { margin: 4px 0 0; font-family: var(--font-xb); font-size: 32px; font-weight: 400; letter-spacing: .04em; }
.set-x { color: #fff; border-color: rgba(255,255,255,.3); }
.set-body { display: grid; grid-template-columns: 180px 1fr; min-height: 320px; margin-top: 18px; }
.set-tabs { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 22px; border-right: 1px solid rgba(255,255,255,.12); }
.set-tabs button {
  text-align: left; padding: 12px 14px; border-radius: 12px; color: rgba(255,255,255,.62);
  background: transparent; border: 0; font-size: 14px; letter-spacing: .04em;
}
.set-tabs button.active { background: #fff; color: #000; }
.set-pane { padding: 8px 26px 26px; }
.set-pane.hidden { display: none; }
.set-lead { margin: 0 0 8px; color: rgba(255,255,255,.5); font-size: 13px; }
.settings-panel .set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); }
.settings-panel .set-row b { display: block; font-size: 15px; font-weight: 600; }
.settings-panel .set-row span { display: block; margin-top: 3px; font-size: 12px; color: rgba(255,255,255,.5); font-weight: 400; }
.settings-panel .set-sw { width: 46px; height: 28px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: #1a1a1a; position: relative; flex: none; padding: 0; }
.settings-panel .set-sw .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.settings-panel .set-sw[aria-pressed="true"] { background: #fff; border-color: #fff; }
.settings-panel .set-sw[aria-pressed="true"] .knob { background: #000; transform: translateX(18px); }
.set-account b { display: block; font-size: 28px; font-family: var(--font-xb); font-weight: 400; }
.set-account span { color: rgba(255,255,255,.55); letter-spacing: .08em; font-family: var(--mono); font-size: 12px; }
.set-copy, .set-out {
  border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff;
  border-radius: 999px; padding: 8px 14px; font-size: 12px; letter-spacing: .06em;
}
.set-out { margin-top: 18px; background: #fff; color: #000; border-color: #fff; }
html.pref-still *, html.pref-still *::before, html.pref-still *::after { animation: none !important; transition: none !important; }
@media (max-width: 720px) {
  .set-body { grid-template-columns: 1fr; }
  .set-tabs { flex-direction: row; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
}
.friend-open {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
  background: transparent; color: #fff; display: grid; place-items: center; position: relative;
}
.friend-open:hover { border-color: #fff; }
.friend-badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #fff; color: #000; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}
.friend-badge.hidden { display: none; }
.modal.friends-modal { background: rgba(0,0,0,.45); z-index: 80; }
.set-tabs em { font-style: normal; margin-left: 6px; }
.f-list { display: flex; flex-direction: column; max-height: 340px; overflow: auto; }
.f-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.1); }
.f-row b { display: block; font-size: 15px; }
.f-row span { display: block; margin-top: 2px; font-size: 12px; color: rgba(255,255,255,.5); }
.f-dot { width: 8px; height: 8px; border-radius: 50%; background: #3a3a3a; }
.f-dot.on { background: #d9f99d; }
.f-acts { display: flex; gap: 6px; }
.f-empty { padding: 28px 0; color: rgba(255,255,255,.45); font-size: 13px; }
.set-hist { margin-top: 22px; }
.set-hist > b { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.msg .is-friend { font-weight: 700; }
.f-add { display: flex; gap: 8px; margin-top: 8px; }
.f-add input {
  flex: 1; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px; padding: 12px 14px; outline: 0;
}
.f-add input:focus { border-color: #fff; }
.dash-wordmark {
  font-family: var(--font-xb); font-weight: 400; line-height: .9;
  font-size: clamp(64px, 12vw, 140px); letter-spacing: -.02em;
  margin: 0 0 12px; display: flex; gap: .02em;
}
.dash-wordmark span {
  display: inline-block; opacity: 0; transform: translateY(28px);
  transition: opacity .55s cubic-bezier(.2,.8,.2,1), transform .55s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--d, 0ms);
}
.dash-wordmark.is-in span { opacity: 1; transform: none; }
.dash-tag {
  margin: 0 0 28px; font-size: 11px; letter-spacing: .16em;
  color: rgba(255,255,255,.45);
}
.dash-cta-row { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; max-width: 420px; }
.dash-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 18px 22px; border-radius: 18px; text-align: left;
  border: 1px solid rgba(255,255,255,.28); transition: border-color .2s, background .2s, transform .15s;
  will-change: transform;
}
.dash-btn-primary { background: #fff; color: #000; border-color: #fff; }
.dash-btn-primary:hover { background: #e8e8e8; }
.dash-btn-ghost { background: rgba(0,0,0,.45); backdrop-filter: blur(8px); }
.dash-btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.dash-btn-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; opacity: .55; }
.dash-btn-title { font-family: var(--font-xb); font-size: 18px; letter-spacing: .04em; }
.dash-btn-sub { font-size: 12px; opacity: .55; font-family: var(--font-g); letter-spacing: 0; text-transform: none; font-weight: 400; }
.dash-btn-primary .dash-btn-sub { opacity: .55; color: #000; }

.dash-v2 .code-chip, .dash-code {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,.28); padding: 10px 14px;
  border-radius: 999px; font-size: 12px; background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
}
.dash-v2 .code-chip .lbl { color: rgba(255,255,255,.5); letter-spacing: .1em; font-size: 10px; font-family: var(--mono); }
.dash-v2 .code-chip .hash { opacity: .5; }

.dash-side { display: flex; flex-direction: column; gap: 14px; max-height: 100%; }
.dash-card {
  border: 1px solid rgba(255,255,255,.22); border-radius: 22px;
  padding: 20px; background: rgba(0,0,0,.55); backdrop-filter: blur(14px);
}
.dash-card-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px;
}
.dash-card-head h2 {
  font-family: var(--font-xb); font-size: 18px; letter-spacing: .04em; margin: 0; font-weight: 400;
}
.dash-card-head .kicker { font-size: 10px; color: rgba(255,255,255,.4); letter-spacing: .14em; }
.dash-card-head .icon-btn { margin-left: auto; }
.dash-card-sub { margin: 0 0 14px; font-size: 12px; color: rgba(255,255,255,.5); }
.dash-join-row { display: flex; gap: 8px; }
.dash-input {
  flex: 1; border: 1px solid rgba(255,255,255,.3); background: transparent;
  color: #fff; padding: 12px 14px; border-radius: 12px; font-size: 16px; letter-spacing: .2em;
  outline: 0; text-align: center;
}
.dash-input:focus { border-color: #fff; }
.dash-input::placeholder { color: rgba(255,255,255,.25); letter-spacing: .2em; }
.dash-card .btn-primary {
  border-radius: 12px; padding: 12px 18px; background: #fff; color: #000; border-color: #fff;
  font-family: var(--font-g); font-weight: 600;
}
.dash-card .btn-primary:hover { background: transparent; color: #fff; }
.dash-room-list { max-height: 280px; overflow: auto; gap: 8px; }
.dash-v2 .room-row {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(255,255,255,.03);
}
.dash-v2 .room-row .ri b { color: #fff; font-size: 13px; font-family: var(--font-g); }
.dash-v2 .room-row .ri span { color: rgba(255,255,255,.5); font-size: 11px; }
.dash-v2 .room-row .tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: .08em;
  padding: 4px 8px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #fff;
}
.dash-v2 .room-row .btn { border-radius: 999px; padding: 8px 14px; font-size: 10px; }
.dash-v2 .emblem {
  width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.dash-v2 .empty {
  padding: 20px; text-align: center; color: rgba(255,255,255,.4);
  border: 1px dashed rgba(255,255,255,.2); border-radius: 14px; font-size: 12px;
}
.dash-v2 .pill-paused {
  font-family: var(--mono); font-size: 9px; border: 1px solid rgba(255,255,255,.35);
  padding: 2px 6px; margin-left: 6px; border-radius: 999px; color: rgba(255,255,255,.7);
}
.dash-link {
  margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  color: rgba(255,255,255,.55); text-transform: uppercase;
}
.dash-link:hover { color: #fff; }
.dash-foot {
  display: flex; justify-content: space-between; padding: 14px 28px;
  font-size: 11px; letter-spacing: .1em; color: rgba(255,255,255,.35); font-family: var(--mono);
}

[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.2,.8,.2,1), transform .55s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .dash-body { grid-template-columns: 1fr; height: auto; padding: 12px 20px 40px; align-items: start; }
  .dash-wordmark { font-size: clamp(56px, 18vw, 96px); }
  #screen-main.dash-v2 { overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .dash-wordmark span, [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .mag { transform: none !important; }
}

/* legacy main bits kept for non-dash */
.main-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 40px; }
.brand-name { font-family: var(--font-xb); font-size: 22px; letter-spacing: .08em; }
.brand-tag { font-size: 10px; letter-spacing: .16em; color: rgba(255,255,255,.5); }
.profile-bar { display: flex; align-items: center; gap: 10px; }
.shield-lbl { font-family: var(--mono); font-size: 10px; }
.metal-title { font-family: var(--font-xb); font-size: 64px; font-weight: 400; letter-spacing: .02em; margin: 0; color: #fff; }
.btn-play {
  width: 100%; padding: 18px; font-size: 14px; letter-spacing: .2em;
  background: #fff; color: #000; border: 1px solid #fff; margin-bottom: 12px; border-radius: 14px;
}
.btn-play:hover { background: transparent; color: #fff; }
.live-pill, .live, .live-inline { display: inline-block; width: 6px; height: 6px; background: #fff; margin-right: 6px; vertical-align: middle; border-radius: 50%; }

/* ════════════════ PLAY V2 ════════════════ */
#screen-play.play-v2 { background: #000; font-family: var(--font-g); }
.play-v2 .room-nav {
  display: flex; align-items: center; gap: 16px; padding: 16px 24px;
  border-bottom: 0;
}
.play-v2 .tabs {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.4);
}
.play-v2 .tab {
  padding: 10px 16px; border: 0; border-radius: 999px;
  font-size: 11px; letter-spacing: .1em; color: rgba(255,255,255,.5); font-weight: 600;
  font-family: var(--mono);
}
.play-v2 .tab.active { background: #fff; color: #000; }
.play-v2 .tab:hover { color: #fff; }
.play-v2 .tab.active:hover { color: #000; }
.play-v2 .btn-ghost {
  border-radius: 999px; border: 1px solid rgba(255,255,255,.25); padding: 10px 16px;
}
.play-v2 .room-layout {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px;
  padding: 24px; max-width: 1120px; margin: 0 auto;
}
.play-v2 .room-card, .play-v2 .perks {
  background: rgba(255,255,255,.97); color: #000; border: 1px solid #fff;
  border-radius: 24px; padding: 28px;
}
.play-v2 .room-card .input-ic { border-color: #000; background: #fff; border-radius: 12px; }
.play-v2 .room-card .field label { color: #333; }
.play-v2 .card-title {
  font-family: var(--font-xb); font-size: 28px; font-weight: 400; margin: 0 0 6px; color: #000; letter-spacing: .02em;
}
.play-v2 .card-sub { color: #666; margin: 0 0 22px; font-size: 13px; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.play-v2 .perks h3 { font-family: var(--font-xb); font-size: 20px; font-weight: 400; margin: 0 0 20px; }
.perk { display: flex; gap: 14px; margin-bottom: 18px; }
.perk-ic {
  width: 40px; height: 40px; border: 1px solid #000; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: transparent !important; color: #000 !important;
}
.perk b { display: block; font-size: 13px; margin-bottom: 2px; }
.perk span { font-size: 12px; color: #555; }
.skyline { display: none; }
.room-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.play-v2 .room-row {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border: 1px solid rgba(0,0,0,.15); background: #fff; border-radius: 14px;
}
.room-row .ri { flex: 1; min-width: 0; }
.room-row .ri b { display: block; font-size: 13px; }
.room-row .ri span { font-size: 11px; color: #666; }
.play-v2 .room-row .tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; padding: 4px 8px;
  border: 1px solid #000; border-radius: 999px;
}
.room-row .cnt { font-family: var(--mono); font-size: 12px; }
.play-v2 .emblem {
  width: 32px; height: 32px; border: 1px solid #000; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.emblem.sm { width: 28px; height: 28px; }
.pill-paused { font-family: var(--mono); font-size: 9px; border: 1px solid #000; padding: 2px 6px; margin-left: 6px; border-radius: 999px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.play-v2 .empty { padding: 24px; text-align: center; color: #666; border: 1px dashed rgba(0,0,0,.25); border-radius: 14px; }
.play-v2 .btn-primary {
  border-radius: 14px; background: #000; color: #fff; border-color: #000;
}
.play-v2 .btn-primary:hover:not(:disabled) { background: transparent; color: #000; }
.play-v2 .pills .pill { border-radius: 999px; }
.nav-spacer { flex: 1; }
@media (max-width: 860px) {
  .play-v2 .room-layout { grid-template-columns: 1fr; padding: 16px; }
  .play-v2 .perks { display: none; }
  .play-v2 .room-nav { flex-wrap: wrap; }
}

/* ════════════════ LOBBY V3 ════════════════ */
#screen-lobby.lobby-v3,
#screen-semt.lobby-v3 {
  background: #000; color: #fff;
  display: flex; flex-direction: column;
  height: 100%; max-height: 100dvh; overflow: hidden !important;
  font-family: var(--font-g);
}
.lobby-v3 .lobby-top {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  min-height: 52px;
}
.lobby-v3 .code-chip,
.lobby-v3 .status-pill,
.lobby-v3 .host-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.28);
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; background: rgba(255,255,255,.04);
  white-space: nowrap;
}
.lobby-v3 .code-chip .lbl {
  color: rgba(255,255,255,.45); letter-spacing: .12em;
  font-size: 10px; font-family: var(--mono);
}
.lobby-v3 .code-chip .mono {
  font-family: var(--mono); font-weight: 600; letter-spacing: .08em; font-size: 13px;
}
.lobby-v3 .status-pill .live {
  width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.15);
}
.lobby-v3 .host-pill { color: rgba(255,255,255,.75); }
.lobby-v3 .host-pill b { color: #fff; font-weight: 600; }
.lobby-v3 .pw-chip {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.25); padding: 2px 7px; border-radius: 999px;
  color: rgba(255,255,255,.7); font-family: var(--mono);
}
.lobby-v3 .pw-chip.on { border-color: #fff; color: #fff; }
.gold-ic { color: #fff !important; width: 14px; height: 14px; }
.lobby-v3 .top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.lobby-v3 .icon-btn {
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.lobby-v3 .icon-btn.sm { width: 28px; height: 28px; }
.lobby-v3 .icon-btn:hover { background: rgba(255,255,255,.08); }
.lobby-v3 .icon-btn.danger:hover { border-color: #fff; }
.lobby-v3 .icon-btn svg { width: 15px; height: 15px; }

.lobby-gear-wrap { position: relative; }
.lobby-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  width: 280px; padding: 12px;
  background: #0a0a0a; color: #fff;
  border: 1px solid rgba(255,255,255,.35); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
}
.lobby-pop-h {
  font-size: 11px; letter-spacing: .14em; font-family: var(--mono);
  margin-bottom: 10px; color: rgba(255,255,255,.55);
}
.lobby-pop-pw .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.lobby-pop-pw .field > span { font-size: 11px; color: rgba(255,255,255,.55); }
.lobby-pop-pw .input-ic {
  display: flex; align-items: center; border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px; overflow: hidden; background: #111;
}
.lobby-pop-pw .input-ic input {
  flex: 1; border: 0; background: transparent; color: #fff;
  padding: 8px 10px; outline: 0; font-size: 13px;
}
.lobby-pop-pw .pw-toggle {
  border: 0; background: transparent; color: #fff; padding: 0 10px; cursor: pointer;
}
.lobby-pop-row { display: flex; gap: 8px; margin-bottom: 10px; }
.lobby-pop #btn-delete-room { width: 100%; border-radius: 8px; justify-content: center; }

.lobby-v3 .lobby-body {
  flex: 1; min-height: 0; overflow: hidden;
  display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px;
  gap: 10px; padding: 10px 12px;
}
.lobby-v3 .lobby-col,
.lobby-v3 .preview-map,
.lobby-v3 .empire-card,
.lobby-v3 .lobby-bottom {
  background: #f2efe8; color: #000;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 10px;
}
.lobby-v3 .lobby-col {
  padding: 12px; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.lobby-v3 .col-title {
  font-size: 10px; letter-spacing: .14em; font-weight: 700; margin: 0 0 10px;
  display: flex; align-items: center; gap: 6px; color: #000; font-family: var(--mono);
  flex: 0 0 auto;
}
.lobby-v3 .col-title svg { width: 14px; height: 14px; }
.lobby-v3 .player-cards {
  overflow: auto; flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.lobby-v3 .pcard {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,.14); background: #fff; border-radius: 8px;
  min-height: 48px;
}
.lobby-v3 .pcard.me { border-color: #000; }
.lobby-v3 .pcard.slot {
  justify-content: center; gap: 8px; min-height: 36px;
  color: #666; font-size: 12px; background: transparent; border-style: dashed;
}
.lobby-v3 .pcard .avatar {
  position: relative; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid #000; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; font-family: var(--mono); line-height: 1;
}
.lobby-v3 .pcard .avatar .crown {
  position: absolute; top: -6px; right: -6px;
  width: 16px; height: 16px; margin: 0;
  border-radius: 50%; background: #000; color: #fff;
  border: 1px solid #fff;
  display: grid; place-items: center;
}
.lobby-v3 .pcard .avatar .crown svg { width: 9px; height: 9px; stroke: #fff; }
.lobby-v3 .pcard .pinfo { flex: 1; min-width: 0; }
.lobby-v3 .pcard .pname {
  font-weight: 600; font-size: 13px; line-height: 1.2;
  display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lobby-v3 .pcard .pname .muted { color: #888; font-weight: 500; font-size: 11px; }
.lobby-v3 .pcard .psub {
  font-size: 11px; color: #666; display: flex; align-items: center; gap: 6px;
  margin-top: 2px; white-space: nowrap; overflow: hidden;
}
.lobby-v3 .mini-flag { display: inline-flex; width: 18px; height: 12px; flex: 0 0 auto; border: 1px solid #000; }
.lobby-v3 .mini-flag svg { width: 100%; height: 100%; display: block; }
.lobby-v3 .badge-st {
  flex: 0 0 auto; margin-left: auto;
  font-size: 9px; letter-spacing: .08em; font-family: var(--mono);
  border: 1px solid #000; padding: 3px 6px; border-radius: 999px; white-space: nowrap;
}
.lobby-v3 .badge-st.ready { background: #000; color: #fff; }
.lobby-v3 .badge-st.wait { background: #fff; color: #000; }
.lobby-v3 .badge-st.off { opacity: .55; }

.lobby-v3 .lobby-center {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 0; min-width: 0; overflow: hidden;
}
.lobby-v3 .preview-map {
  flex: 1 1 auto; min-height: 0;
  padding: 8px; display: flex; flex-direction: column; gap: 6px;
  overflow: hidden;
}
.lobby-v3 .preview-map .map-frame {
  flex: 1 1 auto; min-height: 0; position: relative;
  background: #000; border-radius: 8px; overflow: hidden;
}
.lobby-v3 .preview-map svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; background: #000;
}
.lobby-v3 .map-note {
  flex: 0 0 auto; margin: 0;
  font-size: 11px; color: #555; line-height: 1.35;
  display: flex; align-items: flex-start; gap: 6px;
}
.lobby-v3 .map-note svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; }

.lobby-v3 .empire-card {
  flex: 0 0 auto; padding: 8px 12px 10px;
  max-height: none; overflow: visible;
}
.lobby-v3 .fd-grid {
  display: grid; grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px; align-items: start;
}
.lobby-v3 .empire-card .col-title { margin-bottom: 8px; }
.lobby-v3 .flag-preview {
  width: 108px; max-width: 108px; height: 72px; max-height: 72px;
  border: 1px solid #000; background: #111; border-radius: 6px;
  overflow: hidden; flex: 0 0 auto;
}
.lobby-v3 .flag-preview svg {
  width: 100% !important; height: 100% !important;
  display: block; max-width: 108px; max-height: 72px;
}
.lobby-v3 .fd-fields { min-width: 0; }
.lobby-v3 .fd-fields .field { margin-bottom: 4px; }
.lobby-v3 .fd-fields .field label {
  display: block; font-size: 10px; letter-spacing: .06em;
  color: #555; margin-bottom: 3px; font-family: var(--mono);
}
.lobby-v3 .fd-fields .input-ic {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid #000; border-radius: 6px; background: #fff; padding: 0 8px;
}
.lobby-v3 .fd-fields .input-ic svg { width: 14px; height: 14px; opacity: .6; }
.lobby-v3 .fd-fields .input-ic input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 7px 0; font-size: 13px; color: #000; min-width: 0;
}
.lobby-v3 .fd-row { display: flex; gap: 8px; align-items: end; }
.lobby-v3 .fd-row .field { margin: 0; }
.lobby-v3 .fd-row .field.grow { flex: 1; min-width: 0; }
.lobby-v3 .color-in {
  width: 44px; height: 28px; border: 1px solid #000; padding: 2px;
  background: #fff; border-radius: 6px; cursor: pointer;
}
.lobby-v3 .pills { display: flex; gap: 4px; flex-wrap: wrap; }
.lobby-v3 .pattern-btn {
  width: 28px; min-width: 28px; height: 28px; padding: 0;
  border: 1px solid #000; border-radius: 5px; cursor: pointer;
  background-size: cover !important;
}
.lobby-v3 .pattern-btn.active { outline: 2px solid #000; outline-offset: 1px; }
.lobby-v3 .swatches { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.lobby-v3 .sw {
  width: 18px; height: 18px; border: 1px solid #000; padding: 0;
  border-radius: 4px; cursor: pointer;
}
.lobby-v3 .sw.active { outline: 2px solid #000; outline-offset: 1px; }
.lobby-v3 #btn-apply-flag { border-radius: 6px; height: 30px; padding: 0 10px; font-size: 12px; }

.lobby-v3 .chat-col .chat-log {
  flex: 1; min-height: 0; overflow: auto;
  border: 1px solid rgba(0,0,0,.14); background: #fff;
  padding: 8px; margin-bottom: 8px; border-radius: 8px;
  font-size: 12px;
}
.lobby-v3 .chat-msg { margin-bottom: 8px; }
.lobby-v3 .chat-msg .meta {
  display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 2px;
}
.lobby-v3 .chat-msg .meta time { color: #888; font-family: var(--mono); }
.lobby-v3 .chat-form {
  flex: 0 0 auto; display: flex; gap: 0;
  border: 1px solid #000; border-radius: 8px; overflow: hidden;
}
.lobby-v3 .chat-form input {
  flex: 1; border: 0; padding: 9px 10px; outline: 0; background: #fff; color: #000; min-width: 0;
}
.lobby-v3 .send-btn {
  width: 38px; border: 0; border-left: 1px solid #000;
  background: #000; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lobby-v3 .send-btn svg { width: 14px; height: 14px; }
.lobby-v3 .send-btn.cooling { position: relative; }
.lobby-v3 .send-btn.cooling svg { visibility: hidden; }
.lobby-v3 .send-btn.cooling::after {
  content: attr(data-wait);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.lobby-v3 .lobby-bottom {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 14px; margin: 0 12px 10px;
}
.lobby-v3 .toggle {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 12px; letter-spacing: .1em;
}
.lobby-v3 .toggle input { display: none; }
.lobby-v3 .track {
  width: 40px; height: 22px; border: 1px solid #000; position: relative;
  background: #fff; border-radius: 999px;
}
.lobby-v3 .knob {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  background: #000; transition: left .15s ease; border-radius: 50%;
}
.lobby-v3 .toggle input:checked + .track .knob { left: 20px; }
.lobby-v3 .created {
  font-size: 12px; color: #555; display: flex; align-items: center; gap: 6px;
}
.lobby-v3 .created svg { width: 13px; height: 13px; }
.lobby-v3 .start-wrap { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lobby-v3 .hint { font-size: 12px; color: #666; }
.lobby-v3 .btn-violet {
  border-radius: 8px; background: #000; color: #fff; border: 1px solid #000;
  font-family: var(--font-xb); letter-spacing: .06em;
  height: 40px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px;
}
.lobby-v3 .btn-violet:hover:not(:disabled) { background: transparent; color: #000; }
.lobby-v3 .btn-violet:disabled { opacity: .4; cursor: not-allowed; }
.lobby-v3 .btn-outline { border-radius: 8px; }

.howto-v2 .modal-card { border-radius: 16px; max-width: 520px; }
.howto-v2 .card-title { font-family: var(--font-xb); letter-spacing: .02em; }

@media (max-width: 1280px) {
  .lobby-v3 .lobby-body { grid-template-columns: 220px minmax(0, 1fr) 230px; }
}
@media (max-width: 1100px) {
  .lobby-v3 .lobby-body { grid-template-columns: 200px minmax(0, 1fr) 210px; gap: 8px; }
  .lobby-v3 .host-pill span:first-of-type { display: none; }
}

/* ════════════════ GAME ════════════════ */
#screen-game { background: #000; overflow: hidden; }
#map-wrap { position: absolute; inset: 0; background: #000; }
#map { width: 100%; height: 100%; display: block; background: #000; }
#ocean { fill: #000 !important; }
#graticule path { stroke: rgba(255,255,255,.06) !important; fill: none; }
#cells path {
  fill: var(--land-empty);
  stroke: rgba(220,230,240,.42);
  stroke-width: 0.7;
  stroke-linejoin: round; cursor: pointer; transition: none;
}
#cells path.empty, #cells path.neutral {
  fill: var(--land-empty);
  stroke: rgba(220,230,240,.42);
  stroke-width: 0.7px;
}
#cells path.mine {
  /* outer emphasis via filter; keep dark stroke from JS for internal province edges */
  filter: drop-shadow(0 0 1.5px rgba(255,255,255,.55));
  animation: none;
}
@keyframes minePulse {
  0%, 100% { stroke-opacity: 1; filter: drop-shadow(0 0 2px rgba(255,255,255,.7)); }
  50% { stroke-opacity: .7; filter: drop-shadow(0 0 6px rgba(255,255,255,1)); }
}
#labels text.emp-label {
  font-size: calc(8px * var(--k, 1)); font-weight: 700; letter-spacing: .02em;
  fill: #fff; stroke: #000; stroke-width: 3px;
}
#labels text.emp-label.mine-label { fill: #fff; stroke: #111; }
#coast-glow { display: none; }
#labels text {
  fill: #fff; font-family: var(--mono); font-size: 7px; pointer-events: none;
  paint-order: stroke; stroke: #000; stroke-width: 2.5px;
}
#labels text.troop { font-size: 8px; font-weight: 600; }
#labels text.cap { font-weight: 700; }
.sel-ring { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 4 3; pointer-events: none; }
.sel-ring.target { stroke: #fff; stroke-dasharray: 2 2; }
.src-ring { fill: none; stroke: #fff; stroke-width: 1.5; opacity: .7; pointer-events: none; }
.march-line { fill: none; stroke: #fff; stroke-width: 1.2; stroke-dasharray: 4 3; opacity: .9; }
.march-dot { fill: #fff; stroke: #000; stroke-width: .5; }
.march-num { fill: #fff; font-family: var(--mono); font-size: 8px; text-anchor: middle; paint-order: stroke; stroke: #000; stroke-width: 2px; }

.hud-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px; padding: 0 16px; height: 48px;
  background: #000; border-bottom: 1px solid rgba(255,255,255,.25); color: #fff;
}
.hud-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font); font-weight: 700; letter-spacing: .12em; font-size: 13px; }
.hud-brand .emblem { display: none; }
.phase-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  border: 1px solid rgba(255,255,255,.4); padding: 3px 8px; margin-left: 8px;
}
.phase-badge.ended { border-color: #fff; }
.res-chips { display: flex; gap: 22px; margin: 0 auto; align-items: center; }
.res {
  display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: #fff;
  background: none !important; border: 0 !important; padding: 0 !important;
}
.res small { display: inline; font-size: 13px; font-family: var(--mono); font-weight: 400; text-transform: none; letter-spacing: 0; color: #fff; margin-right: 6px; }
.res > div { display: flex; align-items: baseline; gap: 4px; }
.res b { font-weight: 500; font-size: 13px; }
.res.tick small { display: inline; }
.res svg { width: 14px; height: 14px; opacity: .85; }
.res.tick { min-width: 110px; }
.tick-bar { height: 2px; background: rgba(255,255,255,.2); margin-top: 4px; width: 80px; }
#tick-fill { height: 100%; background: #fff; width: 0; }
.hud-actions { display: flex; gap: 6px; }

.hud-panel {
  background: #fff !important; color: #000 !important; border: 1px solid #000 !important;
  border-radius: 0 !important; backdrop-filter: none !important;
}
.hud-panel.left {
  position: absolute; top: 60px; left: 12px; width: 280px; z-index: 8; max-height: calc(100% - 80px); overflow: auto;
  padding: 0;
}
.hp-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.15); font-size: 11px; letter-spacing: .12em; font-weight: 700;
}
.hp-body { padding: 10px; }
.diplo-list, .board-list { display: flex; flex-direction: column; gap: 8px; }
.dcard { border: 1px solid rgba(0,0,0,.2); padding: 10px; background: #fff; }
.dhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pinfo { flex: 1; min-width: 0; }
.pname { font-weight: 600; font-size: 13px; }
.psub { font-size: 11px; color: #666; display: flex; align-items: center; gap: 6px; }
.rel { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; border: 1px solid #000; padding: 2px 6px; }
.dactions { display: flex; flex-wrap: wrap; gap: 4px; }
.trade-row { display: flex; gap: 6px; margin-top: 8px; }
.trade-row input { flex: 1; border: 1px solid #000; padding: 6px; color: #000; background: #fff; }
.board-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.1); }
.board-row .bar { flex: 1; height: 4px; background: #eee; position: relative; }
.board-row .bar i { display: block; height: 100%; background: #000 !important; }
.board-row .goal { position: absolute; top: -3px; width: 1px; height: 10px; background: #000; }

/* Right sidebar = selection card (mockup) */
.hud-right {
  position: absolute; right: 12px; top: 60px; width: 280px; z-index: 8;
  display: flex; flex-direction: column; gap: 10px; max-height: calc(100% - 72px); overflow: auto;
}
.hud-right .hud-panel { /* chat moved bottom-left in CSS below via override */ }
.sel-card {
  position: absolute; right: 12px; top: 60px; width: 280px; z-index: 9;
  background: #fff !important; color: #000 !important; border: 1px solid #000 !important;
  border-radius: 0 !important; padding: 16px; max-height: calc(100% - 80px); overflow: auto;
  backdrop-filter: none !important;
}
.sc-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #000; }
.sc-head h3 { font-family: var(--font-d); font-size: 22px; font-weight: 400; margin: 0; }
.sc-head .sub { font-size: 11px; color: #555; margin-top: 2px; }
.sc-stats { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 12px; }
.sc-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 12px; border-bottom: 1px solid rgba(0,0,0,.08); padding: 4px 0;
}
.sc-stat small { color: #555; font-family: var(--font); font-size: 11px; letter-spacing: .04em; text-transform: none; }
.sc-stat b { font-weight: 500; }
.sc-units { font-size: 11px; margin-bottom: 10px; color: #555; }
.sc-note { font-size: 12px; color: #333; margin-bottom: 12px; line-height: 1.4; }
.sc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.sc-row > span:first-child { color: #666; min-width: 56px; }
.sc-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sc-actions .btn { width: 100%; }
.unit-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.utab {
  flex: 1; padding: 6px 4px; border: 1px solid rgba(0,0,0,.3); font-size: 10px; color: #000; background: #fff;
}
.utab.on { background: #000; color: #fff; border-color: #000; }
.slider {
  flex: 1; -webkit-appearance: none; appearance: none; height: 2px; background: #ccc; outline: 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; background: #000; border: 0; cursor: pointer;
}
.pct-val { font-family: var(--mono); font-size: 11px; min-width: 64px; text-align: right; }
.claim-cost-hint { font-family: var(--mono); }

/* Chat bottom-left (mockup) */
#panel-chat {
  position: fixed !important; left: 12px; bottom: 12px; width: 300px; z-index: 9;
  background: #000 !important; color: #fff !important; border: 1px solid #fff !important;
  max-height: 220px; display: flex; flex-direction: column;
}
#panel-chat .hp-head { border-bottom-color: rgba(255,255,255,.25); color: #fff; }
#panel-chat .hp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#panel-chat .chat-log {
  flex: 1; overflow: auto; border: 0; background: transparent; color: #fff;
  font-family: var(--mono); font-size: 11px; padding: 4px 0;
}
#panel-chat .chat-msg .meta b { color: #fff; }
#panel-chat .chat-msg .meta time { color: rgba(255,255,255,.45); }
#panel-chat .chat-form { border-color: rgba(255,255,255,.35); }
#panel-chat .chat-form input { background: transparent; color: #fff; }
#panel-chat .chat-form input::placeholder { color: rgba(255,255,255,.4); }
#panel-chat .send-btn { background: #fff; color: #000; border-left-color: rgba(255,255,255,.35); }
#panel-chat .seg-b { color: rgba(255,255,255,.5); border: 0; background: none; font-size: 10px; padding: 2px 6px; }
#panel-chat .seg-b.active { color: #fff; text-decoration: underline; }
#panel-chat .badge { background: #fff; color: #000; font-size: 9px; padding: 1px 4px; margin-left: 4px; }
#panel-report {
  position: fixed !important; left: 12px; bottom: 244px; width: 300px; z-index: 8;
  background: #000 !important; color: #fff !important; border: 1px solid rgba(255,255,255,.4) !important;
  max-height: 160px;
}
#panel-report .hp-head { border-bottom-color: rgba(255,255,255,.2); }
#panel-report .link { color: rgba(255,255,255,.6); font-size: 10px; margin-left: auto; margin-right: 8px; }
#panel-report.collapsed .hp-body, #panel-chat.collapsed .hp-body { display: none; }
.event-log { font-family: var(--mono); font-size: 11px; }
.event-log .ev { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.dm-players { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.dm-p { border: 1px solid rgba(255,255,255,.3); padding: 4px 8px; font-size: 10px; color: #fff; }
.dm-p.on { background: #fff; color: #000; }
.seg { display: flex; gap: 4px; margin-left: auto; margin-right: 8px; }
.chev { opacity: .5; }


/* Game chat bubbles (app uses .msg/.bubble) */
#panel-chat .chat-log .msg {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 8px; padding: 0; background: transparent; border: 0;
}
#panel-chat .chat-log .msg.mine { flex-direction: row-reverse; }
#panel-chat .chat-log .msg .avatar.sm,
#panel-chat .chat-log .msg .avatar {
  width: 22px; height: 22px; min-width: 22px; border-radius: 2px;
  font-size: 9px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.35);
}
#panel-chat .chat-log .msg .bubble {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  padding: 6px 8px; border-radius: 2px;
}
#panel-chat .chat-log .msg.mine .bubble {
  background: rgba(255,255,255,.14);
}
#panel-chat .chat-log .msg .meta {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 10px; margin-bottom: 2px;
}
#panel-chat .chat-log .msg .txt {
  font-size: 12px; line-height: 1.35; color: #fff; word-break: break-word;
  background: transparent; border: 0; padding: 0;
}
#panel-chat .chat-log .msg.sys {
  display: block; font-size: 11px; color: rgba(255,255,255,.65);
  border-left: 2px solid rgba(255,255,255,.35); padding: 4px 8px; margin: 6px 0;
  background: transparent;
}

/* Players panel */
.players-panel-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.pp-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px; border: 1px solid rgba(0,0,0,.15); background: #fff; color: #000; text-align: left;
  cursor: pointer;
}
.pp-row:hover { background: #111; color: #fff; }
.pp-row.mine { border-color: #000; box-shadow: inset 3px 0 0 #000; }
.pp-row.dead { opacity: .45; }
.pp-swatch { width: 12px; height: 12px; border: 1px solid #000; flex-shrink: 0; }
.pp-meta { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.pp-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-sub { font-size: 10px; color: #666; font-family: var(--mono); }
.pp-row:hover .pp-sub { color: #bbb; }
.pp-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.pp-dot.on { background: #22c55e; }
.pp-dot.off { background: #999; }

.minimap {
  position: absolute; right: 12px; bottom: 12px; z-index: 7;
  border: 1px solid rgba(255,255,255,.45); background: #000; padding: 4px; border-radius: 0;
  display: block;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5);
  overflow: hidden; /* clip #mm-view so it never paints a stray empty bordered box */
}
.minimap canvas { display: block; width: 220px; height: 123px; }
#mm-view {
  position: absolute; border: 1px solid #fff; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}
.zoom-ctl {
  position: absolute; right: 248px; bottom: 12px; z-index: 7;
  display: flex; flex-direction: column; gap: 4px;
  background: transparent; border: 0; padding: 0; border-radius: 0;
}
.zoom-ctl .icon-btn { background: #000; border-color: #fff; color: #fff; }

/* Context menu — white editorial */
.ctx-menu {
  position: absolute; z-index: 40; min-width: 180px;
  background: #fff !important; color: #000 !important; border: 1px solid #000 !important;
  border-radius: 0 !important; padding: 0; backdrop-filter: none !important; box-shadow: none !important;
}
.ctx-menu button, .ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; text-align: left; font-size: 13px; color: #000;
  border-bottom: 1px solid rgba(0,0,0,.12); background: #fff;
}
.ctx-menu button:last-child, .ctx-item:last-child { border-bottom: 0; }
.ctx-menu button:hover, .ctx-item:hover { background: #000; color: #fff; }
.ctx-menu button:disabled { opacity: .35; }
.ctx-menu .hint { margin-left: auto; font-family: var(--mono); font-size: 10px; color: #888; }
.ctx-menu button:hover .hint { color: #ccc; }
.ctx-sep { height: 0; border-bottom: 1px solid #000; margin: 0; }
.tooltip {
  position: absolute; z-index: 30; background: #fff; color: #000; border: 1px solid #000;
  padding: 8px 10px; font-size: 11px; pointer-events: none; max-width: 200px;
}

/* Modals / toasts / end */
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: var(--paper) !important; color: #000 !important; border: 1px solid #000 !important;
  border-radius: 0 !important; padding: 28px; width: min(520px, 100%); position: relative;
  backdrop-filter: none !important;
}
.modal-card.wide-modal { width: min(720px, 100%); }
.modal-x { position: absolute; top: 12px; right: 12px; }
.howto { padding-left: 18px; margin: 0; }
.howto li { margin-bottom: 10px; color: #333; }
.toasts { position: fixed; top: 16px; left: 50%; right: auto; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 24px)); pointer-events: none; }
.toasts .toast { pointer-events: auto; width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
.toast {
  background: #fff; color: #000; border: 1px solid #000; padding: 12px 14px;
  min-width: 240px; max-width: 360px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start;
}
.toast .t-ic { flex-shrink: 0; }
.end-overlay {
  position: absolute; inset: 0; z-index: 30; background: rgba(0,0,0,.8);
  display: flex; align-items: center; justify-content: center;
}
.end-card {
  background: #fff; color: #000; border: 1px solid #000; padding: 40px; text-align: center; width: min(420px, 92%);
}
.end-card .metal-title { color: #000; font-size: 48px; }
.end-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.end-icon { font-size: 40px; margin-bottom: 8px; }

.crown { margin-left: 4px; }
.conn-dot { display: none; }

@media (max-width: 900px) {
  .sel-card { width: min(280px, 42vw); right: calc(var(--dock-w, 300px) + 8px); left: auto; top: auto; bottom: 12px; max-height: 40vh; }
  #panel-report { display: none; }
  .res-chips { gap: 10px; }
  .hud-top { flex-wrap: nowrap; height: auto; min-height: 48px; padding: 6px 10px; }
}

.ctx-menu small { margin-left: auto; font-family: var(--mono); font-size: 10px; color: #888; }
.ctx-menu .ctx-sep { height: 1px; background: #000; margin: 4px 0; opacity: .2; }
.ctx-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }

.hud-panel .empty { border: 0; color: #666; background: transparent; padding: 12px; }
#screen-game .toast, .toasts .toast { background: #fff; color: #000; border: 1px solid #000; border-radius: 0; box-shadow: none; }


/* ── Room password ── */
.room-pw-card { max-width: 420px; text-align: center; }
.room-pw-icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border: 1px solid var(--line, #333); border-radius: 50%;
  display: grid; place-items: center;
}
.room-pw-icon svg { width: 24px; height: 24px; }
.room-pw-card .field { text-align: left; margin-top: 18px; }
.room-pw-card .field-err { color: #c44; font-size: 13px; margin-top: 8px; }
.room-row .lock-ic { width: 14px; height: 14px; opacity: .85; margin-left: 6px; vertical-align: -2px; }
/* lobby password UI moved into .lobby-pop (v3) */

.brand-mark {
  display: inline-block; vertical-align: -4px; margin-right: 8px;
  border-radius: 5px; flex-shrink: 0;
}
.dash-brand { display: flex; align-items: center; gap: 0; }
.v4-pill-mark { display: inline-flex; align-items: center; gap: 0; }
.v4-pill-mark .brand-mark { margin-right: 6px; vertical-align: 0; }
.hud-brand .brand-mark { margin-right: 6px; }

/* ── Yeniden bağlanma bandı ── */
.reconnect-banner {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 9999;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px;
  background: rgba(10, 10, 10, .92); color: #f2f2f2; border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px; white-space: nowrap; font: 500 13px/1.3 Inter, system-ui, sans-serif;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55); backdrop-filter: blur(12px);
  max-width: calc(100vw - 32px);
}
.reconnect-banner.hidden { display: none; }
.reconnect-banner .rb-spin {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: rbspin .8s linear infinite;
}
.reconnect-banner .rb-btn {
  padding: 6px 12px; border-radius: 999px; background: #fff; color: #000; font-weight: 600; font-size: 12px;
  border: 0; cursor: pointer; white-space: nowrap;
}
@keyframes rbspin { to { transform: rotate(360deg); } }
