:root {
  --green: #1E4D3A;
  --green-dark: #173D2E;
  --sand: #E9D9B8;
  --ground: #F6F2EA;
  --card: #FFFFFF;
  --ink: #1B1F1D;
  --muted: #5B6460;
  --line: #ECE6DA;
  --link: #0A5F86;
  --on-green: #F6F2EA;
  --on-green-muted: #CFDAD3;
  --danger: #A33A2B;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--ink); font-family: 'Archivo', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body { overscroll-behavior: none; }
#app { min-height: 100%; max-width: 560px; margin: 0 auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); }
h1, h2, h3 { margin: 0; }
.narrow { font-family: 'Archivo Narrow', 'Archivo', sans-serif; }
.boot { min-height: 100vh; display: grid; place-items: center; background: var(--green); color: var(--on-green); font-family: 'Archivo Narrow', sans-serif; font-size: 40px; font-weight: 700; }

/* full-screen green pages */
.splash { min-height: 100vh; min-height: 100dvh; background: var(--green); color: var(--on-green); padding: calc(56px + var(--safe-top)) 24px calc(36px + var(--safe-bottom)); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.splash.center { text-align: center; align-items: center; }
.eyebrow { margin: 0; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--sand); }
.splash h1 { font-family: 'Archivo Narrow', sans-serif; font-size: 72px; line-height: .95; font-weight: 700; }
.splash .lede { margin: 0; font-size: 16px; line-height: 1.5; color: #E3EAE5; }
.splash .small { margin: 0; font-size: 13px; color: var(--on-green-muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.center { align-items: center; }
.cd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 420px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 4px; border-radius: 14px; background: var(--green-dark); }
.cd-num { font-family: 'Archivo Narrow', sans-serif; font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-lbl { font-size: 12px; color: var(--on-green-muted); }
.field-label { font-size: 15px; font-weight: 600; }
.input { height: 52px; border-radius: 12px; border: 1px solid #C9C2B4; padding: 0 16px; font-size: 17px; background: #fff; color: var(--ink); width: 100%; }
.splash .input { border: 0; }
.input.code { font-size: 24px; letter-spacing: .3em; }
.btn { height: 54px; border-radius: 12px; border: 0; font-size: 17px; font-weight: 700; cursor: pointer; width: 100%; padding: 0 16px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-sand { background: var(--sand); color: var(--green); }
.btn-green { background: var(--green); color: var(--on-green); }
.btn-outline { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn-sm { height: 44px; font-size: 15px; width: auto; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.text-btn { align-self: flex-start; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--link); font-size: 16px; cursor: pointer; }
.splash .text-btn { color: var(--sand); }
.error { margin: 0; font-size: 14px; color: #FFD7CF; }
.error.dark { color: var(--danger); }

/* main shell */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { background: var(--green); color: var(--on-green); padding: calc(18px + var(--safe-top)) 20px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; z-index: 5; }
.topbar .eyebrow { font-size: 12px; }
.topbar h2 { font-family: 'Archivo Narrow', sans-serif; font-size: 30px; line-height: 1.1; }
.offline { font-size: 12px; color: var(--sand); }
.content { flex: 1; padding: 18px 16px calc(96px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: #fff; border-top: 1px solid #E2DBCC; padding: 6px 4px calc(10px + var(--safe-bottom)); z-index: 10; }
.tab { height: 52px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 500; }
.tab .bar { width: 22px; height: 3px; border-radius: 2px; background: transparent; }
.tab.active { color: var(--green); font-weight: 700; }
.tab.active .bar { background: var(--green); }

.card { background: var(--card); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.card.list { padding: 4px 16px; gap: 0; }
.card-btn { text-align: left; border: 0; cursor: pointer; color: var(--ink); width: 100%; }
.card h3 { font-size: 17px; font-weight: 700; }
.muted { color: var(--muted); }
.sm { font-size: 14px; }
.xs { font-size: 13px; }
.row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.row:last-child { border-bottom: 0; }
.row.between { justify-content: space-between; align-items: center; }
.row .time { width: 64px; flex-shrink: 0; font-weight: 700; color: var(--green); }
.hero { background: var(--green); color: var(--on-green); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.hero .eyebrow { font-size: 13px; }
.hero .title { font-family: 'Archivo Narrow', sans-serif; font-size: 28px; font-weight: 700; }
.daynav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.round-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid #C9C2B4; background: #fff; font-size: 20px; color: var(--green); cursor: pointer; }
.round-btn:disabled { opacity: .35; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--green); background: #fff; color: var(--green); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--green); color: var(--on-green); }
.course-name { font-family: 'Archivo Narrow', sans-serif; font-size: 24px; font-weight: 700; color: var(--green); }
.photo-ph { height: 170px; border-radius: 16px; background: #DCE5DF; display: grid; place-items: center; color: #3F4A45; font-size: 14px; overflow: hidden; }
.photo-ph img { width: 100%; height: 100%; object-fit: cover; }
.maps-btn { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 12px; background: var(--green); color: var(--on-green); font-weight: 700; font-size: 16px; text-decoration: none; }
table.sc { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sc th, table.sc td { padding: 8px 4px; text-align: center; border-bottom: 1px solid var(--line); }
table.sc th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.sc td:first-child, table.sc th:first-child { text-align: left; }
.scroll-x { overflow-x: auto; }
.lb-pos { width: 32px; font-weight: 700; color: var(--green); }
.lb-me { background: #F3EFE4; }
.entry { align-items: center; gap: 14px; padding: 22px 18px; }
.entry .hole { font-family: 'Archivo Narrow', sans-serif; font-size: 36px; font-weight: 700; color: var(--green); }
.stepper { display: flex; align-items: center; gap: 28px; }
.step { width: 64px; height: 64px; border-radius: 32px; border: 2px solid var(--green); background: #fff; color: var(--green); font-size: 30px; cursor: pointer; }
.step.plus { background: var(--green); color: var(--on-green); }
.strokes { font-size: 56px; font-weight: 700; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.holes-strip { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; width: 100%; }
.hs { height: 36px; border-radius: 8px; border: 1px solid #C9C2B4; background: #fff; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.hs.done { background: #E7EFE9; border-color: var(--green); }
.hs.cur { outline: 2px solid var(--green); outline-offset: 1px; }
.two { display: flex; gap: 10px; }
.two > * { flex: 1; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gallery button { padding: 0; border: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #DCE5DF; cursor: pointer; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 50; display: flex; flex-direction: column; justify-content: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; margin: 0 auto; }
.lightbox button { position: absolute; top: calc(12px + var(--safe-top)); right: 12px; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 0; background: #fff; color: var(--ink); font-weight: 700; }
.notice-date { font-size: 12px; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline .input { height: 44px; font-size: 15px; flex: 1; min-width: 80px; }
.input.sm { height: 44px; font-size: 15px; }
textarea.input { height: auto; min-height: 88px; padding: 12px 16px; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 44px; }
.toggle input { width: 22px; height: 22px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0 12px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; background: var(--sand); color: var(--green); }
