/* 1more24 — warm, calm, a little sunrise. */
:root {
  --bg: #f7f3ec;
  --card: #ffffff;
  --ink: #26323b;
  --muted: #6b7a86;
  --blue: #1f3864;
  --blue-dark: #12213d;
  --amber: #e08a00;
  --amber-soft: #fff3e0;
  --rose: #c0392b;
  --line: #e6ded2;
  --ok: #2e7d32;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(38, 50, 59, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, "Book Antiqua", "Palatino Linotype", "Times New Roman", serif;
  background: linear-gradient(180deg, #fdf8ef 0%, var(--bg) 240px);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--blue); }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: .3px; }
h1 { font-size: 1.7rem; }

/* ---------- nav ---------- */
.topnav {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 18px;
  background: var(--blue-dark);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.brand {
  color: #fff; text-decoration: none; font-size: 1.15rem; letter-spacing: .3px;
  display: inline-flex; align-items: center; gap: 8px;
}
.brand strong { color: #ffcf87; }
.brand-icon { height: 28px; width: 28px; border-radius: 7px; display: block; }
.navlinks { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; align-items: center; }
.navtop {
  color: #d8e7e4; text-decoration: none; padding: 6px 10px; border-radius: 8px;
  font-size: .93rem; background: none; border: 0; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.navtop:hover { background: rgba(255,255,255,.12); color: #fff; }
.navtop.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.navchev { font-size: .7rem; opacity: .8; transition: transform .15s ease; }
.navlinks a.locked { opacity: .55; }

/* dropdown groups — hover (or tap) opens the submenu below */
.navgroup { position: relative; }
.navmenu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 80; display: none;
  background: var(--blue-dark); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; padding: 6px; min-width: 214px;
  box-shadow: 0 10px 26px rgba(0,0,0,.30);
}
.navgroup:hover > .navmenu, .navgroup:focus-within > .navmenu, .navgroup.open > .navmenu { display: block; }
.navgroup.open > .navgbtn .navchev { transform: rotate(180deg); }
.navmenu a {
  display: block; color: #d8e7e4; text-decoration: none; padding: 9px 12px;
  border-radius: 7px; font-size: .95rem; white-space: nowrap;
}
.navmenu a:hover { background: rgba(255,255,255,.14); color: #fff; }
.navright { display: flex; align-items: center; gap: 8px; }
.daychip {
  background: #ffcf87; color: #5b3a00; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; font-size: .85rem;
}
.sos {
  background: var(--rose); color: #fff !important; font-weight: 700; text-decoration: none;
  padding: 5px 12px; border-radius: 8px; font-size: .9rem;
}
.sos:hover { background: #a53125; }
.gear { color: #d8e7e4; text-decoration: none; font-size: 1.05rem; padding: 4px 6px; }
.navvoice { background: none; border: 0; cursor: pointer; font: inherit; line-height: 1; }
.gear:hover, .navvoice:hover { color: #fff; opacity: .85; }

/* ---------- layout ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 22px 18px 60px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 14px 0; box-shadow: var(--shadow);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
@media (max-width: 820px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.lede { color: var(--muted); max-width: 62ch; }
.empty { padding: 10px 4px; }
.secthead { margin-top: 28px; }

/* ---------- flash ---------- */
.flash {
  padding: 10px 16px; border-radius: 10px; margin: 10px 0; font-weight: 500;
  background: #e8f2ef; border: 1px solid #bcd8d2; color: var(--blue-dark);
}
.flash.err { background: #fdecea; border-color: #f2b8b5; color: #8c2f28; }
.flash.celebrate { background: var(--amber-soft); border-color: #ffd9a0; color: #7a4b00; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 14px; border-radius: 10px; text-decoration: none; cursor: pointer;
  font-size: .95rem; font-family: inherit;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--blue-dark); color: #fff; }
.btn.danger { border-color: #e5b5b0; color: var(--rose); }
.btn.danger:hover { background: #fdecea; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--rose); }
.btn.big { padding: 12px 22px; font-size: 1.05rem; }
.btn.small { padding: 5px 10px; font-size: .85rem; }
.btn.tiny { padding: 2px 8px; font-size: .8rem; }
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .93rem; }
input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fffdf9;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9ec8c2; border-color: var(--blue); }
textarea { min-height: 84px; resize: vertical; }
textarea.short { min-height: 48px; }
.rowform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.rowform input, .rowform select { width: auto; flex: 1; min-width: 130px; }
.rowform input[type="date"] { flex: 0 0 150px; }
.rowform .narrow { flex: 0 1 170px; }
.rowform button { flex: 0 0 auto; }
.btnrow { display: flex; gap: 8px; margin-top: 10px; }
.inline { display: inline; }
.selrow { display: flex; gap: 14px; }
.selrow label { flex: 1; }

/* ---------- hero / landing ---------- */
.hero { text-align: center; padding: 44px 10px 10px; }
.hero h1 { margin: 0 0 22px; }
.hero-sun { font-size: 4rem; }
.hero-logo { width: 200px; max-width: 60vw; height: auto; border-radius: 22px; box-shadow: var(--shadow); }
.hero-sub { color: var(--muted); max-width: 56ch; margin: 16px auto 0; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- auth ---------- */
.authbox { max-width: 420px; margin: 50px auto; }

/* ---------- dashboard ---------- */
.today-hero { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 14px; }
@media (max-width: 900px) { .today-hero { grid-template-columns: 1fr; } }
.daycard { text-align: center; background: linear-gradient(160deg, #1f3864, #12213d); color: #fff; border: 0; }
.daynum { font-size: 2.6rem; font-weight: 800; font-family: Georgia, serif; }
.daysub { color: #cfe5e1; }
.daysub a { color: #ffcf87; }
.jftcard { background: var(--amber-soft); border-color: #ffd9a0; }
.jftcard h3 { margin-top: 0; color: #7a4b00; }
.jft { font-size: 1.05rem; font-style: italic; }
.checkcard h3 { margin-top: 0; }
.done-note { color: var(--ok); font-weight: 600; }
.streak { background: var(--amber-soft); border-radius: 999px; padding: 2px 10px; font-size: .85rem; color: #7a4b00; }
.streak.big { font-size: 1rem; vertical-align: middle; }
.milestone {
  background: linear-gradient(90deg, #ffcf87, #ffe9c6); border-radius: var(--radius);
  padding: 16px 20px; font-size: 1.2rem; font-weight: 700; color: #5b3a00; margin: 12px 0;
}

/* journey path */
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 0; }
.stop {
  display: flex; flex-direction: column; align-items: center; text-decoration: none;
  color: var(--muted); min-width: 64px; padding: 6px 2px; border-radius: 10px;
}
.stop:hover { background: #f2ede3; }
.stopnum {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: #e8e1d4; color: var(--muted); font-weight: 700;
}
.stop.in_progress .stopnum { background: var(--amber); color: #fff; }
.stop.complete .stopnum { background: var(--blue); color: #fff; }
.stop.current .stopnum { outline: 3px solid #ffcf87; }
.stoplabel { font-size: .68rem; margin-top: 3px; }
.pathline { flex: 0 0 6px; height: 2px; background: var(--line); }
.pathnote { margin-top: 8px; }

/* stats */
.statrow { display: flex; gap: 12px; }
.statrow.wide { margin-bottom: 6px; }
.stat { flex: 1; text-align: center; background: #faf6ee; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.statnum { font-size: 1.7rem; font-weight: 800; color: var(--blue-dark); }
.statlabel { font-size: .82rem; color: var(--muted); }
.quickacts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* goals */
.goal-list { list-style: none; padding: 0; margin: 0 0 8px; }
.goal-list li { padding: 7px 4px; border-bottom: 1px dashed var(--line); }
.goal-list li.overdue .due { color: var(--rose); font-weight: 700; }
.goal-list li.donegoal .goaltitle { text-decoration: line-through; color: var(--muted); }
.due { color: var(--muted); font-size: .85rem; margin-left: 6px; }
.checkbtn { border: 0; background: none; font-size: 1.15rem; cursor: pointer; color: var(--blue); }

/* ---------- steps ---------- */
.stepgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.stepcard {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.stepcard:hover { transform: translateY(-3px); border-color: var(--blue); }
.stepcard p { color: var(--muted); font-size: .9rem; }
.stepcard h3 { margin: 8px 0 4px; }
.stepcard-quote { margin: 10px 0 0; color: var(--ink); font-size: .96rem; line-height: 1.45; }
.stepcard-top { display: flex; align-items: center; gap: 8px; }
.stepnum {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #e8e1d4; font-weight: 800; color: var(--muted); flex: 0 0 30px;
}
.stepcard.complete .stepnum { background: var(--blue); color: #fff; }
.stepcard.in_progress .stepnum { background: var(--amber); color: #fff; }
.stepcard.current { outline: 3px solid #ffcf87; }
.virtue { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--amber); font-weight: 700; }
.donebadge { margin-left: auto; color: var(--ok); font-size: .8rem; font-weight: 700; }
.wipbadge { margin-left: auto; color: var(--amber); font-size: .8rem; font-weight: 700; }

/* step page */
.stephead { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.stephead-right { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.crumb { font-size: .85rem; color: var(--muted); }
.bignum {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue); color: #fff; font-family: Georgia, serif; margin-right: 4px;
}
.virtue-pill {
  font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: #7a4b00;
  background: var(--amber-soft); padding: 4px 10px; border-radius: 999px; vertical-align: middle;
}
.plainstep { font-size: 1.12rem; font-style: italic; color: var(--blue-dark); max-width: 60ch; }
.about p { max-width: 72ch; }
.reading { color: var(--muted); font-size: .9rem; border-top: 1px dashed var(--line); padding-top: 10px; }
.toolcard { border-left: 5px solid var(--amber); }
.promptcard { position: relative; }
.promptq { font-weight: 600; display: block; margin-bottom: 6px; }
.journal { min-height: 96px; }
.savestate { position: absolute; top: 12px; right: 16px; font-size: .78rem; color: var(--ok); }
.stepnav { display: flex; justify-content: space-between; margin-top: 22px; }

/* ---------- inventory / amends ---------- */
.tabs { display: flex; gap: 6px; margin: 14px 0 4px; flex-wrap: wrap; }
.tab {
  text-decoration: none; color: var(--muted); padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-weight: 600;
}
.tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.tab .count { opacity: .75; font-weight: 400; }
.guide { background: #f3efe6; }
.guide p, .guide li { max-width: 76ch; }
.guide-list li { margin: 8px 0; }
details.inv summary {
  cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 1.02rem;
  list-style: none; flex-wrap: wrap;
}
details.inv summary::-webkit-details-marker { display: none; }
details.inv summary::before { content: "▸"; color: var(--muted); }
details.inv[open] summary::before { content: "▾"; }
details.inv.made { opacity: .75; }
.inv-name { font-weight: 700; }
.chip {
  font-size: .74rem; background: #eee7da; color: var(--muted); border-radius: 999px;
  padding: 2px 9px; text-transform: lowercase;
}
.chip.done, .chip.status-made { background: #dcefdc; color: var(--ok); }
.chip.wip, .chip.status-planned { background: var(--amber-soft); color: #7a4b00; }
.chip.todo { background: #eee7da; }
.chip.suggest { background: #e3edfd; color: #23508e; font-weight: 700; }
.addform { margin: 14px 0; }
.nextcard { border-left: 5px solid var(--blue); }
.progressbar {
  position: relative; height: 30px; border-radius: 999px; background: #eee7da;
  overflow: hidden; margin: 12px 0;
}
.progressbar .fill { height: 100%; background: linear-gradient(90deg, var(--blue), #3f6fb0); transition: width .4s; }
.progressbar .label {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: .85rem;
  font-weight: 700; color: var(--ink);
}

/* ---------- check-in ---------- */
.checkform h3 { margin-top: 0; }
.moodrow, .haltrow { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.mood { display: grid; place-items: center; font-size: 1.6rem; cursor: pointer; padding: 4px 10px; border: 2px solid transparent; border-radius: 12px; }
.mood:has(input:checked) { border-color: var(--amber); background: var(--amber-soft); }
.mood input { display: none; }
.halt { font-weight: 500; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.halt:has(input:checked) { background: #fdecea; border-color: #f2b8b5; }
.halt input { width: auto; }
details.hist summary { cursor: pointer; font-weight: 600; }
details.hist dl { margin: 8px 0 0; }
details.hist dt { font-weight: 700; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 8px; }
details.hist dd { margin: 2px 0 0; }

/* ---------- tables ---------- */
table.list { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.list td, table.list th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- chat ---------- */
.chatwrap { max-width: 780px; }
.chathead { display: flex; align-items: center; gap: 12px; }
.chathead h1 { margin: 10px 0; }
.aidot { width: 12px; height: 12px; border-radius: 50%; background: #bbb; display: inline-block; }
.aidot.on { background: #43a047; box-shadow: 0 0 6px #43a047; }
.aidot.off { background: var(--rose); }
.chatlog {
  background: #fffdf9; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; min-height: 320px; max-height: 60vh; overflow-y: auto; margin: 10px 0;
}
.chatlog.compact { min-height: 180px; max-height: 40vh; }
.msg { display: flex; margin: 10px 0; }
.msg.user { justify-content: flex-end; }
.bubble {
  max-width: 82%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap;
  overflow-wrap: break-word;
}
.msg.user .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant .bubble { background: #efe9dd; border-bottom-left-radius: 4px; }
.msg.assistant .bubble.thinking { color: var(--muted); font-style: italic; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.chipbtn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px;
  cursor: pointer; font: inherit; font-size: .87rem; color: var(--ink);
}
.chipbtn:hover { border-color: var(--blue); color: var(--blue); }
.chatform { display: flex; gap: 8px; align-items: flex-end; }
.chatform textarea { flex: 1; }
.goalchips { display: flex; flex-direction: column; gap: 6px; }
.goalchip {
  background: #e3edfd; border: 1px solid #b9d0f2; color: #23508e; border-radius: 12px;
  padding: 8px 14px; display: flex; align-items: center; gap: 10px; font-size: .92rem;
}
.goalchip .btn { margin-left: auto; }

/* ---------- SOS ---------- */
.sosbanner {
  background: linear-gradient(120deg, #7c2418, #b03a2a); color: #fff; border-radius: var(--radius);
  padding: 22px 26px; margin: 12px 0;
}
.sosbanner h1 { margin: 0 0 6px; }
.sosbanner p { margin: 0; color: #ffd9d0; }
.soslist { list-style: none; padding: 0; }
.soslist li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.crisis { background: #fdecea; border: 1px solid #f2b8b5; border-radius: 10px; padding: 10px 14px; }
.whybox { background: var(--amber-soft); border-radius: 12px; padding: 12px 16px; margin-top: 12px; }
.whybox h4 { margin: 0 0 6px; color: #7a4b00; }
.whybox p { font-style: italic; margin: 0; }
.planglimpse { padding: 10px 16px; margin: 10px 0 16px; }
.planglimpse p { margin: 0; }

/* ---------- together / misc ---------- */
.sharecode {
  font-family: Consolas, monospace; font-size: 1.8rem; letter-spacing: 3px;
  background: #f3efe6; border-radius: 10px; padding: 10px 18px; display: inline-block;
}
.sharecode.inlinecode { font-size: 1.1rem; padding: 3px 10px; }
.sharecode.tight { margin-top: 0; margin-bottom: 0; }
h3:has(+ .sharecode.tight) { margin-bottom: 6px; }
.sharebtns { margin-bottom: 12px; }
.sharesettings { margin-top: 12px; }
.sharesettings summary { cursor: pointer; font-weight: 600; }
.sharesettings-form {
  margin-top: 10px; padding: 12px 14px; background: #fffdf9; border: 1px solid var(--line);
  border-radius: 12px; display: flex; flex-direction: column; gap: 6px;
}
.radiorow { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.radiorow input { width: auto; }
.sharepicklist {
  display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px 22px;
  padding: 8px 10px; background: var(--bg); border-radius: 8px;
}
.checkrow { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.checkrow input { width: auto; }
.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* ---------- footer ---------- */
.foot {
  max-width: 1040px; margin: 30px auto 0; padding: 18px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .82rem;
}

/* ---------- layout with sponsor sidebar ---------- */
.layout { display: flex; align-items: flex-start; max-width: 1400px; margin: 0 auto; }
.layout > .wrap { flex: 1 1 auto; min-width: 0; }
.sponsorbar {
  flex: 0 0 372px; width: 372px;
  position: sticky; top: 64px;
  height: calc(100vh - 90px);
  margin: 22px 18px 0 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.sb-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--blue-dark); color: #fff; }
.sb-title { font-weight: 700; flex: 1; }
.sb-link {
  background: none; border: 0; color: #d8e7e4; cursor: pointer; font: inherit;
  font-size: 1rem; text-decoration: none; padding: 2px 6px; border-radius: 6px;
}
.sb-link:hover { color: #fff; background: rgba(255,255,255,.12); }
.sb-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sb-log { flex: 1; overflow-y: auto; padding: 10px; background: #fffdf9; }
.sb-log .msg { margin: 8px 0; }
.sb-log .bubble { max-width: 94%; font-size: .88rem; padding: 8px 11px; }
.sponsorbar .goalchips { padding: 4px 8px 0; }
.sponsorbar .goalchip { font-size: .82rem; padding: 6px 10px; flex-wrap: wrap; }
.sb-form { display: flex; gap: 6px; padding: 8px 8px 0; border-top: 1px solid var(--line); align-items: flex-end; }
.sb-form textarea { min-height: 38px; font-size: .88rem; flex: 1; }
.sb-form .btn { padding: 7px 11px; flex: 0 0 auto; font-size: 1.05rem; line-height: 1; }
.sb-guidance { display: block; width: calc(100% - 16px); margin: 6px 8px 8px; text-align: center; }
.sponsorbar.closed { flex-basis: 54px; width: 54px; height: auto; cursor: pointer; }
.sponsorbar.closed .sb-body, .sponsorbar.closed .sb-title,
.sponsorbar.closed a.sb-link, .sponsorbar.closed #sb-dot { display: none; }
.sponsorbar.closed .sb-head { justify-content: center; padding: 12px 6px; }
.sponsorbar.closed .sb-head::before { content: "💬"; font-size: 1.2rem; }
.sponsorbar.closed #sb-voice { display: none; }
#sb-voice.speaking { animation: otpulse 1s ease-in-out infinite; }
@keyframes otpulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.sb-form textarea.your-turn {
  box-shadow: 0 0 0 2px var(--blue-dark); border-color: var(--blue-dark);
  transition: box-shadow .2s ease;
}
.obvoice { margin-top: 10px; }
@media (max-width: 1100px) {
  .layout { flex-direction: column; }
  .sponsorbar {
    position: static; width: auto; flex: 1 1 auto; height: auto;
    margin: 0 18px 20px; align-self: stretch;
  }
  .sb-log { min-height: 120px; max-height: 32vh; }
  .sponsorbar.closed { width: auto; }
}

/* ---------- linear locks ---------- */
.navlinks a.locked { opacity: .55; }
.stepcard.lockedstep { opacity: .65; background: #f3efe6; cursor: default; }
.stepcard.lockedstep:hover { transform: none; border-color: var(--line); }
.stop.lockedstop { opacity: .5; cursor: default; }
.stop.lockedstop:hover { background: none; }
.lockedcard { background: #f3efe6; opacity: .85; }
.lockedcard .promptq { color: var(--muted); }
.promptcard.plocked { background: #f3efe6; }
.promptcard.plocked .promptq { filter: blur(5px); user-select: none; color: var(--muted); }
.promptcard.plocked textarea, .promptcard.plocked .savestate { display: none; }
.plock-note { margin: 4px 0 0; }
.promptcard.just-unlocked { animation: unlockglow 1.6s ease; }
@keyframes unlockglow {
  0% { box-shadow: 0 0 0 3px #ffcf87; background: var(--amber-soft); }
  100% { box-shadow: var(--shadow); background: var(--card); }
}
.lockedbtn { opacity: .55; cursor: not-allowed; }
.blockers { max-width: 280px; margin: 6px 0 0; }

/* ---------- onboarding conversation ---------- */
.onboard { max-width: 620px; margin: 26px auto; }
.onboard-head { text-align: center; }
.onboard-logo { width: 120px; max-width: 40vw; height: auto; border-radius: 16px; box-shadow: var(--shadow); }
.onboard-head h1 { margin: 14px 0 4px; }
.onboardlog { min-height: 300px; max-height: 55vh; }
.center { text-align: center; }
#ob-input[data-mask] { -webkit-text-security: disc; }
#ob-chips input[type="date"] { width: auto; flex: 1; }
#ob-chips { align-items: center; }

/* ---------- step quote & completion ---------- */
.stepquote {
  margin: 14px 0; padding: 18px 24px;
  background: linear-gradient(120deg, #1f3864, #12213d);
  color: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.stepquote p { margin: 0; font-size: 1.22rem; font-style: italic; font-family: Georgia, serif; line-height: 1.5; }
.stepquote footer { margin-top: 6px; color: #ffcf87; font-weight: 700; font-size: .85rem; letter-spacing: 1px; }
.plainstep-sub { color: var(--blue-dark); border-bottom: 1px dashed var(--line); padding-bottom: 10px; }
.completecard { border-left: 5px solid var(--blue); text-align: center; margin-top: 26px; }
.completecard p { max-width: none; }

/* ---------- one-press wins ---------- */
.quickgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quickgrid .quickbtn:first-child { grid-column: 1 / -1; }
.quickbtn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--line); background: #fffdf9; border-radius: 14px;
  padding: 14px 12px; font: inherit; font-weight: 700; font-size: .98rem;
  cursor: pointer; color: var(--ink); transition: transform .1s ease, border-color .1s;
}
.quickbtn:hover { border-color: var(--amber); transform: translateY(-2px); }
.quickbtn:active { transform: scale(.97); }
.quickbtn:disabled { opacity: .6; cursor: wait; }
.quickbtn.wide { width: 100%; margin: 4px 0 8px; }
.qcount {
  background: var(--amber); color: #fff; border-radius: 999px; min-width: 26px;
  padding: 2px 8px; font-size: .85rem; font-weight: 800;
}
.quickdetails summary { cursor: pointer; margin: 2px 0 6px; }
.phonelist { list-style: none; padding: 0; margin: 0; }
.phonelist li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 2px; border-bottom: 1px dashed var(--line);
}
.pl-name { flex: 1 1 40%; }
.pl-phone { font-family: Consolas, monospace; white-space: nowrap; }
.phonelist .quickcall { flex: 0 0 auto; }
.statrow.wrap { flex-wrap: wrap; }
.statrow.wrap .stat { flex: 1 1 30%; }

/* ---------- explosion engine ---------- */
.burst-bit {
  position: fixed; left: 50%; top: 45%; z-index: 998; font-size: 1.7rem;
  pointer-events: none; transform: translate(-50%, -50%);
}
.boom-msg {
  position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%);
  z-index: 1000; max-width: min(84vw, 560px); text-align: center;
  background: linear-gradient(120deg, #1f3864, #12213d); color: #fff;
  border: 3px solid #ffcf87; border-radius: 18px; padding: 16px 26px;
  font-weight: 800; box-shadow: 0 8px 40px rgba(0,0,0,.35);
  animation: boompop .45s cubic-bezier(.2,1.6,.4,1), boomfade .6s ease forwards;
  animation-delay: 0s, 2.2s; pointer-events: none;
}
.boom-msg.level-8, .boom-msg.level-9, .boom-msg.level-10 {
  background: linear-gradient(120deg, #b03a2a, #e08a00, #1f3864);
  animation: boompop .45s cubic-bezier(.2,1.6,.4,1), boompulse .5s ease-in-out .45s 4 alternate, boomfade .6s ease forwards;
  animation-delay: 0s, .45s, 2.6s;
}
@keyframes boompop { from { transform: translate(-50%, -50%) scale(.2) rotate(-6deg); } }
@keyframes boompulse { to { transform: translate(-50%, -50%) scale(1.07) rotate(1.2deg); } }
@keyframes boomfade { to { opacity: 0; transform: translate(-50%, -70%) scale(.9); } }
.boom-flash {
  position: fixed; inset: 0; z-index: 997; pointer-events: none;
  background: radial-gradient(circle, rgba(255,207,135,.85), rgba(255,207,135,0) 70%);
  animation: flashout .9s ease-out forwards;
}
@keyframes flashout { from { opacity: 1; } to { opacity: 0; } }
body.shake { animation: bodyshake .8s ease; }
@keyframes bodyshake {
  10%, 50%, 90% { transform: translateX(-7px) rotate(-.3deg); }
  30%, 70% { transform: translateX(7px) rotate(.3deg); }
  100% { transform: none; }
}

/* ---------- confetti ---------- */
.confetti-bit { position: fixed; top: -30px; z-index: 999; font-size: 1.4rem; pointer-events: none; animation: fall linear forwards; }
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .2; }
}

/* ---------- sponsor finder + sponsor CTA ---------- */
.sponsorcta { border-left: 5px solid var(--amber); background: var(--amber-soft); }
.sponsorcta h3 { margin-top: 0; }
.candidate { margin: 10px 0; padding: 12px 16px; }
.candidate.bestpick { outline: 3px solid var(--amber); background: var(--amber-soft); }
.cand-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cand-head .cand-score { margin-left: auto; }
.cand-qs { display: flex; flex-wrap: wrap; gap: 8px; }
.cand-qs .halt { font-size: .87rem; padding: 4px 10px; }
.cand-qs .halt:has(input:checked) { background: #dcefdc; border-color: #9fcb9f; }

/* ---------- speech-to-text mics ---------- */
.micwrap { position: relative; }
.micwrap textarea { width: 100%; padding-right: 52px; }
.micbtn {
  position: absolute; right: 26px; bottom: 10px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 1.02rem; display: grid; place-items: center;
  opacity: .7; transition: opacity .12s, border-color .12s, transform .12s;
}
.micbtn:hover { opacity: 1; border-color: var(--blue); transform: scale(1.08); }
.micbtn.listening {
  opacity: 1; background: #fdecea; border-color: var(--rose);
  animation: micpulse 1.3s ease-out infinite;
}
@keyframes micpulse {
  0% { box-shadow: 0 0 0 0 rgba(192, 57, 43, .35); }
  100% { box-shadow: 0 0 0 12px rgba(192, 57, 43, 0); }
}
.chatform .micwrap, .sb-form .micwrap { flex: 1; }
.chip.rel { background: #e3edfd; color: #23508e; }

/* ---------- onboarding: password warning + dropdowns ---------- */
.pwwarn {
  background: #fdecea; border: 2px solid #f2b8b5; border-radius: var(--radius);
  padding: 14px 18px; margin: 10px 0;
}
.pwwarn h4 { margin: 0 0 6px; color: #8c2f28; }
.pwwarn p { margin: 6px 0; font-size: .92rem; color: #6d2620; }
.obselect { flex: 1 1 260px; min-width: 220px; width: auto; }
#ob-chips { align-items: center; gap: 8px; }

/* Footer privacy notice earns a little weight. */
.foot p:first-child {
  background: #f3efe6; border-left: 4px solid var(--blue);
  padding: 10px 14px; border-radius: 8px; color: var(--ink);
}

/* ---------- reading assignments + quizzes ---------- */
.readingcard { border-left: 5px solid var(--teal); }
.readingcard.readdone { border-left-color: var(--ok); opacity: .8; }
.rd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd-title { font-size: 1.02rem; }
.quizform .quizq { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.quizform .quizq:last-of-type { border-bottom: 0; }
.quizq.wrongq { background: #fdecea; border-radius: 10px; padding: 12px 14px; }
.quizopt {
  display: flex; align-items: flex-start; gap: 10px; font-weight: 400;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px;
  margin: 6px 0; cursor: pointer; background: #fffdf9;
}
.quizopt:hover { border-color: var(--teal); }
.quizopt input { width: auto; margin-top: 3px; }
.quizopt:has(input:checked) { background: #e8f2ef; border-color: var(--teal); }

/* ---------- recovery questions ---------- */
.recq { border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 6px; }
.recq:last-of-type { border-bottom: 0; }
.customq { margin-top: 6px; }
.authbox.wide { max-width: 560px; }
hr.soft { border: 0; border-top: 1px dashed var(--line); margin: 18px 0 6px; }
.skipbtn { display: block; margin: 6px auto 0; font-size: .88rem; }
.setupcard { border-left: 5px solid var(--amber); background: #fffdf7; }
.setupcard .plain-list li { border-bottom: 0; padding: 3px 0; }

/* ---------- step-study groups ---------- */
.groupcard { border-left: 5px solid var(--teal); }
.groupname { margin: 0; }
.invitebox { background: #f3efe6; border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
.invitelink { font-family: Consolas, monospace; font-size: .85rem; flex: 2 1 260px; }
.groupboard td { vertical-align: middle; }
.groupboard tr.me { background: #f7fbfa; }
.groupboard tr.stalled { background: #fff8ec; }
.cheerbtn { border-color: var(--amber); }
.cheerbtn.cheered, .cheerbtn:disabled { opacity: .55; cursor: default; border-color: var(--line); }
.joinhero { max-width: 680px; margin: 0 auto; }
.joinhero h1 { font-size: 2.1rem; }
.joinguide { text-align: left; margin: 20px 0; }
.joinguide h3 { margin-bottom: 6px; }

/* Old Timer's voice — bigger and easy to read, never squinty. */
.sb-log .bubble { font-size: 1.18rem; line-height: 1.5; max-width: 96%; }
.sb-form textarea { font-size: 1.05rem; }
/* The full conversation and the getting-to-know-you intake read larger too. */
.chatlog .bubble { font-size: 1.2rem; line-height: 1.6; }
#chatinput, #ob-input { font-size: 1.1rem; }

/* ---------- logo marks ---------- */
.auth-logo { width: 64px; height: 64px; display: block; margin: 0 auto 8px; border-radius: 14px; }
.daynum-logo { width: 64px; height: 64px; border-radius: 14px; }

/* ---------- onboarding phases + security questions ---------- */
.phasedivider {
  text-align: center; font-size: .78rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); margin: 18px 0 6px; position: relative;
}
.phasedivider::before, .phasedivider::after {
  content: ""; position: absolute; top: 50%; width: 28%; height: 1px; background: var(--line);
}
.phasedivider::before { left: 0; }
.phasedivider::after { right: 0; }
.recpanel {
  width: 100%; background: #fffdf9; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.recrow { display: flex; gap: 8px; flex-wrap: wrap; }
.recrow select { flex: 2 1 240px; }
.recrow input { flex: 1 1 160px; }
.recerr { color: var(--rose); min-height: 1em; margin: 0; }
.termscheck { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 0; }
.termscheck input { width: auto; margin-top: 3px; }

/* ---------- admin ---------- */
.adminlist td, .adminlist th { padding: 8px 6px; }
.adminlist tr.inactive-row { opacity: .55; }
.adminlist tr.inactive-row td strong { text-decoration: line-through; }

/* ---------- trusted devices / PIN unlock ---------- */
.pininput {
  font-size: 1.8rem; letter-spacing: .6em; text-align: center; font-family: monospace;
  padding: 10px 8px 10px 16px; max-width: 220px; margin: 0 auto 12px;
}
.pininput.small { font-size: 1.3rem; letter-spacing: .4em; max-width: none; margin: 0; }
#pinform { display: flex; flex-direction: column; align-items: center; }
.devicelist { list-style: none; padding: 0; margin: 0 0 16px; }
.devicelist li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.devicelist .dv-name { font-weight: 600; }
.devicelist form { margin-left: auto; }
.trustform { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }

/* ---------- "we haven't met yet" prompt ---------- */
.introbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--amber-soft); border: 1px solid #ffd9a0; border-radius: 12px;
  padding: 10px 16px; margin-bottom: 14px;
}
.introbar-text { flex: 1; min-width: 240px; color: #7a4b00; }

/* ---------- home: one framed panel, matching the Old Timer's ---------- */
.homepanel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px;
}
.hp-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  background: var(--blue-dark); color: #fff;
}
.hp-title { font-weight: 700; flex: 1; }
.hp-day { background: #ffcf87; color: #5b3a00; font-weight: 700; padding: 2px 10px; border-radius: 999px; font-size: .85rem; }
.hp-streak { background: rgba(255,255,255,.16); padding: 2px 9px; border-radius: 999px; font-size: .85rem; }
.hp-body { padding: 16px; }
.hp-jft { font-style: italic; color: var(--muted); margin: 0 0 14px; text-align: center; }
.hp-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 18px 0 8px; text-align: center; }

.bigbuttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.bigbtn {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  padding: 16px 12px; border: 1px solid var(--line); border-radius: 14px;
  background: #fffdf9; text-decoration: none; color: var(--ink);
  transition: transform .12s ease, border-color .12s ease;
}
.bigbtn:hover { transform: translateY(-2px); border-color: var(--blue); color: var(--ink); }
.bigbtn.intro { background: var(--amber-soft); border-color: #ffd9a0; }
.bb-icon { font-size: 1.7rem; line-height: 1.2; }
.bb-label { font-weight: 700; font-size: 1.02rem; }
.bb-hint { font-size: .8rem; color: var(--muted); }

.trackrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.trackbtn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer; font: inherit; font-size: 1.3rem; color: var(--ink);
}
.trackbtn:hover { border-color: var(--amber); background: var(--amber-soft); }
.trackbtn:disabled { opacity: .5; }
.tb-label { font-size: .72rem; color: var(--muted); }
.trackbtn .qcount { font-size: .78rem; font-weight: 700; color: var(--blue-dark); }

.hp-notes { display: grid; gap: 8px; }
.hp-note {
  display: block; padding: 10px 14px; border-radius: 12px; text-decoration: none;
  background: var(--amber-soft); border: 1px solid #ffd9a0; color: #7a4b00;
}
.hp-note:hover { border-color: var(--amber); }

/* ---------- phone-friendly menu ---------- */
.navtoggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }
@media (max-width: 860px) {
  .topnav { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .navtoggle { display: block; order: 2; margin-left: auto; }
  .brand { order: 1; font-size: 1.05rem; }
  .navright { order: 3; }
  .navlinks {
    order: 4; flex-basis: 100%; flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .22s ease;
  }
  .navlinks.open { max-height: 78vh; overflow-y: auto; }
  .navlinks a { padding: 11px 8px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 1rem; }
  /* groups become tap-to-expand accordions in the phone menu */
  .navgroup { width: 100%; }
  .navtop { width: 100%; justify-content: flex-start; padding: 11px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; font-size: 1rem; }
  .navgbtn .navchev { margin-left: auto; }
  .navmenu { position: static; display: none; min-width: 0; background: rgba(0,0,0,.22);
    border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .navgroup:hover > .navmenu, .navgroup:focus-within > .navmenu { display: none; }
  .navgroup.open > .navmenu { display: block; }
  .navmenu a { padding: 10px 10px 10px 32px; border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.06); }
  .wrap { padding: 14px 12px 40px; }
  .bigbuttons { grid-template-columns: 1fr 1fr; }
  .trackrow { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .trackbtn { font-size: 1.15rem; padding: 8px 2px; }
  .tb-label { font-size: .62rem; }
}
@media (max-width: 420px) {
  .bigbuttons { grid-template-columns: 1fr; }
  .bigbtn { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 12px 14px; }
  .bigbtn .bb-icon { font-size: 1.4rem; }
  .bigbtn .bb-label { flex: 0 0 auto; }
  .bigbtn .bb-hint { flex: 1 1 100%; }
}

/* ---------- on a phone the Old Timer sits at the bottom ---------- */
@media (max-width: 760px) {
  .sponsorbar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: auto; margin: 0; border-radius: 16px 16px 0 0;
    border-bottom: 0; z-index: 60; max-height: 62vh;
    box-shadow: 0 -4px 18px rgba(38,50,59,.18);
  }
  .sponsorbar .sb-log { max-height: 34vh; }
  .layout > .wrap { padding-bottom: 92px; }     /* room for the dock */
  .sponsorbar.closed {
    width: auto; height: auto; max-height: none;
  }
  .sponsorbar.closed .sb-head { justify-content: flex-start; padding: 10px 16px; }
  .sponsorbar.closed .sb-head::before { content: "💬 Ask the Old Timer"; font-size: .95rem; font-weight: 600; }
  /* the only way up: a clear expand button on the right of the docked bar */
  .sponsorbar.closed #sb-toggle {
    margin-left: auto; font-size: 1.5rem; line-height: 1; padding: 2px 14px;
    color: #fff; background: rgba(255,255,255,.14); border-radius: 8px;
  }
}
.sponsorbar.closed { cursor: default; }   /* the bar itself no longer opens on tap */

/* ---------- home buttons: badges + the call list ---------- */
.bigbtn { position: relative; }
button.bigbtn { font: inherit; cursor: pointer; width: 100%; }
.bb-badge {
  position: absolute; top: 8px; right: 10px;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; font-size: .82rem; font-weight: 700;
  background: var(--blue-dark); color: #fff;
}
.bb-badge.good { background: var(--ok); }
.bb-badge.todo { background: #e8e1d4; color: var(--muted); }
.bigbtn.open { border-color: var(--blue); background: #eef4fa; }

.calllist { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #fffdf9; }
.calllist .phonelist { list-style: none; margin: 0; padding: 0; }
.calllist .phonelist li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 6px; border-bottom: 1px solid var(--line);
}
.calllist .phonelist li:last-child { border-bottom: 0; }
.calllist li.is-sponsor { background: var(--amber-soft); border-radius: 8px; }
.calllist .pl-name {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.calllist .pl-phone {
  flex: 0 0 auto; font-weight: 700; white-space: nowrap; text-decoration: none;
  color: var(--blue); padding: 3px 8px; border-radius: 8px; background: rgba(31,56,100,.06);
}
.calllist .pl-phone:hover { background: rgba(31,56,100,.12); }
@media (max-width: 420px) {
  .bb-badge { top: 50%; transform: translateY(-50%); right: 12px; }
}

/* ---------- phone: brand condensed so the top row holds everything ---------- */
@media (max-width: 860px) {
  .brand-icon { width: 30px; height: 30px; }
  .navright { order: 3; margin-left: auto; gap: 4px; display: flex; align-items: center; }
  .navtoggle { order: 4; margin-left: 4px; }
  .daychip { font-size: .78rem; padding: 2px 8px; }
  .gear { font-size: 1.1rem; padding: 4px 5px; }
}

/* ---------- home: goals + sponsor at the bottom ---------- */
.hp-foot { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.hp-foot h4 {
  margin: 0 0 8px; font-size: .78rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted);
}
.sponsorline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--amber-soft); border: 1px solid #ffd9a0; border-radius: 12px;
  padding: 10px 14px; margin-top: 12px;
}
.sponsorline .sl-name { flex: 1; min-width: 120px; }
.sponsorline .sl-phone { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.addpanel { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fffdf9; }

/* ---------- pulling contacts off the phone ---------- */
.contactimport { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.contactimport .imphint { margin: 0 0 4px; }
.importrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.importrow label.btn { cursor: pointer; margin: 0; font-weight: 400; }
.importerr { color: var(--rose); }
.importpick {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; background: #fff; max-height: 320px; overflow-y: auto;
}
.ip-head { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ip-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 4px;
  border-bottom: 1px dashed var(--line); font-weight: 400; margin: 0; cursor: pointer;
}
.ip-row:last-of-type { border-bottom: 0; }
.ip-row input { width: auto; flex: 0 0 auto; }
.importpick .btn.primary { margin-top: 10px; }

/* ---------- step page: the step itself is the header ---------- */
.stepquote .sq-num { color: var(--amber); font-weight: 800; white-space: nowrap; }
.stepquote { margin-top: 4px; }

/* ---------- extra-credit reading ---------- */
.readingcard.extracredit { border-left-color: var(--line); background: #fdfcfa; }
.chip.extra { background: #e3edfd; color: #23508e; }

/* ---------- read / listen / watch, straight to aa.org ---------- */
.mediarow { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px; }
.mediarow .btn { font-size: .85rem; }

/* ---------- recovery trackers heading + sobriety chip ---------- */
.trackhead {
  margin: 2px 0 8px; text-align: center; font-size: .8rem; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--muted); font-weight: 700;
}
/* "Daily Trackers" heading sits left, with a small Reset parked at the right.
   Only the heading inside this row is left-justified; the Arcade heading shares
   the .trackhead class and stays centered. */
.trackhead-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trackhead-row .trackhead { text-align: left; }
.trackreset {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: #111; font-size: .72rem; font-weight: 600; letter-spacing: .3px;
  padding: 3px 10px; cursor: pointer; line-height: 1; white-space: nowrap;
}
.trackreset:hover { border-color: #111; color: #000; }
.trackreset:disabled { opacity: .5; cursor: default; }
/* Recovery Arcade heading is a scroll target from the nav; keep it clear of the
   sticky top bar, and give the games section a little breathing room above. */
.arcade-head { margin-top: 20px; scroll-margin-top: 78px; }
/* section headings that group the dashboard buttons (Daily Routine, Working with
   Others, Virtual Advice) — a touch of air above each so the groups read apart. */
.grouphead { margin-top: 18px; }
/* Work your Step: its own full-width button, gently featured. */
.bigbuttons.solo { margin-bottom: 4px; }
.bigbtn.stepbtn { background: #eef4fa; border-color: var(--blue); }
.bigbtn.stepbtn:hover { border-color: var(--blue-dark); }

/* ---- Daily Routine, Fellowship, Virtual Advice: each button gets its own
   pastel accent, same idea as the Recovery Arcade buttons below. ---- */
.bigbtn.morning { background: #fdf0dc; border-color: #f0c987; }
.bigbtn.morning:hover { border-color: var(--amber); }
.bigbtn.night { background: #eef0fa; border-color: #c4c9ea; }
.bigbtn.night:hover { border-color: #4a4a8a; }
.bigbtn.goal { background: #e9f7ef; border-color: #a8dab5; }
.bigbtn.goal:hover { border-color: var(--ok); }

.bigbtn.call { background: #e7f3fb; border-color: #b7d9ee; }
.bigbtn.call:hover { border-color: var(--blue); }
.bigbtn.contact { background: #fbeaf0; border-color: #f0b8cd; }
.bigbtn.contact:hover { border-color: #b0507a; }
.bigbtn.friend { background: #e7f7f5; border-color: #a9ddd4; }
.bigbtn.friend:hover { border-color: #1f7a68; }
.bigbtn.stepstudy { background: #f1edfa; border-color: #cbbdea; }
.bigbtn.stepstudy:hover { border-color: #6a4fa0; }

.bigbtn.oldtimer { background: #eef4f7; border-color: #bcd4de; }
.bigbtn.oldtimer:hover { border-color: var(--blue); }
.bigbtn.loisbtn { background: #fdecef; border-color: #f2c2cd; }
.bigbtn.loisbtn:hover { border-color: var(--rose); }

/* Every button inside a dashboard dropdown is light green, matching "Add a goal".
   The extra specificity (.hp-body .dropinner) overrides each button's own colour
   variant; the .open state is kept so panels still show their highlight. */
.hp-body .dropinner .bigbtn { background: #e9f7ef; border-color: #a8dab5; }
.hp-body .dropinner .bigbtn:hover { border-color: var(--ok); }
.hp-body .dropinner .bigbtn.open { background: #eef4fa; border-color: var(--blue); }

/* ---- collapsible dashboard groups (the header IS the button) ---- */
/* Evenly spaced and tucked a little closer together than the action buttons. */
.dropgroup { margin-top: 6px; }
.bigbuttons.solo + .dropgroup { margin-top: 8px; }
/* Section-toggle headers look distinct from the plain action buttons: a thicker
   border and a slightly darker, warmer fill so they read as "open me". */
.dropbtn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border: 2px solid #cdbf9f; border-radius: 12px;
  background: #efe7d6; color: var(--ink); cursor: pointer; font: inherit;
  box-shadow: var(--shadow); text-align: left;
  transition: border-color .15s, background .15s;
}
.dropbtn:hover { border-color: var(--blue); background: #eae0cb; }
.dropgroup.open > .dropbtn { border-color: var(--blue); background: #e6eef8; }
.db-icon { font-size: 1.4rem; line-height: 1; }
.db-label { flex: 1; font-weight: 700; font-size: 1.05rem; }
.db-chev { color: var(--muted); transition: transform .28s ease; }
.dropgroup.open .db-chev { transform: rotate(180deg); }
/* smooth open/close: the row grows from 0 to the content's height, no JS measuring */
.dropwrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.dropgroup.open .dropwrap { grid-template-rows: 1fr; }
.dropinner { overflow: hidden; min-height: 0; padding-top: 8px; }
.arcade-group { scroll-margin-top: 78px; }
.hp-day-unset { background: rgba(255,255,255,.18); color: #fff; text-decoration: none; font-weight: 600; }
.hp-day-unset:hover { background: rgba(255,255,255,.3); color: #fff; }

/* ---------- inventory download ---------- */
.downloadcard { border-left: 5px solid var(--amber); }
.dl-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dl-row > div { flex: 1; min-width: 240px; }
.dl-row p { margin: 4px 0 0; }
#calladdtoggle { margin-top: 10px; }
#calladdform { margin-top: 8px; }
.daterow { display: flex; gap: 8px; align-items: center; }
.daterow input[type="date"] { flex: 1 1 auto; }
.sobdate-typed { flex: 1 1 auto; }
.sobdate-typed.dateok { border-color: var(--ok, #2e7d32); }

/* ---------- 1more24 Adventure ---------- */
.advwrap { max-width: 780px; }
.advhead { display: flex; align-items: center; gap: 12px; }
.advhead h1 { margin: 10px 0; }
#adv-restart { margin-left: auto; }

.adv-intro { margin: 14px 0; }
.adv-card {
  background: linear-gradient(150deg, #fffdf9, #fff6e8);
  border: 1px solid #ffd9a0; border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); text-align: center;
}
.adv-kicker {
  display: inline-block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber); font-weight: 800; margin-bottom: 6px;
}
.adv-title { margin: 2px 0 8px; font-size: 1.55rem; color: var(--blue-dark); }
.adv-hook { margin: 0 auto 18px; max-width: 46ch; color: var(--ink); font-size: 1.08rem; line-height: 1.55; }
.adv-fineprint { margin: 14px auto 0; max-width: 48ch; }

.advlog {
  background: #fffdf9; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 12px 0; min-height: 200px;
}
.adv-scene { margin: 0 0 6px; }
.adv-narr {
  white-space: pre-wrap; overflow-wrap: break-word;
  font-size: 1.16rem; line-height: 1.72; color: var(--ink);
}
.adv-narr.thinking { color: var(--muted); font-style: italic; }
.adv-scene + .adv-scene { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 14px; }

.adv-pick {
  margin: 12px 0 4px; text-align: right; color: var(--blue);
  font-weight: 700; font-size: .98rem;
}

/* the choices: all identical on purpose — no tell for good vs. risky */
.adv-choices { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.adv-choice {
  width: 100%; text-align: left; font: inherit; font-size: 1.06rem; cursor: pointer;
  padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink);
  transition: transform .1s ease, border-color .12s ease, background .12s ease;
}
.adv-choice:hover {
  border-color: var(--blue); background: #f3f7fc; transform: translateY(-1px);
}
.adv-choice:active { transform: translateY(0); }

/* the "bad choice" effect — somber, never mocking */
body.stumble { animation: stumbletilt .9s ease; }
@keyframes stumbletilt {
  0% { filter: none; transform: none; }
  30% { filter: grayscale(.55) brightness(.9); transform: rotate(-.6deg) scale(.996); }
  70% { filter: grayscale(.35) brightness(.95); transform: rotate(.3deg); }
  100% { filter: none; transform: none; }
}
.stumble-veil {
  position: fixed; inset: 0; z-index: 997; pointer-events: none;
  background: radial-gradient(circle, rgba(30,40,60,.30), rgba(30,40,60,0) 70%);
  animation: veilout 1s ease-out forwards;
}
@keyframes veilout { from { opacity: 1; } to { opacity: 0; } }
.confetti-bit.fallslow { z-index: 996; font-size: 1.25rem; }
.thud-msg {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%);
  z-index: 1000; max-width: min(84vw, 520px); text-align: center;
  background: linear-gradient(120deg, #3a4657, #2a323f); color: #e8edf2;
  border: 2px solid #5b6b7f; border-radius: 16px; padding: 14px 24px;
  font-weight: 700; box-shadow: 0 8px 34px rgba(0,0,0,.40);
  animation: boompop .4s cubic-bezier(.2,1.4,.4,1), boomfade .6s ease forwards;
  animation-delay: 0s, 2s; pointer-events: none;
}

/* the ending card */
.adv-ending {
  margin: 16px 0; padding: 22px 24px; border-radius: var(--radius);
  box-shadow: var(--shadow); text-align: center;
}
.adv-ending.good { background: linear-gradient(150deg, #f3faf3, #e8f5e9); border: 1px solid #a9d4ab; }
.adv-ending.hard { background: linear-gradient(150deg, #f4f6f9, #e9edf2); border: 1px solid #c2ccd6; }
.adv-ending.good .adv-kicker { color: var(--ok); }
.adv-ending.hard .adv-kicker { color: var(--muted); }
.adv-ending h2 { margin: 2px 0 10px; color: var(--blue-dark); font-size: 1.5rem; }
.adv-ending-note { margin: 0 auto 16px; max-width: 48ch; line-height: 1.6; color: var(--ink); }
.adv-ending-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* the dashboard button accent */
.bigbtn.adventure { background: #eef2fb; border-color: #c7d4ef; }
.bigbtn.adventure:hover { border-color: var(--blue); }

/* ---------- Day Stacker (the game) ---------- */
.ds { max-width: 560px; margin: 0 auto; }
.ds-head { text-align: center; }
.ds-head h1 { margin: 0 0 8px; }
.ds-head .lede { margin: 0 auto; }
/* Everything stacks vertically now: board, controls, then the counters bar. */
.ds-stage {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 12px 0 4px;
}
.ds-play { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ds-board {
  background: #fffdf9; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); display: block; touch-action: none; /* swipe != scroll */
}
/* controls: directly under the board, matching its width, a little smaller */
.ds-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; width: 100%; max-width: 320px; }
.ds-key {
  padding: 10px 0; font-size: 1.3rem; line-height: 1; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer;
  user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.ds-key:active { background: var(--amber-soft); border-color: var(--amber); }
.ds-drop { font-size: .9rem; font-weight: 700; grid-column: span 2; }

/* below the controls: counters, pause, next, start — tight and wrapping */
.ds-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 14px; width: 100%; max-width: 380px;
}
.ds-next { display: flex; align-items: center; gap: 6px; }
.ds-nextc { background: #fffdf9; border: 1px solid var(--line); border-radius: 8px; display: block; }
.ds-stats { display: flex; flex-direction: row; gap: 14px; }
.ds-stat { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.ds-lbl { font-size: .6rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.ds-num { font-size: 1.15rem; font-weight: 800; color: var(--blue-dark); font-family: Georgia, serif; }
.ds-actions { display: flex; align-items: center; gap: 8px; }
.ds-pausekey { padding: 8px 15px; font-size: 1.15rem; }   /* pause isn't a full-width pad key here */
.ds-start { padding: 8px 20px; }
.ds-msg {
  margin: 12px auto; max-width: 440px; text-align: center; padding: 12px 16px;
  background: var(--amber-soft); border: 1px solid #ffd9a0; color: #7a4b00;
  border-radius: 12px; font-weight: 600;
}
.ds-foot { margin: 12px auto 0; text-align: center; max-width: 520px; }

/* ---------- Urge Surfer (the action game) ---------- */
.us-page { max-width: 560px; margin: 0 auto; }
.us-head { text-align: center; }
.us-head h1 { margin: 0 0 8px; }
.us-head .lede { margin: 0 auto; }
.us-stage {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 12px 0 4px;
}
.us-play { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.us-board {
  background: #cfeaf0; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); display: block; touch-action: none; /* drag != scroll */
}
.us-pad { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 320px; }
.us-key {
  padding: 12px 0; font-size: 1.4rem; line-height: 1; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer;
  user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.us-key:active { background: #e6f3f6; border-color: #4a92a8; }
.us-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 14px; width: 100%; max-width: 380px;
}
.us-stats { display: flex; flex-direction: row; gap: 14px; }
.us-stat { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.us-lbl { font-size: .6rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.us-num { font-size: 1.15rem; font-weight: 800; color: var(--blue-dark); font-family: Georgia, serif; }
.us-actions { display: flex; align-items: center; gap: 8px; }
.us-pausekey { padding: 8px 15px; font-size: 1.15rem; }
.us-start { padding: 8px 20px; }
.us-msg {
  margin: 12px auto; max-width: 440px; text-align: center; padding: 12px 16px;
  background: #e2f1f5; border: 1px solid #a8d4e0; color: #0d3b4a;
  border-radius: 12px; font-weight: 600;
}
.us-msg.hard { background: #eef0f2; border-color: #c2ccd6; color: #46525c; }
.us-foot { margin: 12px auto 0; text-align: center; max-width: 520px; }

/* the dashboard button accent */
.bigbtn.us { background: #e2f1f5; border-color: #a8d4e0; }
.bigbtn.us:hover { border-color: #2e7d32; }

/* ---------- My Side of the Street (the parlor game) ---------- */
.lllwrap { max-width: 720px; }

/* An old-timey card: aged paper, a hairline double border, a warm lamp glow. */
.lll-frame {
  margin: 12px 0;
  padding: 20px 22px 24px;
  border: 1px solid #cbb892;
  border-radius: 10px;
  background:
    radial-gradient(120% 90% at 50% -10%, #fffaf0 0%, #f7edd7 60%, #f0e4c8 100%);
  box-shadow: 0 2px 14px rgba(70, 52, 20, .12), inset 0 0 0 4px #fffaf0, inset 0 0 0 5px #d8c69c;
}
.lll-head {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative; margin-bottom: 6px;
}
.lll-marquee {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800; letter-spacing: 3px; font-size: .82rem;
  color: #7a5a1e; text-transform: uppercase;
}
.lll-head .aidot { position: absolute; right: 0; }

.lll-scorebar {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin: 4px 0 14px; padding: 6px 0; border-top: 1px dashed #cbb892; border-bottom: 1px dashed #cbb892;
}
.lll-score {
  font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: #8a6d38;
}
.lll-score b { font-size: 1.05rem; color: var(--blue-dark); letter-spacing: 0; }

.lll-panel { text-align: center; padding: 8px 4px 4px; }
.lll-kicker {
  display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 2px;
  color: #a37b2e; margin-bottom: 4px;
}
.lll-title {
  margin: 2px 0 12px; font-size: 1.9rem; color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif; letter-spacing: .5px;
}
.lll-hook { margin: 0 auto 18px; max-width: 48ch; color: var(--ink); font-size: 1.08rem; line-height: 1.6; }
.lll-fineprint { margin: 16px auto 0; max-width: 50ch; }

.lll-round { padding: 4px 2px; }
.lll-situation {
  font-size: 1.18rem; line-height: 1.7; color: var(--ink);
  white-space: pre-wrap; margin: 4px 0 16px;
}
.lll-situation.thinking { color: var(--muted); font-style: italic; }

.lll-options { display: flex; flex-direction: column; gap: 10px; margin: 4px 0; }
.lll-ask { margin: 8px 0 2px; font-weight: 800; font-size: 1.06rem; color: var(--blue-dark); }
.lll-option {
  text-align: left; padding: 13px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid #cbb892; background: #fffdf6; color: var(--ink);
  font: inherit; font-size: 1.04rem; line-height: 1.4;
  transition: transform .08s ease, border-color .1s, background .1s;
}
.lll-option:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--blue); background: #fffef9; }
.lll-option:active:not(:disabled) { transform: translateY(0); }
.lll-option:disabled { cursor: default; opacity: .92; }
.lll-option.is-correct { border-color: #6aa96c; background: #eef7ee; box-shadow: 0 0 0 1px #6aa96c inset; }
.lll-option.is-wrong { border-color: var(--rose); background: #fbeeec; box-shadow: 0 0 0 1px var(--rose) inset; }

.lll-verdict {
  margin: 16px 0 4px; padding: 14px 16px; border-radius: 10px;
}
.lll-verdict.good { background: linear-gradient(150deg, #f3faf3, #e8f5e9); border: 1px solid #a9d4ab; }
.lll-verdict.hard { background: linear-gradient(150deg, #faf4f2, #f6e9e6); border: 1px solid #e0b7ae; }
.lll-verdict-tag { display: block; font-weight: 800; margin-bottom: 6px; }
.lll-verdict.good .lll-verdict-tag { color: var(--ok); }
.lll-verdict.hard .lll-verdict-tag { color: var(--rose); }
.lll-why { margin: 0; line-height: 1.6; color: var(--ink); }
.lll-next { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* the dashboard button accent */
.bigbtn.lll { background: #f3f0e4; border-color: #d8c69c; }
.bigbtn.lll:hover { border-color: var(--amber); }

@media (max-width: 640px) {
  .lll-frame { padding: 16px 14px 20px; }
  .lll-title { font-size: 1.6rem; }
}

/* ---------- Ask Lois (advice column) ---------- */
.lois { max-width: 640px; margin: 0 auto; }
.lois-head { display: flex; align-items: center; gap: 10px; }
.lois-head h1 { margin: 0; }
.lois-form { margin: 14px 0; }
.lois-lbl { font-style: italic; font-size: 1.2rem; color: var(--blue-dark); margin: 0 0 4px; }
.lois-form textarea { min-height: 120px; font-size: 1.1rem; }
.lois-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.lois-chip {
  border: 1px solid var(--line); background: #fffdf9; color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .9rem;
  cursor: pointer; text-align: left;
}
.lois-chip:hover { border-color: var(--blue); color: var(--ink); }
.lois-form .btn.big { width: 100%; }

.lois-wait {
  text-align: center; color: var(--muted); font-style: italic; font-size: 1.15rem;
  padding: 28px 12px;
}
.lois-pen { display: inline-block; animation: loiswrite 1.2s ease-in-out infinite; }
@keyframes loiswrite { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg) translateY(-2px); } }

.lois-reveal {
  text-align: center; padding: 26px 16px; margin: 8px 0;
  background: var(--amber-soft); border: 1px solid #ffd9a0; border-radius: var(--radius);
}
.lois-reveal p { margin: 0 0 12px; font-size: 1.15rem; color: #7a4b00; }
.lois-reveal .btn.big { min-width: 220px; }

.lois-column { margin: 8px 0; }
.lois-kicker {
  display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--muted); font-weight: 700; margin-bottom: 6px;
}
.lois-letterback {
  background: #fbf6ec; border-left: 3px solid var(--line); border-radius: 8px;
  padding: 12px 16px; margin-bottom: 16px;
}
.lois-letterback p { margin: 0; font-style: italic; color: var(--muted); white-space: pre-wrap; }
.lois-answer {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow);
}
.lois-reply p { margin: 0 0 14px; font-size: 1.18rem; line-height: 1.6; }
.lois-reply p:last-child { margin-bottom: 0; }
.lois-endrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
