/* ===== GolfGutu — new design (Fink tokens) ===== */
:root{
  --sun-pale:#FFF9DF;
  --white:#FFFFFF;
  --earth:#F3E9DD;
  --earth-deep:#EADBCA;
  --forest:#1C483A;
  --ink:#21292B;
  --gray-600:#727065;
  --gray-300:#D5D5D5;
  --rust:#BF5412;
  --rust-dark:#612807;
  --lime-bg:#D9EBD0;
  --lime-ink:#21451F;
  --sun-bg:#EFE3B0;
  --sun-ink:#4B4A35;
  --blush-bg:#FCE5DB;
  --error-bg:#FCE0E1;
  --ondark:#FFF9DF;
  --shadow:0 0 10px 4px rgba(28,72,58,.06);
}
*{box-sizing:border-box}
html,body{ height:100%; overscroll-behavior-y:none; }
body{
  margin:0; background:var(--forest); color:var(--ink);
  font-family:"Hanken Grotesk",-apple-system,system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.serif{ font-family:"Source Serif 4",Georgia,serif; }
.mono{ font-family:"Sometype Mono",ui-monospace,monospace; }
.eyebrow{ font-family:"Sometype Mono",ui-monospace,monospace; font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--gray-600); }
.eyebrow.on-dark{ color:rgba(255,249,223,.6); }

.stage{ display:flex; justify-content:center; min-height:100%; background:var(--forest); }
.phone{ width:100%; max-width:428px; background:var(--sun-pale); position:relative; display:flex; flex-direction:column; height:100vh; height:100dvh; overflow:hidden; }

/* header */
.gg-header{ background:var(--forest); color:var(--ondark); padding:calc(env(safe-area-inset-top,0px) + 6px) 24px 20px; transition:padding .16s ease; flex:0 0 auto; }
.gg-header.collapsed{ padding:calc(env(safe-area-inset-top,0px) + 4px) 24px 12px; }
.gg-header-row{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.gg-title{ font-family:"Source Serif 4",Georgia,serif; font-weight:300; font-size:40px; line-height:1.06; letter-spacing:.005em; margin:0; transition:font-size .16s ease; }
.gg-header.collapsed .gg-title{ font-size:21px; letter-spacing:.01em; }
.gg-sub{ margin-top:6px; font-size:13.5px; color:rgba(255,249,223,.66); transition:opacity .16s ease,height .16s ease; }
.gg-header.collapsed .gg-sub{ display:none; }
.gg-header.collapsed .gg-header-row{ align-items:center; }
.gg-round-chip{ font-family:"Sometype Mono",ui-monospace,monospace; font-size:10px; color:rgba(255,249,223,.75); white-space:nowrap; }

.gg-main{ flex:1 1 auto; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:20px 20px calc(env(safe-area-inset-bottom,0px) + 96px); }
@media (min-width:768px){ .phone{ max-width:480px; margin:0 auto; } }

.gg-section-label{ font-family:"Sometype Mono",ui-monospace,monospace; font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--gray-600); margin:24px 2px 12px; }
.gg-section-label:first-child{ margin-top:2px; }
.gg-section-label.row{ display:flex; justify-content:space-between; align-items:baseline; }
.gg-section-label .right{ color:var(--rust); font-weight:500; text-transform:none; letter-spacing:0; font-size:12px; font-family:"Hanken Grotesk",sans-serif; }

.gg-card{ background:var(--white); border-radius:16px; box-shadow:var(--shadow); padding:16px 17px; }
.gg-card.pad-lg{ border-radius:20px; padding:22px 22px 18px; }
.gg-card + .gg-card{ margin-top:10px; }

.gg-green{ background:var(--forest); color:var(--ondark); border-radius:20px; padding:22px 22px 18px; position:relative; overflow:hidden; }
.gg-green .divider{ border-top:1px solid rgba(255,249,223,.18); margin:14px 0; }

.gg-earth{ background:var(--earth); border-radius:16px; padding:14px 16px; }

.divider{ border-top:1px solid var(--gray-300); margin:14px 0; }

