/* Fewest Shots shared styles: the header, tabs, Board, You, menu and result screen used by
   every game. Each game's index.html adds its own styles for its play area. */
:root{
  --hall:#13222A; --slate:#1B2F38; --line:#2A4450;
  --felt:#1E6B52; --felt-lite:#3B9A76; --walnut:#6B4429;
  --brass:#D2A54A; --chalk:#6FA8DC; --ivory:#F3ECDD; --muted:#93A9A6;
  --cond:"Barlow Condensed","Arial Narrow",sans-serif;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
html,body{margin:0;min-height:100%;background:var(--hall);color:var(--ivory);
  font-family:"Barlow",system-ui,sans-serif;-webkit-tap-highlight-color:transparent}
button,input{font:inherit}
:focus-visible{outline:3px solid var(--chalk);outline-offset:2px}
.app{max-width:540px;margin:0 auto;padding:14px 14px calc(84px + env(safe-area-inset-bottom))}
header{display:flex;align-items:flex-end;justify-content:space-between;gap:10px}
h1{font-family:var(--cond);font-weight:700;font-size:38px;line-height:.9;margin:0;letter-spacing:.005em}
h1 span{color:var(--brass)}
.sub{margin:4px 0 0;color:var(--muted);font-size:14px}
header .right{display:flex;align-items:center;gap:6px 10px;align-self:flex-start;flex-wrap:wrap;justify-content:flex-end}
h1{white-space:nowrap}
.iconbtn{width:44px;height:44px;border-radius:12px;border:1px solid var(--line);background:var(--slate);color:var(--ivory);display:grid;place-items:center;cursor:pointer;padding:0}
.iconbtn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.chip.test{background:var(--brass);cursor:pointer;user-select:none;-webkit-user-select:none}
.chip{font-size:13px;color:var(--hall);background:var(--chalk);border-radius:999px;padding:3px 10px;font-weight:600;white-space:nowrap}

.hud{display:flex;align-items:center;gap:20px;margin:14px 2px 10px}
.hud .v{font-family:var(--cond);font-weight:700;font-size:32px;line-height:1;display:block}
.hud .l{font-size:13px;color:var(--muted)}


/* Start card over the game before play, and the focused layout while playing */
.start{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px;pointer-events:none}
.start > *{pointer-events:auto}
.start .eyebrow{margin:0 0 4px;color:var(--ivory);opacity:.75}
.start h2{font-family:var(--cond);font-size:48px;line-height:1;margin:0 0 6px}
.start h2 span{color:var(--brass)}
.start .info{margin:0 0 20px;color:var(--ivory);opacity:.85}
.btn.play{display:inline-flex;align-items:center;gap:10px;font-size:20px;padding:14px 28px;border-radius:999px;box-shadow:0 6px 20px rgba(0,0,0,.35)}
.btn.play svg{width:16px;height:16px;fill:currentColor}
body.playing header,body.playing nav{display:none}
body.playing .app{max-width:900px;padding:8px 6px calc(10px + env(safe-area-inset-bottom))}
body.playing .hud{margin:2px 4px 8px}
.hint{text-align:center;color:var(--muted);font-size:14px;margin:10px 0 0;min-height:20px}
.row{display:flex;justify-content:center;gap:10px;margin-top:10px}

.btn{border:0;border-radius:10px;padding:11px 18px;font-weight:600;cursor:pointer;background:var(--slate);color:var(--ivory)}
.btn.primary{background:var(--brass);color:#2A1D08}
.btn.ghost{background:transparent;border:1px solid var(--line)}

nav{position:fixed;left:0;right:0;bottom:0;background:var(--slate);border-top:1px solid var(--line);
  display:flex;justify-content:center;padding:6px 10px calc(6px + env(safe-area-inset-bottom));z-index:5}
nav button{flex:0 1 160px;border:0;padding:4px 0;background:transparent;color:var(--muted);cursor:pointer;
  display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
nav svg{width:44px;height:30px;padding:5px 12px;border-radius:999px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
nav button[aria-current="page"]{color:var(--ivory)}
nav button[aria-current="page"] svg{background:var(--felt);color:var(--ivory)}

/* Board and You */
.eyebrow{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin:22px 0 6px;font-weight:600}
.view h2{font-family:var(--cond);font-size:44px;line-height:1;margin:0 0 14px}
.view h2 span{color:var(--brass)}
.view h3{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin:26px 0 10px;font-weight:600}
.card{background:var(--slate);border:1px solid var(--line);border-radius:16px}
.profile{display:flex;align-items:center;gap:14px;padding:16px}
.avatar{width:54px;height:54px;border-radius:14px;background:var(--felt);display:grid;place-items:center;font-size:28px;flex:none}
.profile b{display:block;font-size:22px}
.tag{display:inline-block;margin-top:4px;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 9px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:8px}
.stats div{background:var(--slate);border:1px solid var(--line);border-radius:12px;padding:12px 6px;text-align:center}
.stats b{display:block;font-family:var(--cond);font-size:30px;line-height:1}
.stats span{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.settings{padding:14px 16px}
.settings label{display:block;font-weight:600;margin-bottom:8px}
.dist{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;font-size:14px}
.dist .bar{background:var(--brass);color:#2A1D08;border-radius:4px;padding:2px 8px;min-width:26px;font-weight:600;text-align:right}
.dist .bar.zero{background:var(--line);color:var(--muted)}
.strip{display:grid;grid-template-columns:repeat(14,1fr);gap:4px}
.strip div{aspect-ratio:1;border-radius:50%;border:1px solid var(--line)}
.strip .under{background:var(--brass);border-color:var(--brass)}
.strip .par{background:var(--felt-lite);border-color:var(--felt-lite)}
.strip .over{background:#4C6974;border-color:#4C6974}
.strip .today{outline:2px solid var(--chalk);outline-offset:2px}
.legend{display:flex;gap:14px;font-size:13px;color:var(--muted);margin-top:8px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:5px;vertical-align:-1px}
.board{list-style:none;padding:0;margin:0;overflow:hidden}
.board li{display:flex;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line)}
.board li:last-child{border-bottom:0}
.board li{align-items:center}
.board .left{display:flex;align-items:center;gap:10px;min-width:0}
.board .rank{color:var(--muted);min-width:1.6em}
.board .who{display:flex;flex-direction:column;min-width:0}
.board .who b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board .who small{font-size:12px;color:var(--muted);font-weight:400}
.board .score{display:flex;flex-direction:column;align-items:flex-end;text-align:right}
.board .score small{font-size:12px;color:var(--muted);font-weight:400}
.handle{display:block;font-size:13px;color:var(--muted);margin-top:2px}
.board li.me{color:var(--brass);font-weight:600}
.note{font-size:13px;color:var(--muted);margin:0 0 8px}
.count{margin-top:24px;color:var(--muted);text-align:center}
.count b{font-family:var(--cond);font-size:24px;color:var(--ivory);display:block}

/* Menu */
.menu{position:fixed;inset:0;background:var(--hall);z-index:20;overflow-y:auto}
.menu-inner{max-width:540px;margin:0 auto;padding:18px 14px calc(30px + env(safe-area-inset-bottom))}
.menu-top{display:flex;justify-content:space-between;align-items:flex-start}
.menu .eyebrow{margin:6px 0 6px}
.menu h2{font-family:var(--cond);font-size:44px;line-height:1;margin:0 0 20px}
.menu h2 span{color:var(--brass)}
.menu ul{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.menu li a{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:17px 4px;border-bottom:1px solid var(--line);color:var(--ivory);text-decoration:none;font-size:19px;font-weight:600}
.menu li a span{font-size:14px;font-weight:400;color:var(--muted);text-align:right}
.menu li a:hover span{color:var(--ivory)}
.menu ul.games{margin-bottom:22px}
.homeLink{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0 0 18px;padding:14px 16px;border-radius:14px;background:var(--felt);color:var(--ivory);text-decoration:none;font-size:19px;font-weight:600}
.homeLink span{font-size:14px;font-weight:400;opacity:.85;text-align:right}
.menu ul + .eyebrow{margin-top:0}
.menu-foot{display:flex;justify-content:center;gap:22px;margin-top:20px;font-size:14px}
.menu-foot a{color:var(--muted);text-decoration:none}
.menu-foot a:hover{color:var(--ivory);text-decoration:underline}

/* Result sheet */
.overlay{position:fixed;inset:0;background:rgba(8,16,20,.72);display:flex;align-items:flex-end;justify-content:center;z-index:10}
.overlay[hidden]{display:none}
.sheet{background:var(--slate);width:100%;max-width:540px;border-radius:20px 20px 0 0;padding:22px 20px calc(22px + env(safe-area-inset-bottom))}
@media (min-width:600px){.overlay{align-items:center}.sheet{border-radius:20px}}
.sheet .big{font-family:var(--cond);font-size:56px;font-weight:700;line-height:1;margin:0}
.sheet .rel{color:var(--brass);font-weight:600;margin:4px 0 12px}
.sheet .log{font-size:20px;letter-spacing:2px;word-break:break-all;margin:0 0 16px}
.sheet label{display:block;font-size:14px;margin:14px 0 6px}
.field{width:100%;padding:11px 12px;border-radius:10px;border:1px solid var(--line);background:var(--hall);color:var(--ivory)}
.field:disabled{opacity:.6}
.sheet .row{justify-content:flex-start;flex-wrap:wrap}
.sheet .coffee{margin:18px 0 0;padding-top:14px;border-top:1px solid var(--line)}
.bmc{display:inline-block;line-height:0;border-radius:10px}
.bmc img{height:44px;width:auto}
.menu-bmc{text-align:center;margin-top:24px}
.menu-bmc .note{margin-bottom:10px}
.acct{display:flex;gap:8px}
.acct .field{flex:1}
.sheet .note,.acct-note{margin-top:8px}
.settings .field + label{margin-top:12px}
.settings .row{justify-content:flex-start;flex-wrap:wrap;margin-top:12px}
.settings .note:first-child{margin-top:0}
#googleBtn{min-height:44px;margin-bottom:6px}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;letter-spacing:.14em;text-transform:uppercase;margin:12px 0}
.or::before,.or::after{content:"";flex:1;border-top:1px solid var(--line)}
