/* The Logbook, warm, calm, unhurried. Navy / cream / brass. */

:root {
  --navy: #1c2c4c;
  --navy-deep: #142038;
  --ink: #24304a;
  --cream: #faf6ee;
  --card: #ffffff;
  --brass: #b8892d;
  --brass-soft: #e9d9b4;
  --teal: #35766b;
  --teal-soft: #d9eae6;
  --rose: #a24a3f;      /* used sparingly, never as "WRONG red" */
  --rose-soft: #f3e0dc;
  --line: #e6dfd2;
  --muted: #6b7386;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(28, 44, 76, 0.07), 0 10px 30px rgba(28, 44, 76, 0.06);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100dvh;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

button { font: inherit; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }

/* ---------- header ---------- */

.site-header {
  background: var(--navy);
  color: var(--cream);
  padding: 10px 0;
  position: sticky; top: 0; z-index: 10;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--cream); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.01em;
}
.brand-mark { width: 26px; height: 26px; color: var(--brass-soft); }
.header-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.who { opacity: 0.75; font-size: 0.92rem; }

.link-btn {
  background: none; border: none; padding: 6px 4px;
  color: inherit; opacity: 0.9;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  border-radius: 6px;
}
.link-btn:hover { opacity: 1; }
main .link-btn { color: var(--teal); opacity: 1; font-weight: 500; }

/* ---------- general ---------- */

.view { padding: 34px 0 70px; }
.page-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 6px;
  color: var(--navy);
}
.page-sub { margin: 0 0 26px; color: var(--muted); }

.btn {
  border: none; border-radius: 999px;
  padding: 12px 26px; font-weight: 600; font-size: 1rem;
  transition: transform 0.06s ease, box-shadow 0.12s ease;
  min-height: 48px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--cream); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-quiet { background: var(--teal-soft); color: var(--teal); }

/* ---------- auth ---------- */

.auth-hero { text-align: center; padding: 34px 0 10px; }
.hero-mark { width: 58px; height: 58px; color: var(--navy); }
.hero-title {
  font-family: var(--font-display); font-weight: 700; color: var(--navy);
  font-size: clamp(2.6rem, 8vw, 3.6rem); margin: 6px 0 4px; letter-spacing: 0.01em;
}
.hero-sub { color: var(--muted); margin: 0 0 30px; font-size: 1.05rem; }

.auth-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 430px; margin: 0 auto; padding: 26px 28px 30px;
}
.auth-tabs { display: flex; gap: 4px; margin-bottom: 22px; background: var(--cream); border-radius: 999px; padding: 4px; }
.auth-tab {
  flex: 1; border: none; background: none; padding: 9px 10px; border-radius: 999px;
  color: var(--muted); font-weight: 600; font-size: 0.95rem;
}
.auth-tab.is-active { background: var(--navy); color: var(--cream); }

.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; color: var(--navy); }
.auth-form .hint { font-weight: 400; color: var(--muted); }
.auth-form input {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: #fffdf9; min-height: 48px;
}
.auth-form input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: transparent; }
.auth-form .btn { margin-top: 6px; }
.form-error { color: var(--rose); font-size: 0.95rem; margin: 2px 0 0; }

/* ---------- home / topics ---------- */

.home-greeting { margin-bottom: 26px; }
.topic-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.topic-card {
  text-align: left;
  background: var(--card); border: none; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 20px 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.09s ease, box-shadow 0.12s ease;
}
.topic-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(28,44,76,0.1), 0 14px 34px rgba(28,44,76,0.09); }
.topic-card h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; color: var(--navy); }
.topic-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; flex: 1; }
.topic-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.level-chip {
  background: var(--brass-soft); color: #7a5a14;
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.03em;
  border-radius: 999px; padding: 3px 11px; white-space: nowrap;
}
.level-chip.at-max { background: var(--navy); color: var(--brass-soft); }
.stars { color: var(--brass); font-size: 0.85rem; font-weight: 600; }

/* ---------- practice ---------- */

.practice-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.practice-meta { display: flex; align-items: center; gap: 10px; }
.topic-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--navy); }

.streak-row { display: flex; gap: 7px; margin: 0 0 14px; align-items: center; }
.streak-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--line); transition: background 0.25s ease, transform 0.25s ease;
}
.streak-dot.filled { background: var(--teal); transform: scale(1.15); }
.streak-label { font-size: 0.8rem; color: var(--muted); margin-left: 4px; }

