/* ───────── Best Bowling ───────── */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;

  --bg: #f5f2ec;
  --surface: #ffffff;
  --surface2: #f8f5ef;
  --seg-on: #ffffff;
  --line: rgba(28, 30, 38, .08);
  --line-strong: rgba(28, 30, 38, .14);
  --text: #1b1d24;
  --muted: #847d70;
  --gold: #a07a38;
  --gold-soft: rgba(184, 143, 69, .12);
  --gold-grad: linear-gradient(135deg, #e2c487 0%, #b88f45 100%);
  --accent-ink: #ffffff;
  --glow: rgba(214, 180, 110, .22);
  --shadow: 0 1px 2px rgba(40, 30, 10, .04), 0 12px 32px -18px rgba(40, 30, 10, .28);
  --danger: #c0453f;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0e13;
  --surface: #151922;
  --surface2: #1b2029;
  --seg-on: #262c38;
  --line: rgba(255, 255, 255, .06);
  --line-strong: rgba(255, 255, 255, .11);
  --text: #ece8df;
  --muted: #8f8a80;
  --gold: #dcbb78;
  --gold-soft: rgba(214, 180, 110, .12);
  --gold-grad: linear-gradient(135deg, #f0d7a1 0%, #b88f45 100%);
  --accent-ink: #17130a;
  --glow: rgba(214, 180, 110, .14);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 36px -20px rgba(0, 0, 0, .8);
  --danger: #e2675f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e13;
    --surface: #151922;
    --surface2: #1b2029;
    --seg-on: #262c38;
    --line: rgba(255, 255, 255, .06);
    --line-strong: rgba(255, 255, 255, .11);
    --text: #ece8df;
    --muted: #8f8a80;
    --gold: #dcbb78;
    --gold-soft: rgba(214, 180, 110, .12);
    --gold-grad: linear-gradient(135deg, #f0d7a1 0%, #b88f45 100%);
    --accent-ink: #17130a;
    --glow: rgba(214, 180, 110, .14);
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 36px -20px rgba(0, 0, 0, .8);
    --danger: #e2675f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(700px 380px at 90% -8%, var(--glow), transparent 70%),
              radial-gradient(500px 300px at -10% 30%, var(--gold-soft), transparent 70%);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ic { width: 20px; height: 20px; flex: 0 0 auto; }

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .4); }
.brand span { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .2px; }
.brand em { color: var(--gold); font-style: italic; }

main { max-width: 560px; margin: 0 auto; padding: 14px 16px 24px; }

/* ── Common ── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-h h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.card-h h3 .ic { width: 18px; height: 18px; color: var(--gold); }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.display { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -.3px; margin-top: 3px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 2px 16px; }
.muted { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.label { font-size: 14px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.empty {
  text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6;
  padding: 26px 16px; border: 1px dashed var(--line-strong); border-radius: 18px; margin-bottom: 14px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 18px; border-radius: 15px; font-weight: 700; font-size: 15px;
  transition: transform .12s, filter .12s;
}
.btn:active { transform: scale(.97); }
.btn.gold { background: var(--gold-grad); color: var(--accent-ink); box-shadow: 0 10px 22px -10px rgba(184, 143, 69, .7); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line-strong); }
.btn.red { background: var(--danger); color: #fff; }
.btn.outline-red { border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); background: var(--surface); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn.block { width: 100%; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 14px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--line-strong); background: var(--surface); flex: 0 0 auto;
}
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn.danger { color: var(--danger); }
.link { display: block; margin: 12px auto 0; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--danger); }

.field {
  height: 44px; width: 100%; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface2); padding: 0 12px; font-size: 16px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field.num { text-align: center; }
.field.sm { width: 60px; height: 38px; padding: 0 6px; }
.field::placeholder { color: var(--muted); opacity: .8; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; background: var(--surface2);
}
.chip .ic { width: 15px; height: 15px; }
.chip.on { background: var(--gold-grad); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 14px -8px rgba(184, 143, 69, .8); }
.chip.dashed { border-style: dashed; color: var(--muted); background: none; }

.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  background: var(--surface2); border: 1px solid var(--line); border-radius: 14px;
}
.seg button {
  height: 38px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button .ic { width: 16px; height: 16px; }
.seg button.on { background: var(--seg-on); color: var(--text); box-shadow: 0 2px 10px -3px rgba(0, 0, 0, .25); }
.seg button.on .ic { color: var(--gold); }

.stepper {
  display: inline-flex; align-items: center; height: 38px; border: 1px solid var(--line-strong);
  border-radius: 12px; overflow: hidden; background: var(--surface);
}
.stepper button { width: 36px; height: 100%; font-size: 19px; color: var(--gold); font-weight: 600; }
.stepper b { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper small { font-size: 11px; color: var(--muted); margin: 0 2px 0 -4px; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: var(--gold); background: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
}
.team-badge {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4);
}
.t0 { background: linear-gradient(135deg, #e2c487, #a07a38); color: #1a1408; }
.t1 { background: linear-gradient(135deg, #7c98e6, #2f4c9c); }
.t2 { background: linear-gradient(135deg, #e07b85, #962f3b); }
.t3 { background: linear-gradient(135deg, #63c4a4, #1f6f56); }
.pname { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Calendar ── */
.cal { padding: 12px 12px 8px; }
.cal-h { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.cal-h b { flex: 1; font-family: var(--serif); font-size: 16px; font-weight: 600; padding-left: 4px; }
.cal-nav { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.cal-nav .ic { width: 17px; height: 17px; }
.cal-today { height: 28px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-w span { font-size: 10px; color: var(--muted); padding: 2px 0 4px; font-weight: 600; }
.cal-w span:first-child { color: var(--danger); }
.cal-d { height: 36px; display: grid; place-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.cal-d span { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid transparent; }
.cal-d.sun { color: var(--danger); }
.cal-d.today span { color: var(--gold); font-weight: 800; background: var(--gold-soft); }
.cal-d.has span { border-color: var(--gold); font-weight: 700; }
.cal-d.sel span { background: var(--gold-grad); color: var(--accent-ink); font-weight: 800; border-color: transparent; }
.cal-d.sel.has span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--gold); }
.cal-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.cal-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.cal-open > .ic { color: var(--muted); width: 18px; height: 18px; }
.cal-txt { flex: 1; min-width: 0; }
.cal-txt small { display: block; font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: .06em; }
.cal-txt b { display: block; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Recent ── */
.sec-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted);
  margin: 2px 4px 8px;
}
.recent {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 18px; padding: 2px 16px 4px;
}
.recent::-webkit-scrollbar { display: none; }
.rchip {
  flex: 0 0 auto; min-width: 86px; padding: 9px 13px; border-radius: 15px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.rchip b { display: block; font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rchip small { font-size: 11px; color: var(--muted); }
.rchip.on { border-color: var(--gold); background: var(--gold-soft); }
.rchip.on b { color: var(--gold); }
.recent-empty { font-size: 13px; color: var(--muted); padding: 10px 4px; }

/* ── Session ── */
.sess-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 2px 14px; }
.quick { display: grid; grid-template-columns: 1fr 72px auto; gap: 8px; margin-top: 12px; }
.plist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.prow, .erow {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px;
  border-radius: 15px; background: var(--surface2); border: 1px solid var(--line);
}
.tsec { margin-top: 12px; padding: 12px; border-radius: 17px; border: 1px solid var(--line-strong); border-left: 4px solid var(--tc); background: color-mix(in srgb, var(--tc) 7%, var(--surface)); }
.tc0 { --tc: #c9a052; } .tc1 { --tc: #4f6fc4; } .tc2 { --tc: #c4505c; } .tc3 { --tc: #2f9a77; }
.tsec-h { display: flex; align-items: center; gap: 10px; }
.tsec-h b { flex: 1; font-size: 15px; }
.tsec-h .team-badge { width: 30px; height: 30px; border-radius: 10px; font-size: 12px; }
.tsec .plist { margin-top: 10px; }
.tsec .prow { background: var(--surface); padding-left: 12px; }
.tsec-empty { margin-top: 10px; padding: 12px; text-align: center; font-size: 13px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 13px; }
.tmove { display: flex; gap: 4px; }
.tmove button { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--muted); border: 1px solid var(--line-strong); }
.tmove button.on { color: #fff; border-color: transparent; opacity: 1; }
.tmove button.on.t0 { color: #1a1408; }
.hd { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 600; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mode {
  height: 56px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface2);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14.5px; color: var(--muted);
}
.mode.on { background: var(--gold-grad); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 22px -12px rgba(184, 143, 69, .9); }
.gtabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.gtabs::-webkit-scrollbar { display: none; }
.gtab {
  flex: 0 0 auto; height: 34px; min-width: 62px; padding: 0 12px; border-radius: 11px;
  font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong);
}
.gtab.on { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.gtab.add { min-width: 40px; font-size: 18px; color: var(--gold); border-style: dashed; }
.elist { display: flex; flex-direction: column; gap: 8px; }
.score-in {
  width: 86px; height: 46px; border-radius: 13px; text-align: center; font-size: 21px; font-weight: 800;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); outline: none;
  font-variant-numeric: tabular-nums;
}
.score-in:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.etot { width: 58px; text-align: right; font-weight: 800; font-size: 17px; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.etot small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }

/* Frame score sheet */
.fblock {
  padding: 10px; border-radius: 15px; background: var(--surface2); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.fblock.active { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.fhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ftot { font-weight: 800; font-size: 19px; color: var(--gold); font-variant-numeric: tabular-nums; }
.ftot small { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.frames {
  display: grid; grid-template-columns: repeat(9, 1fr) 1.45fr;
  border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface);
}
.fr { border-right: 1px solid var(--line-strong); min-width: 0; }
.fr:last-child { border-right: 0; }
.fr-n { font-size: 9px; text-align: center; color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--line); line-height: 14px; }
.fr-r { display: flex; justify-content: flex-end; height: 19px; }
.fr-r span { width: 50%; font-size: 12px; font-weight: 800; text-align: center; line-height: 19px; }
.fr-r span + span { border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.f10 .fr-r span { width: 33.34%; }
.fr-s { height: 21px; text-align: center; font-size: 12px; font-weight: 700; line-height: 21px; font-variant-numeric: tabular-nums; }
.fr.cur { background: var(--gold-soft); }
.fr.cur .fr-n { color: var(--gold); font-weight: 800; }
.tap-hint { font-size: 12px; color: var(--muted); text-align: center; margin: 2px 0 10px; }

/* Keypad */
.keypad {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: 24px 24px 0 0; box-shadow: 0 -24px 48px -24px rgba(0, 0, 0, .5);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.kp-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kp-h .info { font-size: 12px; color: var(--muted); margin-top: 1px; }
.kp-h .pn { font-weight: 700; }
.kp-h .sc { margin-left: auto; font-size: 24px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.kp-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kp-g button {
  height: 52px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line);
  font-size: 21px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.kp-g button:active:not(:disabled) { transform: scale(.96); }
.kp-g button.sp { color: var(--gold); }
.kp-g button:disabled { opacity: .25; }
.kp-g button.act { font-size: 14px; font-weight: 700; }
.kp-g button.go { background: var(--gold-grad); color: var(--accent-ink); border-color: transparent; font-size: 15px; grid-column: span 2; }
body.kp-open { padding-bottom: calc(330px + env(safe-area-inset-bottom)); }
body.kp-open .tabbar { display: none; }

/* Results */
.tbl-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th {
  font-size: 10.5px; color: var(--muted); font-weight: 700; text-align: center; padding: 6px 4px;
  border-bottom: 1px solid var(--line-strong); white-space: nowrap; letter-spacing: .04em;
}
.tbl td { text-align: center; padding: 10px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.nm { text-align: left; font-weight: 700; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.tbl th.nm { text-align: left; }
.tbl td.tot { font-weight: 800; color: var(--gold); font-size: 15px; }
.tbl td.dim { color: var(--muted); }
.rk { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface2); border: 1px solid var(--line); }
.rk1 { background: linear-gradient(135deg, #f3dca6, #b88f45); color: #1a1408; border: 0; }
.rk2 { background: linear-gradient(135deg, #f1f1f3, #9a9ca3); color: #1d1e22; border: 0; }
.rk3 { background: linear-gradient(135deg, #ebbd94, #9a5f34); color: #24140a; border: 0; }
.teams { display: grid; gap: 8px; margin-top: 16px; }
.team-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 15px; background: var(--surface2); border: 1px solid var(--line); }
.team-card.win { border-color: color-mix(in srgb, var(--gold) 60%, transparent); background: var(--gold-soft); }
.team-card .tm { flex: 1; min-width: 0; }
.team-card .tm b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.team-card .tm b .ic { width: 16px; height: 16px; color: var(--gold); }
.team-card .tm small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card .tt { font-size: 24px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; text-align: right; line-height: 1.1; }
.team-card .tt small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.autosave { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.autosave .ic { width: 14px; height: 14px; color: var(--gold); }

/* ── Members ── */
.add-grid { display: grid; grid-template-columns: 1fr 84px; gap: 8px; margin-bottom: 10px; }
.field-l { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); margin: 0 0 6px 2px; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mcard {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.mavatar {
  width: 46px; height: 46px; border-radius: 15px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--gold-grad); color: var(--accent-ink); font-family: var(--serif); font-size: 20px; font-weight: 700;
}
.minfo { flex: 1; min-width: 0; }
.minfo b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.minfo b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--gold); background: var(--gold-soft); padding: 2px 7px; border-radius: 6px; flex: 0 0 auto; }
.mstats { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.medit { display: grid; grid-template-columns: 1fr 70px; gap: 8px; flex: 1; }
.mbtns { display: flex; gap: 6px; }

/* ── Cost ── */
.date-field { width: auto; min-width: 150px; height: 40px; font-size: 15px; }
.fee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.fee { display: block; padding: 12px 14px; border-radius: 15px; background: var(--surface2); border: 1px solid var(--line); }
.fee > span { font-size: 12px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.fee > span small { font-weight: 500; opacity: .8; }
.money { display: flex; align-items: baseline; gap: 4px; }
.money input { width: 100%; min-width: 0; background: none; border: 0; outline: none; font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; }
.money em { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 600; }
.clist { display: flex; flex-direction: column; gap: 8px; }
.crow { padding: 11px 12px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--line); transition: opacity .15s; }
.crow.off { opacity: .45; }
.crow-top { display: flex; align-items: center; gap: 10px; }
.crow-bot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-left: 40px; }
.check {
  width: 30px; height: 30px; border-radius: 10px; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; color: transparent; flex: 0 0 auto;
}
.check .ic { width: 16px; height: 16px; }
.check.on { background: var(--gold-grad); color: var(--accent-ink); border-color: transparent; }
.amt { font-weight: 800; font-size: 17px; color: var(--gold); font-variant-numeric: tabular-nums; }
.pill {
  height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.pill .ic { width: 17px; height: 17px; }
.pill.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.x-btn { margin-left: auto; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.x-btn .ic { width: 16px; height: 16px; }
.hero {
  background: radial-gradient(400px 200px at 100% 0%, rgba(214, 180, 110, .22), transparent 70%), linear-gradient(145deg, #1f2433, #0d0f15);
  color: #f1ead9; border: 1px solid rgba(214, 180, 110, .35);
}
.hero .eyebrow { color: #d6b46e; }
.hero-total { font-family: var(--serif); font-size: 38px; font-weight: 700; margin: 4px 0 14px; background: linear-gradient(135deg, #f6e2b0, #c9a052); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-grid div { padding: 10px 12px; border-radius: 13px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); }
.hero-grid small { display: block; font-size: 11px; color: #a39d90; font-weight: 600; }
.hero-grid b { font-size: 18px; font-variant-numeric: tabular-nums; }

/* ── Settings ── */
.set-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.set-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: 0 0 auto; }
.set-ic .ic { width: 19px; height: 19px; }
.set-row b { font-size: 15px; }
.set-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.data-btns { display: grid; gap: 8px; margin-top: 14px; }
.about { text-align: center; padding: 18px 0 8px; }
.about img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); }
.about h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin-top: 10px; }
.about h2 em { color: var(--gold); }
.about p { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .08em; }

/* ── Tab bar ── */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 30;
  bottom: calc(10px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 536px; height: 66px;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 4px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong); border-radius: 24px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--muted); position: relative;
}
.tabbar .ic { width: 23px; height: 23px; }
.tabbar button.on { color: var(--gold); }
.tabbar button.on::before {
  content: ""; position: absolute; top: 7px; width: 46px; height: 32px; border-radius: 12px; background: var(--gold-soft); z-index: -1;
}

/* ── Modal & toast ── */
.modal {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(5, 6, 10, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.dialog {
  width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 24px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.dialog p { font-size: 15px; line-height: 1.55; margin-bottom: 18px; white-space: pre-line; }
.dialog .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog.preview { max-width: 440px; padding: 14px; }
.dialog.preview img { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 14px; margin-bottom: 12px; }
.dialog.preview p { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 12px; }
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 70;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  background: #1a1d26; color: #f1ead9; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600;
  border: 1px solid rgba(214, 180, 110, .35); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .6);
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.kp-open .toast { bottom: calc(340px + env(safe-area-inset-bottom)); }

/* ── Stats ── */
.stat-pick { margin-bottom: 14px; }
.stat-pick .chip { flex: 0 0 auto; }
.stat-pick .chip small { font-size: 11px; font-weight: 700; opacity: .7; margin-left: 2px; }
.hero-grid.four { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hero-grid.four div { padding: 9px 8px; }
.hero-grid.four small { font-size: 10.5px; }
.hero-note { margin-top: 12px; font-size: 12.5px; color: #a39d90; }
.hero-note b { color: #f1ead9; }
.hero .tag { background: rgba(214, 180, 110, .16); color: #e9cf95; }
.chart-tip { font-size: 12.5px; font-weight: 700; color: var(--text); min-height: 18px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; height: 150px; margin-left: 26px; border-bottom: 1px solid var(--line-strong); }
.chart-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line-strong); }
.chart-grid span { position: absolute; left: -28px; top: -7px; width: 24px; text-align: right; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; min-width: 0; }
.chart-bar i { display: block; width: 100%; max-width: 18px; border-radius: 4px 4px 0 0; background: var(--gold); opacity: .55; transition: opacity .15s; }
.chart-bar:hover i, .chart-bar.on i { opacity: 1; }
.chart-bar em { position: absolute; left: 50%; transform: translate(-50%, -4px); margin-bottom: 0; font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.chart-x { display: flex; gap: 2px; margin-left: 26px; margin-top: 5px; }
.chart-x span { flex: 1; min-width: 0; text-align: center; font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: visible; }
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-row { display: grid; grid-template-columns: 52px 1fr 40px; grid-template-rows: auto auto; align-items: center; column-gap: 10px; }
.order-n { font-size: 13px; font-weight: 700; }
.order-bar { height: 8px; border-radius: 4px; background: var(--surface2); border: 1px solid var(--line); overflow: hidden; }
.order-bar i { display: block; height: 100%; border-radius: 4px; background: var(--gold); opacity: .7; }
.order-v { font-size: 16px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.order-v.best { color: var(--gold); }
.order-row small { grid-column: 2 / 4; font-size: 11px; color: var(--muted); margin-top: 3px; }
.tbl tr.link-row { cursor: pointer; }
.tbl tr.sel td { background: var(--gold-soft); }
.tbl td small { font-weight: 500; }

/* ── Team rows (3–4 teams), entry filter, practice ── */
.prow.trow { flex-wrap: wrap; row-gap: 8px; }
.prow.trow .tmove { order: 3; width: 100%; }
.prow.trow .tmove button { flex: 1; width: auto; height: 30px; }
.entry-filter { margin-bottom: 12px; grid-auto-columns: minmax(0, 1fr); }
.entry-filter button { font-size: 12.5px; padding: 0 4px; height: 34px; white-space: nowrap; overflow: hidden; }
.tdot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.prac-tag { margin-left: 5px; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 5px; background: var(--line-strong); color: var(--muted); }
.mini-toggle {
  height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.mini-toggle .ic { width: 13px; height: 13px; opacity: .35; }
.mini-toggle.on { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.mini-toggle.on .ic { opacity: 1; }
.tbl th.prac { color: var(--muted); font-style: italic; }
.tbl td.prac { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.stat-pick { margin-bottom: 14px; }

/* ── Team results fit the phone width; team settlement ── */
.teams { grid-template-columns: minmax(0, 1fr); }
.team-card { min-width: 0; align-items: flex-start; }
.team-card .tt { padding-top: 2px; }
.tg { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.tg span { font-size: 11.5px; color: var(--muted); padding: 2px 7px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.team-card .tm .tg span b { display: inline; font-size: 11.5px; color: var(--text); font-weight: 700; }
.tg span.prac { opacity: .6; font-style: italic; }
.tcosts .tsec:first-child { margin-top: 0; }
.tsec.tcx { --tc: #8f8a80; }
.tsec-h .amt { font-size: 18px; }
.tcost-meta { font-size: 12px; color: var(--muted); margin: 4px 0 0 40px; }
.tcost-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.tcost-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tcost-row .pname { font-size: 14px; }
.tcost-row small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tcost-row b { font-size: 14px; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }

/* ── Team cards: per-game chips use the full card width; team rename ── */
.team-card { flex-wrap: wrap; }
.team-card .tg { flex: 0 0 100%; margin-top: 2px; }
.tsec-h .icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.tsec-h .icon-btn.sm .ic { width: 15px; height: 15px; }
.tsec-h b + .icon-btn.sm { margin-right: auto; }
.tsec-h:has(.icon-btn.sm) b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn.gold-ic { color: var(--gold); border-color: var(--gold); }
.tname-in { flex: 1; height: 36px; font-size: 15px; }
.entry-filter .fl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Stats: period, hero ── */
.seg.period { margin-bottom: 12px; }
.seg.period button { font-size: 13px; height: 34px; }
.hero-name { font-size: 17px; font-weight: 700; color: #f1ead9; }
.hero-avg { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 14px; }
.hero-avg span { font-size: 13px; font-weight: 700; color: #d6b46e; letter-spacing: .04em; }
.hero-avg .hero-total { margin: 0; }

/* ── Settings: documents ── */
.link-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.link-item { display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; font-size: 15px; font-weight: 600; background: var(--surface2); }
.link-item + .link-item { border-top: 1px solid var(--line); }
.link-item span { flex: 1; }
.link-item .ic { width: 18px; height: 18px; color: var(--gold); }
.link-item .ic:last-child { color: var(--muted); width: 16px; height: 16px; }
.modal.doc-modal { padding: 0; display: flex; justify-content: center; align-items: stretch; overscroll-behavior: contain; }
.doc { background: var(--bg); width: 100%; max-width: 640px; height: 100%; max-height: 100%; min-height: 0; display: flex; flex-direction: column; animation: up .22s ease-out; }
.doc-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.doc-h h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.doc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 18px calc(32px + env(safe-area-inset-bottom)); font-size: 14.5px; line-height: 1.7; -webkit-overflow-scrolling: touch; }
.doc-body h3 { font-size: 16px; margin: 22px 0 6px; color: var(--gold); }
.doc-body h3 small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.doc-body p { margin: 6px 0; }
.doc-body ul { padding-left: 20px; margin: 6px 0; }
.doc-body li { margin: 5px 0; }
.doc-body a { color: var(--gold); }
.doc-body .doc-date { color: var(--muted); font-size: 12.5px; margin-top: 14px; }
.doc-body pre { white-space: pre-wrap; font-size: 11.5px; line-height: 1.5; color: var(--muted); background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.period-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: -2px 4px 12px; font-variant-numeric: tabular-nums; }
.period-note .ic { width: 14px; height: 14px; color: var(--gold); }

/* ── Stats: scrollable all-games table (≈10 rows), line chart ── */
.tbl-scroll { max-height: 452px; overflow-y: auto; border-radius: 10px; }
.tbl-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.chart.line .chart-plot { overflow: visible; }
.chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-svg polyline { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-pt { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); min-width: 0; }
.chart-pt::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed transparent; }
.chart-pt:hover::before, .chart-pt.on::before { border-left-color: var(--line-strong); }
.chart-pt i { position: absolute; left: 50%; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--surface); transition: transform .12s; }
.chart-pt:hover i, .chart-pt.on i { transform: scale(1.35); }
.chart-pt em { position: absolute; left: 50%; transform: translate(-50%, -10px); font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--text); white-space: nowrap; pointer-events: none; }

/* ── Long team names wrap (entry filter, team sections); team letter colors ── */
.entry-filter { display: flex; flex-wrap: wrap; }
.entry-filter button { flex: 1 1 auto; min-width: 54px; height: auto; min-height: 34px; padding: 5px 8px; white-space: normal; line-height: 1.25; }
.entry-filter .fl { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: left; }
.tsec-h:has(.icon-btn.sm) b { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.3; }
.team-card .tm b { word-break: keep-all; overflow-wrap: anywhere; }
.tl { font-weight: 800; }
.tl0 { color: #c9a052; } .tl1 { color: #5f82db; } .tl2 { color: #d4606b; } .tl3 { color: #3aa883; }

/* ── Locked past records ── */
.sess-btns { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.lock-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: -6px 2px 12px; }
.lock-note .ic { width: 14px; height: 14px; color: var(--gold); flex: 0 0 auto; }
#sess.locked .quick, #sess.locked .gtab.add, #sess.locked .link.danger, #sess.locked .tsec-h .icon-btn.sm { display: none; }
#sess.locked button:disabled { opacity: .6; cursor: default; }
#sess.locked .chip:not(.on):disabled { opacity: .35; }
#sess.locked .fblock { cursor: default; }
#sess.locked input[readonly] { background: transparent; border-style: dashed; }

/* ── Selected date stays on one line; future days disabled; compact score rows ── */
.sess-h > div:first-child { min-width: 0; }
.sess-h .display { font-size: clamp(17px, 5.3vw, 23px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-btns .btn.sm { height: 34px; padding: 0 11px; font-size: 13px; }
.sess-btns .btn.sm .ic { width: 16px; height: 16px; }
.cal-d.future { color: var(--muted); opacity: .35; cursor: default; }
.cal-nav:disabled { opacity: .25; cursor: default; }
.erow { padding: 5px 10px 5px 8px; gap: 8px; border-radius: 13px; }
.erow .team-badge { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.erow .pname { font-size: 14.5px; }
.erow .score-in { width: 76px; height: 38px; font-size: 18px; border-radius: 11px; }
.erow .etot { font-size: 16px; }
.erow .etot small { font-size: 10px; }
.elist { gap: 6px; }

/* ── Slimmer player / handicap rows and score rows ── */
.plist { gap: 6px; }
.prow { padding: 4px 8px 4px 10px; gap: 8px; border-radius: 12px; min-height: 40px; }
.prow .avatar, .prow .team-badge { width: 26px; height: 26px; font-size: 11.5px; border-radius: 8px; }
.prow .pname { font-size: 14.5px; }
.prow .field.sm { height: 30px; width: 54px; font-size: 15px; border-radius: 9px; }
.tsec .prow { padding-left: 10px; }
.prow.trow { row-gap: 4px; padding-bottom: 6px; }
.prow.trow .tmove button { height: 26px; }
.erow { padding: 3px 8px 3px 8px; border-radius: 12px; }
.erow .team-badge { width: 26px; height: 26px; font-size: 11.5px; border-radius: 8px; }
.erow .score-in { height: 32px; width: 72px; font-size: 17px; border-radius: 9px; }
.erow .etot { font-size: 15px; }
.elist { gap: 5px; }

/* ── Visible horizontal scroll bar for wide tables ── */
.tbl-wrap::-webkit-scrollbar { height: 0; }
.tbl-wrap { scrollbar-width: none; }
.hbar { position: relative; height: 4px; margin: 8px 2px 0; border-radius: 2px; background: var(--line); }
.hbar i { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--gold); opacity: .75; }

/* ── Results table: rank and name stay put while scrolling sideways ── */
.tbl.pin2 th:nth-child(1), .tbl.pin2 td:nth-child(1) { position: sticky; left: 0; z-index: 1; width: 32px; min-width: 32px; background: var(--surface); }
.tbl.pin2 th:nth-child(2), .tbl.pin2 td:nth-child(2) { position: sticky; left: 32px; z-index: 1; background: var(--surface); }
.tbl-wrap.scrollable .tbl.pin2 td:nth-child(2), .tbl-wrap.scrollable .tbl.pin2 th:nth-child(2) { box-shadow: 6px 0 8px -6px rgba(0, 0, 0, .45); }
.tbl-wrap:has(.tbl.pin2) { margin: 0; padding: 0; }

/* ── Results: plain rank numbers in a narrow pinned column ── */
.tbl.pin2 th:nth-child(1), .tbl.pin2 td:nth-child(1) { width: 22px; min-width: 22px; max-width: 22px; padding-left: 0; padding-right: 0; }
.tbl.pin2 th:nth-child(2), .tbl.pin2 td:nth-child(2) { left: 22px; }
.tbl td.rkn { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.tbl td.rkn.top { color: var(--gold); }

/* ── Line chart: average reference line ── */
.chart-avg { position: absolute; left: 0; right: 0; border-top: 1.5px dashed color-mix(in srgb, var(--gold) 55%, transparent); pointer-events: none; }
.chart-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.chart-top .chart-tip { margin-bottom: 0; }
.chart-avg-key { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-avg-key i { width: 14px; border-top: 1.5px dashed color-mix(in srgb, var(--gold) 70%, transparent); }




/* ── Handicap: the "핸디" label sits inside one compact box with the number ── */
.prow .hd { gap: 0; flex: 0 0 auto; height: 32px; padding-left: 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.prow .hd .hd-l { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: -.01em; }
.prow .hd .field.sm { width: 38px; height: 30px; padding: 0 6px 0 4px; border: 0; background: transparent; box-shadow: none; text-align: right; }
.prow .hd:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
#sess.locked .prow .hd { border-style: dashed; background: transparent; }
#sess.locked .prow .hd .field.sm { border: 0; }

/* ── Team rows: more room for names (tighter section padding, slimmer team buttons, names may wrap to 2 lines) ── */
.tsec { padding: 10px 8px 10px 10px; }
.tsec .plist { gap: 5px; }
.tsec .prow { padding: 4px 6px 4px 9px; gap: 6px; }
.tsec .prow .pname { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tsec .prow .hd { padding-left: 6px; }
.tsec .prow .hd .field.sm { width: 34px; padding: 0 5px 0 3px; }
.tsec .prow:not(.trow) .tmove { gap: 3px; }
.tsec .prow:not(.trow) .tmove button { width: 24px; height: 26px; border-radius: 7px; font-size: 11px; }
.erow .pname { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