/* buttons */
.gg-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:999px; font-family:"Hanken Grotesk",sans-serif; font-weight:500; font-size:15px; padding:15px 20px; border:none; cursor:pointer; min-height:44px; transition:transform .12s ease; }
.gg-btn:active{ transform:scale(.97); }
.gg-btn.block{ display:flex; width:100%; }
.gg-btn.primary{ background:var(--rust); color:var(--ondark); }
.gg-btn.dark{ background:var(--forest); color:var(--ondark); padding:17px 20px; }
.gg-btn.outline{ background:transparent; border:1.5px solid var(--forest); color:var(--forest); }
.gg-btn.outline-rust{ background:transparent; border:1.5px solid var(--rust); color:var(--rust); }
.gg-btn.outline-light{ background:transparent; border:1.5px solid rgba(255,249,223,.5); color:var(--ondark); }
.gg-btn.lime{ background:var(--lime-bg); color:var(--lime-ink); }
.gg-btn.ghost{ background:transparent; border:none; color:var(--rust); font-size:12px; font-weight:500; padding:6px 4px; min-height:0; }
.gg-btn.sm{ padding:10px 14px; font-size:13px; }
.gg-btn:disabled{ opacity:.5; pointer-events:none; }
.gg-btn svg{ width:16px; height:16px; flex:0 0 auto; }

.gg-stepper{ width:56px; height:56px; border-radius:50%; border:1.5px solid var(--forest); background:transparent; display:flex; align-items:center; justify-content:center; color:var(--forest); font-size:22px; cursor:pointer; }
.gg-stepper:active{ transform:scale(.95); }

/* pills / chips */
.gg-pill{ display:inline-block; border-radius:999px; padding:5px 12px; font-size:11px; font-weight:600; }
.gg-pill.open{ background:var(--lime-bg); color:var(--lime-ink); }
.gg-pill.settled{ background:var(--earth); color:var(--rust-dark); }
.gg-chip{ display:inline-block; border-radius:999px; padding:7px 14px; font-weight:600; font-size:13px; }
.gg-chip.eagle{ background:var(--sun-bg); color:var(--sun-ink); }
.gg-chip.birdie{ background:var(--lime-bg); color:var(--lime-ink); }
.gg-chip.par{ background:var(--earth); color:var(--rust-dark); }
.gg-chip.bogey,.gg-chip.dobbel,.gg-chip.blowup{ background:var(--blush-bg); color:var(--rust-dark); }

/* tab bar */
.gg-tabbar{ flex:0 0 auto; display:grid; grid-template-columns:repeat(5,1fr); background:rgba(255,249,223,.94); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border-top:1px solid var(--gray-300); padding:10px 8px 4px; position:relative; }
.gg-tab{ background:none; border:none; display:flex; flex-direction:column; align-items:center; gap:5px; padding:4px 0; color:var(--gray-600); font-family:"Hanken Grotesk",sans-serif; font-weight:500; font-size:10.5px; cursor:pointer; }
.gg-tab svg{ width:23px; height:23px; }
.gg-tab.active{ color:var(--rust); }
.gg-home-indicator{ height:16px; display:flex; align-items:center; justify-content:center; background:rgba(255,249,223,.94); }
.gg-home-indicator span{ width:134px; height:5px; border-radius:3px; background:rgba(28,72,58,.25); display:block; }

/* leaderboard rows (Tavla) */
.gg-lb-card{ background:var(--white); border-radius:16px; box-shadow:var(--shadow); padding:15px 17px; }
.gg-lb-card + .gg-lb-card{ margin-top:10px; }
.gg-lb-row1{ display:flex; align-items:baseline; gap:10px; }
.gg-lb-rank{ font-family:"Sometype Mono",ui-monospace,monospace; font-size:14px; color:var(--gray-600); width:20px; flex:0 0 auto; }
.gg-lb-name{ font-family:"Source Serif 4",Georgia,serif; font-size:21px; color:var(--forest); flex:1; }
.gg-lb-total{ font-family:"Sometype Mono",ui-monospace,monospace; font-size:20px; }
.gg-track{ height:4px; border-radius:3px; background:var(--earth-deep); margin-top:11px; overflow:hidden; }
.gg-track > div{ height:100%; background:var(--forest); border-radius:3px; }
.gg-lb-foot{ display:flex; justify-content:flex-end; margin-top:6px; font-family:"Sometype Mono",ui-monospace,monospace; font-size:11px; color:var(--gray-600); }

