:root {
  --bg: #F6F3EE;
  --card: #FFFFFF;
  --ink: #1D1B18;
  --muted: #7A746B;
  --line: #E7E1D8;
  --accent: #FF8A3D;
  --ok: #2FA66A;
  --bad: #E2554B;
  --pending: #F2B530;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(60,40,10,.07);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", sans-serif;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 40px max(20px, env(safe-area-inset-left));
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select { font: inherit; color: inherit; }
.wrap { max-width: 1100px; margin: 0 auto; }
h1 { font-size: 28px; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 22px; margin: 28px 0 12px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px;
  background: var(--ink); color: #fff; font-weight: 600;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--bad); }
.btn.sm { min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 14px; font-weight: 600; background: var(--bg); }
.pill.pending { background: #FFF3D1; color: #8A6200; }
.pill.ok { background: #DDF3E6; color: #1C6E45; }
.pill.bad { background: #FBE1DF; color: #9B2C24; }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 16px; font-weight: 600;
  opacity: 0; transition: .25s ease; pointer-events: none; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.family-gate { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: 16px; }
.family-gate form { width: 100%; max-width: 360px; padding: 28px; text-align: center; }
.family-gate h1 { font-size: 24px; margin-top: 8px; }
.family-gate input { width: 100%; text-align: center; font-size: 22px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; margin: 14px 0; background: var(--bg); -webkit-user-select: text; user-select: text; }
.family-gate .err { color: var(--bad); font-weight: 600; min-height: 1em; margin-bottom: 0; }
