@font-face {
  font-family: Onest;
  src: url('/assets/board/onest-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Onest;
  src: url('/assets/board/onest-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Comfortaa;
  src: url('/assets/board/comfortaa-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: Comfortaa;
  src: url('/assets/board/comfortaa-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

:root {
  color-scheme: dark;
  --ink: #f7eeea;
  --muted: #b9a9a1;
  --accent: #ff743f;
  --paper: #f4eddf;
  --line: #f3d3bf25;
  --panel: #211b19;
  --panel-light: #302724;
  --dark: #130f0e;
  --heading: Comfortaa, Onest, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #100c0cdb, #100b0bbb 55%, #120a09e6), #160f0f url('/assets/board/storm.webp') center / cover fixed;
  color: var(--ink);
  font: 15px/1.5 Onest, sans-serif;
}
h1,h2,h3,p,fieldset { margin: 0; }
h1,h2,h3 { font-family: var(--heading); line-height: 1.22; letter-spacing: -.045em; }
h1 { font-size: clamp(31px,4vw,49px); }
h2 { font-size: clamp(18px,1.65vw,24px); font-weight: 700; }
h3 { font-size: 17px; }
small { font-size: 12px; }
a { color: inherit; text-decoration: none; }
svg { width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; }
img { display: block; max-width: 100%; }
button,input,textarea,select { font: inherit; }
button,summary { cursor: pointer; }
button {
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--panel-light);
  color: var(--ink);
  padding: 8px 12px;
}
button:not(:disabled):hover, .round-btn:hover { background: #49342c; border-color: var(--line); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid #ffa77f; outline-offset: 3px; }
input,textarea,select { color: inherit; min-width: 0; background: var(--dark); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
textarea { resize: vertical; }
::placeholder { color: #ae9e96; }
.sprite,.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.chip,.site-online,.stage-server { display: inline-flex; align-items: center; gap: 7px; border-radius: 30px; padding: 6px 11px; background: #1b1414d9; border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.chip i,.site-online i,.stage-server i,.server-caption i { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 10px #ff744f9c; }
.paper-button,.primary,.login-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 39px; padding: 8px 14px; border-radius: 12px;
  background: var(--paper); color: #211815; font-weight: 650; border: 1px solid transparent;
}
.paper-button:hover,.primary:hover,.login-button:not(:disabled):hover { background: #ffd7bf; color: #211815; }
.round-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border-radius: 11px; }
.text-button,.quiet-button { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.text-button svg,.quiet-button svg { width: 15px; height: 15px; }

.board-shell {
  width: min(1520px, calc(100% - 88px));
  margin: 39px auto;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 44% 35%, #65251f34, transparent 46%), linear-gradient(148deg,#261914,#191412 54%,#261817);
  display: grid;
  grid-template-columns: 64px minmax(0,1fr) minmax(272px, 300px);
  gap: 21px;
  align-items: start;
  padding: 15px;
  box-shadow: 0 30px 110px #000b, inset 0 1px #fff1;
}
.rail {
  position: sticky; top: 18px;
  min-height: min(738px, calc(100dvh - 76px));
  align-self: start; display: flex; flex-direction: column; align-items: center;
  padding: 10px 5px; border: 1px solid var(--line); border-radius: 19px;
  background: linear-gradient(160deg,#3d2a2466,#292220b8 45%,#382521ad);
}
.brand-mark {
  color: #ff936e; background: #120d0d;
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  box-shadow: inset 0 0 0 1px #f8a08732;
}
.brand-mark svg { width: 25px; height: 25px; }
.rail nav { margin-block: auto; display: grid; justify-items: center; gap: 8px; }
.rail .nav { display: grid; justify-items: center; align-content: center; gap: 3px; width: 51px; height: 51px; padding: 1px; background: transparent; font-size: 9px; color: var(--muted); }
.rail .nav svg { width: 19px; height: 19px; color: var(--ink); }
.rail .nav.active { color: white; background: #58423a; border-color: #ffc3aa45; }
.rail .nav.active svg { color: #ffad8b; }
.app { min-width: 0; }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 63px; margin-bottom: 16px; }
.board-brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.board-brand strong { font: 700 20px/1 var(--heading); letter-spacing: -.06em; }
.board-brand strong span { color: var(--accent); }
#crumb { font-size: 12px; padding: 8px 11px; border-radius: 10px; background: var(--paper); color: #211815; }
.quick-search { display: flex; align-items: center; width: min(270px,100%); border-radius: 12px; padding: 3px 4px 3px 10px; background: #161211; border: 1px solid var(--line); }
.quick-search label,.search { display: flex; align-items: center; flex: 1; min-width: 0; gap: 7px; color: var(--muted); }
.quick-search input,.search input { width: 100%; border: 0; background: none; font-size: 13px; padding: 5px 1px; }
.quick-search button { padding: 4px 6px; border-radius: 8px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-actions .login-button { min-height: 35px; padding: 6px 9px; font-size: 12px; }
.login-button svg { width: 17px; height: 17px; }
.player-balance { border-left: 1px solid #482b2544; padding-left: 7px; }
.mobile-chat-nav,#close-chat { display: none; }

.board-content { position: relative; min-height: 70vh; }
.board-content::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(#f2c8a923 .8px, transparent .9px) 0 0 / 17px 17px;
  mask-image: linear-gradient(180deg,#000 65%,transparent);
}
.board-content > * { position: relative; }
#page-heading { margin: 10px 0 22px; }
.entry-board { display: grid; gap: 22px; }
.stage {
  position: relative; min-height: clamp(298px,32vw,420px);
  display: flex; align-items: center; overflow: hidden;
  border-radius: 22px; border: 1px solid #edb8a53d; isolation: isolate;
  --scene: url('/assets/board/mirage.webp');
  background: linear-gradient(90deg,#120e0df5,#181110b8 39%,#17111011 82%),linear-gradient(0deg,#1009098c,transparent 44%),var(--scene) center / cover;
  box-shadow: 0 14px 36px #0904036b;
}
.stage-copy { padding: clamp(20px,4vw,52px); }
.stage h2 { margin: 18px 0 10px; font-size: clamp(45px,6.1vw,91px); font-weight: 700; letter-spacing: -.095em; line-height: .98; }
.stage h2 span { color: var(--accent); }
.stage p { color: #e4cfc3; max-width: 29ch; font-size: clamp(14px,1.4vw,17px); }
.stage-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.stage-actions .paper-button { padding: 9px 19px; }
.stage-actions .paper-button svg { width: 15px; }
.stage-server { max-width: 100%; }
.stage-server strong { overflow: hidden; text-overflow: ellipsis; }
.stage-deck { display: grid; grid-template-columns: minmax(0, 1fr) 148px; gap: 21px; align-items: end; position: relative; margin-top: 17px; }
.stage-deck::before { content: ''; position: absolute; left: 16px; right: 20px; top: -14px; height: 33px; border: 1px dashed #ffc8a548; border-bottom: 0; border-radius: 13px 13px 0 0; pointer-events: none; }
.client-modes { border: 0; padding: 0; min-width: 0; position: relative; }
.client-modes legend { padding: 0; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.client-mode-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.client-mode { position: relative; display: block; border-radius: 13px; overflow: hidden; cursor: pointer; border: 1px solid var(--line); background: #181211; }
.client-mode img { width: 100%; height: clamp(43px,6vw,82px); object-fit: cover; filter: brightness(.75); }
.client-mode strong { display: block; padding: 7px 5px; text-align: center; overflow-wrap: anywhere; font-size: 12px; font-weight: 550; }
.client-mode input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.client-mode:has(:checked) { background: #3d251e; border-color: #ff8958; }
.client-mode:hover img,.client-mode:has(:checked) img { filter: brightness(1); }
.client-mode:focus-within { outline: 2px solid #ffa77f; outline-offset: 2px; }
.side-note-wrap { isolation: isolate; padding: 4px 4px 0 0; }
.frag-promo { background: var(--paper); border-radius: 12px; color: #271b15; box-shadow: 0 6px 24px #0007; transform: rotate(-3deg); position: relative; }
.frag-promo::before { content: ''; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: #d8cbb9; transform: rotate(8deg) translate(2px,-1px); }
.frag-promo summary { display: grid; gap: 5px; background: var(--paper); border-radius: inherit; padding: 10px; position: relative; list-style: none; }
.frag-promo summary::-webkit-details-marker { display: none; }
.note-tag { color: #89381d; font-size: 11px; }
.frag-promo summary strong { font: 700 17px/1.18 var(--heading); letter-spacing: -.04em; }
.note-arrow { position: absolute; right: 7px; bottom: 8px; display: grid; place-items: center; background: #ef602f; color: #21110c; border-radius: 50%; width: 26px; height: 26px; }
.note-arrow svg { width: 14px; height: 14px; }
.frag-promo[open] { transform: none; }
.note-content { position: absolute; z-index: 4; right: 0; top: calc(100% + 5px); width: min(235px,75vw); padding: 13px; border-radius: 12px; background: var(--paper); box-shadow: 0 9px 25px #0008; font-size: 13px; }
.note-content a { display: flex; align-items: center; gap: 5px; margin-top: 9px; font-weight: 700; }

.board-content > section,.promo-match-row { margin-top: 22px; }
.section-title,.pass-head,.pass-track-head,.quests-top,.cap-heading,.side-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.section-title h2 svg { color: var(--accent); }
#server-section,.pass-panel,.home-match,#quest-section,#features-page,#home-features,#matches-section {
  padding: 16px; border-radius: 17px; background: #1c1716ec; border: 1px solid var(--line); min-width: 0;
}
.server-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 13px 0; }
.filters,.reward-switch__opts,.cap-filters,.match-tabs,.track-controls { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.filters button,.reward-opt,.cap-filters button,.match-tabs button { border-radius: 20px; font-size: 12px; padding: 5px 10px; }
button.selected,button.is-active,button.active,.match-tabs button[aria-selected=true] { background: #503026; border-color: #ff976b64; }
.search { border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; max-width: 245px; min-width: 112px; }
.search svg { width: 15px; }
.server-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.server-card { display: grid; grid-template-columns: 66px minmax(0,1fr); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #2a211e; position: relative; }
.card-art { position: relative; min-height: 70px; background: #241717; }
.card-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.mode-badge { display: none; }
.favorite { position: absolute; bottom: 5px; left: 5px; display: grid; place-items: center; padding: 0; width: 25px; height: 25px; background: #161211dc; border-radius: 8px; }
.favorite svg { width: 14px; height: 14px; }
.favorite.on { color: #ffab8a; background: #642f21; }
.card-body { min-width: 0; padding: 9px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 3px 6px; flex-wrap: wrap; }
.card-title h3 { font: 600 14px/1.25 Onest,sans-serif; letter-spacing: -.015em; }
.slots,.card-sub,.server-caption { color: var(--muted); font-size: 11px; }
.slots { display: inline-flex; align-items: center; gap: 3px; }
.slots svg { width: 12px; height: 12px; }
.slots.is-live svg { color: #ff986c; }
.card-sub { margin-top: 3px; overflow-wrap: anywhere; }
.card-actions { display: flex; gap: 5px; margin-top: 6px; }
.card-actions .primary,.card-actions button { font-size: 11px; padding: 3px 7px; min-height: 25px; border-radius: 7px; }
.card-actions svg { width: 12px; height: 12px; }
.occupancy { grid-column: 1/-1; height: 2px; background: #09070773; }
.occupancy::after { content: ''; width: var(--fill,0%); display: block; height: 100%; background: var(--accent); transition: width .4s; }
.server-caption { margin-top: 9px; display: flex; align-items: center; gap: 7px; }
.server-caption .round-btn { margin-left: auto; width: 28px; height: 28px; }
.server-caption svg { width: 14px; }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 18px; }
.empty p { color: var(--muted); margin: 7px 0; }
.pass-panel { background: linear-gradient(120deg,#201818f7,#2c1d1aef 70%),url('/assets/board/operator.webp') right center / cover; }
.pass-season,.pass-note,.pass-stat span,.pass-progress span,.pass-missions li div span,.quests-note,.reward-switch__label { color: var(--muted); font-size: 12px; }
.pass-season { color: #ffab88; margin-bottom: 5px; }
.pass-season span { color: var(--ink); background: #58352a; border-radius: 7px; padding: 2px 6px; }
.pass-open,.pass-return { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.pass-open svg { width: 14px; }
.pass-return,.pass-full,.pass-expanded .pass-open { display: none; }
.pass-expanded .pass-return,.pass-expanded .pass-full { display: revert; }
.pass-overview { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0; }
.pass-progress,.pass-stat { padding: 10px; border-radius: 11px; background: #ffffff0b; }
.pass-progress { flex: 1 0 48%; }
.pass-progress > div { display: flex; justify-content: space-between; gap: 8px; }
.pass-progress progress { display: block; margin-top: 5px; width: 100%; height: 7px; accent-color: var(--accent); }
.pass-stat { flex: 1; white-space: nowrap; }
.pass-stat > * { display: block; }
.pass-track { display: flex; gap: 5px; overflow: auto; margin-top: 9px; border-radius: 8px; scrollbar-color: #785043 transparent; }
.track-labels,.track-level { display: grid; flex: 0 0 87px; grid-template-rows: 24px 57px 57px; gap: 5px; text-align: center; font-size: 11px; }
.track-labels { flex-basis: 105px; position: sticky; left: 0; z-index: 1; background: #241916; }
.track-labels b,.track-reward,.track-level > b { display: grid; place-content: center; justify-items: center; border-radius: 8px; background: #342723; }
.track-reward:last-child { background: #4b2c22; color: #ffe0cb; }
.track-next .track-reward { box-shadow: inset 0 0 0 1px #ff946c9d; }
.track-reward img,.track-reward svg { width: 26px; height: 22px; object-fit: contain; }
.track-controls button { padding: 2px 10px; }
.pass-missions-title { margin-top: 15px; }
.pass-missions { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.pass-missions li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; border-radius: 9px; background: #ffffff08; padding: 7px 10px; font-size: 12px; }
.pass-missions li.pass-full { display: none; }
.pass-expanded .pass-missions li.pass-full { display: grid; }
.pass-missions li div > * { display: block; }
.pass-missions li > b,.pass-mission-done { color: #ffa887; }
.pass-premium,.pass-note { margin-top: 10px; }

.chat-panel {
  min-width: 0; position: sticky; top: 18px; display: flex; flex-direction: column; gap: 9px;
  padding: 7px; border-radius: 21px; background: #57433d;
  border: 1px solid #ecb5a24e; max-height: min(820px,calc(100dvh - 76px));
  box-shadow: 0 12px 28px #10080559;
}
.roulette-card,.chat-card { position: relative; border-radius: 15px; background: #1f1918; border: 1px solid #1b1312; min-width: 0; }
.roulette-card {
  flex: 0 0 auto; padding: 15px;
  background: linear-gradient(95deg,#1a1414e8,#241415a8), url('/assets/board/storm.webp') center / cover;
}
.side-title { gap: 7px; margin-bottom: 9px; }
.side-title h2 { font-size: 18px; }
.side-title > svg { color: #e19b85; }
.roulette-head,.roulette-subline,.roulette-footer,.roulette-head-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.roulette-head b { display: grid; font-size: 12px; font-weight: 450; color: var(--muted); }
.roulette-head b strong { color: var(--ink); font: 400 38px/1.18 var(--heading); letter-spacing: -.09em; }
.roulette-subline { color: var(--muted); font-size: 11px; }
.roulette-subline span:last-child { text-align: right; }
.roulette-sound { width: 35px; height: 35px; padding: 0; display: grid; place-items: center; }
.roulette-players { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.roulette-empty { font-size: 11px; color: var(--muted); }
.roulette-progress { height: 13px; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: #160e0ed9; margin: 10px 0; }
.roulette-progress > div { height: 100%; width: 0; background: radial-gradient(#ffa273 1px,transparent 1.6px) 0 0/5px 5px,#722a16; transition: width .3s; }
.roulette-footer { flex-wrap: wrap; }
.roulette-footer button { font-size: 12px; padding: 5px 8px; }
.roulette-footer svg { width: 13px; height: 13px; }
.roulette-bet-form,.roulette-amount { display: flex; align-items: center; gap: 5px; }
.roulette-bet-form { margin-top: 8px; }
.roulette-amount { min-width: 0; }
.roulette-amount input { width: 65px; }
.roulette-bet-form .primary { min-height: 32px; padding: 4px 8px; white-space: nowrap; }
.roulette-player,.roulette-winner { background: var(--panel-light); padding: 5px; border-radius: 7px; display: flex; align-items: center; gap: 4px; font-size: 11px; }
.roulette-player img,.roulette-winner img,.roulette-recent img,.roulette-spin img,.roulette-avatar { width: 25px; height: 25px; object-fit: cover; border-radius: 50%; }
.roulette-spin { position: relative; overflow: hidden; margin: 7px 0; }
.roulette-pointer { position: absolute; inset: 0 auto 0 50%; width: 2px; z-index: 2; background: var(--accent); }
#roulette-reel,#roulette-recent-list { display: flex; gap: 4px; }
#roulette-reel > * { flex: 0 0 36px; height: 34px; display: grid; place-items: center; }
.roulette-recent { font-size: 11px; margin-top: 7px; }
#roulette-recent-tooltip { position: absolute; z-index: 5; background: var(--dark); border: 1px solid var(--line); padding: 6px; border-radius: 8px; }

.chat-card { flex: 1 1 auto; min-height: 218px; display: flex; flex-direction: column; overflow: hidden; padding: 11px; }
.chat-card .side-title { flex-wrap: nowrap; }
.chat-card .side-title h2 { font-size: 16px; }
.chat-messages { flex: 1 1 auto; min-height: 92px; height: min(34vh,330px); overflow: auto; scrollbar-width: thin; scrollbar-color: #674b42 transparent; }
.message { display: flex; gap: 8px; align-items: flex-start; padding: 9px; margin: 4px 0; background: #332925; border: 1px solid #ffffff06; border-radius: 12px; position: relative; }
.message.mine { background: #3d2923; border-color: #e8936633; }
.message-avatar { position: relative; display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border-radius: 50%; background: #712f25; color: #ffcfbd; font-weight: 700; font-size: 12px; overflow: hidden; }
.message-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.message-content { min-width: 0; flex: 1; }
.message-head,.message-identity { display: flex; gap: 4px; align-items: baseline; }
.message-head { justify-content: space-between; flex-wrap: wrap; }
.message-identity { flex-wrap: wrap; }
.message-name,.message-body { font-size: 12px; overflow-wrap: anywhere; }
.message-time,.message-day,.message-deleted,.chat-loading,.chat-rules,.chat-welcome p { color: var(--muted); font-size: 11px; }
.message-day { text-align: center; margin: 8px 0 4px; }
.message-admin { font-size: 9px; color: #ffae8e; }
.message-admin svg { width: 11px; height: 11px; stroke: currentColor; fill: none; margin-right: 2px; }
.message-quote { padding: 3px 5px; margin: 3px 0; border-left: 2px solid var(--accent); font-size: 11px; overflow-wrap: anywhere; }
.message-quote b { display: block; }
.message-reactions,.message-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.message-actions { display: none; }
.message:focus-within .message-actions,.message:hover .message-actions,.message.actions-open .message-actions { display: flex; }
.message-actions button,.reaction-chip,.load-older,#chat-new { padding: 3px 6px; border-radius: 16px; background: #1f1715; font-size: 10px; }
.message-actions svg,.reaction-trigger svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }
.chat-welcome { padding: 12px; border: 1px dashed var(--line); border-radius: 12px; margin-top: 7px; }
.chat-welcome h3 { font-size: 13px; margin-bottom: 5px; }
.chat-login-block { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 0 0; color: var(--muted); font-size: 11px; }
.chat-login-block button { font-size: 11px; min-height: 31px; padding: 5px 9px; }
.chat-login-block:not([hidden]) + .chat-input-area { display: none; }
.chat-input-area { display: flex; align-items: center; gap: 4px; margin-top: 7px; border-radius: 11px; padding: 4px; background: var(--paper); color: #211815; }
.chat-input-area textarea { background: none; border: 0; min-height: 30px; max-height: 116px; padding: 4px; resize: none; flex: 1; font-size: 12px; }
.chat-input-area textarea::placeholder { color: #6d5a4f; }
.chat-input-area button { background: #241914; color: white; padding: 0; border-radius: 50%; width: 29px; height: 29px; }
.chat-input-area button svg { width: 15px; height: 15px; }
#chat-reply { background: var(--panel-light); padding: 5px 8px; font-size: 11px; border-radius: 8px; overflow-wrap: anywhere; }
#emoji-picker,.chat-reaction-picker { background: #28201c; border: 1px solid var(--line); padding: 6px; border-radius: 10px; }
#emoji-picker { position: absolute; bottom: 53px; right: 6px; max-width: calc(100% - 12px); }
.chat-reaction-picker { position: fixed; z-index: 12; }
.reaction-options { display: flex; gap: 4px; }
.reaction-options button,#emoji-picker button { padding: 3px 5px; font-size: 13px; }
.chat-rules { margin-top: 4px; }

.quests-top p,.cap-heading p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.quests,.cap-grid,.new-games-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 12px; }
.quest { border: 1px solid var(--line); border-radius: 13px; background: #2e231f; padding: 10px; display: grid; align-content: start; gap: 8px; min-width: 0; }
.quest__partner,.quest__reward,.quest__actions,.quests-note { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.quest__partner img { width: 71px; height: 25px; object-fit: contain; object-position: left center; }
.quest__partner span,.quest__reward span { color: var(--muted); font-size: 11px; }
.quest__reward { background: #160f0f6c; padding: 5px; border-radius: 8px; }
.quest__reward img { width: 50px; height: 36px; object-fit: contain; }
.quest__reward span { display: block; }
.quest__actions button,.quest__actions a { font-size: 11px; padding: 4px 5px; }
.quest__actions svg { width: 13px; height: 13px; }
.quest__actions .copy svg:last-child,.quest__actions .copy.is-copied svg:first-child { display: none; }
.quest__actions .copy.is-copied svg:last-child { display: inline; }
.quests-note { flex-wrap: nowrap; margin-top: 9px; }
.age { border: 1px solid #ffb68c66; padding: 2px 4px; border-radius: 5px; }
.cap-kicker,.cap-status { font-size: 11px; color: #fba885; }
.cap-filters { margin-top: 10px; }
.cap-card { padding: 0; overflow: hidden; text-align: left; }
.cap-shot img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.cap-tile-caption { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 8px; font-size: 12px; }
.cap-tile-caption svg { width: 13px; height: 13px; color: #ffa983; }
.cap-note,.cap-modal-note { font-size: 12px; color: var(--muted); margin-top: 9px; }
.cap-modal-nav { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: 9px; }
.new-games-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.new-game-card { min-height: 113px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: linear-gradient(90deg,#1a1516f5,#21171860),url('/assets/board/storm.webp') center / cover; display: flex; align-items: end; justify-content: space-between; }
.new-game-card.game-mlbb { background-image: linear-gradient(90deg,#191416f5,#23181860),url('/assets/board/operator.webp'); }
.new-game-card:hover { border-color: var(--accent); }
.new-game-card p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.new-game-card span,.match-state { border-radius: 20px; padding: 4px; background: #271915; }
.home-match > p,.match-empty,.match-loading,.match-warning,.match-source,.match-closed-note,.match-bet-note { color: var(--muted); font-size: 13px; margin: 8px 0; }
.match-table-wrap { overflow: auto; margin-top: 10px; }
.match-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.match-table th,.match-table td { padding: 8px; text-align: left; border-bottom: 1px solid var(--line); }
.match-table th { color: var(--muted); }
.match-table img,.match-team img,.home-team-picks img,.detail-team-picks img { width: 25px; height: 25px; object-fit: contain; }
.mt-teams,.match-tabs,.match-pagination,.match-detail-head,.match-bet-actions,.home-inline-bet,.match-stream-tabs,.match-form-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mt-league,.mt-mobile-time { display: block; color: var(--muted); }
.match-card,.match-unified,.match-stream-section,.match-forms,.match-mine-row { padding: 10px; background: var(--panel-light); border-radius: 12px; margin: 10px 0; }
.match-versus,.home-team-picks,.detail-team-picks,.match-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 8px 0; }
.match-versus { grid-template-columns: 1fr auto 1fr; }
.match-team,.home-team-picks label,.detail-team-picks label { display: flex; align-items: center; gap: 5px; padding: 6px; border-radius: 9px; background: #171211; min-width: 0; overflow-wrap: anywhere; }
.home-team-picks label:has(:checked),.detail-team-picks label:has(:checked) { outline: 1px solid var(--accent); }
.match-state { display: inline-flex; font-size: 11px; color: var(--muted); }
.match-state.is-live,.positive { color: #ffab85; }
.match-bet-actions input,.home-inline-bet input { width: 100px; }
.match-stream-section iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.match-form-row { padding: 5px; border-top: 1px solid var(--line); }

.view-dock {
  position: sticky; z-index: 5; bottom: 13px;
  width: max-content; max-width: 100%; display: flex; gap: 4px; margin: 17px auto 3px; padding: 5px;
  border: 1px solid #fcd3b846; border-radius: 15px; background: #151010ed; box-shadow: 0 7px 26px #090605a8;
  backdrop-filter: blur(10px);
}
.view-dock button { width: 37px; height: 36px; padding: 0; background: transparent; display: grid; place-items: center; }
.view-dock button:last-child { background: var(--paper); color: #251912; }
.view-dock button[aria-pressed=true] { background: #55372c; color: #ffad8b; }
.board-footer { margin: 20px 0 0; padding: 10px 0; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 10px; }
.board-footer svg { width: 13px; height: 13px; }
dialog { width: min(550px, calc(100% - 28px)); max-height: 88dvh; overflow: auto; padding: 22px; border: 1px solid #e5ac9569; border-radius: 19px; color: var(--ink); background: #271e1b; box-shadow: 0 20px 60px #100503bb; }
dialog::backdrop { background: #130a0aca; backdrop-filter: blur(4px); }
.dialog-close { float: right; margin: -8px -8px 6px 8px; }
#dialog-content h2 { margin: 4px 0 10px; }
#dialog-content p,#dialog-content ol { color: var(--muted); margin: 8px 0; }
#dialog-content code { display: inline-block; background: #110b0b; padding: 5px 7px; border-radius: 6px; color: #ffb69a; }
#dialog-content .primary { margin-top: 7px; }
#dialog-content .dialog-icon { color: var(--accent); margin-bottom: 6px; }
.avatar-upload { display: flex; align-items: center; gap: 9px; }
.avatar-upload img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.toast { position: fixed; z-index: 15; left: 50%; bottom: 64px; transform: translate(-50%,10px); color: #281811; background: var(--paper); font-size: 13px; border-radius: 10px; padding: 8px 12px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.game-sheet { width: min(970px,calc(100% - 32px)); margin: 35px auto; padding: clamp(14px,3vw,28px); border: 1px solid var(--line); border-radius: 24px; background: #211917eb; }
.game-sheet header,.game-brand { display: flex; align-items: center; gap: 8px; }
.game-sheet header { justify-content: space-between; margin-bottom: 14px; }
.game-brand { font: 700 19px/1 var(--heading); }
.game-brand img { width: 36px; height: 36px; }
.game-hero { padding: clamp(22px,6vw,70px); border-radius: 19px; border: 1px solid var(--line); background: linear-gradient(90deg,#150d0dec,#1f151450),var(--scene) center / cover; }
.game-hero h1 { margin: 15px 0 8px; }
.game-hero p { color: #e1cdc3; max-width: 43ch; margin: 9px 0 17px; }
.game-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 14px; }
.game-steps article { background: var(--panel-light); border-radius: 12px; padding: 12px; }
.game-steps p { color: var(--muted); margin-top: 6px; }

@media (max-width:1250px) {
  .board-shell { width: calc(100% - 48px); gap: 14px; grid-template-columns: 62px minmax(0,1fr) 255px; margin: 24px auto; }
  .board-brand strong { display: none; }
}
@media (max-width:1100px) {
  .board-shell { grid-template-columns: 62px minmax(0,1fr); }
  .board-brand strong { display: inline; }
  .chat-panel { position: fixed; z-index: 10; top: 10px; bottom: 10px; right: 10px; width: min(360px,calc(100% - 20px)); max-height: none; overflow: auto; }
  .chat-card { min-height: 290px; }
  #close-chat { display: grid; position: absolute; right: 11px; top: 11px; z-index: 1; }
  .roulette-card .side-title { padding-right: 28px; }
  .mobile-chat-nav { display: inline-grid; flex: 0 0 auto; }
  .mobile-chat-open::before { content: ''; position: fixed; z-index: 9; inset: 0; background: #110907b8; pointer-events: none; }
  .mobile-chat-open { overflow: hidden; }
}
@media (max-width:680px) {
  .board-shell { display: flex; flex-direction: column; width: calc(100% - 16px); gap: 5px; padding: 8px; margin: 8px auto; border-radius: 18px; }
  .rail { position: static; align-self: stretch; min-height: 0; border-radius: 13px; flex-direction: row; padding: 4px; gap: 5px; }
  .rail nav { margin: 0; display: flex; overflow: auto; scrollbar-width: none; }
  .rail .nav { flex: 0 0 43px; width: 43px; height: 41px; font-size: 8px; }
  .rail .nav svg { width: 16px; height: 16px; }
  .rail-help { display: none !important; }
  .brand-mark { width: 32px; height: 32px; flex: 0 0 auto; }
  .brand-mark svg { width: 20px; height: 20px; }
  .app { width: 100%; }
  .board-top { flex-wrap: wrap; gap: 6px; margin-bottom: 10px; min-height: 0; padding: 4px 0; }
  .board-brand { gap: 6px; }
  .board-brand strong { font-size: 15px; }
  #crumb { padding: 6px; font-size: 11px; }
  .top-actions { margin-left: auto; gap: 4px; }
  .top-actions .round-btn { width: 31px; height: 31px; }
  .top-actions .login-button { padding: 5px 6px; min-height: 31px; }
  .site-online { padding: 5px; }
  .site-online > span { display: none; }
  .quick-search { order: 3; width: 100%; }
  .stage { min-height: 280px; border-radius: 16px; background-position: 62% center; }
  .stage-copy { padding: 16px; }
  .stage h2 { font-size: clamp(40px,13vw,68px); }
  .stage-deck { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .side-note-wrap { width: 148px; margin: 0 4px 0 auto; }
  .stage-deck::before { display: none; }
  .entry-board,.board-content > section,.promo-match-row { margin-top: 13px; }
  .entry-board { gap: 14px; }
  #server-section,.pass-panel,.home-match,#quest-section,#features-page,#home-features,#matches-section { padding: 10px; border-radius: 13px; }
  .quests,.cap-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pass-missions li { gap: 5px; }
  .game-steps { grid-template-columns: 1fr; }
}
@media (max-width:440px) {
  .server-grid { grid-template-columns: 1fr; }
  .server-card { grid-template-columns: 77px minmax(0,1fr); }
  .new-game-card { min-height: 86px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (min-width:1101px) and (max-height:950px) {
  .board-shell { margin-block: 24px; }
  .stage { min-height: clamp(302px,27vw,375px); }
  .stage-copy { padding-block: 28px; }
  .client-mode img { height: clamp(53px,5vw,70px); }
}

@media (max-width:440px) {
  .client-mode strong { font-size: 10px; overflow-wrap: normal; }
}
