/* =========================================================
   Stephanotes — design system
   Palette from the stephanotis flower. Pollen = "pinned", always and only.
   ========================================================= */

:root {
  --ink: #123528;
  --leaf: #1E5A41;
  --leaf-soft: #DCE7E0;
  --paper: #EEF2EC;
  --porcelain: #FDFDFB;
  --pollen: #F6E9C4;
  --pollen-deep: #C9A24B;
  --rose: #B85C5C;
  --rose-soft: #F3E1E1;
  --violet: #7C6B99;
  --violet-soft: #E9E4F1;
  --mist: #8FA79B;
  --line: #D9E1DB;
  --danger: #A33F3F;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18, 53, 40, 0.06), 0 6px 18px rgba(18, 53, 40, 0.06);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100%;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: var(--leaf); }

/* ---------- App frame (phone-sized column on desktop) ---------- */
.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  position: relative;
}
@media (min-width: 560px) {
  body { background: #E4EAE5; }
  .app { box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(18,53,40,.12); }
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 18px 10px;
  background: rgba(238, 242, 236, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.wordmark {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--serif);
  font-size: 22px; letter-spacing: 0.2px;
  color: var(--ink);
}
.wordmark svg { width: 22px; height: 22px; }
.topbar .room-title {
  font-size: 13px; color: var(--mist); text-transform: uppercase; letter-spacing: 1.2px;
}

/* ---------- Rooms ---------- */
main { padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 24px); }
.room { animation: fadeIn .18s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none;} }

h1, h2, h3 { margin: 0; font-weight: 600; }
.h-serif { font-family: var(--serif); font-weight: 500; }
.section-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--mist); margin: 22px 2px 10px; font-weight: 600;
}
.muted { color: var(--mist); }
.small { font-size: 13px; }

/* ---------- Cards ---------- */
.card {
  background: var(--porcelain);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.card + .card { margin-top: 10px; }

.note-card {
  display: block; width: 100%; text-align: left;
  background: var(--porcelain); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-top: 10px;
  border-left: 4px solid var(--cat, var(--leaf));
  transition: transform .08s ease;
}
.note-card:active { transform: scale(.985); }
.note-card .title { font-family: var(--serif); font-size: 17px; line-height: 1.3; }
.note-card .meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--mist); flex-wrap: wrap; }
.note-card .preview {
  margin-top: 8px; font-size: 14px; color: #3B5347;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.note-card .pincount { margin-left: auto; color: var(--pollen-deep); font-weight: 600; }
/* search matches use leaf, never pollen (pollen = pinned only) */
.note-card mark { background: var(--leaf-soft); color: var(--ink); border-radius: 3px; padding: 0 1px; }

/* Category tag pill */
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .3px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--cat-soft, var(--leaf-soft)); color: var(--cat, var(--leaf));
}

