:root {
  --gc-green: #1a3a2a;
  --gc-green-mid: #2d5c3f;
  --gc-green-light: #4a8c5c;
  --gc-gold: #c9a84c;
  --gc-gold-light: #e8c97a;
  --gc-cream: #f5f0e8;
  --gc-cream-dark: #ede6d6;
  --gc-text: #1a1a18;
  --gc-text-muted: #50504b;
  --gc-white: #ffffff;
  --gc-surface: #fdfaf4;
  --gc-border: rgba(26, 58, 42, 0.12);
  --gc-danger: #c84040;
  --gc-shadow: 0 2px 16px rgba(26, 58, 42, 0.10);

  --radius: 16px;
  --radius-sm: 10px;

  --header-h: 60px;
  --nav-h: 64px;
  --content-max: 1200px;           /* lebar maksimum halaman form; ganti "none" bila ingin benar-benar penuh */

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Cormorant Garamond', serif;

  --glass: rgba(12, 26, 18, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --lrc-control-bg: #fff;
  --lrc-control-hover: #f4f4f4;
  --lrc-control-size: 30px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); color: var(--gc-text); background: var(--gc-white);  min-height: 100vh; min-height: 100dvh; }
.hero-brand, .brand-name, .login-title, .setup-title, .modal-title,
.hi-val, .summary-val, .compass-center, .wr-temp, .se-avatar,
.landing-title, .err-code, .err-title, .hero-quote {
  font-family: var(--font-serif);
}
.text-center { text-align: center; }
.text-white { color: var(--gc-white); }
.text-danger { color: #c00 !important; }
.text-normal { color: var(--gc-text) !important; }
.text-green { color: var(--gc-green-light) !important; }
.mb-4 { margin-bottom: 20px; }
.login-error { color: #9a2020; font-size: 13px; font-weight: 500; }
.advice { color: #666; font-size: 16px; text-align: justify; }
.fi { border: 0.5px solid #c5c5c5 !important; }
.select-event { height: 50vh; height: 50dvh; overflow-y: auto; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes modalPop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes scanMove {
  0%   { top: 4%;  opacity: 0.2; }
  50%  { top: 96%; opacity: 1; }
  100% { top: 4%;  opacity: 0.2; }
}

/* ---------- 4. FORM & TOMBOL ---------- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; margin-bottom: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gc-text-muted);
}
.input-wrap {
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--gc-white); border: 1.5px solid var(--gc-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap:focus-within { border-color: var(--gc-gold); box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15); }
.input-wrap.error { border-color: var(--gc-danger); }
.input-wrap i { color: var(--gc-text-muted); font-size: 14px; flex-shrink: 0; }
.input-wrap input {
  flex: 1; min-width: 0; padding: 13px 0;
  border: none; outline: none; background: transparent;
  font: inherit; font-size: 14px; color: var(--gc-text);
}
.input-wrap input::placeholder { color: rgba(107, 107, 94, 0.55); }
.toggle-pass { background: none; border: none; color: var(--gc-text-muted); cursor: pointer; font-size: 14px; padding: 4px; flex-shrink: 0; }
.field-error { display: none; margin-top: 6px; font-size: 11px; color: var(--gc-danger); }
.field-error.show { display: block; }

.form-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }
.remember { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember span { color: var(--gc-text-muted); }
.remember .form-label { padding-top: 8px; }

.checkbox {
  width: 18px; height: 18px; flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--gc-white); border: 1.5px solid var(--gc-border); border-radius: 5px;
  transition: all 0.15s;
}
.checkbox i { font-size: 10px; color: var(--gc-cream); opacity: 0; }
.checkbox.checked { background: var(--gc-green); border-color: var(--gc-green); }
.checkbox.checked i { opacity: 1; }

.btn { border-radius: var(--radius-sm); cursor: pointer; }

.primary-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 36px); margin: 4px 18px 20px; padding: 14px;
  background: var(--gc-green); color: var(--gc-cream);
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em; cursor: pointer;
  transition: opacity 0.15s;
}
.primary-btn:active { opacity: 0.85; }
.primary-btn:disabled { opacity: 0.4; cursor: default; }
.primary-btn .spinner {
  display: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(245, 240, 232, 0.35); border-top-color: var(--gc-cream);
  animation: spin 0.7s linear infinite;
}
.primary-btn.loading .spinner { display: inline-block; }
.primary-btn.loading .btn-label { display: none; }

.btn-today, .btn-clr {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-today { background: var(--gc-green); color: var(--gc-white); border: 1px solid var(--gc-green); }
.btn-today:hover { background: var(--gc-green-mid); }
.btn-clr { background: var(--gc-gold-light); color: var(--gc-text); border: 1px solid var(--gc-gold); }
.btn-clr:hover { background: var(--gc-gold); color: var(--gc-white); }

.btn-step {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gc-cream); color: var(--gc-green);
  border: 1px solid var(--gc-border); border-radius: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-step:active { background: var(--gc-gold-light); }

.icon-btn-sm {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px;
  background: var(--gc-white); border: 1px solid var(--gc-border); border-radius: 20px;
  font-size: 11px; font-weight: 600; color: var(--gc-text-muted); cursor: pointer;
}
.icon-btn-sm i { font-size: 12px; }

.input-none {
  width: 100%; border: none; font-size: 15px; font-weight: 600; color: var(--gc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.input-none:focus { border: none; outline: none; box-shadow: none; }

/* Judul/subjudul halaman form (dipakai se-, pe-, setup-wrap) */
.entry-card-title { font-size: 15px; font-weight: 600; color: var(--gc-text); margin: 4px 0; }
.entry-card-sub { font-size: 11px; color: var(--gc-text-muted); margin-bottom: 20px; }
.section-label {
  margin: 0 0 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gc-text-muted);
}

/* ---------- 5. LOGIN ---------- */
.login-shell { min-height: 100vh; min-height: 100dvh; width: 100%; display: flex; flex-direction: column; }

.login-hero {
  position: relative; overflow: hidden; flex-shrink: 0; text-align: center;
  padding: calc(40px + var(--safe-top)) 24px 32px;
  background: var(--gc-green);
}
.login-hero::before, .login-hero::after { content: ''; position: absolute; border-radius: 50%; }
.login-hero::before { top: -60px; right: -60px; width: 220px; height: 220px; background: rgba(201, 168, 76, 0.08); }
.login-hero::after  { bottom: -70px; left: -50px; width: 180px; height: 180px; background: rgba(255, 255, 255, 0.03); }

.logo-mark-lg {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gc-gold);
}
.logo-mark-lg i { color: var(--gc-green); font-size: 26px; }
.hero-brand { font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: 0.02em; color: var(--gc-cream); }
.hero-tag { margin-top: 6px; font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gc-gold); }
.hero-role-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 6px 14px;
  background: rgba(201, 168, 76, 0.15); border: 1px solid rgba(201, 168, 76, 0.35); border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gc-gold);
}
.hero-role-badge i { font-size: 12px; }
.hero-quote { max-width: 320px; margin-top: 32px; font-size: 18px; font-style: italic; line-height: 1.5; color: rgba(245, 240, 232, 0.75); }
.hero-quote-attr { margin-top: 10px; font-size: 11px; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gc-gold); }