/* market */
.gg-splitbar{ height:6px; border-radius:3px; background:var(--earth-deep); overflow:hidden; display:flex; margin-top:12px; }
.gg-splitbar .ja{ background:var(--forest); }
.gg-splitbar .nei{ background:var(--rust); }
.gg-pool-labels{ display:flex; justify-content:space-between; margin-top:6px; font-family:"Sometype Mono",ui-monospace,monospace; font-size:12px; }
.gg-pool-labels .ja{ color:var(--forest); }
.gg-pool-labels .nei{ color:var(--rust); }
.gg-claim{ font-family:"Source Serif 4",Georgia,serif; font-size:21px; line-height:1.25; color:var(--forest); margin-top:8px; }
.gg-stakers{ margin-top:12px; border-top:1px solid var(--gray-300); padding-top:10px; }
.gg-staker-row{ display:flex; justify-content:space-between; padding:5px 0; font-size:13px; }
.gg-staker-row .side-ja{ color:var(--forest); }
.gg-staker-row .side-nei{ color:var(--rust); }
.gg-add-market{ border:1.5px dashed var(--gray-300); border-radius:20px; padding:18px 20px; text-align:center; color:var(--forest); font-weight:500; background:transparent; width:100%; cursor:pointer; margin-top:10px; }

/* misc */
.gg-avatar{ width:30px; height:30px; border-radius:50%; background:var(--lime-bg); color:var(--lime-ink); display:inline-flex; align-items:center; justify-content:center; font-weight:600; font-size:12px; flex:0 0 auto; }
.gg-activity-row{ display:flex; align-items:center; gap:10px; padding:13px 4px; border-bottom:1px solid rgba(213,213,213,.7); }
.gg-activity-row:last-child{ border-bottom:none; }
.gg-activity-row svg{ width:16px; height:16px; flex:0 0 auto; color:var(--forest); opacity:.75; }
.gg-activity-row .txt{ flex:1; font-size:13.5px; line-height:1.45; }
.gg-activity-row .time{ font-family:"Sometype Mono",ui-monospace,monospace; font-size:11px; color:var(--gray-600); }
.gg-field{ display:block; font-size:12.5px; color:var(--gray-600); margin-top:12px; }
.gg-field input, .gg-field select, .gg-field textarea{
  display:block; width:100%; margin-top:6px; border:1px solid var(--gray-300); border-radius:12px; padding:12px 13px;
  font-family:"Hanken Grotesk",sans-serif; font-size:16px; background:var(--white); color:var(--ink);
}
.gg-hint{ font-size:12px; color:var(--gray-600); margin-top:8px; line-height:1.5; }
.gg-empty{ text-align:center; padding:30px 10px; color:var(--gray-600); font-size:13.5px; }

/* live pulse */
.gg-live-dot{ width:7px; height:7px; border-radius:50%; background:var(--rust); display:inline-block; animation:gg-glow 1.8s ease-in-out infinite; }
@keyframes gg-glow{ 0%,100%{ box-shadow:0 0 0 0 rgba(191,84,18,0); } 50%{ box-shadow:0 0 0 10px rgba(191,84,18,.14); } }
@media (prefers-reduced-motion:reduce){ .gg-live-dot{ animation:none; } }

/* hole progress dots */
/* Hull-prikkene er knapper: 22px høyt trykkfelt rundt en 5px strek, så de
   treffes med tommelen midt i en runde uten å ta mer plass visuelt. */
.gg-holedots{ display:flex; gap:4px; margin:8px 0; }
.gg-holedots button{ flex:1; height:22px; padding:0; border:none; background:none;
  cursor:pointer; position:relative; -webkit-tap-highlight-color:transparent; }
.gg-holedots button::after{ content:''; position:absolute; left:0; right:0; top:50%;
  transform:translateY(-50%); height:5px; border-radius:3px; background:var(--earth-deep);
  transition:height .12s ease, background .12s ease; }
.gg-holedots button.played::after{ background:var(--forest); }
.gg-holedots button.current::after{ background:var(--rust); height:9px; }
.gg-holedots button:focus-visible{ outline:2px solid var(--rust); outline-offset:1px; border-radius:4px; }
@media (prefers-reduced-motion:reduce){ .gg-holedots button::after{ transition:none; } }

/* Fram og tilbake ett hull — brede trykkflater, i motsetning til prikkene. */
.gg-holenav{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 12px; }
.gg-holenav button{ flex:0 0 auto; min-height:44px; padding:10px 16px; border:1px solid var(--gray-300);
  background:var(--white); color:var(--forest); border-radius:999px; font-family:"Hanken Grotesk",sans-serif;
  font-size:14px; font-weight:500; cursor:pointer; transition:transform .12s ease; }
