:root {
  color-scheme: light;
  --bg: #eaf0f3;
  --ink: #10212b;
  --muted: #65747e;
  --panel: #ffffff;
  --soft: #edf3f6;
  --line: rgba(16, 33, 43, 0.12);
  --blue: #12384f;
  --blue-2: #1f5d7f;
  --gold: #f2c230;
  --red: #bd3038;
  --shadow: 0 10px 28px rgba(16, 33, 43, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body.member-access-locked { overflow: hidden; }
.member-access-gate { position: fixed; inset: 0; z-index: 10000; padding: 24px; display: grid; place-items: center; overflow-y: auto; background: linear-gradient(145deg, rgba(5, 26, 35, 0.96), rgba(18, 56, 79, 0.96)); }
.member-access-gate[hidden] { display: none; }
.member-access-card { width: min(100%, 520px); padding: clamp(28px, 6vw, 52px); border-radius: 28px; color: var(--ink); background: var(--panel); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3); }
.member-access-icon { width: 70px; height: 70px; margin-bottom: 24px; }
.member-access-card h1 { margin: 0 0 14px; font-size: clamp(2.1rem, 7vw, 3.5rem); line-height: 0.98; }
.member-access-card > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); }
.member-access-form { display: grid; gap: 14px; }
.member-access-form .primary-action { width: 100%; margin-top: 4px; }
.member-access-form .account-message { margin: 2px 0 0; }
.member-access-back { display: block; margin-top: 22px; color: var(--navy); font-size: 0.86rem; font-weight: 800; text-align: center; }

body {
  font-family: Bahnschrift, Aptos, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--blue) 0 5.2rem, var(--bg) 5.2rem 100%);
  -webkit-tap-highlight-color: transparent;
}

body.theme-dark {
  color-scheme: dark;
  --bg: #07131a;
  --ink: #eef7f9;
  --muted: #a7bcc7;
  --panel: #10212b;
  --soft: #182f3d;
  --line: rgba(222, 239, 246, 0.14);
  --blue: #d8edf6;
  --blue-2: #9bcce2;
  --gold: #f1c65a;
  --red: #ff7f87;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  background: linear-gradient(180deg, #06141b 0 5.2rem, var(--bg) 5.2rem 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

h1,
h2,
p {
  margin-top: 0;
}

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 4.7rem;
  padding: 0.7rem 0.85rem;
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.65rem;
}

.brand-icon {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 13px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.eyebrow {
  margin: 0 0 0.18rem;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-topbar .eyebrow {
  color: #f4d067;
}

h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.profile-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
  min-width: 5.4rem;
  max-width: 8rem;
  padding: 0.34rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.profile-chip-avatar {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  overflow: hidden;
}

.profile-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-chip-copy {
  display: grid;
  min-width: 0;
}

.profile-chip-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-chip-copy strong {
  width: 100%;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip[data-state="online"] {
  border-color: rgba(242, 194, 48, 0.42);
  background: rgba(242, 194, 48, 0.18);
}

.profile-chip[data-state="online"] .profile-chip-copy span {
  color: #f4d067;
}

.app-screen {
  grid-row: 2;
  display: grid;
  align-content: start;
  gap: 0.7rem;
  min-height: 0;
  padding: 0.65rem 0.65rem calc(5.8rem + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  scroll-padding-bottom: calc(5.8rem + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#setup-page {
  grid-auto-rows: max-content;
}

.panel,
.score-progress-card,
.score-hero,
.performance-strip,
.current-end-panel,
.keypad-panel,
.review-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel,
.current-end-panel,
.keypad-panel,
.review-panel {
  padding: 0.9rem;
}

.score-progress-card {
  display: grid;
  gap: 0.38rem;
  padding: 0.55rem;
}

.scoring-screen.score-mode-classic {
  gap: 0.45rem;
}

.score-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

.score-mode-switch button {
  min-height: 2.25rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.score-mode-switch button.active {
  background: linear-gradient(145deg, #0d2b1d, var(--blue));
  color: var(--gold);
}

.classic-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.classic-status-strip article {
  display: grid;
  gap: 0.1rem;
  min-height: 3.1rem;
  padding: 0.5rem 0.4rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.classic-status-strip span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.classic-status-strip strong {
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1;
}

.score-mode-classic .training-only {
  display: none !important;
}

.score-mode-classic .score-progress-card,
.score-mode-classic .current-end-panel {
  padding: 0.72rem;
  border-radius: 16px;
}

.score-progress-card .score-hero,
.score-progress-card .performance-strip {
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

.scoring-screen {
  gap: 0.5rem;
  padding: 0.5rem 0.5rem calc(5.2rem + env(safe-area-inset-bottom));
}

.scoring-screen .score-progress-card,
.scoring-screen .current-end-panel,
.scoring-screen .review-panel {
  width: 100%;
  min-width: 0;
  border-radius: 18px;
}

.score-round-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.7rem;
}

.score-round-row .score-round {
  margin: 0.15rem 0;
  color: var(--blue);
  font-size: 1.18rem;
}

.score-mode-classic .score-round-row {
  gap: 0.55rem;
}

.score-mode-classic .score-round-row .eyebrow,
.score-mode-classic .score-total span,
.score-mode-classic .score-total small {
  display: none;
}

.score-mode-classic .score-round {
  font-size: 1rem;
  line-height: 1.1;
}

.score-mode-classic .score-meta {
  margin-top: 0.15rem;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-mode-classic .score-total {
  min-width: 4.8rem;
  padding: 0.35rem 0.55rem;
  border-radius: 13px;
  background: #fff8d8;
  text-align: center;
}

.score-mode-classic .score-total strong {
  font-size: 1.65rem;
}

.score-progress-card .score-meta,
.score-progress-card .score-total span,
.score-progress-card .score-total small {
  color: var(--muted);
}

.score-progress-card .score-total strong {
  color: var(--blue);
}

.score-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.score-progress-grid article {
  display: grid;
  align-content: center;
  gap: 0.1rem;
  min-width: 0;
  min-height: 3.2rem;
  padding: 0.45rem;
  border-radius: 13px;
  background: var(--soft);
}

.score-progress-grid span,
.score-progress-grid small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.score-progress-grid strong {
  color: var(--blue);
  font-size: 0.92rem;
  line-height: 1.1;
}

.end-total-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.1rem 0 0.2rem;
  color: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
}

.end-total-line strong {
  color: #8a6300;
  font-size: 2.15rem;
  line-height: 1;
}

.score-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.danger-lite {
  border-color: rgba(158, 40, 40, 0.28);
  color: #9e2828;
}

.panel-heading,
.current-end-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.status-pill,
.distance-pill {
  display: inline-grid;
  place-items: center;
  min-height: 2rem;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue-2);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.setup-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.setup-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 33, 43, 0.06);
}

.setup-card-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.setup-card-heading h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.08rem;
}

.setup-quick-start {
  width: 100%;
}

.setup-validation {
  display: grid;
  gap: 0.3rem;
  padding: 0.7rem 0.78rem;
  border: 1px solid rgba(189, 48, 56, 0.24);
  border-radius: 14px;
  background: rgba(189, 48, 56, 0.08);
}

.setup-validation p {
  margin: 0;
  color: #91232a;
  font-size: 0.84rem;
  font-weight: 850;
}

.setup-round-summary {
  display: grid;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 15px;
  background: var(--soft);
}

.setup-summary-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.65rem;
}

.setup-summary-title strong {
  color: var(--blue);
  font-size: 1.05rem;
}

.setup-summary-title span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.setup-summary-title em {
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  background: rgba(18, 56, 79, 0.08);
  color: var(--blue);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.setup-round-summary ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-round-summary li {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.setup-round-summary li strong {
  color: var(--blue);
}

.setup-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.setup-summary-grid article {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem;
  border-radius: 12px;
  background: #fff;
}

.setup-summary-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.setup-summary-grid strong {
  color: var(--blue);
  font-size: 0.92rem;
}

.setup-ready-summary {
  display: grid;
  gap: 0.65rem;
  padding: 0.78rem;
  border: 1px solid rgba(18, 56, 79, 0.12);
  border-radius: 15px;
  background: var(--soft);
}

.setup-ready-summary[data-state="ready"] {
  border-color: rgba(29, 126, 94, 0.24);
  background: rgba(29, 126, 94, 0.08);
}

.setup-ready-summary[data-state="check"] {
  border-color: rgba(242, 194, 48, 0.42);
  background: #fff8d8;
}

.setup-ready-summary strong {
  display: block;
  color: var(--blue);
  font-size: 1rem;
}

.setup-ready-summary span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.3;
}

.setup-ready-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.34rem;
}

.setup-ready-list span {
  display: grid;
  place-items: center;
  min-height: 2rem;
  padding: 0.3rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.setup-ready-list span[data-state="ready"] {
  border-color: rgba(29, 126, 94, 0.22);
  background: rgba(29, 126, 94, 0.1);
  color: #176044;
}

.setup-ready-list span[data-state="check"] {
  border-color: rgba(189, 48, 56, 0.22);
  background: rgba(189, 48, 56, 0.08);
  color: #91232a;
}

.setup-ready-list span[data-state="optional"] {
  border-color: rgba(18, 56, 79, 0.1);
  background: rgba(18, 56, 79, 0.06);
  color: var(--blue);
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.home-actions[hidden] {
  display: none;
}

.home-action-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.82rem;
  width: 100%;
  min-height: 4.3rem;
  padding: 0.78rem;
  border: 1px solid rgba(16, 33, 43, 0.1);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 20px rgba(16, 33, 43, 0.09);
}

.home-action-card:first-child,
.home-action-card:nth-child(2) {
  grid-column: 1 / -1;
}

.home-action-card:disabled {
  opacity: 0.58;
}

.home-action-icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d2b1d, var(--blue));
  color: #f4d067;
  font-size: 1.25rem;
  font-weight: 900;
}

.home-action-card strong,
.home-action-card small {
  display: block;
}

.home-action-card strong {
  color: #0d2b1d;
  font-size: 0.98rem;
}

.home-action-card small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.home-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.home-mode-card,
.home-stats {
  padding: 0.8rem;
  border: 1px solid rgba(16, 33, 43, 0.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 33, 43, 0.07);
}

.home-mode-card h3 {
  margin: 0 0 0.35rem;
  color: var(--blue);
  font-size: 1rem;
}

.home-mode-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.home-stats {
  display: grid;
  gap: 0.7rem;
  background: #fff;
  color: var(--ink);
}

.home-dashboard {
  padding: 0.85rem;
}

.home-dashboard-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(8, 43, 36, 0.96), rgba(18, 56, 79, 0.96));
  color: #fff;
}

.home-avatar {
  background: #fff;
  color: var(--blue);
  box-shadow: inset 0 0 0 3px rgba(242, 194, 48, 0.42);
}

.home-dashboard-hero h2 {
  color: #fff;
  font-size: 1.25rem;
}

.home-dashboard-hero p:not(.eyebrow) {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  font-weight: 800;
}

.home-active-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(242, 194, 48, 0.42);
  border-radius: 16px;
  background: #fff9df;
}

