/* Only First
   Chrome stays quiet; team colors carry the page. One brand signal: the amber
   scoreboard-bulb "1". Data marks use --accent (single series). */
:root {
  color-scheme: light;
  --bg: #eef0f3;
  --surface: #ffffff;
  --surface-2: #e4e7ec;
  --line: #d5d9e0;
  --text: #12151c;
  --text-2: #545b68;
  --text-3: #7d8492;
  --accent: #257de0;
  --amber: #ffb000;
  --good: #0f7a2a;
  --live: #d6331f;
  --map-bg: #f6f3ec;          /* hardwood / ice / turf get their own tints below */
  --rink-bg: #f4f8fb;
  --turf: #2f7d46;
  --card-shadow: 0 1px 0 rgba(18, 21, 28, .04), 0 10px 24px -14px rgba(18, 21, 28, .35);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: Barlow, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e131b; --surface: #161c26; --surface-2: #1f2733; --line: #2a3341;
    --text: #edf0f4; --text-2: #a2aab7; --text-3: #6f7886;
    --accent: #338ced; --good: #3ccf63; --live: #ff6a55;
    --map-bg: #1c222c; --rink-bg: #1a222d; --turf: #1f5a33;
    --card-shadow: 0 10px 24px -16px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e131b; --surface: #161c26; --surface-2: #1f2733; --line: #2a3341;
  --text: #edf0f4; --text-2: #a2aab7; --text-3: #6f7886;
  --accent: #338ced; --good: #3ccf63; --live: #ff6a55;
  --map-bg: #1c222c; --rink-bg: #1a222d; --turf: #1f5a33;
  --card-shadow: 0 10px 24px -16px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--body); overflow-x: hidden; }
