:root {
  --olive-dark: #2e3a1c;
  --olive: #3a4a26;
  --olive-mid: #47552b;
  --cream: #f8f2e2;
  --cream-2: #fbf3e4;
  --field: #eee6cf;
  --terracotta: #b5652b;
  --muted: #8a8266;
  --mono-label: #8a5a20;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--olive-mid);
  font-family: 'Public Sans', sans-serif;
  color: var(--olive);
}

.frame { position: relative; min-height: 100dvh; }

.leaf-corner {
  position: fixed;
  width: 26vw; height: 26vw;
  max-width: 140px; max-height: 140px;
  overflow: hidden;
  z-index: 8;
  pointer-events: none;
}
/* Never anchor top/bottom right at the true viewport edge — a mobile
   browser's own address bar / toolbar overlays exactly that area whenever
   it's expanded (always true right after load, in a plain browser tab).
   These fixed offsets are generous enough to clear that in every state,
   so the corners look the same whether it's a browser tab or the installed
   home-screen app. Left/right are unaffected by browser chrome, so those
   keep a small edge-bleed for the organic torn-leaf look. */
.leaf-corner.top { top: calc(78px + env(safe-area-inset-top)); }
.leaf-corner.bottom { bottom: calc(78px + env(safe-area-inset-bottom)); }
.leaf-corner.left { left: -2vw; }
.leaf-corner.right { right: -2vw; }

.page-scroll {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: calc(28px + env(safe-area-inset-top)) 18px calc(48px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--cream);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(20, 26, 12, 0.22);
}

.card h1, .card h2 { margin: 0 0 4px; color: var(--olive); }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mono-label);
  text-transform: uppercase;
  margin: 0 0 6px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--terracotta);
  color: var(--cream-2);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  box-shadow: 0 6px 14px rgba(181, 101, 43, 0.4);
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--olive);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(58, 74, 38, 0.3);
  text-decoration: none;
  cursor: pointer;
}

.corner-icon {
  position: fixed;
  top: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(248, 242, 226, 0.55);
  box-shadow: 0 3px 8px rgba(15, 20, 8, 0.2);
  display: flex; align-items: center; justify-content: center;
  z-index: 9;
  text-decoration: none;
  color: var(--olive);
}
.corner-icon.left { left: 16px; }
.corner-icon.right { right: 16px; }

.start-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding: 32px;
  position: relative;
  z-index: 1;
}
.start-screen p { font-size: 17px; color: var(--cream); max-width: 320px; margin: 0; }
.start-screen .notice { color: #f1c9a4; font-size: 14px; max-width: 300px; }

.ticker {
  background: var(--field);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
}
.ticker .empty { color: var(--muted); font-style: italic; font-size: 14px; margin: 0; }
.ticker .entry { font-size: 14px; }
.ticker .entry b { color: var(--olive); }

.catch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(71, 85, 43, 0.2);
  font-size: 14px;
}
.catch-row:last-child { border-bottom: none; }
.catch-empty { color: var(--muted); font-style: italic; font-size: 14px; }

form.admin-login {
  display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 0 auto;
}
form.admin-login input {
  padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(58,74,38,0.3); font-size: 15px;
}
.error-text { color: #a8391f; font-size: 14px; margin: 0; }

.admin-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-list li { display: flex; justify-content: space-between; align-items: center; }

@media (min-width: 520px) {
  .page-scroll { max-width: 480px; margin: 0 auto; }
}
