/* Forever and Always — calm, warm, readable. Mobile-first, read in bed at night. */
:root {
  --bg: #faf7f0;
  --card: #ffffff;
  --ink: #3a2f26;
  --ink-soft: #6b5d4f;
  --accent: #7a5c43;
  --accent-deep: #5d4531;
  --accent-soft: #f0e7d8;
  --gold: #b98a3e;
  --line: #e6dccb;
  --good: #4f7a52;
  --warn: #a8792f;
  --low: #8a5a44;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 0 0 96px 0;
  background: var(--bg); color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px; line-height: 1.65;
}
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em 0; font-weight: 600; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em 0; }
a { color: var(--accent-deep); }
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 18px 40px 18px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin: 0 0 18px 0;
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
.tag {
  display: inline-block; background: var(--accent-soft); color: var(--accent-deep);
  border-radius: 999px; padding: 4px 14px; font-size: .85rem; margin: 0 6px 6px 0;
}
/* Big tap targets — every answer option is a full-width button */
.btn, button.btn, input[type=submit].btn {
  display: block; width: 100%;
  font-family: inherit; font-size: 1.15rem; line-height: 1.4;
  padding: 18px 16px; margin: 10px 0;
  border-radius: var(--radius); cursor: pointer;
  border: 2px solid var(--accent); background: var(--card); color: var(--ink);
  text-align: left; min-height: 60px;
}
.btn:active, .btn:hover { background: var(--accent-soft); }
.btn.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff8ee; }
.btn.primary:active, .btn.primary:hover { background: var(--accent); }
.btn.ghost { border-color: var(--line); color: var(--ink-soft); }
.btn.center { text-align: center; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { margin: 6px 0; }
.scale5 .btn { text-align: center; font-size: 1.3rem; padding: 16px 8px; }
textarea, input[type=text], input[type=password] {
  width: 100%; font-family: inherit; font-size: 1.1rem; line-height: 1.6;
  padding: 16px; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); margin: 8px 0;
}
textarea { min-height: 160px; }
label.flabel { display: block; font-weight: 600; margin: 18px 0 4px 0; font-size: 1.05rem; }
/* Progress */
.progress { background: var(--line); border-radius: 999px; height: 14px; overflow: hidden; margin: 10px 0; }
.progress > div { background: var(--accent); height: 100%; border-radius: 999px; }
/* Score bars */
.bar { background: #efe8d9; border-radius: 8px; height: 22px; position: relative; margin: 8px 0 4px 0; }
.bar > div { background: var(--accent); height: 100%; border-radius: 8px; }
.barlabel { display: flex; justify-content: space-between; font-size: .95rem; }
.band { font-weight: 700; }
/* Bottom nav */
nav.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--card); border-top: 2px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 6px 2px calc(8px + env(safe-area-inset-bottom)) 2px;
}
nav.bottom a {
  flex: 1; text-align: center; text-decoration: none; color: var(--ink-soft);
  font-size: .82rem; padding: 10px 2px; border-radius: 10px; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
nav.bottom a .ico { font-size: 1.35rem; line-height: 1; }
nav.bottom a.active { color: var(--accent-deep); font-weight: 700; background: var(--accent-soft); }
/* Flash messages */
.flash { background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 14px 18px; margin: 0 0 18px 0; }
/* Tables */
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
/* Checkbox rows for the dev checklist */
.checkrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checkrow input[type=checkbox] { width: 30px; height: 30px; margin-top: 4px; flex: none; }
.phasehead { background: var(--accent-soft); border-radius: 10px; padding: 10px 16px; margin: 26px 0 6px 0; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ritual { text-align: center; padding: 26px 18px; }
.ritual .words { font-size: 1.5rem; font-style: italic; margin-bottom: 14px; }
.done-mark { color: var(--good); font-weight: 700; }
.waiting { color: var(--warn); font-weight: 600; }
.foot-note { font-size: .9rem; color: var(--ink-soft); border-top: 1px solid var(--line);
  padding-top: 14px; margin-top: 22px; }
.cite { font-size: .92rem; color: var(--ink-soft); }
.cite a { color: var(--accent-deep); word-break: break-all; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .pillars { grid-template-columns: 1fr; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
select { font-size: 1.05rem; padding: 12px; border-radius: 10px; border: 2px solid var(--line); width: 100%; }
.offline-banner { position: sticky; top: 0; z-index: 60; background: #4a3b2c; color: #fff8ee; padding: 10px 14px; text-align: center; font-weight: 600; font-size: .95rem; }
.celebrate { background: var(--accent-soft); border: 2px solid var(--good); border-radius: 10px; padding: 10px 14px; font-weight: 600; color: var(--ink); }
button.queued, .btn.queued { outline: 3px dashed var(--warn); outline-offset: 2px; }