/* ---------- Category colours (set --cat / --cat-soft) ---------- */
[data-cat="Pharm"]                 { --cat: var(--leaf);        --cat-soft: var(--leaf-soft); }
[data-cat="Med-Surg"]              { --cat: var(--rose);        --cat-soft: var(--rose-soft); }
[data-cat="OB"]                    { --cat: var(--violet);      --cat-soft: var(--violet-soft); }
[data-cat="Peds"]                  { --cat: #3E8A8A;            --cat-soft: #DCEBEB; }
[data-cat="Mental Health"]         { --cat: #5C6FA8;            --cat-soft: #E1E5F2; }
[data-cat="Priority & Delegation"] { --cat: #A86A2C;            --cat-soft: #F2E6D8; }
[data-cat="Labs & Values"]         { --cat: #4B7B5F;            --cat-soft: #DDE9E1; }
[data-cat="General"]               { --cat: var(--mist);        --cat-soft: #E4EAE6; }

/* ---------- Chips ---------- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; white-space: nowrap;
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--porcelain); border: 1px solid var(--line); color: var(--ink);
}
.chip.on { background: var(--ink); color: var(--porcelain); border-color: var(--ink); }
.chip[data-cat].on { background: var(--cat); border-color: var(--cat); }

/* ---------- Search hero ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--porcelain); border-radius: 999px; box-shadow: var(--shadow);
  padding: 11px 14px; margin-top: 8px;
}
.search svg { width: 20px; height: 20px; flex: 0 0 auto; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; min-width: 0; }
.search input::placeholder { color: var(--mist); }
.search .clear { color: var(--mist); font-size: 18px; line-height: 1; padding: 2px 4px; }

/* Segmented toggle (Ledger / Shelves) */
.seg {
  display: inline-flex; background: #E2E9E4; border-radius: 999px; padding: 3px; margin-top: 12px;
}
.seg button { padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #4E665A; }
.seg button.on { background: var(--porcelain); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Shelves */
.shelf { margin-top: 18px; }
.shelf-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 2px 6px; border-bottom: 2px solid var(--cat, var(--leaf));
}
.shelf-head h3 { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--cat, var(--leaf)); }
.shelf-head .count { font-size: 12px; color: var(--mist); }
.shelf .note-card { margin-top: 8px; }

/* ---------- Today ---------- */
.countdown {
  background: var(--ink); color: var(--porcelain);
  border-radius: 20px; padding: 22px 20px 20px; margin-top: 12px;
  position: relative; overflow: hidden;
}
.countdown .big { font-family: var(--serif); font-size: 64px; line-height: 1; font-weight: 500; }
.countdown .label { font-size: 14px; opacity: .85; margin-top: 4px; }
.countdown .date { font-size: 12px; opacity: .6; margin-top: 10px; letter-spacing: .3px; }
.countdown .star { position: absolute; right: -18px; top: -18px; width: 130px; height: 130px; opacity: .10; }
.stat-row { display: flex; gap: 10px; margin-top: 10px; }
.stat { flex: 1; background: var(--porcelain); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.stat .n { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.stat .l { font-size: 12px; color: var(--mist); }
.stat .sub { display: block; font-size: 11px; color: var(--leaf); font-weight: 600; margin-top: 2px; }
.range-seg { display: flex; width: 100%; margin-top: 14px; }
.range-seg button { flex: 1; padding: 7px 4px; font-size: 12.5px; white-space: nowrap; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center; color: var(--mist); padding: 36px 20px; font-size: 14px;
}
.empty svg { width: 34px; height: 34px; opacity: .5; margin-bottom: 8px; }

/* ---------- Bottom nav ---------- */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 30;
  background: rgba(253, 253, 251, 0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(8px + var(--safe-b));
  display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center;
}
.nav button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; font-weight: 600; color: var(--mist); padding: 4px 0 0;
  letter-spacing: .2px;
}
.nav button svg { width: 24px; height: 24px; }
.nav button.on { color: var(--ink); }
.nav .scan-btn {
  margin-top: -26px; /* disc floats above the bar */
}
.nav .scan-btn .disc {
  width: 58px; height: 58px; border-radius: 50%;
  border: 4px solid var(--paper);
  background: var(--leaf); color: var(--porcelain);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(30, 90, 65, .35);
  transition: transform .1s;
}
.nav .scan-btn.on .disc { background: var(--ink); }
.nav .scan-btn:active .disc { transform: scale(.94); }
.nav .scan-btn .disc svg { width: 28px; height: 28px; }

/* ---------- Note detail sheet (full screen) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40; background: var(--paper);
  max-width: 520px; margin: 0 auto;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: slideUp .22s ease-out;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0;} to { transform: none; opacity: 1;} }
.overlay .topbar { justify-content: flex-start; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--porcelain); box-shadow: var(--shadow); color: var(--ink);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.ghost { background: transparent; box-shadow: none; }

.detail { padding: 6px 18px 120px; }
.detail .title { font-family: var(--serif); font-size: 26px; line-height: 1.2; font-weight: 500; margin-top: 8px; }
.detail .meta { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--mist); flex-wrap: wrap; }
.detail .hint { font-size: 12px; color: var(--mist); margin: 18px 0 8px; }
.sentences { background: var(--porcelain); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; font-size: 16px; line-height: 1.75; }
.sentences .s {
  display: inline; border-radius: 4px; padding: 1px 2px; margin: 0 -2px;
  cursor: pointer; transition: background .12s;
}
.sentences .s:active { background: var(--leaf-soft); }
.sentences .s.pinned { background: var(--pollen); box-shadow: inset 0 -2px 0 var(--pollen-deep); }
.sentences .s.focus { animation: pulse 1.4s ease-out; }
@keyframes pulse { 0%, 40% { box-shadow: 0 0 0 4px var(--pollen-deep); } 100% { box-shadow: inset 0 -2px 0 var(--pollen-deep); } }
.sentences .para { display: block; height: 10px; }
.pin-list { margin-top: 12px; }
.pin-item {
  display: block; width: 100%; text-align: left;
  border-left: 3px solid var(--pollen-deep); background: var(--porcelain);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 10px 12px; margin-top: 8px;
  box-shadow: var(--shadow);
}
.pin-item .q { font-size: 14px; }
.pin-item .a { font-size: 14px; color: #3B5347; margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--pollen); }
.pin-item .ctx { font-size: 12px; color: var(--leaf); margin-top: 6px; font-weight: 600; }
.pin-item .meta { font-size: 11px; color: var(--mist); margin-top: 6px; display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; }
.pin-item .meta span:not(.tag) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Previous / Next pager pinned to the bottom of the note view */
.pager {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 45;
  display: flex; gap: 10px; padding: 10px 16px calc(12px + var(--safe-b));
  background: rgba(238, 242, 236, 0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.pager .btn { flex: 1; padding: 11px 14px; font-size: 14px; }
.pager .btn:disabled { opacity: .35; }

/* Photo bar in detail */
.photo-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--porcelain); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px 12px; margin-top: 14px; width: 100%; text-align: left;
}
.photo-bar img, .photo-bar .thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #E7DDC8; flex: 0 0 auto; }
.photo-bar .t { font-size: 14px; font-weight: 600; }
.photo-bar .d { font-size: 12px; color: var(--mist); }
.photo-bar svg.chev { margin-left: auto; width: 18px; height: 18px; color: var(--mist); }

/* Photo viewer */
.photo-view {
  position: fixed; inset: 0; z-index: 60; background: #0E1A15;
  display: flex; flex-direction: column;
}
.photo-view .bar { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-t)) 14px 10px; color: #fff; font-size: 14px; }
.photo-view .bar .icon-btn { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.photo-view .stage { flex: 1; overflow: auto; display: flex; -webkit-overflow-scrolling: touch; }
.photo-view img { max-width: 100%; margin: auto; touch-action: pinch-zoom; }
.photo-view .cap { color: rgba(255,255,255,.7); font-size: 12px; text-align: center; padding: 10px 14px calc(14px + var(--safe-b)); }

/* ---------- Bottom sheet (pin / annotation) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(18, 53, 40, .35);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .15s;
}
.sheet {
  width: 100%; max-width: 520px; background: var(--porcelain);
  border-radius: 20px 20px 0 0; padding: 10px 18px calc(18px + var(--safe-b));
  animation: slideUp .2s ease-out; box-shadow: 0 -8px 30px rgba(18,53,40,.15);
  max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch; /* long edit forms scroll instead of overflowing the phone */
}
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.sheet .quote { background: var(--pollen); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 15px; line-height: 1.5; }
.sheet label:not(.field) { display: block; font-size: 12px; color: var(--mist); font-weight: 600; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 1px; }
.sheet textarea {
  width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 16px; background: var(--paper); outline: 0;
}
.sheet textarea:focus { border-color: var(--leaf); background: #fff; }
.sheet .actions { display: flex; gap: 10px; margin-top: 14px; }
.sheet .linkish { display: flex; align-items: center; gap: 6px; margin: 14px auto 0; padding: 6px 10px; background: none; border: 0; font-size: 13px; font-weight: 600; color: var(--leaf); }
.sheet .linkish svg { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  background: var(--leaf); color: var(--porcelain); flex: 1;
  transition: transform .08s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn.secondary { background: #E2E9E4; color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); flex: 0 0 auto; }
.btn.small { padding: 8px 14px; font-size: 13px; flex: 0 0 auto; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }

/* ---------- Scan room ---------- */
.scan-hero {
  margin-top: 12px; border: 2px dashed #B9CBC0; border-radius: 20px; padding: 28px 18px;
  text-align: center; background: rgba(253,253,251,.6);
}
.scan-hero > svg { width: 44px; height: 44px; color: var(--leaf); }
.scan-hero p { margin: 8px 0 0; font-size: 14px; color: var(--mist); }
.scan-hero .btn-row { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.scan-hero .btn { flex: 0 0 auto; }
.progress { height: 6px; background: #E2E9E4; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--leaf); width: 0; transition: width .3s; }
.queue-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--porcelain); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; margin-top: 8px;
}
.queue-item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #DDE5DF; flex: 0 0 auto; }
.queue-item .info { flex: 1; min-width: 0; }
.queue-item .name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item .st { font-size: 12px; color: var(--mist); margin-top: 2px; }
.queue-item.done .st { color: var(--leaf); }
.queue-item.error .st { color: var(--danger); }
.queue-item .spin {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--leaf);
  animation: spin .8s linear infinite; flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg);} }
.queue-item .ok { color: var(--leaf); }
.queue-item .ok svg, .queue-item .retry svg { width: 20px; height: 20px; }
.queue-item .retry { color: var(--danger); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--rose-soft); }

/* ---------- Quiz room ---------- */
.quiz-card { margin-top: 12px; }
.q-progress { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--mist); margin-top: 12px; }
.q-stem { font-size: 17px; line-height: 1.5; margin-top: 10px; }
.q-opts { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.q-opt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%;
  background: var(--porcelain); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 15px; line-height: 1.4;
}
.q-opt .k { flex: 0 0 22px; height: 22px; border-radius: 50%; background: #E2E9E4; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.q-opt.sel { border-color: var(--ink); }
.q-opt.right { border-color: var(--leaf); background: #E6F0EA; }
.q-opt.right .k { background: var(--leaf); color: #fff; }
.q-opt.wrong { border-color: var(--rose); background: var(--rose-soft); }
.q-opt.wrong .k { background: var(--rose); color: #fff; }
.q-opt:disabled { cursor: default; }
.rationale { margin-top: 12px; background: var(--paper); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.rationale .verdict { font-weight: 700; margin-bottom: 4px; }
.rationale .verdict.ok { color: var(--leaf); }
.rationale .verdict.no { color: var(--rose); }
.rationale .src { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--leaf); }
.score-ring { font-family: var(--serif); font-size: 56px; line-height: 1; text-align: center; margin: 10px 0 2px; }
.score-sub { text-align: center; color: var(--mist); font-size: 14px; }
.opt-row { display: flex; gap: 8px; margin-top: 8px; }
.opt-row .chip { flex: 1; text-align: center; }

/* ---------- Header extras ---------- */
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-right .icon-btn { width: 36px; height: 36px; color: var(--mist); }
.admin-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  background: var(--pollen); color: #7A5E1C; padding: 2px 7px; border-radius: 999px; margin-right: 4px;
}

/* ---------- Gate: login + welcome ---------- */
.gate {
  position: fixed; inset: 0; z-index: 80; background: var(--paper);
  max-width: 520px; margin: 0 auto; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: calc(40px + var(--safe-t)) 24px calc(30px + var(--safe-b));
  animation: fadeIn .2s;
}
.gate .brand { text-align: center; margin-top: 8vh; }
.gate .brand svg { width: 64px; height: 64px; color: var(--leaf); }
.gate .brand h1 { font-family: var(--serif); font-size: 34px; font-weight: 500; margin-top: 8px; letter-spacing: .3px; }
.gate .brand p { color: var(--mist); font-size: 14px; margin: 4px 0 0; }
.gate form, .gate .step { margin-top: 36px; }
.field { display: block; margin-top: 16px; }
.field span { display: block; font-size: 12px; color: var(--mist); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--porcelain);
  padding: 12px 14px; font-size: 17px; outline: 0; -webkit-appearance: none; appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(30,90,65,.12); }
.field textarea { min-height: 80px; resize: vertical; }
.gate .err { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 18px; }
.gate .btn { margin-top: 18px; width: 100%; padding: 14px; font-size: 16px; }
.gate .mock-hint { text-align: center; color: var(--mist); font-size: 12px; margin-top: auto; padding-top: 24px; }
.shake { animation: shake .35s; }
@keyframes shake { 20%,60% { transform: translateX(-6px);} 40%,80% { transform: translateX(6px);} }

.welcome .dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.welcome .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.welcome .dots i.on { background: var(--leaf); }
.welcome .q { font-family: var(--serif); font-size: 28px; line-height: 1.2; font-weight: 500; margin-top: 30px; }
.welcome .sub { color: var(--mist); font-size: 14px; margin-top: 8px; }
.welcome .row { display: flex; gap: 10px; margin-top: 18px; }
.welcome .row .btn { margin-top: 0; width: auto; flex: 1; }
.welcome .row .btn.secondary { flex: 0 0 auto; padding-inline: 22px; }
.welcome .cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.welcome .cats .chip { padding: 9px 14px; font-size: 14px; }
.welcome .done { text-align: center; margin-top: 10vh; }
.welcome .done .big { font-family: var(--serif); font-size: 40px; font-weight: 500; }
.welcome .done .n { font-family: var(--serif); font-size: 72px; line-height: 1; color: var(--leaf); margin-top: 20px; }

/* ---------- Action sheet (··· menu) ---------- */
.action-list { display: flex; flex-direction: column; }
.action-list button {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px 4px; font-size: 16px; border-bottom: 1px solid var(--line);
}
.action-list button:last-child { border-bottom: 0; }
.action-list button svg { width: 20px; height: 20px; color: var(--mist); }
.action-list button.danger { color: var(--danger); }
.action-list button.danger svg { color: var(--danger); }
.action-list .hint { font-size: 12px; color: var(--mist); margin-left: auto; }
.sheet .field:first-of-type { margin-top: 4px; }
.sheet h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.sheet .field input, .sheet .field select { font-size: 16px; }
.settings-who { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.settings-who .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--leaf); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; }
.settings-who .name { font-weight: 600; }
.settings-who .role { font-size: 12px; color: var(--mist); }
.mantra { font-family: var(--serif); font-style: italic; font-size: 15px; opacity: .85; margin-top: 12px; line-height: 1.4; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); transform: translateX(-50%);
  background: var(--ink); color: var(--porcelain); padding: 10px 16px; border-radius: 999px; font-size: 14px;
  z-index: 70; box-shadow: 0 6px 20px rgba(0,0,0,.2); animation: fadeIn .15s;
  max-width: 90vw; text-align: center;
}
