:root {
  color-scheme: light;
  --bg: #f2f0eb;
  --paper: #fffefa;
  --ink: #171714;
  --muted: #66625a;
  --line: rgba(23, 23, 20, 0.13);
  --accent: #ff5048;
  --accent-deep: #df3e37;
  --green: #3ea36e;
  --serif: "Noto Serif SC", serif;
  --mono: "DM Mono", monospace;
  --shadow: 0 24px 70px rgba(32, 27, 21, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; padding: 0 4vw; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px); }
.system-mode-bar { display: grid; grid-template-columns: auto 1fr auto; min-height: 42px; align-items: center; padding: 8px 4vw; border-bottom: 1px solid rgba(255, 80, 72, .25); background: #fff2de; color: #5e4630; gap: 18px; }
.system-mode-bar > span { display: flex; align-items: center; gap: 8px; }
.system-mode-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d49a3b; }
.system-mode-bar.connected i { background: var(--green); }
.system-mode-bar strong { font-size: 13px; }
.system-mode-bar p { margin: 0; font-size: 12px; }
.system-mode-bar button { padding: 5px 11px; border: 1px solid currentColor; border-radius: 999px; background: transparent; cursor: pointer; font-size: 11px; }
.brand, .user-button { display: flex; align-items: center; width: max-content; padding: 0; border: 0; background: transparent; cursor: pointer; }
.brand { gap: 11px; text-align: left; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.brand > span:last-child, .user-copy { display: grid; }
.brand strong { font-family: var(--mono); font-size: 15px; letter-spacing: .13em; }
.brand small, .user-copy small { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .13em; }
.main-nav { display: flex; align-self: stretch; gap: 34px; }
.nav-item { position: relative; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; }
.nav-item::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); content: ""; opacity: 0; transform: scaleX(.5); transition: .2s ease; }
.nav-item.active { color: var(--ink); }
.nav-item.active::after { opacity: 1; transform: scaleX(1); }
.nav-live-dot { position: absolute; top: 20px; right: -9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.floating-battle-controls { position: fixed; right: 24px; bottom: 24px; z-index: 75; display: flex; max-width: calc(100vw - 32px); align-items: flex-end; flex-direction: column; gap: 8px; touch-action: none; }
.active-battle-dock { position: static; z-index: 70; display: grid; grid-template-columns: auto auto auto; align-items: center; padding: 10px 11px 10px 15px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: #171714; color: #f5f1e9; box-shadow: 0 16px 45px rgba(0,0,0,.24); gap: 18px; }
.active-battle-dock > div { display: flex; align-items: center; gap: 10px; }
.active-battle-dock .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(255,80,72,.15); }
.active-battle-dock span { display: grid; }
.active-battle-dock small { color: #8f8c85; font-family: var(--mono); font-size: 10px; }
.active-battle-dock strong { font-size: 13px; }
.active-battle-dock time { font-family: var(--mono); font-size: 18px; }
.active-battle-dock button { height: 34px; padding: 0 15px; border: 0; border-radius: 999px; background: var(--accent); color: white; cursor: pointer; font-size: 13px; }
.test-battle-panel { position: static; z-index: 75; display: grid; grid-template-columns: 1fr repeat(5, auto); align-items: center; max-width: min(720px, calc(100vw - 48px)); padding: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: #171714; color: #f5f1e9; box-shadow: 0 18px 48px rgba(0,0,0,.25); gap: 7px; }
.test-battle-panel > div { display: grid; min-width: 120px; padding: 0 8px; }
.test-battle-panel span { color: #8f8c85; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; }
.test-battle-panel strong { font-size: 14px; }
.test-battle-panel button { height: 32px; padding: 0 11px; border: 1px solid #44443e; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; font-size: 13px; white-space: nowrap; }
.test-battle-panel button:hover { border-color: var(--accent); color: var(--accent); }
.user-cluster { position: relative; display: flex; justify-content: flex-end; gap: 12px; }
.friend-menu-wrap { position: relative; }
.friend-menu-button { position: relative; }
.friend-menu-button > span { position: absolute; top: -4px; right: -4px; display: grid; min-width: 17px; height: 17px; padding: 0 4px; place-items: center; border-radius: 999px; background: var(--accent); color: white; font-family: var(--mono); font-size: 10px; }
.friend-dropdown { position: absolute; top: 50px; right: 0; z-index: 80; display: flex; overflow: hidden; width: 340px; max-height: min(650px, calc(100vh - 90px)); flex-direction: column; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow); }
.friend-dropdown .friend-list { min-height: 120px; max-height: 310px; }
.icon-button { display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.user-button { gap: 9px; text-align: left; }
.avatar { display: inline-grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--serif); font-style: normal; }
.user-copy strong { font-size: 14px; }
.user-copy small b { color: var(--accent); }
.account-dropdown { position: absolute; top: 52px; right: 0; z-index: 85; display: grid; width: 240px; padding: 10px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); gap: 3px; }
.account-dropdown-user { display: flex; align-items: center; padding: 10px; margin-bottom: 5px; border-bottom: 1px solid var(--line); gap: 10px; }
.account-dropdown-user > div { display: grid; }
.account-dropdown-user strong { font-size: 14px; }
.account-dropdown-user small { color: var(--muted); font-size: 11px; }
.account-dropdown > button { padding: 10px; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 13px; }
.account-dropdown > button:hover { background: var(--bg); }
.account-dropdown .danger-action { color: var(--accent); }
.view { display: none; min-height: calc(100vh - 72px); }
.view.active { display: block; }
.eyebrow { margin: 0; color: var(--accent); font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .17em; }

.home-hero { position: relative; display: grid; grid-template-columns: 1fr minmax(390px, .76fr); min-height: 670px; align-items: center; padding: 80px 7vw; overflow: hidden; border-bottom: 1px solid var(--line); gap: 8vw; }
.home-hero-copy { position: relative; z-index: 1; }
.home-hero-copy h1 { margin: 14px 0 25px; font-size: clamp(68px, 8vw, 120px); letter-spacing: -.07em; line-height: 1.08; }
.home-hero-copy > p:last-of-type { max-width: 590px; color: var(--muted); font-size: 15px; line-height: 2; }
.home-featured-art { position: relative; z-index: 1; }
.home-featured-art button { position: relative; display: block; overflow: hidden; width: 100%; padding: 0; border: 0; background: #222; color: white; cursor: pointer; text-align: left; box-shadow: var(--shadow); }
.home-featured-art img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.home-featured-art button > span { position: absolute; right: 0; bottom: 0; left: 0; display: grid; padding: 45px 25px 22px; background: linear-gradient(transparent, rgba(12,12,10,.78)); }
.home-featured-art small { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }
.home-featured-art strong { margin-top: 5px; font-size: 25px; }
.home-featured-art em { position: absolute; right: 25px; bottom: 25px; font-family: var(--mono); font-size: 12px; font-style: normal; }
.home-featured-section { padding: 90px 7vw 110px; background: var(--paper); }
.home-featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1240px; margin: auto; gap: 16px; }
.home-featured-grid article { overflow: hidden; border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.home-featured-grid img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s ease; }
.home-featured-grid article:hover img { transform: scale(1.025); }
.home-featured-grid article > div { padding: 15px; }
.home-featured-grid small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.home-featured-grid h3 { margin: 7px 0 10px; font-size: 17px; }
.home-featured-grid span { color: var(--muted); font-size: 12px; }

.lobby-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .8fr); min-height: 690px; align-items: center; padding: 90px 7vw 70px; overflow: hidden; border-bottom: 1px solid var(--line); gap: 8vw; }
.hero-grid { position: absolute; inset: 0; opacity: .32; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(90deg, black, transparent 75%); pointer-events: none; }
.hero-copy, .match-console { position: relative; z-index: 1; }
.status-pill, .live-label { display: inline-flex; align-items: center; gap: 9px; color: var(--green); font-family: var(--mono); font-size: 13px; letter-spacing: .08em; }
.status-pill { margin-bottom: 50px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); border-radius: 999px; }
.status-pill i, .live-label i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 12%, transparent); }
.hero-copy h1 { max-width: 780px; margin: 15px 0 26px; font-size: clamp(64px, 7.4vw, 118px); font-weight: 600; letter-spacing: -.07em; line-height: 1.05; }
.hero-copy h1 em { color: var(--accent); font-style: normal; }
.hero-description { max-width: 610px; margin: 0; color: var(--muted); font-size: 16px; line-height: 2; }
.hero-actions { display: flex; margin-top: 38px; gap: 12px; }
.primary-button, .secondary-button { min-width: 138px; height: 46px; padding: 0 22px; border-radius: 999px; cursor: pointer; transition: .2s ease; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: white; }
.primary-button:hover { border-color: var(--accent-deep); background: var(--accent-deep); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.secondary-button:disabled { cursor: default; opacity: .7; }
.primary-button.large { display: flex; min-width: 178px; align-items: center; justify-content: center; gap: 16px; }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.secondary-button { border: 1px solid var(--line); background: transparent; }
.secondary-button:hover { border-color: var(--ink); }
.text-button { padding: 8px; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.match-console { min-height: 510px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); box-shadow: var(--shadow); }
.console-topline { display: flex; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; }
.match-state { display: flex; min-height: 370px; align-items: center; justify-content: center; padding: 34px; flex-direction: column; text-align: center; }
.match-state h2 { margin: 24px 0 8px; font-size: 26px; }
.match-state p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.radar { position: relative; display: grid; width: 176px; height: 176px; place-items: center; }
.radar i { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.radar i:nth-child(1) { inset: 0; }
.radar i:nth-child(2) { inset: 25px; }
.radar i:nth-child(3) { inset: 51px; }
.radar::before { position: absolute; width: 50%; height: 1px; background: var(--line); content: ""; transform-origin: right; animation: scan 3s linear infinite; }
.radar-core { position: relative; z-index: 1; display: grid; width: 64px; height: 64px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--mono); }
@keyframes scan { to { transform: rotate(360deg); } }
.search-orbit { position: relative; display: flex; width: 210px; height: 130px; align-items: center; justify-content: space-between; padding: 0 22px; }
.large-avatar { width: 66px; height: 66px; font-size: 23px; }
.search-question { display: grid; width: 66px; height: 66px; place-items: center; border: 1px dashed var(--muted); border-radius: 50%; color: var(--muted); font-family: var(--mono); font-size: 22px; }
.orbit-ring { position: absolute; inset: -8px 58px; border: 1px solid var(--accent); border-radius: 50%; animation: pulse 1.3s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .2; transform: scale(1.08); } }
.versus-row { display: flex; align-items: center; gap: 30px; }
.versus-row > div { display: grid; justify-items: center; gap: 8px; }
.versus { color: var(--accent); font-family: var(--mono); font-size: 16px; }
.opponent-avatar { background: #637d75; }
.console-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.console-stats div { display: grid; padding: 16px; border-right: 1px solid var(--line); text-align: center; }
.console-stats div:last-child { border: 0; }
.console-stats strong { font-family: var(--mono); font-size: 15px; }
.console-stats span { margin-top: 3px; color: var(--muted); font-size: 13px; }

.waiting-rooms-section { padding: 85px 7vw 105px; background: var(--paper); }
.room-heading-actions { display: flex; align-items: center; gap: 22px; }
.room-heading-actions > span { display: flex; align-items: center; color: var(--muted); font-size: 13px; gap: 7px; }
.room-heading-actions > span i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent); }
.room-heading-actions > span b { color: var(--ink); font-family: var(--mono); }
.waiting-room-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1240px; margin: auto; gap: 16px; }
.waiting-room-card { display: flex; min-height: 315px; padding: 24px; flex-direction: column; border: 1px solid var(--line); background: var(--bg); }
.waiting-room-card.own-room { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.room-host { display: flex; align-items: center; gap: 11px; }
.room-host > div { display: grid; }
.room-host small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.room-host strong { font-size: 15px; }
.room-host div span { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.room-capacity-control { display: flex; align-items: center; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; gap: 8px; }
.room-capacity-control select { border: 0; background: transparent; color: var(--ink); font: inherit; outline: none; }
.room-details { display: flex; flex-wrap: wrap; margin-top: 22px; gap: 7px; }
.room-details > span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.room-details small { width: 100%; margin-top: 4px; color: var(--muted); font-size: 12px; }
.room-seat { display: flex; flex: 1; align-items: center; justify-content: center; align-content: center; gap: 8px; flex-wrap: wrap; }
.room-seat i { color: var(--accent); font-family: var(--mono); font-size: 13px; font-style: normal; }
.empty-seat { display: grid; width: 36px; height: 36px; place-items: center; border: 1px dashed var(--muted); border-radius: 50%; color: var(--muted); font-family: var(--mono); }
.room-actions { display: grid; gap: 8px; }
.room-actions button { width: 100%; }
.rooms-empty { display: flex; max-width: 1240px; min-height: 280px; align-items: center; justify-content: center; margin: auto; flex-direction: column; border: 1px dashed var(--line); color: var(--muted); gap: 8px; }
.rooms-empty strong { color: var(--ink); font-size: 18px; }

.community-page-hero { display: flex; min-height: 310px; align-items: flex-end; justify-content: space-between; padding: 70px 7vw 55px; border-bottom: 1px solid var(--line); background: var(--paper); gap: 35px; }
.community-page-hero h1 { margin: 8px 0 10px; font-size: clamp(58px, 8vw, 94px); }
.community-page-hero > div:first-child > p:last-child { max-width: 600px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.community-page-content { display: grid; grid-template-columns: 230px minmax(0, 1fr); max-width: 1200px; min-height: 650px; margin: 55px auto 90px; border: 1px solid var(--line); background: var(--paper); }
.community-channel-list { padding: 25px 15px; border-right: 1px solid var(--line); background: var(--bg); }
.community-channel-list > .eyebrow { padding: 0 10px 18px; }
.community-channel-list button { display: grid; grid-template-columns: 28px 1fr; width: 100%; padding: 12px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-align: left; gap: 5px; }
.community-channel-list button.active { background: var(--ink); color: var(--bg); }
.community-channel-list button > span { font-family: var(--mono); font-size: 16px; }
.community-channel-list button div { display: grid; }
.community-channel-list strong { font-size: 13px; }
.community-channel-list small { opacity: .65; font-size: 11px; }
.community-chat-card { display: flex; min-width: 0; flex-direction: column; }
.community-chat-card .chat-messages { max-height: none; }
.community-chat-card .chat-composer { margin-top: auto; }

.lobby-community { padding: 80px 7vw 90px; border-bottom: 1px solid var(--line); background: var(--paper); }
.community-heading { display: flex; align-items: flex-end; justify-content: space-between; max-width: 1240px; margin: 0 auto 34px; gap: 35px; }
.community-heading h2 { margin: 8px 0 0; font-size: clamp(38px, 5vw, 60px); line-height: 1.1; }
.online-summary { display: flex; align-items: center; border: 1px solid var(--line); background: var(--bg); }
.online-summary div { position: relative; display: grid; min-width: 120px; padding: 14px 18px; border-right: 1px solid var(--line); text-align: center; }
.online-summary div:last-child { border: 0; }
.online-summary i { position: absolute; top: 15px; left: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent); }
.online-summary strong { font-family: var(--mono); font-size: 16px; }
.online-summary span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.community-tabs { display: none; }
.community-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr); overflow: hidden; max-width: 1240px; min-height: 530px; margin: auto; border: 1px solid var(--line); background: var(--bg); }
.community-panel { min-width: 0; }
.chat-panel { display: flex; min-height: 530px; flex-direction: column; border-right: 1px solid var(--line); background: var(--paper); }
.chat-header, .friends-header { display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.chat-header > div { display: flex; align-items: center; gap: 9px; }
.chat-header strong, .friends-header strong { font-size: 15px; }
.chat-header > span, .friends-header span { color: var(--muted); font-size: 12px; }
.online-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 12%, transparent); }
.chat-messages { flex: 1; overflow-y: auto; max-height: 405px; padding: 18px 22px; scroll-behavior: smooth; }
.chat-empty { display: grid; min-height: 180px; margin: 0; place-items: center; color: var(--muted); font-size: 13px; }
.chat-message { display: flex; max-width: 78%; margin-bottom: 18px; gap: 11px; }
.chat-message .avatar { width: 34px; height: 34px; font-size: 13px; }
.chat-message-body { min-width: 0; }
.chat-message-body > div { display: flex; align-items: center; gap: 9px; }
.chat-message-body strong { font-size: 13px; }
.chat-message-body time { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.chat-message-body p { margin: 5px 0 0; padding: 10px 13px; border: 1px solid var(--line); background: var(--bg); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.chat-message.own-message { margin-left: auto; flex-direction: row-reverse; }
.chat-message.own-message .chat-message-body > div { justify-content: flex-end; }
.chat-message.own-message p { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.chat-composer { position: relative; display: grid; grid-template-columns: 36px 1fr auto auto; min-height: 62px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); gap: 8px; }
.chat-composer input { min-width: 0; height: 40px; padding: 0 10px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.chat-composer > span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.chat-composer button { height: 36px; border: 0; cursor: pointer; }
.chat-composer button[type="submit"] { min-width: 68px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; }
.chat-composer button[type="submit"]:disabled { opacity: .55; }
.room-chat-panel { max-width: 760px; margin: 28px auto 0; border: 1px solid var(--line); background: var(--paper); }
.room-chat-panel > header { display: flex; min-height: 52px; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); }
.room-chat-panel > header > div { display: flex; align-items: center; gap: 10px; }
.room-chat-panel > header strong { font-size: 14px; }
.room-chat-panel > header span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.battle-room-chat { width: min(760px, calc(100% - 40px)); margin-bottom: 24px; }
.room-chat-messages { overflow-y: auto; height: 190px; padding: 14px 16px; }
.room-chat-message { max-width: 82%; margin-bottom: 11px; }
.room-chat-message.mine { margin-left: auto; text-align: right; }
.room-chat-message > div { display: flex; align-items: center; gap: 8px; }
.room-chat-message.mine > div { justify-content: flex-end; }
.room-chat-message strong { font-size: 13px; }
.room-chat-message time { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.room-chat-message p { display: inline-block; margin: 4px 0 0; padding: 8px 11px; border: 1px solid var(--line); background: var(--bg); font-size: 13px; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
.room-chat-message.mine p { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.room-chat-empty { display: grid; height: 100%; margin: 0; place-items: center; color: var(--muted); font-size: 13px; }
.room-chat-form { display: grid; padding: 10px; border-top: 1px solid var(--line); grid-template-columns: 1fr auto; gap: 8px; }
.room-chat-form input { min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); outline: 0; }
.room-chat-form button { min-width: 70px; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; }
.room-chat-form button:disabled { opacity: .55; }
.emoji-button { width: 36px; border-radius: 50%; background: transparent; color: var(--muted); font-size: 19px; }
.emoji-picker { position: absolute; bottom: 56px; left: 12px; z-index: 10; display: grid; grid-template-columns: repeat(6, 34px); padding: 8px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); gap: 5px; }
.emoji-picker button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid transparent; background: var(--bg); cursor: pointer; font-size: 17px; }
.emoji-picker button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
.friends-panel { display: flex; min-height: 530px; flex-direction: column; background: var(--bg); }
.friends-header > div { display: grid; }
.friends-header button { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); cursor: pointer; font-size: 18px; }
.friend-search-box { padding: 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.friend-search-box > label { display: flex; height: 40px; align-items: center; padding: 0 11px; border: 1px solid var(--line); background: var(--bg); gap: 8px; }
.friend-search-box svg { width: 16px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.friend-search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.friend-search-results { display: grid; margin-top: 8px; gap: 5px; }
.friend-search-results article, .friend-request { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 8px; background: var(--bg); gap: 8px; }
.friend-search-results .avatar, .friend-request .avatar { width: 30px; height: 30px; font-size: 13px; }
.friend-search-results article > div, .friend-request > div { display: grid; }
.friend-search-results strong, .friend-request strong { font-size: 13px; }
.friend-search-results small, .friend-request small { color: var(--muted); font-size: 11px; }
.friend-search-results button { min-width: 48px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; font-size: 11px; }
.friend-search-results button:disabled { color: var(--muted); cursor: default; }
.friend-search-empty { margin: 8px; color: var(--muted); font-size: 12px; text-align: center; }
.friend-requests { border-bottom: 1px solid var(--line); }
.friend-section-title { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; color: var(--muted); font-size: 12px; }
.friend-section-title b { display: grid; min-width: 18px; height: 18px; padding: 0 5px; place-items: center; border-radius: 999px; background: var(--line); color: var(--ink); font-family: var(--mono); font-size: 10px; }
.friend-request { margin: 0 10px 10px; background: var(--paper); }
.request-actions { display: flex; gap: 4px; }
.request-actions button { padding: 5px 7px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 11px; }
.request-actions .accept { border-color: var(--accent); background: var(--accent); color: white; }
.friend-list { overflow-y: auto; flex: 1; padding: 0 10px 12px; }
.friend-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); gap: 10px; }
.friend-avatar-wrap { position: relative; }
.friend-avatar-wrap .avatar { width: 36px; height: 36px; font-size: 13px; }
.friend-avatar-wrap b { position: absolute; right: 0; bottom: 1px; width: 9px; height: 9px; border: 2px solid var(--bg); border-radius: 50%; background: #aaa69e; }
.friend-avatar-wrap b.online { background: var(--green); }
.friend-item > div { display: grid; }
.friend-item strong { font-size: 13px; }
.friend-item small { color: var(--muted); font-size: 11px; }
.friend-item > button { position: relative; display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.friend-item svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.friend-unread { position: absolute; top: -4px; right: -5px; display: grid; min-width: 16px; height: 16px; padding: 0 4px; place-items: center; border-radius: 999px; background: var(--accent); color: white; font-family: var(--mono); font-size: 10px; }
.community-tabs button span { display: inline-grid; min-width: 17px; height: 17px; margin-left: 4px; place-items: center; border-radius: 999px; background: var(--accent); color: white; font-family: var(--mono); font-size: 10px; }

.content-section { padding: 100px 7vw; background: var(--paper); }
.compact-section { padding-top: 80px; padding-bottom: 90px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; max-width: 1240px; margin: 0 auto 42px; gap: 40px; }
.section-title-row h2, .page-hero h1, .admin-heading h1 { margin: 8px 0 0; font-size: clamp(40px, 5vw, 66px); line-height: 1.1; }
.section-title-row > p, .admin-heading > p { max-width: 440px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1240px; margin: auto; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.flow-grid article { position: relative; min-height: 280px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.flow-index { color: var(--accent); font-family: var(--mono); font-size: 14px; }
.flow-time { position: absolute; top: 26px; right: 28px; color: var(--muted); font-family: var(--mono); font-size: 26px; }
.flow-grid h3 { margin: 115px 0 12px; font-size: 24px; }
.flow-grid p { max-width: 300px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.empty-battle { display: flex; min-height: calc(100vh - 72px); align-items: center; justify-content: center; padding: 40px; flex-direction: column; text-align: center; }
.empty-symbol { display: grid; width: 120px; height: 120px; margin-bottom: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-family: var(--mono); font-size: 24px; }
.empty-battle h1 { margin: 12px 0; font-size: 38px; }
.empty-battle > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); }
.battle-stage-header { padding: 25px 6vw 30px; border-bottom: 1px solid var(--line); background: var(--paper); }
.battle-meta { display: flex; align-items: center; gap: 20px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.connection-state { display: inline-flex; align-items: center; margin-left: auto; gap: 6px; }
.connection-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.connection-state.offline { color: var(--accent); }
.connection-state.offline i { background: var(--accent); }
.live-label { color: var(--accent); }
.stage-clock { display: flex; align-items: flex-end; justify-content: space-between; max-width: 1180px; margin: 38px auto 30px; }
.stage-clock > div { display: grid; }
.stage-clock span { color: var(--muted); font-size: 14px; }
.stage-clock strong { font-size: 31px; }
.stage-clock time { font-family: var(--mono); font-size: clamp(56px, 9vw, 108px); letter-spacing: -.06em; line-height: .8; }
.phase-track { display: grid; grid-template-columns: auto 1fr auto 1fr auto; max-width: 720px; align-items: center; margin: auto; }
.phase-step { display: grid; justify-items: center; color: var(--muted); gap: 3px; }
.phase-step span { display: grid; width: 28px; height: 28px; margin-bottom: 5px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-family: var(--mono); font-size: 12px; }
.phase-step strong { font-size: 14px; }
.phase-step small { font-family: var(--mono); font-size: 12px; }
.phase-step.active { color: var(--accent); }
.phase-step.active span { border-color: var(--accent); background: var(--accent); color: white; }
.phase-step.complete span { border-color: var(--green); background: var(--green); color: white; }
.phase-line { height: 1px; margin: 0 14px 30px; background: var(--line); }
.phase-line.complete { background: var(--green); }
.test-battle-inline { display: flex; max-width: 980px; align-items: center; justify-content: center; margin: 28px auto 0; padding: 10px; border: 1px solid var(--line); background: var(--bg); gap: 8px; flex-wrap: wrap; }
.test-battle-inline > div { display: grid; min-width: 160px; margin-right: 6px; }
.test-battle-inline span { color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.test-battle-inline strong { font-size: 14px; }
.test-battle-inline button { height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 13px; white-space: nowrap; }
.test-battle-inline button:hover { border-color: var(--accent); color: var(--accent); }
.battle-topic { padding: 70px 20px 55px; text-align: center; }
.battle-topic > span { display: block; margin-top: 22px; color: var(--muted); font-size: 14px; letter-spacing: .3em; }
.battle-topic h1 { margin: 5px 0 15px; font-size: clamp(56px, 8vw, 102px); line-height: 1.1; }
.battle-topic > p:last-child { margin: 0; color: var(--muted); font-size: 15px; }
.host-battle-actions { display: flex; justify-content: center; margin-top: 22px; }
.battle-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); max-width: 1180px; align-items: stretch; margin: 0 auto 55px; gap: 14px; }
.battle-players article { display: flex; align-items: center; padding: 22px; border: 1px solid var(--line); background: var(--paper); gap: 15px; }
.battle-players article > div { display: grid; flex: 1; }
.battle-players small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.battle-players strong { margin: 3px 0; font-size: 18px; }
.battle-players article div span { color: var(--accent); font-family: var(--mono); font-size: 12px; }
.player-avatar { width: 52px; height: 52px; font-size: 20px; }
.ready-state { color: var(--green); font-family: var(--mono); font-size: 12px; font-style: normal; }
.battle-versus { font-size: 24px; }
.battle-workspace { min-height: 500px; padding: 70px 6vw 90px; border-top: 1px solid var(--line); background: var(--paper); }
.stage-panel { display: none; max-width: 1100px; margin: auto; }
.stage-panel.active { display: block; }
#creatingPanel, #finishedPanel { padding: 60px 20px; text-align: center; }
.stage-icon { margin-bottom: 12px; color: var(--accent); font-size: 48px; }
.stage-panel h2 { margin: 10px 0; font-size: 36px; }
.stage-panel > p:not(.eyebrow) { color: var(--muted); font-size: 15px; }
.creation-tips { display: flex; justify-content: center; margin-top: 35px; gap: 10px; }
.creation-tips span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.upload-zone { display: flex; min-height: 390px; align-items: center; justify-content: center; padding: 40px; flex-direction: column; border: 1px dashed var(--line); background: var(--bg); cursor: pointer; text-align: center; }
.upload-icon svg { width: 64px; fill: none; stroke: var(--muted); stroke-width: 1.2; }
.upload-zone h2 { font-size: 28px; }
.upload-zone p { margin: 0 0 25px; }
.spectator-upload-note { min-height: 300px; padding: 46px; border: 1px solid var(--line); background: var(--bg); text-align: center; }
.spectator-upload-note h2 { margin: 10px 0 12px; font-size: 28px; }
.spectator-upload-note p:not(.eyebrow) { margin: 0; color: var(--muted); }
.submission-preview { display: grid; grid-template-columns: minmax(260px, .8fr) 1fr; align-items: center; gap: 55px; }
.submission-preview img { width: 100%; max-height: 580px; object-fit: contain; background: var(--bg); }
.inline-actions { display: flex; margin-top: 28px; gap: 10px; }
.vote-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.vote-heading h2 { margin-bottom: 0; }
.vote-heading > span { color: var(--muted); font-size: 13px; }
.vote-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.vote-empty { grid-column: 1 / -1; margin: 0; padding: 42px; border: 1px dashed var(--line); background: var(--bg); color: var(--muted); text-align: center; }
.vote-card { position: relative; overflow: hidden; border: 2px solid transparent; background: var(--bg); transition: .2s ease; }
.vote-card.selected { border-color: var(--accent); }
.vote-card.own-work { opacity: .82; }
.vote-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #0f0f0d; cursor: zoom-in; }
.anonymous-tag { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 7px 11px; background: rgba(20,20,18,.75); color: white; font-size: 13px; backdrop-filter: blur(8px); }
.vote-heart-button { position: absolute; right: 14px; bottom: 14px; display: grid; width: 70px; height: 70px; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(20,20,18,.8); color: white; cursor: pointer; box-shadow: 0 12px 34px rgba(0,0,0,.2); backdrop-filter: blur(10px); }
.vote-heart-button span { color: #aaa69d; font-size: 26px; line-height: 1; }
.vote-heart-button small { margin-top: -7px; font-size: 12px; }
.vote-heart-button b { position: absolute; top: -6px; right: -6px; display: grid; min-width: 24px; height: 24px; padding: 0 6px; place-items: center; border-radius: 999px; background: var(--accent); color: white; font-family: var(--mono); font-size: 12px; }
.vote-heart-button:disabled { cursor: not-allowed; background: rgba(232,227,216,.9); color: var(--muted); }
.vote-heart-button:disabled span { color: var(--muted); }
.selected .vote-heart-button { background: var(--accent); color: white; }
.selected .vote-heart-button span { color: white; }
.selected .vote-heart-button b { background: var(--ink); }
.result-card { width: min(440px, 100%); margin: 32px auto; padding: 34px; border: 1px solid var(--line); background: var(--bg); }
.result-card > span { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.result-card > strong { display: block; margin: 10px; font-size: 34px; }
.result-card div { display: flex; justify-content: center; margin-top: 25px; gap: 10px; }
.result-card div b { color: var(--accent); }
.demo-toolbar { display: flex; align-items: center; justify-content: center; padding: 14px; border-top: 1px solid var(--line); background: var(--ink); color: var(--bg); gap: 8px; }
.demo-toolbar span { margin-right: 12px; color: #aaa69d; font-family: var(--mono); font-size: 12px; }
.demo-toolbar button { padding: 6px 10px; border: 1px solid #484842; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; font-size: 13px; }

.page-hero { display: flex; min-height: 350px; align-items: flex-end; justify-content: space-between; padding: 75px 7vw 65px; border-bottom: 1px solid var(--line); gap: 40px; }
.page-hero h1 { margin-top: 10px; font-size: clamp(70px, 9vw, 120px); }
.page-hero > div:first-child > p:last-child { max-width: 590px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.season-card { display: grid; min-width: 280px; padding: 25px; border: 1px solid var(--line); background: var(--paper); }
.season-card span, .season-card small { color: var(--muted); font-size: 13px; }
.season-card strong { margin: 8px 0; font-family: var(--mono); font-size: 24px; }
.leaderboard-content { padding: 55px 7vw 90px; background: var(--paper); }
.leaderboard-controls { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto 55px; }
.leaderboard-controls > span { color: var(--muted); font-size: 13px; }
.segmented-control { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.segmented-control button { min-width: 75px; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.segmented-control button.active { background: var(--ink); color: var(--bg); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 900px; align-items: end; margin: 0 auto 65px; gap: 16px; }
.podium-card { position: relative; display: flex; min-height: 245px; align-items: center; justify-content: center; padding: 30px 20px; flex-direction: column; border: 1px solid var(--line); background: var(--bg); text-align: center; }
.podium-card.rank-1 { min-height: 300px; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.podium-rank { position: absolute; top: 15px; left: 17px; color: var(--accent); font-family: var(--mono); }
.podium-avatar { width: 68px; height: 68px; margin-bottom: 14px; font-size: 25px; }
.rank-1 .podium-avatar { width: 86px; height: 86px; background: var(--accent); }
.podium-card > strong { font-size: 20px; }
.podium-card > small { margin: 5px 0 15px; color: var(--muted); font-size: 13px; }
.podium-card > b { font-family: var(--mono); font-size: 26px; }
.podium-card > b i { color: var(--muted); font-size: 12px; font-style: normal; }
.ranking-table { max-width: 1120px; margin: auto; border-top: 1px solid var(--line); }
.ranking-row { display: grid; grid-template-columns: 90px 1fr 120px 120px 140px; min-height: 72px; align-items: center; border-bottom: 1px solid var(--line); font-size: 14px; }
.ranking-head { min-height: 42px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.ranking-row > span:last-child { text-align: right; }
.ranking-user { display: flex; align-items: center; gap: 12px; }
.ranking-user .avatar { width: 34px; height: 34px; }
.ranking-user em { padding: 3px 6px; border-radius: 999px; background: var(--accent); color: white; font-family: var(--mono); font-size: 10px; font-style: normal; }
.ranking-row.current-user { margin: 0 -15px; padding: 0 15px; background: color-mix(in srgb, var(--accent) 5%, transparent); }

.event-hero { display: grid; grid-template-columns: 1.1fr .72fr; min-height: 620px; align-items: center; padding: 80px 8vw; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--paper); gap: 8vw; }
.event-badges { display: flex; align-items: center; margin-bottom: 45px; gap: 22px; }
.event-badges > span:last-child { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.event-hero-copy h1 { margin: 12px 0 25px; font-size: clamp(62px, 7vw, 108px); letter-spacing: -.06em; line-height: 1.08; }
.event-hero-copy > p:last-of-type { max-width: 620px; color: var(--muted); font-size: 15px; line-height: 2; }
.event-hero-actions { display: flex; margin-top: 34px; gap: 12px; }
.event-poster { position: relative; display: flex; overflow: hidden; min-height: 430px; align-items: center; justify-content: center; padding: 45px; flex-direction: column; background: #171714; color: #f6f1e8; text-align: center; }
.event-poster > span { position: absolute; top: 25px; left: 25px; font-family: var(--mono); font-size: 12px; letter-spacing: .18em; }
.event-poster > strong { position: relative; z-index: 1; font-size: clamp(58px, 7vw, 92px); line-height: 1.08; }
.event-poster > small { position: absolute; right: 25px; bottom: 25px; font-family: var(--mono); font-size: 12px; }
.poster-orbit { position: absolute; width: 320px; height: 320px; border: 1px solid #4d4d46; border-radius: 50%; }
.poster-orbit::before, .poster-orbit::after { position: absolute; inset: 42px; border: 1px solid #393934; border-radius: 50%; content: ""; }
.poster-orbit::after { inset: 95px; border-color: var(--accent); }
.event-content { padding: 70px 7vw 100px; }
.official-format-grid { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 1120px; margin: 0 auto 75px; gap: 18px; }
.format-card { position: relative; min-height: 350px; padding: 36px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.format-card::after { position: absolute; right: -85px; bottom: -85px; width: 230px; height: 230px; border: 1px solid var(--line); border-radius: 50%; content: ""; }
.format-card.regular-format { border-top: 3px solid var(--accent); }
.format-card.arena-format { border-top: 3px solid #587b76; }
.format-number { position: absolute; top: 30px; right: 32px; color: var(--muted); font-family: var(--mono); font-size: 14px; }
.format-card h2 { margin: 10px 0 20px; font-size: 45px; }
.format-card > strong { font-size: 16px; }
.format-card > p:not(.eyebrow) { max-width: 460px; margin: 15px 0 35px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.format-card dl { position: relative; z-index: 1; display: grid; margin: 0; gap: 10px; }
.format-card dl div { display: flex; justify-content: space-between; max-width: 440px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.format-card dt { color: var(--muted); }
.format-card dd { margin: 0; }
.event-stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1120px; margin: 0 auto 90px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--paper); }
.event-stat-strip div { display: grid; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.event-stat-strip strong { font-family: var(--mono); font-size: 25px; }
.event-stat-strip span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.event-title-row { align-items: center; }
.event-grid { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 1240px; margin: auto; gap: 20px; }
.active-official-notice { display: flex; max-width: 1240px; min-height: 56px; align-items: center; justify-content: space-between; margin: 0 auto 16px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); background: #171714; color: #f5f1e9; gap: 18px; }
.active-official-notice strong { color: var(--accent); font-family: var(--mono); font-size: 13px; letter-spacing: .12em; }
.active-official-notice span { font-size: 14px; line-height: 1.6; }
.event-card { display: grid; grid-template-columns: .8fr 1.2fr; min-height: 330px; border: 1px solid var(--line); background: var(--paper); }
.event-card-visual { position: relative; display: flex; overflow: hidden; justify-content: space-between; padding: 24px; flex-direction: column; background: var(--event-accent); color: white; }
.event-card-visual span, .event-card-visual small { position: relative; z-index: 1; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }
.event-card-visual strong { position: relative; z-index: 1; font-size: 39px; line-height: 1.1; }
.event-card-visual i { position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; }
.event-card-visual i::before { position: absolute; inset: 35px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; content: ""; }
.event-card-copy { display: flex; align-items: flex-start; padding: 25px; flex-direction: column; }
.event-card-labels { display: flex; align-items: center; gap: 7px; }
.event-card-status { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 11px; }
.event-type-badge { padding: 5px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11px; }
.event-type-badge.type-arena { background: #587b76; color: white; }
.event-midjoin-badge { padding: 5px 8px; border-radius: 999px; background: var(--accent); color: white; font-family: var(--mono); font-size: 11px; }
.event-live-alert { width: 100%; margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(255,80,72,.25); background: rgba(255,80,72,.08); color: var(--accent); font-size: 13px; }
.status-registration { color: var(--accent); }
.status-active { color: var(--green); }
.event-card-copy h3 { margin: 18px 0 5px; font-size: 21px; }
.event-card-copy > p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.event-card-copy dl { display: grid; width: 100%; margin: 0; gap: 8px; }
.event-card-copy dl div { display: flex; justify-content: space-between; font-size: 13px; }
.event-card-copy dt { color: var(--muted); }
.event-card-copy dd { margin: 0; }
.event-round-preview { display: grid; width: 100%; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); gap: 7px; }
.event-round-preview > strong { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.event-round-preview > span { display: grid; grid-template-columns: 95px 1fr auto; align-items: center; font-size: 11px; gap: 8px; }
.event-round-preview b { font-weight: 600; }
.event-round-preview em { overflow: hidden; color: var(--ink); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.event-round-preview small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.event-capacity { width: 100%; margin-top: auto; padding-top: 22px; }
.event-capacity span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.event-capacity span b { color: var(--ink); }
.event-capacity > i { display: block; height: 3px; background: var(--line); }
.event-capacity > i em { display: block; height: 100%; background: var(--accent); }
.event-action { width: 100%; margin-top: 18px; }

.history-hero { background: var(--paper); }
.archive-count { display: grid; min-width: 220px; padding: 24px; border-left: 1px solid var(--line); text-align: right; }
.archive-count strong { font-family: var(--mono); font-size: 54px; line-height: 1; }
.archive-count span { margin-top: 7px; color: var(--muted); font-size: 13px; }
.history-content { padding: 50px 5vw 100px; }
.history-filters { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(3, 170px); max-width: 1300px; margin: auto; gap: 10px; }
.history-filters select, .history-search { height: 48px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.history-filters select { padding: 0 13px; outline: none; font-size: 13px; }
.history-search { display: flex; align-items: center; padding: 0 14px; gap: 10px; }
.history-search svg { width: 18px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.history-search input { width: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14px; }
.history-summary { display: flex; align-items: center; justify-content: space-between; max-width: 1300px; margin: 24px auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.history-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1300px; margin: auto; gap: 16px; }
.history-card { overflow: hidden; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.history-image { position: relative; overflow: hidden; }
.history-image img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .45s ease; }
.history-card:hover .history-image img { transform: scale(1.025); }
.history-type, .winner-badge { position: absolute; top: 12px; padding: 6px 8px; background: rgba(18,18,16,.75); color: white; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; backdrop-filter: blur(7px); }
.history-type { left: 12px; }
.winner-badge { right: 12px; background: var(--accent); }
.history-image button { position: absolute; right: 14px; bottom: 14px; left: 14px; height: 40px; border: 0; background: rgba(255,255,255,.88); color: #171714; cursor: pointer; opacity: 0; transform: translateY(8px); transition: .2s ease; }
.history-card:hover .history-image button { opacity: 1; transform: translateY(0); }
.history-card-copy { padding: 15px; }
.history-card-copy small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.history-card-copy h3 { margin: 8px 0 15px; font-size: 17px; }
.history-card-copy > div { display: flex; align-items: center; gap: 8px; }
.history-card-copy .avatar { width: 29px; height: 29px; font-size: 13px; }
.history-card-copy strong { font-size: 13px; }
.history-card-copy em { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11px; font-style: normal; }
.history-empty { display: flex; max-width: 1300px; min-height: 280px; align-items: center; justify-content: center; margin: auto; flex-direction: column; border: 1px dashed var(--line); color: var(--muted); gap: 8px; }
.history-empty strong { color: var(--ink); font-size: 18px; }
.history-empty span { font-size: 13px; }
.artwork-dialog { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); overflow: hidden; width: min(1050px, 96vw); max-height: 90vh; background: var(--paper); box-shadow: var(--shadow); }
.artwork-dialog-image { display: grid; min-height: 620px; place-items: center; overflow: auto; background: #181815; }
.artwork-dialog-image img { width: 100%; height: 100%; object-fit: contain; }
.artwork-dialog-copy { display: flex; overflow-y: auto; padding: 55px 42px 40px; flex-direction: column; }
.artwork-dialog-copy h2 { margin: 10px 0 28px; font-size: 36px; }
.artwork-author { display: flex; align-items: center; padding-bottom: 25px; border-bottom: 1px solid var(--line); gap: 11px; }
.artwork-author > div { display: grid; }
.artwork-author small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.artwork-dialog-copy > p:not(.eyebrow) { margin: 25px 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.artwork-dialog-copy dl { display: grid; margin: auto 0 0; gap: 12px; }
.artwork-dialog-copy dl div { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.artwork-dialog-copy dt { color: var(--muted); }
.artwork-dialog-copy dd { margin: 0; }

.admin-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-width: 0; min-height: calc(100vh - 72px); }
.admin-sidebar { position: sticky; top: 72px; display: flex; height: calc(100vh - 72px); padding: 38px 26px; flex-direction: column; border-right: 1px solid var(--line); background: var(--ink); color: var(--bg); }
.admin-sidebar h2 { margin: 7px 0 0; font-size: 25px; }
.admin-sidebar nav { display: grid; margin-top: 50px; gap: 5px; }
.admin-sidebar nav button { padding: 13px 15px; border: 0; background: transparent; color: #aaa79e; cursor: pointer; text-align: left; font-size: 14px; }
.admin-sidebar nav button.active { background: #2a2a25; color: white; }
.admin-user { display: flex; align-items: center; margin-top: auto; gap: 10px; }
.admin-user > div { display: grid; }
.admin-user strong { font-size: 13px; }
.admin-user small { color: #8c8981; font-family: var(--mono); font-size: 10px; }
.admin-content { min-width: 0; padding: 60px 5vw 90px; }
.admin-panel { display: none; width: 100%; min-width: 0; max-width: 1120px; margin: auto; }
.admin-panel.active { display: block; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; gap: 30px; }
.admin-heading h1 { font-size: 48px; }
.admin-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.format-admin-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 20px; }
.format-admin-card { display: grid; gap: 17px; }
.format-admin-card label { display: grid; color: var(--muted); font-size: 13px; gap: 7px; }
.format-admin-card input, .format-admin-card textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); outline: none; background: var(--bg); color: var(--ink); }
.format-admin-card textarea { min-height: 88px; resize: vertical; }
.format-admin-title { display: flex; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); gap: 16px; }
.format-admin-title > span { color: var(--accent); font-family: var(--mono); font-size: 28px; }
.format-admin-title h2 { margin-top: 4px; font-size: 25px; }
.format-duration-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.event-admin-grid { display: grid; grid-template-columns: .82fr 1.18fr; align-items: start; gap: 20px; }
.competition-control { margin-bottom: 20px; }
.competition-control-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 20px; }
.competition-control-heading h3 { margin: 5px 0 0; }
.competition-control-heading label { display: grid; min-width: 290px; color: var(--muted); font-size: 13px; gap: 7px; }
.competition-control-heading select { min-height: 42px; padding: 8px 11px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.competition-live-status { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.competition-live-status span { display: grid; min-height: 72px; padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); align-content: center; gap: 5px; }
.competition-live-status small { color: var(--muted); font-size: 11px; }
.competition-live-status strong { font-size: 13px; line-height: 1.5; }
.competition-control-actions { display: flex; align-items: end; margin-top: 16px; gap: 8px; }
.competition-control-actions label { display: grid; width: 120px; color: var(--muted); font-size: 12px; gap: 6px; }
.competition-control-actions input { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.danger-button { min-height: 42px; padding: 0 18px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; font-size: 12px; }
.admin-stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.admin-stat-strip span { display: grid; min-height: 88px; padding: 17px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); align-content: center; gap: 6px; }
.admin-stat-strip small { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.admin-stat-strip strong { font-family: var(--mono); font-size: 25px; }
.admin-toolbar { display: flex; align-items: center; margin-bottom: 12px; gap: 8px; }
.admin-toolbar select, .management-row select { min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); outline: none; background: var(--paper); color: var(--ink); font-size: 13px; }
.admin-search { display: flex; min-width: 260px; min-height: 42px; align-items: center; border: 1px solid var(--line); background: var(--paper); }
.admin-search span { padding-left: 13px; color: var(--muted); }
.admin-search input { width: 100%; min-height: 40px; padding: 8px 12px; border: 0; outline: none; background: transparent; color: var(--ink); }
.management-table { overflow-x: auto; width: 100%; max-width: 100%; margin-bottom: 26px; border-top: 1px solid var(--line); background: var(--paper); }
.management-row { display: grid; min-width: 930px; min-height: 72px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; gap: 13px; }
.management-head { min-height: 42px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .07em; }
.event-admin-row { grid-template-columns: minmax(210px, 1.5fr) 90px 120px 90px 60px 135px; }
.room-admin-row { grid-template-columns: 150px 145px 100px minmax(150px, 1fr) 90px 145px; }
.user-admin-row { grid-template-columns: minmax(185px, 1.4fr) 105px 125px 135px 70px 135px; }
.management-primary, .management-person > b { display: grid; gap: 4px; }
.management-primary small, .management-person small, .user-admin-row > span > small { color: var(--muted); font-size: 11px; font-weight: 400; }
.management-person { display: flex; align-items: center; gap: 9px; }
.management-person .avatar { width: 31px; height: 31px; font-size: 13px; }
.management-tag, .status-pill { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-style: normal; font-size: 11px; }
.status-waiting { background: rgba(255, 80, 72, .1); color: var(--accent); }
.status-matched { background: rgba(88, 123, 118, .14); color: var(--green); }
.status-closed { color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #aaa; }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 3px rgba(88, 123, 118, .12); }
.management-actions { display: flex; align-items: center; gap: 6px; }
.management-actions button, .round-actions button { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 11px; white-space: nowrap; }
.management-actions button:hover, .round-actions button:hover { border-color: var(--ink); }
.management-actions .danger-action, .round-actions .danger-action { color: var(--accent); }
.management-empty { min-width: 930px; padding: 34px; color: var(--muted); text-align: center; }
.form-actions { display: flex; align-items: center; gap: 14px; }
.admin-card { padding: 30px; border: 1px solid var(--line); background: var(--paper); }
.admin-card h3 { margin: 0 0 25px; font-size: 20px; }
.score-form { display: grid; gap: 18px; }
.score-form label, .dialog label { display: grid; color: var(--muted); font-size: 13px; gap: 8px; }
.score-form input, .score-form select, .score-form textarea, .dialog input, .dialog textarea { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 0; outline: none; background: var(--bg); color: var(--ink); }
.score-form textarea, .dialog textarea { min-height: 90px; resize: vertical; }
.score-form input:focus, .score-form select:focus, .score-form textarea:focus, .dialog input:focus, .dialog textarea:focus { border-color: var(--accent); }
.form-split { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.score-form .primary-button { justify-self: start; }
.round-manager > label { display: grid; margin-bottom: 18px; color: var(--muted); font-size: 13px; gap: 8px; }
.round-manager select, .round-editor input, .round-editor select, .new-round-form input, .new-round-form select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); outline: none; background: var(--bg); color: var(--ink); font-size: 13px; }
.round-manager-note { margin: -7px 0 17px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.round-list { display: grid; max-height: 410px; overflow-y: auto; gap: 9px; }
.round-editor { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; padding: 11px; border: 1px solid var(--line); background: var(--bg); gap: 10px; }
.round-editor > span { color: var(--accent); font-family: var(--mono); font-size: 12px; }
.round-editor > .round-topic-fields { display: grid; grid-template-columns: 80px 145px minmax(180px, 1fr); align-items: center; gap: 7px; }
.round-topic-fields strong { font-size: 13px; }
.round-topic-fields small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.round-actions { display: grid; grid-template-columns: 1fr; gap: 5px; }
.round-actions button:first-child { border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); }
.round-empty { padding: 30px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.score-form .event-setting-toggle { display: flex; min-height: 54px; align-items: center; justify-content: space-between; margin-top: -2px; padding: 13px 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font-size: 13px; }
.score-form .event-setting-toggle input { position: relative; width: 42px; min-height: 24px; height: 24px; padding: 0; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 999px; appearance: none; background: #d8d4ca; cursor: pointer; transition: .18s ease; }
.score-form .event-setting-toggle input::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.18); content: ""; transition: .18s ease; }
.score-form .event-setting-toggle input:checked { border-color: var(--accent); background: var(--accent); }
.score-form .event-setting-toggle input:checked::after { transform: translateX(18px); }
.score-form .event-setting-toggle input:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.new-round-form { display: grid; grid-template-columns: 90px minmax(180px, 1fr) 160px 160px auto; align-items: end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); gap: 7px; }
.new-round-form > strong { grid-column: 1 / -1; margin-bottom: 2px; font-size: 13px; }
.new-round-form .secondary-button { min-width: 95px; height: 42px; padding: 0 12px; font-size: 12px; }
.selected-user-card { display: flex; align-items: center; flex-direction: column; text-align: center; }
.admin-profile-avatar { width: 82px; height: 82px; margin: 30px 0 12px; font-size: 28px; }
.selected-user-card h2 { margin: 0; font-size: 26px; }
.selected-user-card > strong { margin: 12px 0 28px; color: var(--accent); font-family: var(--mono); font-size: 38px; }
.selected-user-card > strong small { font-size: 13px; }
.user-stat-grid { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.user-stat-grid span { display: grid; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.user-stat-grid b { margin-bottom: 4px; color: var(--ink); font-family: var(--mono); font-size: 18px; }
.selected-user-card > p:last-child { margin-top: 25px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.rule-table { border-top: 1px solid var(--line); }
.rule-row { display: grid; grid-template-columns: 1.2fr 2fr 100px 100px; min-height: 70px; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; gap: 20px; }
.rule-head { min-height: 42px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.positive { color: var(--green); }
.negative { color: var(--accent); }
.enabled-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.ledger-list { border-top: 1px solid var(--line); }
.ledger-entry { display: grid; grid-template-columns: auto 1fr auto; min-height: 90px; align-items: center; padding: 14px 5px; border-bottom: 1px solid var(--line); gap: 15px; }
.ledger-entry > div { display: grid; }
.ledger-entry strong { font-size: 15px; }
.ledger-entry p { margin: 4px 0; color: var(--muted); font-size: 13px; }
.ledger-entry small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.ledger-entry > b { font-family: var(--mono); font-size: 19px; }
.ledger-entry > .audit-log-badge { color: var(--green); font-size: 12px; letter-spacing: .12em; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; padding: 20px; place-items: center; background: rgba(12,12,10,.62); backdrop-filter: blur(7px); }
.dialog { position: relative; display: grid; width: min(460px, 100%); padding: 38px; background: var(--paper); box-shadow: var(--shadow); gap: 17px; }
.dialog h2 { margin: -4px 0 8px; font-size: 30px; }
.auth-dialog { width: min(450px, 100%); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.auth-tabs button { min-height: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.auth-tabs button.active { background: var(--ink); color: var(--bg); }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; color: var(--muted); font-size: 13px; gap: 7px; }
.auth-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); outline: none; background: var(--bg); color: var(--ink); }
.auth-form input:focus { border-color: var(--accent); }
.auth-form .primary-button { width: 100%; margin-top: 4px; }
.auth-local-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-consent { grid-template-columns: auto 1fr; align-items: start; line-height: 1.6; }
.auth-consent input { width: 15px; min-height: 15px; margin-top: 2px; }
.form-error { margin: 0; padding: 9px 11px; background: rgba(255, 80, 72, .08); color: var(--accent); font-size: 12px; line-height: 1.6; }
.account-detail-list { display: grid; border-top: 1px solid var(--line); }
.account-detail-list span { display: grid; grid-template-columns: 105px 1fr; min-height: 45px; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; gap: 10px; }
.account-detail-list small { color: var(--muted); }
.platform-rules-dialog { width: min(680px, 100%); max-height: 90vh; overflow-y: auto; }
.platform-rule-list { display: grid; gap: 10px; }
.platform-rule-list section { padding: 15px; border: 1px solid var(--line); background: var(--bg); }
.platform-rule-list strong { font-size: 14px; }
.platform-rule-list p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.system-status-dialog { width: min(620px, 100%); }
.system-status-intro, .system-status-footnote { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.system-capability-list { display: grid; border-top: 1px solid var(--line); }
.system-capability-list span { display: grid; grid-template-columns: 1fr auto; min-height: 48px; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; gap: 12px; }
.system-capability-list b { font-family: var(--mono); font-size: 11px; }
.system-capability-list b.ready { color: var(--green); }
.system-capability-list b.pending { color: var(--accent); }
.direct-message-dialog { display: grid; width: min(560px, 94vw); height: min(680px, 88vh); padding: 0; grid-template-rows: auto 1fr auto; }
.direct-message-dialog > header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.direct-message-dialog > header > div { display: flex; align-items: center; gap: 12px; }
.direct-message-dialog > header > div > div { display: grid; }
.direct-message-dialog > header small { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.direct-message-dialog .dialog-close { position: static; }
.direct-message-list { display: flex; overflow-y: auto; padding: 22px; flex-direction: column; gap: 12px; }
.direct-message { max-width: 78%; align-self: flex-start; }
.direct-message.mine { align-self: flex-end; text-align: right; }
.direct-message small { color: var(--muted); font-size: 12px; }
.direct-message p { margin: 4px 0 0; padding: 10px 13px; border: 1px solid var(--line); background: var(--bg); line-height: 1.55; text-align: left; }
.direct-message.mine p { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.direct-message-empty { margin: auto; color: var(--muted); }
.direct-message-form { display: grid; padding: 14px; border-top: 1px solid var(--line); grid-template-columns: 1fr auto; gap: 10px; }
.direct-message-form input { min-width: 0; height: 44px; padding: 0 13px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); outline: 0; }
.direct-message-form button { min-width: 86px; }
.dialog-close { position: absolute; top: 18px; right: 18px; border: 0; background: transparent; cursor: pointer; font-size: 22px; }
.toast { position: fixed; bottom: 30px; left: 50%; z-index: 200; padding: 12px 19px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.dark { color-scheme: dark; --bg: #11110f; --paper: #191916; --ink: #f1eee7; --muted: #99958d; --line: rgba(241, 238, 231, .14); --shadow: 0 24px 70px rgba(0,0,0,.34); }
body.dark .admin-sidebar { background: #090908; }
body.dark select, body.dark option { background: #191916; color: #f1eee7; }
.upload-zone.dragging { border-color: var(--accent); background: rgba(255,79,73,.06); }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; background: var(--bg); backdrop-filter: none; }
  .main-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 60; display: flex; overflow-x: auto; height: 60px; padding: 0 4px; border-top: 1px solid var(--line); background: var(--paper); gap: 0; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav .nav-item { flex: 0 0 76px; }
  .floating-battle-controls { right: 14px; bottom: 74px; }
  .test-battle-panel { grid-template-columns: 1fr repeat(3, auto); }
  .nav-item::after { top: 0; bottom: auto; }
  body { padding-bottom: 60px; }
  .lobby-hero { grid-template-columns: 1fr; padding-top: 70px; gap: 55px; }
  .match-console { width: min(600px, 100%); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; overflow: hidden; width: 100%; min-width: 0; height: auto; padding: 25px; }
  .admin-sidebar nav { display: flex; margin-top: 25px; }
  .admin-user { display: none; }
  .competition-live-status { grid-template-columns: repeat(3, 1fr); }
  .event-hero { grid-template-columns: 1fr; }
  .event-poster { width: min(560px, 100%); }
  .event-grid { grid-template-columns: 1fr; }
  .official-format-grid { grid-template-columns: 1fr; }
  .history-grid { grid-template-columns: repeat(3, 1fr); }
  .home-hero { grid-template-columns: 1fr; }
  .home-featured-art { width: min(520px, 100%); }
  .waiting-room-grid { grid-template-columns: repeat(2, 1fr); }
  .community-page-content { margin-right: 4vw; margin-left: 4vw; }
}

@media (max-width: 720px) {
  .site-header { min-height: 62px; padding: 0 16px; }
  .system-mode-bar { grid-template-columns: 1fr auto; padding: 10px 16px; }
  .system-mode-bar p { display: none; }
  .brand > span:last-child, .user-copy { display: none; }
  .user-cluster { gap: 8px; }
  .lobby-hero { min-height: auto; padding: 65px 20px; }
  .hero-copy h1 { font-size: clamp(55px, 18vw, 82px); }
  .status-pill { margin-bottom: 35px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .primary-button.large, .hero-actions .secondary-button { width: 100%; }
  .match-console { min-height: 500px; }
  .friend-dropdown { position: fixed; top: 62px; right: 10px; left: 10px; width: auto; max-height: calc(100vh - 135px); }
  .floating-battle-controls { right: 10px; bottom: 70px; left: 10px; align-items: stretch; }
  .active-battle-dock { grid-template-columns: 1fr auto auto; padding-left: 13px; gap: 10px; }
  .active-battle-dock time { font-size: 16px; }
  .active-battle-dock button { padding: 0 12px; }
  .test-battle-panel { grid-template-columns: repeat(3, 1fr); }
  .test-battle-panel > div { grid-column: 1 / -1; }
  .test-battle-panel button { padding: 0 8px; }
  .home-hero { min-height: auto; padding: 70px 20px; }
  .home-hero-copy h1 { font-size: clamp(55px, 17vw, 76px); }
  .home-featured-section { padding: 70px 20px 85px; }
  .home-featured-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .home-featured-grid article > div { padding: 11px; }
  .home-featured-grid h3 { font-size: 15px; }
  .waiting-rooms-section { padding: 70px 20px 85px; }
  .room-heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .waiting-room-grid { grid-template-columns: 1fr; }
  .community-page-hero { align-items: flex-start; padding: 60px 20px 45px; flex-direction: column; }
  .community-page-content { display: block; min-height: 600px; margin: 35px 20px 75px; }
  .community-channel-list { display: flex; overflow-x: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .community-channel-list > .eyebrow { display: none; }
  .community-channel-list button { flex: 0 0 135px; }
  .community-chat-card { min-height: 540px; }
  .lobby-community { padding: 65px 20px 75px; }
  .community-heading { align-items: flex-start; flex-direction: column; }
  .online-summary { width: 100%; }
  .online-summary div { min-width: 0; flex: 1; padding: 12px 8px; }
  .online-summary i { top: 12px; left: 10px; }
  .community-tabs { display: grid; grid-template-columns: 1fr 1fr; max-width: 100%; border: 1px solid var(--line); border-bottom: 0; }
  .community-tabs button { min-height: 46px; border: 0; border-right: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 13px; }
  .community-tabs button:last-child { border: 0; }
  .community-tabs button.active { background: var(--ink); color: var(--bg); }
  .community-layout { display: block; min-height: 540px; }
  .community-panel { display: none; }
  .community-panel.active { display: flex; }
  .chat-panel { min-height: 540px; border-right: 0; }
  .friends-panel { min-height: 540px; }
  .chat-header > span { display: none; }
  .chat-messages { max-height: 415px; padding: 15px; }
  .chat-message { max-width: 92%; }
  .chat-composer { grid-template-columns: 30px 1fr auto; }
  .chat-composer > span { display: none; }
  .emoji-button { width: 30px; }
  .room-chat-panel { margin: 22px 0 0; }
  .battle-room-chat { width: calc(100% - 24px); margin-right: 12px; margin-left: 12px; }
  .room-chat-messages { height: 165px; padding: 12px; }
  .content-section { padding: 70px 20px; }
  .section-title-row, .page-hero, .admin-heading, .vote-heading { align-items: flex-start; flex-direction: column; }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-grid article { min-height: 220px; }
  .flow-grid h3 { margin-top: 70px; }
  .battle-stage-header { padding: 25px 20px; }
  .battle-meta { flex-wrap: wrap; }
  .stage-clock { align-items: flex-start; flex-direction: column; gap: 28px; }
  .stage-clock time { font-size: 76px; }
  .test-battle-inline { justify-content: flex-start; }
  .test-battle-inline > div { flex: 1 0 100%; }
  .battle-topic { padding-top: 55px; }
  .battle-players { grid-template-columns: 1fr; margin: 0 20px 45px; gap: 12px; }
  .battle-versus { text-align: center; }
  .battle-workspace { padding: 55px 20px 70px; }
  .creation-tips { flex-wrap: wrap; }
  .submission-preview { grid-template-columns: 1fr; gap: 30px; }
  .vote-grid { grid-template-columns: 1fr; }
  .demo-toolbar { overflow-x: auto; justify-content: flex-start; }
  .demo-toolbar span, .demo-toolbar button { flex: 0 0 auto; }
  .page-hero { min-height: 370px; padding: 65px 20px 45px; }
  .season-card { width: 100%; min-width: 0; }
  .leaderboard-content { padding: 45px 20px 75px; }
  .podium { grid-template-columns: 1fr; align-items: stretch; }
  .podium-card, .podium-card.rank-1 { min-height: 220px; }
  .ranking-table { overflow-x: auto; }
  .ranking-row { min-width: 650px; }
  .admin-content { padding: 45px 20px 75px; }
  .admin-grid { grid-template-columns: 1fr; }
  .format-admin-grid { grid-template-columns: 1fr; }
  .event-admin-grid { grid-template-columns: 1fr; }
  .admin-stat-strip { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar nav { overflow-x: auto; width: 100%; min-width: 0; }
  .admin-sidebar nav button { flex: 0 0 auto; }
  .form-split { grid-template-columns: 1fr; }
  .rule-table { overflow-x: auto; }
  .rule-row { min-width: 700px; }
  .nav-item { font-size: 13px; }
  .event-hero { padding: 65px 20px; }
  .event-hero-copy h1 { font-size: 58px; }
  .event-hero-actions { align-items: stretch; flex-direction: column; }
  .event-poster { min-height: 360px; }
  .event-content { padding: 50px 20px 75px; }
  .event-stat-strip { grid-template-columns: repeat(2, 1fr); margin-bottom: 65px; }
  .event-title-row .segmented-control { overflow-x: auto; max-width: 100%; }
  .event-card { grid-template-columns: 1fr; }
  .event-card-visual { min-height: 220px; }
  .format-card { min-height: 315px; padding: 28px; }
  .event-round-preview > span { grid-template-columns: 78px 1fr; }
  .event-round-preview small { grid-column: 1 / -1; }
  .round-editor { grid-template-columns: 24px 1fr; }
  .round-editor > .round-topic-fields { grid-template-columns: 1fr; }
  .round-editor button { grid-column: 2; }
  .round-actions { grid-column: 2; grid-template-columns: 1fr 1fr; }
  .new-round-form { grid-template-columns: 1fr; }
  .competition-control-heading, .competition-control-actions { align-items: stretch; flex-direction: column; }
  .competition-control-heading label, .competition-control-actions label { width: 100%; min-width: 0; }
  .competition-live-status { grid-template-columns: repeat(2, 1fr); }
  .format-duration-grid { grid-template-columns: 1fr; }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .admin-toolbar > * { width: 100%; }
  .admin-search { min-width: 0; }
  .history-filters { grid-template-columns: 1fr 1fr; }
  .history-search { grid-column: 1 / -1; }
  .history-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .history-card-copy { padding: 11px; }
  .history-card-copy h3 { font-size: 15px; }
  .history-image button { display: none; }
  .artwork-dialog { grid-template-columns: 1fr; overflow-y: auto; max-height: 92vh; }
  .artwork-dialog-image { min-height: 420px; }
  .artwork-dialog-copy { padding: 35px 24px; }
}