.login-panel {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: center; overflow-y: auto;
  margin-top: -18px; padding: 32px 24px calc(40px + var(--safe-bottom));
  background: var(--gc-surface); border-radius: 28px 28px 0 0;
}
.login-title { font-size: 28px; font-weight: 700; color: var(--gc-text); }
.login-sub { margin: 4px 0 26px; font-size: 12px; line-height: 1.5; color: var(--gc-text-muted); }

.divider-row { display: flex; align-items: center; gap: 12px; margin: 26px 0 20px; }
.divider-row .line { flex: 1; height: 1px; background: var(--gc-border); }
.divider-row span { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gc-text-muted); }
.help-text { text-align: center; font-size: 12px; color: var(--gc-text-muted); }
.help-text a { color: var(--gc-green-light); font-weight: 600; text-decoration: none; cursor: pointer; }
.footer-note { margin-top: 28px; text-align: center; font-size: 10px; letter-spacing: 0.02em; color: var(--gc-text-muted); }

/* ---------- 6. APP SHELL (full screen) ---------- */
.mobileapp {
  width: 100%; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
}

.app-header {
  flex-shrink: 0; height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) calc(18px + var(--safe-right)) 0 calc(18px + var(--safe-left));
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gc-green); border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}
.header-logo { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; background: var(--gc-gold);
}
.logo-mark i { color: var(--gc-green); font-size: 16px; }
.brand-name { font-size: 17px; font-weight: 700; line-height: 1; letter-spacing: 0.02em; color: var(--gc-cream); }
.brand-tag { font-size: 9px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gc-gold); }
.header-right { display: flex; align-items: center; gap: 12px; }
.hdr-btn {
  position: relative; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(201, 168, 76, 0.2);
  color: var(--gc-cream); font-size: 16px;
}
.notif-dot {
  position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gc-gold); border: 1.5px solid var(--gc-green);
}

.desktop-nav { display: none; }
.desktop-nav a {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase;
  color: rgba(245, 240, 232, 0.55); text-decoration: none; cursor: pointer;
}
.desktop-nav a i { font-size: 14px; }
.desktop-nav a.active { background: rgba(201, 168, 76, 0.18); color: var(--gc-gold); }

.app-body {
  flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  padding-left: var(--safe-left); padding-right: var(--safe-right);
}
.app-body::-webkit-scrollbar { display: none; }

.bottom-nav {
  position: relative; z-index: 100; flex-shrink: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 0 4px var(--safe-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: var(--gc-green); border-top: 1px solid rgba(201, 168, 76, 0.2);
}
.nav-item {
  flex: 1; max-width: 68px; padding: 8px 10px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; cursor: pointer; transition: background 0.2s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); }
.nav-item i { font-size: 20px; color: rgba(245, 240, 232, 0.45); transition: color 0.2s; }
.nav-item span { font-size: 9px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(245, 240, 232, 0.40); transition: color 0.2s; }
.nav-item.active i, .nav-item.active span { color: var(--gc-gold); }

/* Grid 2 panel dipakai halaman setup pemain (mobile: 1 kolom, panel utama di atas) */
.layout-grid { display: flex; flex-direction: column-reverse; gap: 30px; padding: 28px 4px 32px; }
#player-setup { flex-direction: column; }

/* ---------- 7. MODAL & TOAST ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999; padding: 20px;
  display: none; align-items: center; justify-content: center;
  background: rgba(26, 26, 24, 0.55); backdrop-filter: blur(2px);
}
.modal-overlay.active { display: flex; }
.modal-box {
  width: 100%; max-width: 360px; max-height: 90dvh; overflow-y: auto; padding: 24px 22px;
  background: var(--gc-white); border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); animation: modalPop 0.2s ease;
}
.modal-title { margin-bottom: 14px; font-size: 20px; font-weight: 700; color: var(--gc-text); }
.modal-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--gc-border); font-size: 13px; color: var(--gc-text); }
.modal-row span:first-child { color: var(--gc-text-muted); }
.modal-row span:last-child { font-weight: 600; }
.modal-note { margin-top: 14px; font-size: 11px; line-height: 1.5; color: var(--gc-text-muted); }
.modal-warn { margin-top: 6px; font-size: 11px; font-weight: 500; line-height: 1.5; color: #9a2020; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-btn { flex: 1; padding: 12px; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; }
.modal-btn.cancel { background: var(--gc-cream); color: var(--gc-text); }
.modal-btn.finish { background: var(--gc-green); color: var(--gc-cream); }

.toast {
  position: fixed; top: calc(65px + var(--safe-top)); left: 50%; z-index: 1000;
  max-width: 90%; padding: 12px 20px; border-radius: 20px;
  background: #9a2020; color: #fff; font-size: 13px; font-weight: 500; text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(-20px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 8. EVENT & SETUP PEMAIN ---------- */