.gg-holenav button:active:not(:disabled){ transform:scale(.97); }
.gg-holenav button:disabled{ opacity:.35; cursor:default; }
.gg-holenav button:focus-visible{ outline:2px solid var(--rust); outline-offset:2px; }
.gg-holenav span{ font-size:12.5px; color:var(--gray-600); font-variant-numeric:tabular-nums; }
@media (prefers-reduced-motion:reduce){ .gg-holenav button{ transition:none; } }

/* celebration overlay */
/* Feiringer — fire nivåer. Uttrykket skalerer med sjeldenheten: birdien er
   kort og lav, acen tar hele skjermen. */
.gg-celebrate{ position:fixed; inset:0; background:rgba(28,72,58,.93); color:var(--ondark);
  display:flex; align-items:center; justify-content:center; text-align:center;
  padding:32px; z-index:50; overflow:hidden; animation:gg-fade .22s ease both; }
.gg-celebrate-inner{ position:relative; z-index:1; }
.gg-confetti{ position:absolute; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; }
.gg-celebrate .eyebrow{ color:rgba(255,249,223,.6); }
.gg-celebrate h2{ font-family:"Source Serif 4",Georgia,serif; font-weight:300; font-size:42px;
  margin:12px 0 10px; line-height:1.05; text-wrap:balance;
  animation:gg-pop .44s cubic-bezier(.2,.7,.3,1) both; }
.gg-celebrate p{ font-size:14.5px; color:rgba(255,249,223,.85); margin:0;
  animation:gg-rise .5s ease .14s both; }
.gg-celebrate-tap{ margin-top:26px; font-family:"Sometype Mono",ui-monospace,monospace;
  font-size:10px; letter-spacing:.14em; text-transform:uppercase;
  color:rgba(255,249,223,.35); animation:gg-rise .5s ease .5s both; }

/* Birdie: dempet. Den kommer ofte nok til at en stor produksjon blir slitsom. */
.gg-celebrate.niv-birdie h2{ font-size:38px; color:var(--lime-bg); }

/* Eagle og albatross: gull, og et mykt lys bak. */
.gg-celebrate.niv-eagle h2,
.gg-celebrate.niv-albatross h2{ color:#E4C767; font-size:48px; }
.gg-celebrate.niv-eagle::before,
.gg-celebrate.niv-albatross::before{ content:''; position:absolute; inset:0;
  background:radial-gradient(circle at 50% 46%, rgba(228,199,103,.22), transparent 62%);
  animation:gg-fade .6s ease both; }
.gg-celebrate.niv-albatross h2{ font-size:52px; }

/* Hole in one: en gang i livet. Mørkere grunn, gullring som pulserer. */
.gg-celebrate.niv-ace{ background:rgba(12,38,29,.96); }
.gg-celebrate.niv-ace h2{ font-size:clamp(34px,10vw,54px); color:#E4C767;
  letter-spacing:.02em; font-weight:400; }
.gg-celebrate.niv-ace p{ color:rgba(255,249,223,.92); font-size:16px; }
.gg-celebrate.niv-ace::before{ content:''; position:absolute; left:50%; top:50%;
  width:min(78vw,340px); aspect-ratio:1; margin:-1px 0 0 -1px; transform:translate(-50%,-50%);
  border-radius:50%; border:1px solid rgba(228,199,103,.5);
  animation:gg-ring 2.6s cubic-bezier(.2,.7,.3,1) infinite; }
.gg-celebrate.niv-ace::after{ content:''; position:absolute; inset:0;
  background:radial-gradient(circle at 50% 46%, rgba(228,199,103,.3), transparent 66%);
  animation:gg-fade .8s ease both; }

@keyframes gg-fade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes gg-pop{ 0%{ opacity:0; transform:scale(.86); } 60%{ transform:scale(1.04); } 100%{ opacity:1; transform:scale(1); } }
@keyframes gg-rise{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:translateY(0); } }
@keyframes gg-ring{ 0%{ transform:translate(-50%,-50%) scale(.5); opacity:0; }
  22%{ opacity:.85; } 100%{ transform:translate(-50%,-50%) scale(1.28); opacity:0; } }

@media (prefers-reduced-motion:reduce){
  .gg-celebrate, .gg-celebrate h2, .gg-celebrate p, .gg-celebrate-tap,
  .gg-celebrate::before, .gg-celebrate::after{ animation:none; }
  .gg-celebrate.niv-ace::before{ display:none; }
}