.home-active-card h3 {
  margin: 0;
  color: var(--blue);
}

.home-active-card p:not(.eyebrow) {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.home-progress-meter {
  display: grid;
  gap: 0.15rem;
  min-width: 4.4rem;
  text-align: right;
}

.home-progress-meter strong {
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1;
}

.home-progress-meter span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
}

.home-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.home-insight-card,
.home-latest-card {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 33, 43, 0.07);
}

.home-target-card {
  border-color: rgba(242, 194, 48, 0.36);
  background: linear-gradient(180deg, #fffdf4, #ffffff);
}

.home-insight-card h3,
.home-latest-card h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.05rem;
  line-height: 1.15;
}

.home-insight-card p:not(.eyebrow),
.home-latest-card p:not(.eyebrow) {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.home-insight-card .secondary-action {
  width: 100%;
}

.home-card-badge {
  align-self: end;
  justify-self: start;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(18, 56, 79, 0.08);
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 900;
}

.home-latest-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: var(--soft);
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.home-stat-grid article {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  min-height: 4.6rem;
  padding: 0.65rem;
  border: 1px solid rgba(18, 56, 79, 0.08);
  border-radius: 14px;
  background: var(--soft);
}

.home-stat-grid span,
.home-stat-grid small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
}

.home-stat-grid strong {
  color: var(--blue);
  font-size: 1.45rem;
  line-height: 1;
}

@media (max-width: 430px) {
  .home-active-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .home-active-card .primary-action,
  .home-active-card .secondary-action {
    grid-column: 1 / -1;
  }

  .home-progress-meter {
    min-width: 3.6rem;
  }

  .home-insight-grid,
  .home-latest-card {
    grid-template-columns: 1fr;
  }

  .home-latest-card .secondary-action {
    width: 100%;
  }
}

.field {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 3.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.72rem 0.78rem;
  background: #fff;
  color: var(--ink);
}

.field input[type="date"] {
  display: block;
  min-inline-size: 0;
  inline-size: 100%;
  -webkit-appearance: none;
  appearance: none;
  font-size: 0.92rem;
}

.setup-date-field {
  grid-column: 1 / -1;
}

.field textarea {
  resize: vertical;
  line-height: 1.4;
}

.field-full {
  grid-column: 1 / -1;
}

.primary-action,
.secondary-action,
.danger-action,
.nav-button,
.score-button {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  font-weight: 900;
}

.primary-action {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px rgba(18, 56, 79, 0.18);
}

.secondary-action {
  background: #fff;
  color: var(--blue);
}

.secondary-action.is-active {
  border-color: var(--gold);
  background: rgba(213, 174, 74, 0.16);
  color: var(--blue);
}

.danger-action {
  background: rgba(189, 48, 56, 0.08);
  color: #91232a;
  border-color: rgba(189, 48, 56, 0.26);
}

.theme-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--soft);
}

.theme-toggle-row strong,
.theme-toggle-row small {
  display: block;
}