a { color: var(--accent); }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand svg { width: 34px; height: 34px; flex: none; border-radius: 8px; }
.brand-name { font: 700 28px/1 var(--display); letter-spacing: .01em; }
.brand-logo { display: block; height: 44px; width: auto; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 10px; }
.tabs a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 15px; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 13px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips .mine-chip { margin-left: 4px; }
.day-tabs { margin: 4px 0 18px; align-items: center; }
.date-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 8px 2px 10px; color: var(--text-2); font-weight: 600; }
.date-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.date-chip input { border: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; padding: 4px 4px; color-scheme: light dark; cursor: pointer; }
.date-chip.on input { color-scheme: dark light; }
.chips .mine-chip[aria-pressed="true"] { background: var(--amber); color: #12151c; border-color: var(--amber); }
.toggle { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--text-2); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 17px; height: 17px; }
.install { display: none; border: 0; border-radius: 8px; padding: 6px 11px; background: var(--amber); color: #12151c; font-weight: 700; cursor: pointer; }
.install.show { display: inline-block; }

/* ---------------------------------------------------------------- day headings */
.day { margin: 26px 0 10px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.day h2 { margin: 0; font: 700 30px/1 var(--display); }
.day .date { color: var(--text-2); font-size: 15px; }
.day .tally { color: var(--text-3); font-size: 15px; margin-left: auto; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

/* ---------------------------------------------------------------- moment card */
.card {
  --c1: #555; --c2: #999; --on: #fff;
  background: var(--surface); border-radius: 16px; overflow: hidden; min-width: 0;
  box-shadow: var(--card-shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.hero {
  position: relative; color: var(--on); padding: 12px 14px 0; min-height: 118px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c1) 70%, white) 0%, transparent 55%),
    linear-gradient(150deg, var(--c1) 30%, color-mix(in srgb, var(--c1) 62%, black) 100%);
  display: flex; flex-direction: column;
}
.hero::after { /* second team color as a stripe, like a jersey trim */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--c2);
}
.hero .wm { position: absolute; right: -18px; top: -6px; width: 132px; height: 132px; object-fit: contain; opacity: .2; filter: saturate(.6); pointer-events: none; }
.hero-top { position: relative; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.hero-top .lg { opacity: .75; font-weight: 700; }
.hero-top .when { margin-left: auto; font-variant-numeric: tabular-nums; opacity: .92; white-space: nowrap; }
.badge { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.22); }
.who { position: relative; display: flex; align-items: flex-end; gap: 10px; margin-top: auto; }
.who .shot { width: 112px; height: 82px; object-fit: cover; object-position: top center; flex: none; margin-bottom: 5px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.who .shot.logo-fallback { width: 64px; height: 64px; object-fit: contain; margin: 0 8px 14px 6px; }
.who h3 {
  margin: 0 0 13px; font: 700 31px/.92 var(--display); text-transform: uppercase; letter-spacing: .005em;
  overflow-wrap: anywhere; text-wrap: balance;
}
.who h3 small { display: block; font-size: 15px; font-weight: 600; letter-spacing: .02em; opacity: .8; margin-bottom: 3px; text-transform: none; font-family: var(--body); }
.body { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 14px 12px; align-items: start; flex: 1; }
.how { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.assist { margin: 3px 0 0; font-size: 14px; color: var(--text-2); }
.season { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 14px; color: var(--text-2); }
.facts .won { color: var(--good); font-weight: 700; }
.facts .lost { color: var(--text-3); font-weight: 700; }
.facts .tip { display: inline-flex; align-items: center; gap: 4px; }
.facts .tip img { width: 16px; height: 16px; object-fit: contain; }

/* pending (no first score yet) */
.card.pending .hero {
  background: linear-gradient(110deg, var(--c1) 0 50%, var(--c2) 50% 100%);
  min-height: 98px; justify-content: center;
}
.card.pending .hero::after { display: none; }
.vs { position: relative; display: flex; align-items: center; justify-content: space-around; margin-top: 8px; }
.vs img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
.vs span { font: 700 22px/1 var(--display); background: rgba(0,0,0,.35); color: #fff; padding: 4px 8px; border-radius: 6px; }
.card.pending .body { grid-template-columns: 1fr; }
.waiting { margin: 0; font-weight: 600; color: var(--text-2); }
.live { color: var(--live); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.card.is-new { animation: arrive 1.6s cubic-bezier(.2, .8, .2, 1); }
@keyframes arrive { 0% { transform: scale(.96); box-shadow: 0 0 0 4px var(--amber); } 60% { box-shadow: 0 0 0 4px var(--amber); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .live-dot, .card.is-new { animation: none; } }

/* ---------------------------------------------------------------- maps */
.map { display: block; width: 104px; height: auto; border-radius: 8px; color: color-mix(in srgb, var(--text) 38%, transparent); }
.map.court, .bigmap.court { background: var(--map-bg); }
.map.rink, .bigmap.rink { background: var(--rink-bg); }
.map.field { width: 138px; background: var(--turf); color: rgba(255,255,255,.55); }
.bigmap.field { background: var(--turf); color: rgba(255,255,255,.5); }
.map .lines .red, .bigmap .lines .red { stroke: #d23a3a; }
.map .lines .blue, .bigmap .lines .blue { stroke: #2f6bd6; stroke-width: 1.4; }
.map .lines .dot, .bigmap .lines .dot { fill: #d23a3a; }
.lines .crease { fill: rgba(80, 150, 230, .25); }
.lines .mid { stroke-width: .9; }
.mark { stroke: var(--surface); stroke-width: .9; }
.map.field .ball, .bigmap .ball { fill: #fff; stroke: rgba(0,0,0,.4); stroke-width: .5; }
.shotline { stroke-width: 1; stroke-dasharray: 2 2; opacity: .7; }
.play { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.play.pass { stroke-dasharray: 3 2.5; }
.map.field .play { stroke: #fff !important; }
.ft { font: 700 4.4px var(--body); fill: var(--text-2); text-anchor: middle; }
.bigmap { display: block; width: 100%; height: auto; border-radius: 12px; color: color-mix(in srgb, var(--text) 35%, transparent); }
.bigmap .dotm { opacity: .7; stroke: var(--surface); stroke-width: .18; }
.bigmap.field .play.faint { opacity: .32; stroke-width: .5; }
.bigmap.field .play.faint.pass { stroke-dasharray: 1.6 1.4; }
.bigmap.field .dotm { stroke: none; opacity: .95; fill: #fff; }
.bigmap.field .play { stroke: #fff; }
.stack { display: grid; gap: 10px; align-content: start; }
.bigmap .dotm:hover, .bigmap .tdg:hover .play { opacity: 1; }
.bigmap .tdg:hover .play { stroke-width: 2; }
.mapwrap { max-width: 520px; margin: 0 auto; }
.map-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.map-tools select { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 8px; font-size: 15px; max-width: 100%; }
.map-note { color: var(--text-3); font-size: 14px; margin: 8px 0 0; }

/* ---------------------------------------------------------------- empty / more / status */
.more { display: block; margin: 26px auto; padding: 9px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.empty { margin: 48px 0; text-align: center; color: var(--text-2); }
.status { color: var(--text-2); text-align: center; }

/* ---------------------------------------------------------------- panels (teams + stats) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 16px 0; }
.panel h2 { margin: 0 0 4px; font: 700 26px/1.1 var(--display); }
.panel > p { margin: 0 0 12px; color: var(--text-2); }
.panel h3 { margin: 0 0 10px; font-size: 16px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 6px; }
.team-btn { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; font-size: 15px; min-width: 0; }
.team-btn img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.team-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-btn[aria-pressed="true"] { border-color: var(--tc, var(--accent)); box-shadow: inset 0 0 0 1px var(--tc, var(--accent)); background: color-mix(in srgb, var(--tc, var(--accent)) 12%, var(--surface)); font-weight: 700; }
.steps { margin: 0 0 14px; padding-left: 20px; color: var(--text-2); }
.steps li { margin: 4px 0; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.topics li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.topics img { width: 22px; height: 22px; object-fit: contain; }
.topics .t-name { font-weight: 600; flex: 1 1 150px; }
.topics code { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.btn { border: 0; border-radius: 8px; padding: 6px 11px; font-size: 14px; font-weight: 700; cursor: pointer; background: var(--accent); color: #fff; text-decoration: none; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.home-tip { display: flex; gap: 14px; align-items: center; }
.home-tip svg, .home-tip img { width: 56px; height: 56px; flex: none; border-radius: 13px; }

/* stats */
.league-block { margin: 22px 0 34px; }
.league-block > h2 { font: 700 36px/1 var(--display); margin: 0 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.tile .k { font-size: 15px; color: var(--text-2); }
.tile .v { font: 700 40px/1.05 var(--display); margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 14px; color: var(--text-3); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr)); gap: 10px; }
.cols .panel { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 14px; padding: 0 6px 6px; border-bottom: 1px solid var(--line); }
td { padding: 6px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; }
td.rank { color: var(--text-3); width: 1.6em; }
tr.mine td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
tr.pick { cursor: pointer; }
tr.pick:hover td { background: color-mix(in srgb, var(--text) 6%, transparent); }
tr.pick.sel td { background: color-mix(in srgb, var(--accent) 22%, transparent); }
tr.pick.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.pickbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.tteam { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.tteam img { width: 20px; height: 20px; object-fit: contain; }
.pface { width: 30px; height: 22px; object-fit: cover; object-position: top; vertical-align: middle; margin-right: 6px; border-radius: 4px; background: var(--surface-2); }
.bars { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 34%) 1fr auto; align-items: center; gap: 8px; font-size: 15px; padding: 2px 0; }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { display: block; height: 12px; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 3px; }
.bar-row .val { color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.bar-row:hover .bar { filter: brightness(1.12); }
.scroll { max-height: 440px; overflow: auto; }

.tip-box { position: fixed; z-index: 50; pointer-events: none; background: var(--text); color: var(--bg); padding: 6px 9px; border-radius: 7px; font-size: 14px; max-width: 270px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.foot { color: var(--text-3); font-size: 14px; padding-top: 10px; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }

@media (max-width: 560px) {
  .brand-name { font-size: 24px; }
  .tabs a { padding: 6px 9px; font-size: 14px; }
  .grid { grid-template-columns: 1fr; }
  .day .tally { margin-left: 0; }
}

/* ---------------------------------------------------------------- card actions, share, toast */
.card-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 14px 12px; }
.play-text { font-size: 14px; color: var(--text-2); min-width: 0; }
.play-text summary { cursor: pointer; font-weight: 600; color: var(--text-3); list-style-position: inside; }
.play-text p { margin: 6px 0 0; }
.share { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
.share:hover { border-color: var(--tc, var(--accent)); }
.share:disabled { opacity: .6; cursor: progress; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* ---------------------------------------------------------------- audit fixes */
/* live games */
.live-pill { display: inline-flex; align-items: center; gap: 6px; background: #d6331f; color: #fff; padding: 2px 9px 2px 7px; border-radius: 99px; font-weight: 700; }
.live-pill .live-dot { background: #fff; }
.card.is-live { box-shadow: 0 0 0 2px var(--live), var(--card-shadow); border-color: transparent; }
.card.is-live .waiting { color: var(--live); }

/* compact upcoming / no-score cards */
.card.pending .hero { min-height: 0; padding: 10px 14px 12px; }
.card.pending .vs { margin-top: 6px; }
.card.pending .vs img { width: 42px; height: 42px; }
.card.pending .vs span { font-size: 18px; padding: 3px 7px; }
.card.pending .body { padding: 10px 14px; }

/* map captions */
.mapfig { margin: 0; display: grid; gap: 4px; justify-items: center; }
.mapfig figcaption { font-size: 13px; color: var(--text-3); text-align: center; max-width: 140px; line-height: 1.25; }

/* first-visit intro */
.intro { margin: 20px 0 4px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--amber); display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.intro p { margin: 0; max-width: 62ch; color: var(--text-2); }
.intro p b { color: var(--text); }
.intro-actions { display: flex; gap: 8px; }
.fresh { color: var(--text-3); font-size: 14px; }

/* loading skeleton */
.skeleton .hero { background: var(--surface-2); min-height: 118px; }
.skeleton .hero::after { display: none; }
.sk { height: 14px; border-radius: 6px; background: var(--surface-2); margin: 4px 0 10px; }
.sk.w70 { width: 70%; } .sk.w40 { width: 40%; }
.sk-h { width: 140px; height: 28px; border-radius: 8px; background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) {
  .skeleton .hero, .sk, .sk-h { animation: shimmer 1.3s ease-in-out infinite; }
  @keyframes shimmer { 50% { opacity: .55; } }
}

/* comfortable touch targets */
@media (pointer: coarse) {
  .chips button, .date-chip, .tabs a, .share, .btn, .more, .team-btn, .map-tools select { min-height: 40px; }
  .chips button { padding: 6px 14px; }
  .tabs a { display: inline-flex; align-items: center; }
  .play-text summary { padding: 10px 0; }
}

@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 10px 12px; }
  .tile .v { font-size: 30px; }
  .tile .k { font-size: 14px; line-height: 1.25; }
  .league-block > h2 { font-size: 30px; }
  .intro-actions { width: 100%; }
}

@media (max-width: 560px) {
  .filter-row { padding-top: 8px; padding-bottom: 10px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; padding: 6px 12px; }
  .chips .emo { display: none; }
}

#alerts { scroll-margin-top: 130px; }

/* ---------------------------------------------------------------- settings */
.filter-row { flex-wrap: nowrap; }
.filter-row .chips { flex: 1; min-width: 0; }
.gear { flex: none; display: grid; place-items: center; width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; }
.gear:hover { color: var(--text); }
.sheet {
  border: 0; padding: 0; border-radius: 20px; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.sheet::backdrop { background: rgba(10, 13, 18, .55); backdrop-filter: blur(2px); }
#settings-body { padding: 20px; }
.sheet h2 { margin: 0 0 6px; font: 700 30px/1 var(--display); }
.sheet section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.sheet section:last-of-type { border-bottom: 0; }
.sheet h3 { margin: 0 0 4px; font-size: 16px; }
.sheet .hint { margin: 0 0 10px; color: var(--text-3); font-size: 14px; }
.sheet .hint:last-child { margin: 8px 0 0; }
.switches { display: grid; gap: 6px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); cursor: pointer; font-weight: 600; min-height: 48px; }
.switch small { color: var(--text-3); font-weight: 500; margin-left: 4px; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 12px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 9px 6px; font-weight: 600; color: var(--text-2); cursor: pointer; min-height: 40px; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.sheet form { margin-top: 8px; }
.sheet .done { width: 100%; padding: 11px; font-size: 16px; min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .switch input, .switch input::after { transition: none; } }

/* narrow phones: keep brand + tabs on one line in every language */
.brand-name { white-space: nowrap; }
@media (max-width: 420px) {
  .top-row { gap: 8px; }
  .brand { gap: 7px; }
  .brand svg { width: 30px; height: 30px; }
  .brand-logo { height: 38px; }
  .brand-name { font-size: 21px; }
  .tabs a { padding: 6px 8px; font-size: 13.5px; }
}
@media (max-width: 350px) { .brand-name { display: none; } }
