/* Layout: a sky header (one little house per home under a rising/setting sun), pill tabs, then soft
   paper-like cards. Light mode = sunrise (apricot, gold); dark mode = sunset (plum dusk, amber). */
:root {
  --sky-top: #ffcf9a; --sky-mid: #ffe4c2; --sky-low: #fff3e2;
  --sun: #f7b733; --glow: #ffd36b; --stars: 0; --cloud: #fff8ef;
  --hill-back: #b9d3a8; --hill-front: #8fb98b; --plant: #6f9e75;
  --wall: #fff6ea; --window: #ffd977; --door: #b8644a;

  --bg: #fff6ec;
  --card: #fffdf9;
  --card-2: #fcefe1;
  --ink: #45302a;
  --muted: #8d7166;
  --line: #f1dccb;
  --accent: #d9714e;      /* terracotta */
  --accent-ink: #fffaf4;
  --sunny: #f6b93b;
  --sunny-soft: #fff0c9;
  /* One tone per home (up to 5): terracotta, sage, ochre, dusk blue, plum */
  --t1: #d9714e; --t1-soft: #fbe2d6;
  --t2: #5f9468; --t2-soft: #e1eedc;
  --t3: #b98316; --t3-soft: #f8eac4;
  --t4: #5677a8; --t4-soft: #e0e8f4;
  --t5: #a35a7c; --t5-soft: #f4e0ea;
  --t6: #2f8a84; --t6-soft: #d9efec;
  --t7: #c4566f; --t7-soft: #f8dde3;
  --t8: #66708a; --t8-soft: #e4e7ef;
  --weekend: #f5e6dc; --holiday: #fde9b8; --holiday-ink: #8a5a00;
  --rain: #7d8fb3;
  --rain-soft: #e7ebf5;
  --shadow: 0 2px 0 rgb(69 48 42 / .06), 0 10px 30px -12px rgb(150 80 40 / .25);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-note: italic 400 1.05rem/1.3 'Fraunces', Georgia, serif;
  --r-lg: 26px; --r-md: 18px; --r-sm: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky-top: #241a3a; --sky-mid: #5b2f55; --sky-low: #d26a4a;
    --sun: #ff9f43; --glow: #ff7b54; --stars: 1; --cloud: #7a4766;
    --hill-back: #4a3550; --hill-front: #35263d; --plant: #5b4766;
    --wall: #5d4458; --window: #ffc964; --door: #2b1f33;
    --bg: #221927; --card: #30243a; --card-2: #3b2d45; --ink: #fbebdc; --muted: #c6aaa0; --line: #4b3a52;
    --accent: #ff9a76; --accent-ink: #2a1b22; --sunny: #ffb84d; --sunny-soft: #4a3628;
    --t1: #ff9a76; --t1-soft: #4c2f33; --t2: #9fd09f; --t2-soft: #2f3f35; --t3: #f2c160; --t3-soft: #4a3c22; --t4: #9db8e8; --t4-soft: #2e3550; --t5: #e39bbd; --t5-soft: #4a2c40; --t6: #7fd1c8; --t6-soft: #24403e; --t7: #f29fb3; --t7-soft: #4a2633; --t8: #b6bfd6; --t8-soft: #33384a;
    --rain: #a9b8dd; --rain-soft: #343552; --weekend: #3a2c3c; --holiday: #4d3a1c; --holiday-ink: #ffcf73;
    --shadow: 0 2px 0 rgb(0 0 0 / .2), 0 14px 34px -14px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky-top: #241a3a; --sky-mid: #5b2f55; --sky-low: #d26a4a;
  --sun: #ff9f43; --glow: #ff7b54; --stars: 1; --cloud: #7a4766;
  --hill-back: #4a3550; --hill-front: #35263d; --plant: #5b4766;
  --wall: #5d4458; --window: #ffc964; --door: #2b1f33;
  --bg: #221927; --card: #30243a; --card-2: #3b2d45; --ink: #fbebdc; --muted: #c6aaa0; --line: #4b3a52;
  --accent: #ff9a76; --accent-ink: #2a1b22; --sunny: #ffb84d; --sunny-soft: #4a3628;
  --t1: #ff9a76; --t1-soft: #4c2f33; --t2: #9fd09f; --t2-soft: #2f3f35; --t3: #f2c160; --t3-soft: #4a3c22; --t4: #9db8e8; --t4-soft: #2e3550; --t5: #e39bbd; --t5-soft: #4a2c40; --t6: #7fd1c8; --t6-soft: #24403e; --t7: #f29fb3; --t7-soft: #4a2633; --t8: #b6bfd6; --t8-soft: #33384a;
  --rain: #a9b8dd; --rain-soft: #343552; --weekend: #3a2c3c; --holiday: #4d3a1c; --holiday-ink: #ffcf73;
  --shadow: 0 2px 0 rgb(0 0 0 / .2), 0 14px 34px -14px rgb(0 0 0 / .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.55 var(--font-body); -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--sunny); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-family: var(--font-display); font-weight: 500; font-variation-settings: 'SOFT' 100; letter-spacing: -.01em; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.note-font { font: var(--font-note); }

/* ---------- Sky ---------- */
.sky { position: relative; overflow: hidden; min-height: 230px; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-top { stop-color: var(--sky-top); } .sky-mid { stop-color: var(--sky-mid); } .sky-low { stop-color: var(--sky-low); }
.glow-in { stop-color: var(--glow); stop-opacity: .75; } .glow-out { stop-color: var(--glow); stop-opacity: 0; }
.sun { fill: var(--sun); }
.sun-group { transform: translateY(var(--sun-y, 0px)); transition: transform 2.4s cubic-bezier(.2, .8, .2, 1); }
.stars circle { fill: #fff6dc; opacity: var(--stars); }
.clouds path { fill: var(--cloud); opacity: .85; }
.hill-back { fill: var(--hill-back); } .hill-front { fill: var(--hill-front); }
.plants path { fill: var(--plant); }
.house .wall { fill: var(--wall); } .house .window { fill: var(--window); } .house .door { fill: var(--door); }
.house .roof { fill: var(--c); }
.sky-inner {
  position: relative; max-width: 1100px; margin: 0 auto; padding: 18px 20px 110px;
  display: grid; gap: 6px;
}
.topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.logo { font: italic 500 1.2rem/1 var(--font-display); font-variation-settings: 'SOFT' 100; color: var(--ink); opacity: .85; }
.ghost-btn { border: 0; background: color-mix(in srgb, var(--card) 55%, transparent); width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; backdrop-filter: blur(4px); }
.ghost-btn:hover { background: var(--card); }
.greeting { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.08; font-weight: 400; max-width: 20ch; font-variation-settings: 'SOFT' 100, 'opsz' 144; }
.greeting-sub { font-size: 1.05rem; max-width: 46ch; color: var(--ink); opacity: .85; }

/* ---------- Tabs ---------- */
.tabs {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: flex; justify-content: center; gap: 6px;
  margin: -34px auto 0; width: max-content; max-width: calc(100% - 32px); padding: 6px;
  background: var(--card); border-radius: 999px; box-shadow: var(--shadow);
}
.tabs button {
  border: 0; background: none; border-radius: 999px; padding: .55rem 1.1rem;
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--muted);
  transition: background .2s, color .2s, transform .15s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--sunny-soft); color: var(--ink); }
.tabs button:active { transform: scale(.96); }
.tab-ico { font-size: 1.15rem; }

.main { max-width: 1100px; margin: 0 auto; padding: 28px 16px 120px; display: grid; gap: 34px; }
.main > * { min-width: 0; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; font: var(--font-note); font-size: 1.4rem; }

/* ---------- Section headings ---------- */
.sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sec-head h2 { font-size: 1.55rem; }
.sec-head .note { font: var(--font-note); color: var(--accent); }
.sec-head .spacer { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  border: 0; border-radius: 999px; padding: .7rem 1.3rem; font-weight: 700; display: inline-flex; align-items: center; gap: .5rem;
  justify-content: center; transition: transform .15s, filter .15s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-sun { background: var(--sunny); color: #3b2414; box-shadow: 0 3px 0 color-mix(in srgb, var(--sunny) 60%, #8a4b10); }
.btn-sun:hover { filter: brightness(1.05); }
.btn-terra { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 65%, #4a1a0a); }
.btn-soft { background: var(--card-2); color: var(--ink); }
.btn-soft:hover { filter: brightness(.98); }
.btn-text { background: none; color: var(--accent); padding-inline: .6rem; }
.btn-small { padding: .4rem .9rem; font-size: .9rem; }

/* ---------- Home cards ---------- */
.homes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.home-card {
  --c: var(--t1); --soft: var(--t1-soft);
  background: var(--card); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; position: relative; overflow: hidden;
}
.home-card::after { content: ''; position: absolute; right: -56px; top: -56px; width: 120px; height: 120px; border-radius: 50%; background: var(--soft); z-index: 0; }
.home-card > * { position: relative; z-index: 1; }
.ring { width: 96px; height: 96px; grid-row: span 3; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--soft); } .ring .fill { stroke: var(--c); transition: stroke-dashoffset 1s ease; }
.ring .face { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.3rem; }
.home-card h3 { font-size: 1.35rem; display: flex; align-items: center; gap: .4rem; }
.home-card .mood { font-weight: 700; color: var(--c); }
.home-card .next { font-size: .92rem; color: var(--muted); }

/* ---------- Chore cards (Today / day lists) ---------- */
.days { display: grid; gap: 22px; }
.day-label { font: 600 1rem/1 var(--font-body); margin-bottom: 10px; display: flex; align-items: center; gap: .5rem; }
.day-label .when { font: var(--font-note); font-size: 1rem; color: var(--muted); }
.chores { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.chore {
  --c: var(--t1); --soft: var(--t1-soft);
  background: var(--card); border-radius: var(--r-md); padding: 12px 12px 12px 14px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  transition: transform .2s, opacity .3s;
}
.blob {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.65rem; background: var(--soft);
  border-radius: 16px; flex: none;
}
.chore-name { font-weight: 700; line-height: 1.25; }
.chore-meta { font-size: .85rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.pill { display: inline-flex; align-items: center; gap: .25rem; background: var(--soft); color: var(--ink); border-radius: 999px; padding: .05rem .55rem; font-size: .8rem; font-weight: 700; }
.chore-body { border: 0; background: none; text-align: left; padding: 0; min-width: 0; }
.tick {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c) 45%, var(--line));
  background: none; display: grid; place-items: center; font-size: 1.3rem; color: transparent; transition: all .2s;
}
.tick:hover { background: var(--soft); color: var(--c); }
.chore.done { opacity: .62; }
.chore.done .chore-name { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--c); }
.chore.done .tick { border: 0; background: var(--c); color: var(--card); }
.chore.pop { animation: pop .5s ease; }
@keyframes pop { 40% { transform: scale(1.02); } }

.rainy { background: var(--rain-soft); border-radius: var(--r-lg); padding: 18px; }
.rainy .sec-head h2 { font-size: 1.25rem; }
.rainy .chore { --c: var(--rain); --soft: var(--rain-soft); }

.empty {
  background: var(--card); border-radius: var(--r-lg); padding: 28px 22px; text-align: center; box-shadow: var(--shadow);
  display: grid; gap: 8px; justify-items: center;
}
.empty .big { font-size: 3rem; }
.empty h3 { font-size: 1.3rem; }

.sync-card {
  background: linear-gradient(120deg, var(--sunny-soft), var(--card)); border-radius: var(--r-lg); padding: 20px 22px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow);
}
.sync-card .big { font-size: 2.6rem; }
.sync-card div { flex: 1 1 240px; }
.sync-card h3 { font-size: 1.2rem; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { font-size: 1.6rem; }
.month-nav { display: inline-flex; gap: 8px; }

/* Calendar search */
.cal-search { position: relative; display: flex; align-items: center; }
.cal-search .search-ico { position: absolute; left: 14px; font-size: .95rem; pointer-events: none; }
.cal-search input {
  width: min(260px, 100%); border: 0; background: var(--card); border-radius: 999px; box-shadow: var(--shadow);
  padding: .6rem 1rem .6rem 2.4rem; font-weight: 500;
}
.cal-search input:focus { outline: 2px solid var(--sunny); }
.cal-results {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: min(340px, calc(100vw - 32px));
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px;
}
.find-hit {
  --c: var(--t1); --soft: var(--t1-soft);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; text-align: left;
  border: 0; background: none; border-radius: 12px; padding: 6px 8px; width: 100%;
}
.find-hit:hover, .find-hit:focus-visible, .find-hit[aria-selected="true"] { background: var(--card-2); }
.find-hit .blob { width: 38px; height: 38px; font-size: 1.2rem; border-radius: 12px; }
.find-text { display: grid; min-width: 0; }
.find-text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-text .muted { font-size: .82rem; }
.find-none { padding: 10px 12px; color: var(--muted); font-size: .9rem; }
.found {
  display: inline-flex; align-items: center; gap: .4rem; background: var(--soft); border-radius: 999px;
  padding: .35rem .4rem .35rem .9rem; font-weight: 600; box-shadow: inset 0 0 0 2px var(--c);
}
.found-x { border: 0; background: var(--card); width: 26px; height: 26px; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.day.match { box-shadow: inset 0 0 0 2.5px var(--sunny); background: var(--sunny-soft); }
.sticker.dim { opacity: .25; filter: grayscale(.6); }

/* Drag and drop */
.sticker[data-drag] { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sticker.dragging { opacity: .3; }
.drag-ghost {
  position: fixed; z-index: 90; pointer-events: none; margin: 0; transform: scale(1.35);
  box-shadow: inset 0 0 0 2px var(--c), 0 8px 18px rgb(0 0 0 / .25); cursor: grabbing;
}
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.day.drop-target { background: var(--sunny-soft); box-shadow: inset 0 0 0 2.5px var(--sunny); transform: none; }
.move-options { display: grid; gap: 10px; }
.move-opt {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; text-align: left;
  border: 2px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow);
}
.move-opt:hover, .move-opt:focus-visible { border-color: var(--sunny); }
.move-opt .em { font-size: 1.5rem; }
.move-opt b { display: block; font-weight: 700; }
.move-opt .muted { font-size: .9rem; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow); font-size: 1.2rem; font-weight: 700; }
.round-btn:hover { background: var(--sunny-soft); }
.legend { display: flex; gap: 8px; flex-wrap: wrap; }
.legend label { display: inline-flex; align-items: center; gap: .4rem; background: var(--card); border-radius: 999px; padding: .3rem .8rem .3rem .4rem; font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); cursor: pointer; }
.legend input { accent-color: var(--c); width: 18px; height: 18px; margin: 0; }
.cal { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 10px; }
.cal-dows, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dows div { text-align: center; font-weight: 700; font-size: .78rem; color: var(--muted); padding: 4px 0 8px; letter-spacing: .04em; }
.day {
  border: 0; background: var(--card-2); border-radius: 14px; min-height: 92px; padding: 6px; text-align: left;
  display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: transform .15s, background .15s;
}
.day:hover { transform: translateY(-2px); background: var(--sunny-soft); }
.day.out { background: none; opacity: .5; }
.day .n { font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: space-between; }
.day.today .n span:first-child { background: var(--sunny); color: #3b2414; border-radius: 999px; padding: 0 .45rem; }
.day.alldone .n span:last-child::after { content: '✨'; }
.stickers { display: flex; flex-wrap: wrap; gap: 2px; }
.sticker {
  width: 26px; height: 26px; display: grid; place-items: center; font-size: .95rem; border-radius: 50%;
  background: var(--card); box-shadow: inset 0 0 0 2px var(--c);
}
.sticker.done { background: var(--c); box-shadow: none; filter: saturate(.6); opacity: .65; }
.sticker.more { font-size: .7rem; font-weight: 700; box-shadow: inset 0 0 0 2px var(--line); }

/* ---------- Deck ---------- */
.deck-switch { display: inline-flex; background: var(--card-2); border-radius: 999px; padding: 4px; gap: 4px; }
.deck-switch button { border: 0; background: none; border-radius: 999px; padding: .45rem 1rem; font-weight: 700; color: var(--muted); }
.deck-switch button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.rooms { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; margin-bottom: 6px; }
.rooms::-webkit-scrollbar { display: none; }
.room {
  flex: none; border: 0; background: var(--card); border-radius: 999px; padding: .45rem .95rem .45rem .5rem;
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; box-shadow: var(--shadow); transition: transform .15s;
}
.room .ico { width: 30px; height: 30px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; }
.room[aria-pressed="true"] { background: var(--sunny); color: #3b2414; }
.room[aria-pressed="true"] .ico { background: #fff3d1; }
.room:active { transform: scale(.95); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.card {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 8px; position: relative; transition: transform .2s; min-width: 0;
}
.card:hover { transform: translateY(-2px); }
.card .art {
  height: 84px; border-radius: 16px; display: grid; place-items: center; font-size: 2.6rem;
  background: radial-gradient(circle at 30% 30%, var(--sunny-soft), var(--card-2));
}
.card h3 { font-size: 1.05rem; line-height: 1.25; font-weight: 600; }
.freq { align-self: flex-start; background: var(--sunny-soft); border-radius: 999px; padding: .1rem .65rem; font-size: .8rem; font-weight: 700; }
.card .tip { font-size: .85rem; color: var(--muted); flex: 1; }
.card .adders { display: grid; gap: 6px; margin-top: 4px; }
.adder {
  --c: var(--t1); --soft: var(--t1-soft);
  flex: 1; border: 2px solid var(--c); background: none; color: var(--ink); border-radius: 999px; padding: .35rem .5rem;
  font-weight: 700; font-size: .82rem; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 0;
  transition: transform .15s, background .15s;
}
.adder:hover { background: var(--soft); }
.adder:active { transform: scale(.94); }
.adder.in { background: var(--c); color: var(--card); border-color: var(--c); }
.adder span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .stamp {
  position: absolute; top: 10px; right: 10px; font: var(--font-note); font-size: .85rem; color: var(--accent);
  background: var(--card); padding: .05rem .5rem; border-radius: 999px; border: 1px solid currentColor; line-height: 1.3;
}
.card.own { border: 2px dashed color-mix(in srgb, var(--sunny) 70%, var(--line)); background: var(--sunny-soft); box-shadow: none; justify-content: center; align-items: center; text-align: center; cursor: pointer; min-height: 260px; }
.card.own .art { background: var(--card); width: 92px; border-radius: 50%; }
.card.dealt { animation: deal .35s ease-out both; }
@keyframes deal { from { opacity: 0; transform: translateY(8px); } }

.mine-list { display: grid; gap: 24px; }
.home-block h3 { font-size: 1.25rem; display: flex; align-items: center; gap: .5rem; margin-bottom: 12px; }
.home-block h3 .count { font: 600 .9rem var(--font-body); color: var(--muted); }

/* ---------- Sheet ---------- */
.sheet {
  border: 0; padding: 0; background: var(--bg); color: var(--ink); border-radius: 28px; box-shadow: var(--shadow);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
}
.sheet::backdrop { background: rgb(40 20 30 / .45); backdrop-filter: blur(2px); }
.sheet[open] { animation: rise .3s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.sheet-inner { padding: 22px; display: grid; gap: 20px; }
.sheet-top { display: flex; align-items: center; gap: 10px; }
.sheet-top h2 { font-size: 1.5rem; flex: 1; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card-2); font-size: 1.1rem; font-weight: 700; }
.dots { display: flex; gap: 6px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: all .2s; }
.dots span.on { background: var(--accent); width: 22px; border-radius: 4px; }
.step { display: grid; gap: 12px; }
.step h3 { font-size: 1.2rem; }
.step .hint { font: var(--font-note); color: var(--accent); }
.big-input {
  border: 0; border-bottom: 2px solid var(--line); background: none; font: 400 1.5rem/1.3 var(--font-display); padding: .4rem 0; width: 100%;
}
.big-input:focus { outline: none; border-bottom-color: var(--sunny); border-bottom-style: solid; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.emoji-grid button { border: 0; background: var(--card); border-radius: 14px; aspect-ratio: 1; font-size: 1.4rem; transition: transform .12s; }
.emoji-grid button:hover { transform: scale(1.12); }
.emoji-grid button[aria-pressed="true"] { background: var(--sunny); transform: scale(1.08); }
.bubbles { display: flex; flex-wrap: wrap; gap: 8px; }
.bubble {
  border: 0; background: var(--card); border-radius: 999px; padding: .55rem 1rem; font-weight: 700; box-shadow: var(--shadow);
  transition: transform .12s, background .15s;
}
.bubble:active { transform: scale(.94); }
.bubble[aria-pressed="true"] { background: var(--sunny); color: #3b2414; }
.bubble.round { width: 52px; height: 52px; padding: 0; }
.homes-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.home-pick {
  --c: var(--t1); --soft: var(--t1-soft);
  border: 3px solid transparent; background: var(--card); border-radius: 22px; padding: 16px 10px; display: grid; justify-items: center; gap: 4px;
  font-weight: 700; box-shadow: var(--shadow); transition: transform .15s;
}
.home-pick.both { --c: var(--sunny); --soft: var(--sunny-soft); }
.home-pick .em { font-size: 2.3rem; }
.home-pick[aria-pressed="true"] { border-color: var(--c); background: var(--soft); transform: translateY(-2px); }
.stepper { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.stepper button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card-2); font-weight: 700; font-size: 1.1rem; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; }
.say {
  background: var(--sunny-soft); border-radius: 18px; padding: 12px 16px; font-weight: 700; display: flex; gap: 10px; align-items: flex-start;
}
.say .em { font-size: 1.4rem; line-height: 1.2; }
.sheet textarea, .sheet input[type="date"], .sheet input[type="text"] {
  width: 100%; border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: .7rem .85rem;
}
.sheet textarea { resize: vertical; min-height: 80px; }
.sheet-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sheet-foot .spacer { flex: 1; }
.danger { color: #c8452f; }
:root[data-theme="dark"] .danger { color: #ff8f7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .danger { color: #ff8f7a; } }
.row-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }

.feed {
  --c: var(--t1); --soft: var(--t1-soft);
  background: var(--card); border-radius: 20px; padding: 14px; display: grid; gap: 10px; box-shadow: var(--shadow);
}
.feed .t { font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.feed code { font-size: .78rem; background: var(--card-2); padding: .5rem .6rem; border-radius: 10px; overflow-x: auto; white-space: nowrap; display: block; user-select: all; }
.feed .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.feed .btn-terra { background: var(--c); }
.warn-note { background: var(--sunny-soft); border-radius: 14px; padding: 10px 14px; font-size: .9rem; font-weight: 700; }
details summary { cursor: pointer; font-weight: 700; }
details ol { margin: 8px 0 0; padding-left: 1.2rem; display: grid; gap: 4px; }

/* ---------- Gate ---------- */
.gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: linear-gradient(var(--sky-top), var(--sky-low)); }
.gate-card { width: min(380px, 100%); background: var(--card); border-radius: 30px; padding: 30px 26px; display: grid; gap: 12px; text-align: center; box-shadow: var(--shadow); }
.gate-sun { width: 70px; height: 70px; border-radius: 50%; background: var(--sun); margin: -60px auto 4px; box-shadow: 0 0 0 12px color-mix(in srgb, var(--glow) 35%, transparent), 0 0 0 26px color-mix(in srgb, var(--glow) 15%, transparent); }
.gate-card h2 { font-size: 1.7rem; }
.gate-card input { border: 2px solid var(--line); background: var(--bg); border-radius: 999px; padding: .75rem 1.1rem; text-align: center; }
.gate-error { color: var(--accent); font-weight: 700; }

/* ---------- Toast & confetti ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: var(--bg); border-radius: 999px; padding: .75rem 1.2rem; font-weight: 700; box-shadow: var(--shadow);
  display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); animation: rise .3s ease;
}
.toast button { border: 0; background: var(--sunny); color: #3b2414; border-radius: 999px; padding: .2rem .8rem; font-weight: 700; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .sky { min-height: 210px; }
  .sky-inner { padding-bottom: 150px; }
  .greeting-sub { max-width: 30ch; }
  .tabs {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; margin: 0; width: auto; max-width: none; border-radius: 22px 22px 0 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); justify-content: space-around;
  }
  .tabs button { flex-direction: column; gap: 0; padding: .35rem .8rem; font-size: .78rem; }
  .tab-ico { font-size: 1.4rem; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); border-radius: 20px; }
  .main { padding-top: 22px; }
  .day { min-height: 64px; padding: 4px 3px; border-radius: 10px; }
  .cal-search, .cal-search input { width: 100%; }
  .cal-search input { width: 100%; }
  .cal { padding: 6px; }
  .cal-dows, .cal-grid { gap: 3px; }
  .sticker { width: 18px; height: 18px; font-size: .68rem; box-shadow: inset 0 0 0 1.5px var(--c); }
  .ring { width: 80px; height: 80px; }
  .sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 92dvh; }
  .sheet-inner { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Home tones (one per home, up to 5) ---------- */
.tone-1 { --c: var(--t1); --soft: var(--t1-soft); }
.tone-2 { --c: var(--t2); --soft: var(--t2-soft); }
.tone-3 { --c: var(--t3); --soft: var(--t3-soft); }
.tone-4 { --c: var(--t4); --soft: var(--t4-soft); }
.tone-5 { --c: var(--t5); --soft: var(--t5-soft); }
.tone-6 { --c: var(--t6); --soft: var(--t6-soft); }
.tone-7 { --c: var(--t7); --soft: var(--t7-soft); }
.tone-8 { --c: var(--t8); --soft: var(--t8-soft); }

/* Several homes: compact round add-buttons on deck cards */
.card .adders.compact { display: flex; flex-wrap: wrap; gap: 6px; }
.adders.compact .adder { flex: none; width: 42px; height: 42px; padding: 0; font-size: 1.15rem; }
.adders.compact .adder::after {
  content: '+'; position: absolute; top: -4px; right: -4px; font-size: .7rem; font-weight: 700; line-height: 1;
  background: var(--card); color: var(--c); border: 1.5px solid var(--c); border-radius: 50%; width: 17px; height: 17px; display: grid; place-items: center;
}
.adders.compact .adder.in::after { content: '✓'; background: var(--c); color: var(--card); }
.adder { position: relative; }

/* "Add another home" card */
.home-card.add {
  border: 2px dashed var(--line); background: none; box-shadow: none; display: flex; gap: 14px; align-items: center;
  justify-content: center; color: var(--muted); font-weight: 600; min-height: 136px; text-align: left;
}
.home-card.add::after { display: none; }
.home-card.add .em { font-size: 2rem; }
.home-card.add:hover { border-color: var(--sunny); color: var(--ink); }

/* Home list in settings */
.home-edit { background: var(--card); border-radius: 18px; padding: 14px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.home-edit .head { display: flex; align-items: center; gap: 10px; }
.home-edit .swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.home-edit input[type="text"] { flex: 1; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }

/* Getting-started */
.start {
  background: var(--card); border-radius: var(--r-lg); padding: 26px 22px; box-shadow: var(--shadow); display: grid; gap: 18px;
}
.start-head { display: grid; gap: 6px; max-width: 60ch; }
.start-head h2 { font-size: 1.6rem; }

/* "I noticed…" suggestions */
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.tip-card {
  background: var(--card); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start;
  border-left: 0; background-image: linear-gradient(135deg, var(--sunny-soft), transparent 60%);
}
.tip-body { display: grid; gap: 8px; }
.tip-body h3 { font-size: 1.1rem; }

/* Calendar: pictures or words */
.view-toggle { display: inline-flex; background: var(--card-2); border-radius: 999px; padding: 3px; gap: 2px; }
.view-toggle button { border: 0; background: none; border-radius: 999px; padding: .35rem .8rem; font-weight: 600; font-size: .88rem; color: var(--muted); }
.view-toggle button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.cal.words .stickers { flex-direction: column; flex-wrap: nowrap; gap: 3px; min-width: 0; }
.cal.words .sticker {
  width: auto; height: auto; border-radius: 7px; display: block; text-align: left; padding: .12rem .4rem;
  font-size: .74rem; font-weight: 600; line-height: 1.3; color: var(--ink); background: var(--soft);
  box-shadow: inset 3px 0 0 var(--c); overflow: hidden; min-width: 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cal.words .sticker.done { background: var(--soft); color: var(--muted); text-decoration: line-through; opacity: .7; filter: none; }
.cal.words .sticker.more { box-shadow: none; background: none; color: var(--muted); padding-left: .2rem; }
.drag-ghost.word {
  height: auto; border-radius: 7px; display: block; padding: .12rem .4rem; font-size: .74rem; font-weight: 600; line-height: 1.3;
  color: var(--ink); background: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: scale(1.1);
}
@media (max-width: 640px) {
  .cal.words .sticker { font-size: .6rem; padding: .08rem .25rem; box-shadow: inset 2px 0 0 var(--c); border-radius: 5px; }
  .view-toggle button { padding: .3rem .6rem; }
}

/* Sign-in links */
.gate-links { display: flex; justify-content: center; gap: 6px 14px; flex-wrap: wrap; }
.gate-links .btn-text { border: 0; background: none; color: var(--accent); font-weight: 600; padding: .3rem .2rem; }
.gate-card input[type="email"] { border: 2px solid var(--line); background: var(--bg); border-radius: 999px; padding: .75rem 1.1rem; text-align: center; }
.gate-card button[disabled] { opacity: .6; cursor: progress; }
.start.import input { border: 2px solid var(--line); background: var(--bg); border-radius: 999px; padding: .65rem 1rem; }

/* Weekends, public holidays */
.day.weekend { background: var(--weekend); }
.day.holiday { background: var(--holiday); }
.cal-dows .weekend { color: var(--accent); }
.hol {
  font-size: .68rem; font-weight: 700; color: var(--holiday-ink); line-height: 1.2;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hol-pill { margin-left: auto; font: 600 .78rem var(--font-body); color: var(--holiday-ink); background: var(--holiday); border-radius: 999px; padding: .15rem .6rem; }
.day-label { flex-wrap: wrap; }
@media (max-width: 640px) { .hol { font-size: 0; } .hol::first-letter { font-size: .8rem; } }

/* Not needed this time */
.card-actions { display: flex; align-items: center; gap: 6px; }
.skip {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; font-size: 1rem; opacity: .45;
  display: grid; place-items: center; transition: opacity .15s, background .15s;
}
.skip:hover, .skip:focus-visible { opacity: 1; background: var(--card-2); }
#s-country { width: 100%; border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: .7rem .85rem; }

/* Typeable stepper numbers */
.stepper .step-num {
  width: 3.2ch; min-width: 2.6rem; border: 0; background: none; text-align: center; font-weight: 700; font-size: 1.05rem;
  padding: .3rem 0; border-radius: 10px; -moz-appearance: textfield; appearance: textfield;
}
.stepper .step-num::-webkit-outer-spin-button, .stepper .step-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .step-num:focus { outline: 2px solid var(--sunny); background: var(--card-2); }

/* "Make it yours" hint on the chore deck */
.deck-hint {
  display: flex; gap: 10px; align-items: flex-start; background: var(--sunny-soft); border-radius: 16px;
  padding: 8px 16px; margin: 0 0 16px; font-weight: 500; font-size: .88rem; width: fit-content; max-width: 100%;
}
.deck-hint .em { font-size: 1rem; line-height: 1.4; }

/* Chore deck search */
.deck-search { position: relative; display: flex; align-items: center; }
.deck-search .search-ico { position: absolute; left: 14px; font-size: .9rem; pointer-events: none; }
.deck-search input {
  width: min(240px, 100%); border: 0; background: var(--card); border-radius: 999px; box-shadow: var(--shadow);
  padding: .55rem 1rem .55rem 2.3rem; font-weight: 500;
}
.deck-search input:focus { outline: 2px solid var(--sunny); }
@media (max-width: 640px) { .deck-search, .deck-search input { width: 100%; } }

/* Sign-in card: balanced, centred lines */
.gate-card p { text-wrap: balance; max-width: 30ch; margin-inline: auto; }

/* Home sheet: colours, address note, settings rows */
.tone-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.tone-pick button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--card); background: var(--c); box-shadow: 0 0 0 2px var(--line); transition: transform .12s; }
.tone-pick button:hover { transform: scale(1.08); }
.tone-pick button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.pdpa-note { font-size: .85rem; color: var(--muted); }
.home-card[data-edit-home] { cursor: pointer; transition: transform .15s; }
.home-card[data-edit-home]:hover { transform: translateY(-2px); }
.home-edit-pen { position: absolute; top: 12px; right: 14px; z-index: 2; color: var(--muted); font-size: .95rem; }
.home-row-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: var(--card);
  border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font-weight: 600;
}
.home-row-btn:hover { background: var(--soft); }
.home-row-btn .swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.home-row-btn .em { font-size: 1.3rem; }
.home-row-btn .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- To buy ---------- */
.buy-add { display: flex; gap: 8px; margin: 4px 0 16px; max-width: 560px; }
.buy-add input { flex: 1; min-width: 0; border: 2px solid var(--line); background: var(--card); border-radius: 999px; padding: .65rem 1.1rem; }
.buy-add input:focus { outline: none; border-color: var(--sunny); }
.buy-list { display: grid; gap: 10px; max-width: 760px; }
.buy-item {
  background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 10px 12px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
}
.buy-item .blob { width: 44px; height: 44px; font-size: 1.4rem; border-radius: 14px; }
.buy-name { display: grid; min-width: 0; }
.buy-name-btn {
  border: 0; background: none; padding: 2px 0; text-align: left; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; cursor: text;
}
.buy-name-btn .pen { font-size: .8rem; color: var(--muted); opacity: 0; transition: opacity .15s; }
.buy-name-btn:hover .pen, .buy-name-btn:focus-visible .pen { opacity: 1; }
@media (pointer: coarse) { .buy-name-btn .pen { opacity: .6; } }
.buy-edit-input {
  font: inherit; font-weight: 700; border: 2px solid var(--sunny); background: var(--bg); border-radius: 10px;
  padding: .25rem .5rem; width: 100%; min-width: 0;
}
.buy-name .muted { font-size: .82rem; }
.stepper.qty { box-shadow: none; background: var(--card-2); gap: 4px; padding: 2px; }
.stepper.qty button { width: 30px; height: 30px; font-size: .95rem; background: var(--card); }
.stepper.qty output { font-weight: 700; font-size: .9rem; min-width: 2.4ch; }
.chips-h { font: 600 1rem/1.2 var(--font-body); margin: 22px 0 10px; color: var(--muted); }
.small-note { margin-top: 18px; font-size: .88rem; }
.low-list { display: grid; gap: 10px; margin-bottom: 14px; max-width: 760px; }
.low-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: linear-gradient(135deg, var(--sunny-soft), var(--card)); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow);
}
.low-card .blob { width: 44px; height: 44px; font-size: 1.4rem; border-radius: 14px; background: var(--card); }
.low-text { display: grid; }
.low-text .muted { font-size: .85rem; }
.buy-peek {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 12px 16px; font-weight: 600;
}
.buy-peek .em { font-size: 1.4rem; }
.buy-peek span:nth-child(2) { flex: 1 1 200px; }
.install-tip {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; background: var(--card);
  border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow);
}
.install-tip .em { font-size: 1.6rem; }
.install-tip p { margin-top: 4px; }
@media (max-width: 640px) {
  .tabs button { padding: .35rem .5rem; }
  .buy-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .buy-item .stepper.qty { grid-column: 2; justify-self: start; }
  .buy-item .card-actions { grid-row: 1; grid-column: 3; }
  .low-card { grid-template-columns: auto 1fr; }
  .low-card .row-inline { grid-column: 1 / -1; }
}

/* ---------- Preview features ---------- */
.home-actions { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.visit-card, .pack-offer {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--card); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow);
}
.visit-card { background: linear-gradient(120deg, var(--soft), var(--card) 70%); }
.pack-offer { background: linear-gradient(120deg, var(--sunny-soft), var(--card) 70%); }
.visit-card .em, .pack-offer .em { font-size: 1.8rem; }
.visit-card p, .pack-offer p { margin-top: 2px; }
.pack-items { display: grid; gap: 8px; }
.pack-item {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left;
  border: 0; background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow);
}
.pack-item .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.pack-item[aria-pressed="true"] .box { background: var(--sunny); border-color: var(--sunny); color: #3b2414; }
.pack-item[aria-pressed="false"] .nm { color: var(--muted); }
.pack-item .em { font-size: 1.2rem; }
.pack-item .muted { font-size: .82rem; white-space: nowrap; }
.recap { background: var(--card); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.recap .sec-head { margin-bottom: 0; }
.recap-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.recap-grid div { background: var(--sunny-soft); border-radius: 16px; padding: 10px 16px; display: grid; min-width: 120px; }
.recap-grid b { font: 500 1.6rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.recap-grid span { font-size: .85rem; color: var(--muted); }
.helper-msg {
  white-space: pre-wrap; font: 500 .92rem/1.5 var(--font-body); background: var(--card); border-radius: 16px; padding: 14px 16px;
  border: 1px solid var(--line); max-height: 40vh; overflow: auto; margin: 0;
}
.note-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.note-row input { border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: .55rem .7rem; min-width: 0; }
@media (max-width: 640px) {
  .visit-card, .pack-offer { grid-template-columns: auto 1fr; }
  .visit-card .btn, .pack-offer .row-inline { grid-column: 1 / -1; }
  .note-row { grid-template-columns: 1fr auto; }
  .note-row input:nth-child(2) { grid-column: 1; }
}

/* ---------- Guided tour & guide book ---------- */
.top-btns { display: inline-flex; gap: 8px; }
#help-btn { font: 700 1.05rem var(--font-display); }
.tour { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.tour-dim { position: absolute; inset: 0; background: rgb(35 20 25 / .45); pointer-events: auto; }
.tour-target {
  z-index: 61 !important; border-radius: 16px;
  box-shadow: 0 0 0 4px var(--sunny), 0 0 0 9px color-mix(in srgb, var(--sunny) 35%, transparent) !important;
}
.tour-bubble {
  position: fixed; z-index: 62; width: min(340px, calc(100vw - 32px)); background: var(--card); color: var(--ink);
  border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow); pointer-events: auto; display: grid; gap: 8px;
  top: 30%; left: 16px; transition: top .25s, left .25s;
}
.tour-bubble h3 { font-size: 1.15rem; }
.tour-count { font-size: .78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.guide { display: grid; gap: 8px; }
.guide details { background: var(--card); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); }
.guide summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: .6rem; list-style: none; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after { content: '+'; margin-left: auto; font-size: 1.2rem; color: var(--muted); }
.guide details[open] summary::after { content: '–'; }
.guide .em { font-size: 1.2rem; }
.guide p { margin-top: 8px; color: var(--ink); opacity: .9; }
@media (prefers-reduced-motion: reduce) { .tour-bubble { transition: none; } }

#fb-email { width: 100%; border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: .7rem .85rem; }

.tour-bubble .spacer { flex: 1; }

.faq-search input { width: 100%; }
.faq-topic { font: 700 .78rem var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 10px 0 2px; }
.guide details summary { line-height: 1.35; }

/* 👁 Show / Hide on passcode boxes */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-left: 4rem !important; padding-right: 4rem !important; }
.pw-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none;
  padding: .3rem .5rem; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); border-radius: 8px;
}
.pw-eye:hover, .pw-eye:focus-visible { color: var(--accent); }

/* Sign-in buttons: words exactly centred, a small dark arrow pinned to the right */
.gate-go { position: relative; justify-content: center; }
.gate-go::after {
  content: '→'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.15rem; font-weight: 700; color: #3b2414; transition: right .15s;
}
.gate-go:hover::after { right: 18px; }

.account-edit { display: grid; gap: 8px; margin-top: 10px; max-width: 420px; }
.account-edit input[type="email"], .account-edit .pw-wrap input { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: .65rem .85rem; width: 100%; }