.gg-scrim{ position:fixed; inset:0; background:rgba(28,72,58,.45); display:flex; align-items:flex-end; justify-content:center; z-index:40; }
.gg-sheet{ width:100%; max-width:428px; background:var(--white); border-radius:22px 22px 0 0; padding:20px 18px calc(env(safe-area-inset-bottom,0px) + 20px); max-height:82vh; max-height:82dvh; overflow-y:auto; box-shadow:var(--shadow); }
.gg-sheet h3{ font-family:"Source Serif 4",Georgia,serif; font-weight:400; font-size:22px; margin:0 0 4px; color:var(--forest); }

.gg-toast{ position:fixed; left:50%; transform:translateX(-50%); bottom:calc(env(safe-area-inset-bottom,0px) + 90px); background:var(--forest); color:var(--ondark); padding:10px 18px; border-radius:999px; font-size:13px; z-index:60; box-shadow:var(--shadow); }

/* velkomstskjerm — dekker appen helt for den som ikke er logget inn, i stedet
   for et innloggingsark oppå en tavle man ikke har kontekst for ennå */
.gg-velkommen{ position:fixed; inset:0; background:var(--forest); color:var(--ondark);
  display:flex; align-items:center; justify-content:center; z-index:45;
  padding:32px 26px calc(env(safe-area-inset-bottom,0px) + 32px); overflow-y:auto; }
.gg-vel-inner{ width:100%; max-width:380px; }
.gg-velkommen .eyebrow{ color:rgba(255,249,223,.55); }
.gg-velkommen h1{ font-family:"Source Serif 4",Georgia,serif; font-weight:300;
  font-size:clamp(40px,13vw,54px); line-height:1; margin:10px 0 16px; }
.gg-vel-lead{ font-size:15.5px; line-height:1.55; color:rgba(255,249,223,.82); margin:0; }
.gg-vel-status{ font-family:"Sometype Mono",ui-monospace,monospace; font-size:12.5px;
  color:rgba(255,249,223,.5); margin:14px 0 0; }

.gg-vel-steg{ margin-top:26px; padding:16px 18px; border-radius:16px;
  background:rgba(255,249,223,.07); border:1px solid rgba(255,249,223,.16); }
.gg-vel-steg .eyebrow{ color:#E4C767; }
.gg-vel-steg p{ font-size:14.5px; line-height:1.5; margin:8px 0 0; color:rgba(255,249,223,.88); }
.gg-vel-hvorfor{ font-size:13px !important; color:rgba(255,249,223,.55) !important; }
.gg-velkommen .gg-btn.ghost{ color:var(--ondark); border:1px solid rgba(255,249,223,.3); background:transparent; }

/* sesongoppsummering */
.gg-finished{ display:flex; align-items:center; gap:12px; margin-bottom:4px; }
.gg-finished > div{ flex:1; }

.gg-champ{ text-align:center; padding:26px 22px 24px; }
.gg-champ svg{ display:block; margin:0 auto 10px; }
.gg-champ .eyebrow{ color:rgba(255,249,223,.6); }
.gg-champ-name{ font-size:34px; font-weight:300; line-height:1.1; margin:8px 0 6px; color:var(--ondark); }
.gg-champ-sub{ font-size:13px; color:rgba(255,249,223,.8); }

.gg-podium-row{ display:flex; align-items:baseline; gap:10px; padding:8px 0; }
.gg-podium-row + .gg-podium-row{ border-top:1px solid var(--gray-300); }
.gg-podium-medal{ width:22px; flex:0 0 auto; font-size:15px; text-align:center; }
.gg-podium-name{ font-family:"Source Serif 4",Georgia,serif; font-size:18px; color:var(--forest); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gg-podium-pts{ font-size:14px; color:var(--ink); white-space:nowrap; }
.gg-podium-kr{ font-size:13px; color:var(--rust); white-space:nowrap; min-width:66px; text-align:right; }

.gg-stats{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.gg-stat{ background:var(--white); border-radius:16px; box-shadow:var(--shadow); padding:14px 15px; }
.gg-stat-label{ font-family:"Sometype Mono",ui-monospace,monospace; font-size:9.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--gray-600); }
.gg-stat-value{ font-size:21px; color:var(--forest); margin-top:6px; line-height:1.15; }
.gg-stat-sub{ font-size:12px; color:var(--gray-600); margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