/* Panel kiri/kanan: hilangkan margin/padding bawaan anak agar rata dengan grid */
.panel-scan .setup-intro, .panel-scan .scanner-wrap, .panel-scan .scan-status, .panel-scan .scanner-actions,
.panel-events .section-label, .panel-events .event-card, .panel-events .or-divider,
.panel-form .select-field, .panel-form .setup-intro, .panel-form .section-label,
.panel-scorecard .section-label, .panel-scorecard .scorecard-wrap {
  margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0;
}
.panel-scan { position: sticky; top: 28px; }
.panel-summary { position: sticky; top: 28px; background: transparent; }
.panel-summary .summary-card, .panel-summary .primary-btn { width: 100%; margin-left: 0; margin-right: 0; }
.panel-scorecard { padding: 4px; }
.or-divider { display: none; }

.setup-intro { padding: 18px 18px 4px; }
.setup-title { font-size: 24px; font-weight: 700; color: var(--gc-text); }
.setup-sub { margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--gc-text-muted); }

/* Scanner */
.scanner-wrap {
  position: relative; overflow: hidden; margin: 0 auto;
  width: 100%; max-height: 340px; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--gc-green); border-radius: var(--radius);
}
#reader { width: 100% !important; height: 100% !important; }
#reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
#reader img { display: none !important; }
.scan-frame { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.scan-box { position: relative; width: 62%; aspect-ratio: 1 / 1; }
.scan-corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--gc-gold); }
.scan-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.scan-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.scan-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.scan-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 8px 0; }
.scan-line {
  position: absolute; left: 4%; right: 4%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gc-gold-light), transparent);
  box-shadow: 0 0 8px rgba(232, 201, 122, 0.8);
  animation: scanMove 2.2s ease-in-out infinite;
}
.scanner-placeholder {
  position: absolute; inset: 0; z-index: 6; padding: 20px; gap: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--gc-green);
}
.scanner-placeholder.hidden { display: none; }
.placeholder-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201, 168, 76, 0.15); border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--gc-gold); font-size: 26px;
}
.placeholder-title { font-size: 14px; font-weight: 600; color: var(--gc-cream); }
.placeholder-sub { max-width: 220px; font-size: 11px; line-height: 1.5; color: rgba(245, 240, 232, 0.6); }
.placeholder-btn {
  display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 10px 20px;
  background: var(--gc-gold); color: var(--gc-green); border: none; border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
}
.scan-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 18px 6px; padding: 10px; font-size: 12px; font-weight: 500; color: var(--gc-text-muted); }
.scan-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gc-text-muted); }
.scan-status.live { color: var(--gc-green); }
.scan-status.live .dot { background: #2d7a3a; animation: pulseDot 1.4s ease-in-out infinite; }
.scanner-actions { display: flex; justify-content: center; gap: 10px; margin: 4px 18px; }

/* Toolbar pencarian event */
.event-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; margin-bottom: 18px; }
.search-box {
  flex: 1 1 160px; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--gc-border); border: 1px solid transparent; border-radius: 8px;
  transition: border-color 0.15s;
}
.search-box:focus-within { border-color: var(--gc-green-light); }
.search-box svg { flex-shrink: 0; color: var(--gc-text-muted); }
.search-box input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14px; }
.search-box input::placeholder { color: var(--gc-text-muted); }
.empty-state { display: none; padding: 24px 0; text-align: center; font-size: 14px; color: var(--gc-text-muted); }

/* Kartu event */
.event-card {
  display: flex; align-items: stretch; margin: 0 18px 12px; overflow: hidden; cursor: pointer;
  background: var(--gc-white); border: 1px solid var(--gc-border); border-radius: var(--radius);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
.event-card:hover { box-shadow: 0 6px 20px rgba(26, 58, 42, 0.12); border-color: rgba(201, 168, 76, 0.4); }
.event-card:active { transform: scale(0.99); }
.event-card.is-today { border-color: var(--gc-green-light); }
.event-selected { background-color: var(--gc-cream-dark) !important; }
.event-thumb { position: relative; width: 96px; flex-shrink: 0; background: var(--gc-cream) center / cover; }
.event-thumb-badge {
  position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 10px;
  background: rgba(26, 58, 42, 0.85); color: var(--gc-gold);
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.event-body { flex: 1; min-width: 0; padding: 14px; display: flex; flex-direction: column; justify-content: center; }
.event-title { font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--gc-text); }
.event-desc {
  margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--gc-text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.event-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.event-meta-item { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 500; color: var(--gc-text-muted); }
.event-meta-item i { font-size: 10px; color: var(--gc-gold); }
.event-arrow { display: flex; align-items: center; flex-shrink: 0; padding: 0 14px; font-size: 16px; color: var(--gc-border); }
.is-tournament { position: absolute; right: 20px; top: 20px; padding-left: 0 !important; }
.tournament-title { border-bottom: 2px solid var(--gc-border); }

/* Select custom */
.select-field {
  margin: 0 18px 12px; overflow: hidden;
  background: var(--gc-white); border: 1px solid var(--gc-border); border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.select-field.filled { border-color: rgba(201, 168, 76, 0.5); }
.select-field.open { box-shadow: 0 4px 16px rgba(26, 58, 42, 0.10); }
.select-field.disabled { opacity: 0.5; }
.select-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; }
.select-field.disabled .select-header { cursor: default; }
.select-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; width: 100%; }
.select-label { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gc-text-muted); }
.select-value { font-size: 15px; font-weight: 600; color: var(--gc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select-value.placeholder { font-weight: 400; color: var(--gc-text-muted); background-color: transparent; }
.select-chevron {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gc-cream); color: var(--gc-green); font-size: 12px; transition: transform 0.2s;
}
.select-field.open .select-chevron { transform: rotate(180deg); background: var(--gc-gold); }
.select-options { max-height: 0; overflow: hidden; border-top: 1px solid transparent; transition: max-height 0.25s ease; }
.select-field.open .select-options { max-height: 400px; overflow-y: auto; border-top-color: var(--gc-border); }
.select-option {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  border-bottom: 1px solid var(--gc-border); font-size: 13px; color: var(--gc-text); cursor: pointer;
}
.select-option:last-child { border-bottom: none; }
.select-option:hover, .select-option:active { background: var(--gc-cream); }
.select-option.selected { background: rgba(201, 168, 76, 0.10); color: var(--gc-green); font-weight: 600; }
.select-option i { font-size: 13px; color: var(--gc-gold); opacity: 0; }
.select-option.selected i { opacity: 1; }
.option-meta { margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--gc-text-muted); }

