/* Golf Sniper — hipponotes/tabtastic design language with green as the primary. */
:root {
	--page: #e7ddc8;
	--surface: #fbf7ee;
	--surface-dim: #f3ecdc;
	--surface-veil: #ded2b9;
	--primary: #2f6b3f; /* fairway green */
	--primary-soft: #4b8a5c;
	--primary-tint: rgba(47, 107, 63, 0.1);
	--secondary: #213d2e; /* forest green */
	--rose: #c98b97;
	--anchor: #232323;
	--ink: #2c2721;
	--ink-soft: #6f665a;
	--ink-faint: #a2988a;
	--hairline: rgba(35, 35, 35, 0.12);
	--danger: #b03636;
	--ok: #2f7d4f;
	--serif: "Iowan Old Style", "Palatino", "Palatino Linotype", Georgia, "Times New Roman", serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 18px;
	--radius-sm: 12px;
	--radius-pill: 999px;
	--shadow: 0 1px 2px rgba(35, 35, 35, 0.06), 0 6px 18px rgba(35, 35, 35, 0.07);
}
* { box-sizing: border-box; }
html, body, #root { margin: 0; min-height: 100%; background: var(--page); }
html, body { overflow-x: clip; }
body {
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
a { color: var(--primary); }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, select {
	font: inherit;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--hairline);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--primary-soft); outline-offset: 1px; border-color: transparent; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border-radius: var(--radius-pill); padding: 12px 22px; font-weight: 600;
	text-decoration: none; transition: filter 0.12s ease, transform 0.05s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn:hover { filter: brightness(1.06); }
.btn-primary { background: var(--primary); color: var(--surface); }
.btn-secondary { background: var(--secondary); color: var(--surface); }
.btn-quiet { background: var(--surface-dim); color: var(--ink-soft); }
.btn-outline { background: transparent; border: 1.5px solid var(--ink-faint); color: var(--ink); }
.btn-danger { background: var(--danger); color: var(--surface); }
.btn-sm { padding: 7px 16px; font-size: 14px; }
.btn-big { font-size: 20px; padding: 18px 28px; width: 100%; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.hint { color: var(--ink-soft); font-size: 15px; }
.error-text { color: var(--danger); font-size: 15px; margin: 0; }
.loading { text-align: center; padding: 80px; color: var(--ink-faint); font-size: 32px; }

/* top bar */
.topbar {
	background: var(--anchor); color: var(--surface);
	display: flex; align-items: center; gap: 12px;
	padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
	padding-top: calc(10px + env(safe-area-inset-top, 0px));
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; font-weight: 600; flex: 1; white-space: nowrap; }
.topbar .brand img { width: 30px; height: 30px; border-radius: 9px; }
.topbar .who { font-size: 13px; color: rgba(251, 247, 238, 0.7); min-width: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .btn { white-space: nowrap; flex: none; }
.topbar .btn-quiet { background: rgba(255, 255, 255, 0.12); color: var(--surface); }

.main { max-width: 620px; margin: 0 auto; padding: 20px 16px 60px; }
.page-title { font-size: 30px; margin: 6px 0 18px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.question { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 12px; }
.section + .section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--hairline); }

/* landing */
.landing { max-width: 460px; margin: 0 auto; padding: 40px 20px 80px; }
.landing-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.landing-brand img { width: 44px; height: 44px; border-radius: 12px; }
.landing-brand h1 { font-size: 34px; }
.auth-tabs { display: flex; gap: 6px; background: var(--surface-dim); border-radius: var(--radius-pill); padding: 4px; margin-bottom: 18px; }
.auth-tabs button { flex: 1; border-radius: var(--radius-pill); padding: 10px; font-weight: 600; color: var(--ink-soft); }
.auth-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.auth-form, .form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label, .form label { font-size: 14px; font-weight: 600; color: var(--ink-soft); display: block; margin: 4px 2px 0; line-height: 1.3; }
.auth-form label { margin-bottom: -6px; }
.landing-copy { margin-top: 44px; color: var(--ink-soft); }
.landing-copy h2 { color: var(--ink); font-size: 22px; margin-bottom: 8px; }
.landing-hero { display: block; width: 160px; height: 160px; border-radius: 40px; margin: 44px auto 0; box-shadow: var(--shadow); }

/* course buttons */
.course-list { display: flex; flex-direction: column; gap: 12px; }

/* calendar */
.cal { background: var(--surface-dim); border-radius: var(--radius-sm); padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head .month { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.cal-head button { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); font-size: 18px; }
.cal-head button:disabled { opacity: 0.3; box-shadow: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-faint); padding: 4px 0; }
.cal-day {
	aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-weight: 600; font-size: 16px; background: var(--surface); color: var(--ink);
}
.cal-day.off { background: var(--surface-veil); color: var(--ink-faint); cursor: default; font-weight: 400; }
.cal-day.blank { background: transparent; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--rose); }
.cal-day.sel { background: var(--primary); color: var(--surface); }
.cal-day:not(.off):not(.sel):hover { background: var(--primary-tint); }

