/* Smriti: mobile first. Big text, big tap targets, calm colours. */
:root {
  --bg: #fbf7f1; --card: #ffffff; --ink: #2b2420; --muted: #6f655d;
  --accent: #7a4a2b; --accent-ink: #ffffff; --line: #e8dfd4; --soft: #f3ebe0; --danger: #a33a2a;
  --tap: 52px; --radius: 16px;
  font-size: 19px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1d1916; --card: #29231f; --ink: #f4ede6; --muted: #b5a99e; --accent: #e0a77d; --accent-ink: #1d1916; --line: #3d3530; --soft: #332c27; --danger: #ff8a75; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Kannada", "Noto Sans Devanagari", "Noto Sans Tamil", sans-serif;
  line-height: 1.45; padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
main { max-width: 640px; margin: 0 auto; padding: 8px 16px 24px; }
h1 { font-size: 1.6rem; margin: .4em 0; }
h2 { font-size: 1.15rem; margin: 1.4em 0 .5em; color: var(--muted); font-weight: 600; }
a { color: var(--accent); }
small, .muted { color: var(--muted); }
.center { text-align: center; }
.big { font-size: 1.25rem; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); max-width: 640px; margin: 0 auto; }
.brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--accent); }
.today { color: var(--muted); }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; text-decoration: none; color: var(--muted); font-size: .72rem; gap: 2px; }
.tabs a span { font-size: 1.4rem; line-height: 1; }
.tabs a[aria-current] { color: var(--accent); font-weight: 700; }

.hero { text-align: center; padding: 12px 0 4px; }
.hero h1 { font-size: 2.4rem; margin: 0; }
.hero p { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.flash { background: var(--soft); border-radius: 12px; padding: 12px 16px; }
.badge { font-size: .7em; font-style: normal; background: var(--soft); color: var(--muted); border-radius: 8px; padding: 2px 8px; vertical-align: middle; }
.is-hidden { opacity: .6; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 22px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.danger { background: var(--danger); color: #fff; }
.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; padding: 8px; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: var(--tap); padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.row span { color: var(--muted); }
.row .value { color: var(--ink); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.row form { margin: 0; }

.person { display: flex; gap: 14px; align-items: center; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 8px 0; text-decoration: none; color: var(--ink); }
.person img, .noface { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.noface { display: flex; align-items: center; justify-content: center; background: var(--soft); font-size: 1.8rem; color: var(--muted); }
.person span { color: var(--muted); }
.person strong { color: var(--ink); font-size: 1.1rem; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.stack { display: grid; gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--accent); font-size: 2rem; text-align: center; padding: 12px; }
.tile span { color: var(--ink); font-size: 1rem; font-weight: 600; }
.tile.wide { flex-direction: row; justify-content: flex-start; min-height: 76px; gap: 16px; padding: 12px 20px; }

.head { display: flex; justify-content: space-between; align-items: center; }

.form label { display: block; margin: 14px 0; font-weight: 600; }
.form input:not([type=checkbox]), .form textarea, .form select, .search input {
  display: block; width: 100%; margin-top: 6px; min-height: var(--tap); padding: 10px 14px; font: inherit; font-weight: 400;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
}
.form input[type=file] { padding: 12px; }
.form .check { display: flex; gap: 12px; align-items: center; font-weight: 400; min-height: var(--tap); margin: 4px 0; }
.form .check input { width: 26px; height: 26px; flex: none; }
.form .btn { width: 100%; margin-top: 10px; }
.form details, fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin: 14px 0; }
.form summary, .danger summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two label { margin: 0; }
.photo-pick input { background: var(--soft) !important; }

.search { display: flex; gap: 8px; align-items: flex-end; }
.search input { margin: 0; }

.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.faces figure { margin: 0; text-align: center; }
.faces img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.faces figcaption { color: var(--muted); font-size: .9rem; }
.faces form { margin: 0; }

.recall { text-align: center; }
.recall .clue { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; }
.clue-text { font-size: 2rem; font-weight: 700; margin: 24px 0 8px; }
.reveal summary { list-style: none; margin: 16px auto; }
.reveal summary::-webkit-details-marker { display: none; }
.reveal[open] summary { display: none; }
.answer { font-size: 1.3rem; }
.choices { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.clue { width: 100%; border-radius: 12px; margin: 8px 0; }

.danger { margin: 28px 0; color: var(--muted); }
.danger p { font-size: .95rem; }
