:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --white: #fff;
  --ink: #181c31;
  --muted: #4f566d;
  --soft: #5f667d;
  --line: #e1e4ee;
  --primary: #5151c4;
  --primary-hover: #393898;
  --surface-muted: #ececff;
  --blue-tint: #e9f2ff;
  --violet-tint: #f1ebff;
  --green-tint: #e5f5ed;
  --green-ink: #206047;
  --sidebar-width: 226px;
  --radius: 20px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; flex: none; }
.skip { position: fixed; z-index: 10; top: 8px; left: 8px; background: white; padding: 8px 16px; transform: translateY(-150%); }
.skip:focus { transform: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 27px 16px 18px; background: var(--white); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 0 8px; }
.brand-mark { display: block; flex: none; width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.brand strong { display: block; min-width: 0; font-size: 23px; letter-spacing: -.04em; line-height: 1.08; color: var(--ink); }
.brand small { display: block; margin-top: 4px; color: var(--soft); font-size: 11px; font-weight: 500; letter-spacing: 0; line-height: 1.25; }
.side-menu { margin-top: 47px; display: grid; gap: 6px; }
.side-label { margin: 0 12px 5px; font-size: 11px; font-weight: 700; letter-spacing: .09em; color: var(--soft); }
.nav-item { position: relative; width: 100%; border: 0; background: transparent; text-align: left; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav-item:hover { background: #f5f5f5; color: var(--primary-hover); }
.nav-item[aria-current="page"] { color: var(--primary-hover); background: var(--surface-muted); font-weight: 750; }
.nav-item[aria-current="page"]::after { content: ""; position: absolute; right: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.side-bottom { display: grid; gap: 9px; margin-top: auto; }
.install-card { display: flex; align-items: center; gap: 9px; width: 100%; padding: 13px 10px; background: #f5f5f5; color: var(--primary-hover); border-radius: 12px; border: 0; text-align: left; }
.install-card:hover { background: var(--surface-muted); }
.install-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: white; }
.install-card strong, .install-card small { display: block; white-space: nowrap; }
.install-card strong { font-size: 12px; }
.install-card small { color: var(--muted); font-size: 10px; margin-top: 1px; }
.install-card > .icon { margin-left: auto; width: 15px; }
.shell { margin-left: var(--sidebar-width); min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { z-index: 2; min-height: 72px; border-bottom: 1px solid var(--line); background: #ffffffed; display: flex; align-items: center; }
.top-inner, .main, .footer { width: min(100%, 1450px); margin: 0 auto; padding-inline: clamp(22px, 3vw, 48px); }
.top-inner, .top-left, .top-actions { display: flex; align-items: center; }
.top-inner { justify-content: space-between; gap: 16px; }
.top-left { gap: 9px; font-weight: 700; }
.top-left .icon { color: var(--primary); width: 18px; height: 18px; }
.mobile-brand { display: none; }
.top-actions { gap: 12px; }
.search-trigger { display: flex; align-items: center; gap: 8px; height: 36px; text-align: left; min-width: 181px; padding: 0 10px; background: #f6f6f6; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; }
.search-trigger .icon { width: 16px; height: 16px; }
.search-trigger kbd { margin-left: auto; background: white; border: 1px solid var(--line); padding: 0 5px; border-radius: 4px; color: var(--soft); font: 11px var(--font); }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; background: var(--white); color: var(--muted); border: 1px solid var(--line); border-radius: 11px; }
.icon-button:hover, .search-trigger:hover { background: var(--surface-muted); color: var(--primary-hover); }
.main { padding-block: 29px 32px; flex: 1; }
.intro { margin-bottom: 22px; }
.intro h1 { font-size: clamp(28px, 3vw, 36px); line-height: 1.25; font-weight: 800; letter-spacing: -.045em; }
.intro p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.hero { display: flex; align-items: center; min-height: 212px; border: 1px solid #dce1f7; border-radius: 24px;
  background: radial-gradient(ellipse at 90% 12%, #cfdbff 0, transparent 58%), linear-gradient(120deg, #fbfcff, #eeebff); }
.hero-inner { width: 100%; padding: 32px clamp(24px, 4vw, 48px); }
.hero-label { display: inline-block; color: var(--soft); font-size: 12px; font-weight: 700; }
.hero h2 { margin-top: 8px; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.045em; font-weight: 700; line-height: 1.16; overflow-wrap: anywhere; }
.hero-desc { max-width: 33em; margin-top: 12px; font-size: 14px; color: var(--muted); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; color: var(--soft); font-size: 12px; font-weight: 500; }
.hero-meta span, .row-meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-meta .icon, .row-meta .icon { width: 15px; height: 15px; }
.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 42px; padding: 8px 16px; border: 1px solid transparent; border-radius: 11px; background: var(--primary); color: white; font-weight: 730; font-size: 13px; white-space: nowrap; }
.button:hover { background: var(--primary-hover); }
.button:disabled { cursor: not-allowed; opacity: .57; }
.button .icon { width: 16px; height: 16px; }
.button.secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.button.secondary:hover { background: var(--surface-muted); }
.button.outline { background: white; border-color: var(--line); color: var(--ink); }
.button.outline:hover { background: var(--surface-muted); }
.button.danger { background: #444444; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(285px, 1fr); gap: 23px; margin-top: 26px; align-items: start; }
.dashboard.single-column { grid-template-columns: 1fr; }
.dashboard > section { min-width: 0; }
.section-head { min-height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.section-head h2, .panel h2 { font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.segmented { display: flex; align-items: center; gap: 3px; background: #ececec; padding: 3px; border-radius: 10px; }
.segmented button { border: 0; border-radius: 7px; min-height: 30px; padding: 3px 10px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: white; color: var(--primary-hover); box-shadow: 0 1px 2px #00000017; }
.event-list { display: grid; gap: 9px; }
.event-row { display: flex; align-items: center; min-width: 0; gap: 12px; min-height: 76px; border-radius: 16px; padding: 12px 16px; background: var(--white); border: 1px solid var(--line); transition: border-color .18s ease; }
.event-row:hover { border-color: #9a9a9a; }
.row-body { min-width: 0; flex: 1; }
.row-body h3 { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; letter-spacing: -.018em; }
.row-meta { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 3px 11px; color: var(--soft); font-size: 11px; }
.row-meta .icon { width: 12px; height: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; min-height: 23px; border-radius: 99px; font-weight: 730; white-space: nowrap; font-size: 10px; background: #eeeeee; color: #575757; }
.pill::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.open { color: var(--green-ink); background: var(--green-tint); }
.pill.live { color: var(--white); background: var(--primary); }
.pill.joined { color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1px #ababab; }
.row-chevron { color: var(--soft); width: 16px; height: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary-hover); font-size: 12px; font-weight: 730; background: transparent; border: 0; padding: 5px 0; white-space: nowrap; }
.text-link .icon { width: 15px; height: 15px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.panel { background: white; border: 1px solid var(--line); padding: 16px; border-radius: var(--radius); }
.live-name { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.live-name strong { font-size: 14px; }
.live-sub { color: var(--soft); font-size: 11px; margin-top: 4px; }
.mini-bracket { display: grid; grid-template-columns: 1fr 22px 1fr; grid-template-rows: auto 1fr 1fr; align-items: center; gap: 7px 0; margin: 15px 0 13px; padding: 12px; border-radius: 13px; background: #f7f7f7; }
.mini-label { font-size: 10px; color: var(--soft); font-weight: 700; }
.mini-label.last { grid-column: 3; }
.mini-player { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 10px; min-height: 30px; background: white; border: 1px solid #e4e4e4; border-radius: 7px; padding: 3px 6px; grid-column: 1; }
.mini-player b { color: var(--primary-hover); }
.mini-player.last { grid-area: 2 / 3 / 4 / 4; color: var(--primary-hover); border-color: #cbcbcb; font-weight: 750; }
.mini-lines { grid-area: 2 / 2 / 4 / 3; border: 1px solid #afafaf; border-left: 0; border-radius: 0 4px 4px 0; width: 53%; height: 50%; position: relative; }
.mini-lines::after { content: ""; position: absolute; width: 11px; border-top: 1px solid #afafaf; top: 50%; left: 100%; }
.progress-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--soft); font-size: 11px; }
.progress-track { height: 5px; margin-top: 7px; background: var(--surface-muted); border-radius: 4px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: #7d7d7d; border-radius: 4px; }
.footer { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; padding-block: 12px 20px; color: var(--soft); font-size: 11px; }
.footer strong { color: var(--muted); }
.footer a:hover { color: var(--primary-hover); text-decoration: underline; }
.mobile-host { display: none; }
.app-player .side-bottom > .nav-item,
.app-player .mobile-host { display: none !important; }
.mobile-nav { display: none; }
.back { margin-bottom: 13px; }
.detail-head { background: var(--surface-muted); display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 24px; border-radius: 22px; margin-bottom: 21px; }
.detail-head h1 { font-size: clamp(25px, 4vw, 38px); margin-block: 7px 5px; line-height: 1.2; letter-spacing: -.045em; }
.detail-head p { color: #474747; font-size: 12px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-actions:empty { display: none; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 16px; }
.detail-grid .panel { align-self: start; }
.description { margin: 8px 0 15px; color: var(--muted); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.facts { display: grid; gap: 9px; margin: 0; }
.facts > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line); padding-top: 9px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.entrants { list-style: none; padding: 0; margin: 9px 0 0; display: flex; flex-wrap: wrap; gap: 7px; }
.entrants li { padding: 5px 8px; border-radius: 8px; background: var(--bg); font-size: 12px; }
.entrants .mine { background: var(--surface-muted); color: var(--primary-hover); font-weight: 750; }
.bracket-panel { margin-bottom: 16px; }
.bracket-panel .section-head { flex-wrap: wrap; }
.bracket-panel .section-head p { color: var(--soft); margin-top: 3px; font-size: 12px; }
.bracket-canvas {
  border-radius: 13px;
  background: radial-gradient(circle, #d9d9d9 1px, transparent 1px) 0 0 / 20px 20px, #f6f6f6;
}
.bracket-scroll { overflow: auto; overscroll-behavior-inline: contain; max-height: 76vh; }
.bracket {
  --round-gap: 48px;
  --wire-size: 6px;
  --wire-color: #b7b7b7;
  --advanced: var(--primary);
  display: flex;
  gap: var(--round-gap);
  width: max-content;
  min-width: 100%;
  padding: 20px;
}
.round { min-width: 140px; flex: 1; }
.round-champion { min-width: 99px; flex: .68; }
.round h3 { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.round-champion h3 { text-align: center; }
.round-games { position: relative; }
.match { position: absolute; inset-inline: 0; height: 63px; transform: translateY(-50%); display: grid; align-content: center; padding: 3px 6px; background: white; border: 1px solid #e1e1e1; border-radius: 9px; z-index: 1; }
.match.waiting { background: #fff9; }
.match.can-score { cursor: pointer; border-color: #a7a7a7; }
.match.can-score:hover { background: var(--surface-muted); }
.match-row { min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 3px 6px; min-height: 25px; font-size: 12px; }
.match-row b { display: flex; align-items: center; gap: 4px; }
.match-row .icon { width: 13px; height: 13px; color: var(--primary-hover); }
.match-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row.win { background: var(--surface-muted); color: var(--primary-hover); font-weight: 750; border-radius: 6px; }
.match-row.unknown { color: var(--soft); }
.wire-pair, .final-wire { position: absolute; left: calc(100% - 1px); width: calc(var(--round-gap) + 2px); pointer-events: none; }
.wire-arm {
  position: absolute;
  left: 0;
  width: calc(50% + var(--wire-size) / 2);
  height: calc(50% + var(--wire-size) / 2);
  border: 0 solid var(--wire-color);
  border-right-width: var(--wire-size);
}
.wire-arm.upper { top: calc(var(--wire-size) / -2); border-top-width: var(--wire-size); border-top-right-radius: 12px; }
.wire-arm.lower { bottom: calc(var(--wire-size) / -2); border-bottom-width: var(--wire-size); border-bottom-right-radius: 12px; }
.wire-stem { position: absolute; top: 50%; left: 50%; right: 0; }
.wire-stem, .final-wire {
  height: var(--wire-size);
  background: var(--wire-color);
  transform: translateY(-50%);
}
.wire-pair .advanced, .final-wire.advanced {
  --wire-color: var(--advanced);
  z-index: 1;
}
.final-node {
  position: absolute;
  inset-inline: 0;
  transform: translateY(-50%);
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 6px;
  text-align: center;
  overflow-wrap: anywhere;
  background: #efefef;
  color: #626262;
  border: 1px dashed #c1c1c1;
  border-radius: 16px;
  z-index: 1;
}
.final-node .icon { width: 25px; height: 25px; }
.final-node.has-winner { background: var(--ink); color: var(--white); border: 1px solid var(--ink); }
.bracket-template { width: 100%; }
.bracket-template .round { min-width: 0; }
.match.blank { height: 48px; gap: 7px; padding-inline: 10px; }
.match.blank::before, .match.blank::after {
  content: "";
  width: 62%;
  height: 6px;
  background: #e4e4e4;
  border-radius: 5px;
}
.match.blank::after { width: 46%; }
.route-key { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.route-key::before { content: ""; width: 20px; height: 4px; border-radius: 8px; background: var(--primary); }
.champion { display: inline-flex; gap: 6px; align-items: center; padding: 6px 9px; border-radius: 8px; color: var(--white); background: var(--primary); font-size: 12px; font-weight: 700; }
.champion .icon { width: 15px; height: 15px; }
.round-toggle, .round-view { display: none; }
.empty { text-align: center; padding: 32px 16px; background: white; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.empty p { margin: 4px auto 10px; max-width: 36em; }
.feed { display: grid; gap: 12px; max-width: 850px; }
.feed .panel { padding: 18px; }
.post-author, .post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.post-author small { color: var(--soft); }
.post h2 { margin-top: 10px; font-size: 19px; overflow-wrap: anywhere; }
.post .description { margin-bottom: 9px; }
.post-actions button { border: 0; min-height: 35px; padding: 0 9px; border-radius: 8px; background: var(--bg); color: var(--muted); font-weight: 650; font-size: 12px; }
.post-actions button[aria-pressed="true"], .post-actions button:hover { background: var(--surface-muted); color: var(--primary-hover); }
.post-actions .icon { width: 15px; height: 15px; margin-right: 4px; }
.comments { display: grid; gap: 8px; margin: 0 0 14px; max-height: 210px; overflow: auto; }
.comment { background: var(--bg); border-radius: 9px; padding: 8px 10px; }
.comment p { color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
.admin-list { margin-top: 14px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 11px; border-top: 1px solid var(--line); }
.admin-row > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
dialog { border: 0; color: var(--ink); padding: 22px; border-radius: 21px; width: min(475px, calc(100% - 28px)); max-height: min(86dvh, 740px); background: white; box-shadow: 0 12px 65px #00000036; }
dialog::backdrop { background: #00000061; backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 13px; }
.dialog-head h2 { margin-top: 3px; font-size: 21px; letter-spacing: -.025em; }
.dialog-head button { width: 38px; height: 38px; }
/* Download dialog: Android download first, iOS instructions second. */
.download-options { display: grid; gap: 8px; }
.download-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.download-brand .brand-mark { width: 48px; height: 48px; border-radius: 12px; }
.download-platform { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.download-platform h3 { font-size: 15px; }
.download-platform p, .download-web p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.download-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.download-links .button { min-height: 44px; }
.download-web .text-link { min-height: 44px; }
.account-button { overflow: hidden; padding: 0; }
.user-avatar { width: 100%; height: 100%; object-fit: cover; }
.account-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.account-actions .text-link { min-height: 44px; }
.profile-summary { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-muted); }
.profile-summary > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.profile-summary strong, .profile-summary small { display: block; }
.profile-summary small { color: var(--soft); }
.profile-avatar { display: grid; place-items: center; width: 48px; height: 48px; flex: none; overflow: hidden; border-radius: 50%; background: var(--white); color: var(--primary); }
[data-remove-avatar] { justify-self: start; min-height: 36px; }
.dialog-copy { color: var(--muted); margin-bottom: 13px; }
form { display: grid; gap: 13px; }
form label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
input, textarea, select { display: block; width: 100%; padding: 9px 10px; min-height: 42px; border: 1px solid #d9d9d9; border-radius: 9px; color: var(--ink); background: #fbfbfb; }
textarea { resize: vertical; min-height: 82px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.form-grid label { min-width: 0; }
.form-grid input, .form-grid select { min-width: 0; }
.form-error { margin: 0; color: var(--ink); font-size: 12px; font-weight: 700; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.search-results { display: grid; gap: 6px; margin-top: 11px; }
.search-results .event-row { min-height: 55px; }
.toast { position: fixed; inset: auto 20px 20px auto; z-index: 6; padding: 10px 15px; max-width: calc(100% - 40px); border-radius: 12px; background: #262626; color: white; box-shadow: 0 6px 23px #00000025; }
.storage-note { color: var(--soft); font-size: 11px; }


/* App home: headline and browse action first, current events second, shortcuts third. */
.app-player .topbar { background: var(--bg); }
.app-player .top-inner { min-height: 72px; padding-top: max(8px, env(safe-area-inset-top)); }
.app-player .mobile-brand { display: flex; padding: 0; }
.app-player .mobile-brand strong { font-size: 20px; }

.app-player .search-trigger { min-width: 38px; width: 38px; height: 38px; justify-content: center; padding: 0; border: 0; background: #e9ebf5; border-radius: 50%; }
.app-player .search-trigger span, .app-player .search-trigger kbd { display: none; }
.app-player .icon-button { width: 38px; height: 38px; border: 0; background: #e9ebf5; border-radius: 50%; }
.app-player .main { padding-top: 12px; background: var(--bg); }
.app-player .footer { background: var(--bg); }
.app-home { display: grid; gap: 24px; padding-bottom: 10px; }
.app-welcome {
  padding: 28px 24px;
  border-radius: 24px;
  color: var(--white);
  background: radial-gradient(ellipse at 100% 0%, #5068b1, transparent 70%),
    linear-gradient(120deg, #262449, #393780 78%);
}
.app-feature-copy .app-kicker { display: block; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.app-welcome h1 { font-size: clamp(28px, 8vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -.04em; }
.app-welcome p { max-width: 26em; margin-top: 8px; color: #e4e7ff; font-size: 13px; }
.app-primary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 20px; padding: 0 16px; border-radius: 12px; background: var(--white); color: var(--ink); font-size: 13px; font-weight: 700; }
.app-primary .icon, .app-inline-link .icon { width: 15px; height: 15px; }
.app-primary:hover { background: var(--surface-muted); }
.app-stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid #e3e3e3; border-radius: 17px; background: #fdfdfd; }
.app-stat-strip > div { display: grid; gap: 1px; justify-items: center; padding: 12px 7px 11px; border-right: 1px solid #e9e9e9; }
.app-stat-strip > div:last-child { border-right: 0; }
.app-stat-strip strong { color: #242424; font-size: 21px; line-height: 1.1; }
.app-stat-strip span { color: var(--soft); font-size: 11px; }
.app-section { display: grid; gap: 11px; }
.app-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.app-section-head h2 { color: #262626; font-size: 17px; letter-spacing: -.035em; }
.app-section-head a, .app-section-head > span { color: var(--soft); font-size: 12px; font-weight: 600; }
.app-feature-card { display: flex; min-height: 108px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.app-feature-card:hover { border-color: #b3b3b3; }
.app-feature-copy { display: grid; align-content: center; gap: 6px; min-width: 0; flex: 1; padding: 16px; }
.app-feature-copy .app-kicker { color: #505050; }
.app-feature-copy strong { display: -webkit-box; overflow: hidden; color: #262626; font-size: 16px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.app-feature-copy small { color: var(--soft); font-size: 12px; line-height: 1.5; }
.app-inline-link { display: inline-flex; align-items: center; gap: 4px; width: max-content; color: #505050; font-size: 11px; font-weight: 800; }
.app-feature-empty .app-feature-copy small { max-width: 18em; }
.app-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.app-shortcuts > a { display: grid; align-content: start; gap: 6px; min-height: 104px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.app-shortcuts > a:hover { border-color: #b5b5b5; background: #f9f9f9; }
.app-shortcut-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--ink); background: var(--surface-muted); }
.app-shortcuts > a:nth-child(2) .app-shortcut-icon { background: var(--blue-tint); }
.app-shortcuts > a:nth-child(3) .app-shortcut-icon { background: var(--violet-tint); }
.app-shortcut-icon .icon { width: 17px; height: 17px; }
.app-shortcuts strong { color: var(--ink); font-size: 12px; }
.app-shortcuts small { color: var(--soft); font-size: 11px; line-height: 1.4; }
.app-event-list { display: grid; gap: 8px; }
.app-event-list .event-row { min-height: 72px; border-radius: 17px; background: #fdfdfd; }
.app-event-list .row-body h3 { font-size: 13px; }
.app-event-list .pill { font-size: 9px; }
.app-empty-line { padding: 16px; border: 1px dashed #c2c2c2; border-radius: 16px; color: var(--soft); background: var(--white); font-size: 12px; }
.app-organizer .topbar { background: var(--bg); }
.app-organizer .main { background: var(--bg); }
.app-organizer .panel { box-shadow: 0 9px 24px #0000000c; }
.app-organizer .admin-list { display: grid; gap: 7px; }
.app-organizer .admin-row { padding: 14px 0; }
.app-organizer .admin-row > div:last-child { align-items: center; }
@media (max-width: 1110px) {
  :root { --sidebar-width: 192px; }
  .sidebar { padding-inline: 12px; }
  .dashboard { gap: 16px; grid-template-columns: minmax(0, 1.54fr) minmax(260px, 1fr); }
  .row-chevron { display: none; }
}
@media (max-width: 890px) {
  :root { --sidebar-width: 0px; }
  .sidebar { display: none; }
  .topbar { min-height: 63px; }
  .top-left { display: none; }
  .mobile-brand { display: flex; padding: 0; }
  .mobile-brand small { font-size: 10px; }
  .top-inner, .main, .footer { padding-inline: 20px; }
  .mobile-nav { position: fixed; display: flex; justify-content: space-around; gap: 4px; z-index: 4; inset: auto 0 0; min-height: 62px; padding: 5px 9px max(6px, env(safe-area-inset-bottom)); background: #fffffff3; backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .mobile-nav .nav-item { flex-direction: column; gap: 2px; padding: 5px 6px 3px; width: auto; min-width: 62px; font-size: 10px; justify-content: center; }
  .mobile-nav .nav-item[aria-current="page"]::after { display: none; }
  .footer { padding-bottom: max(80px, calc(74px + env(safe-area-inset-bottom))); }
  .mobile-host { display: inline; }
  .toast { bottom: max(77px, calc(69px + env(safe-area-inset-bottom))); }
}
@media (max-width: 655px) {
  .mobile-brand .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .main { padding-top: 20px; }
  .intro { margin-bottom: 15px; }
  .intro p { font-size: 12px; }
  .top-inner, .main, .footer { padding-inline: 15px; }
  .top-actions { gap: 8px; }
  .search-trigger { min-width: 36px; width: 36px; justify-content: center; padding: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .hero { min-height: 0; align-items: start; }
  .hero-inner { padding: 24px; }
  .hero h2 { font-size: clamp(29px, 7.9vw, 46px); }
  .hero-desc { font-size: 13px; }
  .hero-meta { flex-direction: column; font-size: 11px; margin-top: 12px; }
  .hero-actions { margin-top: 14px; }
  .hero-actions .button { min-height: 39px; padding-inline: 11px; }
  .dashboard { display: grid; grid-template-columns: 1fr; margin-top: 17px; }
  .section-head { margin-bottom: 8px; }
  .section-head h2 { font-size: 18px; }
  .segmented button { padding-inline: 8px; }
  .event-row { min-height: 75px; gap: 9px; }
  .row-meta { gap: 2px 7px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-head { align-items: flex-start; flex-direction: column; padding: 17px; }
  .round-toggle { display: flex; width: 100%; overflow: auto; }
  .bracket-scroll { display: none; }
  .bracket-panel.show-all .bracket-scroll { display: block; }
  .bracket-panel.show-all .round-view { display: none; }
  .bracket-template { --round-gap: 14px; --wire-size: 4px; padding: 10px 8px; }
  .bracket-template .round h3 { font-size: 10px; white-space: nowrap; }
  .bracket-template .wire-arm.upper, .bracket-template .wire-arm.lower { border-radius: 0; }
  .bracket-template .match.blank { height: 38px; padding-inline: 5px; }
  .bracket-template .final-node { min-height: 46px; border-radius: 12px; }
  .bracket-template .final-node .icon { width: 20px; height: 20px; }
  .round-view { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 8px; }
  .round-view .match { position: static; transform: none; }
  .admin-row { align-items: flex-start; }
  .app-organizer .main { padding-top: 17px; }
  .app-organizer .intro { margin-bottom: 18px; }
  .app-organizer .intro h1 { font-size: 29px; }
  .app-organizer .admin-row { display: grid; gap: 10px; align-items: start; }
  .app-organizer .admin-row > div { width: 100%; }
  .app-organizer .admin-row > div:last-child { justify-content: space-between; align-items: center; }
  .app-organizer .admin-row > div:last-child .button { min-width: 88px; }
  input, textarea, select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