.theme-toggle-row strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.theme-toggle-row small {
  margin-top: 0.14rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.theme-toggle-row input {
  width: 3.2rem;
  height: 1.8rem;
  accent-color: var(--gold);
}

body.theme-dark .panel,
body.theme-dark .setup-card,
body.theme-dark .home-action-card,
body.theme-dark .home-mode-card,
body.theme-dark .home-stats,
body.theme-dark .home-insight-card,
body.theme-dark .home-latest-card,
body.theme-dark .home-target-card,
body.theme-dark .member-profile-card,
body.theme-dark .achievement-chip,
body.theme-dark .classification-chip,
body.theme-dark .local-profile-card,
body.theme-dark .profile-tools-card,
body.theme-dark .profile-login-card,
body.theme-dark .profile-club-card,
body.theme-dark .equipment-active-card,
body.theme-dark .equipment-item,
body.theme-dark .equipment-form-panel,
body.theme-dark .equipment-form-section,
body.theme-dark .equipment-sightmark-editor,
body.theme-dark .record-card,
body.theme-dark .record-detail-card,
body.theme-dark .round-complete-card,
body.theme-dark .active-round-card,
body.theme-dark .score-entry-card,
body.theme-dark .progress-card,
body.theme-dark .current-end-card,
body.theme-dark .last-end-card,
body.theme-dark .score-sheet-card,
body.theme-dark .tools-card,
body.theme-dark .notices-card,
body.theme-dark .booking-card,
body.theme-dark .digital-member-card {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

body.theme-dark .score-mode-switch,
body.theme-dark .classic-status-strip article,
body.theme-dark .score-mode-classic .score-total {
  background: #0b1b24;
  border-color: var(--line);
}

body.theme-dark .classic-status-strip strong,
body.theme-dark .score-mode-classic .score-total strong {
  color: var(--ink);
}

body.theme-dark .training-prototype-screen {
  background:
    linear-gradient(180deg, rgba(5, 20, 18, 0.98), rgba(10, 31, 42, 0.94) 34%, rgba(7, 18, 24, 0.98) 34%);
}

body.theme-dark .training-summary-card,
body.theme-dark .training-end-card,
body.theme-dark .training-floating-panel {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

body.theme-dark .training-end-top b,
body.theme-dark .training-arrow-slots span,
body.theme-dark .training-placeholder-target,
body.theme-dark .training-placeholder-listen,
body.theme-dark .training-video-placeholder,
body.theme-dark .training-card-panel,
body.theme-dark .training-timer-grid article {
  background-color: #0b1b24;
}

body.theme-dark .field input,
body.theme-dark .field select,
body.theme-dark .field textarea,
body.theme-dark .secondary-action,
body.theme-dark .setup-round-summary,
body.theme-dark .setup-summary-grid article,
body.theme-dark .setup-ready-list span,
body.theme-dark .classification-grid article,
body.theme-dark .arrow-slot,
body.theme-dark .record-stat,
body.theme-dark .sight-mark-item {
  background: #0b1b24;
  color: var(--ink);
  border-color: var(--line);
}

body.theme-dark .primary-action {
  background: #0f4c64;
  color: #fff;
}

body.theme-dark .danger-action {
  background: rgba(255, 127, 135, 0.12);
  color: #ffb5ba;
  border-color: rgba(255, 127, 135, 0.32);
}

body.theme-dark .home-active-card,
body.theme-dark .setup-ready-summary[data-state="check"] {
  background: rgba(241, 198, 90, 0.13);
}

body.theme-dark .setup-ready-summary[data-state="ready"] {
  background: rgba(43, 180, 132, 0.12);
}

body.theme-dark .home-stat-grid article,
body.theme-dark .theme-toggle-row,
body.theme-dark .current-arrow,
body.theme-dark .end-total-line {
  background: #0b1b24;
  border-color: var(--line);
}

body.theme-dark .achievement-badge {
  border-color: rgba(241, 198, 90, 0.28);
  background: linear-gradient(180deg, rgba(241, 198, 90, 0.14), rgba(11, 27, 36, 0.96));
}

body.theme-dark .achievement-pb {
  border-color: rgba(43, 180, 132, 0.28);
  background: linear-gradient(180deg, rgba(43, 180, 132, 0.14), rgba(11, 27, 36, 0.96));
}

body.theme-dark .achievement-official {
  border-color: rgba(155, 204, 226, 0.3);
  background: linear-gradient(180deg, rgba(155, 204, 226, 0.13), rgba(11, 27, 36, 0.96));
}

body.theme-dark .achievement-badge span,
body.theme-dark .achievement-badge strong,
body.theme-dark .achievement-badge p {
  color: var(--ink);
}

body.theme-dark .profile-chip,
body.theme-dark .app-bottom-nav {
  background: rgba(5, 14, 19, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .app-topbar {
  color: #fff;
}

.offline-status {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.16);
  border-radius: 15px;
  background: rgba(18, 56, 79, 0.08);
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 800;
}

.offline-status[hidden] {
  display: none;
}

.offline-status.is-warning {
  border-color: rgba(189, 48, 56, 0.26);
  background: rgba(189, 48, 56, 0.08);
  color: #91232a;
}

.account-panel {
  display: grid;
  gap: 0.75rem;
}

.account-panel .panel-heading {
  margin-bottom: 0;
}

.member-dashboard {
  display: grid;
  gap: 0.75rem;
}

.account-message {
  margin: 0;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(18, 56, 79, 0.14);
  border-radius: 14px;
  background: rgba(18, 56, 79, 0.07);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.account-message[data-state="warning"],
.status-pill[data-state="warning"] {
  border-color: rgba(189, 48, 56, 0.24);
  background: rgba(189, 48, 56, 0.08);
  color: #91232a;
}

.account-message[data-state="ready"],
.status-pill[data-state="ready"] {
  border-color: rgba(29, 126, 94, 0.24);
  background: rgba(29, 126, 94, 0.1);
  color: #176044;
}

.auth-grid,
.auth-actions {
  display: grid;
  gap: 0.55rem;
}

.auth-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-actions button:only-child {
  grid-column: 1 / -1;
}

.member-summary {
  display: grid;
  gap: 0.18rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.member-summary strong {
  color: var(--blue);
  font-size: 1rem;
}

.member-summary span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.member-profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(242, 194, 48, 0.32);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(8, 43, 36, 0.96), rgba(18, 56, 79, 0.96)),
    var(--blue);
  box-shadow: 0 14px 28px rgba(16, 33, 43, 0.16);
}

.member-avatar {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  overflow: hidden;
}

.member-profile-card .member-avatar {
  width: 4.1rem;
  height: 4.1rem;
  background: #fff;
  color: var(--blue);
  box-shadow: inset 0 0 0 3px rgba(242, 194, 48, 0.42);
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-hero-body {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.member-hero-title {
  display: grid;
  gap: 0.08rem;
}

.member-hero-title span {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.member-profile-card strong,
.member-hero-title strong {
  color: #fff;
  font-size: 1.42rem;
  line-height: 1.05;
}

.member-hero-details,
.member-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.member-profile-card span,
.member-hero-details span,
.member-hero-meta span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.84rem;
  font-weight: 800;
}

.member-hero-details span {
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.member-hero-meta span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.profile-photo-link {
  justify-self: start;
  min-height: 0;
  margin-top: 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.member-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.member-profile-stats article {
  display: grid;
  gap: 0.14rem;
  min-height: 4.25rem;
  padding: 0.68rem;
  border-radius: 13px;
  border: 1px solid rgba(18, 56, 79, 0.08);
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 33, 43, 0.05);
}

@media (max-width: 430px) {
  .setup-card {
    grid-template-columns: 1fr;
  }
}

.member-profile-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.member-profile-stats strong {
  color: var(--blue);
  font-size: 1.3rem;
  line-height: 1.05;
}

.member-achievements {
  display: grid;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.achievement-chip,
.classification-chip {
  display: grid;
  gap: 0.65rem;
  min-height: 0;
  padding: 0.75rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 33, 43, 0.05);
  overflow: visible;
}

.achievement-chip[open],
.classification-chip[open] {
  align-content: start;
}

.achievement-chip summary,
.classification-chip summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.achievement-chip summary::-webkit-details-marker,
.classification-chip summary::-webkit-details-marker {
  display: none;
}

.achievement-chip[open] .rollup-chevron,
.classification-chip[open] .rollup-chevron {
  font-size: 0;
}

.achievement-chip[open] .rollup-chevron::after,
.classification-chip[open] .rollup-chevron::after {
  content: "Hide";
  font-size: 0.74rem;
}

.achievement-chip-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.achievement-chip-title h3,
.achievement-heading h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.08rem;
}

.achievement-chip-title small {
  display: block;
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.achievement-medal {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid rgba(242, 194, 48, 0.62);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, #fff8cf 0 28%, #f2c230 29% 52%, #0d3b2e 53% 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 950;
  text-shadow: 0 1px 2px rgba(16, 33, 43, 0.48);
}

.achievement-section {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(18, 56, 79, 0.08);
}

.achievement-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.achievement-section-head strong {
  color: var(--blue);
  font-size: 0.95rem;
}

.achievement-section-head span {
  display: inline-grid;
  place-items: center;
  min-width: 1.65rem;
  min-height: 1.35rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: rgba(242, 194, 48, 0.18);
  color: #7a5a07;
  font-size: 0.74rem;
  font-weight: 950;
}

.classification-card {
  display: grid;
}

.classification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.classification-grid article {
  display: grid;
  gap: 0.18rem;
  padding: 0.65rem;
  border-radius: 13px;
  background: var(--soft);
}

.classification-grid span,
.classification-tiers p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.3;
}

.classification-grid strong,
.classification-tiers strong {
  color: var(--blue);
}

.classification-grid p,
.classification-tiers p {
  margin: 0;
}

.classification-tiers {
  display: grid;
  gap: 0.6rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(18, 56, 79, 0.08);
}

.classification-tiers section {
  display: grid;
  gap: 0.25rem;
}

.achievement-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.achievement-badge {
  display: grid;
  gap: 0.18rem;
  min-height: 4.9rem;
  padding: 0.68rem;
  border: 1px solid rgba(242, 194, 48, 0.36);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff9df, #ffffff);
}

.achievement-pb {
  border-color: rgba(29, 126, 94, 0.26);
  background: linear-gradient(180deg, rgba(29, 126, 94, 0.1), #ffffff);
}

.achievement-official {
  border-color: rgba(18, 56, 79, 0.2);
  background: linear-gradient(180deg, rgba(242, 194, 48, 0.16), #ffffff);
}

.achievement-summary-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.achievement-badge span {
  color: #7a5a07;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.achievement-badge strong {
  color: var(--blue);
  font-size: 1.15rem;
  line-height: 1.05;
}

.achievement-badge p,
.achievement-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

.achievement-starter {
  display: grid;
  gap: 0.7rem;
}

.achievement-starter .secondary-action {
  width: 100%;
}

.achievement-progress-badge {
  border-color: rgba(213, 174, 74, 0.3);
  background: linear-gradient(135deg, rgba(213, 174, 74, 0.16), rgba(255, 255, 255, 0.94));
}

.local-profile-card,
.profile-tools-card,
.profile-login-card,
.profile-club-card,
.equipment-active-card,
.equipment-sightmark-editor {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 33, 43, 0.05);
}

.profile-rollup {
  overflow: hidden;
}

.profile-rollup summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.4rem;
  cursor: pointer;
  list-style: none;
}

.profile-rollup summary::-webkit-details-marker {
  display: none;
}

.rollup-title {
  display: grid;
  gap: 0.1rem;
}

.rollup-title h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.04rem;
}

.rollup-chevron {
  flex: 0 0 auto;
  min-width: 3.2rem;
  padding: 0.32rem 0.48rem;
  border-radius: 999px;
  background: rgba(18, 56, 79, 0.08);
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.profile-rollup[open] .rollup-chevron {
  font-size: 0;
}

.profile-rollup[open] .rollup-chevron::after {
  content: "Hide";
  font-size: 0.74rem;
}

.local-profile-card .panel-heading,
.profile-tools-card .panel-heading,
.profile-login-card .panel-heading,
.profile-club-card .panel-heading {
  margin-bottom: 0;
}

.local-profile-card::after {
  content: attr(data-summary);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.local-profile-form,
.sight-mark-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.local-profile-form .primary-action,
.local-profile-form .secondary-action,
.sight-mark-form .primary-action,
.sight-mark-form .secondary-action,
.sight-mark-form .field-full {
  grid-column: 1 / -1;
}

.equipment-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 33, 43, 0.05);
}

.equipment-intro {
  margin: -0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.equipment-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.equipment-heading h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.08rem;
}

.equipment-form,
.equipment-list {
  display: grid;
  gap: 0.55rem;
}

.equipment-form {
  grid-template-columns: 1fr;
}

.equipment-form .primary-action,
.equipment-form .field-full,
.equipment-form .equipment-form-actions {
  grid-column: 1 / -1;
}

.equipment-form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.equipment-dashboard-section,
.equipment-form-panel,
.equipment-form-section {
  display: grid;
  gap: 0.7rem;
}

.equipment-form-panel {
  padding: 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.12);
  border-radius: 16px;
  background: var(--soft);
}

.compact-action {
  min-height: 2.5rem;
  padding-inline: 0.8rem;
}

.equipment-form-section {
  padding: 0.72rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 14px;
  background: #fff;
}

.equipment-form-section summary {
  cursor: pointer;
  list-style: none;
}

.equipment-form-section summary::-webkit-details-marker {
  display: none;
}

.equipment-form-section summary span {
  color: var(--blue);
  font-weight: 900;
}

.equipment-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.equipment-active-card {
  border-color: rgba(242, 194, 48, 0.52);
  background: linear-gradient(180deg, #fff9df, #ffffff);
}

.active-equipment-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 0.75rem;
}

.equipment-active-card h3 {
  margin: 0;
  color: var(--blue);
}

.equipment-active-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.active-equipment-grid,
.record-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.active-equipment-grid article,
.record-equipment-grid article {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(18, 56, 79, 0.08);
}

.active-equipment-grid span,
.record-equipment-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.active-equipment-grid strong,
.record-equipment-grid strong {
  color: var(--blue);
  font-size: 0.9rem;
  line-height: 1.15;
}

.active-equipment-notes {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.equipment-item {
  display: grid;
  gap: 0.6rem;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.equipment-item.is-active {
  border-color: rgba(242, 194, 48, 0.72);
  background: linear-gradient(180deg, #fff9df, #ffffff);
  box-shadow: 0 8px 22px rgba(242, 194, 48, 0.15);
}

.equipment-date {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.equipment-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.equipment-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.equipment-item div:first-child {
  display: grid;
  gap: 0.12rem;
}

.equipment-item strong {
  color: var(--blue);
}

.equipment-item span,
.equipment-item p,
.equipment-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.equipment-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.equipment-sightmarks,
.sight-marks-list {
  display: grid;
  gap: 0.45rem;
}

.equipment-sightmarks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.equipment-sightmarks span,
.sight-mark-item {
  padding: 0.48rem 0.55rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 12px;
  background: #fff;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.equipment-sightmark-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.equipment-sightmark-chips span {
  display: grid;
  gap: 0.08rem;
  padding: 0.52rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.equipment-sightmark-chips strong {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.equipment-sightmark-chips b {
  color: var(--blue);
  font-size: 1rem;
}

.equipment-sightmark-chips small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.sight-mark-item {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.sight-mark-item strong,
.sight-mark-item span,
.sight-mark-item p {
  display: block;
  margin: 0;
}

.equipment-setup-summary {
  display: grid;
  gap: 0.18rem;
  padding: 0.7rem 0.78rem;
  border: 1px solid rgba(242, 194, 48, 0.52);
  border-radius: 14px;
  background: #fff8d8;
  color: #6f4b00;
}

.equipment-setup-summary strong {
  color: var(--blue);
}

.setup-equipment-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.setup-equipment-head div {
  display: grid;
  gap: 0.1rem;
}

.setup-equipment-head em {
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  background: rgba(18, 56, 79, 0.1);
  color: var(--blue);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.equipment-setup-summary span,
.equipment-setup-summary p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.digital-member-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #12384f, #27627e);
  color: #fff;
  box-shadow: 0 10px 22px rgba(18, 56, 79, 0.18);
}

.member-card-top,
.member-card-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.member-card-top span,
.member-card-strip span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.member-card-top strong {
  color: #f4d067;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.member-card-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.member-card-avatar {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.member-card-main div:last-child {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.member-card-main strong {
  font-size: 1.1rem;
}

.member-card-main span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 800;
}

.member-card-strip {
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.member-card-strip strong {
  color: #fff;
  font-size: 0.96rem;
}

.booking-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.14);
  border-radius: 16px;
  background: #fff;
}

.booking-card h3,
.booking-card p {
  margin: 0;
}

.booking-card h3 {
  color: var(--blue);
  font-size: 1.08rem;
}

.booking-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.notices-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.14);
  border-radius: 16px;
  background: #fff;
}

.notices-heading,
.notice-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.notices-heading h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.08rem;
}

.notices-list {
  display: grid;
  gap: 0.55rem;
}

.notice-item {
  display: grid;
  gap: 0.34rem;
  padding: 0.7rem;
  border-radius: 13px;
  background: var(--soft);
}

.notice-item strong {
  color: var(--blue);
  font-size: 0.96rem;
}

.notice-item p,
.notice-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.notice-item > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notice-pin {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(242, 194, 48, 0.24);
  color: #6f4b00 !important;
  font-size: 0.68rem !important;
  font-weight: 900;
  text-transform: uppercase;
}

.score-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 5.9rem;
  padding: 0.85rem 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, #12384f, #246483);
}

.score-round {
  margin: 0 0 0.18rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.score-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
}

.score-total {
  display: grid;
  justify-items: end;
  flex: 0 0 auto;
  min-width: 5.1rem;
}

.score-total span,
.score-total small,
.performance-strip span,
.performance-strip small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-total span,
.score-total small {
  color: rgba(255, 255, 255, 0.72);
}

.score-total strong {
  font-size: 2.8rem;
  line-height: 0.95;
}

.performance-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.45rem;
}

.performance-strip article {
  display: grid;
  align-content: center;
  gap: 0.12rem;
  min-width: 0;
  min-height: 4.15rem;
  padding: 0.52rem;
  border-radius: 12px;
  background: var(--soft);
}

.performance-strip strong {
  font-size: 1.35rem;
  line-height: 1;
}

.current-end-panel {
  display: grid;
  gap: 0.42rem;
  padding: 0.58rem;
  overflow: visible;
}

.current-end-heading {
  margin-bottom: 0;
  padding: 0;
}

.current-end-heading > div {
  min-width: 0;
}

.current-end-heading .distance-pill {
  flex: 0 0 auto;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.current-end {
  display: grid !important;
  width: 100%;
  min-height: 2.4rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.28rem;
  padding: 0;
}

.current-end[data-per-end="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.current-end[data-per-end="5"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.current-end[data-per-end="6"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.current-arrow {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: clamp(2.65rem, 12vw, 3.7rem);
  border: 1px dashed rgba(18, 56, 79, 0.24);
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
}

@media (min-width: 520px) {
  .current-end {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .current-end[data-per-end="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .current-end[data-per-end="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .current-end[data-per-end="6"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.current-arrow.is-filled {
  border-style: solid;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 4px 10px rgba(16, 33, 43, 0.08);
}

.current-arrow.is-filled.gold,
.score-button.gold {
  border-color: rgba(242, 194, 48, 0.88);
  background: linear-gradient(145deg, #f8d45c, #b9820b);
  color: #142313;
}

.current-arrow.is-filled.red {
  border-color: rgba(189, 48, 56, 0.55);
  background: linear-gradient(145deg, #b9323c, #782128);
  color: #fff;
}

.current-arrow.is-filled.blue {
  border-color: rgba(35, 118, 163, 0.58);
  background: linear-gradient(145deg, #2d91c5, #12384f);
  color: #fff;
}

.current-arrow.is-filled.black {
  border-color: rgba(16, 33, 43, 0.65);
  background: linear-gradient(145deg, #262f34, #111719);
  color: #fff;
}

.current-arrow.is-filled.white {
  border-color: rgba(18, 56, 79, 0.24);
  background: #fff;
  color: var(--blue);
}

.current-arrow.is-filled.miss {
  border-color: rgba(29, 126, 94, 0.38);
  background: linear-gradient(145deg, #1f8a62, #0d3b2e);
  color: #fff;
}

body.theme-dark .current-arrow.is-filled.gold,
body.theme-dark .arrow-value.gold,
body.theme-dark .sheet-edit-current strong.gold {
  border-color: rgba(248, 212, 92, 0.95);
  background: linear-gradient(145deg, #ffe06d, #b9820b);
  color: #14170b;
}

body.theme-dark .current-arrow.is-filled.red,
body.theme-dark .arrow-value.red,
body.theme-dark .sheet-edit-current strong.red {
  border-color: rgba(255, 127, 135, 0.72);
  background: linear-gradient(145deg, #ff727b, #8e252d);
  color: #fff;
}

body.theme-dark .current-arrow.is-filled.blue,
body.theme-dark .arrow-value.blue,
body.theme-dark .sheet-edit-current strong.blue {
  border-color: rgba(96, 178, 222, 0.68);
  background: linear-gradient(145deg, #4bb2e3, #12384f);
  color: #fff;
}

body.theme-dark .current-arrow.is-filled.black,
body.theme-dark .arrow-value.black,
body.theme-dark .sheet-edit-current strong.black {
  border-color: rgba(238, 247, 249, 0.28);
  background: linear-gradient(145deg, #2b3439, #05090b);
  color: #fff;
}

body.theme-dark .current-arrow.is-filled.white,
body.theme-dark .arrow-value.white,
body.theme-dark .sheet-edit-current strong.white {
  border-color: rgba(238, 247, 249, 0.9);
  background: linear-gradient(145deg, #ffffff, #d9e5eb);
  color: #12384f;
}

body.theme-dark .current-arrow.is-filled.miss,
body.theme-dark .arrow-value.miss,
body.theme-dark .sheet-edit-current strong.miss {
  border-color: rgba(43, 180, 132, 0.65);
  background: linear-gradient(145deg, #2bb484, #0b3a2a);
  color: #fff;
}

.distance-change-alert {
  display: grid;
  gap: 0.12rem;
  margin: 0 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(242, 194, 48, 0.72);
  border-radius: 13px;
  background: #fff8d8;
  color: #6f4b00;
}

.distance-change-alert span {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.distance-change-alert strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.progress-award-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 13px;
  background: #fff;
}

.progress-award-card h3,
.progress-award-card p {
  margin: 0;
}

.progress-award-card h3 {
  color: var(--blue);
  font-size: 0.98rem;
}

.progress-award-card p {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.progress-badge-chip {
  display: inline-grid;
  place-items: center;
  min-width: 3.6rem;
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(18, 56, 79, 0.12);
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.progress-badge-chip.white {
  background: #fff;
  color: var(--blue);
}

.progress-badge-chip.black {
  background: #111719;
  color: #fff;
}

.progress-badge-chip.blue {
  background: #2376a3;
  color: #fff;
}

.progress-badge-chip.red {
  background: var(--red);
  color: #fff;
}

.progress-badge-chip.gold {
  background: var(--gold);
  color: #3d2a00;
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem;
  border-top: 0;
  background: transparent;
}

.end-stats article {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.15rem;
  min-width: 0;
  min-height: 2.45rem;
  padding: 0.38rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.end-stats article:last-child {
  border-right: 0;
}

.end-total-card {
  grid-column: 1 / -1;
  border-right: 0 !important;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbfc, #eef5f7) !important;
}

.end-stats span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.end-stats strong {
  color: var(--blue);
  font-size: 1rem;
  line-height: 1;
}

.end-total-card strong {
  font-size: 2rem;
}

.keypad-panel {
  display: grid;
  gap: 0.42rem;
  padding: 0.35rem 0 0;
  border: 0;
  border-top: 0;
  border-radius: 0;
  box-shadow: none;
}

.keypad-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.keypad-heading h2 {
  color: #0d2b1d;
  font-size: 1.45rem;
}

.icon-action {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.score-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 0.35rem;
}

.score-button {
  width: 100%;
  min-width: 0;
  min-height: clamp(3.15rem, 11vw, 4.35rem);
  border-radius: 12px;
  background: linear-gradient(145deg, #0d2b1d, var(--blue));
  color: #fff;
  font-size: clamp(1.45rem, 7vw, 2.15rem);
  box-shadow: 0 6px 14px rgba(16, 33, 43, 0.16);
}

.score-button.red {
  background: linear-gradient(145deg, #55272a, var(--red));
  color: #fff;
}

.score-button.blue {
  background: linear-gradient(145deg, #12384f, #2376a3);
  color: #fff;
}

.score-button.black {
  background: linear-gradient(145deg, #111719, #20272c);
  color: #fff;
}

.score-button.white {
  border-color: rgba(18, 56, 79, 0.24);
  background: #fff;
  color: var(--blue);
}

.score-button.miss {
  border-color: rgba(29, 126, 94, 0.38);
  background: linear-gradient(145deg, #1f8a62, #0d3b2e);
  color: #fff;
}

body.theme-dark .score-button {
  border-color: rgba(241, 198, 90, 0.28);
  background: linear-gradient(145deg, #0f2a21, #16445c);
  color: #f7fbfd;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

body.theme-dark .score-button.gold {
  border-color: rgba(248, 212, 92, 0.95);
  background: linear-gradient(145deg, #ffe06d, #b9820b);
  color: #14170b;
}

body.theme-dark .score-button.red {
  border-color: rgba(255, 127, 135, 0.72);
  background: linear-gradient(145deg, #ff727b, #8e252d);
  color: #fff;
}

body.theme-dark .score-button.blue {
  border-color: rgba(96, 178, 222, 0.68);
  background: linear-gradient(145deg, #4bb2e3, #12384f);
  color: #fff;
}

body.theme-dark .score-button.black {
  border-color: rgba(238, 247, 249, 0.28);
  background: linear-gradient(145deg, #2b3439, #05090b);
  color: #fff;
}

body.theme-dark .score-button.white {
  border-color: rgba(238, 247, 249, 0.9);
  background: linear-gradient(145deg, #ffffff, #d9e5eb);
  color: #12384f;
}

body.theme-dark .score-button.miss {
  border-color: rgba(43, 180, 132, 0.65);
  background: linear-gradient(145deg, #2bb484, #0b3a2a);
  color: #fff;
}

.score-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
  box-shadow: none;
}

.score-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.score-mode-classic .current-end-heading {
  align-items: center;
}

.score-mode-classic .current-end-heading .eyebrow {
  display: none;
}

.score-mode-classic .current-end-heading h2 {
  font-size: 1.22rem;
}

.score-mode-classic .distance-pill {
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
}

.score-mode-classic .current-end {
  gap: 0.32rem;
}

.score-mode-classic .current-arrow {
  min-height: clamp(2.35rem, 10vw, 3rem);
  border-radius: 11px;
}

.score-mode-classic .analysis-hint,
.score-mode-classic .analysis-dot {
  display: none;
}

.score-mode-classic .end-total-line {
  min-height: 2.45rem;
  padding: 0.35rem 0.55rem;
  border-radius: 13px;
}

.score-mode-classic .end-total-line span {
  font-size: 0.72rem;
}

.score-mode-classic .end-total-line strong {
  font-size: 1.8rem;
}

.score-mode-classic .keypad-panel {
  gap: 0.48rem;
}

.score-mode-classic .score-pad {
  gap: 0.4rem;
}

.score-mode-classic .score-button {
  min-height: clamp(3.25rem, 13vw, 4.35rem);
  border-radius: 13px;
}

.score-mode-classic .score-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.score-mode-classic .score-actions button {
  min-height: 2.85rem;
  padding: 0.45rem 0.3rem;
}

.finish-early-button {
  min-height: 2.55rem;
  border: 1px solid rgba(242, 194, 48, 0.65);
  border-radius: 15px;
  background: #fff8d8;
  color: #6f4b00;
  font-weight: 900;
}

.tool-grid {
  grid-template-columns: 1fr;
}

.training-prototype-screen {
  min-height: calc(100dvh - 4.5rem);
  padding: 0.75rem 0.75rem calc(13.5rem + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(13, 43, 29, 0.96), rgba(18, 56, 79, 0.88) 34%, rgba(238, 242, 244, 0.98) 34%);
}

.training-prototype-header {
  position: sticky;
  top: 0.35rem;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(242, 194, 48, 0.35);
  border-radius: 18px;
  background: rgba(8, 27, 23, 0.9);
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 33, 43, 0.18);
}

.training-prototype-header h2 {
  margin: 0.1rem 0;
  color: #fff;
}

.training-prototype-header span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.training-end-timeline {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.training-summary-card,
.training-end-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 18px rgba(16, 33, 43, 0.1);
}

.training-summary-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.training-summary-card span,
.training-summary-card small,
.training-end-card span,
.training-end-card p {
  color: var(--muted);
  font-weight: 800;
}

.training-summary-card strong {
  color: var(--blue);
  font-size: 2rem;
}

.training-end-card.is-active {
  border-color: rgba(242, 194, 48, 0.75);
  box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.18), 0 8px 20px rgba(16, 33, 43, 0.13);
}

.training-end-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.training-end-top strong,
.training-end-top b {
  color: var(--blue);
}

.training-end-top b {
  display: grid;
  place-items: center;
  min-width: 2.7rem;
  min-height: 2.7rem;
  border-radius: 14px;
  background: #fff8d8;
  font-size: 1.35rem;
}

.training-arrow-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
}

.training-arrow-slots span {
  display: grid;
  place-items: center;
  min-height: 2.35rem;
  border: 1px dashed rgba(18, 56, 79, 0.22);
  border-radius: 11px;
  background: var(--soft);
  color: var(--muted);
}

.training-arrow-slots span.is-filled {
  border-style: solid;
  color: #fff;
}

.training-card-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.3rem;
}

.training-card-tools button {
  min-height: 2.15rem;
  padding: 0.25rem;
  border: 1px solid rgba(18, 56, 79, 0.12);
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.training-card-tools button.active {
  border-color: rgba(242, 194, 48, 0.62);
  background: var(--blue);
  color: #fff;
}

.training-card-panel {
  display: grid;
  gap: 0.5rem;
  padding: 0.6rem;
  border-radius: 14px;
  background: rgba(18, 56, 79, 0.05);
}

.training-video-placeholder,
.training-placeholder-listen {
  display: grid;
  place-items: center;
  min-height: 6.5rem;
  padding: 0.75rem;
  border: 1px dashed rgba(18, 56, 79, 0.32);
  border-radius: 18px;
  background: rgba(18, 56, 79, 0.06);
  text-align: center;
}

.training-video-placeholder strong {
  color: var(--blue);
}

.training-timer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.training-timer-grid article {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.training-timer-grid span,
.training-timer-grid small,
.training-process-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.training-timer-grid strong {
  color: var(--blue);
  font-size: 1.2rem;
}

.training-process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.training-process-grid label {
  display: grid;
  gap: 0.3rem;
}

.training-floating-panel {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: calc(4.6rem + env(safe-area-inset-bottom));
  z-index: 8;
  display: grid;
  gap: 0.65rem;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.75rem;
  border: 1px solid rgba(242, 194, 48, 0.38);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.97);
  box-shadow: 0 18px 50px rgba(16, 33, 43, 0.24);
}

.training-input-panel {
  display: grid;
  gap: 0.55rem;
}

.training-panel-title,
.training-panel-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.training-panel-title span {
  color: var(--muted);
  font-weight: 900;
}

.training-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.training-score-grid .score-button {
  min-height: 2.9rem;
  border-radius: 12px;
  font-size: 1.25rem;
}

.training-panel-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.training-placeholder-target {
  display: grid;
  place-items: center;
  min-height: 7.2rem;
  border: 1px dashed rgba(18, 56, 79, 0.32);
  border-radius: 18px;
  background: rgba(18, 56, 79, 0.06);
  text-align: center;
}

.training-placeholder-target {
  border-radius: 50%;
  aspect-ratio: 1;
  width: min(10rem, 52vw);
  justify-self: center;
  background: radial-gradient(circle, #f2c230 0 16%, #bd3038 16% 34%, #2b8fd0 34% 52%, #191f22 52% 70%, #fff 70% 100%);
}

.training-placeholder-copy {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.review-panel {
  display: grid;
  gap: 0.65rem;
}

.end-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.last-end-toggle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(242, 194, 48, 0.42);
  border-radius: 14px;
  background: linear-gradient(145deg, #0d2b1d, var(--blue));
  color: #fff;
  text-align: left;
}

.last-end-toggle span {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.last-end-toggle strong {
  justify-self: center;
  color: #fff;
  font-size: 1.55rem;
}

.last-end-toggle small {
  grid-column: 1 / 3;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.last-end-toggle b {
  grid-row: 1 / span 2;
  grid-column: 3;
  color: var(--gold);
  font-size: 1.25rem;
}

.review-stat {
  display: grid;
  gap: 0.12rem;
  padding: 0.62rem;
  border-radius: 13px;
  background: var(--soft);
}

.review-stat span,
.coach-insight {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.review-stat strong {
  font-size: 1.35rem;
}

.review-note,
.review-empty,
.coach-insight p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.ends-table,
.records-list {
  display: grid;
  gap: 0.65rem;
}

.end-row,
.record-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(16, 33, 43, 0.08);
}

.end-row.is-current-end {
  border-color: rgba(242, 194, 48, 0.75);
  box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.18), 0 8px 20px rgba(16, 33, 43, 0.12);
}

.end-row.is-current-end .end-title::after {
  content: " current";
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.record-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 0.7rem;
}

.record-main {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.record-main strong {
  color: var(--blue);
  font-size: 1.06rem;
  line-height: 1.12;
}

.record-date {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.end-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.end-title {
  font-size: 1.05rem;
}

.end-distance,
.record-meta {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.end-distance {
  padding: 0.3rem 0.52rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  white-space: nowrap;
}

.end-arrows {
  display: grid;
  width: 100%;
  gap: 0.35rem;
}

.sheet-edit-hint {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.arrow-value {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

button.arrow-value {
  cursor: pointer;
}

.arrow-value.gold {
  border-color: rgba(242, 194, 48, 0.88);
  background: linear-gradient(145deg, #f8d45c, #b9820b);
  color: #142313;
}

.arrow-value.red {
  border-color: rgba(189, 48, 56, 0.55);
  background: linear-gradient(145deg, #b9323c, #782128);
  color: #fff;
}

.arrow-value.blue {
  border-color: rgba(35, 118, 163, 0.58);
  background: linear-gradient(145deg, #2d91c5, #12384f);
  color: #fff;
}

.arrow-value.black {
  border-color: rgba(16, 33, 43, 0.65);
  background: linear-gradient(145deg, #262f34, #111719);
  color: #fff;
}

.arrow-value.white {
  border-color: rgba(18, 56, 79, 0.24);
  background: #fff;
  color: var(--blue);
}

.arrow-value.miss {
  border-color: rgba(29, 126, 94, 0.38);
  background: linear-gradient(145deg, #1f8a62, #0d3b2e);
  color: #fff;
}

.sheet-edit-overlay {
  z-index: 190;
}

.sheet-edit-panel {
  gap: 0.9rem;
}

.sheet-edit-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 15px;
  background: var(--soft);
}

.sheet-edit-current span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-edit-current strong {
  display: grid;
  place-items: center;
  min-width: 3.2rem;
  min-height: 3.2rem;
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  font-size: 1.4rem;
}

.sheet-edit-current strong.gold {
  background: linear-gradient(145deg, #f8d45c, #b9820b);
  color: #142313;
}

.sheet-edit-current strong.red {
  background: linear-gradient(145deg, #b9323c, #782128);
  color: #fff;
}

.sheet-edit-current strong.blue {
  background: linear-gradient(145deg, #2d91c5, #12384f);
  color: #fff;
}

.sheet-edit-current strong.black {
  background: linear-gradient(145deg, #262f34, #111719);
  color: #fff;
}

.sheet-edit-current strong.miss {
  background: linear-gradient(145deg, #1f8a62, #0d3b2e);
  color: #fff;
}

.sheet-edit-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.sheet-edit-pad .score-button.is-selected {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.end-row-total {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 13px;
  background: var(--soft);
}

.end-row-total strong {
  display: grid;
  place-items: center;
  min-width: 2.3rem;
  min-height: 2.3rem;
  border-radius: 10px;
  background: #fff;
  color: var(--blue);
  font-size: 1.4rem;
}

.end-row-total span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.record-actions {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 0.85fr));
  gap: 0.5rem;
}

.record-badge,
.record-status-badge {
  display: inline-grid;
  place-items: center;
  min-height: 1.25rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: var(--gold);
  color: #563b00;
  font-size: 0.68rem;
  font-weight: 900;
  vertical-align: middle;
}

.record-badge-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
  max-width: 6.4rem;
}

.record-status-badge {
  margin-left: 0;
  border: 1px solid transparent;
}

.record-status-badge.is-draft {
  border-color: rgba(242, 194, 48, 0.46);
  background: #fff8d8;
  color: #6f4b00;
}

.record-status-badge.is-pb {
  background: var(--gold);
  color: #563b00;
}

.record-status-badge.is-badge {
  border-color: rgba(29, 126, 94, 0.24);
  background: rgba(29, 126, 94, 0.1);
  color: #176044;
}

.record-status-badge.is-synced {
  border-color: rgba(29, 126, 94, 0.24);
  background: rgba(29, 126, 94, 0.1);
  color: #176044;
}

.record-status-badge.is-local {
  border-color: rgba(18, 56, 79, 0.12);
  background: var(--soft);
  color: var(--blue);
}

.record-score-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
}

.record-score-strip article {
  display: grid;
  place-items: center;
  gap: 0.12rem;
  min-width: 0;
  min-height: 3.35rem;
  padding: 0.4rem 0.3rem;
  border-radius: 13px;
  background: var(--soft);
}

.record-score-strip span,
.record-score-strip small,
.record-equipment-line small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.record-score-strip strong {
  color: var(--blue);
  font-size: 1.18rem;
  line-height: 1;
}

.record-score-strip strong small {
  margin-left: 0.06rem;
  font-size: 0.72rem;
}

.record-equipment-line {
  display: grid;
  gap: 0.16rem;
  padding: 0.55rem 0.62rem;
  border: 1px solid rgba(18, 56, 79, 0.08);
  border-radius: 13px;
  background: #fff;
}

.record-equipment-line span {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.record-detail-panel,
.record-detail-body {
  display: grid;
  gap: 0.75rem;
}

.record-review-hero {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
}

.record-review-hero span,
.record-review-subhead,
.record-review-grid span,
.record-review-achievement span {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.record-review-hero strong {
  color: #f4d067;
  font-size: 2.2rem;
  line-height: 1;
}

.record-review-hero p,
.record-review-achievement p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.record-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.record-review-grid article {
  display: grid;
  gap: 0.12rem;
  min-height: 4rem;
  padding: 0.62rem;
  border-radius: 13px;
  background: var(--soft);
}

.record-review-grid span {
  color: var(--muted);
}

.record-review-grid strong {
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1.05;
}

.record-review-achievement {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid rgba(242, 194, 48, 0.38);
  border-radius: 14px;
  background: #fff8d8;
  color: #6f4b00;
}

.record-review-achievement strong {
  color: var(--blue);
}

.record-review-insight {
  display: grid;
  gap: 0.28rem;
  padding: 0.85rem;
  border: 1px solid rgba(242, 194, 48, 0.38);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf2, #ffffff);
}

.record-review-insight strong {
  color: var(--blue);
  font-size: 0.95rem;
  line-height: 1.35;
}

.record-equipment-detail {
  display: grid;
  gap: 0.22rem;
  padding: 0.78rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 16px;
  background: #fff;
}

.record-equipment-detail h3 {
  margin: 0;
  color: var(--blue);
}

.record-equipment-detail p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.record-review-ends {
  display: grid;
  gap: 0.55rem;
}

.record-distance-review,
.record-end-highlights,
.record-shot-map-review {
  display: grid;
  gap: 0.55rem;
  padding: 0.78rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 16px;
  background: #fff;
}

.record-distance-grid,
.record-highlight-grid,
.record-shot-map-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.record-distance-grid article,
.record-highlight-grid article,
.record-shot-map-stats article {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
  padding: 0.62rem;
  border-radius: 13px;
  background: var(--soft);
}

.record-distance-grid span,
.record-highlight-grid span,
.record-shot-map-stats span,
.record-distance-grid small,
.record-highlight-grid small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.25;
}

.record-distance-grid strong,
.record-highlight-grid strong,
.record-shot-map-stats strong {
  color: var(--blue);
  font-size: 1.08rem;
  line-height: 1.1;
}

.record-highlight-good {
  border: 1px solid rgba(29, 126, 94, 0.22);
  background: rgba(29, 126, 94, 0.08) !important;
}

.record-highlight-watch {
  border: 1px solid rgba(189, 48, 56, 0.2);
  background: rgba(189, 48, 56, 0.07) !important;
}

.record-shot-map-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.record-shot-map-canvas {
  display: block;
  width: 8.8rem;
  height: 8.8rem;
  border: 1px solid rgba(18, 56, 79, 0.14);
  border-radius: 50%;
  background: #fffdf4;
  box-shadow: 0 6px 16px rgba(16, 33, 43, 0.1);
}

.record-empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.record-review-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.record-review-subhead p {
  margin: 0;
}

.record-review-end {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.record-review-end.is-best-end {
  border-color: rgba(29, 126, 94, 0.34);
  box-shadow: inset 4px 0 0 rgba(29, 126, 94, 0.72);
}

.record-review-end.is-weak-end {
  border-color: rgba(189, 48, 56, 0.28);
  box-shadow: inset 4px 0 0 rgba(189, 48, 56, 0.66);
}

@media (max-width: 420px) {
  .record-shot-map-layout,
  .record-distance-grid,
  .record-highlight-grid,
  .record-shot-map-stats {
    grid-template-columns: 1fr;
  }

  .record-shot-map-canvas {
    justify-self: center;
  }
}

.records-section-title {
  margin: 0.35rem 0 0;
  color: var(--blue);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.draft-card {
  border-color: rgba(242, 194, 48, 0.55);
  background: #fffdf2;
}

@media (max-width: 430px) {
  .record-actions {
    grid-template-columns: 1fr 1fr;
  }

  .record-actions .primary-action {
    grid-column: 1 / -1;
  }

  .record-score-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.record-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.bottom-nav {
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.55rem 0.55rem calc(0.55rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 26px rgba(16, 33, 43, 0.12);
}

.nav-button {
  min-height: 3rem;
  padding: 0.3rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.round-complete-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: flex-end;
  background: rgba(10, 25, 35, 0.55);
}

.round-complete-panel {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--panel);
  box-shadow: 0 -16px 40px rgba(16, 33, 43, 0.22);
}

.round-complete-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.round-complete-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.round-complete-summary article {
  display: grid;
  gap: 0.12rem;
  min-height: 4rem;
  padding: 0.62rem;
  border-radius: 13px;
  background: var(--soft);
}

.round-complete-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.round-complete-summary strong {
  color: var(--blue);
  font-size: 1.25rem;
  line-height: 1.05;
}

.round-complete-pb {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(242, 194, 48, 0.52);
  border-radius: 14px;
  background: #fff8d8;
  color: #6f4b00;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.35;
}

.round-complete-achievement {
  display: grid;
  gap: 0.28rem;
  padding: 0.85rem;
  border: 1px solid rgba(36, 127, 93, 0.32);
  border-radius: 14px;
  background: #eef9f1;
  color: #164b34;
  line-height: 1.35;
}

.round-complete-achievement[data-state="progress"] {
  border-color: rgba(35, 88, 121, 0.22);
  background: #eef6fb;
  color: #153e58;
}

.round-complete-achievement span {
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}

.round-complete-achievement strong {
  font-size: 1.05rem;
  line-height: 1.15;
}

.round-complete-achievement p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
}

.round-complete-official {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem;
  border: 1px solid rgba(18, 56, 79, 0.14);
  border-radius: 14px;
  background: #f8fbfc;
}

.round-complete-official div {
  display: grid;
  gap: 0.12rem;
}

.round-complete-official span,
.round-complete-official small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.round-complete-official strong {
  color: var(--blue);
  font-size: 1.18rem;
}

.round-complete-official p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.round-complete-official .official-warning {
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: #fff8d8;
  color: #6f4b00;
}

.round-complete-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 780px) {
  body {
    background: var(--bg);
  }

  .app-shell {
    width: min(980px, 100%);
    margin: 0 auto;
  }

  .app-topbar {
    margin-top: 0.75rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
  }

  .setup-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #score-page:not(.scoring-screen) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #score-page:not(.scoring-screen) .score-hero,
  #score-page:not(.scoring-screen) .performance-strip,
  #score-page:not(.scoring-screen) .current-end-panel,
  #score-page:not(.scoring-screen) .keypad-panel {
    grid-column: span 1;
  }

  #score-page:not(.scoring-screen) .review-panel {
    grid-column: 1 / -1;
  }

  #score-page.scoring-screen {
    grid-template-columns: minmax(320px, 480px);
    justify-content: center;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .app-topbar {
    min-height: 3.4rem;
    padding: 0.35rem 0.65rem;
  }

  .app-topbar .brand-icon {
    width: 2.1rem;
    height: 2.1rem;
  }

  .app-topbar h1 {
    font-size: 1.12rem;
  }

  .bottom-nav {
    display: none;
  }

  .scoring-screen {
    grid-template-columns: minmax(13rem, 0.8fr) minmax(20rem, 1.2fr);
    align-items: start;
    gap: 0.45rem;
    padding: 0.45rem;
  }

  .scoring-screen::before {
    grid-column: 1 / -1;
    content: "Portrait scoring works best. Rotate upright for the full shooting layout.";
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(242, 194, 48, 0.52);
    border-radius: 12px;
    background: #fff8d8;
    color: #6f4b00;
    font-size: 0.78rem;
    font-weight: 900;
  }

  .scoring-screen .score-progress-card {
    grid-column: 1;
  }

  .scoring-screen .current-end-panel {
    grid-column: 2;
    grid-row: 2 / span 2;
  }

  .scoring-screen .review-panel {
    display: none;
  }

  .score-progress-grid {
    grid-template-columns: 1fr;
  }

  .score-progress-grid article {
    min-height: 2.5rem;
  }

  .score-button {
    min-height: 2.65rem;
    font-size: 1.45rem;
  }

  .current-arrow {
    min-height: 2rem;
  }

  .end-stats,
  .score-secondary-actions {
    display: none;
  }
}

@media print {
  .app-topbar,
  .bottom-nav,
  .setup-panel,
  .score-hero,
  .performance-strip,
  .current-end-panel,
  .keypad-panel,
  .review-panel,
  #records-page,
  #tools-page {
    display: none !important;
  }

  html,
  body,
  .app-shell,
  .app-screen {
    display: block;
    height: auto;
    overflow: visible;
  }

  .panel {
    box-shadow: none;
  }
}

/* ── Phase 2: Arrow Analysis ─────────────────────────────────── */

/* Arrow cell — score + indicator stacked */
.current-arrow {
  flex-direction: column;
  gap: 0.18rem;
  cursor: default;
  position: relative;
}

.current-arrow.is-filled {
  cursor: pointer;
}

.arrow-score-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: currentColor;
  line-height: 1;
}

.analysis-hint {
  font-size: 0.6rem;
  font-weight: 700;
  color: currentColor;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.analysis-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1d9e75;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(29, 158, 117, 0.45);
}

/* Analysis panel overlay */
.analysis-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 25, 35, 0.55);
  display: flex;
  align-items: flex-end;
}

.analysis-panel {
  width: 100%;
  max-height: 88dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--panel);
  border-radius: 22px 22px 0 0;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  display: grid;
  gap: 0.85rem;
  box-shadow: 0 -16px 40px rgba(16, 33, 43, 0.22);
  /* JS controls transform for slide animation */
  transform: translateY(100%);
}

.ap-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ap-header h2 {
  font-size: 1.2rem;
}

.ap-close-btn {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ap-section {
  display: grid;
  gap: 0.4rem;
}

.ap-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.ap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-btn {
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.tag-btn.is-selected {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.ap-note {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--soft);
  resize: none;
  line-height: 1.45;
}

.ap-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.5rem;
}

/* ── End Phase 2 ─────────────────────────────────────────────── */

/* ── Phase 2 Step 3: Target Face ─────────────────────────────── */

.ap-target-wrap {
  display: grid;
  gap: 0.65rem;
}

.ap-shot-map-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem;
  border: 1px solid rgba(18, 56, 79, 0.1);
  border-radius: 14px;
  background: var(--soft);
}

.ap-target-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.32rem;
}

.ap-target-steps span {
  display: grid;
  place-items: center;
  min-height: 2rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.ap-target-steps span.is-active {
  border-color: rgba(18, 56, 79, 0.42);
  background: var(--blue);
  color: #fff;
}

.ap-target-steps span.is-complete {
  border-color: rgba(29, 126, 94, 0.24);
  background: rgba(29, 126, 94, 0.1);
  color: #176044;
}

.ap-target-label {
  margin: 0;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.ap-target-container {
  position: relative;
  /* responsive — fills panel width, capped at 260px */
  width: min(320px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}

#ap-target-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fffdf4;
  border: 1px solid rgba(18, 56, 79, 0.16);
  box-shadow: inset 0 0 0 1px rgba(16, 33, 43, 0.08), 0 10px 24px rgba(16, 33, 43, 0.12);
  touch-action: none;
}

#ap-target-canvas.is-zoomed {
  border-radius: 50%;
}

.ap-quad-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* no overflow:hidden — let click areas work properly */
  pointer-events: none;
}

.ap-quad-overlay:not([hidden]) {
  pointer-events: auto;
}

.ap-quad-btn {
  position: absolute;
  width: 50%;
  height: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.14s;
}

.ap-quad-btn:hover,
.ap-quad-btn:active {
  background: rgba(255, 255, 255, 0.16);
}

.ap-quad-tl { top: 0; left: 0; }
.ap-quad-tr { top: 0; right: 0; }
.ap-quad-bl { bottom: 0; left: 0; }
.ap-quad-br { bottom: 0; right: 0; }

.ap-zoom-toolbar {
  display: grid;
  gap: 0.4rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--soft);
}

.ap-zoom-toolbar > span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.ap-target-preview {
  display: block;
  width: 4.8rem;
  height: 4.8rem;
  margin: 0;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(18, 56, 79, 0.14);
  box-shadow: 0 4px 12px rgba(16, 33, 43, 0.12);
}

.ap-zoom-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.ap-zoom-buttons button {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 900;
}

.ap-zoom-buttons button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.ap-crosshair {
  position: absolute;
  width: 1.55rem;
  height: 1.55rem;
  border: 2px solid #f2c230;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 3px rgba(18, 56, 79, 0.22), 0 4px 12px rgba(16, 33, 43, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

.ap-crosshair::before,
.ap-crosshair::after {
  content: "";
  position: absolute;
  background: #10212b;
}

.ap-crosshair::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ap-crosshair::after {
  width: 0.62rem;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-38deg);
  opacity: 0.7;
}

.ap-magnifier {
  position: absolute;
  z-index: 15;
  width: 8.25rem;
  height: 8.25rem;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: #fffdf4;
  box-shadow: 0 14px 32px rgba(16, 33, 43, 0.28);
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.ap-target-tip {
  margin: -0.2rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

.ap-ring-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 1.6rem;
}

.ap-ring-pill {
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.ap-ring-Miss  { background: #e2e8eb; color: var(--muted); }
.ap-ring-1,
.ap-ring-2     { background: #e8e8e8; color: #333; }
.ap-ring-3,
.ap-ring-4     { background: #222; color: #fff; }
.ap-ring-5,
.ap-ring-6     { background: #1a6bb5; color: #fff; }
.ap-ring-7,
.ap-ring-8     { background: #e63030; color: #fff; }
.ap-ring-9     { background: var(--gold); color: #7a5000; }
.ap-ring-10-X  { background: var(--gold); color: #7a5000; }

.ap-ring-desc {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.ap-nudge-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
}

.ap-nudge-controls button {
  min-height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ap-target-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
}

@media (prefers-color-scheme: dark) {
  #ap-target-canvas,
  .ap-target-preview,
  .ap-magnifier {
    background: #fbfaf1;
  }

  .ap-shot-map-head {
    border-color: rgba(242, 194, 48, 0.18);
  }
}

@media (max-width: 390px) {
  .ap-shot-map-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ap-target-label {
    text-align: center;
  }

  .ap-target-actions {
    grid-template-columns: 1fr;
  }
}

/* ── End Phase 2 Step 3 ──────────────────────────────────────── */