/* Ringkasan */
.summary-card { position: relative; overflow: hidden; margin: 4px 18px 16px; padding: 18px; background: var(--gc-green); border-radius: var(--radius); }
.summary-card::after { content: '⛳'; position: absolute; right: -6px; bottom: -14px; font-size: 70px; opacity: 0.08; }
.summary-title { margin-bottom: 12px; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gc-gold); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 12px; }
.summary-row:last-child { border-bottom: none; }
.summary-row span:first-child { color: rgba(245, 240, 232, 0.55); }
.summary-row span:last-child { max-width: 60%; font-weight: 600; text-align: right; color: var(--gc-cream); }

.summary-bar {
  display: flex; justify-content: space-around; align-items: center; margin: 4px 18px 14px; padding: 6px 10px;
  background: var(--gc-cream); border: 0.5pt solid var(--gc-gold); border-radius: var(--radius-sm);
}
.summary-item { text-align: center; }
.summary-val { font-size: 18px; font-weight: 700; color: var(--gc-green); }
.summary-lbl { margin-top: 2px; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gc-text-muted); }
.summary-sep { width: 1px; height: 28px; background: var(--gc-border); }

/* Scorecard tabel */
.scorecard-wrap { margin: 0 18px 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scorecard-table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 13px; }
.scorecard-table thead tr { height: 48px; background: var(--gc-green); }
.scorecard-table thead th { padding: 8px 4px; text-align: center; font-size: 12px; font-weight: 500; letter-spacing: 0.05em; color: var(--gc-white); }
.scorecard-table thead th:first-child { padding-left: 10px; text-align: left; }
.scorecard-table tbody tr { height: 48px; border-bottom: 1px solid var(--gc-border); }
.scorecard-table tbody tr:nth-child(even) { background: var(--gc-cream); }
.scorecard-table tbody td { padding: 7px 4px; text-align: center; font-size: 12px; font-weight: 400; color: var(--gc-text); }
.scorecard-table tbody td:first-child { padding-left: 10px; text-align: left; font-weight: 500; }
.scorecard-total { background: var(--gc-green) !important; }
.scorecard-total td { color: var(--gc-cream) !important; font-weight: 600 !important; }
.col-active { background: rgba(201, 168, 76, 0.18) !important; box-shadow: inset 0 0 0 1px var(--gc-gold); }
.col-active td { color: var(--gc-green) !important; font-weight: 700 !important; }

