/* Margie's Card Studio — big, warm, calm. Every control is ≥ 48 px tall with words on it. */
@font-face { font-family: 'Lora'; src: url('/fonts/Lora.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('/fonts/PlayfairDisplay.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Great Vibes'; src: url('/fonts/GreatVibes.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/fonts/Caveat.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/Nunito.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/CormorantGaramond.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('/fonts/Lora-Italic.woff2') format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('/fonts/PlayfairDisplay-Italic.woff2') format('woff2'); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/Nunito-Italic.woff2') format('woff2'); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/CormorantGaramond-Italic.woff2') format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  --fs: 1;
  --cream: #FBF6EC; --paper: #FFFFFF; --ink: #2B2520; --ink-soft: #5E534B; --red: #C8321E; --red-dark: #A3281A;
  --line: #E4D9C6; --tint: #F4EBDA; --focus: #1F5FBF; --sel: #2A6FDB;
  --radius: 14px; --shadow: 0 10px 30px rgba(60, 40, 20, .16), 0 2px 6px rgba(60, 40, 20, .10);
  --ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body { background: var(--cream); color: var(--ink); font: calc(20px * var(--fs))/1.45 var(--ui); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
h1 { font: 700 calc(30px * var(--fs))/1.2 'Lora', Georgia, serif; margin: 0 0 18px; }
h2 { font: 700 calc(24px * var(--fs))/1.25 'Lora', Georgia, serif; margin: 0 0 12px; }
h3 { font-size: calc(20px * var(--fs)); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 10px; }
p { margin: 0 0 12px; }
a { color: var(--red-dark); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { padding: 40px; font-size: calc(24px * var(--fs)); }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }

/* ---------- buttons ---------- */
.btn, .nav-btn, .tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--paper); color: var(--ink); font: 700 calc(20px * var(--fs))/1.15 var(--ui); text-decoration: none; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.on, .tab.on { background: var(--tint); border-color: var(--ink); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:active { background: var(--red-dark); }
.btn-quiet { background: transparent; }
.btn-big { min-height: 60px; font-size: calc(21px * var(--fs)); padding: 0 28px; }
.btn-huge { min-height: 68px; font-size: calc(24px * var(--fs)); width: 100%; }

/* ---------- login ---------- */
.login { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 20px; }
.login-logo { width: min(440px, 80vw); height: auto; }
.login-form { width: min(460px, 92vw); display: flex; flex-direction: column; gap: 14px; background: var(--paper); padding: 28px; border-radius: 20px; box-shadow: var(--shadow); }
.login-label { font: 700 calc(22px * var(--fs)) var(--ui); }
.login-input { min-height: 64px; font-size: calc(26px * var(--fs)); padding: 0 18px; border: 2px solid var(--ink-soft); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
.login-input::placeholder { color: var(--ink-soft); opacity: 1; font-style: italic; font-size: calc(22px * var(--fs)); }
.show-pw { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; font-size: calc(20px * var(--fs)); cursor: pointer; }
.show-pw input { width: 36px; height: 36px; min-height: 36px; accent-color: var(--red); margin: 0; }
.login-msg { min-height: 28px; color: var(--ink); margin: 0; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 6px 16px; background: var(--paper); border-bottom: 2px solid var(--line); min-height: 80px; }
.brand { display: flex; align-items: center; min-height: 60px; padding-right: 8px; }
.brand img { height: 60px; width: auto; display: block; }
.topnav { display: flex; gap: 6px; margin-left: auto; flex-wrap: nowrap; }
.nav-btn { border-color: transparent; background: transparent; padding: 0 16px; }
.nav-btn.on { background: var(--tint); border-color: var(--line); color: var(--red-dark); }
.screen { min-height: calc(100% - 80px); }
.page { max-width: 1180px; margin: 0 auto; padding: 24px 24px 40px; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; flex: 1 1 auto; }
.lead { font-size: calc(22px * var(--fs)); }
.empty { font-size: calc(21px * var(--fs)); color: var(--ink-soft); background: var(--paper); border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px 24px; }

/* ---------- home ---------- */
.home h1 { font-size: calc(30px * var(--fs)); }
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-height: 140px; padding: 18px 22px;
  border-radius: 18px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer; box-shadow: 0 2px 0 var(--line); }
.tile:active { transform: translateY(2px); box-shadow: none; }
.tile-ic { font-size: calc(40px * var(--fs)); line-height: 1; }
.tile-t { font: 700 calc(26px * var(--fs))/1.15 'Lora', Georgia, serif; }
.tile-bdays { background: #FBEFF4; border-color: #EBCFDB; }
.tile-people { background: #EEF4FB; border-color: #CFDDEB; }
.tile-s { font-size: calc(20px * var(--fs)); color: var(--ink-soft); }
.tile-birthday { background: #FDEEEA; border-color: #F1CFC6; }
.tile-thanks { background: #FFF6DD; border-color: #EEDFAE; }
.tile-sympathy { background: #EAF1F5; border-color: #CADAE3; }
.tile-brainstorm { background: #F1EDF7; border-color: #D9D0E8; }
/* v0.10.0: Holidays (4 across, the next one first and marked) and More occasions (3 across × 2) under the
   main grid — same big tiles, a little shorter, each row under a plain heading. */
.home-occ { margin-top: 26px; }
.home-occ h2 { margin-bottom: 10px; }
.occ-grid { display: grid; gap: 16px; }
.holidays-grid { grid-template-columns: repeat(4, 1fr); }
.more-grid { grid-template-columns: repeat(3, 1fr); }
.tile-sm { min-height: 120px; padding: 14px 20px; position: relative; }
.tile-sm .tile-ic { font-size: calc(34px * var(--fs)); }
.tile-sm .tile-t { font-size: calc(24px * var(--fs)); }
.tile.is-next { border: 3px solid var(--red); box-shadow: 0 2px 0 var(--red-dark); }
.tile-badge { align-self: flex-start; white-space: nowrap; margin: -4px 0 4px; padding: 4px 14px; border-radius: 999px; background: var(--red); color: #fff; font: 700 calc(18px * var(--fs))/1.25 var(--ui); text-align: center; }
.tile-thanksgiving { background: #FBEBDD; border-color: #EDCFB3; }
.tile-christmas { background: #E7F1E8; border-color: #C3DBC6; }
.tile-easter { background: #F3F6E2; border-color: #DCE3B9; }
.tile-valentine { background: #FCE8EE; border-color: #F0C6D3; }
.tile-anniversary { background: #F6EEF6; border-color: #E2CFE2; }
.tile-getwell { background: #FFF7DE; border-color: #EEDFAE; }
.tile-thinking { background: #EAF3F1; border-color: #C8DED8; }
.tile-congrats { background: #FDF0E4; border-color: #EFD3B8; }
.tile-encourage { background: #EEF1FA; border-color: #CDD5EC; }
.tile-favs .tile-ic { color: var(--red); }
.occ-tabs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.occ-row { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-shelf p { margin: 0 0 14px; }
.empty-shelf .row-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.coming-up { margin-top: 28px; }
.home-favs { margin-top: 28px; }
.home-favs-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.home-favs-head h2 { margin: 0; }
.fav-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.fav-pick { padding: 6px; background: var(--paper); border: 2px solid var(--line); border-radius: 12px; cursor: pointer; min-height: 48px; line-height: 0; }
.fav-pick:hover, .fav-pick:focus-visible { border-color: var(--red); }
.fav-pick canvas { display: block; border-radius: 4px; box-shadow: 0 1px 3px rgba(43,37,32,.18); }
.chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px; }

/* ---------- choose a design ---------- */
.search input { min-height: 56px; font-size: calc(20px * var(--fs)); padding: 0 16px; border: 2px solid var(--line); border-radius: 12px; width: 280px; background: #fff; color: var(--ink); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { border-radius: 999px; padding: 0 22px; }
/* The filter row on Choose a design (2026-11-02): big pills, the chosen one filled dark with a tick. */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin: -6px 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 52px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); font: 700 calc(20px * var(--fs))/1.15 var(--ui); cursor: pointer; }
.pill-n { font-weight: 400; color: var(--ink-soft); }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill.on .pill-n { color: #fff; }
.pill.on .pill-t::before { content: '✓ '; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 22px; }
.design { display: flex; flex-direction: column; gap: 8px; }
.design-pick { display: block; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; }
.design-pick img, .design-thumb { display: block; width: 100%; aspect-ratio: 4.25 / 5.5; object-fit: cover; border-radius: 4px; box-shadow: var(--shadow); background: #fff; }
.design-pick { width: 100%; }
.blank-face { display: block; width: 100%; background: #fff; border-radius: 4px; box-shadow: var(--shadow); }
.design-line { font: 600 calc(20px * var(--fs))/1.3 'Lora', Georgia, serif; margin: 4px 0 0; min-height: 50px; }
.design-btns { display: flex; gap: 8px; }
.design-btns .btn { flex: 1; padding: 0 10px; }
.fav.on { color: var(--red); border-color: var(--red); background: #FDEEEA; }

/* ---------- sheets ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(43, 37, 32, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet { background: var(--cream); border-radius: 22px; box-shadow: var(--shadow); width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.sheet-wide { width: min(980px, 100%); }
.sheet-head { padding: 22px 28px 6px; }
.sheet-head h2 { margin: 0; }
.sheet-body { padding: 10px 28px; overflow: auto; flex: 1 1 auto; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 28px 22px; border-top: 2px solid var(--line); }
.preview-faces { display: flex; gap: 28px; justify-content: center; align-items: flex-start; margin: 4px 0 18px; }
.preview-faces figure { margin: 0; text-align: center; }
.preview-faces canvas { display: block; box-shadow: var(--shadow); border-radius: 3px; background: #fff; }
.preview-faces figcaption { margin-top: 8px; font-weight: 700; color: var(--ink-soft); }
.fold-pick { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.fold-title { align-self: center; font-weight: 700; }
.fold-btn { flex: 1 1 280px; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 10px 16px; text-align: left; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.fold-btn.on { border-color: var(--red); background: #FDEEEA; }
.fold-btn small { display: block; font-size: calc(20px * var(--fs)); color: var(--ink-soft); }
.fold-svg { width: 48px; height: 60px; flex: none; }
.greetings .lead { font-size: calc(20px * var(--fs)); }
.greet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 20px; }
.greet { text-align: left; white-space: pre-line; min-height: 56px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: calc(20px * var(--fs))/1.4 'Lora', Georgia, serif; cursor: pointer; }
.greet:active { background: var(--tint); }
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.clip { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; min-height: 140px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); font: 700 calc(20px * var(--fs)) var(--ui); color: var(--ink); cursor: pointer; }
.clip img { width: 84px; height: 84px; object-fit: contain; color: var(--red); }

/* one quiet note at a time */
#note { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 200; display: flex; align-items: center; gap: 16px; background: var(--ink); color: #fff; padding: 10px 12px 10px 22px; border-radius: 16px; font-size: calc(20px * var(--fs)); box-shadow: var(--shadow); transition: transform .25s; max-width: calc(100vw - 32px); }
#note.show { transform: translate(-50%, 0); }
#note { pointer-events: none; } #note .btn { pointer-events: auto; background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- my cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.saved { display: flex; flex-direction: column; gap: 6px; }
.saved-pick { padding: 0; border: 0; background: none; cursor: pointer; }
.saved-pick img, .no-thumb { display: block; width: 100%; aspect-ratio: 4.25 / 5.5; object-fit: cover; border-radius: 4px; box-shadow: var(--shadow); background: #fff; }
.no-thumb { display: flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.saved-title { font: 700 calc(20px * var(--fs))/1.3 'Lora', Georgia, serif; margin: 6px 0 0; }
.saved-date { color: var(--ink-soft); font-size: calc(20px * var(--fs)); margin: 0; }
.saved-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.saved-btns .btn { flex: 1 1 auto; padding: 0 10px; font-size: calc(20px * var(--fs)); }
.settings-rows { margin-top: 36px; }

/* ---------- editor ---------- */
body.in-editor { overflow: hidden; }
body.in-editor .screen { height: calc(100vh - 80px); height: calc(100dvh - 80px); min-height: 0; }
.editor { height: 100%; display: flex; flex-direction: column; }
.ed-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 2px solid var(--line); background: var(--cream); }
.ed-title-wrap { flex: 1 1 auto; min-width: 120px; display: flex; align-items: center; gap: 10px; }
.ed-title-label { font-size: calc(20px * var(--fs)); font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.ed-title { width: 100%; min-height: 52px; font: 700 calc(21px * var(--fs)) var(--ui); padding: 0 14px; border: 2px solid var(--ink-soft); border-radius: 12px; background: #fff; color: var(--ink); }
.ed-title:focus { border-color: var(--focus); }
.save-state { color: var(--ink-soft); font-size: calc(20px * var(--fs)); white-space: nowrap; min-width: 92px; text-align: right; }
.ed-main { flex: 1 1 auto; display: flex; min-height: 0; }
.ed-verbs { flex: 0 0 186px; display: flex; flex-direction: column; gap: 8px; padding: 12px 10px; border-right: 2px solid var(--line); background: var(--paper); overflow: auto; }
.verb { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 12px; white-space: nowrap; border: 2px solid var(--line); border-radius: 12px; background: var(--cream); color: var(--ink); font: 800 calc(20px * var(--fs)) var(--ui); cursor: pointer; text-align: left; }
.verb-ic { width: 30px; text-align: center; font-size: calc(24px * var(--fs)); color: var(--red); font-family: 'Lora', Georgia, serif; }
.verb-gap { flex: 1 1 12px; min-height: 12px; }
.verb-save, .verb-print { background: var(--paper); }
.verb-print { background: var(--red); border-color: var(--red); color: #fff; }
.verb-print .verb-ic { color: #fff; }
.ed-center { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ed-faces { display: flex; gap: 8px; padding: 10px 14px 6px; justify-content: center; flex-wrap: nowrap; }
.face-btn { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 6px 12px 6px 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: 700 calc(20px * var(--fs)) var(--ui); cursor: pointer; white-space: nowrap; }
.face-btn.on { border-color: var(--red); background: #FDEEEA; color: var(--red-dark); }
.face-thumb { display: block; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ed-selbar { display: flex; align-items: center; justify-content: safe center; gap: 6px; min-height: 64px; padding: 4px 10px; flex-wrap: nowrap; overflow-x: auto; }
/* One row always: a wrapping bar changed the card's size between two taps (the card jumped under her finger). */
.ed-selbar .btn { padding: 0 12px; flex: none; }
.ed-selbar .hint { color: var(--ink-soft); font-size: calc(20px * var(--fs)); }
.ed-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 16px 20px; }
.ed-card { position: relative; background: #fff; box-shadow: var(--shadow); }
.ed-canvas { position: absolute; inset: 0; display: block; }
.ed-overlay { position: absolute; inset: 0; touch-action: none; }
.sel { position: absolute; border: 2px solid var(--sel); box-shadow: 0 0 0 1px rgba(255,255,255,.8); pointer-events: none; }
.handle { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: #fff; border: 3px solid var(--sel); pointer-events: auto; touch-action: none; }
.handle::before { content: ''; position: absolute; inset: -14px; }
.h-nw { left: 0; top: 0; cursor: nwse-resize; } .h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.h-se { left: 100%; top: 100%; cursor: nwse-resize; } .h-sw { left: 0; top: 100%; cursor: nesw-resize; }
.handle.rot { left: 50%; top: -40px; background: var(--sel); cursor: grab; }
.rot-stem { position: absolute; left: 50%; top: -30px; height: 30px; width: 2px; background: var(--sel); }
.guide { position: absolute; background: #E0457B; pointer-events: none; }
.guide-x { top: 0; bottom: 0; width: 1px; } .guide-y { left: 0; right: 0; height: 1px; }
.edit-text { position: absolute; transform-origin: center; margin: 0; padding: 0; border: 0; box-sizing: content-box; background: transparent; resize: none; overflow: hidden; outline: 2px dashed var(--sel); outline-offset: 3px; white-space: pre-wrap; overflow-wrap: break-word; -webkit-text-fill-color: transparent; }
.edit-text::selection { background: rgba(58,110,165,.30); -webkit-text-fill-color: transparent; }
.ed-tools { flex: 0 0 300px; overflow: auto; padding: 12px 14px 24px; border-left: 2px solid var(--line); background: var(--paper); }
.ed-tools section { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.ed-tools .row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ed-tools .row.wrap { flex-wrap: wrap; }
.ed-tools .row .btn { flex: 1 1 auto; padding: 0 10px; }
.readout { min-width: 64px; text-align: center; font-weight: 800; }
.font-list { display: flex; flex-direction: column; gap: 6px; }
.font-btn { min-height: 56px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: calc(24px * var(--fs)); text-align: left; padding: 0 14px; cursor: pointer; }
.font-btn.on { border-color: var(--red); background: #FDEEEA; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); background: var(--c); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--ink); }

@media (max-width: 1100px) {
  .ed-verbs { flex-basis: 176px; }
  .verb { font-size: calc(20px * var(--fs)); gap: 8px; }
  .ed-tools { flex-basis: 268px; }
  .face-btn { padding: 6px 10px 6px 6px; font-size: calc(20px * var(--fs)); }
}
@media (max-width: 900px) {
  .home-grid, .holidays-grid, .more-grid { grid-template-columns: repeat(2, 1fr); }
  .topnav .nav-btn { padding: 0 10px; }
  .brand img { height: 56px; }
  /* Portrait iPad (review iter1 #10): the face strip wraps to labels, the head wraps under the
     buttons, and More tools becomes a panel over the right edge with its own Close button. */
  .ed-head { flex-wrap: wrap; }
  .ed-head .btn { white-space: nowrap; }
  .ed-title-wrap { order: 10; flex-basis: 100%; }
  .ed-verbs { flex-basis: 150px; padding: 10px 8px; }
  .verb { font-size: calc(20px * var(--fs)); padding: 0 8px; gap: 6px; }
  .verb-ic { width: 22px; font-size: calc(20px * var(--fs)); }
  .ed-faces { flex-wrap: wrap; padding: 8px 10px 4px; }
  .face-thumb { display: none; }
  .face-btn { min-height: 52px; padding: 0 12px; font-size: calc(20px * var(--fs)); }
  .ed-tools { position: fixed; top: 80px; right: 0; bottom: 0; width: min(340px, 86vw); z-index: 60; box-shadow: -8px 0 30px rgba(60, 40, 20, .25); }
  .tools-close { display: flex !important; width: 100%; margin-bottom: 6px; }
  .bd-top { grid-template-columns: 1fr !important; }
  .print-grid { grid-template-columns: 1fr !important; }
}

/* ================= iteration 2 ================= */
.tools-close { display: none; }
.row-btns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.row-btns.stack { flex-direction: column; align-items: stretch; }
.row-btns .btn small { font-weight: 600; font-size: calc(20px * var(--fs)); margin-left: 6px; }
.small { font-size: calc(20px * var(--fs)); color: var(--ink-soft); }
.ed-selbar { position: relative; z-index: 5; }
/* floats over the top of the stage so the card never jumps when it appears */
.warn { position: absolute; left: 14px; right: 14px; top: calc(100% + 2px); text-align: center; margin: 0; box-shadow: 0 4px 12px rgba(60, 40, 20, .18); padding: 8px 14px; border-radius: 10px; background: #FDEBE8; color: #8E2414; font-weight: 700; font-size: calc(20px * var(--fs)); border: 2px solid #E7A89D; }
.el-proxy { position: absolute; pointer-events: none; transform-origin: center; border-radius: 4px; }
.el-proxy:focus { outline: none; }
.el-proxy:focus-visible { outline: 3px dashed var(--focus); outline-offset: 4px; }
.verb-greet { background: #FFF6DD; border-color: #EEDFAE; }

/* Greetings sheet: big, first-class */
.sheet-greetings .sheet { width: min(1040px, 100%); }
.greet-tabs .tab { min-height: 56px; font-size: calc(20px * var(--fs)); }
.greet-list { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.greet { font-size: calc(21px * var(--fs)); padding: 14px 18px; min-height: 64px; }
.greet-front .greet { font: 700 calc(22px * var(--fs))/1.3 'Playfair Display', Georgia, serif; }
.greet-signoff .greet { font: calc(26px * var(--fs))/1.2 'Caveat', cursive; }

/* conflict + still-saving sheets */
.conflict-pick { display: flex; gap: 28px; justify-content: center; margin: 10px 0 6px; }
.conflict-pick figure { margin: 0; text-align: center; }
.conflict-pick canvas { display: block; box-shadow: var(--shadow); background: #fff; }
.conflict-pick figcaption { margin-top: 8px; font-weight: 800; }
.conflict-pick small { font-weight: 600; color: var(--ink-soft); font-size: calc(20px * var(--fs)); }
.still-status { font-weight: 700; color: var(--ink-soft); }

/* ---------- print ---------- */
.sheet-print .sheet { width: min(1060px, 100%); }
.print-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps h3, .print-side h3 { margin: 4px 0 8px; color: var(--ink); font-size: calc(20px * var(--fs)); }
.steps p { margin: 0 0 6px; }
.num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font: 800 calc(21px * var(--fs)) var(--ui); margin-right: 10px; }
.steps .num { margin-right: 0; }
.print .fold-btn { flex: 1 1 200px; min-height: 64px; padding: 6px 12px; }
.print .fold-btn b { font-size: calc(20px * var(--fs)); }
.print .fold-btn small { font-size: calc(20px * var(--fs)); line-height: 1.25; }
.print .fold-svg { width: 36px; height: 46px; }
.steps p { line-height: 1.35; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg .btn { padding: 0 16px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .btn { min-width: 64px; font-size: calc(28px * var(--fs)); }
.stepper .readout { font-size: calc(26px * var(--fs)); min-width: 48px; }
.print-side { display: flex; flex-direction: column; gap: 16px; }
.pv-pages { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.pv-pages figure { margin: 0; text-align: center; }
.pv-page { display: block; background: #fff; box-shadow: var(--shadow); }
.pv-pages figcaption { font-size: calc(20px * var(--fs)); font-weight: 700; color: var(--ink-soft); margin-top: 6px; }
/* Iteration 7 (review 6 should-fix 6): the "6" sits beside Print Now instead of on its own row, so Save as PDF
   is on screen at 1024×768 without scrolling. */
.step6 { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 10px; align-items: start; }
.step6 > .num { grid-row: 1; grid-column: 1; margin: 22px 0 0; }
.step6 > :not(.num) { grid-column: 2; }
@media (max-height: 800px) { .btn-print-now { min-height: 72px; } }
.btn-print-now { min-height: 84px; width: 100%; flex-direction: column; gap: 2px; background: var(--red); border-color: var(--red); color: #fff; font-size: calc(26px * var(--fs)); border-radius: 16px; }
.btn-print-now:disabled { opacity: .55; }
.pn-sub { font-size: calc(20px * var(--fs)); font-weight: 600; }
.pn-sub:empty { display: none; }
.btn-save-pdf[aria-disabled="true"] { opacity: .5; }
.ready-note { min-height: 0; margin: 0; color: var(--ink-soft); }
.ready-note:empty { display: none; }
.wizard { display: flex; flex-direction: column; gap: 10px; }
.wiz-step { margin: 0; }
.pdf-inline { width: 100%; height: 50vh; border: 2px solid var(--line); border-radius: 10px; background: #fff; }

/* the "put it back in" animation (spec §13.3) */
.ri-scene { position: relative; width: 300px; height: 300px; margin: 0 auto; perspective: 700px; }
.ri-printer { position: absolute; left: 30px; top: 0; width: 240px; height: 120px; background: #3B3431; border-radius: 16px; color: #fff; z-index: 2; }
.ri-printer > span { position: absolute; left: 16px; top: 12px; font-weight: 800; font-size: calc(20px * var(--fs)); }
.ri-slot { position: absolute; left: 50px; right: 50px; bottom: 18px; height: 8px; border-radius: 4px; background: #161210; }
.ri-tray { position: absolute; left: 34px; right: 34px; bottom: -14px; height: 22px; border-radius: 0 0 10px 10px; background: #5E534B; font-size: calc(14px * var(--fs)); text-align: center; line-height: 22px; }
.ri-move { position: absolute; left: 95px; top: 30px; width: 110px; height: 142px; z-index: 1; animation: ri-move 7s ease-in-out infinite; }
.ri-turn { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.ri-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4px; border: 2px solid #2B2520; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ri-front { background: #fff; color: var(--red); }
.ri-front b { font-size: calc(54px * var(--fs)); line-height: 1; }
.ri-face small { font-size: calc(14px * var(--fs)); color: var(--ink-soft); font-weight: 700; }
.ri-back { background: #EFE8DA; }
.ri-mark { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: var(--red); }
@keyframes ri-move { 0%, 4% { transform: translateY(0); } 24%, 76% { transform: translateY(124px); } 96%, 100% { transform: translateY(0); } }
.ri-up-short .ri-turn { animation: none; }
.ri-up-long .ri-turn { animation: ri-spin 7s ease-in-out infinite; }
.ri-down-short .ri-turn { animation: ri-flipY 7s ease-in-out infinite; }
.ri-down-long .ri-turn { animation: ri-flipX 7s ease-in-out infinite; }
.ri-down-short .ri-back { transform: rotateY(180deg); }
.ri-down-long .ri-back { transform: rotateX(180deg); }
.ri-up-short .ri-back, .ri-up-long .ri-back { display: none; }
@keyframes ri-spin { 0%, 30% { transform: rotateZ(0); } 55%, 100% { transform: rotateZ(180deg); } }
@keyframes ri-flipY { 0%, 30% { transform: rotateY(0); } 55%, 100% { transform: rotateY(180deg); } }
@keyframes ri-flipX { 0%, 30% { transform: rotateX(0); } 55%, 100% { transform: rotateX(180deg); } }
@media (prefers-reduced-motion: reduce) { .ri-move, .ri-turn { animation-duration: 14s !important; } }
.ri-text { font-size: calc(21px * var(--fs)); text-align: center; max-width: 640px; margin: 0 auto 8px; }

/* ---------- birthdays ---------- */
.bd-top { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.bd-day { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: sticky; top: 96px; }
.bd-day h2 { font-size: calc(22px * var(--fs)); }
.day-row { border-top: 2px solid var(--line); padding: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.day-row b { font: 700 calc(22px * var(--fs))/1.25 'Lora', Georgia, serif; }
.day-row span { color: var(--ink-soft); }
.empty-day { color: var(--ink-soft); }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-head h2 { flex: 1; text-align: center; margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; font-weight: 800; color: var(--ink-soft); font-size: calc(17px * var(--fs)); }
.cal-cell { min-height: 74px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 7px; border: 2px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; text-align: left; overflow: hidden; }
.cal-cell.has { background: #FDF3EE; border-color: #F0CDBF; }
.cal-cell.today { border: 3px solid var(--red); }
.cal-cell.cal-sel { box-shadow: 0 0 0 3px var(--ink) inset; }
.cal-num { font-weight: 800; font-size: calc(20px * var(--fs)); }
.cal-name { font-size: calc(16px * var(--fs)); line-height: 1.2; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-more { font-size: calc(15px * var(--fs)); color: var(--ink-soft); }
.bd-coming { margin-top: 26px; }
.bd-coming h2 small { font: 600 calc(20px * var(--fs)) var(--ui); color: var(--ink-soft); }
.bd-coming h3 { margin-top: 16px; }
.cu-list, .rem-list { display: flex; flex-direction: column; gap: 10px; }
.cu-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px 10px 18px; }
.cu-main { flex: 1 1 260px; display: flex; flex-direction: column; }
.cu-main b { font: 700 calc(22px * var(--fs))/1.25 'Lora', Georgia, serif; }
.cu-main span { color: var(--ink-soft); }
.cu-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sent-btn.on { background: #E7F0E6; border-color: #6F8A6A; color: #2F4A28; }
.is-sent .cu-main b { color: var(--ink-soft); }
.rem-row .cu-main b { font-size: calc(24px * var(--fs)); }
.chip.is-sent { opacity: .75; }
.for-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #FDEEEA; border: 2px solid #F1CFC6; border-radius: 14px; padding: 8px 10px 8px 18px; margin-bottom: 16px; font-size: calc(20px * var(--fs)); }
.for-banner span { flex: 1 1 300px; }

/* forms (Add a birthday, people) */
.date-form { display: flex; flex-direction: column; gap: 14px; }
.f-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.f-label { min-width: 120px; font-weight: 800; }
.f-label small { font-weight: 600; color: var(--ink-soft); font-size: calc(20px * var(--fs)); display: block; }
.field { flex: 1 1 240px; min-height: 56px; font: calc(22px * var(--fs)) var(--ui); padding: 0 16px; border: 2px solid var(--ink-soft); border-radius: 12px; background: #fff; color: var(--ink); }
textarea.field { padding: 12px 16px; min-height: 80px; resize: vertical; }
.field:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(31, 95, 191, .25); }
.field-year { flex: 0 1 170px; }
.arrows { display: inline-flex; align-items: center; gap: 6px; }
.arrow { min-width: 56px; font-size: calc(30px * var(--fs)); padding: 0; }
.arrow-val { min-width: 150px; text-align: center; font: 800 calc(23px * var(--fs)) var(--ui); }
.arrow-day { min-width: 56px; }
.form-msg { min-height: 0; margin: 0; color: #8E2414; font-weight: 700; }
.form-msg:empty { display: none; }
.f-city { align-items: flex-end; }
.f-city label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; }
.f-city label:first-child { flex: 2 1 220px; }
.f-city .f-label { min-width: 0; }
.bd-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1 1 400px; }

/* people */
.people-list { display: flex; flex-direction: column; gap: 10px; }
.person-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 76px; padding: 12px 20px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.person-row b { font: 700 calc(23px * var(--fs))/1.25 'Lora', Georgia, serif; }
.person-row span { color: var(--ink-soft); }

/* settings */
.set-sec { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; }
.set-sec h3 { margin-top: 18px; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: calc(20px * var(--fs)); }
.set-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.set-label { min-width: 190px; font-weight: 800; }
.ri-preview { margin-top: 8px; }

/* my cards */
.thumb-holder { display: block; width: 100%; }
.thumb-holder img, .thumb-canvas { display: block; width: 100%; aspect-ratio: 4.25 / 5.5; object-fit: cover; border-radius: 4px; box-shadow: var(--shadow); background: #fff; }
.saved-pick { width: 100%; }
.saved-draft { font-size: calc(20px * var(--fs)); font-weight: 700; color: #8E2414; margin: 0; }
.recently { margin-top: 36px; }
.deleted-row { display: flex; flex-direction: column; gap: 10px; }
.deleted { display: flex; align-items: center; gap: 16px; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.deleted > div { flex: 1; display: flex; flex-direction: column; }
.deleted > div span { color: var(--ink-soft); }
.thumb-holder.small { width: 64px; flex: none; }
.thumb-holder.small .no-thumb { font-size: calc(14px * var(--fs)); }

/* ---------- iteration 3 ---------- */
/* the month + day picker */
.dp { align-items: flex-start; }
.dp-month { flex: 0 0 auto; }
.dp-days { display: grid; grid-template-columns: repeat(7, 52px); gap: 6px; flex: 1 1 100%; margin-left: 132px; }
.dp-day { min-width: 0; min-height: 50px; padding: 0; font-size: calc(20px * var(--fs)); }
.dp-day.on { background: var(--red); border-color: var(--red); color: #fff; }
.sheet-date .dp-days { margin-left: 132px; }
@media (max-width: 760px) { .dp-days { margin-left: 0; } }

/* a person's card */
.person-form { display: flex; flex-direction: column; gap: 10px; }
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.pf-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pf-col .f-label { min-width: 110px; }
.pf-col .dp-days { margin-left: 0; grid-template-columns: repeat(7, minmax(44px, 1fr)); }
.pf-dates { display: flex; flex-direction: column; gap: 12px; }
.pf-statezip { flex-wrap: nowrap; }
.pf-statezip label { display: flex; align-items: center; gap: 10px; flex: 1 1 50%; min-width: 0; }
.pf-statezip .f-label { min-width: 0; }
.pf-statezip .field { flex: 1 1 60px; min-width: 0; }
.pf-actions { margin-top: 0; }
@media (max-width: 900px) { .pf-cols { grid-template-columns: 1fr; } }
.person-row small { font: 600 calc(20px * var(--fs)) var(--ui); color: var(--ink-soft); }

/* people page */
.people-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }
.people-tools .search input { width: 320px; }
.waiting { background: #FFF6DD; border: 2px solid #EEDFAE; border-radius: var(--radius); padding: 16px 18px; margin: 8px 0 16px; }
.waiting h2 { margin-bottom: 4px; }
.pending-row { margin-top: 10px; }
.import-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px 8px 18px; margin-bottom: 14px; }
.import-banner[hidden], .waiting[hidden], .install-banner[hidden] { display: none; }
.trash-list { display: flex; flex-direction: column; gap: 10px; }

/* import: steps with pictures, review table, progress */
.steps-pics { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.steps-pics li { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: calc(21px * var(--fs)); }
.steps-pics figure { margin: 0; flex: 0 0 150px; }
.steps-pics svg { width: 150px; height: auto; display: block; }
.steps-pics .small { margin: 6px 0 0; }
@media (max-width: 900px) { .steps-pics { grid-template-columns: 1fr; } }
.another-way { margin: 8px 0 16px; font-size: calc(20px * var(--fs)); }
.another-way summary { min-height: 48px; display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.file-pick { cursor: pointer; }
.review-list, .ask-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; padding: 2px; }
/* iter7 (review 6 must-fix 2): rows keep their full height inside the scrolling list — never squashed. */
.review-list > *, .ask-list > * { flex: none; }
.review-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 14px; background: var(--paper); border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.review-row input { width: 36px; height: 36px; flex: none; accent-color: var(--red); }
.rv-main { display: flex; flex-direction: column; min-width: 0; }
.rv-main b { font: 700 calc(21px * var(--fs))/1.25 'Lora', Georgia, serif; }
.rv-main span { color: var(--ink-soft); font-size: calc(20px * var(--fs)); }
.review-count { font-weight: 800; }
.bar { height: 28px; border-radius: 14px; background: var(--tint); border: 2px solid var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
.bar-text { margin-top: 8px; font-weight: 800; }
.result-line { font-weight: 800; }

/* ask a friend */
.ask-search input { width: 360px; }
.ask-row .cu-btns .btn { min-width: 110px; }
.ask-url { flex-basis: 100%; }
.is-ask .ask-page { max-width: 760px; margin: 0 auto; padding: 32px 20px 60px; display: flex; flex-direction: column; gap: 14px; }
.ask-page h1 { font-size: calc(34px * var(--fs)); }
.ask-page .lead { font-size: calc(24px * var(--fs)); }
.ask-form { display: flex; flex-direction: column; gap: 16px; background: var(--paper); padding: 24px; border-radius: 20px; box-shadow: var(--shadow); }
.ask-form .f-label { min-width: 130px; font-size: calc(22px * var(--fs)); }
.ask-form .field { font-size: calc(24px * var(--fs)); min-height: 60px; }
.ask-bday { border: 0; padding: 0; margin: 0; }
.ask-bday legend { float: left; margin-right: 12px; }
.ask-bday label { display: flex; }
.ask-csz label { display: flex; align-items: center; gap: 10px; flex: 1 1 180px; }
.ask-csz label:first-child { flex: 2 1 260px; }
.ask-csz .f-label { min-width: 0; }
.ask-more summary { min-height: 48px; display: flex; align-items: center; font-weight: 800; font-size: calc(21px * var(--fs)); cursor: pointer; }
.ask-more .f-row { margin-top: 10px; }
select.field { appearance: auto; }

/* versions */
.version-list { display: flex; flex-direction: column; gap: 10px; }
.version { display: flex; align-items: center; gap: 16px; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; flex-wrap: wrap; }
.version canvas { box-shadow: var(--shadow); border-radius: 3px; flex: none; }
.v-main { flex: 1 1 240px; display: flex; flex-direction: column; }
.v-main span { color: var(--ink-soft); }
.saved-btns { flex-wrap: wrap; }

/* greetings: Other occasions */
.greet-sub { margin-top: -10px; padding-left: 18px; border-left: 4px solid var(--line); }

/* ---------- Text size (Settings → Text size): every font size above is calc(Npx * var(--fs)) ---------- */
html.ts-large { --fs: 1.12; }
html.ts-xlarge { --fs: 1.25; }

/* ---------- Brainstorm a Card (iteration 4) ---------- */
.brainstorm .set-sec { max-width: 980px; }
.bs-label { display: block; font: 700 calc(26px * var(--fs))/1.2 'Lora', Georgia, serif; margin-bottom: 10px; }
.bs-idea { width: 100%; min-height: 150px; font-size: calc(24px * var(--fs)); line-height: 1.4; }
.bs-mic { color: var(--ink-soft); margin: 10px 0 6px; }
.bs-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.look-btn { flex-direction: column; gap: 2px; min-height: 84px; padding: 6px 14px; }
.look-btn svg { width: 54px; height: 36px; }
.bs-form .btn-huge { margin-top: 8px; }
.bs-wait { text-align: center; padding: 40px 24px; }
.bs-robin { width: 240px; height: auto; animation: bs-bob 2.4s ease-in-out infinite; }
@keyframes bs-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .bs-robin { animation: none; } }
.bs-step { min-height: 1.5em; }
.bs-bar { height: 18px; border-radius: 9px; background: var(--tint); border: 2px solid var(--line); overflow: hidden; max-width: 560px; margin: 8px auto 18px; }
.bs-bar span { display: block; height: 100%; width: 0; background: var(--red); border-radius: 9px; transition: width .4s linear; }
.bs-calm h2 { margin-bottom: 8px; }
.bs-result .row-btns { justify-content: center; }
.bs-look-note { text-align: center; }

/* ---------- Settings additions ---------- */
.ts-sample { font-size: calc(22px * var(--fs)); background: var(--tint); border-radius: 10px; padding: 10px 16px; display: inline-block; }
.tz-other { flex: 0 1 360px; }
.owner-only small { font: 600 calc(20px * var(--fs)) var(--ui); color: var(--ink-soft); }
.spend-list { list-style: none; padding: 0; margin: 8px 0 12px; }
.spend-list li { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.spend-list li span:first-child { min-width: 170px; color: var(--ink-soft); }
.spend-fail { padding: 10px 14px; border-radius: 10px; background: #FFF4E5; border: 1px solid #E8C48A; color: var(--ink); }
.spend-fail.resting { background: #FDECEA; border-color: #E2A59A; }
.spend-list li b { margin-left: auto; }
.hs-guide .steps-pics { grid-template-columns: 1fr; }
.hs-guide .steps-pics figure { flex: 0 0 200px; }
.hs-guide .steps-pics svg { width: 200px; height: 120px; }

/* ---------- Waiting for your OK: before → after ---------- */
.chg-list { margin: 6px 0 0; padding-left: 22px; }
.chg-list li { margin: 2px 0; }
.chg-list s { color: var(--ink-soft); }
.chip.is-today, .cu-row .sent-check { font-weight: 800; }
.sent-check { color: #2E6B2E; }
.which-copy .row-btns .btn { justify-content: flex-start; text-align: left; }
/* The editor's tool chrome is dense: at Large / Extra large it grows a little, not fully, so every
   button keeps its words on one line at 1024 px (the card itself is drawn to fit either way). */
html.ts-large .editor, html.ts-xlarge .editor { --fs: 1.06; }
.ed-head .btn { white-space: nowrap; }
.bs-form .form-msg { color: var(--ink); }
.chg-list b { font: inherit; font-weight: 800; }

/* ---------- iteration 5: polish for Margie ---------- */
.login-hello { font: 700 calc(28px * var(--fs))/1.25 'Lora', Georgia, serif; margin: 0 0 6px; text-align: center; }
.login-form button[disabled] { opacity: .7; cursor: progress; }
.offline-line { position: sticky; top: 82px; z-index: 19; margin: 0; padding: 8px 20px; background: var(--tint); border-bottom: 2px solid var(--line); color: var(--ink); font-size: calc(20px * var(--fs)); text-align: center; }
.install-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px 8px 18px; margin-bottom: 16px; font-size: calc(20px * var(--fs)); }
.install-banner span { flex: 1 1 260px; }
.empty p { margin: 0 0 12px; }
.empty .btn { margin-top: 2px; }
.welcome { text-align: center; }
.welcome-robin { width: 260px; height: auto; margin: 0 auto 8px; display: block; }
.around-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.around-list li { display: flex; gap: 16px; align-items: flex-start; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.around-list p { margin: 2px 0 0; color: var(--ink-soft); }
.around-ic { font-size: calc(34px * var(--fs)); line-height: 1; min-width: 44px; text-align: center; }
.trouble h2 { margin-top: 0; }
/* Quiet motion for anyone who asked the iPad for less of it. The printer "put it back" drawing keeps its
   slow movement — it IS the instruction — at the slower speed set above. */
@media (prefers-reduced-motion: reduce) {
  *:not(.ri-move):not(.ri-turn), *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto !important; }
}

/* ---------- Preview: the folded card in 3-D (iteration 6) ---------- */
.sheet-preview3d .sheet { width: min(1040px, 100%); }
.pv-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pv-tabs .tab { min-height: 52px; font-size: calc(20px * var(--fs)); }
.f3-stage { display: flex; justify-content: center; padding: 18px 0 8px; perspective: 1800px; }
.f3-book { position: relative; width: calc(var(--w) * 2); height: var(--h); transform-style: preserve-3d; transition: transform .9s ease; transform: translateX(calc(var(--w) / -2)); }
.f3-book[data-state="open"] { transform: translateX(0); }
.f3-page, .f3-cover { position: absolute; top: 0; left: var(--w); width: var(--w); height: var(--h); }
.f3-page { background: #fff; box-shadow: 0 6px 18px rgba(43,37,32,.22); }
.f3-cover { transform-origin: left center; transform-style: preserve-3d; transition: transform .9s ease; transform: rotateY(0deg); }
.f3-book[data-state="open"] .f3-cover { transform: rotateY(-178deg); }
.f3-side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; box-shadow: 0 6px 18px rgba(43,37,32,.22); }
.f3-in { transform: rotateY(180deg); }
.f3-side canvas, .f3-page canvas { display: block; }
.f3-btns { justify-content: center; margin-top: 18px; }
.flat4 { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.flat4 figure { margin: 0; text-align: center; }
.flat4 canvas { display: block; background: #fff; box-shadow: 0 2px 8px rgba(43,37,32,.2); }
.flat4 figcaption { margin-top: 8px; font: 700 calc(18px * var(--fs)) var(--ui); }
@media (prefers-reduced-motion: reduce) { .f3-book, .f3-cover { transition: none; } }

/* ---------- Clip Art sheet groups (iteration 6) ---------- */
.clip-group-h { margin: 18px 0 8px; font: 800 calc(22px * var(--fs)) var(--ui); }
.clip-group-h:first-child { margin-top: 0; }
.clip-jump { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.clip-jump .btn { min-height: 48px; }

/* ---------- Greetings search (iteration 6) ---------- */
.greet-search { display: flex; gap: 10px; align-items: center; margin: 4px 0 14px; }
.greet-search input { flex: 1; min-height: 56px; font-size: calc(20px * var(--fs)); padding: 0 16px; border: 2px solid var(--ink-soft); border-radius: 12px; }
.greet .greet-occ { display: block; font: 700 calc(16px * var(--fs)) var(--ui); color: var(--ink-soft); margin-bottom: 4px; }

/* ---------- Keyboard tips (Settings, iteration 6) ---------- */
.kbd-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.kbd-list li { display: flex; gap: 14px; align-items: baseline; font-size: calc(19px * var(--fs)); }
.kbd-list kbd { display: inline-block; min-width: 92px; padding: 4px 10px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 8px; background: var(--paper); font: 700 calc(18px * var(--fs)) var(--ui); text-align: center; }

/* Add-a-date sheet: a new person's address, right under their name (2026-11-02). */
.new-addr { border: 1px solid #E2D8C6; border-radius: 12px; padding: 10px 14px 4px; margin: 6px 0 10px; background: #FBF7EF; }
.new-addr[hidden] { display: none; }
.new-addr legend { padding: 0 6px; font-weight: 700; }

/* Home (v0.11.0, Steve 2026-11-02): the greeting, bigger and underlined → Coming up as one short band
   (about 2 inches on a landscape iPad: the next three dates left, this month's calendar right) →
   Occasions (4 × 2) → Holidays (4) → Make a card (2) → Your things (3 smaller). Portrait: the band stacks. */
.home h1.home-hello { font-size: calc(38px * var(--fs)); padding-bottom: 6px; border-bottom: 3px solid var(--red); display: inline-block; margin-bottom: 14px; }
.home-band { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 0; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 12px 16px 14px; }
.home-band h2 { margin: 0 0 8px; }
.home-band .chips { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
.home-band .chip { justify-content: space-between; gap: 10px; font-size: calc(19px * var(--fs)); line-height: 1.25; padding: 4px 4px 4px 14px; background: #fff; border-radius: 12px; }
.home-band .cu-text { min-width: 0; }
.home-band .chip .btn { flex: 0 0 auto; white-space: nowrap; }
.home-band .empty { padding: 12px 16px; font-size: calc(19px * var(--fs)); }
.home-band .empty p { margin: 0 0 10px; }
.band-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.band-cal-head h2 { margin: 0; }
.cal-link { display: block; color: inherit; text-decoration: none; border-radius: 10px; }
.cal-link:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.cal-grid.cal-compact { gap: 3px; }
.cal-compact .cal-wd { font-size: calc(14px * var(--fs)); line-height: 1.2; }
.cal-compact .cal-cell { min-height: 0; height: calc(28px * var(--fs)); flex-direction: row; align-items: center; gap: 3px; padding: 0 4px; border-width: 1px; border-radius: 6px; cursor: inherit; }
.cal-compact .cal-cell.today { border: 3px solid var(--red); padding: 0 2px; }
.cal-compact .cal-num { font-size: calc(15px * var(--fs)); font-weight: 700; flex: 0 0 auto; }
.cal-compact .cal-cell.has .cal-num { font-weight: 800; }
.cal-compact .cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: 0 0 auto; }
.cal-compact .cal-name { font-size: calc(12px * var(--fs)); font-weight: 700; min-width: 0; }
.cal-compact .cal-pad { height: calc(28px * var(--fs)); }
.home .home-occ { margin-top: 22px; }
.occasions-grid, .holidays-grid { grid-template-columns: repeat(4, 1fr); }
.make-grid { grid-template-columns: repeat(2, 1fr); }
.things-grid { grid-template-columns: repeat(3, 1fr); }
.tile-xs { min-height: 92px; }
.tile-xs .tile-ic { font-size: calc(28px * var(--fs)); }
.tile-xs .tile-t { font-size: calc(22px * var(--fs)); }
.tile-blank { background: #FAF7F0; }
.tile-mine { background: #F2F4EC; border-color: #D7DCC6; }
@media (max-width: 900px) {
  .home-band { grid-template-columns: 1fr; gap: 14px; }
  .occasions-grid, .holidays-grid, .make-grid { grid-template-columns: repeat(2, 1fr); }
  .things-grid { grid-template-columns: repeat(3, 1fr); }
  .cal-compact .cal-cell, .cal-compact .cal-pad { height: calc(34px * var(--fs)); }
}
/* People (v0.11.0): the one big Import button, and A, B, C… dividers in the name list. */
.import-all { margin: 0 0 14px; }
.import-all span { margin-right: 6px; }
.people .letter-div { margin: 14px 0 4px; padding: 0 6px; color: var(--red); font: 700 calc(22px * var(--fs))/1.2 'Lora', Georgia, serif; letter-spacing: 0; text-transform: none; border-bottom: 2px solid var(--line); }
.people .letter-div:first-child { margin-top: 0; }
.review-lead .plan-new b, .review-lead .plan-combined b, .review-lead .plan-twice b { color: var(--red); }

/* Footer (Steve, 2026-11-02): space under the page, then a band a shade darker than the cream page
   with a random NIV verse. Not in the editor. */
.site-foot { margin-top: 64px; background: #EDE0C8; border-top: 2px solid #D8C6A4; padding: 28px 24px 34px; text-align: center; color: var(--ink); }
.foot-verse { max-width: 780px; margin: 0 auto; font-family: 'Lora', Georgia, serif; font-style: italic; font-size: calc(21px * var(--fs)); line-height: 1.5; }
.foot-ref { margin: 10px 0 0; font-size: calc(17px * var(--fs)); color: var(--ink-soft); font-weight: 700; letter-spacing: .02em; }
body.in-editor .site-foot { display: none; }
@media print { .site-foot { display: none; } }
/* v0.13.0: the pick list — letter dividers, a search box, rows hide while searching */
.review .letter-div { margin: 10px 0 0; padding: 0 6px; color: var(--red); font: 700 calc(22px * var(--fs))/1.2 'Lora', Georgia, serif; border-bottom: 2px solid var(--line); flex: none; }
.review .letter-div:first-child { margin-top: 0; }
.review-row[hidden], .review .letter-div[hidden] { display: none; }
.review .search { display: block; margin: 0 0 10px; }
.review .review-q { width: 100%; min-height: 56px; font-size: calc(21px * var(--fs)); padding: 8px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.review-row:has(input:checked) { border-color: var(--red); background: var(--tint); }
.pick-contacts { margin: 4px 0 6px; }
/* v0.13.0: Print this month — the full-screen calendar she writes on, then prints */
.cal-print { width: 100%; margin-top: 10px; }
body.calprint-open { overflow: hidden; }
.calprint { position: fixed; inset: 0; z-index: 900; background: var(--cream); display: flex; flex-direction: column; padding: 12px 16px 96px; gap: 8px; }
.cp-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cp-month { display: flex; align-items: center; gap: 10px; margin: 0 auto; }
.cp-month h1 { margin: 0; min-width: 9ch; text-align: center; font-size: calc(32px * var(--fs)); }
.cp-nav { min-width: 64px; font-size: 30px; }
.cp-tip { margin: 0; color: var(--ink-soft); font-size: calc(19px * var(--fs)); }
.cp-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto repeat(var(--rows), minmax(0, 1fr)); gap: 4px; }
.cp-wd { text-align: center; font-weight: 800; color: var(--ink-soft); padding: 2px 0; }
.cp-wd-short { display: none; }
@media (max-width: 900px) { .cp-wd-long { display: none; } .cp-wd-short { display: inline; } }
.cp-day, .cp-pad { min-height: 0; border-radius: 8px; }
.cp-day { display: flex; flex-direction: column; background: var(--paper); border: 2px solid var(--line); padding: 4px 6px; overflow: hidden; cursor: text; }
.cp-day.today { border-color: var(--red); }
.cp-day:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(31, 95, 191, .25); }
.cp-num { font-weight: 800; font-size: calc(19px * var(--fs)); }
.cp-ev { color: var(--red); font-weight: 700; font-size: calc(15px * var(--fs)); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-note { flex: 1; min-height: 1.4em; width: 100%; border: 0; resize: none; background: transparent; font: 400 calc(16px * var(--fs))/1.25 Nunito, Helvetica, sans-serif; color: var(--ink); padding: 2px 0; }
.cp-note:focus { outline: none; }
.cp-print { position: fixed; right: 20px; bottom: 16px; left: auto; width: auto; min-width: 220px; padding-left: 36px; padding-right: 36px; z-index: 901; }
/* v0.13.0: cards sent — who it's for on Print, the sent line on shelves, a person's Cards sent */
.send-for { background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.send-for h3 { margin: 0 0 8px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sf-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 14px; border-radius: 999px; background: var(--tint); border: 2px solid var(--line); font-weight: 800; }
.sf-chip .btn { min-height: 48px; min-width: 48px; padding: 0 12px; }
.sf-pick { margin-top: 10px; }
.sf-q { width: 100%; min-height: 52px; font-size: calc(20px * var(--fs)); padding: 0 14px; border: 2px solid var(--line); border-radius: 12px; }
.sf-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 200px; overflow: auto; margin: 8px 0; }
.sf-person[hidden] { display: none; }
.sf-warn { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #FFF4D6; border: 2px solid #E0B341; color: var(--ink); font-weight: 700; }
.design-sent { margin: 2px 0 6px; color: var(--ink-soft); font-size: calc(17px * var(--fs)); font-weight: 700; }
.design-sent.warn { color: #8A5A00; }
.saved-sent { margin: 0; color: var(--red); font-weight: 700; font-size: calc(17px * var(--fs)); }
.sent-info { margin: 8px 0 14px; padding: 10px 14px; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; }
.sent-info h3 { margin: 0 0 6px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.sent-last { margin: 0; font-size: calc(20px * var(--fs)); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sent-all { margin-top: 8px; font-size: calc(19px * var(--fs)); }
.sent-all summary { min-height: 48px; display: flex; align-items: center; font-weight: 800; cursor: pointer; color: var(--focus); }
.sent-all ul { margin: 4px 0 0; padding-left: 22px; }
.sent-all li { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Who is it for? sits under the steps on the left, so Print Now stays in view on the right */
.print-grid > .steps { grid-column: 1; grid-row: 1; }
.print-grid > .send-for { grid-column: 1; grid-row: 2; margin: 0; }
.print-grid > .print-side { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 900px) { .print-grid > .steps, .print-grid > .send-for, .print-grid > .print-side { grid-column: 1; grid-row: auto; } }

/* Friends-and-family studio (v0.14.0): the account doors, Settings → Your account / Family accounts */
.login-switch { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.login-switch .btn { min-height: 52px; font-size: calc(19px * var(--fs)); text-decoration: underline; }
.login-note { margin: 0; text-align: center; }
.fam-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; }
.fam-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line, #C9BFAF); border-radius: 12px; background: #fff; }
.fam-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fam-who span { font-size: calc(17px * var(--fs)); color: var(--ink-soft); overflow-wrap: anywhere; }
.fam-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.temp-pw { font: 700 calc(30px * var(--fs))/1.2 ui-monospace, Menlo, monospace; text-align: center; padding: 14px; background: var(--paper); border-radius: 12px; user-select: all; }
