@font-face {
  font-family: "Unbounded";
  src: url("/fonts/Unbounded-Variable.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070908;
  --surface: #101311;
  --surface-2: #151916;
  --surface-3: #1b201c;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(181, 255, 62, .32);
  --text: #f4f7f2;
  --muted: #8c968e;
  --green: #b5ff3e;
  --green-2: #74e600;
  --danger: #ff6a6a;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Unbounded", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.ambient { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: .13; z-index: 0; }
.ambient-one { width: 380px; height: 380px; background: var(--green); top: -190px; right: -180px; }
.ambient-two { width: 260px; height: 260px; background: #276d10; bottom: 15%; left: -220px; }
.app-shell { width: min(100%, 860px); margin: 0 auto; position: relative; z-index: 1; min-height: 100vh; padding: 0 20px calc(102px + var(--safe-bottom)); }

.topbar { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.wallet-chip { height: 42px; padding: 4px 13px 4px 5px; border: 1px solid var(--line); border-radius: 100px; background: rgba(20, 24, 21, .78); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wallet-chip strong { font-size: 12px; letter-spacing: .02em; }
.coin-mark { width: 31px; height: 31px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--green); color: #0a0d09; font-style: normal; font-size: 11px; font-weight: 800; box-shadow: 0 0 20px rgba(181,255,62,.18); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 800; letter-spacing: .025em; }
.brand > span:last-child > span { color: var(--green); }
.brand-mark { width: 27px; height: 27px; position: relative; transform: rotate(-8deg); }
.brand-mark i { position: absolute; width: 15px; height: 6px; border-radius: 9px; background: var(--green); box-shadow: 0 0 18px rgba(181,255,62,.35); }
.brand-mark i:nth-child(1) { top: 3px; left: 1px; transform: rotate(50deg); }
.brand-mark i:nth-child(2) { top: 10px; left: 9px; transform: rotate(-47deg); }
.brand-mark i:nth-child(3) { top: 18px; left: 1px; transform: rotate(50deg); }
.avatar-button { width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: linear-gradient(145deg, #20261f, #101310); display: grid; place-items: center; position: relative; cursor: pointer; font-weight: 700; }
.status-dot { position: absolute; width: 11px; height: 11px; border: 2px solid var(--bg); border-radius: 50%; background: var(--green); right: -1px; bottom: 1px; }

.view { animation: view-in .35s ease both; }
.view[hidden] { display: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.platform-hero { min-height: 360px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 28px; align-items: center; padding: 36px 0 24px; }
.platform-copy h1 { margin-bottom: 20px; }
.platform-copy > p:last-child { max-width: 440px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.platform-signal { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin-left: auto; display: grid; place-items: center; }
.signal-track { position: absolute; border: 1px solid rgba(181,255,62,.16); border-radius: 50%; }
.track-one { inset: 7%; }
.track-two { inset: 25%; border-style: dashed; animation: spin 24s linear infinite reverse; }
.signal-core { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 30px; background: var(--green); color: #090c09; font-size: 35px; font-weight: 800; transform: rotate(-7deg); box-shadow: 0 0 80px rgba(181,255,62,.16); }
.signal-node { position: absolute; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 16px 36px #000; }
.node-games { width: 66px; height: 66px; top: 9%; right: 8%; border-radius: 22px; font-size: 38px; transform: rotate(8deg); }
.node-casino { width: 57px; height: 57px; left: 5%; bottom: 13%; border-radius: 50%; color: var(--green); font-size: 25px; font-weight: 800; transform: rotate(-8deg); }
.platform-status { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 24px; align-items: center; padding: 18px 22px; background: rgba(15,18,16,.72); border: 1px solid var(--line); border-radius: 19px; }
.platform-status > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-kicker { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; }
.platform-status strong { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.platform-status .coin-mark { width: 27px; height: 27px; font-size: 10px; }
.platform-status-line { height: 30px; background: var(--line); }
.status-online { color: var(--text); font-size: 13px !important; }
.status-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.platform-heading { margin-top: 33px; }
.platform-portals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.portal-card { min-height: 430px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(155deg, #181d19 0%, #0e110f 70%); padding: 20px; display: flex; flex-direction: column; }
.portal-online { border-color: var(--line-strong); }
.portal-casino { background: radial-gradient(circle at 75% 24%, rgba(181,255,62,.1), transparent 34%), linear-gradient(150deg, #181d19, #0d100e); }
.portal-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.portal-number { color: #667067; font-size: 10px; letter-spacing: 2px; }
.portal-status { color: var(--green); border: 1px solid rgba(181,255,62,.2); border-radius: 100px; padding: 6px 9px; font-size: 8px; text-transform: uppercase; letter-spacing: 1px; }
.portal-status i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin: 0 5px 1px 0; }
.portal-status.virtual { color: #b1b9b2; border-color: var(--line); }
.portal-art { height: 198px; position: relative; margin: 8px -20px 0; }
.portal-grid { position: absolute; width: 190px; height: 190px; right: 1%; top: 7%; opacity: .5; transform: rotate(10deg); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; }
.piece { position: absolute; z-index: 2; display: grid; place-items: center; background: #202620; border: 1px solid var(--line); box-shadow: 0 18px 35px #000; }
.piece-king { width: 78px; height: 78px; border-radius: 26px; font-size: 47px; left: 18%; top: 28%; transform: rotate(-9deg); }
.piece-checker { width: 58px; height: 58px; border-radius: 50%; border: 8px double var(--green); right: 17%; top: 12%; transform: rotate(9deg); }
.piece-cross { width: 52px; height: 52px; border-radius: 17px; right: 25%; bottom: 5%; color: var(--green); font-size: 39px; transform: rotate(7deg); }
.casino-seven { position: absolute; z-index: 2; left: 18%; top: 20%; color: var(--green); font-size: 88px; line-height: 1; font-weight: 800; transform: rotate(-7deg); text-shadow: 0 0 35px rgba(181,255,62,.22); }
.casino-chip { position: absolute; z-index: 3; right: 19%; top: 12%; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; color: #0a0d09; background: var(--green); border: 8px double #78a832; font-size: 21px; font-weight: 800; transform: rotate(10deg); box-shadow: 0 14px 32px #000; }
.casino-diamond { position: absolute; z-index: 3; right: 27%; bottom: 0; color: #e8ede7; font-size: 41px; transform: rotate(-6deg); }
.casino-wheel { position: absolute; width: 180px; height: 180px; right: -25px; top: 10px; border: 1px solid rgba(181,255,62,.15); border-radius: 50%; box-shadow: inset 0 0 0 25px rgba(255,255,255,.018), inset 0 0 0 26px rgba(181,255,62,.12); }
.portal-content { position: relative; z-index: 3; margin-top: auto; }
.portal-content p { color: var(--green); font-size: 9px; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 5px; }
.portal-content h2 { font-size: 31px; letter-spacing: .015em; margin-bottom: 7px; }
.portal-content > span { color: var(--muted); display: block; min-height: 35px; font-size: 11px; line-height: 1.5; }
.portal-content button { width: 100%; margin-top: 16px; border: 0; border-radius: 14px; padding: 7px 8px 7px 15px; background: #f1f4ef; color: #0a0c0a; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 11px; font-weight: 800; }
.portal-content button:hover { background: var(--green); }
.portal-content button b { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: #111411; color: var(--green); font-size: 17px; }
.friends-strip { width: 100%; margin-top: 13px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); display: flex; align-items: center; gap: 13px; text-align: left; cursor: pointer; }
.friends-strip:hover { border-color: var(--line-strong); }
.friends-faces { display: flex; padding-left: 8px; }
.friends-faces i { width: 33px; height: 33px; margin-left: -8px; border: 2px solid var(--surface); border-radius: 50%; display: grid; place-items: center; background: #293029; font-style: normal; font-size: 10px; font-weight: 800; }
.friends-faces i:first-child { background: var(--green); color: #0b0d0b; }
.friends-strip > span:nth-child(2) { flex: 1; }
.friends-strip small, .friends-strip strong { display: block; }
.friends-strip small { color: var(--green); font-size: 8px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.friends-strip strong { font-size: 11px; }
.friends-strip > b { color: var(--green); font-size: 18px; }
.hero { min-height: 420px; display: grid; grid-template-columns: 1.06fr .94fr; gap: 24px; align-items: center; padding: 28px 0 42px; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; margin: 0 0 13px; }
.eyebrow > span { display: inline-block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; margin: 0 8px 1px 0; box-shadow: 0 0 12px var(--green); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(48px, 10vw, 78px); line-height: .94; letter-spacing: .015em; margin-bottom: 22px; }
h1 em { color: var(--green); font-style: normal; }
.hero-text { color: var(--muted); max-width: 380px; line-height: 1.6; font-size: 15px; }
.primary-action { margin-top: 20px; min-width: 210px; border: 0; border-radius: 100px; padding: 8px 9px 8px 22px; background: var(--green); color: #090b09; display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; font-weight: 800; cursor: pointer; box-shadow: 0 12px 35px rgba(130, 230, 30, .15); transition: transform .2s ease, box-shadow .2s ease; }
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(130, 230, 30, .25); }
.action-arrow { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #090b09; color: var(--green); font-size: 19px; }
.hero-orbit { aspect-ratio: 1; position: relative; display: grid; place-items: center; max-width: 350px; margin-left: auto; }
.orbit-ring { position: absolute; border: 1px solid rgba(181,255,62,.2); border-radius: 50%; }
.ring-one { inset: 12%; }
.ring-two { inset: 28%; border-style: dashed; animation: spin 20s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-core { width: 80px; height: 80px; border-radius: 27px; display: grid; place-items: center; background: var(--green); color: #0a0c0a; font-weight: 800; font-size: 22px; transform: rotate(7deg); box-shadow: 0 0 70px rgba(181,255,62,.18); }
.orbit-piece { position: absolute; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 12px 32px #000; }
.orbit-king { width: 67px; height: 67px; border-radius: 22px; top: 8%; right: 10%; font-size: 39px; transform: rotate(9deg); }
.orbit-x { width: 55px; height: 55px; border-radius: 50%; bottom: 12%; left: 5%; font-size: 38px; color: var(--green); }
.orbit-checker { width: 48px; height: 48px; border-radius: 50%; right: 4%; bottom: 15%; border: 7px double var(--green); }

.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 38px 0 20px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { margin: 0; font-size: 30px; letter-spacing: .015em; }
.live-count { color: var(--muted); font-size: 12px; }
.live-count i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 5px; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(181,255,62,0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(181,255,62,.3); } }
.game-list { display: grid; gap: 12px; }
.game-card { position: relative; min-height: 230px; border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; background: linear-gradient(135deg, rgba(23,28,24,.96), rgba(12,14,13,.98)); display: grid; grid-template-columns: minmax(190px, 37%) 1fr; transition: border-color .2s ease, transform .2s ease; }
.game-card:hover { border-color: rgba(181,255,62,.24); transform: translateY(-2px); }
.game-card-featured { border-color: var(--line-strong); }
.game-index { position: absolute; top: 17px; left: 20px; color: var(--muted); font-size: 10px; letter-spacing: 2px; z-index: 2; }
.game-visual { min-height: 230px; position: relative; background: rgba(0,0,0,.18); overflow: hidden; }
.game-visual::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 55% 45%, rgba(181,255,62,.09), transparent 60%); pointer-events: none; }
.visual-ttt { display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(3, 54px); align-content: center; justify-content: center; transform: rotate(-7deg) scale(1.1); }
.visual-ttt span { border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center; font-size: 35px; font-weight: 500; color: #cdd3ce; }
.visual-ttt span:nth-child(5) { color: var(--green); text-shadow: 0 0 18px rgba(181,255,62,.45); }
.visual-checkers { width: 190px; height: 190px; margin: 26px auto 0; display: block; position: relative; transform: rotate(7deg) scale(.86); border: 7px solid #252b26; background-color: #171b18; background-image: conic-gradient(#303832 25%, #171b18 0 50%, #303832 0 75%, #171b18 0); background-size: 25% 25%; box-shadow: 0 18px 35px rgba(0,0,0,.3); }
.preview-piece { position: absolute; z-index: 2; width: 9.5%; aspect-ratio: 1; left: calc(var(--col) * 12.5% + 1.5%); top: calc(var(--row) * 12.5% + 1.5%); border-radius: 50%; }
.preview-piece::after { content: ""; position: absolute; inset: 18%; border: 1px solid rgba(0,0,0,.22); border-radius: 50%; }
.preview-piece.light { background: #e5e9e3; border: 2px solid #aeb6af; box-shadow: 0 3px 5px rgba(0,0,0,.45); }
.preview-piece.green { background: var(--green); border: 2px solid #7db528; box-shadow: 0 3px 7px rgba(181,255,62,.2); }
.visual-chess { width: 190px; height: 190px; margin: 26px auto 0; display: block; position: relative; transform: rotate(-6deg) scale(.86); border: 7px solid #252b26; background-color: #c4cac3; background-image: conic-gradient(#424a43 25%, #c4cac3 0 50%, #424a43 0 75%, #c4cac3 0); background-size: 25% 25%; box-shadow: 0 18px 35px rgba(0,0,0,.3); }
.chess-preview-piece { position: absolute; z-index: 2; width: 12.5%; height: 12.5%; left: calc(var(--col) * 12.5%); top: calc(var(--row) * 12.5%); display: grid; place-items: center; border: 0; font-size: 21px; line-height: 1; font-weight: 400; }
.chess-preview-piece.black { color: #0b0e0b; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.chess-preview-piece.white { color: #f3f5f1; text-shadow: 0 1px 2px rgba(0,0,0,.75); }
.game-info { padding: 34px 28px 24px; display: flex; flex-direction: column; justify-content: center; }
.game-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.game-title-row p { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; margin-bottom: 4px; }
.game-title-row h3 { font-size: 23px; letter-spacing: .015em; margin-bottom: 10px; }
.difficulty { border: 1px solid var(--line); border-radius: 100px; padding: 6px 9px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }
.game-info > p { color: var(--muted); line-height: 1.55; font-size: 13px; max-width: 400px; }
.game-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 7px; }
.play-button { flex: 1; border: 0; border-radius: 13px; background: #f2f5f0; color: #101210; padding: 12px 14px; font-size: 12px; font-weight: 800; display: flex; justify-content: space-between; cursor: pointer; }
.play-button:hover { background: var(--green); }
.icon-action { width: 42px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-3); cursor: pointer; font-size: 21px; color: var(--green); }
.bot-button { border: 1px solid var(--line); border-radius: 13px; background: var(--surface-3); color: var(--green); padding: 11px 13px; cursor: pointer; font-size: 10px; font-weight: 700; white-space: nowrap; }
.bot-button:hover { border-color: var(--line-strong); background: rgba(181,255,62,.07); }

.casino-hero { min-height: 330px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 42px 0 28px; }
.casino-hero h1 { margin-bottom: 19px; }
.casino-hero h1 em { color: var(--green); font-style: normal; }
.casino-hero > div:first-child > p:last-child { max-width: 420px; color: var(--muted); line-height: 1.65; font-size: 14px; }
.casino-balance-card { border: 1px solid var(--line-strong); border-radius: 28px; padding: 25px; background: radial-gradient(circle at 90% 0, rgba(181,255,62,.12), transparent 45%), var(--surface); }
.casino-balance-card > span, .casino-balance-card small { display: block; color: var(--muted); font-size: 10px; }
.casino-balance-card strong { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; font-size: 38px; letter-spacing: .02em; }
.casino-balance-card .coin-mark { width: 42px; height: 42px; font-size: 14px; }
.casino-notice { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 17px; padding: 13px 15px; background: rgba(18,21,19,.72); }
.casino-notice > span { flex: 0 0 auto; width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(181,255,62,.24); color: var(--green); font-size: 10px; font-weight: 800; }
.casino-notice p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.casino-notice strong { color: var(--text); }
.casino-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.casino-game { min-height: 230px; display: grid; grid-template-columns: 43% 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, #171b18, #0f1210); }
.casino-game-featured { border-color: var(--line-strong); }
.casino-game-art { position: relative; min-height: 230px; overflow: hidden; display: flex; justify-content: center; align-items: center; gap: 5px; background: rgba(0,0,0,.18); }
.casino-game-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(181,255,62,.1), transparent 60%); }
.roulette-wheel { width: 145px; height: 145px; border-radius: 50%; border: 12px double #343b35; position: relative; display: grid; place-items: center; animation: spin 30s linear infinite; }
.roulette-wheel::after { content: ""; position: absolute; inset: 29px; border: 1px solid var(--green); border-radius: 50%; }
.roulette-wheel i { position: absolute; color: var(--muted); font-size: 10px; font-style: normal; }
.roulette-wheel i:nth-child(1) { top: 8px; }.roulette-wheel i:nth-child(2) { right: 10px; }.roulette-wheel i:nth-child(3) { bottom: 8px; }.roulette-wheel i:nth-child(4) { left: 10px; }
.roulette-art > b { position: absolute; z-index: 2; color: var(--green); font-size: 25px; }
.blackjack-art span { width: 58px; height: 82px; border-radius: 9px; display: grid; place-items: start; padding: 8px; background: #e8ece7; color: #111; font-size: 24px; font-weight: 800; transform: rotate(-8deg); box-shadow: 0 10px 25px #000; }
.blackjack-art span:nth-child(2) { color: #3b7415; transform: rotate(8deg) translateX(-23px); }
.blackjack-art b { position: absolute; z-index: 2; bottom: 29px; right: 25px; color: var(--green); font-size: 28px; }
.slots-art span { width: 48px; height: 65px; border: 1px solid var(--line); background: #222822; display: grid; place-items: center; color: var(--green); font-size: 25px; font-weight: 800; }
.dice-art span { font-size: 60px; color: #e8ede7; transform: rotate(-10deg); }
.dice-art span:nth-child(2) { color: var(--green); transform: rotate(12deg); }
.casino-game-copy { padding: 24px 18px 18px; display: flex; flex-direction: column; align-items: start; }
.game-badge { border-radius: 100px; padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: 1px; }
.casino-game-copy h3 { margin: 14px 0 7px; font-size: 19px; letter-spacing: .015em; }
.casino-game-copy p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.casino-game-copy button { width: 100%; margin-top: auto; border: 1px solid var(--line); border-radius: 11px; padding: 10px; background: var(--surface-3); color: #687069; font-size: 9px; cursor: not-allowed; }

.page-intro { padding: 46px 0 32px; }
.page-intro h1 { margin-bottom: 15px; }
.page-intro h1 span { color: var(--green); }
.page-intro > p:last-child { color: var(--muted); }
.friend-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.friend-form label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.friend-input-wrap { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding-left: 14px; }
.friend-input-wrap > span { color: var(--green); font-weight: 700; }
.friend-input-wrap input { flex: 1; min-width: 0; background: transparent; color: var(--text); border: 0; padding: 13px 8px; outline: 0; }
.friend-input-wrap button { border: 0; background: var(--green); color: #0b0d0b; font-size: 11px; font-weight: 800; padding: 11px 14px; border-radius: 10px; margin-right: 4px; cursor: pointer; }
.form-message { min-height: 17px; color: var(--green); font-size: 11px; margin: 8px 0 -5px; }
.section-heading.compact { align-items: center; margin-top: 30px; }
.section-heading.compact > span { color: var(--muted); font-size: 12px; }
.friends-list { display: grid; gap: 9px; }
.friend-row { border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.friend-avatar { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 15px; background: linear-gradient(145deg, #30382f, #171b18); display: grid; place-items: center; font-weight: 800; position: relative; }
.friend-avatar i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); position: absolute; right: -2px; bottom: -2px; background: #4d554e; }
.friend-avatar i.online { background: var(--green); }
.friend-avatar i.in_game { background: #ffd84d; }
.friend-info { min-width: 0; flex: 1; }
.friend-info strong, .friend-info small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.friend-info small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.friend-rating { font-size: 11px; color: var(--muted); margin-right: 5px; }
.challenge-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-3); color: var(--green); cursor: pointer; }
.challenge-button:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.skeleton-row { height: 74px; border-radius: 18px; background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200%; } }

.profile-hero { padding: 48px 0 30px; display: flex; align-items: center; gap: 18px; }
.profile-avatar { width: 82px; height: 82px; border-radius: 28px; background: linear-gradient(145deg, #303a30, #111411); border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 29px; font-weight: 800; position: relative; }
.profile-avatar i { position: absolute; right: -3px; bottom: 7px; width: 13px; height: 13px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg); }
.profile-hero h1 { font-size: 38px; line-height: 1; letter-spacing: .015em; margin: 0 0 5px; }
.profile-hero .eyebrow { margin-bottom: 7px; }
.profile-handle { color: var(--muted); font-size: 12px; margin: 0; }
.rating-panel { border-radius: var(--radius-xl); padding: 25px; background: linear-gradient(135deg, #20281e, #111410); border: 1px solid var(--line-strong); position: relative; overflow: hidden; }
.rating-panel::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(181,255,62,.11); right: -55px; top: -78px; }
.rating-panel p { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.rating-panel strong { display: block; font-size: 47px; letter-spacing: .02em; }
.rank-orbit { position: absolute; right: 28px; top: 24px; width: 62px; height: 62px; border: 1px solid var(--green); border-radius: 50%; display: grid; place-items: center; }
.rank-orbit::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed rgba(181,255,62,.35); }
.rank-orbit span { color: var(--green); font-weight: 800; }
.rating-panel .rank-label { margin-top: 18px; display: flex; justify-content: space-between; }
.rank-label b { font-weight: 500; }
.rank-label span { color: var(--text); font-weight: 700; }
.rank-progress { height: 4px; background: rgba(255,255,255,.08); border-radius: 10px; overflow: hidden; }
.rank-progress i { display: block; width: 66%; height: 100%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stats-grid article { border: 1px solid var(--line); background: var(--surface); border-radius: 19px; padding: 16px; }
.stats-grid span, .stats-grid small { display: block; color: var(--muted); font-size: 10px; }
.stats-grid strong { display: block; font-size: 28px; margin: 4px 0; }
.stats-grid small { color: #69716b; }
.text-button { border: 0; background: transparent; color: var(--green); font-size: 11px; cursor: pointer; }
.match-history { display: grid; gap: 9px; }
.match-history article { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 12px; }
.match-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-3); color: var(--green); font-weight: 700; }
.match-history article > div { min-width: 0; flex: 1; }
.match-history strong, .match-history small { display: block; }
.match-history small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.match-history b { font-size: 9px; text-transform: uppercase; letter-spacing: .8px; }
.match-history .win { color: var(--green); }
.match-history .loss { color: var(--danger); }

.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: calc(12px + var(--safe-bottom)); transform: translateX(-50%); width: min(calc(100% - 30px), 620px); height: 68px; border: 1px solid var(--line); border-radius: 22px; background: rgba(18, 22, 19, .88); backdrop-filter: blur(18px); padding: 5px; display: grid; grid-template-columns: repeat(5, 1fr); box-shadow: 0 18px 60px rgba(0,0,0,.45); }
.bottom-nav button { border: 0; border-radius: 17px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 10px; cursor: pointer; }
.bottom-nav button.is-active { color: var(--green); background: rgba(181,255,62,.08); }
.nav-icon { font-size: 20px; line-height: 1; }

.game-sheet { position: fixed; inset: 0; z-index: 100; }
.game-sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); animation: fade-in .2s both; }
@keyframes fade-in { from { opacity: 0; } }
.sheet-panel { position: absolute; width: min(100%, 620px); max-height: calc(100vh - 16px); overflow-y: auto; left: 50%; bottom: 0; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 30px 30px 0 0; background: #0e110f; padding: 22px 22px calc(24px + var(--safe-bottom)); animation: sheet-up .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes sheet-up { from { transform: translate(-50%, 35px); opacity: 0; } }
.sheet-header { display: flex; align-items: start; justify-content: space-between; }
.sheet-header .eyebrow { margin-bottom: 3px; }
.sheet-header h2 { font-size: 28px; letter-spacing: .015em; }
.close-button { border: 1px solid var(--line); border-radius: 50%; width: 39px; height: 39px; background: var(--surface-2); cursor: pointer; font-size: 23px; color: var(--muted); }
.match-status { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 18px; }
.player-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 15px; padding: 7px; min-width: 0; }
.player-chip.opponent { justify-content: flex-end; text-align: right; }
.avatar-small { width: 33px; height: 33px; border-radius: 10px; display: grid; place-items: center; background: var(--green); color: #0a0c0a; font-weight: 800; }
.avatar-small.alt { background: var(--surface-3); color: var(--muted); }
.player-chip small, .player-chip strong { display: block; }
.player-chip small { color: var(--muted); font-size: 8px; }
.player-chip strong { font-size: 12px; }
.turn-indicator { text-align: center; min-width: 72px; font-size: 9px; color: var(--green); }
.turn-indicator i { display: block; height: 2px; margin-top: 5px; border-radius: 4px; background: var(--green); box-shadow: 0 0 8px var(--green); }

.turn-indicator { min-width: 116px; font-size: 13px; font-weight: 800; letter-spacing: .03em; }
.turn-indicator i { height: 3px; margin-top: 7px; }
.game-message { min-height: 28px; font-size: 14px; font-weight: 700; }
.game-setup-panel { max-width: 540px; }
.stake-field { display: grid; gap: 8px; margin: 20px 0; color: var(--text); font-size: 12px; font-weight: 800; }
.stake-field input, .stake-field select { width: 100%; border: 1px solid var(--line); background: #0b0c0b; color: var(--text); padding: 14px; font: inherit; outline: none; }
.stake-field input:focus, .stake-field select:focus { border-color: var(--green); }
.stake-field small { color: var(--muted); font-size: 10px; font-weight: 500; }
.setup-choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.setup-choice { min-height: 94px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 16px; text-align: left; cursor: pointer; }
.setup-choice strong, .setup-choice span { display: block; }
.setup-choice strong { font-size: 13px; }
.setup-choice span { margin-top: 6px; color: var(--muted); font-size: 10px; }
.setup-choice.is-primary { background: var(--green); color: #080a08; border-color: var(--green); }
.setup-choice.is-primary span { color: rgba(8, 10, 8, .72); }
#friend-invite-picker { margin-top: 12px; }
#send-friend-invite { width: 100%; justify-content: space-between; }

.casino-bet-field { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 10px; }
.casino-bet-field input { width: 88px; border: 1px solid var(--line); background: #0b0b0b; color: var(--text); padding: 9px; font: inherit; }
.casino-game-copy button:not(:disabled) { color: var(--green); cursor: pointer; }
.roulette-wheel, .roulette-wheel::after { border-radius: 50%; }
.roulette-wheel { background: conic-gradient(#ce2632 0 9deg, #161a17 9deg 18deg, #e8e7df 18deg 27deg, #ce2632 27deg 36deg, #161a17 36deg 45deg, #e8e7df 45deg 54deg, #ce2632 54deg 63deg, #161a17 63deg 72deg, #e8e7df 72deg 81deg, #ce2632 81deg 90deg, #161a17 90deg 99deg, #e8e7df 99deg 108deg, #ce2632 108deg 117deg, #161a17 117deg 126deg, #e8e7df 126deg 135deg, #ce2632 135deg 144deg, #161a17 144deg 153deg, #e8e7df 153deg 162deg, #ce2632 162deg 171deg, #161a17 171deg 180deg, #e8e7df 180deg 189deg, #ce2632 189deg 198deg, #161a17 198deg 207deg, #e8e7df 207deg 216deg, #ce2632 216deg 225deg, #161a17 225deg 234deg, #e8e7df 234deg 243deg, #ce2632 243deg 252deg, #161a17 252deg 261deg, #e8e7df 261deg 270deg, #ce2632 270deg 279deg, #161a17 279deg 288deg, #e8e7df 288deg 297deg, #ce2632 297deg 306deg, #161a17 306deg 315deg, #e8e7df 315deg 324deg, #ce2632 324deg 333deg, #161a17 333deg 342deg, #07934b 342deg 360deg); border: 7px solid #bcae69; box-shadow: 0 0 0 5px #171713, 0 14px 26px #000; }
.roulette-wheel::after { background: radial-gradient(circle, #d6be67 0 15%, #111 16% 30%, transparent 31%); }
.casino-table { max-width: 680px; }
.roulette-table { min-height: 320px; display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: center; padding: 14px; background: #12351e; border: 1px solid rgba(255,255,255,.12); }
.roulette-table-wheel { width: 220px; height: 220px; margin: auto; animation: none; }
.roulette-bets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 16px; }
.roulette-bets button { min-height: 54px; border: 1px solid rgba(255,255,255,.3); color: white; background: #b91f2e; cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; }
.roulette-bets button:nth-child(2) { background: #111; }.roulette-bets button:nth-child(3) { background: #08763f; grid-column: span 2; }
.blackjack-table, .slots-table, .dice-table { min-height: 310px; padding: 26px; text-align: center; background: radial-gradient(circle at 50% 25%, #235c32, #0b2112 70%); border: 1px solid rgba(255,255,255,.12); }
.card-hand { display: flex; justify-content: center; gap: 12px; margin: 10px 0 22px; }.card-hand b { width: 72px; height: 104px; display: grid; place-items: center; background: #f2f1e9; color: #101010; font-size: 31px; box-shadow: 4px 5px 0 rgba(0,0,0,.3); }.player-hand b:last-child { color: #267a16; }
.slots-window { display: flex; justify-content: center; gap: 8px; margin: 50px 0 22px; }.slots-window span { width: 82px; height: 106px; display: grid; place-items: center; background: #101510; border: 1px solid var(--green); color: var(--green); font-size: 42px; font-weight: 800; }
.dice-table { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; }.dice-table span { font-size: 82px; }.dice-table strong { color: var(--green); }.dice-table p { width: 100%; }
.casino-play { width: 100%; justify-content: space-between; }
@media (max-width: 760px) { .roulette-table { grid-template-columns: 1fr; }.roulette-table-wheel { width: 190px; height: 190px; } }
.roulette-art::before { content: "▼"; position: absolute; z-index: 5; top: 10px; color: var(--green); font-size: 21px; text-shadow: 0 2px #000; }
.roulette-wheel.is-spinning { animation: roulette-spin 2.2s cubic-bezier(.12,.72,.16,1) both; }
.blackjack-art.is-playing span { animation: card-deal .45s ease-out both; }
.blackjack-art.is-playing span:nth-child(2) { animation-delay: .16s; }
.dice-art.is-playing span { animation: dice-roll .85s ease-in-out both; }
.slots-art { align-items: center; gap: 4px; padding: 10px; }
.slot-reel { width: 48px; height: 65px; display: block; overflow: hidden; border: 1px solid var(--line); background: #080908; }
.slot-reel i { height: 65px; display: grid; place-items: center; color: var(--green); font-style: normal; font-size: 21px; font-weight: 800; }
.slots-art.is-spinning .slot-reel { animation: reel-spin .34s linear infinite; }
.slots-art.is-spinning .slot-reel:nth-child(2) { animation-delay: .08s; }
.slots-art.is-spinning .slot-reel:nth-child(3) { animation-delay: .16s; }
.slots-art.is-stopping .slot-reel { transition: transform .55s cubic-bezier(.12,.74,.2,1); }
@keyframes roulette-spin { from { transform: rotate(0); } to { transform: rotate(1440deg); } }
@keyframes reel-spin { from { transform: translateY(0); } to { transform: translateY(-390px); } }
@keyframes card-deal { from { opacity: 0; transform: translateY(35px) rotate(-18deg); } to { opacity: 1; transform: translateY(0) rotate(-8deg); } }
@keyframes dice-roll { 25% { transform: rotate(110deg) scale(.7); } 60% { transform: rotate(250deg) scale(1.2); } }

@media (max-width: 760px) {
  .turn-indicator { min-width: 106px; font-size: 12px; }
  .setup-choice-grid { grid-template-columns: 1fr; }
}
.board-wrap { position: relative; width: min(100%, 500px); aspect-ratio: 1; margin: 0 auto; border-radius: 20px; overflow: hidden; background: #151a16; border: 1px solid var(--line); }
.game-board { width: 100%; height: 100%; display: grid; }
.game-board.ttt { grid-template-columns: repeat(3, 1fr); padding: 11px; gap: 7px; background: #111511; }
.game-cell { border: 0; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.ttt .game-cell { border-radius: 14px; background: #1c221d; font-size: clamp(48px, 15vw, 82px); font-weight: 500; }
.ttt .game-cell.x { color: var(--green); }
.ttt .game-cell.is-winning { box-shadow: inset 0 0 0 2px var(--green); background: rgba(181,255,62,.1); }
.game-board.grid-8 { grid-template-columns: repeat(8, 1fr); }
.grid-8 .game-cell { position: relative; border-radius: 0; aspect-ratio: 1; background: #b7bdb6; color: #111; font-size: clamp(22px, 8vw, 43px); line-height: 1; }
.grid-8 .game-cell.dark { background: #343b35; }
.grid-8 .game-cell.is-selected { box-shadow: inset 0 0 0 4px var(--green); z-index: 1; }
.grid-8 .game-cell.last-move::after { content: ""; position: absolute; inset: 7%; border: 2px solid var(--green); pointer-events: none; }
.checker-piece { width: 72%; height: 72%; border-radius: 50%; background: #ededeb; border: 5px double #afb5af; box-shadow: 0 4px 7px rgba(0,0,0,.45); }
.checker-piece.black { background: #101310; border-color: #282d29; }
.checker-piece.king::after { content: "◆"; display: grid; place-items: center; height: 100%; color: var(--green); font-size: 45%; }
.chess-piece.white { color: #f4f5ef; text-shadow: 0 2px 2px #000, 0 0 1px #000; }
.chess-piece.black { color: #101310; text-shadow: 0 1px 0 rgba(255,255,255,.25); }
.waiting-state { position: absolute; inset: 0; z-index: 5; background: rgba(11,14,12,.96); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.waiting-state[hidden] { display: none; }
.waiting-state h3 { margin: 21px 0 6px; }
.waiting-state p { color: var(--muted); font-size: 11px; }
.radar { width: 108px; height: 108px; position: relative; display: grid; place-items: center; border: 1px solid rgba(181,255,62,.3); border-radius: 50%; }
.radar::before, .radar::after { content: ""; position: absolute; border: 1px solid rgba(181,255,62,.15); border-radius: 50%; }
.radar::before { inset: 16px; }.radar::after { inset: 33px; }
.radar i { position: absolute; inset: -1px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 70%, rgba(181,255,62,.35)); animation: spin 2s linear infinite; }
.radar span { z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--green); color: #090b09; font-weight: 800; }
.game-message { min-height: 22px; text-align: center; color: var(--muted); font-size: 11px; margin: 12px 0 7px; }
.game-message.error { color: var(--danger); }
.sheet-actions { display: flex; gap: 8px; }
.sheet-actions button { flex: 1; border-radius: 13px; padding: 12px; cursor: pointer; font-size: 11px; font-weight: 700; }
.secondary-action { border: 0; background: var(--green); color: #0a0c0a; }
.danger-action { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(95px + var(--safe-bottom)); z-index: 200; transform: translate(-50%, 20px); max-width: calc(100% - 40px); background: #edf1eb; color: #111; border-radius: 13px; padding: 11px 16px; font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s ease; box-shadow: 0 12px 40px #000; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .app-shell { padding-inline: 14px; }
  .topbar { height: 68px; }
  .wallet-chip { height: 38px; padding-right: 10px; }
  .wallet-chip .coin-mark { width: 27px; height: 27px; }
  .avatar-button { width: 38px; height: 38px; }
  .platform-hero { min-height: 400px; grid-template-columns: 1fr; padding-top: 38px; position: relative; overflow: hidden; }
  .platform-copy { position: relative; z-index: 2; }
  .platform-copy > p:last-child { max-width: 285px; font-size: 13px; }
  .platform-signal { position: absolute; width: 240px; right: -82px; bottom: -8px; opacity: .62; }
  .platform-status { grid-template-columns: 1fr; gap: 12px; padding: 15px; }
  .platform-status-line { width: 100%; height: 1px; }
  .platform-portals { grid-template-columns: 1fr; }
  .portal-card { min-height: 400px; }
  .portal-art { height: 172px; }
  .friends-strip { margin-bottom: 8px; }
  .hero { min-height: 405px; grid-template-columns: 1fr; padding-top: 34px; position: relative; overflow: hidden; }
  .hero-copy { position: relative; z-index: 2; }
  h1 { font-size: clamp(48px, 16vw, 68px); letter-spacing: .01em; }
  .hero-orbit { position: absolute; width: 255px; right: -80px; bottom: -35px; opacity: .56; }
  .primary-action { margin-top: 12px; }
  .game-card { grid-template-columns: 122px 1fr; min-height: 204px; border-radius: 24px; }
  .game-visual { min-height: 204px; }
  .visual-ttt { grid-template-columns: repeat(3, 39px); grid-template-rows: repeat(3, 39px); transform: rotate(-7deg) translateX(-5px); }
  .visual-ttt span { font-size: 25px; }
  .visual-checkers { width: 150px; height: 150px; margin: 31px 0 0 -14px; }
  .visual-chess { width: 150px; height: 150px; margin: 31px 0 0 -14px; }
  .chess-preview-piece { font-size: 17px; }
  .game-info { padding: 29px 13px 15px 14px; }
  .game-title-row h3 { font-size: 17px; letter-spacing: .01em; margin-bottom: 7px; }
  .difficulty { display: none; }
  .game-info > p { font-size: 10px; line-height: 1.45; margin-bottom: 3px; }
  .play-button { font-size: 9px; padding: 10px; }
  .bot-button { padding: 9px 8px; font-size: 8px; }
  .icon-action { width: 36px; }
  .page-intro { padding-top: 35px; }
  .page-intro h1 { font-size: 58px; }
  .profile-hero { padding-top: 36px; }
  .profile-avatar { width: 68px; height: 68px; border-radius: 23px; }
  .profile-hero h1 { font-size: 32px; }
  .stats-grid article { padding: 13px 10px; }
  .stats-grid strong { font-size: 24px; }
  .stats-grid small { font-size: 8px; }
  .sheet-panel { padding-inline: 14px; }
  .casino-hero { min-height: 410px; grid-template-columns: 1fr; gap: 8px; padding-top: 38px; }
  .casino-hero > div:first-child > p:last-child { font-size: 12px; }
  .casino-balance-card { padding: 19px; border-radius: 22px; }
  .casino-grid { grid-template-columns: 1fr; }
  .casino-game { min-height: 205px; grid-template-columns: 42% 1fr; }
  .casino-game-art { min-height: 205px; }
  .casino-heading { align-items: center; }
  .bottom-nav button { flex-direction: column; gap: 2px; font-size: 9px; }
  .nav-icon { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* STAY_SYSTEM / industrial grid interface */
:root {
  --bg: #070707;
  --surface: #0b0b0b;
  --surface-2: #111111;
  --surface-3: #181818;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 229, 0, .72);
  --text: #f1f1ed;
  --muted: #858585;
  --green: #ffe500;
  --green-2: #ffd000;
  --danger: #ff584d;
  --radius-xl: 0;
  --radius-lg: 0;
  --radius-md: 0;
  font-family: "Unbounded", system-ui, sans-serif;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 40px 40px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.012) 50%, transparent);
  z-index: 0;
}

.ambient { display: none; }

.app-shell {
  width: min(calc(100% - 48px), 1120px);
  padding: 0 28px calc(106px + var(--safe-bottom));
  border-inline: 1px solid rgba(255, 229, 0, .22);
  background: rgba(7, 7, 7, .72);
}

.app-shell::before,
.app-shell::after {
  position: fixed;
  z-index: 25;
  color: #5d5d5d;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  pointer-events: none;
}

.app-shell::before {
  content: "STAY_GAMES / INTERFACE_01";
  left: max(32px, calc(50% - 540px));
  bottom: 22px;
}

.app-shell::after {
  content: "SIGNAL: ACTIVE";
  right: max(32px, calc(50% - 540px));
  bottom: 22px;
  color: var(--green);
}

.topbar {
  height: 64px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  padding-right: 10px;
  background: rgba(7, 7, 7, .92);
}

.brand {
  align-self: stretch;
  padding: 0 24px;
  gap: 0;
  background: var(--green);
  color: #080808;
  font-size: 14px;
  letter-spacing: .025em;
}

.brand > span:last-child > span { color: #080808; }
.brand-mark { display: none; }
.topbar-actions { gap: 0; }

.wallet-chip,
.avatar-button {
  height: 42px;
  border-radius: 0;
  background: #0b0b0b;
}

.wallet-chip { padding: 0 12px 0 0; }
.avatar-button { width: 42px; border-left: 0; }
.coin-mark { border-radius: 0; box-shadow: none; }
.status-dot { width: 7px; height: 7px; border: 0; border-radius: 0; right: 2px; bottom: 2px; }

.view { padding-top: 24px; }
.view[hidden] { display: none; }

h1,
h2,
h3 {
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(68px, 11vw, 126px);
  line-height: .82;
  letter-spacing: .01em;
}

h1 em { color: var(--green); }

.eyebrow,
.status-kicker,
.portal-status,
.difficulty,
.game-badge {
  font-family: "Unbounded", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.eyebrow { color: #a0a0a0; font-size: 10px; }
.eyebrow > span { width: 8px; height: 8px; border-radius: 0; box-shadow: none; }

.platform-hero,
.hero {
  min-height: 540px;
  border: 1px solid var(--line-strong);
  padding: 42px 36px;
  position: relative;
  overflow: hidden;
}

.platform-hero::before,
.hero::before {
  content: "SIGNAL: ACTIVE\A PLAYER INPUT REQUIRED";
  position: absolute;
  top: 28px;
  right: 30px;
  white-space: pre;
  text-align: right;
  color: #676767;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
}

.platform-copy,
.hero-copy { position: relative; z-index: 3; }
.platform-copy h1 { margin: 66px 0 28px; }
.platform-copy > p:last-child,
.hero-text {
  max-width: 480px;
  color: #a3a3a3;
  font-size: 12px;
  line-height: 1.65;
  text-transform: uppercase;
}

.platform-signal,
.hero-orbit {
  width: min(100%, 360px);
  opacity: .82;
}

.platform-signal::before,
.hero-orbit::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 36px 36px;
  border: 1px solid var(--line);
}

.signal-track,
.orbit-ring {
  border-radius: 0;
  border-color: rgba(255, 229, 0, .32);
}

.track-one,
.ring-one { inset: 12%; }
.track-two,
.ring-two { inset: 28%; border-style: solid; animation: none; }

.signal-core,
.orbit-core {
  width: 116px;
  height: 54px;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  font-family: "Unbounded", system-ui, sans-serif;
  font-size: 19px;
}

.signal-node,
.orbit-piece,
.piece {
  border-radius: 0;
  box-shadow: 8px 8px 0 rgba(0,0,0,.5);
}

.node-games,
.orbit-king { border-radius: 0; }
.node-casino,
.orbit-x,
.orbit-checker { border-radius: 0; }

.platform-status {
  margin-top: 14px;
  border-radius: 0;
  border-color: var(--line);
  background: #0a0a0a;
}

.status-online i,
.live-count i { border-radius: 0; box-shadow: none; }

.section-heading {
  min-height: 94px;
  margin: 30px 0 14px;
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 { font-size: clamp(32px, 5vw, 54px); letter-spacing: .01em; }
.platform-heading { margin-top: 30px; }

.platform-portals { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.portal-card {
  min-height: 440px;
  border: 0;
  border-radius: 0;
  background-color: #0a0a0a;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  padding: 22px;
}

.portal-card:hover,
.game-card:hover {
  transform: translateY(-3px);
  outline: 1px solid var(--green);
}

.portal-online { border: 0; }
.portal-casino { background-color: #0a0a0a; }
.portal-number { color: var(--green); }
.portal-status { border-radius: 0; border-color: var(--line); color: var(--text); }
.portal-status i { border-radius: 0; }
.portal-content p { color: var(--green); }
.portal-content h2 { font-size: 36px; letter-spacing: .01em; }
.portal-content > span { color: #8d8d8d; text-transform: uppercase; }

.portal-content button,
.primary-action,
.play-button,
.bot-button {
  border-radius: 0;
  text-transform: uppercase;
}

.portal-content button { background: var(--green); }
.portal-content button b { border-radius: 0; background: #080808; }
.piece-checker { border-radius: 50%; border-color: var(--green); }
.piece-cross,
.casino-seven { color: var(--green); text-shadow: none; }
.casino-chip { border-radius: 0; border: 1px solid var(--green-2); box-shadow: 8px 8px 0 #000; }
.casino-wheel { border-radius: 0; box-shadow: inset 0 0 0 25px rgba(255,255,255,.018); }

.friends-strip {
  border-radius: 0;
  margin-top: 1px;
  background: #0a0a0a;
  border-color: var(--line);
  padding: 16px;
}

.friends-faces i,
.friend-avatar,
.profile-avatar,
.match-icon {
  border-radius: 0;
}

.hero { border-bottom-color: var(--line-strong); }
.hero h1 {
  max-width: 620px;
  margin-top: 68px;
  font-size: clamp(54px, 7.4vw, 88px);
  line-height: .86;
  letter-spacing: .01em;
}
.primary-action {
  min-width: 230px;
  padding: 0 0 0 18px;
  min-height: 50px;
  box-shadow: none;
}
.action-arrow { height: 50px; width: 50px; border-radius: 0; }

.game-list { gap: 1px; border: 1px solid var(--line); background: var(--line); }
.game-card {
  min-height: 260px;
  border: 0;
  border-radius: 0;
  background: #0a0a0a;
  grid-template-columns: minmax(220px, 38%) 1fr;
}

.game-card-featured { border: 0; }
.game-visual {
  min-height: 260px;
  border-right: 1px solid var(--line);
  background-color: #0c0c0c;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 30px 30px;
}
.game-visual::after { display: none; }
.game-index { color: var(--green); }
.game-title-row p { color: var(--green); }
.difficulty { border-radius: 0; }
.game-info { padding: 32px; }
.game-title-row h3 { font-size: 26px; letter-spacing: .01em; }
.game-info > p { color: #909090; }
.play-button { background: var(--text); }
.bot-button { background: #101010; }

.visual-ttt span { border-color: rgba(255,255,255,.22); }
.visual-ttt span:nth-child(5) { text-shadow: none; }
.visual-checkers,
.visual-chess { border-color: #1f1f1f; box-shadow: 9px 9px 0 rgba(0,0,0,.65); }
.preview-piece.green { background: var(--green); border-color: #a89400; box-shadow: none; }

.casino-hero {
  min-height: 460px;
  border: 1px solid var(--line-strong);
  padding: 42px 36px;
}
.casino-hero h1 { margin-top: 58px; }
.casino-balance-card,
.casino-notice,
.casino-game,
.friend-form,
.friend-row,
.rating-panel,
.stats-grid article,
.match-history article {
  border-radius: 0;
  background: #0a0a0a;
  box-shadow: none;
}
.casino-balance-card { background: #0a0a0a; }
.casino-notice { margin-top: 14px; }
.casino-notice > span { border-radius: 0; }
.casino-grid { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.casino-game { border: 0; }
.casino-game-art { border-right: 1px solid var(--line); }
.casino-game-art::after { display: none; }
.roulette-wheel,
.roulette-wheel::after { border-radius: 0; }
.blackjack-art span,
.game-badge,
.casino-game-copy button { border-radius: 0; }

.page-intro {
  min-height: 330px;
  border: 1px solid var(--line-strong);
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.page-intro h1 { font-size: clamp(64px, 11vw, 118px); }
.friend-form { margin-top: 14px; }
.friend-input-wrap { border-radius: 0; }
.friend-input-wrap button { border-radius: 0; background: var(--green); }

/* Dedicated casino tables */
.casino-table { max-width: 720px; }
.casino-table .roulette-wheel,
.casino-table .roulette-wheel::after { border-radius: 50%; }
.roulette-wheel-wrap { position: relative; display: grid; place-items: center; }
.roulette-wheel-wrap > i { position: absolute; z-index: 3; top: -8px; color: var(--green); font-size: 24px; font-style: normal; text-shadow: 0 2px #000; }
.roulette-layout { min-width: 0; }
.casino-instruction { color: var(--text); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.roulette-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 14px; }
.roulette-number { min-height: 27px; border: 0; color: #fff; font: 800 10px/1 var(--font); cursor: pointer; }
.roulette-number.red { background: #b51f2d; }.roulette-number.black { background: #101110; }.roulette-number.green { background: #08733d; }
.roulette-bets button.is-selected,
.roulette-number.is-selected { outline: 2px solid var(--green); outline-offset: 2px; position: relative; z-index: 1; }
.roulette-number.is-result { animation: casino-result-pulse 1s ease-in-out 2; box-shadow: inset 0 0 0 3px #fff; }
.blackjack-table { display: grid; gap: 10px; }
.blackjack-table p { margin: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.blackjack-table small { color: var(--green); font-size: 14px; }
.card-hand b { border-radius: 3px; transition: transform .35s ease, opacity .35s ease; }
.card-hand b.card-back { background: repeating-linear-gradient(45deg, #17271a 0 5px, #d3ba62 5px 7px); color: #d3ba62; }
.blackjack-table.is-playing .card-hand b { animation: casino-card-deal .55s ease-out both; }
.blackjack-table.is-playing .card-hand b:nth-child(2) { animation-delay: .12s; }
.blackjack-status { color: var(--green); font-size: 12px; }
.slots-machine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 330px; margin: 28px auto; padding: 8px; gap: 8px; background: #080908; border: 2px solid #bcae69; box-shadow: 0 12px 25px rgba(0,0,0,.45); overflow: hidden; }
.slots-reel { height: 108px; overflow: hidden; background: #111; border: 1px solid var(--line); }
.slots-strip { display: grid; grid-auto-rows: 108px; transition: transform .55s cubic-bezier(.15,.82,.2,1); }
.slots-reel span { display: grid; place-items: center; color: var(--green); font-size: 36px; font-weight: 900; }
.slots-reel.is-spinning .slots-strip { animation: casino-reel-spin .24s linear infinite; }
.slots-reel.delay-1 { animation-delay: .06s; }.slots-reel.delay-2 { animation-delay: .12s; }
.slots-reel.is-stopped { animation: none; }
.dice-table.is-playing span { animation: dice-roll .85s ease-in-out both; }
.dice-table.is-playing span { filter: drop-shadow(0 0 9px rgba(181,255,62,.65)); }
.dice-table #dice-total { min-width: 54px; padding: 9px 5px; border: 1px solid var(--green); background: #080b08; font-size: 21px; }
.dice-table #dice-rule { max-width: 430px; margin: 8px auto 0; color: var(--text); font-size: 12px; line-height: 1.45; }
.dice-table #dice-rule b { color: var(--green); }
.dice-simple { display: grid; grid-template-columns: 1fr; gap: 14px; }
.dice-simple > div:first-child { display: grid; justify-items: center; }
.dice-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 320px; width: 100%; margin: 0 auto; }
.dice-picker button { min-height: 44px; border: 1px solid var(--line); background: #101510; color: var(--text); font: 800 15px var(--font); cursor: pointer; }
.dice-picker button.is-selected { border-color: var(--green); background: var(--green); color: #090b09; box-shadow: 0 0 14px rgba(181,255,62,.22); }
.games-balance { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); background: #0a0a0a; }
.games-balance > span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.games-balance strong { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 15px; }
.games-balance .coin-mark { width: 21px; height: 21px; font-size: 10px; }
.friend-request-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; flex: 0 0 auto; }
.friend-request-actions .bot-button { min-height: 42px; padding-inline: 9px; }
.friend-request-actions .decline-request { color: var(--muted); border-color: var(--line); }
.friend-request-actions .decline-request:hover { color: var(--text); border-color: #8d3c3c; background: rgba(150, 42, 42, .12); }
.table-bet { justify-content: flex-end; margin: 16px 0; }
#casino-table-message { text-align: center; color: var(--green); }
.blackjack-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.blackjack-actions button { min-height: 52px; border: 1px solid var(--green); background: #101510; color: var(--green); font: 800 12px var(--font); cursor: pointer; }
.blackjack-actions button:last-child { border-color: var(--line); color: var(--text); }
@keyframes casino-reel-spin { from { transform: translateY(0); } to { transform: translateY(-648px); } }
@keyframes casino-card-deal { from { opacity: 0; transform: translateY(40px) rotate(-16deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
@keyframes casino-result-pulse { 50% { transform: scale(1.15); filter: brightness(1.8); } }
@media (max-width: 540px) {
  .roulette-table { padding: 16px 10px; }
  .roulette-table-wheel { width: 174px; height: 174px; }
  .blackjack-table, .slots-table, .dice-table { padding: 20px 12px; }
  .card-hand b { width: 61px; height: 89px; }
}

/* STAY Slots: original 5 × 3 pattern table */
.slots-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slot-info-button { border: 1px solid var(--green); background: transparent; color: var(--green); padding: 8px 10px; font: 800 10px var(--font); cursor: pointer; }
.slots-machine.slots-5x3 { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 560px; margin: 22px auto; padding: 7px; gap: 5px; border-color: #bcae69; }
.slots-5x3 .slots-reel { height: auto; min-height: 210px; display: grid; grid-template-rows: repeat(3, 1fr); overflow: hidden; border-color: rgba(188,174,105,.5); transform-origin: center; }
.slots-5x3 .slots-reel span { min-height: 68px; border-bottom: 1px solid rgba(255,255,255,.09); font-size: clamp(25px, 7vw, 40px); transition: background .2s, color .2s, box-shadow .2s; }
.slots-5x3 .slots-reel span:last-child { border-bottom: 0; }
.slots-5x3 .slots-reel.is-spinning { animation: slot-column-spin .22s linear infinite; }
.slots-5x3 .slots-reel.delay-1 { animation-delay: .04s; }.slots-5x3 .slots-reel.delay-2 { animation-delay: .08s; }.slots-5x3 .slots-reel.delay-3 { animation-delay: .12s; }.slots-5x3 .slots-reel.delay-4 { animation-delay: .16s; }
.slots-5x3 .slots-reel span.is-winning { color: #fff; background: rgba(181,255,62,.21); box-shadow: inset 0 0 0 2px var(--green); animation: slot-win-pulse .75s ease-in-out 2; }
.slot-paytable { margin-top: 18px; padding: 14px; border: 1px solid var(--line); text-align: left; background: #090a09; }
.slot-paytable h3, .slot-paytable h4 { margin: 0; color: var(--text); text-transform: uppercase; }
.slot-paytable h3 { font-size: 14px; }.slot-paytable h4 { color: var(--green); font-size: 11px; }
.slot-paytable > p { margin: 8px 0 14px; font-size: 11px; line-height: 1.45; }
.slot-paytable-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.slot-paytable-grid > div { border: 1px solid var(--line); }
.slot-paytable-grid p { display: flex; justify-content: space-between; gap: 8px; margin: 0; padding: 7px 8px; border-top: 1px solid var(--line); font-size: 10px; }
.slot-paytable-grid p span { color: var(--green); font-weight: 900; white-space: nowrap; }
@keyframes slot-column-spin { from { transform: translateY(0); } to { transform: translateY(-10px); } }
@keyframes slot-win-pulse { 50% { transform: scale(1.08); filter: brightness(1.4); } }
@media (max-width: 540px) {
  .slots-machine.slots-5x3 { gap: 3px; padding: 4px; }
  .slots-5x3 .slots-reel { min-height: 168px; }
  .slots-5x3 .slots-reel span { min-height: 54px; font-size: 26px; }
  .slot-paytable-grid { grid-template-columns: 1fr; }
}
.friend-row { border-left: 3px solid var(--green); }
.challenge-button { border-radius: 0; }
.skeleton-row { border-radius: 0; }

.profile-hero {
  min-height: 290px;
  border: 1px solid var(--line-strong);
  padding: 46px 36px;
}
.profile-avatar { border-color: var(--green); background: #101010; }
.profile-avatar i { border-radius: 0; }
.profile-hero h1 { font-size: clamp(42px, 7vw, 72px); letter-spacing: .01em; }
.rating-panel { margin-top: 14px; }
.rating-panel::after { border-radius: 0; }
.rank-orbit { border-radius: 0; }
.rank-orbit::before { border-radius: 0; }
.rank-progress { border-radius: 0; }

.bottom-nav {
  height: 62px;
  bottom: calc(14px + var(--safe-bottom));
  border-radius: 0;
  border-color: rgba(255, 229, 0, .5);
  background: rgba(7, 7, 7, .94);
  padding: 0;
  backdrop-filter: blur(14px);
  grid-template-columns: repeat(5, 1fr);
}
.bottom-nav button {
  border-radius: 0;
  border-right: 1px solid var(--line);
  text-transform: uppercase;
}
.bottom-nav button:last-child { border-right: 0; }
.bottom-nav button.is-active { background: var(--green); color: #080808; }

.sheet-backdrop { background: rgba(0,0,0,.84); }
.sheet-panel {
  border-radius: 0;
  border-color: var(--green);
  background-color: #080808;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
}
.close-button,
.player-chip,
.avatar-small,
.board-wrap,
.ttt .game-cell,
.radar,
.radar::before,
.radar::after,
.radar span,
.sheet-actions button,
.toast {
  border-radius: 0;
}
.board-wrap { border-color: var(--line-strong); }
.ttt .game-cell { background: #151515; }
.grid-8 .game-cell.is-selected { box-shadow: inset 0 0 0 4px var(--green); }
.waiting-state { background: rgba(7,7,7,.97); }

.primary-action:hover {
  box-shadow: none;
  background: var(--text);
}

.bot-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 229, 0, .08);
}

.live-count i {
  animation: signal-pulse 1.8s infinite;
}

@keyframes signal-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.game-board.grid-8 .game-cell { background: #c7c7bd; }
.game-board.grid-8 .game-cell.dark { background: #33332f; }
.ttt .game-cell.is-winning { background: rgba(255, 229, 0, .11); }

@media (max-width: 760px) {
  body { background-size: 28px 28px; }
  .app-shell {
    width: 100%;
    padding-inline: 12px;
    border-inline: 0;
  }
  .app-shell::before,
  .app-shell::after { display: none; }
  .topbar {
    height: 58px;
    margin-inline: -12px;
    border-inline: 0;
  }
  .brand { padding: 0 14px; font-size: 12px; }
  .wallet-chip { height: 36px; }
  .wallet-chip { min-height: 44px; }
  .wallet-chip .coin-mark { width: 42px; height: 42px; }
  .avatar-button { width: 44px; height: 44px; }
  .view { padding-top: 12px; }
  .platform-hero,
  .hero,
  .casino-hero {
    min-height: 470px;
    padding: 24px 18px;
    grid-template-columns: 1fr;
  }
  .platform-hero::before,
  .hero::before { top: 18px; right: 16px; font-size: 7px; }
  .platform-copy h1,
  .hero h1,
  .casino-hero h1 { margin-top: 92px; }
  .hero h1 { font-size: clamp(48px, 15vw, 64px); }
  h1,
  .platform-copy h1 { font-size: clamp(48px, 16vw, 64px); line-height: .9; }
  .platform-copy > p:last-child,
  .hero-text { max-width: 280px; font-size: 11px; }
  .platform-signal,
  .hero-orbit {
    width: 240px;
    right: -95px;
    bottom: -55px;
    opacity: .5;
  }
  .platform-status { grid-template-columns: 1fr; gap: 12px; }
  .platform-status-line { width: 100%; height: 1px; }
  .section-heading { min-height: 76px; margin-top: 18px; }
  .section-heading h2 { font-size: 32px; }
  .live-count { font-size: 10px; }
  .platform-portals { grid-template-columns: 1fr; }
  .portal-card { min-height: 390px; }
  .portal-content h2 { font-size: 30px; }
  .game-card {
    grid-template-columns: 118px 1fr;
    min-height: 218px;
  }
  .game-visual { min-height: 218px; }
  .visual-ttt {
    grid-template-columns: repeat(3, 37px);
    grid-template-rows: repeat(3, 37px);
  }
  .visual-checkers,
  .visual-chess { width: 145px; height: 145px; margin: 36px 0 0 -17px; }
  .chess-preview-piece { font-size: 16px; }
  .game-info { padding: 27px 12px 14px; }
  .game-title-row h3 { font-size: 16px; }
  .game-info > p { font-size: 10px; }
  .game-actions { gap: 5px; }
  .play-button,
  .bot-button { min-height: 44px; }
  .play-button { padding: 10px 8px; font-size: 9px; }
  .bot-button { padding: 9px 7px; font-size: 9px; }
  .casino-grid { grid-template-columns: 1fr; }
  .casino-game { min-height: 210px; grid-template-columns: 42% 1fr; }
  .casino-game-art { min-height: 210px; }
  .page-intro,
  .profile-hero { min-height: 260px; padding: 30px 20px; }
  .profile-hero { gap: 12px; }
  .profile-avatar { width: 64px; height: 64px; }
  .profile-hero h1 { font-size: 32px; }
  .stats-grid { gap: 1px; background: var(--line); border: 1px solid var(--line); }
  .stats-grid article { border: 0; padding: 12px 8px; }
  .bottom-nav {
    width: calc(100% - 24px);
    height: 58px;
  }
  .bottom-nav button { min-width: 44px; min-height: 44px; flex-direction: column; gap: 1px; font-size: 9px; }
  .nav-icon { font-size: 16px; }
  .sheet-panel { padding-inline: 12px; }
}

/* Telegram profile photos keep their native circular presentation. */
.avatar-button,
.profile-avatar {
  border-radius: 50%;
  overflow: hidden;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-image[hidden],
.avatar-initials[hidden],
.profile-initials[hidden] {
  display: none;
}

.profile-avatar-image {
  position: absolute;
  inset: 0;
}

.profile-avatar i {
  border-radius: 50%;
  z-index: 2;
}

/* Simplified home: one clear description and one primary action. */
.home-intro {
  min-height: min(650px, calc(100svh - 150px));
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  padding: clamp(44px, 7vw, 78px);
  position: relative;
  overflow: hidden;
  background: rgba(7, 7, 7, .74);
}

.home-intro::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 6px;
  top: 0;
  left: clamp(44px, 7vw, 78px);
  background: var(--green);
}

.home-intro-copy {
  width: min(100%, 760px);
  position: relative;
  z-index: 1;
}

.home-intro h1 {
  margin: 34px 0 30px;
  font-size: clamp(64px, 9vw, 104px);
  line-height: .92;
  letter-spacing: .012em;
}

.home-description {
  max-width: 670px;
  margin: 0;
  color: #b0b0aa;
  font-size: 15px;
  line-height: 1.85;
}

.home-primary {
  min-height: 54px;
  margin-top: 34px;
  padding: 0 6px 0 20px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #080808;
  display: inline-flex;
  align-items: center;
  gap: 28px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.home-primary span:last-child {
  width: 42px;
  height: 42px;
  background: #080808;
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.home-primary:hover {
  background: var(--text);
  border-color: var(--text);
}

.home-note {
  margin: 18px 0 0;
  color: #777;
  font-size: 9px;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: .08em;
}

@media (max-width: 760px) {
  .home-intro {
    min-height: calc(100svh - 142px);
    padding: 42px 20px 54px;
    align-items: center;
  }

  .home-intro::after {
    left: 20px;
    width: 64px;
  }

  .home-intro h1 {
    margin: 26px 0 24px;
    font-size: clamp(48px, 16vw, 62px);
  }

  .home-description {
    font-size: 12px;
    line-height: 1.8;
  }

  .home-primary {
    width: 100%;
    min-height: 52px;
    margin-top: 28px;
    justify-content: space-between;
  }

  .home-note {
    max-width: 280px;
    font-size: 8px;
  }
}

/* Stable, readable game boards and lightweight move feedback. */
.game-board.ttt {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 4px;
  background: rgba(255, 229, 0, .62);
}

.game-cell {
  min-width: 0;
  min-height: 0;
  padding: 0;
  transition:
    background-color .18s ease,
    box-shadow .18s ease,
    transform .14s ease,
    filter .18s ease;
}

.game-cell:active:not(:disabled) {
  transform: scale(.96);
}

.game-board.is-bot-thinking .game-cell {
  cursor: wait;
}

.ttt .game-cell {
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045);
}

.ttt .game-cell:hover:not(:disabled) {
  background: #191919;
}

.ttt-mark {
  width: 48%;
  aspect-ratio: 1;
  position: relative;
  display: block;
  color: transparent;
  font-size: 0;
}

.x .ttt-mark::before,
.x .ttt-mark::after {
  content: "";
  position: absolute;
  width: 112%;
  height: clamp(7px, 2.2vw, 13px);
  top: 50%;
  left: 50%;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(255, 229, 0, .16);
}

.x .ttt-mark::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.x .ttt-mark::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.o .ttt-mark {
  border: clamp(7px, 2.2vw, 13px) solid #f1f1ed;
  border-radius: 50%;
}

.ttt .game-cell.is-winning {
  background: rgba(255, 229, 0, .13);
  box-shadow: inset 0 0 0 3px var(--green);
}

.grid-8 .game-cell.is-legal-move {
  cursor: pointer;
  box-shadow: inset 0 0 0 3px rgba(255, 229, 0, .78);
  z-index: 2;
}

.grid-8 .game-cell.is-legal-move::before {
  content: "";
  position: absolute;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(255, 229, 0, .18);
  animation: legal-target-pulse 1.35s ease-in-out infinite;
}

.grid-8 .game-cell.is-capture::before {
  width: 48%;
  background: transparent;
  border: 4px solid var(--green);
  box-shadow: 0 0 0 5px rgba(255, 229, 0, .14);
}

.grid-8 .game-cell.is-selected .checker-piece,
.grid-8 .game-cell.is-selected .chess-piece {
  animation: piece-select .22s ease-out both;
  filter: drop-shadow(0 8px 7px rgba(0, 0, 0, .45));
}

.checker-piece.is-new,
.chess-piece.is-new,
.ttt-mark.is-new {
  animation: piece-land .28s cubic-bezier(.2, .9, .25, 1.25) both;
}

.game-message {
  transition: color .2s ease, opacity .2s ease;
}

@keyframes piece-land {
  from { opacity: 0; transform: scale(.62); }
  70% { opacity: 1; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes piece-select {
  from { transform: scale(1); }
  to { transform: translateY(-3px) scale(1.08); }
}

@keyframes legal-target-pulse {
  0%, 100% { opacity: .72; transform: scale(.88); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 760px) {
  .game-board.ttt {
    gap: 2px;
    padding: 3px;
  }

  .x .ttt-mark::before,
  .x .ttt-mark::after {
    height: clamp(7px, 2.8vw, 11px);
  }

  .o .ttt-mark {
    border-width: clamp(7px, 2.8vw, 11px);
  }

  .grid-8 .game-cell.is-legal-move {
    box-shadow: inset 0 0 0 2px rgba(255, 229, 0, .85);
  }
}

.checkers-variants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.checkers-option {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}

.checkers-option strong,
.checkers-option span {
  display: block;
}

.checkers-option strong {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 11px;
  letter-spacing: .04em;
}

.checkers-option > div > span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .025em;
}

.checkers-option .game-actions {
  margin-top: auto;
  padding-top: 0;
}

.grid-8 .game-cell.has-moving-piece {
  z-index: 5;
}

.chess-piece {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.checker-piece.is-moving,
.grid-8 .game-cell.is-selected .checker-piece.is-moving {
  animation: checker-travel .34s cubic-bezier(.22, .8, .24, 1) both;
}

.chess-piece.is-moving,
.grid-8 .game-cell.is-selected .chess-piece.is-moving {
  animation: chess-travel .34s cubic-bezier(.22, .8, .24, 1) both;
}

@keyframes checker-travel {
  from { transform: translate(var(--move-x), var(--move-y)) scale(.96); }
  70% { transform: translate(0, 0) scale(1.06); }
  to { transform: translate(0, 0) scale(1); }
}

@keyframes chess-travel {
  from { transform: translate(var(--move-x), var(--move-y)) scale(.94); }
  72% { transform: translate(0, 0) scale(1.05); }
  to { transform: translate(0, 0) scale(1); }
}

@media (max-width: 760px) {
  .checkers-variants {
    grid-template-columns: 1fr;
    margin-top: 10px;
  }

  .checkers-option {
    padding: 9px;
  }
}