.q-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 28px 20px;
}
.q-prompt { font-size: 1.22rem; line-height: 1.6; margin: 0 0 22px; color: var(--ink); }

.answer-row { display: flex; gap: 10px; flex-wrap: wrap; }
.answer-input {
  flex: 1; min-width: 200px;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 16px;
  font-size: 1.15rem; background: #fffdf9; min-height: 50px;
}
.answer-input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: transparent; }
.q-actions { margin-top: 14px; }

/* ---------- feedback ---------- */

.feedback { margin-top: 18px; }
.fb-card {
  border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow); background: var(--card);
  animation: rise 0.25s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fb-card.good { border-left: 5px solid var(--teal); }
.fb-card.think { border-left: 5px solid var(--brass); }
.fb-praise { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--teal); margin: 0 0 4px; }
.fb-think-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--navy); margin: 0 0 10px; }
.fb-note { margin: 0 0 10px; }
.fb-note.misconception { background: var(--brass-soft); border-radius: 10px; padding: 12px 14px; }
.fb-answer-line { color: var(--muted); font-size: 0.95rem; margin: 0 0 14px; }
.fb-followup { border-top: 1px dashed var(--line); padding-top: 16px; margin-top: 6px; }
.fb-followup .q-prompt { font-size: 1.1rem; margin-bottom: 14px; }
.fb-next { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.eased-note { color: var(--muted); font-size: 0.92rem; font-style: italic; margin-top: 10px; }

/* a calm verdict chip on every answer */
.result-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 11px; border-radius: 999px; margin-bottom: 10px;
}
.result-chip.ok { background: #e3f0e4; color: #2e6b46; border: 1px solid #c4dfc9; }
.result-chip.no { background: #fdf1d8; color: #8a6d15; border: 1px solid #ecd9a5; }

/* the copyable feedback export in admin */
.fb-export {
  width: 100%; margin-top: 10px; font-family: ui-monospace, monospace;
  font-size: 0.82rem; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
}

/* quiet, optional question feedback */
.thumb-row { margin-top: 12px; display: flex; align-items: center; gap: 6px; }
.thumb-btn {
  background: none; border: none; padding: 4px; cursor: pointer;
  color: rgba(28, 44, 76, 0.35); border-radius: 8px; line-height: 0;
}
.thumb-btn svg { width: 18px; height: 18px; }
.thumb-btn:hover { color: rgba(28, 44, 76, 0.7); background: rgba(28, 44, 76, 0.05); }
.thumb-btn.picked { color: var(--brass, #b8892d); }
.thumb-btn:disabled { cursor: default; }
.thumb-btn:disabled:not(.picked) { opacity: 0.35; }
.thumb-noted { color: var(--muted); font-size: 0.85rem; margin-left: 4px; }
.fb-tally { color: var(--muted); font-size: 0.95rem; margin: 4px 0 10px; }

/* ---------- level up ---------- */

.levelup-overlay {
  position: fixed; inset: 0; background: rgba(20, 32, 56, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: 20px;
}
.levelup-card {
  background: var(--cream); border-radius: 18px; text-align: center;
  padding: 38px 34px; max-width: 380px; box-shadow: 0 24px 70px rgba(0,0,0,0.3);
  animation: rise 0.3s ease;
}
.levelup-mark { width: 54px; height: 54px; color: var(--brass); }
.levelup-card h2 { font-family: var(--font-display); color: var(--navy); margin: 10px 0 6px; font-size: 1.6rem; }
.levelup-card p { color: var(--muted); margin: 0 0 22px; }

/* ---------- parent view ---------- */

.parent-learner { margin-bottom: 40px; }
.parent-learner > h2 { font-family: var(--font-display); color: var(--navy); font-size: 1.5rem; margin: 0 0 14px; }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-tile {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 20px; min-width: 130px;
}
.stat-tile .n { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--navy); display: block; }
.stat-tile .l { color: var(--muted); font-size: 0.85rem; }

.parent-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 24px; }
.pt-card { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 12px 16px; }
.pt-card .t { font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.pt-bar { height: 6px; border-radius: 3px; background: var(--line); margin: 8px 0 6px; overflow: hidden; }
.pt-bar > div { height: 100%; background: var(--teal); border-radius: 3px; }
.pt-card .d { color: var(--muted); font-size: 0.8rem; }

.parent-section-title { font-family: var(--font-display); color: var(--navy); font-size: 1.15rem; margin: 26px 0 10px; }
.wobble {
  background: var(--card); border-left: 4px solid var(--brass); border-radius: 10px;
  box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 10px; font-size: 0.93rem;
}
.wobble .q { color: var(--ink); margin: 0 0 4px; }
.wobble .m { color: var(--muted); margin: 0; font-style: italic; }
.wobble .meta { color: var(--muted); font-size: 0.8rem; }
.recent-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.recent-table th, .recent-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.recent-table th { background: var(--cream); color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.ok-mark { color: var(--teal); font-weight: 700; }
.think-mark { color: var(--brass); font-weight: 700; }
.empty-note { color: var(--muted); font-style: italic; }

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .q-card { padding: 22px 18px 16px; }
  .q-prompt { font-size: 1.1rem; }
  .auth-card { padding: 22px 18px 24px; }
  .view { padding: 22px 0 60px; }
  .answer-row .btn { width: 100%; }
  .answer-input { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- round 3 additions ---------- */

.answer-hint { color: var(--muted); font-size: 0.85rem; margin: 8px 2px 0; }

.today-panel {
  display: inline-block; background: var(--teal-soft); color: var(--teal);
  border-radius: 999px; padding: 6px 16px; font-size: 0.9rem; margin: 0;
}
.today-panel .today-n { font-weight: 700; }

.mix-card { background: var(--navy); }
.mix-card h2, .mix-card p { color: var(--cream); }
.mix-card p { opacity: 0.75; }
.mix-card .level-chip { background: rgba(255, 255, 255, 0.15); color: var(--brass-soft); }

.pt-bar.not-started > div { background: var(--line); }

.done-prompt { color: var(--muted); font-size: 1rem !important; margin-bottom: 10px !important; }

/* generous type on big screens */
@media (min-width: 1100px) {
  .q-card { padding: 36px 40px 26px; }
  .q-prompt { font-size: 1.4rem; line-height: 1.65; }
  .answer-input { font-size: 1.25rem; }
}

/* compact two-column topic grid on small screens */
@media (max-width: 560px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .topic-card { padding: 14px 14px 12px; gap: 5px; }
  .topic-card h2 { font-size: 1rem; }
  .topic-card p { display: none; }
  .mix-card p { display: block; font-size: 0.8rem; }
  .mix-card { grid-column: 1 / -1; }
}

/* ---------- topic icons ---------- */
.topic-icon { width: 26px; height: 26px; color: #98a0af; margin-bottom: 2px; }
.mix-card .topic-icon { color: var(--brass-soft); opacity: 0.9; }
@media (max-width: 560px) { .topic-icon { width: 21px; height: 21px; } }

/* ---------- story quiz card: a light citrus note among the cream ---------- */
.story-card {
  background: linear-gradient(160deg, #faf0c4, #f5e8ad);
  border: 1px solid #eadc9a;
}
.story-card .topic-icon { color: #a9912f; }
.story-card h2 { color: #4a3f14; }
.story-card p { color: #7d6f3a; }
.story-card .level-chip { background: #fdf6d9; color: #8a6d15; border: 1px solid #e6d68f; }
.story-card .stars { color: #a9822a; }

/* each fun topic wears its own colour: citrus is the default above, and
   these calm siblings cycle through the rest of the fleet */
.story-card.tone-seafoam { background: linear-gradient(160deg, #d9f0e2, #c5e6d3); border-color: #a9d6bd; }
.story-card.tone-seafoam .topic-icon { color: #3d8a63; }
.story-card.tone-seafoam h2 { color: #143f2a; }
.story-card.tone-seafoam p { color: #41684f; }
.story-card.tone-seafoam .level-chip { background: #eaf7ef; color: #2f7350; border: 1px solid #b8dcc7; }
.story-card.tone-seafoam .stars { color: #4a8a68; }

.story-card.tone-sky { background: linear-gradient(160deg, #dcebf9, #c8def2); border-color: #a8c8e6; }
.story-card.tone-sky .topic-icon { color: #3a6ea5; }
.story-card.tone-sky h2 { color: #17324e; }
.story-card.tone-sky p { color: #48678a; }
.story-card.tone-sky .level-chip { background: #ecf3fb; color: #2f5c8a; border: 1px solid #bbd3ea; }
.story-card.tone-sky .stars { color: #4a76a5; }

.story-card.tone-apricot { background: linear-gradient(160deg, #fbe5d0, #f6d6b7); border-color: #e9c295; }
.story-card.tone-apricot .topic-icon { color: #b06e2a; }
.story-card.tone-apricot h2 { color: #4e2f11; }
.story-card.tone-apricot p { color: #82603b; }
.story-card.tone-apricot .level-chip { background: #fdf1e2; color: #8f5c1c; border: 1px solid #ecd1aa; }
.story-card.tone-apricot .stars { color: #a9752a; }

.story-card.tone-heather { background: linear-gradient(160deg, #e7e0f5, #dacfed); border-color: #c4b5e1; }
.story-card.tone-heather .topic-icon { color: #6d55a5; }
.story-card.tone-heather h2 { color: #2c2050; }
.story-card.tone-heather p { color: #5d5081; }
.story-card.tone-heather .level-chip { background: #f1ecfa; color: #5b4694; border: 1px solid #d0c3e9; }
.story-card.tone-heather .stars { color: #7a64a8; }

/* the Fun Questions subject card wears the same citrus as its topics */
.subject-card.fun-card {
  background: linear-gradient(160deg, #faf0c4, #f5e8ad);
  border: 1px solid #eadc9a;
}
.subject-card.fun-card .subject-icon { color: #a9912f; }
.subject-card.fun-card h2 { color: #4a3f14; }
.subject-card.fun-card p { color: #7d6f3a; }
.subject-card.fun-card .level-chip { background: #fdf6d9; color: #8a6d15; border: 1px solid #e6d68f; }
.subject-card.fun-card .stars { color: #a9822a; }

/* ---------- round 4: sets, choices, subject headers ---------- */

.set-count {
  background: var(--teal-soft); color: var(--teal);
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.03em;
  border-radius: 999px; padding: 3px 11px; white-space: nowrap;
}

.choice-wrap { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 6px; }
.choice-btn {
  border: 1.5px solid var(--line); background: #fffdf9; color: var(--ink);
  border-radius: 12px; padding: 14px 16px; font-size: 1.05rem; font-weight: 500;
  text-align: left; min-height: 52px; transition: border-color 0.1s ease, background 0.1s ease;
}
.choice-btn:hover:not(:disabled) { border-color: var(--teal); background: #fdfbf4; }
.choice-btn.chosen { border-color: var(--navy); background: var(--teal-soft); }
.choice-btn:disabled { opacity: 0.75; }

.fb-why { color: var(--muted); }
.set-summary .fb-note { font-size: 1.02rem; }

.subject-head {
  grid-column: 1 / -1;
  font-family: var(--font-display); font-weight: 600; color: var(--navy);
  font-size: 1.3rem; margin: 14px 0 0;
}

/* comprehension passages keep their paragraph break */
.q-prompt { white-space: pre-line; }

/* ---------- clues & diagrams ---------- */
.q-diagram { display: flex; justify-content: center; margin: 4px 0 14px; }
.q-diagram svg { max-width: 340px; width: 100%; height: auto; }
.q-photo {
  max-width: 420px; width: 100%; max-height: 260px; object-fit: cover;
  border-radius: 12px; border: 1px solid rgba(28, 44, 76, 0.12);
  box-shadow: 0 2px 10px rgba(28, 44, 76, 0.10);
}
.clue-box {
  background: var(--brass-soft); border-radius: 10px;
  padding: 4px 16px; margin: 0 0 18px;
}
.clue-line { margin: 10px 0; color: #6e5a1a; font-size: 0.97rem; }
.clue-line + .clue-line { border-top: 1px dashed rgba(122, 90, 20, 0.25); padding-top: 10px; }

/* ---------- home: subject cards, intro, flourish ---------- */

.home-intro {
  font-family: var(--font-display);
  font-size: 1.05rem; line-height: 1.7; color: #4d5568;
  max-width: 640px; margin: 0 0 18px;
}
.flourish { display: flex; gap: 22px; color: #b3ac9c; margin: 2px 0 20px; }
.flourish svg { width: 22px; height: 22px; }

.subject-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin-bottom: 18px;
}
.subject-card {
  text-align: left;
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 20px 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.09s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.subject-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(28,44,76,0.1), 0 14px 34px rgba(28,44,76,0.09); }
.subject-card.is-open { border-color: var(--teal); }
.subject-card h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--navy); }
.subject-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; flex: 1; }
.subject-icon { width: 34px; height: 34px; color: #98a0af; margin-bottom: 2px; }
.subject-card.mix-card .subject-icon { color: var(--brass-soft); }
.subject-card.mix-card h2, .subject-card.mix-card p { color: var(--cream); }
.subject-card.mix-card p { opacity: 0.75; }

.subject-expand { animation: rise 0.22s ease; margin-bottom: 30px; }

@media (max-width: 560px) {
  .subject-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .subject-card { padding: 16px 14px 12px; }
  .subject-card h2 { font-size: 1.05rem; }
  .subject-card p { display: none; }
  .home-intro { font-size: 0.98rem; }
}

/* mix card keeps its navy coat as a subject-level card */
.subject-card.mix-card { background: var(--navy); }
.subject-card.mix-card .level-chip { background: rgba(255,255,255,0.15); color: var(--brass-soft); }

/* ---------- admin ---------- */
.admin-invite-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.admin-select {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: #fffdf9; font: inherit; min-height: 50px;
}
.admin-family { flex: 0 1 260px; font-size: 1rem !important; }
.admin-new-code { background: var(--teal-soft); color: var(--teal); border-radius: 10px; padding: 12px 16px; }
.admin-actions .link-btn { margin-right: 10px; font-size: 0.85rem; }
.link-btn.danger { color: var(--rose); }
.mut-small { color: var(--muted); font-size: 0.8rem; }

/* ---------- add-to-home CTA ---------- */
.add-home-cta { margin: 6px 0 0; }
.add-home-cta a {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted); text-decoration: none; font-size: 0.88rem;
  padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); transition: color 0.12s ease, border-color 0.12s ease;
}
.add-home-cta a:hover { color: var(--teal); border-color: var(--teal); }
.add-home-cta img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.auth-cta { text-align: center; margin-top: 22px; }

/* two-step choice confirm */
.choice-go { grid-column: 1 / -1; margin-top: 2px; }
.choice-btn.chosen { border-color: var(--navy); background: var(--teal-soft); font-weight: 600; }

/* ---------- hierarchy: quiet extras + subject page ---------- */
.quiet-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 22px; }
.quiet-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; color: var(--muted); font-size: 0.88rem; font-weight: 500;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.quiet-btn:hover { color: var(--teal); border-color: var(--teal); }
.quiet-btn .topic-icon { width: 18px; height: 18px; margin: 0; color: currentColor; }

.subject-title { display: flex; align-items: center; gap: 12px; }
.subject-title .subject-icon { width: 30px; height: 30px; color: #98a0af; margin: 0; }
#view-subject .back-btn { margin-bottom: 14px; display: inline-block; }

/* ---------- guest mode ---------- */
.guest-entry { text-align: center; margin: 22px 0 0; }
.btn-guest {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: var(--teal);
  border: 2px solid var(--teal); border-radius: 999px;
  padding: 12px 30px; font-weight: 600; font-size: 1.02rem;
  min-height: 50px; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.06s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-guest:hover { background: var(--teal-soft); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(28,44,76,0.12); }
.btn-guest:active { transform: translateY(1px); }
.guest-boat { width: 20px; height: 20px; flex: none; }
.guest-entry-note { margin: 8px 0 0; color: var(--muted); font-size: 0.88rem; }
.guest-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--navy); color: var(--cream);
  padding: 10px 0; box-shadow: 0 -6px 24px rgba(20, 32, 56, 0.25);
}
.guest-bar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.guest-bar-text { font-size: 0.9rem; opacity: 0.85; flex: 1; min-width: 200px; }
.guest-bar-btn { padding: 8px 18px; min-height: 40px; font-size: 0.9rem; }
.guest-bar-form { display: flex; gap: 8px; flex-wrap: wrap; }
.guest-bar-form input {
  border: none; border-radius: 999px; padding: 8px 16px; min-height: 40px;
  font: inherit; font-size: 0.9rem; min-width: 210px;
}
.guest-bar-form .btn { min-height: 40px; padding: 8px 20px; font-size: 0.9rem; }
.guest-bar-done { font-size: 0.9rem; color: var(--brass-soft); }
body:has(.guest-bar:not([hidden])) main { padding-bottom: 90px; }

/* ---------- site footer: the good-faith note ---------- */
.site-footer {
  max-width: 560px; margin: 40px auto 0; padding: 18px 20px 30px;
  text-align: center;
}
.site-footer p {
  margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.55;
  border-top: 1px solid rgba(28, 44, 76, 0.12); padding-top: 16px;
}
body:has(.guest-bar:not([hidden])) .site-footer { padding-bottom: 100px; }
