:root {
  --bg: #0f172a;
  --card: rgba(17,24,39,0.94);
  --card-2: rgba(31,41,55,0.76);
  --text: #f9fafb;
  --muted: #cbd5e1;
  --accent: #22c55e;
  --border: rgba(255,255,255,0.12);
  --shadow: 0 12px 32px rgba(0,0,0,0.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, #0b1222 0%, #111827 100%);
  color: var(--text);
}
.hidden { display:none !important; }
.app-shell {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.hero h1, .card h2, .panel h3 { margin: 0 0 8px; }
.hero p, .hint { margin: 0; color: var(--muted); }
.grid { display:grid; gap:12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.score-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
.panel, .mobile-result-card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
label, legend { display:block; font-weight:600; margin-bottom:6px; }
input, select {
  width:100%;
  border-radius:12px;
  border:1px solid var(--border);
  background:#0f172a;
  color:var(--text);
  padding:12px 14px;
  font-size:16px;
  margin-bottom:12px;
}
button {
  appearance:none;
  border:0;
  border-radius:14px;
  padding:14px 18px;
  font-size:16px;
  font-weight:700;
  background:var(--accent);
  color:#052e16;
  cursor:pointer;
}
button.secondary { background:#334155; color:#f8fafc; }
.small-btn { padding:10px 14px; font-size:14px; }
fieldset {
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px 2px;
}
fieldset label {
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:500;
  margin-bottom:10px;
}
fieldset input[type="checkbox"] { width:20px; height:20px; margin:0; }
.action-row { display:flex; justify-content:center; gap:12px; }
.primary-action { width:100%; }
.sticky-score {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 10;
  backdrop-filter: blur(10px);
}
.sticky-score .label,
.result-chip .label,
.hole-line-wrap .round-hole-label {
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:4px;
}
.hole-line-wrap strong { display:block; font-size:20px; }
.ntp-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.badge {
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(56,189,248,0.14);
  color:#bae6fd;
  border:1px solid rgba(56,189,248,0.28);
  font-weight:700;
}
.results-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.mobile-results { display:grid; gap:12px; }
.mobile-result-top,
.mobile-result-score,
.mobile-result-bottom {
  display:grid;
  gap:10px;
}
.mobile-result-top { grid-template-columns: repeat(3, minmax(0,1fr)); margin-bottom:12px; }
.mobile-result-score,
.mobile-result-bottom { grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom:12px; }
.result-chip {
  background:#0f172a;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
}
.result-chip strong { display:block; }
.small { color: var(--muted); font-size: 13px; }
.win { color:#86efac; font-weight:700; }
.lose { color:#fca5a5; font-weight:700; }
.mt-12 { margin-top:12px; }
@media (max-width: 820px) {
  .grid.two, .grid.three, .score-grid, .mobile-result-top, .mobile-result-score, .mobile-result-bottom, .ntp-grid { grid-template-columns:1fr; }
  button { width:100%; }
}


fieldset label.disabled-option {
  opacity: 0.45;
}
fieldset input[type="checkbox"]:disabled {
  cursor: not-allowed;
}


.compact-result-card {
  padding: 12px 14px;
}
.compact-result-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  line-height: 1.35;
}
.compact-result-line span {
  white-space: nowrap;
}
.compact-result-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
@media (max-width: 820px) {
  .compact-result-actions {
    flex-direction: row;
  }
  .compact-result-actions .small {
    flex: 1;
  }
  .compact-result-actions .small-btn {
    width: auto;
  }
}

.settings-grid{grid-template-columns:2fr 1fr;}
.compact-settings{grid-template-columns:repeat(3,minmax(0,1fr));}
.sticky-score .small{display:block;margin-top:4px;}
@media (max-width: 820px){.settings-grid,.compact-settings{grid-template-columns:1fr;}}

.inround-settings-toggle-card h2{margin-bottom:0;}
#inRoundSettings .action-row{justify-content:flex-start;}
#inRoundSettings .primary-action{width:100%;}

.result-action-buttons{display:flex;align-items:center;gap:8px;}
.info-btn{width:36px;min-width:36px;padding:10px 0;border-radius:999px;font-weight:800;}
.result-info{margin-top:10px;padding-top:10px;border-top:1px solid var(--border);display:grid;gap:6px;}
.result-info-line{font-size:14px;color:var(--muted);line-height:1.4;}
.result-info-line strong{color:var(--text);}


select.placeholder-select { color: #9ca3af; }
select { color: var(--text); }


.welcome-copy{
  color: var(--muted);
  line-height: 1.45;
  margin: 8px 0 14px;
  font-size: 14px;
}
.players-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top:14px;
}
.player-box,
.stake-box{
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.player-box h3,
.setup-subtitle{
  margin: 0 0 10px;
}
.select-row{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:12px;
  margin-top:14px;
}
.points-area{
  display:grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap:12px;
  margin-top:14px;
  align-items:start;
}
.points-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
}
.points-mini-card{
  background:#0f172a;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
}
.points-mini-card label{
  font-size:13px;
  margin-bottom:6px;
}
.points-mini-card input{
  margin-bottom:0;
  padding:10px 12px;
}
.stake-box .field:first-of-type{
  margin-top:0;
}
@media (max-width: 820px){
  .players-grid,
  .select-row,
  .points-area{
    grid-template-columns: 1fr;
  }
  .points-grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}


.desktop-score-grid{display:grid;}
.mobile-entry-grid{display:none;}
@media (max-width: 820px){
  .desktop-score-grid{display:none !important;}
  .mobile-entry-grid{
    display:grid;
    grid-template-columns:minmax(70px,1fr) minmax(110px,1.3fr) minmax(70px,1fr);
    gap:8px;
    align-items:center;
  }
  .mobile-entry-header,
  .mobile-entry-cell,
  .mobile-entry-label,
  .mobile-entry-check{
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-height: 48px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px;
  }
  .mobile-entry-header{
    min-height:54px;
    text-align:center;
    font-size:14px;
    line-height:1.2;
  }
  .mobile-entry-label{
    text-align:center;
    font-weight:700;
    font-size:14px;
    line-height:1.15;
  }
  .mobile-entry-cell input{
    margin:0;
    padding:10px 6px;
    text-align:center;
    font-weight:700;
  }
  .mobile-entry-check input{
    width:24px;
    height:24px;
    margin:0;
  }
  .mobile-entry-check.disabled-option{
    opacity:.45;
  }
}


.welcome-copy{
  color: var(--muted);
  line-height: 1.45;
  margin: 8px 0 14px;
  font-size: 14px;
}
.players-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:14px;
}
.player-box,
.select-box,
.bonus-box,
.stake-box{
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.player-box h3,
.setup-subtitle{
  margin:0 0 10px;
}
.select-box{
  margin-top:14px;
}
.select-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:12px;
}
.points-area{
  display:grid;
  grid-template-columns:1.2fr 0.9fr;
  gap:12px;
  margin-top:14px;
  align-items:start;
}
.points-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.points-mini-card{
  background:#0f172a;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
}
.points-mini-card label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin-bottom:6px;
}
.points-mini-card input{
  margin-bottom:0;
  padding:10px 12px;
}
@media (max-width: 820px){
  .players-grid,
  .points-area{
    grid-template-columns:1fr;
  }
  .select-grid{
    grid-template-columns:1fr;
  }
  .points-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

.export-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.export-actions button{
  flex:1;
  min-width:180px;
}


.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  z-index:999;
}
.restore-modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:1000;
}
.restore-modal-card{
  width:min(560px, 100%);
  background:var(--card-bg, #1b1b1b);
  border:1px solid var(--border, rgba(255,255,255,.12));
  border-radius:18px;
  padding:22px;
  box-shadow:0 20px 50px rgba(0,0,0,.35);
}
.restore-meta{
  display:grid;
  gap:10px;
  margin:14px 0 6px;
}
.restore-meta-box{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border, rgba(255,255,255,.12));
  border-radius:12px;
  padding:12px;
}


.setup-beta-actions{flex-wrap:wrap; gap:12px;}
.setup-beta-actions .secondary{flex:1 1 220px; margin:0;}


.custom-course-builder{border:1px solid rgba(255,255,255,.08);border-radius:24px;padding:16px;background:rgba(255,255,255,.03)}
.custom-course-head{grid-template-columns:1fr 160px;gap:12px}
.custom-course-grid{display:grid;gap:8px;border:1px solid rgba(255,255,255,.08);border-radius:20px;padding:12px;background:rgba(7,16,33,.35)}
.custom-grid-head{display:grid;grid-template-columns:72px 1fr 1fr;gap:10px;align-items:center;color:var(--text);font-weight:800}
.custom-grid-head div{min-height:48px;border-radius:16px;background:rgba(7,16,33,.75);border:1px solid rgba(90,149,255,.45);display:flex;align-items:center;justify-content:center}
.custom-hole-row{display:grid;grid-template-columns:72px 1fr 1fr;gap:10px;align-items:center}
.custom-hole-number{min-height:52px;border-radius:16px;background:rgba(7,16,33,.75);border:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff}
.custom-hole-row input,.custom-hole-row select{min-height:52px;border-radius:16px;background:var(--bg-dark);border:1px solid rgba(255,255,255,.08);padding:0 14px;color:#fff}
@media (max-width:640px){.custom-course-head{grid-template-columns:1fr}.custom-grid-head,.custom-hole-row{grid-template-columns:64px 1fr 1fr}}


.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.hero-admin-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #334155;
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.admin-link-btn:hover,
.admin-link-btn:focus-visible {
  background: #475569;
}
@media (max-width: 720px) {
  .hero-top {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-admin-links {
    justify-content: stretch;
  }
  .admin-link-btn {
    width: 100%;
  }
}


.local-course-library{
  display:grid;
  gap:12px;
}
.local-course-empty{
  border:1px dashed rgba(255,255,255,.18);
  border-radius:18px;
  padding:14px;
  color:var(--muted);
  background:rgba(255,255,255,.02);
}
.local-course-item{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(255,255,255,.025);
  padding:14px;
}
.local-course-title{
  font-size:16px;
  font-weight:800;
  margin-bottom:4px;
}
.local-course-meta{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}
.local-course-actions{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin-top:12px;
}
@media (max-width:720px){
  .local-course-actions{
    grid-template-columns:1fr 1fr;
  }
}


.local-ux-hint{
  margin-top:10px;
  margin-bottom:12px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(255,255,255,.03);
}
.local-ux-copy{
  font-size:13px;
  color:#cbd5e1;
  margin-bottom:8px;
}
.local-ux-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.local-course-flash{
  outline:2px solid rgba(34,197,94,.75);
  box-shadow:0 0 0 4px rgba(34,197,94,.15);
  border-radius:16px;
}


.local-course-selected{
  border-color: rgba(34,197,94,.55) !important;
  box-shadow: 0 0 0 2px rgba(34,197,94,.18), 0 10px 24px rgba(0,0,0,.18);
}
.local-course-active-note{
  margin: 8px 0 12px;
  color: #86efac;
  font-size: 13px;
  font-weight: 700;
}
.selected-local-btn{
  background: #22c55e !important;
  color: #04140a !important;
  border-color: transparent !important;
}


.start-tee-wrap{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#0f172a;
}
.start-tee-label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin-bottom:8px;
}
.start-tee-toggle{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.start-tee-btn.active{
  background:#22c55e !important;
  color:#04140a !important;
}


.own-course-container{
  margin-top: 16px;
}
.own-course-top-actions,
.setup-beta-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.own-course-top-actions button,
.setup-beta-actions button{
  width:100%;
  min-height:56px;
}
.local-library-block{
  margin-top:16px;
}
.local-library-block .results-header{
  margin-bottom:0;
}


.local-library-block.card,
.own-course-container.card{
  background: var(--card-bg, rgba(18,27,43,.92));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
}

.local-library-block.card .results-header,
.own-course-container.card .results-header{
  margin-bottom: 0;
}

.local-library-block.card h3,
.own-course-container.card h3{
  margin-bottom: 0;
}


/* v54 optics cleanup */
.welcome-copy{
  font-size:12.5px !important;
  line-height:1.36 !important;
  text-align:justify;
  text-justify:inter-word;
}

.hero-top{
  display:block;
}

.admin-footer-panel{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:14px;
  padding:0;
  overflow:hidden;
}
.admin-footer-panel summary{
  list-style:none;
  cursor:pointer;
  padding:12px 14px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  user-select:none;
}
.admin-footer-panel summary::-webkit-details-marker{
  display:none;
}
.admin-footer-panel[open] summary{
  border-bottom:1px solid rgba(255,255,255,.08);
}
.admin-footer-content{
  padding:12px;
  display:grid;
  gap:10px;
}
.admin-footer-content .admin-link-btn{
  width:100%;
}
.hero-admin-links{
  display:none !important;
}

.players-grid{
  grid-template-columns:1fr 1fr !important;
  gap:12px !important;
}
.player-box{
  min-width:0;
}

@media (max-width: 820px){
  .players-grid{
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
  }
  .player-box{
    padding:12px;
  }
  .player-box h3{
    font-size:16px;
  }
  .player-box input{
    font-size:16px;
    padding:10px 12px;
  }
}


/* v56 stake layout */
.stake-inline-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.stake-inline-grid .field{
  margin-top:0;
}
@media (max-width: 820px){
  .stake-inline-grid{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
}


/* v57 stake visual tidy-up */
.compact-stake-grid{
  align-items:end;
  gap:14px;
}
.compact-stake-field{
  margin-top:0;
  min-width:0;
}
.compact-stake-field label{
  min-height:24px;
  margin-bottom:8px;
  font-size:13px;
  line-height:1.2;
}
.compact-stake-field input{
  width:100%;
}
.stake-box .hint{
  margin-top:14px;
}

@media (max-width: 820px){
  .compact-stake-grid{
    grid-template-columns:1fr 1fr !important;
    gap:12px;
  }
  .compact-stake-field label{
    font-size:12px;
    min-height:30px;
  }
  .compact-stake-field input{
    padding:10px 12px;
  }
}


/* v58 admin footer with A button + copyright */
.hero-admin-links{
  display:none !important;
}
.hero-top{
  display:block;
}
.admin-footer{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:12px;
}
.admin-a-btn{
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:16px;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}
.admin-a-btn:hover,
.admin-a-btn:focus-visible{
  background:rgba(255,255,255,.08);
  color:#fff;
  outline:none;
}
.admin-panel{
  width:100%;
  display:none;
  padding:12px;
  border-radius:18px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--border);
}
.admin-panel.open{
  display:block;
}
.admin-actions{
  display:grid;
  gap:10px;
  margin-top:8px;
}
.admin-panel .admin-link-btn{
  width:100%;
}
.copyright{
  width:100%;
  text-align:center;
  color:rgba(255,255,255,.42);
  font-size:12px;
  letter-spacing:.02em;
  padding-top:4px;
}


/* v60 minimal play mode */
.sticky-score-modern{position:sticky; top:0; z-index:50; padding:12px 16px; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); background:rgba(18,27,43,.88)}
.sticky-score-modern .status-label{display:block; font-size:13px; font-weight:800; letter-spacing:.02em; color:var(--muted); margin-bottom:6px}
.sticky-score-modern .status-total{font-size:clamp(19px,5vw,27px); font-weight:900; line-height:1.2; letter-spacing:-.02em}
.sticky-score-modern .status-total .overall-name{color:var(--text)}
.sticky-score-modern .status-total .overall-pos{color:#86efac}
.sticky-score-modern .status-total .overall-neg{color:#fca5a5}
.current-hole-card-modern .hole-bar{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;margin-bottom:12px}
.current-hole-card-modern .hole-title{margin:0;font-size:clamp(34px,9vw,58px);line-height:.9;letter-spacing:-.05em;font-weight:900}
.current-hole-card-modern .hole-meta{color:var(--muted);font-size:clamp(18px,4.8vw,28px);font-weight:800;line-height:1.05}
.modern-players{display:grid;grid-template-columns:1fr;gap:12px}
.modern-player{background:rgba(255,255,255,.02);border:1px solid var(--border);border-radius:22px;padding:14px}
.modern-player .player-name{margin:0 0 10px;font-size:clamp(20px,6vw,30px);font-weight:850;letter-spacing:-.03em}
.score-stepper{display:grid;grid-template-columns:84px 1fr 84px;gap:10px;align-items:center}
.step-btn{min-height:86px;border:none;border-radius:20px;background:var(--accent);color:#fff;font-size:50px;font-weight:900;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}
.step-btn.minus{background:rgba(255,255,255,.06);color:#ffd2d2}
.score-display{min-height:86px;border-radius:20px;background:var(--card-2);border:1px solid var(--border);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px;text-align:center}
.score-value{font-size:42px;font-weight:900;line-height:1;margin-bottom:4px}
.score-note{font-size:13px;color:var(--muted);line-height:1.2;min-height:16px}
.chip-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-top:10px}
.chip{min-height:48px;border:none;border-radius:16px;background:rgba(255,255,255,.06);color:var(--text);font-size:16px;font-weight:850;cursor:pointer}
.chip.active{background:#60a5fa;color:#061223}.chip.ntp.active{background:#22c55e;color:#04140a}
.modern-action-row .primary-action{min-height:58px;font-size:22px;font-weight:900}
.legacy-inputs{display:none!important}
.compact-result-card{background:rgba(255,255,255,.03);border:1px solid var(--border);border-radius:20px;padding:14px;margin-bottom:10px}
.compact-result-line{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;font-size:14px;line-height:1.35}
.compact-result-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px}
.result-action-buttons{display:flex;gap:8px;flex-wrap:wrap}
.result-info{margin-top:10px;padding:12px 14px;border-radius:16px;background:var(--card-2);border:1px solid var(--border);font-size:15px;line-height:1.45;color:#d7deea}
.info-btn{width:40px;padding:0}
.result-overlay{position:fixed;inset:0;background:rgba(1,8,20,.48);display:none;align-items:center;justify-content:center;padding:18px;z-index:1000}
.result-overlay.show{display:flex}
.result-overlay-card{width:min(100%,520px);background:rgba(10,18,34,.97);border:1px solid rgba(255,255,255,.10);border-radius:26px;box-shadow:0 24px 60px rgba(0,0,0,.35);padding:22px}
.result-overlay-title{margin:0 0 8px;font-size:34px;line-height:.95;letter-spacing:-.04em;font-weight:900}
.result-overlay-sub{color:var(--muted);font-size:18px;font-weight:800;margin-bottom:12px}
.result-overlay-amount{font-size:38px;font-weight:900;color:#86efac;margin-bottom:12px}
.result-overlay-total{padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.04);border:1px solid var(--border);font-size:17px;font-weight:850;line-height:1.4;margin-bottom:12px}
.result-overlay-log{padding:12px 14px;border-radius:16px;background:var(--card-2);border:1px solid var(--border);font-size:15px;line-height:1.45;color:#d7deea}
.result-overlay-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.result-overlay-btn{min-height:50px;border:none;border-radius:16px;font-size:18px;font-weight:900;cursor:pointer}
.result-overlay-btn.secondary{background:var(--accent);color:#fff}.result-overlay-btn.primary{background:#22c55e;color:#04140a}
@media (max-width:680px){.compact-result-line{grid-template-columns:1fr 1fr}.compact-result-actions{flex-direction:column;align-items:flex-start}.score-stepper{grid-template-columns:72px 1fr 72px}.step-btn{font-size:42px;min-height:76px}.score-display{min-height:76px}.score-value{font-size:36px}}


/* Beta 61 playmode layout tweaks */
body.play-active .hero{
  display:none !important;
}
body.play-active .app-shell{
  padding-top:12px;
}


/* Beta 62 touch and disabled chip tweaks */
html, body{
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
.step-btn,
.chip,
.footer-btn,
.log-toggle,
.log-edit,
.secondary,
.primary-action,
.primary,
button{
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.chip.disabled,
.chip:disabled{
  opacity:.38;
  pointer-events:none;
  filter:saturate(.65);
}


/* Beta 64: Gesamtstand zweispaltig für lange Geldbeträge */
.status-total{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  align-items:start;
}
.status-total .total-side{
  min-width:0;
}
.status-total .total-name{
  display:block;
  color:#f3f4f6;
  font-size:clamp(18px,4.8vw,26px);
  font-weight:900;
  line-height:1.05;
  margin-bottom:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.status-total .total-money{
  display:block;
  font-size:clamp(22px,6vw,34px);
  font-weight:900;
  line-height:1.0;
  letter-spacing:-.03em;
  white-space:nowrap;
}
.status-total .total-money.pos{color:#86efac}
.status-total .total-money.neg{color:var(--danger)}


/* Beta 64: Gesamtstand kompakter und zweizeilig stabil */
.sticky-score-modern .status-total{
  display:block;
}
.sticky-score-modern .status-dual{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  align-items:start;
}
.sticky-score-modern .status-side{
  min-width:0;
}
.sticky-score-modern .status-side .overall-name{
  display:block;
  font-size:clamp(16px,4.8vw,24px);
  font-weight:900;
  line-height:1.05;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-bottom:4px;
}
.sticky-score-modern .status-side .overall-pos,
.sticky-score-modern .status-side .overall-neg{
  display:block;
  font-size:clamp(22px,6.5vw,36px);
  font-weight:900;
  line-height:1;
  letter-spacing:-.03em;
  white-space:nowrap;
}


/* Beta 65: Vorgabe nur als kleine Zeile im Spielerblock */
.player-sub{
  min-height:18px;
  margin:4px 0 10px;
  color:#fde68a;
  font-size:13px;
  font-weight:800;
  line-height:1.2;
}
.player-sub.hidden{
  display:none;
}


/* Beta 74: roter Minus-Button im Playmode */
.step-btn.minus{
  background:#ef4444 !important;
  color:#ffffff !important;
}


/* Beta 78: Home button statt Reset */
.icon-only-btn{
  min-width:48px;
  padding:0 14px;
  font-size:26px;
  line-height:1;
}
.compact-modal{
  max-width:460px;
}
.danger-action{
  background:#ef4444 !important;
  color:#fff !important;
}


/* Beta 80: sichtbares zentriertes Home-Bestätigungs-Popup */
.centered-modal-overlay{
  position:fixed !important;
  inset:0 !important;
  z-index:9999 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:24px !important;
  background:rgba(2, 6, 23, 0.72) !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.centered-modal-overlay.hidden{
  display:none !important;
}
.leave-round-dialog{
  width:min(92vw, 520px) !important;
  max-width:520px !important;
  margin:0 auto !important;
  padding:24px !important;
  border-radius:24px !important;
  background:rgba(17, 24, 39, 0.98) !important;
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:0 24px 80px rgba(0,0,0,.45) !important;
}
.leave-round-dialog h3{
  margin:0 0 12px 0 !important;
  font-size:32px !important;
  line-height:1.05 !important;
}
.leave-round-dialog p{
  margin:0 0 18px 0 !important;
  font-size:20px !important;
  line-height:1.35 !important;
  color:#e5e7eb !important;
}
.leave-round-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:12px !important;
}
.leave-round-actions .secondary,
.leave-round-actions .primary-action{
  min-height:58px !important;
  font-size:22px !important;
  border-radius:18px !important;
}
@media (max-width: 640px){
  .leave-round-actions{
    grid-template-columns:1fr !important;
  }
}


/* Beta 81: Home-Button in der Lochzeile */
.hole-bar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.hole-home-btn{
  flex:0 0 auto;
  align-self:flex-start;
  margin-top:2px;
}


/* Beta 82: Gewinnerfarbe im Berechnungen/Log auf grün */
.compact-result-grid .win,
.result-info-line .win,
.result-card .win{
  color:#86efac !important;
}
.compact-result-grid .lose,
.result-info-line .lose,
.result-card .lose{
  color:#fca5a5 !important;
}


/* Beta 85: Berechnungen/Log ohne farbliche Gewinner-/Verliererhervorhebung */
.compact-result-line .win,
.compact-result-line .lose,
.result-info-line .win,
.result-info-line .lose,
.result-card .win,
.result-card .lose{
  color:inherit !important;
}


/* Beta 86: Mobile Header/Holebar kompakter */
@media (max-width: 640px){
  .sticky-score-modern{
    padding:10px 14px !important;
  }
  .sticky-score-modern .status-label{
    margin-bottom:4px !important;
    font-size:12px !important;
  }
  .sticky-score-modern .status-total{
    font-size:clamp(17px,4.9vw,24px) !important;
    line-height:1.15 !important;
  }

  #currentHoleCard.current-hole-card-modern{
    padding:14px !important;
  }
  .current-hole-card-modern .hole-bar{
    align-items:flex-start !important;
    gap:10px !important;
    margin-bottom:10px !important;
  }
  .current-hole-card-modern .hole-title{
    font-size:clamp(26px,7vw,40px) !important;
    line-height:.92 !important;
  }
  .current-hole-card-modern .hole-meta{
    font-size:clamp(14px,4vw,20px) !important;
    line-height:1.1 !important;
  }

  .icon-only-btn.hole-home-btn{
    min-width:52px !important;
    width:52px !important;
    height:52px !important;
    padding:0 !important;
    font-size:24px !important;
    border-radius:16px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 52px !important;
  }

  .modern-player{
    padding:12px !important;
  }
  .modern-player .player-name{
    margin:0 0 8px !important;
    font-size:clamp(18px,5.8vw,26px) !important;
  }
  .score-stepper{
    grid-template-columns:72px 1fr 72px !important;
    gap:8px !important;
  }
  .step-btn{
    min-height:72px !important;
    border-radius:18px !important;
    font-size:42px !important;
  }
  .score-display{
    min-height:72px !important;
    border-radius:18px !important;
    padding:6px !important;
  }
  .score-value{
    font-size:34px !important;
    margin-bottom:2px !important;
  }
  .score-note{
    font-size:12px !important;
    min-height:14px !important;
  }
  .chip-row{
    gap:8px !important;
    margin-top:8px !important;
  }
  .chip{
    min-height:42px !important;
    border-radius:14px !important;
    font-size:14px !important;
  }

  .modern-action-row{
    margin-top:10px !important;
  }
  .modern-action-row .primary-action{
    min-height:52px !important;
    font-size:20px !important;
    border-radius:16px !important;
  }
}


/* Beta 87: Ergebnis-Einblendung nach Lochwertung */
.hole-result-toast{
  position:fixed;
  inset:0;
  z-index:9998;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(2, 6, 23, 0.36);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.hole-result-toast.hidden{
  display:none !important;
}
.hole-result-toast-card{
  width:min(92vw, 520px);
  border-radius:26px;
  padding:22px 22px 20px;
  background:rgba(10, 18, 34, 0.98);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 24px 70px rgba(0,0,0,.42);
  text-align:center;
}
.hole-result-toast-title{
  font-size:clamp(26px, 7vw, 40px);
  font-weight:900;
  line-height:1.05;
  margin-bottom:10px;
  color:var(--text);
}
.hole-result-toast-amount{
  font-size:clamp(34px, 8vw, 52px);
  font-weight:900;
  line-height:1;
  color:#86efac;
  margin-bottom:12px;
}
.hole-result-toast-total{
  font-size:clamp(16px, 4.5vw, 22px);
  font-weight:800;
  line-height:1.25;
  color:#dbe4f0;
}


/* Beta 88: Parameter für Ergebnis-Popup */
.inround-advanced-card .panel{
  background:rgba(255,255,255,.02);
  border:1px solid var(--border);
  border-radius:20px;
  padding:14px;
}
.settings-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.settings-subtitle{
  margin:0 0 4px 0;
  font-size:20px;
  font-weight:850;
}
.switch{
  position:relative;
  display:inline-block;
  width:58px;
  height:34px;
  flex:0 0 auto;
}
.switch input{
  opacity:0;
  width:0;
  height:0;
}
.slider{
  position:absolute;
  inset:0;
  cursor:pointer;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.12);
  transition:.2s ease;
  border-radius:999px;
}
.slider:before{
  content:"";
  position:absolute;
  height:24px;
  width:24px;
  left:4px;
  top:4px;
  background:#fff;
  transition:.2s ease;
  border-radius:50%;
}
.switch input:checked + .slider{
  background:#22c55e;
}
.switch input:checked + .slider:before{
  transform:translateX(24px);
}
.range-value-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:8px;
}
#playSettingToastDuration{
  width:100%;
}
@media (max-width: 640px){
  .settings-subtitle{font-size:18px}
}


/* Beta 92: Undo letztes Loch */
#btnUndoLastHole[disabled]{
  opacity:.45;
  cursor:not-allowed;
}


/* Beta 93: Info-Button im Log mobil garantiert sichtbar */
@media (max-width: 640px){
  .compact-result-actions{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:8px !important;
  }
  .compact-result-actions .small{
    display:block !important;
    width:100% !important;
  }
  .result-action-buttons{
    display:flex !important;
    justify-content:flex-end !important;
    align-items:center !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    width:100% !important;
  }
  .info-btn{
    width:40px !important;
    min-width:40px !important;
    height:40px !important;
    padding:0 !important;
    border-radius:999px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 40px !important;
  }
  #btnUndoLastHole{
    font-size:14px !important;
    padding:10px 12px !important;
    white-space:nowrap !important;
  }
}


/* Beta 94: Undo-Button sichtbar */
.results-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#btnUndoLastHole{
  flex:0 0 auto;
}


/* Beta 95: Undo-Button tatsächlich im Header sichtbar */
.results-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#btnUndoLastHole{
  flex:0 0 auto;
  white-space:nowrap;
}


.final-result-overlay .result-overlay-card{
  width:min(100%, 560px);
}
.final-result-funfact{
  background:rgba(250,204,21,.10);
  border-color:rgba(250,204,21,.22);
}
.final-result-actions{
  grid-template-columns:1fr;
}
.course-lookup-controls { display: flex; gap: 8px; margin-top: 8px; align-items: stretch; }
.course-lookup-controls input { flex: 1 1 auto; min-width: 0; margin: 0; }
.course-lookup-controls select { flex: 0 0 170px; width: 170px; min-width: 0; margin: 0; }
.course-lookup-controls button { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.select-box #courseSelected { margin: 10px 0 2px; font-weight: 700; }
.select-box #courseLookupStatus { margin: 2px 0 0; }
.course-lookup-results { display: grid; gap: 8px; margin-top: 10px; max-height: 320px; overflow: auto; }
.course-lookup-result { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; }
.course-lookup-result small { display: block; margin-top: 3px; opacity: .72; }
@media (max-width: 480px) {
  .course-lookup-controls { flex-wrap: wrap; }
  .course-lookup-controls input { flex-basis: 100%; }
  .course-lookup-controls select,
  .course-lookup-controls button { flex: 1 1 130px; width: auto; }
}

/* Chicago 4er: additions to the unchanged Chicago 2er visual system. */
[hidden]{display:none!important}
.team-rule-setup{margin-top:14px}
.rule-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rule-options label{display:flex;align-items:center;gap:10px;margin:0;padding:12px;background:var(--card-2);border:1px solid var(--border);border-radius:14px;cursor:pointer}
.rule-options label:has(input:checked){border-color:var(--accent);background:rgba(34,197,94,.13)}
.rule-options input{width:20px;height:20px;margin:0;accent-color:var(--accent)}
#selectedCourse{margin:10px 0 4px}
.course-lookup-results{display:grid;gap:6px;max-height:260px;overflow:auto;margin-top:10px}
.course-lookup-results button{width:100%;background:var(--card-2);border:1px solid var(--border);text-align:left;color:var(--text);padding:10px 12px;border-radius:12px}
.course-lookup-results small{display:block;color:var(--muted);margin-top:3px}
.settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.settings-grid label{font-size:14px}
.settings-grid input{margin:4px 0 0}
#resumeRound{width:auto}
.fourer-balances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 14px}
.fourer-balance{display:flex;justify-content:space-between;gap:8px;font-weight:800}
.fourer-balance strong.positive{color:#86efac}
.fourer-balance strong.negative{color:#fca5a5}
.team-selection{padding:12px;margin:10px 0 14px;background:rgba(255,255,255,.03);border:1px solid var(--border);border-radius:18px}
.team-selection-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.team-selection h2{font-size:19px;margin:0 0 4px}
.team-picks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.team-picks button{background:#334155;color:var(--text);min-height:50px}
.team-picks button.selected{background:#60a5fa;color:#061223}
.team-pairing{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.team-pairing .team{background:var(--card-2);border:1px solid var(--border);padding:10px;border-radius:12px}
.team-pairing .team small{display:block;color:var(--muted)}
.team-pairing .team strong{display:block;font-size:15px;margin-top:3px}
.fourer-players{margin-top:12px}
.fourer-players .modern-player{min-width:0}
.fourer-players .chip-row{grid-template-columns:repeat(3,minmax(0,1fr))}
.fourer-players .chip:disabled{opacity:.42}
#ntpWrap select{display:none}
#ntpPot{display:block;margin-top:8px}
.fourer-result{background:rgba(255,255,255,.03);border:1px solid var(--border);border-radius:20px;padding:14px}
.fourer-result-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px}
.fourer-result-head h3{margin:0}
.fourer-result-head button{width:auto}
.fourer-result .team-line{font-weight:800;margin:6px 0}
.fourer-result .winning-team{color:#86efac}
.fourer-result .calc-list{display:grid;gap:6px;margin:12px 0}
.fourer-result .calc-line{background:var(--card-2);border:1px solid var(--border);border-radius:12px;padding:9px 10px;font-size:14px;line-height:1.5}
.fourer-result .calc-line.counts{border-color:#22c55e}
.fourer-result .calc-line strong{display:block;font-size:15px}
.fourer-result .decision{border-top:1px solid var(--border);padding-top:10px;line-height:1.5}
#playMessage,#setupMessage{min-height:20px}
@media(max-width:640px){.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fourer-balances{gap:6px}.fourer-balance{font-size:13px}.rule-options{grid-template-columns:1fr 1fr}.team-picks button{width:100%}.team-pairing{grid-template-columns:1fr}.course-lookup-controls{flex-direction:column}.course-lookup-controls button{width:100%}}

/* Keep the online lookup compact beside the search field on phones. */
#setup .course-lookup-controls{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch;gap:8px}
#setup #courseSearch{flex:1 1 0;width:0;min-width:0;margin:0}
#setup #onlineSearch{flex:0 0 auto;width:auto;max-width:120px;min-width:0;margin:0;padding:10px 12px;font-size:14px;line-height:1.15;white-space:normal}


/* The selected teams form a compact, editable header. */
.team-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:6px 0 8px;padding:7px 9px;border:1px solid var(--border);border-radius:12px;background:rgba(255,255,255,.03)}
.team-summary-actions{display:flex;align-items:center;gap:2px}
#teamSummaryText{display:grid;gap:3px;min-width:0}
#teamSummaryText span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:750}
#teamSummaryText b{display:inline-grid;place-items:center;width:17px;height:17px;border-radius:5px;margin-right:4px;color:#071323;font-size:11px}
.team-summary-one{color:#a9ccff}.team-summary-one b{background:#77adff}
.team-summary-two{color:#ffe7a3}.team-summary-two b{background:#f5cf64}
#editTeams{width:auto;min-height:36px;padding:6px 10px;font-size:13px}
.score-team{border:1px solid var(--border);border-radius:16px;padding:9px;margin-bottom:8px}
.score-team-1{background:rgba(59,130,246,.17);border-color:rgba(112,169,255,.65)}
.score-team-2{background:rgba(234,179,8,.14);border-color:rgba(245,204,90,.62)}
.score-team-head{font-weight:900;font-size:15px;margin:0 0 7px}
.score-team-1 .score-team-head{color:#b6d4ff}
.score-team-2 .score-team-head{color:#ffe7a3}
.score-team-players{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.score-team .modern-player{min-width:0;background:rgba(13,21,35,.6)}
#playMessage:empty{display:none}
@media(max-width:640px){
 body.play-active .app-shell{padding:6px 8px max(10px,env(safe-area-inset-bottom))}
 #play .sticky-score-modern{padding:6px 9px!important;margin-bottom:6px;border-radius:12px}
 #play .sticky-score-modern .status-label{font-size:11px!important;margin-bottom:2px!important}
 #play .fourer-balances{gap:1px 7px}
 #play .fourer-balance{font-size:11px;line-height:1.25;min-width:0}
 #play .fourer-balance span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #play .fourer-balance strong{white-space:nowrap}
 #currentHoleCard.current-hole-card-modern{padding:9px!important;margin-bottom:6px}
 #currentHoleCard .hole-bar{margin-bottom:3px!important}
 #currentHoleCard .hole-title{font-size:26px!important}
 #currentHoleCard .hole-meta{font-size:13px!important}
 #currentHoleCard .hole-home-btn{width:39px!important;min-width:39px!important;height:39px!important;flex-basis:39px!important;border-radius:11px!important;font-size:20px!important}
 #roundCaption{display:none}
 #teamSummaryText span{font-size:12px}
 .team-summary{margin:4px 0 6px;padding:5px 7px}
 #editTeams{min-height:32px;padding:5px 8px;font-size:12px}
 #play .fourer-players{margin-top:0;gap:0}
 #play .score-team{padding:6px;margin-bottom:6px;border-radius:12px}
 #play .score-team-head{font-size:12px;margin-bottom:4px}
 #play .score-team-players{gap:5px}
 #play .score-team .modern-player{padding:6px!important;border-radius:10px}
 #play .score-team .player-name{font-size:15px!important;margin:0 0 4px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #play .score-team .score-stepper{grid-template-columns:44px minmax(0,1fr) 44px!important;gap:3px!important}
 #play .score-team .step-btn{min-height:48px!important;height:48px;border-radius:10px!important;font-size:31px!important;padding:0}
 #play .score-team .score-display{min-height:48px!important;height:48px;border-radius:10px!important;padding:2px!important}
 #play .score-team .score-value{font-size:26px!important;margin:0!important}
 #play .score-team .score-note{font-size:9px!important;line-height:1.05;min-height:0}
 #play .score-team .chip-row{grid-template-columns:1fr 1fr;gap:3px!important;margin-top:4px!important}
 #play .score-team .chip{min-height:31px!important;border-radius:8px!important;font-size:11px!important;padding:3px 1px}
 #play .score-team .chip.ntp:not([hidden]){grid-column:1/-1;min-height:28px!important}
 #ntpPot{font-size:11px;margin-top:2px}
 #play .modern-action-row{margin-top:4px!important}
 #play .modern-action-row .primary-action{min-height:46px!important;font-size:18px!important;padding:8px!important;border-radius:11px!important}
 #playMessage{min-height:0;font-size:12px}
}



/* Chicago 4er: Ergebnis nach der Lochwertung. */
.toast-settings{margin-top:16px;padding-top:12px;border-top:1px solid var(--border)}
.toast-setting-check{display:flex;align-items:center;gap:10px;font-weight:700}
.toast-setting-check input{width:20px;height:20px;margin:0;accent-color:var(--accent)}
#toastDurationWrap{margin-top:10px}
#toastDurationWrap label{display:block;margin-bottom:5px}
#settingToastDuration{width:100%}
.fourer-toast-card{width:min(92vw,520px);max-height:min(85dvh,640px);overflow:auto;text-align:left;padding:18px}
.fourer-toast-card .hole-result-toast-title{text-align:center;font-size:clamp(24px,6vw,34px);margin-bottom:6px}
.toast-detail{text-align:center;color:var(--muted);margin:0 0 14px;font-size:14px;line-height:1.35}
.toast-teams{display:grid;gap:8px}
.toast-team{border-radius:14px;padding:10px;border:1px solid var(--border)}
.toast-team-1{background:rgba(59,130,246,.17);border-color:rgba(112,169,255,.65)}
.toast-team-2{background:rgba(234,179,8,.14);border-color:rgba(245,204,90,.62)}
.toast-team>strong{display:block;margin-bottom:6px}
.toast-player{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;align-items:center;padding:5px 0;border-top:1px solid rgba(255,255,255,.1);font-size:13px}
.toast-player span:first-child{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.toast-player span:not(:first-child){white-space:nowrap;color:var(--muted)}
.toast-player b{color:var(--text)}
.toast-player b.positive{color:#86efac}
.toast-player b.negative{color:#fca5a5}
.toast-dismiss{display:block;text-align:center;color:var(--muted);margin-top:12px}
@media(max-width:400px){.fourer-toast-card{padding:14px}.toast-player{font-size:11px;gap:4px}}


/* Larger result popup with one readable block per player. */
.hole-result-toast{padding:12px;background:rgba(4,9,20,.72);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.fourer-toast-card{width:min(94vw,520px);max-height:calc(100dvh - 24px);padding:18px 20px;border-radius:24px;background:#101827}
.fourer-toast-card .hole-result-toast-title{display:grid;gap:2px;margin:0 0 8px;line-height:1.12}
.toast-hole-label{font-size:19px;font-weight:750;color:#cbd5e1}
.fourer-toast-card .hole-result-toast-title strong{font-size:clamp(27px,7vw,34px);color:#fff}
.toast-detail{display:grid;gap:3px;margin:0 0 14px;font-size:16px;line-height:1.3;color:#d5deec}
.toast-detail strong{font-size:17px;color:#fff}
.toast-teams{gap:10px}
.toast-team{padding:12px 14px;border-radius:16px}
.toast-team-title{font-size:19px;line-height:1.2;margin:0 0 5px}
.toast-player{display:block;padding:9px 0 8px;font-size:inherit}
.toast-player-name{display:block;font-size:17px;line-height:1.2;margin-bottom:5px;overflow-wrap:anywhere}
.toast-figures{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.toast-figure{display:grid;gap:1px}
.toast-figure span{font-size:13px;font-weight:650;color:#d1d9e6}
.toast-figure b{font-size:21px;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap;color:#fff}
.toast-dismiss{font-size:14px;margin-top:12px}
@media(max-width:400px){
 .fourer-toast-card{padding:14px 16px}
 .toast-team{padding:10px 12px}
 .toast-player{padding:7px 0}
 .toast-player-name{font-size:16px;margin-bottom:4px}
 .toast-figure b{font-size:20px}
}
@media(max-height:700px){
 .fourer-toast-card{padding-top:11px;padding-bottom:10px}
 .fourer-toast-card .hole-result-toast-title{margin-bottom:5px}
 .toast-detail{margin-bottom:8px}
 .toast-team{padding-top:7px;padding-bottom:7px}
 .toast-player{padding-top:5px;padding-bottom:5px}
 .toast-dismiss{margin-top:7px}
}


/* Latest hole first, with the payout calculation visible below the decision. */
.fourer-result .math-line{
  margin-top:10px;
  padding:9px 11px;
  border-radius:11px;
  background:rgba(134,239,172,.08);
  border:1px solid rgba(134,239,172,.28);
  color:#eefcf3;
  font-size:15px;
  font-weight:750;
  line-height:1.45;
  overflow-wrap:anywhere;
}

.fourer-result .math-heading{
  display:block;
  margin-bottom:4px;
  color:#b7f4cc;
  font-size:13px;
  font-weight:800;
  letter-spacing:.03em;
}


/* Course lookup: input and search button above the visible results. */
#setup .course-lookup-controls{flex-direction:column;align-items:stretch;gap:8px}
#setup #courseSearch{width:100%;flex:0 0 auto;min-height:48px}
#setup #onlineSearch{width:100%;max-width:none;min-height:46px;flex:0 0 auto;white-space:nowrap;font-size:16px}
#courseSearch{scroll-margin-top:12px}

/* Tap the compact score to read all four totals at full size. */
#totalCard{cursor:pointer}
#totalCard:focus-visible{outline:2px solid #86efac;outline-offset:2px}
.total-stand-toast-card .hole-result-toast-title{text-align:center;margin:0 0 15px}
.total-stand-list{display:grid;gap:9px}
.total-stand-player{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 15px;border:1px solid var(--border);border-radius:13px;background:rgba(255,255,255,.04)}
.total-stand-player strong{font-size:18px;overflow-wrap:anywhere}
.total-stand-player b{font-size:22px;font-variant-numeric:tabular-nums;white-space:nowrap}
.total-stand-player b.positive{color:#86efac}
.total-stand-player b.negative{color:#fca5a5}
@media(max-width:400px){.total-stand-player{padding:11px 12px}.total-stand-player strong{font-size:17px}.total-stand-player b{font-size:20px}}


/* Team score calculation: both players contribute a digit and bonuses follow. */
.fourer-result .team-calcs{display:grid;gap:8px;margin:12px 0}
.fourer-result .team-calc{display:grid;gap:4px;padding:10px 11px;border-radius:12px;border:1px solid var(--border);background:var(--card-2);font-size:14px;line-height:1.4}
.fourer-result .team-calc-1{border-color:rgba(112,169,255,.55);background:rgba(59,130,246,.10)}
.fourer-result .team-calc-2{border-color:rgba(245,204,90,.5);background:rgba(234,179,8,.08)}
.fourer-result .team-calc strong{font-size:15px}
.fourer-result .team-calc span{color:var(--muted)}
.fourer-result .team-calc b{font-size:15px;overflow-wrap:anywhere}


/* Explain relative Playing Handicap directly in each hole calculation. */
.fourer-result .hcp-explainer{margin:12px 0 8px;color:#dbe4f0;font-size:14px;line-height:1.45}
.fourer-result .calc-line small{display:block;margin-top:4px;color:#b7c7dd;font-size:12px;line-height:1.35}


/* Keep both player calculations and the team formula inside one team frame. */
.fourer-result .team-breakdowns{display:grid;gap:12px;margin:12px 0}
.fourer-result .team-breakdown{padding:12px;border:2px solid var(--border);border-radius:16px}
.fourer-result .team-breakdown-1{border-color:rgba(112,169,255,.75);background:rgba(59,130,246,.11)}
.fourer-result .team-breakdown-2{border-color:rgba(245,204,90,.72);background:rgba(234,179,8,.09)}
.fourer-result .team-breakdown-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:9px}
.fourer-result .team-breakdown-head strong{font-size:17px}
.fourer-result .team-breakdown-head span{font-weight:800;white-space:nowrap}
.fourer-result .team-breakdown-1 .team-breakdown-head{color:#b6d4ff}
.fourer-result .team-breakdown-2 .team-breakdown-head{color:#ffe7a3}
.fourer-result .team-breakdown-players{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:8px}
.fourer-result .team-breakdown .calc-line{min-width:0;margin:0}
.fourer-result .team-breakdown-1 .calc-line.counts{border-color:rgba(112,169,255,.46)}
.fourer-result .team-breakdown-2 .calc-line.counts{border-color:rgba(245,204,90,.43)}
.fourer-result .team-breakdown .team-calc{margin:0}
@media(max-width:640px){
 .fourer-result .team-breakdown{padding:10px}
 .fourer-result .team-breakdown-players{grid-template-columns:1fr;gap:6px}
 .fourer-result .team-breakdown-head strong{font-size:16px}
}

/* Explicit Stop-Loss choice before the round. */
.stop-loss-choice{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:15px 0 0;padding:14px;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.035)}
.stop-loss-choice strong{font-size:18px}
.stop-loss-choice .hint{margin:5px 0 0}
.stop-loss-mode{margin:8px 2px 14px;font-weight:700;color:#86efac}
.stop-loss-warning{margin:8px 0 14px;padding:11px 13px;border:1px solid rgba(251,191,36,.7);border-radius:11px;background:rgba(245,158,11,.13);color:#fde68a;font-weight:700;line-height:1.4}
.stop-loss-choice:has(input:not(:checked)) + .stop-loss-mode{color:#fde68a}
.switch input:focus-visible + .slider{outline:3px solid #93c5fd;outline-offset:3px}

/* Current Nearest pot is visible on all four player buttons. */
#play .chip.ntp:not([hidden]){display:inline-flex;align-items:center;justify-content:center;gap:7px}
#play .chip.ntp .ntp-value{display:inline-grid;place-items:center;min-width:27px;height:27px;padding:0 4px;border-radius:999px;background:#facc15;color:#111827;font-size:14px;font-weight:950;line-height:1;box-shadow:0 1px 4px rgba(0,0,0,.35)}
@media(max-width:640px){#play .chip.ntp .ntp-value{min-width:23px;height:23px;font-size:12px}}

/* End-of-round overview and PDF actions. */
.round-final{padding:18px;border:1px solid rgba(134,239,172,.52);border-radius:17px;background:linear-gradient(145deg,rgba(34,197,94,.11),rgba(59,130,246,.08));margin:12px 0}
.round-final h2{margin:0 0 5px;font-size:clamp(23px,5vw,30px)}
.round-final .hint{margin:3px 0 13px}
.final-balances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.final-balance{display:flex;justify-content:space-between;gap:8px;padding:10px;border:1px solid var(--border);border-radius:11px;background:rgba(8,16,30,.45);font-weight:700;min-width:0}
.final-balance span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.final-balance strong{white-space:nowrap}
.final-export-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}
.final-export-actions button{flex:1 1 180px;min-height:46px}
@media(max-width:640px){.round-final{padding:12px}.final-balances{grid-template-columns:1fr 1fr}.final-balance{display:block;font-size:13px}.final-balance strong{display:block;margin-top:3px;font-size:17px}.final-export-actions button{flex-basis:100%}}

.mode-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 20px}.mode-picker button{background:#334155;color:#fff;padding:13px 5px}.mode-picker button.active{background:#59a1f5;color:#0b1222}.leaderboard-tabs{display:flex;gap:7px;overflow:auto;margin:13px 0}.leaderboard-tabs button{white-space:nowrap;background:#334155;color:#fff;font-size:13px;padding:10px}.leaderboard-tabs button.active{background:#facc15;color:#111827}.leaderboard-entry{display:grid;grid-template-columns:2.5em 1fr auto;gap:8px;padding:10px 4px;border-bottom:1px solid var(--border)}.score-team-3{border-color:#8b5cf6!important}.solo-score-card{border:1px solid #8b5cf6;border-radius:16px;padding:9px;margin-top:10px}.round-locked .fourer-result [data-edit],.round-locked #undoHole{display:none!important}.mode-2 .team-rule-setup,.mode-2 #teamSummary,.mode-2 #teamSelection{display:none!important}.solo-breakdown{border:1px solid #8b5cf6;border-radius:12px;padding:10px;margin:10px 0}

.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.account-grid form{background:var(--card-2);border:1px solid var(--border);border-radius:14px;padding:14px}.account-grid h3{margin:0 0 12px}.account-grid input{margin-top:5px}.account-grid button{width:100%}.confirmation-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:8px;border-bottom:1px solid var(--border)}.confirmation-row form{display:flex;gap:5px}.confirmation-row input{width:76px;margin:0}.confirmation-row button{padding:8px;font-size:13px}@media(max-width:600px){.account-grid{grid-template-columns:1fr}}
#roundQr{text-align:center;margin:14px 0}#roundQr img{width:210px;height:210px;background:white;padding:8px;border-radius:12px}#roundQr a{color:#93c5fd}#selfConfirm .hole-result-toast-card{text-align:center}#selfConfirm button{margin:5px}
.player-suggestions{display:grid;gap:4px}.player-suggestions button{background:#334155;color:white;text-align:left;font-size:14px;padding:9px}

body.mode-3 .score-team-2 .score-team-players{grid-template-columns:1fr}

.account-details{background:#1f2937;border:1px solid var(--border);border-radius:14px;margin:8px 0 20px}.account-details summary{cursor:pointer;padding:13px 14px;font-weight:700}.account-inner{padding:0 14px 14px}.account-inner h2{font-size:18px}

#earlyQr{text-align:center;margin:12px 0}#earlyQr img{width:170px;height:170px;background:white;padding:6px;border-radius:10px}#earlyPlayers{margin-top:8px}

/* Make the missing course prompt visible at the field that needs attention. */
#setup #courseSearch.course-required{
  border-color:#fbbf24;
  box-shadow:0 0 0 3px rgba(251,191,36,.28);
  font-weight:700;
}
#setup #courseSearch.course-required::selection{background:#fbbf24;color:#111827}
.round-length-wrap{margin-top:12px}
.round-length-wrap label{display:block;margin-bottom:6px;font-weight:700}
.round-length-wrap select{width:100%}
.early-end-wrap{margin-top:11px;padding-top:10px;border-top:1px solid var(--border)}
.early-end-wrap button{width:100%;min-height:44px}
.early-end-wrap .hint{margin:6px 2px 0;text-align:center}
.leaderboard-jump{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border-radius:12px;background:#facc15;color:#111827;font-weight:800;text-decoration:none;white-space:nowrap}
@media(max-width:560px){.hero-top{flex-wrap:wrap}.leaderboard-jump{width:100%}}

.play-type-choice{margin:18px 0;padding:15px;border:1px solid var(--border);border-radius:15px;background:var(--card-2)}
.play-type-choice h3{margin:0 0 10px}
.play-type-picker{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:10px}
.play-type-picker button{background:#334155;color:#fff;min-height:60px;font-size:16px;padding:12px}
.play-type-picker button.active{background:#facc15;color:#111827;box-shadow:0 0 0 2px #fef08a}
.demo-badge{display:inline-block;font-size:12px;font-weight:800;padding:3px 7px;border-radius:7px;background:#433865;color:#ede9fe}
.demo-access{margin:12px 0;border:1px dashed #94a3b8;padding:12px;border-radius:12px}
.demo-access summary{font-weight:750;cursor:pointer}
.demo-accounts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.demo-accounts button{font-size:14px;padding:10px}
.remove-player{margin-top:7px}
.player-box input[readonly]{border-color:#5d91cc;background:#16243b}
#startRound:disabled{opacity:.55;cursor:not-allowed}
#settingsGrid input:disabled{opacity:.7}
@media(max-width:420px){.play-type-picker,.demo-accounts{grid-template-columns:1fr}}

.leaderboard-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}
.leaderboard-tabs button{min-width:0;white-space:normal;line-height:1.25;min-height:46px;padding:8px 5px}
.leaderboard-entry{grid-template-columns:1.5em minmax(0,1fr) auto}
.leaderboard-entry>span{overflow-wrap:anywhere}
.leaderboard-entry small{display:block;color:var(--muted)}
@media(max-width:420px){.leaderboard-tabs button{font-size:12px}.leaderboard-entry{font-size:14px;gap:5px}}

.auth-message{margin:12px 0 0;padding:12px;border:1px solid #4ade80;border-radius:10px;background:#15352b;color:#d1fae5;font-size:16px;line-height:1.4}
.auth-message.auth-error{border-color:#fbbf24;background:#45331c;color:#fef3c7}
.account-grid input[aria-invalid="true"]{border-color:#fbbf24;box-shadow:0 0 0 2px rgba(251,191,36,.25)}
.account-grid button[type="submit"]{min-height:48px;margin-top:12px}
.account-grid button:disabled{opacity:.7;cursor:wait}

/* One clear task per setup screen. */
[hidden]{display:none!important}
.wizard-header{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;gap:12px}
.wizard-header span{font-size:13px;color:var(--muted)}
.brand-home{background:none;color:#fff;font-size:26px;padding:0;font-weight:850}
.wizard-nav{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:22px}
.wizard-nav span{font-size:13px;color:var(--muted);text-align:right}
#modeStep h1{font-size:27px;margin:0 0 8px}
#modeStep .mode-picker{grid-template-columns:1fr;margin-bottom:12px}
#modeStep .mode-picker button{min-height:58px;font-size:19px;text-align:left;padding:16px 20px}
#typeStep .play-type-choice{margin:0;background:none;border:0;padding:0}
#typeStep .play-type-picker{grid-template-columns:1fr}
.eyebrow{color:#93c5fd;font-weight:750;margin:0 0 12px}
#authStep #accountDetails{margin:0;border:0;background:none}
#authStep #accountDetails>summary,#authStep #accountCard>h2,#authStep #accountStatus{display:none}
#authStep .account-inner{padding:0}
#authStep .account-grid{display:block}
#authStep .account-grid form{padding:0;background:none;border:0}
#authStep .account-grid label,.auth-single label{display:block;margin:12px 0 5px}
.registration-details{border-top:1px solid var(--border);margin-top:20px;padding-top:12px}
.registration-details summary{font-size:17px;padding:10px 0!important}
.text-button{background:none;color:#93c5fd;text-decoration:underline;padding:12px 0;font-size:16px}
.auth-single input,.auth-single button,#playersContinue{width:100%}
.auth-single button{margin-top:18px}
#playersStep .players-grid{grid-template-columns:1fr;margin-top:18px}
#playersStep .player-box{padding:14px}
#playersStep .player-box h3{margin-bottom:6px}
#playersStep .player-box input{min-height:44px}
#friendSearch{margin-top:8px;min-height:52px;font-size:18px}
.friend-results{display:grid;gap:8px;margin:12px 0;max-height:42dvh;overflow-y:auto}
.friend-results button{display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;background:#26394f;color:#fff;padding:16px;min-height:62px;font-size:17px}
.friend-results button span{overflow-wrap:anywhere;min-width:0}
.friend-results button b{font-size:14px;color:#86efac;white-space:nowrap}
.friend-results small{display:block;color:#b7c5d6;font-size:12px}
.friend-results button:disabled{opacity:.45}
#playersContinue{margin-top:16px}
.leaderboard-preview>a{display:block;text-decoration:none;color:inherit}
.preview-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.preview-heading h2{margin:0;font-size:22px}
.preview-heading>span{font-size:13px;color:#fde047}
.preview-row{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px 0;border-top:1px solid var(--border)}
.preview-row>span{overflow-wrap:anywhere}.preview-row small{font-size:11px;color:#c4b5fd}
.preview-row strong{font-variant-numeric:tabular-nums;color:#86efac}
#leaderboardBack{margin-bottom:18px}
@media(max-width:600px){.app-shell{padding-top:10px}.wizard-header{margin-bottom:12px}#setup{padding:18px}#leaderboardPreview{padding:18px}.wizard-header span{max-width:135px;text-align:right}}

#playersStep .players-grid{grid-template-columns:1fr!important}
.wizard-nav button,.brand-home{width:auto;flex:none}
#playersStep .ranked-player{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}
#playersStep .ranked-player h3{grid-column:1/-1;overflow-wrap:anywhere}
#playersStep .ranked-player>.field:nth-child(2){grid-column:2;grid-row:2;align-self:center}
#playersStep .ranked-player>.field:nth-child(2)>label,#playersStep .ranked-player input[id^="name"],#playersStep .ranked-player .demo-badge,#playersStep .ranked-player .player-suggestions{display:none}
#playersStep .ranked-player>.field:last-child{grid-column:1;grid-row:2;display:flex;align-items:center;gap:8px;min-width:0}
#playersStep .ranked-player>.field:last-child label{font-size:12px;margin:0;max-width:65px}
#playersStep .ranked-player input[id^="hcp"]{width:72px;margin:0;padding:10px;flex:none}
#playersStep .ranked-player .remove-player{padding:10px;font-size:12px;margin:0}

#playersContinue:disabled{background:#334155;color:#94a3b8;cursor:not-allowed}

/* Private session information stays separate from public player aliases. */
.wizard-header{display:block}
.header-brand-row{display:flex;align-items:center;justify-content:space-between;gap:14px}
.session-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #334155;margin-top:12px;padding-top:12px}
.session-identity{display:flex;align-items:center;gap:9px;min-width:0}
.session-identity>div{min-width:0}
.wizard-header .session-label{display:block;max-width:none;text-align:left;font-size:12px;line-height:1.4;color:#cbd5e1}
#sessionAlias{display:block;font-size:17px;line-height:1.3;overflow-wrap:anywhere;color:#f8fafc}
.session-dot{display:block;width:9px;height:9px;border-radius:50%;background:#94a3b8;flex:none}
.signed-in .session-dot{background:#4ade80;box-shadow:0 0 0 4px rgba(74,222,128,.12)}
.session-logout{width:auto;min-height:44px;padding:10px 12px;font-size:14px;flex:none;border:1px solid #64748b}
.session-logout:disabled{opacity:.6;cursor:wait}
.session-message{margin:10px 0 0;color:#fbbf24;font-size:14px}
#welcomeTitle{overflow-wrap:anywhere}
.play-active .header-brand-row{display:none}
.play-active .session-bar{border:0;margin:0;padding:0}
.play-active .wizard-header{padding:9px 12px;margin-bottom:9px}

body.play-active #appHeader{display:block!important}

/* Mandatory participation and final score review, including small phones. */
.chicago-dialog{color:#f8fafc;background:#101827;border:1px solid #64748b;border-radius:24px;padding:22px;width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto}
.chicago-dialog::backdrop{background:rgba(2,6,23,.82);backdrop-filter:blur(5px)}
.chicago-dialog h2{font-size:1.6rem;line-height:1.2;margin:0 0 16px}
.chicago-dialog p{line-height:1.45}
.chicago-dialog .dialog-actions{display:grid;gap:12px;margin-top:20px}
.chicago-dialog button{min-height:48px;white-space:normal}
.chicago-dialog #earlyConfirm{margin:16px 0}
.chicago-dialog #earlyQr{text-align:center}
.chicago-dialog #earlyQrImage{width:200px;max-width:100%;height:auto;border-radius:10px}
.chicago-dialog .confirmation-row form{display:flex;gap:8px;flex-wrap:wrap}
.chicago-dialog .confirmation-row input{width:100px;flex:1;min-width:70px}
.chicago-dialog .confirmation-row strong{overflow-wrap:anywhere}
.chicago-dialog button:disabled{opacity:.5}

.chicago-dialog a{color:#93c5fd}
.chicago-dialog .confirmation-row{grid-template-columns:1fr;padding:12px 0}
.chicago-dialog #participationTitle:focus{outline:none}

.participation-feedback{padding:14px;border:1px solid #64748b;border-radius:12px;background:#172033;line-height:1.45}
.participation-feedback.confirmed{border-color:#4ade80;background:#13352c;color:#bbf7d0;font-weight:700}
#participationSuccess{margin-bottom:22px}
#participationSuccess h2{margin:0;font-size:24px}
#participationSuccess button{margin-top:10px}

/* Two players have a full-width card each, with the original larger controls. */
body.mode-2 #play .score-team-players{grid-template-columns:minmax(0,1fr)}
body.mode-2 #play .score-team-head{display:none}
body.mode-2 #play .score-team{padding:12px;margin:8px 0 12px;border-radius:18px}
body.mode-2 #play .score-team .modern-player{padding:0!important;border:0;background:transparent;border-radius:0;box-shadow:none}
body.mode-2 #play .score-team .player-name{font-size:22px!important;line-height:1.2;margin:0 0 10px!important;white-space:normal;overflow-wrap:anywhere}
body.mode-2 #play .score-team .score-stepper{grid-template-columns:80px minmax(0,1fr) 80px!important;gap:10px!important}
body.mode-2 #play .score-team .step-btn{height:80px;min-height:80px!important;font-size:48px!important;border-radius:16px!important}
body.mode-2 #play .score-team .score-display{height:80px;min-height:80px!important;padding:6px!important;border-radius:16px!important}
body.mode-2 #play .score-team .score-value{font-size:42px!important}
body.mode-2 #play .score-team .score-note{font-size:13px!important;line-height:1.2;min-height:16px}
body.mode-2 #play .score-team .chip-row{display:flex;gap:8px!important;margin-top:10px!important}
body.mode-2 #play .score-team .chip{flex:1;min-width:0;min-height:44px!important;font-size:15px!important;padding:8px 4px;border-radius:12px!important}
body.mode-2 #play .score-team .chip.ntp:not([hidden]){min-height:44px!important;display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap}
body.mode-2 #play .score-team .ntp-value{width:24px;height:24px;min-width:24px;font-size:13px}
@media(max-width:350px){
 body.mode-2 #play .score-team .score-stepper{grid-template-columns:64px minmax(0,1fr) 64px!important;gap:8px!important}
 body.mode-2 #play .score-team .step-btn,body.mode-2 #play .score-team .score-display{height:72px;min-height:72px!important}
 body.mode-2 #play .score-team .chip{font-size:13px!important}
}

body.mode-2 #currentHoleCard .hole-home-btn{width:48px!important;min-width:48px!important;max-width:48px!important;height:48px!important;flex:0 0 48px!important}

.storage-status{margin:4px 0 8px;padding:8px 12px;border:1px solid #4ade8070;border-radius:10px;color:#a7f3d0;font-size:13px;background:#13352c}
.storage-status:empty,#offlineStatus:empty{display:none}
.storage-status[data-kind=pending]{background:#332c16;color:#fde68a;border-color:#eab308}
.storage-status[data-kind=error]{background:#451a25;color:#fecdd3;border-color:#fb7185}
#onlineRecovery{margin:10px 0 20px}#onlineRounds{display:grid;gap:10px;margin-top:10px}

/* Feedback stays visible above the scrolling participation dialog. */
.participant-joined-toast{position:fixed;z-index:10;top:max(20px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(370px,calc(100vw - 32px));box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:18px;border:2px solid #4ade80;border-radius:18px;background:#112c27;color:#f0fdf4;box-shadow:0 12px 32px #0008;pointer-events:none}
.participant-joined-toast[hidden]{display:none}
.participant-joined-toast strong{font-size:20px;line-height:1.35;overflow-wrap:anywhere}
.joined-check{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#facc15;color:#101827;font-size:23px;font-weight:800}
#startConfirmedRound{scroll-margin-block:20px;font-size:20px;font-weight:800}


/* Rangliste: die ersten drei Plätze und das persönliche Rundenarchiv. */
.leaderboard-entry.rank-1,.leaderboard-entry.rank-2,.leaderboard-entry.rank-3{
  border:1px solid rgba(255,255,255,.2);border-radius:16px;margin:10px 0;padding:14px 12px;
  grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px
}
.leaderboard-entry.rank-1,.preview-row.rank-1{background:linear-gradient(110deg,rgba(245,186,49,.24),rgba(245,186,49,.08));border-color:rgba(245,186,49,.52)}
.leaderboard-entry.rank-2,.preview-row.rank-2{background:linear-gradient(110deg,rgba(202,215,230,.2),rgba(202,215,230,.06));border-color:rgba(202,215,230,.43)}
.leaderboard-entry.rank-3,.preview-row.rank-3{background:linear-gradient(110deg,rgba(202,124,73,.21),rgba(202,124,73,.07));border-color:rgba(202,124,73,.46)}
.rank-medal{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;font-size:25px;background:rgba(10,17,31,.42);line-height:1}
.rank-number{display:grid;place-items:center;font-weight:800}
.leaderboard-entry>strong{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.leaderboard-entry.rank-1>strong{color:#ffe28a}
.leaderboard-entry.rank-2>strong{color:#e2e8f0}
.leaderboard-entry.rank-3>strong{color:#f5bd91}
.leaderboard-name{font-weight:750;min-width:0}
.preview-row.rank-1,.preview-row.rank-2,.preview-row.rank-3{border:1px solid;margin-top:7px;padding:8px;border-radius:12px;grid-template-columns:30px minmax(0,1fr) auto}
.preview-row .rank-medal{width:30px;height:30px;font-size:20px}
.preview-row.rank-1 strong{color:#ffe28a}.preview-row.rank-2 strong{color:#e2e8f0}.preview-row.rank-3 strong{color:#f5bd91}
.my-history{margin-top:26px;padding-top:22px;border-top:1px solid var(--border)}
.my-history-heading{display:flex;justify-content:space-between;align-items:end;gap:10px;margin-bottom:7px}
.my-history-heading h3{font-size:21px;margin:2px 0}
.history-eyebrow{font-size:12px;letter-spacing:.11em;text-transform:uppercase;color:#facc15;font-weight:850;margin:0}
.history-count{color:#dbeafe;font-size:13px;font-weight:700;white-space:nowrap}
.my-history-list{display:grid;gap:10px;margin-top:14px}
.history-card{border:1px solid #3b526d;background:#1a273b;border-radius:14px;padding:15px}
.history-card-top{display:flex;justify-content:space-between;gap:9px;align-items:center}
.history-card-top>strong{font-size:15px}
.history-status{font-size:12px;font-weight:800;padding:5px 9px;border-radius:999px;white-space:nowrap}
.history-status.official{color:#b7f7d0;background:#145138}
.history-status.private{color:#dfd3ff;background:#403460}
.history-course{font-weight:800;margin:10px 0 4px;overflow-wrap:anywhere}
.history-players{color:#e2e8f0;margin:0 0 12px;overflow-wrap:anywhere}
.history-players>span{color:#a9bdd1}
.history-result{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;border-top:1px solid var(--border);padding-top:11px;font-variant-numeric:tabular-nums}
.history-result.positive{color:#a7f3d0}.history-result.negative{color:#fda4af}.history-result.neutral{color:#e2e8f0}
.history-result span{text-align:right}
.my-history-actions{display:grid;gap:9px;margin-top:13px}
.my-history-actions button{width:100%}
.history-empty{padding:14px;border:1px dashed #48627c;border-radius:12px}
@media(max-width:420px){
 .leaderboard-entry.rank-1,.leaderboard-entry.rank-2,.leaderboard-entry.rank-3{grid-template-columns:34px minmax(0,1fr) auto;padding:10px 8px;gap:6px}
 .leaderboard-entry .rank-medal{width:32px;height:32px;font-size:21px}
 .leaderboard-entry>strong{font-size:13px}
 .history-result span{text-align:left}
}


/* Mitspieler-Favoriten und lesbare Match-Historie. */
.favorite-friends{border:1px solid #526d86;border-radius:16px;background:#192739;padding:14px;margin:10px 0 18px}
.favorite-friends h3{margin:0 0 4px;font-size:19px}
.favorite-friend-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.favorite-friend-rows button{display:flex;justify-content:space-between;align-items:center;gap:10px;min-width:0;min-height:66px;padding:10px 12px;background:#2a4058;color:#fff;text-align:left}
.favorite-friend-rows button span{min-width:0;overflow-wrap:anywhere}
.favorite-friend-rows small{display:block;font-size:12px;color:#cbd5e1;margin-top:3px}
.favorite-friend-rows b{font-size:13px;color:#a7f3d0;white-space:nowrap}
.favorite-friend-rows button:disabled{opacity:.5}
.home-history .preview-heading button{width:auto;padding:8px 0;color:#fde047;text-decoration:none;font-size:14px}
.home-history-rows{display:grid;gap:8px;margin-top:14px}
.history-card.compact{padding:12px}
.history-card.compact .history-players{margin-bottom:7px}
.history-status.local{background:#394453;color:#e2e8f0}
.history-open{width:100%;text-align:left;margin-top:10px;padding:11px 13px;background:#30445b;color:#dbeafe;font-weight:800;border-radius:10px}
.history-open:hover,.history-open:focus-visible{background:#3f5f80}
.match-detail-dialog{width:min(680px,calc(100vw - 20px))}
.match-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.match-detail-head h2{overflow-wrap:anywhere}
.match-detail-head button{width:auto;flex:none}
.match-participants{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:15px 0}
.match-participants>div{background:#1e3047;border:1px solid #45617d;border-radius:12px;padding:11px;overflow-wrap:anywhere}
.match-participants span{display:block;color:#cbd5e1;font-size:14px;margin-top:3px}
.match-hole-list{display:grid;gap:10px}
.match-hole{border:1px solid #486581;border-radius:14px;padding:14px;background:#1b2a40}
.match-hole h3{margin:0 0 7px;font-size:17px}
.match-hole p{margin:0 0 8px}
.match-hole>strong{color:#a7f3d0}
.match-strokes{font-size:14px;color:#dbeafe}
/* Keep the home icon centered on iPad as well as phones. */
#currentHoleCard .hole-bar{align-items:flex-start!important}
#currentHoleCard .hole-bar>div:first-child{flex:1;min-width:0}
#currentHoleCard .hole-home-btn{display:grid!important;place-items:center!important;flex:0 0 48px!important;width:48px!important;min-width:48px!important;max-width:48px!important;height:48px!important;padding:0!important;margin:0!important;align-self:flex-start!important;line-height:0!important}
#currentHoleCard .hole-home-btn svg{display:block;width:23px;height:23px}
@media(max-width:600px){
 .favorite-friend-rows,.match-participants{grid-template-columns:1fr}
 .match-detail-head h2{font-size:21px}
}

.storage-resolve{margin:-4px 0 10px;width:100%;min-height:42px}

/* Explain that a missing saved course can be searched online by explicit tap. */
#courseOnlineHint.course-online-hint{margin:10px 0 0;padding:10px 12px;border:1px solid rgba(79,178,255,.48);border-radius:12px;background:rgba(20,101,168,.17);color:#e6f4ff;font-size:15px;line-height:1.4}
#courseOnlineHint.course-online-hint[hidden]{display:none}
