:root {
  --olive: #1A2214;
  --olive-2: #263020;
  --olive-3: #343F28;
  --sand: #F4F1EA;
  --card: #FFFFFF;
  --line: #E2DDCD;
  --line-2: #CFC9B6;
  --muted: #5C6450;
  --gold: #D4A73A;
  --gold-text: #7A5A0E;
  --cream-text: #D8D3C4;
  --danger: #A3361F;
  --warn-bg: #E9E1CB;
  --warn-text: #3B2808;
  --stencil: 'Big Shoulders Stencil Display', 'Barlow Condensed', sans-serif;
  --body: Barlow, system-ui, -apple-system, sans-serif;
  --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%; }
body { background: var(--sand); color: var(--olive); font-family: var(--body); font-size: 16px; -webkit-font-smoothing: antialiased; }
#app { max-width: 520px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; background: var(--sand); }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--gold-text); }
h1, h2 { font-family: var(--stencil); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin: 0; line-height: 1.02; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }
.page { flex: 1; padding: calc(24px + var(--safe-top)) 20px 28px; display: flex; flex-direction: column; gap: 18px; }
.page.with-nav { padding-bottom: calc(96px + var(--safe-bottom)); }
.dark { background: var(--olive); color: var(--sand); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 14px; border: none; font-weight: 600; font-size: 17px; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-gold { background: var(--gold); color: var(--olive); }
.btn-dark { background: var(--olive); color: var(--sand); }
.btn-outline { background: transparent; border: 2px solid var(--line-2); color: var(--olive); }
.dark .btn-outline { border-color: #5C684F; color: var(--sand); }
.btn-text { background: none; border: none; color: var(--gold-text); font-weight: 600; min-height: 44px; padding: 0 6px; cursor: pointer; }
.btn-danger-text { background: none; border: none; color: var(--danger); font-weight: 600; min-height: 44px; padding: 0 6px; cursor: pointer; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: inherit; border-radius: 12px; }

/* Forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.input, textarea.input, select.input { min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 16px; font-weight: 400; width: 100%; }
textarea.input { resize: vertical; line-height: 1.4; }
.input:focus { outline: 3px solid rgba(212,167,58,.45); border-color: var(--gold-text); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.seg { display: flex; background: #E9E5D8; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 44px; border: none; border-radius: 9px; background: transparent; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--olive); color: var(--sand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.check input { width: 22px; height: 22px; accent-color: var(--olive); flex-shrink: 0; margin: 0; }
.error { background: #F6DCD4; color: #5E1A0C; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.notice { background: var(--warn-bg); color: var(--warn-text); border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.notice svg { flex-shrink: 0; margin-top: 1px; }

/* Progress */
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress > div { height: 100%; background: var(--gold); }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1.5px solid var(--line-2); background: #fff; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--olive); color: var(--sand); border-color: var(--olive); font-weight: 600; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.card-pad { padding: 12px 14px; }
.avatar { width: 38px; height: 38px; border-radius: 19px; background: #C9B27C; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; color: var(--olive); }
.post-photo { width: 100%; display: block; background: #D9D4C3; min-height: 160px; object-fit: cover; max-height: 520px; }
.post-body { margin: 0; padding: 0 14px 12px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-top: 1px solid #ECE8DC; font-size: 14px; color: var(--muted); }
.post-actions button { background: none; border: none; min-height: 44px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; font-size: 14px; }
.post-actions button[aria-pressed="true"] { color: var(--gold-text); font-weight: 600; }
.badge { font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--gold-text); }

/* Wall header */
.wall-head { background: var(--olive); color: var(--sand); padding: calc(18px + var(--safe-top)) 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.wall-head .brand { font-family: var(--stencil); font-weight: 800; font-size: 20px; letter-spacing: 2px; text-transform: uppercase; }
.recruit-avatar { width: 64px; height: 64px; border-radius: 32px; background: var(--olive-3); border: 3px solid var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--stencil); font-weight: 800; font-size: 24px; flex-shrink: 0; }
.recruit-name { font-family: var(--stencil); font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; }
.gold { color: var(--gold); }

/* Countdown */
.countdown { background: var(--olive); color: var(--sand); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.cd-cells { display: flex; gap: 10px; }
.cd-cell { flex: 1; background: var(--olive-2); border-radius: 12px; padding: 10px 0; display: flex; flex-direction: column; align-items: center; }
.cd-num { font-family: var(--stencil); font-weight: 800; font-size: 40px; line-height: 1; }
.cd-label { font-size: 12px; color: var(--cream-text); }
.cd-bar { height: 8px; border-radius: 4px; background: var(--olive-3); overflow: hidden; }
.cd-bar > div { height: 100%; background: var(--gold); }

/* Timeline */
.tl-item { display: flex; gap: 14px; align-items: stretch; }
.tl-rail { display: flex; flex-direction: column; align-items: center; width: 22px; flex-shrink: 0; }
.tl-dot { width: 22px; height: 22px; border-radius: 11px; border: 2px solid #A7A08C; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tl-dot.done { background: var(--olive-3); border-color: var(--olive-3); color: var(--sand); }
.tl-dot.now { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px #EED9A4; }
.tl-line { width: 2px; flex: 1; min-height: 22px; background: var(--line-2); }
.tl-line.done { background: var(--olive-3); }
.tl-text { padding-bottom: 16px; display: flex; flex-direction: column; gap: 2px; }
.tl-title { font-weight: 600; font-size: 16px; }

/* Bottom nav */
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; display: flex; justify-content: space-around; background: #fff; border-top: 1px solid var(--line); padding: 6px 8px calc(8px + var(--safe-bottom)); z-index: 10; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; min-height: 48px; justify-content: center; text-decoration: none; color: var(--muted); font-size: 12px; }
.nav a[aria-current="page"] { color: var(--olive); font-weight: 600; }

/* Splash */
.splash { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: calc(56px + var(--safe-top)) 32px calc(36px + var(--safe-bottom)); background: var(--olive); color: var(--sand); }
.splash img { width: 180px; height: 180px; border-radius: 40px; display: block; }
.splash h1 { font-size: 50px; letter-spacing: 3px; line-height: .95; }

/* Lists */
.list-row { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.section-label { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-text); }

.code-card { background: var(--olive); color: var(--sand); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.code { font-family: var(--stencil); font-weight: 800; font-size: 44px; letter-spacing: 4px; line-height: 1; }

.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom)); transform: translateX(-50%); background: var(--olive); color: var(--sand); padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: 90vw; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.photo-pick { height: 220px; border-radius: 16px; background: #D9D4C3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 15px; cursor: pointer; overflow: hidden; position: relative; border: 2px dashed var(--line-2); }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.splash .btn-outline, .code-card .btn-outline { border-color: #5C684F; color: var(--sand); }
a.chip { display: inline-flex; align-items: center; text-decoration: none; color: var(--olive); }
a.chip[aria-pressed="true"] { color: var(--sand); }
/* Keep the phone status bar area dark so its light text stays readable */
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--olive); z-index: 100; pointer-events: none; }