/* time wheel = hour + minute selects side by side */
.wheel { display: flex; gap: 8px; align-items: center; }
.wheel select { width: auto; flex: 1; text-align: center; font-size: 22px; font-family: var(--serif); padding: 10px 8px; appearance: none; -webkit-appearance: none; background-image: none; }
.wheel .colon { font-size: 26px; font-weight: 700; color: var(--ink-faint); }
.wheel-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.wheel-row label { margin: 0 2px; }

/* players */
.player-row { display: flex; gap: 8px; align-items: center; }
.player-row .num { width: 28px; text-align: center; color: var(--ink-faint); font-weight: 600; }
.player-row select {
	width: 48px; flex: none; padding: 12px 0; text-align: center; text-align-last: center;
	appearance: none; -webkit-appearance: none; background: var(--surface-dim); color: var(--ink-soft); font-weight: 700;
}

/* pending snipes: expandable rows with a trash icon on the right */
.snipe-list { display: flex; flex-direction: column; gap: 10px; }
.snipe { background: var(--surface-dim); border-radius: var(--radius-sm); }
.snipe-head { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 4px; }
.snipe-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 10px 8px; text-align: left; border-radius: var(--radius-sm); }
.snipe-title:hover { background: rgba(35, 35, 35, 0.04); }
.snipe-title .grow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.snipe-title .when { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.chev { display: inline-block; width: 18px; text-align: center; font-size: 22px; color: var(--ink-faint); transition: transform 0.15s ease; }
.snipe.open .chev { transform: rotate(90deg); }
.trash { flex: none; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.trash:hover { background: rgba(176, 54, 54, 0.1); color: var(--danger); }
.snipe-body { padding: 0 16px 14px 42px; }
.players { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.player { display: flex; align-items: center; gap: 10px; }
.player .num { width: 22px; height: 22px; border-radius: 50%; background: var(--primary-tint); color: var(--primary); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.snipe .detail { color: var(--ink-soft); font-size: 14px; }
.pill { display: inline-block; border-radius: var(--radius-pill); padding: 2px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.pill.booked { background: var(--ok); color: var(--surface); }
.pill.failed { background: var(--danger); color: var(--surface); }
.pill.running { background: var(--surface-veil); color: var(--ink-soft); }

.done { text-align: center; padding: 30px 10px; }
.done .big { font-size: 56px; margin-bottom: 10px; }
.done h2 { font-size: 26px; margin-bottom: 10px; }
.done p { color: var(--ink-soft); }
.done strong { color: var(--ink); }

/* labels inside a booking section sit in plain block flow (no flex gap) */
.form .section label { margin: 12px 2px 4px; }

/* the three time questions: each one boxed with its wheel so the pairing is unmistakable */
.time-block {
	background: var(--surface-dim);
	border-radius: var(--radius-sm);
	padding: 16px 16px 18px;
	border-top: none !important;
}
.time-block + .time-block { margin-top: 12px; padding-top: 16px; }
.time-block .question { font-size: 20px; }
.time-block .wheel select { background: var(--surface); }

/* course password: a text field masked by CSS so password managers leave it alone */
.masked { -webkit-text-security: disc; }
.secret-row { display: flex; gap: 8px; align-items: center; }
.secret-row input { flex: 1; }
.secret-row .btn { flex: none; }

/* bot outcomes */
.snipe .detail-good { color: var(--ok); font-weight: 600; }
.snipe .detail-bad { color: var(--danger); font-weight: 600; }

/* callout between the calendar and the time wheels */
.section.note { border-top: none !important; padding: 12px 16px; margin-top: 16px; background: var(--primary-tint); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); }
.section.note p { margin: 0; color: var(--ink); font-size: 15px; }
.section.note strong { color: var(--primary); }

/* segmented control (walking / 1 cart / 2 carts) */
.seg { display: flex; gap: 4px; background: var(--surface-dim); border-radius: var(--radius-pill); padding: 4px; }
.seg-btn { flex: 1; border-radius: var(--radius-pill); padding: 12px 8px; font-weight: 600; color: var(--ink-soft); }
.seg-btn.active { background: var(--primary); color: var(--surface); box-shadow: var(--shadow); }
.seg-btn:not(.active):hover { background: var(--surface); }
