:root {
  --scale: 1;
  --bg: #f7f0e4; --card: #fffaf2; --ink: #2b211b; --soft: #5b4b40; --line: #e2d5c3;
  --accent: #8a2f4a; --accent-d: #6e2239; --gold: #c9a14a; --sage: #4f6b4d; --hi: #f3c969;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: calc(22px * var(--scale)); --stepfs: calc(30px * var(--scale));
  --tap: 72px; --r: 22px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; --ribh: 44px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: var(--body); line-height: 1.5; -webkit-tap-highlight-color: transparent; overflow-x: hidden;
  background-image: radial-gradient(circle at 12% 0%, #fdf6ea 0, transparent 40%), radial-gradient(circle at 100% 30%, #f3e5d0 0, transparent 35%); background-attachment: fixed; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0 0 .3em; letter-spacing: .005em; }
h1 { font-size: calc(46px * var(--scale)); }
h2 { font-size: calc(32px * var(--scale)); }
h3 { font-size: calc(26px * var(--scale)); }
.eyebrow { font-family: var(--round); text-transform: uppercase; letter-spacing: .14em; font-size: calc(16px * var(--scale)); color: var(--accent); margin: 0 0 6px; font-weight: 700; }
.lead { font-size: calc(25px * var(--scale)); color: var(--soft); margin: .2em 0 .8em; }
.note { color: var(--soft); margin: 0 0 18px; }
.page { max-width: 1180px; margin: 0 auto; padding: 28px max(clamp(18px, 4vw, 48px), env(safe-area-inset-right)) calc(110px + env(safe-area-inset-bottom)) max(clamp(18px, 4vw, 48px), env(safe-area-inset-left)); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 0 30px; border-radius: 999px; border: 3px solid var(--accent); background: var(--card); color: var(--accent); font: 700 calc(24px * var(--scale)) var(--round); text-decoration: none; cursor: pointer; touch-action: manipulation; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px #8a2f4a40; }
.btn.primary:active { background: var(--accent-d); transform: translateY(1px); }
.btn.ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn:disabled { opacity: .35; }
.btn:focus-visible, .chip:focus-visible, a:focus-visible { outline: 4px solid var(--hi); outline-offset: 3px; }
.chip { min-height: 64px; min-width: 64px; padding: 0 26px; border-radius: 999px; border: 3px solid var(--line); background: var(--card); color: var(--ink); font: 700 calc(21px * var(--scale)) var(--round); cursor: pointer; touch-action: manipulation; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.back { display: inline-flex; align-items: center; min-height: 64px; font: 700 calc(22px * var(--scale)) var(--round); color: var(--accent); text-decoration: none; padding-right: 20px; }

/* home */
.hero { text-align: center; padding: 18px 0 26px; }
.hero h1 { font-size: calc(54px * var(--scale)); }
.crest { margin: 0 auto 8px; width: 88px; }
.continue { display: flex; align-items: center; gap: 22px; background: var(--card); border: 3px solid var(--accent); border-radius: var(--r); padding: 18px; text-decoration: none; margin-bottom: 22px; box-shadow: 0 8px 24px #2b211b14; min-height: 120px; }
.continue > div:nth-child(2) { flex: 1; min-width: 0; }
.continue h2 { margin: 0; font-size: calc(30px * var(--scale)); }
.continue p { margin: 2px 0 8px; color: var(--soft); }
.big-arrow { font-size: 64px; color: var(--accent); line-height: 1; padding: 0 8px; }
.spark { background: linear-gradient(135deg, #fbefd9, #f6e1d6); border-radius: var(--r); padding: 22px 26px; margin-bottom: 26px; border: 2px solid #ecd6bd; }
.spark-text { font-size: calc(26px * var(--scale)); font-style: italic; margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 10px 0 8px; position: sticky; top: var(--ribh); z-index: 5; padding: 12px 0; background: linear-gradient(var(--bg) 80%, transparent); }
.surprise { background: var(--gold); border-color: var(--gold); color: #2b211b; }
.lvnote { color: var(--soft); margin: 0 0 6px; font-style: italic; }
.theme { margin-top: 30px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.card { background: var(--card); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: 0 6px 20px #2b211b12; border: 2px solid var(--line); transition: transform .15s; }
.card:active { transform: scale(.98); }
.cov svg { display: block; width: 100%; height: auto; }
.cov.sm { width: 120px; flex: none; border-radius: 14px; overflow: hidden; }
.cov.big { border-radius: var(--r); overflow: hidden; box-shadow: 0 8px 26px #2b211b1c; }
.cb { padding: 16px 20px 20px; }
.cb h3 { margin-bottom: 6px; }
.meta { color: var(--soft); margin: 8px 0 0; font-size: calc(19px * var(--scale)); line-height: 1.4; }
.lv { display: inline-flex; align-items: center; gap: 5px; font: 700 calc(18px * var(--scale)) var(--round); }
.lv i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); display: inline-block; }
.lv i.off { background: var(--line); }
.lv b { margin-left: 6px; color: var(--ink); }
.lv1 i:not(.off) { background: var(--sage); } .lv2 i:not(.off) { background: #b7792b; }
.tag { display: inline-block; margin-top: 10px; padding: 4px 14px; border-radius: 999px; font: 700 calc(16px * var(--scale)) var(--round); }
.tag.go { background: #f8e2b8; } .tag.ok { background: #dbe8d4; }
.bar { height: 14px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.shelf { margin-top: 44px; background: #efe2cd; border-radius: var(--r); padding: 26px; border-bottom: 14px solid #b58b5f; }
.shelf-row { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 6px; }
.trophy { text-decoration: none; display: flex; flex-direction: column; gap: 4px; width: 150px; flex: none; }
.trophy .cov.sm { width: 150px; }
.trophy b { font-size: calc(18px * var(--scale)); line-height: 1.2; } .trophy span { color: var(--soft); font-size: calc(16px * var(--scale)); }
.foot { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 40px; }

/* project */
.surprise-note { font: 700 calc(22px * var(--scale)) var(--round); color: #7a5a14; background: #f8e8c3; display: inline-block; padding: 10px 20px; border-radius: 999px; }
.proj-top { display: grid; grid-template-columns: 1fr; gap: 26px; margin: 10px 0 24px; }
@media (min-width: 900px) { .proj-top { grid-template-columns: 1fr 1.1fr; align-items: center; } }
.facts { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 0 0 22px; }
.facts dt { font: 700 calc(15px * var(--scale)) var(--round); text-transform: uppercase; letter-spacing: .1em; color: var(--soft); }
.facts dd { margin: 0; font-size: calc(23px * var(--scale)); }
.start { width: 100%; min-height: 84px; font-size: calc(28px * var(--scale)); margin-bottom: 12px; }
.proj-intro .btn.ghost { width: 100%; }
.box { background: var(--card); border-radius: var(--r); padding: 24px 26px; margin: 18px 0; border: 2px solid var(--line); }
.mat, .gloss { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; }
.mat dt, .gloss dt { font: 700 calc(20px * var(--scale)) var(--round); color: var(--accent); }
.mat dd, .gloss dd { margin: 0; }
.learnlist { margin: 0; padding-left: 1.2em; } .learnlist li { margin: 4px 0; }
.yours { background: #f3ecdf; }
.steplist { margin: 0; padding-left: 1.6em; } .steplist li { margin: 2px 0; }
.steplist a { display: inline-block; padding: 10px 0; min-height: 48px; text-decoration-color: var(--line); }
.steplist a.did { color: var(--sage); }
.steplist a.did::after { content: " ✓"; }

/* step mode */
.stepmode { min-height: calc(100vh - var(--ribh)); min-height: calc(100dvh - var(--ribh)); display: flex; flex-direction: column; max-width: 1180px; margin: 0 auto; }
.sbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px 8px; }
.x { width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 2px solid var(--line); text-decoration: none; font: 700 30px var(--round); }
.sinfo { flex: 1; text-align: center; min-width: 0; }
.sname { display: block; font: 700 calc(20px * var(--scale)) var(--round); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scount { display: block; font: 700 calc(26px * var(--scale)) var(--round); }
.bar.big { height: 16px; margin: 0 18px 6px; }
.step { flex: 1; padding: 16px clamp(18px, 4vw, 48px) 140px; }
.step h1 { font-size: calc(44px * var(--scale)); margin-top: 8px; }
.say { font-size: var(--stepfs); line-height: 1.45; margin: 0 0 20px; }
.rows { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.rows li { display: grid; grid-template-columns: minmax(120px, max-content) 1fr auto; gap: 6px 18px; align-items: baseline; background: var(--card); border: 2px solid var(--line); border-left: 8px solid var(--accent); border-radius: 16px; padding: 14px 18px; font-size: calc(27px * var(--scale)); }
.rl { font: 700 calc(22px * var(--scale)) var(--round); color: var(--accent); }
.rt { font-family: var(--round); overflow-wrap: anywhere; }
.rc { font: 700 calc(21px * var(--scale)) var(--round); background: #f4e6d2; border-radius: 999px; padding: 2px 14px; white-space: nowrap; }
@media (max-width: 640px) { .rows li { grid-template-columns: 1fr auto; } .rt { grid-column: 1 / -1; grid-row: 2; } }
.dia { margin: 0 0 24px; background: #fffaf2; border-radius: var(--r); border: 2px solid var(--line); padding: 18px; }
.dia-svg { display: block; width: 100%; height: auto; max-height: 62vh; font-family: var(--round); }
.counter { display: flex; gap: 14px; align-items: stretch; margin: 0 0 22px; }
.cplus { flex: 1; min-height: 150px; border-radius: var(--r); border: 4px solid var(--sage); background: #eef3ea; color: var(--ink); cursor: pointer; display: grid; place-items: center; align-content: center; gap: 2px; font-family: var(--round); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.cplus:active { background: #dfe9d9; }
.cnum { font: 800 calc(64px * var(--scale)) var(--round); line-height: 1; }
.cnum.pop { animation: pop .25s; }
@keyframes pop { 50% { transform: scale(1.25); } }
.cof { font-size: calc(24px * var(--scale)); font-weight: 700; }
.ctap { font-size: calc(17px * var(--scale)); color: var(--soft); }
.cminus { width: 110px; border-radius: var(--r); border: 3px solid var(--line); background: var(--card); font: 800 52px var(--round); color: var(--soft); cursor: pointer; touch-action: manipulation; }
details.learn { background: #f6ecf0; border: 2px solid #e6cfd8; border-radius: var(--r); margin: 0 0 18px; }
details.learn summary { min-height: var(--tap); display: flex; align-items: center; padding: 10px 24px; font: 700 calc(23px * var(--scale)) var(--round); color: var(--accent-d); cursor: pointer; list-style: none; }
details.learn summary::before { content: "✦"; margin-right: 12px; color: var(--gold); }
details.learn summary::-webkit-details-marker { display: none; }
details.learn p { margin: 0; padding: 0 24px 22px; font-size: calc(25px * var(--scale)); }
.lcards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); align-items: start; }
.snav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 14px; padding: 14px max(18px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: linear-gradient(transparent, var(--bg) 30%); z-index: 10; max-width: 1180px; margin: 0 auto; }
.btn.nav { flex: 1; min-height: 88px; font-size: calc(30px * var(--scale)); }
.btn.nav.prev { flex: .7; }
.in-next { animation: inR .28s ease-out; } .in-prev { animation: inL .28s ease-out; }
@keyframes inR { from { opacity: 0; transform: translateX(40px); } } @keyframes inL { from { opacity: 0; transform: translateX(-40px); } }

/* celebrate */
.celebrate { text-align: center; position: relative; overflow: hidden; max-width: 760px; }
.celebrate h1 { font-size: calc(58px * var(--scale)); margin-top: 18px; }
.celebrate .cov.big { max-width: 460px; margin: 30px auto 10px; animation: rise .8s ease-out; }
@keyframes rise { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.cel-btns { display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin: 0 auto; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.confetti i { position: absolute; top: -20px; width: 14px; height: 22px; border-radius: 4px; animation: fall 3.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }
.sample { margin-top: 14px; }
#toast-unused { position: fixed; left: 50%; bottom: 130px; transform: translateX(-50%) translateY(30px); background: var(--ink); color: #fff; font: 700 calc(22px * var(--scale)) var(--round); padding: 16px 28px; border-radius: 999px; opacity: 0; transition: .3s; z-index: 30; pointer-events: none; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; transform: translateX(-50%); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 640px) { :root { --stepfs: calc(26px * var(--scale)); } h1 { font-size: calc(36px * var(--scale)); } .hero h1 { font-size: calc(40px * var(--scale)); } .step h1 { font-size: calc(34px * var(--scale)); } .continue .cov.sm { width: 84px; } .big-arrow { display: none; } .cminus { width: 84px; } .toolbar { position: static; } }

.step { display: grid; grid-template-columns: 1fr; grid-template-areas: "h" "s" "c" "d"; column-gap: 32px; align-content: start; }
.step > h1 { grid-area: h; } .step > .say { grid-area: s; } .scol { grid-area: c; min-width: 0; } .step > .dia { grid-area: d; min-width: 0; }
@media (min-width: 1200px) and (orientation: landscape) {
  .step { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "h d" "s d" "c d"; }
  .step > .dia { align-self: start; position: sticky; top: 12px; }
  .dia-svg { max-height: 70vh; }
}

@media (max-width: 640px) {
  .celebrate h1 { font-size: calc(40px * var(--scale)); overflow-wrap: anywhere; }
  .btn.nav { font-size: calc(26px * var(--scale)); padding: 0 14px; min-height: 80px; white-space: nowrap; }
  .snav { gap: 10px; padding-left: 12px; padding-right: 12px; }
  .dia { padding: 10px; }
}
h1, h2 { overflow-wrap: break-word; }

/* ---- v2: Jeremy ribbon ---- */
body { padding-top: var(--ribh); }
#ribbon { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: #fbf3e6; color: var(--accent); border-bottom: 3px solid var(--gold);
  padding: calc(8px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left)); text-align: center;
  font: 700 max(18px, min(calc(18px * var(--scale)), 4.7vw)) / 1.25 var(--round); letter-spacing: .01em; box-shadow: 0 2px 10px #2b211b14; pointer-events: none; user-select: none; -webkit-user-select: none; }
#ribbon .heart { color: var(--accent); display: inline-block; animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.25); } 90% { transform: scale(1.05); } }
.shead { position: sticky; top: var(--ribh); z-index: 9; background: var(--bg); padding-bottom: 6px; }
.toolbar { z-index: 9; }
.step { touch-action: pan-y; }
.cplus, .cminus, .btn, .chip, .x { touch-action: manipulation; }
/* ---- v2: love notes ---- */
#love { position: fixed; z-index: 45; pointer-events: none; opacity: 0; transition: opacity .7s ease; background: #fff4dc; color: var(--accent-d); border: 2px solid var(--gold);
  font: 700 18px/1.25 var(--round); text-align: center; display: flex; align-items: center; justify-content: center; padding: 6px 14px; border-radius: 18px; box-shadow: 0 6px 18px #2b211b22; overflow: hidden; }
#love:empty { display: none; }
#love.on { opacity: 1; }
#love.in-foot { left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom)); max-width: min(560px, 90vw); width: max-content; padding: 14px 26px; border-radius: 999px; font-size: 20px; }
#love.in-head { padding: 4px 10px; }
@media (min-width: 641px) { #love.in-head { font-size: 20px; } }


/* ---- v2: bead tracker ---- */
.beads { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; padding: 6px 18px 4px; }
.bgrp { display: inline-flex; gap: 6px; }
.bead { --s: 24px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-block; border: 2.5px solid #cdbca6; background: #fffaf2; box-sizing: border-box; }
.bead.done { background: radial-gradient(circle at 35% 30%, #ffffff66 0 18%, transparent 40%), var(--c); border-color: var(--c); }
.bead.cur { border-color: var(--c); border-width: 4px; background: #fff; box-shadow: 0 0 0 4px #f3c96966; animation: glow 2.2s ease-in-out infinite; }
.bead.just { animation: popbead .7s ease-out; }
@keyframes glow { 50% { box-shadow: 0 0 0 7px #f3c96933, 0 0 12px #f3c969aa; } }
@keyframes popbead { 0% { transform: scale(.4); } 60% { transform: scale(1.45); } 100% { transform: scale(1); } }
.beads.sm { justify-content: flex-start; padding: 4px 0 0; gap: 5px 9px; } .beads.sm .bead { --s: 18px; border-width: 2px; } .beads.sm .bgrp { gap: 4px; }
.beads.sm .bead.cur { border-width: 3px; box-shadow: none; animation: none; }
.beads.md { justify-content: flex-start; padding: 4px 0 12px; } .beads.md .bead { --s: 22px; }
.ptrack-l { margin: 0; font: 700 calc(19px * var(--scale)) var(--round); color: var(--soft); }
.beads.lg .bead { --s: clamp(16px, calc((100vw - 48px - (var(--g) - 1) * 14px - (var(--n) - var(--g)) * 6px) / var(--n)), 24px); }
@media (max-width: 640px) { .beads.lg .bead { --s: 18px; border-width: 2px; } .beads.lg .bead.cur { border-width: 3px; } .beads.lg { gap: 6px 10px; } .beads.lg .bgrp { gap: 4px; } }
#love.badge { background: #eef3ea; border-color: var(--sage); color: var(--ink); }

.say, .rows, .counter, .diagram { scroll-margin-top: calc(var(--ribh) + 150px); scroll-margin-bottom: 130px; }
@media (max-width: 640px) { #love.in-head { font-size: 15.5px; line-height: 1.15; padding: 2px 8px; border-radius: 14px; } }

/* ---------- Crochet Corner: Solid Heart Granny Square ---------- */
.hfeat { display: flex; align-items: center; gap: 24px; background: linear-gradient(135deg, #fff4f1, #fbe3e3); border: 4px solid #b8324f; border-radius: var(--r); padding: 18px 20px; text-decoration: none; margin-bottom: 24px; box-shadow: 0 10px 28px #b8324f26; min-height: 150px; }
.hfeat .eyebrow { color: #b8324f; }
.hf-art svg { display: block; border-radius: 16px; }
.hf-body { flex: 1; min-width: 0; }
.hf-body h2 { margin: 0; font-size: calc(34px * var(--scale)); }
.hf-by, .hf-meta { margin: 2px 0 6px; color: var(--soft); }
.hbar { height: 16px; border-radius: 99px; background: #f0dcd6; overflow: hidden; margin: 8px 0 4px; }
.hbar.big { height: 22px; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, #d9607a, #b8324f); border-radius: 99px; transition: width .3s; }
.hcov svg { display: block; width: 100%; height: auto; background: #fbf7ef; }
.heartp { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
.hhead { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; margin: 8px 0 26px; }
.hhead h1 { font-size: calc(50px * var(--scale)); }
.hh-art svg { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: 0 10px 28px #2b211b1f; }
.credit { font-size: calc(22px * var(--scale)); margin: 0 0 6px; }
.credit a, .hcred a, .hvid a { color: #b8324f; font-weight: 700; }
.hprog p { margin: 0 0 12px; color: var(--soft); font-family: var(--round); font-weight: 700; }
.hbtns { display: flex; flex-wrap: wrap; gap: 14px; }
.hsq { margin: 16px 0 0; font: 700 calc(22px * var(--scale)) var(--round); display: flex; align-items: center; gap: 12px; }
.hsq b { font-size: 1.4em; color: #b8324f; min-width: 1.2em; text-align: center; }
.mini { width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--line); background: var(--card); font: 700 30px var(--round); color: var(--ink); cursor: pointer; }
.vwrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; margin-bottom: 10px; }
.vwrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hvid .chips { margin-bottom: 12px; }
.hround { background: var(--card); border: 3px solid var(--line); border-radius: var(--r); padding: 22px 24px; margin: 0 0 24px; box-shadow: 0 6px 20px #2b211b10; scroll-margin-top: calc(var(--ribh) + 20px); }
.hround.rdone { border-color: var(--sage); background: #f6faf3; }
.rh { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.rh h2 { font-size: calc(36px * var(--scale)); margin: 0; }
.rh-r { display: flex; gap: 10px; align-items: center; }
.rpill { font: 700 calc(19px * var(--scale)) var(--round); background: #f3e6d8; padding: 10px 16px; border-radius: 99px; }
.rdone .rpill { background: var(--sage); color: #fff; }
.rsay { color: var(--soft); font-style: italic; margin: 8px 0 4px; }
.hsteps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.hsub { font: 700 calc(18px * var(--scale)) var(--round); letter-spacing: .12em; color: #b8324f; margin: 12px 0 0; }
.hstep { width: 100%; display: flex; gap: 18px; align-items: flex-start; text-align: left; background: #fffdf9; border: 3px solid var(--line); border-radius: 18px; padding: 16px 18px; font: calc(27px * var(--scale)) / 1.4 var(--serif); color: var(--ink); cursor: pointer; min-height: 84px; touch-action: manipulation; }
.hstep .box2 { flex: none; width: 52px; height: 52px; border-radius: 14px; border: 4px solid #b8324f; display: grid; place-items: center; font: 900 34px var(--round); color: #fff; margin-top: 2px; }
.hstep.on { background: #f1f6ee; border-color: #cfdcc9; color: #6a7a66; }
.hstep.on .ht { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: #9fb39a; }
.hstep.on .box2 { background: var(--sage); border-color: var(--sage); }
.hstep.next { border-color: #b8324f; box-shadow: 0 0 0 5px #f3c96999; background: #fff; }
.flag { display: block; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #fff3cf; border: 2px solid #e2b63f; font-size: .78em; line-height: 1.4; text-decoration: none; color: #4a3a12; }
.flag b { display: block; font-family: var(--round); text-transform: uppercase; letter-spacing: .08em; font-size: .85em; color: #8a5a00; margin-bottom: 4px; }
.rcount { margin: 16px 0 0; padding: 12px 16px; background: #f4ece0; border-radius: 14px; font-size: calc(22px * var(--scale)); }
.rcount b { font-family: var(--round); color: #b8324f; margin-right: 8px; }
.hcount { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 12px; background: #2b211b; color: #fff; padding: 10px 14px; border-radius: 999px; box-shadow: 0 10px 30px #0005; }
.hcount button { border: 0; cursor: pointer; font-family: var(--round); font-weight: 800; border-radius: 999px; touch-action: manipulation; }
.hc-l { font: 700 18px var(--round); padding-left: 8px; letter-spacing: .06em; text-transform: uppercase; }
#hcm { width: 64px; height: 64px; font-size: 36px; background: #4a3c33; color: #fff; }
.hc-n { min-width: 150px; height: 76px; background: #b8324f; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.hc-n b { font-size: 40px; } .hc-n small { font-size: 14px; opacity: .85; margin-top: 4px; }
.hc-n b.pop { animation: pop .25s; }
.hc-r { height: 56px; padding: 0 18px; background: transparent; color: #fff; border: 2px solid #ffffff55 !important; font-size: 18px; }
@keyframes pop { 50% { transform: scale(1.25); } }
@media (max-width: 760px) { .hhead { grid-template-columns: 1fr; } .hh-art { max-width: 200px; } .hfeat { flex-wrap: wrap; } .hf-art svg { width: 110px; height: 110px; } .hc-l { display: none; } }
/* ---------- current project star ---------- */
.curbtn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; margin: 6px 0 14px; padding: 8px 24px 8px 16px; border-radius: 999px; border: 3px solid #a67c1e; background: var(--card); color: var(--ink); font: 700 calc(24px * var(--scale)) / 1.2 var(--round); text-align: left; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: background .25s, box-shadow .25s; }
.curbtn .cstar { flex: none; width: 56px; height: 56px; display: grid; place-items: center; font-size: 44px; line-height: 1; color: #a67c1e; }
.curbtn.on { background: #fff1c9; border-color: #a67c1e; box-shadow: 0 6px 18px #a67c1e33; }
.curbtn.on .cstar { color: #b8860b; text-shadow: 0 1px 0 #7a5a10; }
.curbtn:active { transform: translateY(1px); }
.curbtn:focus-visible { outline: 4px solid var(--hi); outline-offset: 3px; }
.curbtn.pop .cstar { animation: starpop .5s ease-out; }
@keyframes starpop { 0% { transform: scale(1); } 45% { transform: scale(1.35) rotate(-8deg); } 100% { transform: scale(1); } }
.tag.cur { background: #fff1c9; color: #6b4e0e; border: 2px solid #a67c1e; }
.curfeat { border-color: #a67c1e; background: linear-gradient(135deg, #fffaf0, #fbefd2); box-shadow: 0 10px 28px #a67c1e26; }
.curfeat .eyebrow { color: #8a6412; }
.curfeat .hf-art.cov { width: 190px; flex: none; border-radius: 16px; overflow: hidden; }
.curfeat .hbar i { background: #a67c1e; }
@media (max-width: 760px) { .curfeat .hf-art.cov { width: 140px; } }
@media (prefers-reduced-motion: reduce) { .curbtn.pop .cstar { animation: none; } }
.curfeat .hbar { background: #f1e4c4; }

/* ---- v3: my own patterns, finished work album, printing ---- */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 30px; }
.quick .btn { min-height: 96px; font-size: calc(25px * var(--scale)); border-radius: 26px; padding: 0 18px; text-align: center; }
.btn.gold { background: #fff4dc; border-color: var(--gold); color: #6b4e0e; }
.btn.big { min-height: 96px; font-size: calc(28px * var(--scale)); padding: 0 40px; }
.btn.danger { color: #9b1c1c; border-color: #e5b4b4; }
.mypats { background: #fff9ef; border: 3px solid var(--gold); border-radius: var(--r); padding: 22px 24px 26px; margin-bottom: 34px; }
.mypats h2 { margin-top: 0; }
.addcard { border: 4px dashed var(--accent); background: #fffdf9; }
.addplus { aspect-ratio: 4 / 3; display: grid; place-items: center; font: 900 120px/1 var(--round); color: var(--accent); background: #fbeef0; }
.cov svg { display: block; width: 100%; height: auto; }
.howlist { font-size: calc(24px * var(--scale)); padding-left: 1.3em; margin: 6px 0 0; }
.howlist li { margin: 0 0 12px; }
.flabel { display: block; font: 800 calc(24px * var(--scale)) var(--round); margin: 26px 0 10px; }
.finput, .ftext { width: 100%; font: calc(26px * var(--scale)) / 1.45 var(--serif); color: var(--ink); background: #fff; border: 3px solid var(--line); border-radius: 18px; padding: 16px 18px; min-height: 76px; }
.ftext { min-height: 340px; resize: vertical; }
.ftext.short { min-height: 150px; }
.finput:focus, .ftext:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 5px #f3c96988; }
.fbtns { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0; }
.fbtns .btn { flex: 1 1 260px; }
.warn { background: #fff1c9; border: 3px solid #a67c1e; color: #5a3f0a; border-radius: 16px; padding: 14px 18px; font: 700 calc(22px * var(--scale)) / 1.4 var(--round); }
.psec { font-size: calc(30px * var(--scale)); margin: 26px 0 8px; }
.plist, .pinfo { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plist li { display: flex; gap: 14px; align-items: flex-start; background: #fffdf9; border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: calc(23px * var(--scale)); }
.pinfo li { background: #f6f1e8; border-radius: 14px; padding: 12px 16px; font-size: calc(23px * var(--scale)); }
.pinfo.big li { font-size: calc(26px * var(--scale)); }
.pbox { flex: none; width: 30px; height: 30px; border: 3px solid #b8324f; border-radius: 8px; margin-top: 4px; }
.mlab { color: var(--accent-d); }
.rowcnt { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0 4px 70px; font: 700 calc(22px * var(--scale)) var(--round); }
.rowcnt button { min-width: 72px; min-height: 72px; border-radius: 18px; border: 3px solid var(--accent); background: #fff; color: var(--accent); font: 900 36px var(--round); touch-action: manipulation; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.gcard { display: block; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 6px 20px #2b211b12; }
.gcard img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee3d3; }
.gcb { padding: 14px 18px 18px; }
.gcb h3 { margin: 4px 0 0; font-size: calc(24px * var(--scale)); }
.gdate { margin: 0; font: 800 calc(21px * var(--scale)) var(--round); color: var(--accent); }
.gdate.big { font-size: calc(30px * var(--scale)); margin-top: 18px; }
.gnote { margin: 6px 0 0; color: var(--soft); }
.gbig { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #eee3d3; border-radius: var(--r); }
.pickbig { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 280px; border: 4px dashed var(--accent); border-radius: var(--r); background: #fffdf9; color: var(--accent); font: 800 calc(26px * var(--scale)) var(--round); text-align: center; padding: 24px; cursor: pointer; }
.pickbig img { max-width: 100%; max-height: 50vh; border-radius: 14px; }
.pk-i { font-size: 80px; line-height: 1; }
.backup { margin-top: 40px; }
label.btn { cursor: pointer; }
@media (max-width: 640px) { .quick { grid-template-columns: 1fr; } .rowcnt { margin-left: 0; } .ftext { min-height: 260px; } }

/* print preview pages */
.qtoc { list-style: none; padding: 0; margin: 10px 0 20px; display: grid; gap: 8px; }
.qtoc li { display: flex; gap: 18px; align-items: baseline; font-size: calc(23px * var(--scale)); border-bottom: 2px dotted var(--line); padding: 6px 0; }
.qtp { flex: none; min-width: 9.5em; font: 800 calc(22px * var(--scale)) var(--round); color: var(--accent); }
.qwrap { --qz: 1; }
.qwrap .qpage { zoom: var(--qz); margin: 0 auto 28px; box-shadow: 0 8px 26px #2b211b2a; }
.qpage { width: 7.5in; height: 9.6in; background: #fff; color: #111; display: flex; flex-direction: column; padding: 0.15in 0.2in; font: 13pt/1.4 var(--serif); }
.qmeasure { position: absolute; left: -9999px; top: 0; visibility: hidden; zoom: 1; }
.qhead { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1.5pt solid #8a2f4a; padding-bottom: 4pt; font: 700 11pt var(--round); color: #8a2f4a; }
.qhs { text-align: right; color: #444; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qbody { flex: 1; overflow: hidden; padding-top: 6pt; }
.qfoot { border-top: 1.5pt solid #8a2f4a; padding-top: 4pt; text-align: center; font: 700 13pt var(--round); color: #111; }
.qt { font-size: 24pt; margin: 0; line-height: 1.15; color: #111; }
.qby { margin: 2pt 0 4pt; color: #555; font-size: 11pt; }
.qs { font-size: 16pt; margin: 10pt 0 4pt; color: #8a2f4a; line-height: 1.2; }
.qh { font-weight: 700; margin: 6pt 0 2pt; }
.qp { margin: 3pt 0; }
.qi { display: flex; gap: 8pt; align-items: flex-start; padding: 3pt 0; }
.qbox { flex: none; width: 12pt; height: 12pt; border: 1.5pt solid #333; border-radius: 2pt; margin-top: 3pt; }
.qx { color: #555; font-style: italic; margin-left: 6pt; font-size: 11pt; }
.qd { display: grid; grid-template-columns: max-content 1fr; gap: 2pt 12pt; margin: 4pt 0; }
.qd dt { font-weight: 700; } .qd dd { margin: 0; }

@page { size: letter portrait; margin: 0.6in 0.5in; }
@media print {
  html, body { background: #fff !important; }
  body { padding: 0 !important; margin: 0 !important; }
  #ribbon, #love, .noprint, nav.foot, .back { display: none !important; }
  .page.printp { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .qwrap .qpage { zoom: 1 !important; box-shadow: none !important; margin: 0 !important; break-after: page; page-break-after: always; break-inside: avoid; }
  .qwrap .qpage:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.qm { display: flow-root; }

/* ---------- v4: big Uncheck all rows button ---------- */
.uncheck-wrap { margin: 22px 0; scroll-margin-top: 12px; }
.btn.uncheck { display: flex; width: 100%; min-height: 92px; padding: 14px 28px; font-size: calc(28px * var(--scale)); line-height: 1.2; text-align: center; white-space: normal; }
@media print { .uncheck-wrap { display: none; } }