/* Warna hasil skor (satu definisi) */
.score-under  { color: #c00; font-weight: 700; }
.score-over   { color: #2d7a3a; font-weight: 700; }
.score-eagle  { color: #979797 !important; font-weight: 700 !important; }
.score-birdie { color: #c00 !important;    font-weight: 700 !important; }
.score-par    { color: #37be5c !important; font-weight: 700 !important; }
.score-bogey  { color: #5eaef0 !important; font-weight: 700 !important; }

/* ---------- 9. HOLE GUIDE ---------- */
.hg-grid {
  min-height: 100%; padding: 16px; display: grid; grid-template-columns: 1fr; gap: 20px;
  background: url(/static/images/weather-bg.webp) center / cover no-repeat;
}
.hg-col-left { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.hg-col-right { height: clamp(360px, 60dvh, 560px); min-height: 0; }

/* Chip kaca buram: satu aturan untuk semua chip di atas foto/peta */
.weather-compass-chip, .hwc-readings, .hwc-stat {
  background: var(--glass);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
}

.hole-weather-card {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 440px; padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: var(--radius); color: var(--gc-cream);
}
.hwc-scrim {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(10, 22, 15, 0.55) 0%, rgba(10, 22, 15, 0.15) 35%, rgba(10, 22, 15, 0.25) 60%, rgba(10, 22, 15, 0.65) 100%);
}
.hole-weather-card > * { position: relative; z-index: 1; }

.hwc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.hwc-loc { font-size: 12px; font-weight: 700; color: var(--gc-cream); }
.hwc-loc i { margin-right: 5px; color: var(--gc-gold); }
.hwc-updated { font-size: 10px; font-weight: 500; color: rgba(245, 240, 232, 0.7); }

.hwc-main { position: absolute; top: 40px; left: 14px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.weather-compass-chip { flex-shrink: 0; padding: 8px; border-radius: 50%; }
.compass-ring { position: relative; width: 96px; height: 96px; border: 1.5px solid rgba(255, 255, 255, 0.2); border-radius: 50%; }
.compass-pt { position: absolute; font-size: 9px; font-weight: 700; color: var(--gc-gold); }
.compass-pt.n { top: 6px; left: 50%; transform: translateX(-50%); }
.compass-pt.s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.compass-pt.e { right: 8px; top: 50%; transform: translateY(-50%); }
.compass-pt.w { left: 8px; top: 50%; transform: translateY(-50%); }
.wind-arrow {
  position: absolute; top: 50%; left: 50%; width: 2px; height: 32px; margin: -32px 0 0 -1px;
  display: flex; justify-content: center;
  transform-origin: bottom center; transform: rotate(var(--wind-deg, 0deg));
}
.wind-arrow i { font-size: 13px; color: var(--gc-gold-light); transform: translateY(-2px); }
.compass-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: var(--gc-cream); }
.compass-center span { font-size: 8px; font-weight: 500; text-transform: uppercase; color: rgba(245, 240, 232, 0.65); }

.hwc-readings { padding: 10px 18px; border-radius: var(--radius-sm); }
.wr-temp { font-size: 34px; font-weight: 700; line-height: 1; color: var(--gc-gold); }
.wr-cond { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--gc-cream); }

.hwc-stats { z-index: 2; display: grid; gap: 10px; }
.hwc-stats.left  { position: absolute; bottom: 20px; left: 10px;  grid-template-rows: repeat(5, 1fr); z-index: 69998; }
.hwc-stats.right { position: absolute; bottom: 20px; right: 10px; grid-template-columns: 1fr; z-index: 69997; }
.hwc-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: var(--radius-sm); }
.hwc-stat i { font-size: 13px; color: var(--gc-gold); }
.hwc-stat-val { font-size: 12px; font-weight: 700; color: var(--gc-cream); }
.hwc-stat-lbl { font-size: 8.5px; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(245, 240, 232, 0.75); }

/* Video + info hole */
.video-card { flex-shrink: 0; overflow: hidden; background: var(--gc-white); border: 1px solid var(--gc-border); border-radius: var(--radius); }
.video-card .hole-info-bar { margin: 16px 16px 12px; }
.video-card .hole-desc { margin: 0 16px 16px; }
.hole-info-bar { display: flex; justify-content: space-between; margin: 0 0 18px; padding: 8px 4px; background: var(--gc-green); border-radius: var(--radius-sm); }
.hi-item { flex: 1; text-align: center; }
.hi-val { font-size: 20px; font-weight: 700; color: var(--gc-gold); }
.hi-lbl { margin-top: 2px; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245, 240, 232, 0.55); }
.hi-sep { width: 1px; background: rgba(255, 255, 255, 0.1); }
.hole-desc { font-size: 12px; line-height: 1.6; color: var(--gc-text-muted); }

/* Peta */
.map-card { height: 100%; display: flex; flex-direction: column; }
.map-wrap { position: relative; isolation: isolate; flex: 1; min-height: 0; overflow: hidden; }
.map-wrap #map, #map { display: block; width: 100%; height: 100%; border: 0; }
.map-overlay {
  position: absolute; top: 12px; right: 12px; z-index: 1000; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: rgba(20, 26, 19, 0.29); border: 1px solid rgba(119, 119, 119, 0.25); border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ov-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ov-item i { flex-shrink: 0; font-size: 15px; color: var(--gc-gold); }
.ov-text { display: flex; flex-direction: column; min-width: 0; }
.ov-val { font-size: 12px; font-weight: 700; color: var(--gc-cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-lbl { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(245, 240, 232, 0.6); }
.ov-sep { flex-shrink: 0; width: 1px; height: 26px; background: rgba(255, 255, 255, 0.15); }
.info-panel { padding: 10px; background: #f8f9fa; font-family: sans-serif; }

.distance-label { padding: 3px 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; }
.custom-segment-label { background: transparent; border: none; white-space: nowrap; }
.custom-segment-label span { display: inline-block; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 12px; font-weight: bold; }
.hole-distance { color: #fff !important; }
.player-distance { color: #fbff2c !important; }
.hole-info { left: 68px !important; top: 12px !important; z-index: 69996; }
.icon-red { color: var(--gc-danger) !important; }
.icon-yellow { color: var(--gc-gold) !important; }
.icon-green { color: var(--gc-green-light) !important; }

/* Kontrol leaflet-rotate */
.leaflet-control-rotate { background: var(--lrc-control-bg); }
.leaflet-control-rotate a { width: var(--lrc-control-size); height: var(--lrc-control-size); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.leaflet-control-rotate a:hover { background: var(--lrc-control-hover); }
.leaflet-control-rotate--inactive a svg { filter: grayscale(1); }

/* ---------- 10. SCORE ENTRY ---------- */
.se-wrap, .pe-wrap, .setup-wrap { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 18px; }

.se-player-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.se-player-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  background: var(--gc-white); border: 1px solid var(--gc-border); border-radius: var(--radius);
}
.se-player-info { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.se-avatar {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gc-green); color: var(--gc-gold); font-size: 17px; font-weight: 700;
}
.se-player-text { display: flex; flex-direction: column; gap: 2px; }
.se-player-name { font-size: 14px; font-weight: 700; color: var(--gc-text); }
.se-player-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gc-text-muted); }
.se-stroke-badge {
  display: none; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px;
  background: rgba(201, 168, 76, 0.18); border: 1px solid var(--gc-gold); border-radius: 9px;
  font-size: 10px; font-weight: 700; color: var(--gc-green-mid);
}
.se-input-group { display: flex; align-items: center; gap: 10px; }
.se-score-input {
  width: 52px; height: 40px; text-align: center;
  background: var(--gc-surface); border: 1.5px solid var(--gc-border); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 16px; font-weight: 700; color: var(--gc-text);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.se-score-input:focus { outline: none; border-color: var(--gc-gold); box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15); }
.se-score-input::-webkit-outer-spin-button, .se-score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.se-score-input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.se-score-input.score-eagle  { background: rgba(151, 151, 151, 0.10); border-color: #979797; }
.se-score-input.score-birdie { background: rgba(204, 0, 0, 0.08);     border-color: #c00; }
.se-score-input.score-par    { background: rgba(55, 190, 92, 0.08);   border-color: #37be5c; }
.se-score-input.score-bogey  { background: rgba(94, 174, 240, 0.10);  border-color: #5eaef0; }
.se-score-input.score-double { background: rgba(122, 74, 30, 0.08);   border-color: rgba(122, 74, 30, 0.4); color: #7a4a1e !important; font-weight: 700 !important; }
.se-net { flex-basis: 100%; text-align: right; font-size: 11px; color: var(--gc-text-muted); }
.se-net-val { font-weight: 700; color: var(--gc-green); }

.se-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; font-size: 11px; color: var(--gc-text-muted); }
.se-legend span { display: flex; align-items: center; gap: 6px; }
.se-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.se-dot-eagle { background: #979797; }
.se-dot-birdie { background: #c00; }
.se-dot-par { background: #37be5c; }
.se-dot-bogey { background: #5eaef0; }
.se-dot-double { background: #7a4a1e; }

.se-actions { display: flex; gap: 10px; margin-top: 6px; }
.se-actions .modal-btn { flex: 1; }

/* Counter lama (jika masih dipakai) */
.score-card { padding: 10px 22px 4px; }
.counter-group { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.counter-label { font-size: 14px; font-weight: 600; }
.counter-controls { display: flex; align-items: center; gap: 15px; }
.counter-value { min-width: 30px; text-align: center; font-size: 16px; font-weight: bold; }

/* ---------- 11. LANDING ---------- */
.landing-shell {
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: space-between;
  background-size: cover; background-position: center;
}
.landing-scrim {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(10, 22, 15, 0.75) 0%, rgba(10, 22, 15, 0.35) 30%, rgba(10, 22, 15, 0.45) 60%, rgba(10, 22, 15, 0.85) 100%);
}
.landing-shell > * { position: relative; z-index: 1; }

.landing-header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: calc(20px + var(--safe-top)) 22px 20px; }
.landing-header .header-logo { display: flex; align-items: center; gap: 8px; }
.landing-weather-chip {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 16px;
  background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.landing-weather-chip i { flex-shrink: 0; font-size: 16px; color: var(--gc-gold); }
.lwc-text { display: flex; flex-direction: column; }
.lwc-val { font-size: 12px; font-weight: 700; color: var(--gc-cream); }
.lwc-lbl { margin-top: 1px; font-size: 10px; color: rgba(245, 240, 232, 0.7); }

.landing-main { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.landing-hero-text { max-width: 480px; }
.landing-title { font-size: 28px; font-weight: 700; line-height: 1.15; color: var(--gc-white); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); }
.landing-sub { max-width: 420px; margin-top: 16px; font-size: 16px; line-height: 1.6; color: var(--gc-white); }
.landing-cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 30px;
  background: var(--gc-gold); color: var(--gc-green); border: none; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.03em; cursor: pointer;
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.35); transition: transform 0.15s, box-shadow 0.15s;
}
.landing-cta i { font-size: 15px; }
.landing-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(201, 168, 76, 0.45); }
.landing-cta:active { transform: none; }

.landing-login-card {
  width: 100%; max-width: 100%; padding: 20px 20px 22px;
  background: rgba(15, 30, 20, 0.55); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.llc-panel .form-group { margin-bottom: 14px; }
.llc-panel .form-label { color: rgba(245, 240, 232, 0.7); }
.llc-panel .input-wrap { background: rgba(255, 255, 255, 0.92); }
.llc-submit { width: 100%; justify-content: center; margin: 6px 0 0; padding: 14px; }
.pin-box { font-size: 18px; }

.landing-footer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 22px calc(22px + var(--safe-bottom)); font-size: 12px; color: rgba(245, 240, 232, 0.55); }
.landing-footer a { color: rgba(245, 240, 232, 0.75); text-decoration: none; }
.landing-footer-sep { opacity: 0.5; }
.landing-footer span { color: #fff; }

/* ---------- 12. PLAYER ENTRY ---------- */
.pe-wrap .select-field { margin-left: 0; margin-right: 0; }

.pe-mode-card {
  display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 16px; padding: 12px 14px;
  background: var(--gc-cream); border: 1px solid var(--gc-border); border-radius: var(--radius);
}
.pe-mode-buttons { display: flex; gap: 8px; padding: 4px; background: var(--gc-white); border: 1px solid var(--gc-border); border-radius: 999px; }
.pe-mode-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px;
  background: transparent; color: var(--gc-text-muted); border: none; border-radius: 999px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.pe-mode-btn i { font-size: 12px; }
.pe-mode-btn.active { background: var(--gc-green); color: var(--gc-cream); }
.pe-mode-btn:not(.active):hover { color: var(--gc-text); }
.pe-mode-card .pe-checkbox-row { margin: 0; }

.pe-checkbox-row { display: flex; align-items: center; gap: 10px; margin: -4px 0 18px 4px; cursor: pointer; }
.pe-checkbox-row span { font-size: 13px; font-weight: 500; color: var(--gc-text); }

.pe-list-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.pe-count {
  padding: 4px 10px; background: rgba(201, 168, 76, 0.15); border: 1px solid rgba(201, 168, 76, 0.35); border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--gc-green-mid);
}

.pe-table-wrap { margin-bottom: 22px; overflow-x: auto; border: 1px solid var(--gc-border); border-radius: var(--radius); }
.pe-table { width: 100%; min-width: 0; }
.pe-table thead th { font-size: 11px; }
.pe-table tbody td { font-size: 13px; }
.pe-table tbody td:first-child { padding-left: 14px; text-align: center; }
.pe-table .checkbox { width: 20px; height: 20px; margin: 0 auto; }
.pe-col-chk { width: 40px; padding-left: 14px !important; text-align: center !important; }
.pe-col-no { width: 44px; }
.pe-col-name { text-align: left; }

.pe-input, .pe-del-btn { padding: 10px 6px; border: none; border-radius: 4px; background: transparent; }
.pe-input:focus, .pe-del-btn:focus { outline: 2px solid var(--gc-green-light); outline-offset: 2px; }

.player-choice { background: transparent; border: none; outline: none; }
.player-error { display: none; font-size: 10px; color: var(--gc-danger); }
.player-error.active { display: block; }

/* ---------- 13. ERROR PAGE ---------- */
.err-shell {
  position: relative; overflow: hidden; width: 100%; min-height: 100vh; min-height: 100dvh; padding: 24px;
  display: flex; align-items: center; justify-content: center; text-align: center; background: var(--gc-green);
}
.err-icon-bg {
  position: absolute; top: 50%; left: 50%; z-index: 0; pointer-events: none;
  font-size: min(620px, 90vw); line-height: 1; color: rgba(201, 168, 76, 0.06);
  transform: translate(-50%, -50%) rotate(-12deg);
}
.err-content { position: relative; z-index: 1; max-width: 420px; }
.err-code { font-size: clamp(72px, 18vw, 96px); font-weight: 700; line-height: 1; color: var(--gc-gold); text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25); }
.err-title { margin-top: 10px; font-size: clamp(21px, 5vw, 26px); font-weight: 700; color: var(--gc-cream); }
.err-desc { margin-top: 14px; font-size: 14px; line-height: 1.6; color: rgba(245, 240, 232, 0.7); }
.err-back-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding: 14px 28px;
  background: var(--gc-gold); color: var(--gc-green); border: none; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em; cursor: pointer;
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.3); transition: transform 0.15s, box-shadow 0.15s;
}
.err-back-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(201, 168, 76, 0.4); }
.err-back-btn:active { transform: none; }

/* ---------- 14. SETUP PAGE & REVIEW ---------- */
.setup-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 24px; }
.setup-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--gc-white); border: 1px solid var(--gc-border); border-radius: var(--radius); }
.setup-card-top { display: flex; align-items: center; justify-content: space-between; }
.setup-card-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45, 92, 63, 0.10); color: var(--gc-green-mid); font-size: 15px;
}
.setup-card-icon.warn { background: rgba(201, 168, 76, 0.15); color: #a3801f; }
.setup-card-icon.danger { background: rgba(200, 64, 64, 0.10); color: var(--gc-danger); }
.setup-card-title { font-size: 14px; font-weight: 700; color: var(--gc-text); }
.setup-card-desc { flex: 1; font-size: 12px; line-height: 1.55; color: var(--gc-text-muted); }

.setup-status { padding: 4px 10px; background: var(--gc-cream); border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; color: var(--gc-text-muted); }
.setup-status-running { background: rgba(201, 168, 76, 0.18); color: #8a6c1d; }
.setup-status-success { background: rgba(55, 190, 92, 0.14); color: #1f9d4a; }
.setup-status-error { background: rgba(200, 64, 64, 0.12); color: var(--gc-danger); }

.setup-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; padding: 10px;
  background: var(--gc-green); color: var(--gc-cream); border: none; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700; cursor: pointer; transition: opacity 0.15s;
}
.setup-btn:hover { opacity: 0.9; }
.setup-btn.warn { background: #a3801f; }
.setup-btn.danger { background: var(--gc-danger); }
.setup-btn:disabled, .setup-btn.is-busy { opacity: 0.6; cursor: default; }
.setup-btn.is-busy i { animation: spin 0.8s linear infinite; }

/* Override Bootstrap */
.list-group-item.active { color: var(--bs-list-group-active-color); background-color: var(--gc-green-light) !important; border-color: var(--gc-border); }
.form-check-input:checked { background-color: #198754; border-color: #198754; }
.form-check-input:focus { border-color: #157347; box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); }

/* Review / rating */
.star-rating { display: flex; gap: 6px; }
.star-rating i { font-size: 28px; color: var(--gc-border); cursor: pointer; transition: color 0.1s, transform 0.1s; }
.star-rating i.filled { color: var(--gc-gold); }
.star-rating i:active { transform: scale(0.9); }
.review-done-check { position: absolute; right: 16px; top: 56px; display: none; font-size: 18px; color: var(--gc-green-light); }
.player-card.review-complete { border-color: var(--gc-green-light) !important; background: rgba(74, 140, 92, 0.05); }
.player-card.review-complete .review-done-check { display: block; }
.rating-hint { min-height: 15px; margin-top: 4px; font-size: 11px; color: var(--gc-text-muted); }
@media (max-width: 768px) { .input-wrap input, .search-box input, .input-none, .pe-input { font-size: 16px; } }
@media (pointer: coarse) { .btn-step { width: 40px; height: 40px; } }
@media (max-width: 420px) { .landing-title { font-size: 28px; } .hwc-stats:not(.left):not(.right) { grid-template-columns: 1fr 1fr; } }
@media (max-width: 380px) { .map-overlay { flex-direction: column; align-items: flex-start; gap: 8px; } .ov-sep { display: none; } }
@media (max-width: 1024px) { .hwc-stats:not(.left):not(.right) { grid-template-columns: 1fr 1fr; } }
@media (min-width: 769px) {
.bottom-nav { display: none; }
.desktop-nav { display: flex; align-items: center; gap: 4px; }
.select-event { height: 60vh; height: 60dvh; }
.layout-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: start; gap: 30px; padding: 28px 32px 32px; }
#player-setup { display: flex; }
.login-shell { flex-direction: row; }
.login-hero { flex: 1; display: flex; align-items: center; justify-content: center; padding: 44px 24px 40px; text-align: left; }
.hero-content { text-align: left; }
.logo-mark-lg { margin: 0 0 20px; }
.hero-brand { font-size: 34px; }
.login-panel { flex: 0 0 clamp(380px, 42%, 560px); margin-top: 0; padding: 40px clamp(32px, 5vw, 64px); border-radius: 0; }
.landing-header { flex-direction: row; align-items: center; justify-content: space-between; padding: calc(24px + var(--safe-top)) 60px 24px; }
.landing-weather-chip { width: auto; }
.landing-main { flex-direction: row; align-items: center; justify-content: space-between; gap: 40px; padding: 20px 60px; }
.landing-hero-text { flex: 1; max-width: 460px; }
.landing-title { font-size: 46px; }
.landing-login-card { flex-shrink: 0; max-width: 380px; }
.landing-footer { justify-content: flex-start; padding: 16px 60px 26px; }
.se-player-row { flex-wrap: nowrap; }
.se-net { flex-basis: auto; margin-left: 8px; }
.pe-mode-card { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pe-mode-btn { flex: 0 0 auto; }
.pe-list-head { align-items: baseline; }
.setup-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
.hg-grid { height: 100%; padding: 20px; grid-template-columns: clamp(75%, 42vw, 25%) 1fr; }
.hg-col-left { overflow-y: auto; padding-right: 2px; } .hg-col-right { height: 100%; }
}
@media (min-width: 1000px) { .setup-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1201px) { .app-header { padding-left: 32px; padding-right: 32px; } .layout-grid { padding: 32px 40px 40px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
.login-scorit { text-align: center; }
.login-scorit img { height: 36px; }
input:user-invalid { border-color: #c00; }
.form-check-input:checked { background-color: #198754; border-color: #198754; }
.form-check-input:focus { border-color: #157347; box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); }
.is-tournament { position: absolute; right: 20px; top: 20px; padding-left: 0 !important; }
.score-app { padding: 0 20px; padding-bottom: 40px; }
.bg-card { background: var(--gc-white) !important; border: 1px solid var(--gc-border) !important; border-radius: var(--radius-sm); overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.btn-hole { height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; font-size: 0.8rem; border-radius: 8px; transition: all 0.2s ease-in-out; background-color: var(--gc-green) !important; color: var(--gc-white) !important; }
.btn-hole:hover { transform: translateY(-2px); }
.btn-hole.active, .btn-active { background-color: var(--gc-green-light) !important; border-color: var(--gc-green) !important; }
.scorecard-table th, .scorecard-table td { text-align: center; vertical-align: middle; font-size: 0.825rem; white-space: nowrap; }
.sticky-col { left: 0; z-index: 5; }
.badge { background: transparent; }
.badge-eagle  { background: #f59e0b; color: #000; }
.badge-birdie { background: #22c55e; color: #fff; }
.badge-par    { background: #334155; color: #fff; }
.badge-bogey  { background: #f97316; color: #fff; }
.badge-double { background: #ef4444; color: #fff; }
.badge-triple { background: #7f1d1d; color: #fff; }
.btn-preset { font-size: 0.72rem; padding: 4px 6px; font-weight: 600; }
.player-card { border-left: 4px solid #198754; transition: border-color 0.3s ease; }
.sync-badge { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3px; }
.custom-device-marker { background: transparent; border: none; }
.device-marker { display: flex; flex-direction: column; align-items: center; width: 80px; color: black; }
.device-marker img { display: block; width: 32px; height: 32px; object-fit: contain; }
.device-marker span { display: block; font-size: 11px; background: #ffffff; padding: 2px 5px; border-radius: 3px; white-space: nowrap; }

.map-layout { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .map-layout { grid-template-columns: minmax(0, 1fr) 320px; height: 600px; }}
@media (min-width: 1200px) { .map-layout { grid-template-columns: minmax(0, 1fr) 360px; }}
.map-wrap { position: relative; min-height: 360px; overflow: hidden; }
#map { width: 100%; height: 100%; min-height: 360px; }

.car-panel { display: flex; flex-direction: column; min-height: 0; background: #fff; overflow: hidden; }
.car-search { display: flex; align-items: center; gap: 8px;	padding: 10px 12px;	border-bottom: 1px solid #e5e7eb; }
.car-search i { color: #9ca3af; }
.car-search input { flex: 1; border: 0; outline: 0; font-size: 14px; background: transparent; }

.car-list {	flex: 1; margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.car-item { display: flex; align-items: stretch; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .15s; }
.car-item:hover { background: #f8fafc; }
.car-id { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 64px; flex-shrink: 0; padding-right: 12px; border-right: 1px solid #e5e7eb; font-weight: 600; font-size: 13px; }
.car-id i { font-size: 22px; color: #16a34a; }
.car-players { flex: 1; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: 13px; }
.car-players li.empty { color: #cbd5e1; }
.car-empty { padding: 20px; text-align: center; color: #94a3b8; font-size: 13px; }

[x-cloak] { display: none !important; }

a.disabled { pointer-events: none; opacity: 0.5; cursor: not-allowed; }

/* Rasio sama dengan panel foto scorecard A1 (420.5 x 594 mm) */
.viewfinder {
	position: relative;
	width: min(100%, calc(62vh * 0.708));
	aspect-ratio: 420.5 / 594;
	margin: 0 auto;
	background: #0b1510;
	border-radius: var(--radius);
	overflow: hidden;
	border: 2px solid var(--gc-border);
}
.vf-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf-media.mirror { transform: scaleX(-1); }
.vf-badge {
	position: absolute; top: 10px; left: 10px; z-index: 3;
	background: rgba(26, 58, 42, 0.88); color: var(--gc-gold-light);
	font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.guide-oval {
	position: absolute; left: 21%; top: 9%; width: 58%; aspect-ratio: 3 / 4;
	border: 2px dashed rgba(232, 201, 122, 0.95); border-radius: 50%;
	box-shadow: 0 0 0 999px rgba(10, 23, 15, 0.38);
	pointer-events: none;
}
.guide-hint {
	position: absolute; left: 0; right: 0; bottom: 14px; text-align: center;
	color: var(--gc-cream); font-size: 12px; font-weight: 600; pointer-events: none;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.vf-overlay {
	position: absolute; inset: 0; display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: 12px;
	padding: 24px; text-align: center; color: var(--gc-cream); font-size: 13px;
	background: rgba(10, 23, 15, 0.82); z-index: 2;
}
.vf-overlay i { font-size: 34px; color: var(--gc-gold); }
.countdown {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	font-family: 'Cormorant Garamond', serif; font-size: 140px; font-weight: 700;
	color: var(--gc-gold-light); text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
	pointer-events: none; z-index: 3;
}

.cam-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 16px; }
.shutter {
	width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--gc-gold);
	background: var(--gc-white); box-shadow: inset 0 0 0 4px var(--gc-green);
	cursor: pointer; transition: transform .1s;
}
.shutter:active { transform: scale(0.92); }
.shutter:disabled { opacity: .4; cursor: default; }
.round-btn {
	width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gc-border);
	background: var(--gc-white); color: var(--gc-green); font-size: 18px;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.round-btn.active { background: var(--gc-gold-light); border-color: var(--gc-gold); }

/* strip kandidat foto */
.cand-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; }
.cand {
	position: relative; flex: 0 0 auto; width: 60px; aspect-ratio: 420.5 / 594;
	border: 2px solid var(--gc-border); border-radius: 8px; overflow: hidden;
	padding: 0; background: var(--gc-cream-dark); cursor: pointer;
}
.cand img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cand.viewing { outline: 2px solid var(--gc-green-light); outline-offset: 1px; }
.cand.selected { border-color: var(--gc-gold); }
.cand-check {
	position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; border-radius: 50%;
	background: var(--gc-gold); color: var(--gc-green); font-size: 11px;
	display: flex; align-items: center; justify-content: center;
}
.cand-num {
	position: absolute; left: 4px; top: 2px; font-size: 10px; font-weight: 700; color: #fff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.pl-item {
	display: flex; align-items: center; gap: 12px; padding: 10px;
	border: 1.5px solid var(--gc-border); border-radius: var(--radius-sm);
	background: var(--gc-white); cursor: pointer; margin-bottom: 10px;
}
.pl-item.active { border-color: var(--gc-gold); background: rgba(201, 168, 76, 0.10); }
.pl-thumb {
	width: 48px; height: 68px; border-radius: 8px; flex-shrink: 0; overflow: hidden;
	background: var(--gc-cream-dark); display: flex; align-items: center; justify-content: center;
	color: var(--gc-text-muted); font-size: 20px;
}
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; }


.car-online {
	text-align: center;
	border-bottom: 1px solid var(--gc-border);
	font-size: 14px;
	padding: 4px 0;
}

.badge.badge-danger {
	background: var(--gc-danger);
	color: var(--gc-white);
}

.badge.badge-warning {
	background: var(--gc-gold-light);
	color: var(--gc-text);
}

.status-flag {
	position: absolute;
	top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.status-flag.active {
	background-color: var(--gc-green-light);
}

.status-flag.inactive {
	background: var(--gc-danger);
}

.status-flag.warning {
    background: var(--gc-gold-light);
}
