/* FannyDango — one stylesheet. Light, warm, plenty of room; the cards are the colour. */
@font-face { font-family: "Kalam"; src: url("/fonts/Kalam-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --ink: #1d1a18; --muted: #6d6560; --line: #ece2d8; --paper: #fffaf4; --white: #fff;
  --pink: #ff4fa3; --pink-deep: #d92582; --blue: #4c6ef5; --yellow: #ffc145; --red: #ff4b4b;
  --radius: 14px; --shadow: 0 1px 2px rgba(40,20,10,.06), 0 8px 24px rgba(40,20,10,.08);
  --display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body); }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }  /* author display rules must not un-hide */
a { color: inherit; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
h1, h2, h3, .logo, .btn, .kicker { font-family: var(--display); }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; margin: .2em 0 .3em; font-weight: 800; }
h2.sec { font-size: 1.6rem; margin: 2.5rem 0 1rem; font-weight: 800; }
.kicker { color: var(--pink-deep); font-weight: 700; letter-spacing: .02em; margin: 0; }

/* header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0 8px; }
.logo { position: relative; text-decoration: none; font-weight: 900; font-size: 1.65rem; letter-spacing: -.03em; line-height: 1; padding-right: 14px; white-space: nowrap; }
.logo .l2 { color: var(--pink); }
.logo .dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; }
.logo .d1 { background: var(--yellow); right: 0; top: -2px; }
.logo .d2 { background: var(--blue); right: 6px; top: 10px; width: 5px; height: 5px; }
.logo .d3 { background: var(--red); right: -4px; top: 15px; width: 4px; height: 4px; }
.search input { width: min(280px, 42vw); border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 9px 14px; font: inherit; }
.occasions { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.occasions::-webkit-scrollbar { display: none; }
.occasions a { flex: none; text-decoration: none; font-size: .92rem; padding: 6px 12px; border-radius: 999px; color: var(--muted); }
.occasions a:hover, .occasions a[aria-current] { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

/* buttons */
.btn { display: inline-block; background: var(--ink); color: var(--white); border: 0; border-radius: 999px; padding: 14px 26px; font-size: 1.05rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s; }
.btn:hover { background: var(--pink-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--white); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: progress; transform: none; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 56px 0 24px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 0 0 1.6em; }
h1 em { font-style: normal; color: var(--pink); }
.fan { position: relative; height: 380px; }
.fan a { position: absolute; width: 58%; aspect-ratio: 1; background: var(--white); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; transition: transform .2s; }
.fan a img { width: 100%; height: 100%; object-fit: cover; }
.fan-0 { left: 22%; top: 140px; transform: rotate(-2deg); z-index: 3; }  /* the bestseller, in front */
.fan-1 { left: 38%; top: 0; transform: rotate(6deg); z-index: 2; }
.fan-2 { left: 4%; top: 30px; transform: rotate(-8deg); }
.fan a:hover { transform: rotate(0) scale(1.03); z-index: 4; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chip { text-decoration: none; background: var(--white); border-radius: 999px; padding: 9px 16px; box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.chip b { color: var(--muted); font-weight: 500; margin-left: 4px; }
.chip:hover { box-shadow: inset 0 0 0 2px var(--pink); }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px 22px; }
.tile { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.tile-img { background: var(--white); border-radius: 6px; box-shadow: var(--shadow); aspect-ratio: 1; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover .tile-img { transform: translateY(-3px) rotate(-.6deg); box-shadow: 0 2px 4px rgba(40,20,10,.08), 0 16px 32px rgba(40,20,10,.12); }
.tile-name { font-weight: 700; margin-top: 10px; }
.tile-meta { color: var(--muted); font-size: .9rem; }
.more { text-align: center; margin: 36px 0 0; }
.list-head { padding: 36px 0 18px; }

/* how it works */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 64px 0 24px; }
.how b { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); font-family: var(--display); font-size: 1.2rem; }
.how h3 { margin: 12px 0 4px; font-size: 1.25rem; }
.how p { margin: 0; color: var(--muted); }

/* card page */
.card-page { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; padding: 32px 0 64px; align-items: start; }
.preview { position: sticky; top: 120px; }
.tabs { display: inline-flex; background: var(--white); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 16px; }
.tabs button { border: 0; background: transparent; font: 600 .95rem var(--body); padding: 8px 18px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.stage { background: linear-gradient(135deg, #f6ede4, #fbf5ee); border-radius: var(--radius); padding: 7%; }
.stage .front { width: 100%; border-radius: 4px; box-shadow: var(--shadow); background: var(--white); }
.inside { display: grid; grid-template-columns: 1fr 1fr; box-shadow: var(--shadow); border-radius: 4px; overflow: hidden; }
.inside[hidden] { display: none; }
.page { aspect-ratio: 1; background: var(--white); position: relative; }
.page.left { background: linear-gradient(90deg, #fff 80%, #f3eee9); }
.page.right { background: linear-gradient(90deg, #f3eee9, #fff 20%); container-type: inline-size; }
.msg { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  font-family: "Kalam", cursive; color: #191919; padding: 0 10.3%; white-space: pre; line-height: 1.45; }
.msg .placeholder { font-family: var(--body); color: #b9aea5; font-size: .9rem; white-space: normal; }

.buy h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-top: 0; }
.crumb { margin: 0; } .crumb a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.price { font-family: var(--display); font-size: 1.5rem; font-weight: 800; margin: 0 0 18px; }
fieldset { border: 0; padding: 0; margin: 0 0 26px; }
legend { font-family: var(--display); font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
legend small, label small { font-family: var(--body); font-weight: 400; color: var(--muted); font-size: .85rem; }
.options { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border-radius: 12px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.opt input { margin-top: 4px; accent-color: var(--ink); }
.opt i { font-style: normal; color: var(--muted); }
.opt small { display: block; color: var(--muted); }
label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: 12px; }
input[type=text], input:not([type]), input[type=email], input[type=search], textarea {
  display: block; width: 100%; margin-top: 5px; font: 16px/1.4 var(--body); color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
textarea { font-family: "Kalam", cursive; font-size: 1.15rem; resize: vertical; min-height: 150px; }
input:focus, textarea:focus { outline: 2px solid var(--pink); outline-offset: 1px; border-color: transparent; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.err { color: #b3123e; font-size: .92rem; font-weight: 600; margin: 8px 0 0; }
.ok { color: #1d7a45; font-weight: 700; }
.note { background: #fff1d6; border-radius: 10px; padding: 10px 14px; }
.check { display: flex; gap: 8px; font-weight: 400; align-items: center; }
.sr > input { margin-top: 0; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding: 16px 0; font-size: 1.05rem; }
.total b { font-family: var(--display); font-size: 1.6rem; }
.soon { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: inset 0 0 0 1px var(--line); }
.soon h3 { margin: 0 0 6px; font-size: 1.3rem; }
.soon p { color: var(--muted); margin-top: 0; }

/* order */
.order { padding: 48px 0 80px; max-width: 640px; }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 24px 0; }
.steps li { flex: 1; text-align: center; padding: 10px; border-radius: 10px; background: var(--white); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.steps li.done { background: var(--ink); color: var(--white); box-shadow: none; }
.order-card { display: flex; gap: 18px; align-items: center; background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 20px; }
.order-card img { width: 120px; border-radius: 4px; box-shadow: var(--shadow); }

/* prose */
.prose { max-width: 720px; padding: 40px 0 80px; }
.prose h3 { margin: 1.6em 0 .3em; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0 28px; background: var(--white); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot h4 { font-family: var(--display); margin: 4px 0 10px; }
.foot-grid a:not(.logo) { display: block; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.foot-grid a:not(.logo):hover { color: var(--ink); }
.legal { color: var(--muted); font-size: .8rem; margin-top: 28px; }

@media (max-width: 820px) {
  .hero, .card-page { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding-top: 28px; }
  .fan { height: 300px; max-width: 420px; }
  .preview { position: static; }
  .how { grid-template-columns: 1fr; gap: 20px; padding-top: 40px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; }
  .search input { width: 42vw; }
}

/* Equal-weight consent choices; preference remains available in the footer. */
.privacy-settings{display:block;border:0;background:transparent;padding:0;margin:.45rem 0;color:inherit;font:inherit;text-align:left;text-decoration:underline;cursor:pointer}
.privacy-choice[hidden]{display:none}
.privacy-choice{position:fixed;bottom:1rem;left:1rem;right:1rem;z-index:50;max-width:48rem;margin:auto;padding:1.25rem;background:#fffaf4;color:#25211e;border:2px solid #25211e;border-radius:1rem;box-shadow:0 4px 30px #0002;max-height:80vh;overflow:auto}
.privacy-choice h2{font-size:1.3rem;margin:0 0 .5rem}.privacy-choice p{font-size:.95rem;margin:.5rem 0}.privacy-actions{display:flex;gap:.75rem;flex-wrap:wrap;margin:.8rem 0}
.privacy-actions button{flex:1;min-width:12rem;background:#fff;color:#25211e;border:2px solid #25211e;border-radius:.5rem;padding:.7rem;font:inherit;font-weight:700;cursor:pointer}
.privacy-actions button:focus-visible,.privacy-settings:focus-visible{outline:3px solid #8247a4;outline-offset:3px}

.collection-copy{max-width:76ch}.collection-copy p{margin:.7rem 0}.prose h2{margin-top:1.8em;line-height:1.2}.prose section li p{margin:.65em 0}

/* ── the studio ─────────────────────────────────────────────────────────── */
.studio { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding: 24px 0 64px; align-items: start; }
.studio-stage-wrap { position: sticky; top: 110px; }
.studio-stage { background: linear-gradient(135deg, #f6ede4, #fbf5ee); border-radius: var(--radius); padding: 16px; display: flex; justify-content: center; }
.studio-stage canvas { max-width: 100%; border-radius: 3px; box-shadow: var(--shadow); touch-action: none; cursor: grab; background: #fff; }
.studio-selected { display: flex; gap: 10px; align-items: center; margin-top: 12px; background: var(--white); border-radius: 12px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line); flex-wrap: wrap; }
.studio-selected label { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); flex: 1 1 140px; }
.studio-selected input[type=range] { flex: 1; min-width: 80px; accent-color: var(--ink); }
.mini { border: 0; background: var(--paper); border-radius: 8px; width: 36px; height: 36px; font-size: 1rem; cursor: pointer; }
.mini:hover { background: var(--line); }
.mini.danger { color: #b3123e; }
.studio-panel h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 8px 0 0; }
.studio-panel .price { font-size: 1.25rem; font-weight: 800; margin: 2px 0 14px; }
.studio-tabs { display: flex; width: 100%; }
.studio-tabs button { flex: 1; padding: 9px 6px; }
.tabpane { background: var(--white); border-radius: var(--radius); padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 18px; }
.tabpane .hint { margin-top: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 4px 0 10px; }
.sw-grp { flex-basis: 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.sw.on { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.pat { border: 0; background: var(--paper); border-radius: 10px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 .72rem var(--body); color: var(--muted); }
.pat canvas { width: 64px; height: 64px; border-radius: 8px; }
.pat.none { justify-content: center; min-height: 92px; }
.pat.on { box-shadow: 0 0 0 2px var(--ink); color: var(--ink); }
.slider { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); margin: 8px 0; }
.slider input { flex: 1; accent-color: var(--ink); }
.small-btn { padding: 8px 16px; font-size: .9rem; }
#pic-search { width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font: inherit; margin-bottom: 10px; }
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; }
.pic { border: 0; padding: 0; background: var(--paper); border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic:hover { box-shadow: 0 0 0 2px var(--ink); }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.save-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0 18px; }
.studio-buy fieldset { margin-top: 0; }
.studio-shape { display: grid; place-items: center; }
.studio-shape i { display: block; background: linear-gradient(135deg, var(--pink), var(--yellow)); box-shadow: var(--shadow); }
.studio-shape.card i { width: 58%; aspect-ratio: 1; border-radius: 4px; }
.studio-shape.mug i { width: 56%; aspect-ratio: 1 / .95; border-radius: 6px 6px 14px 14px; }
.studio-shape.notebook i { width: 46%; aspect-ratio: .71; border-radius: 3px 8px 8px 3px; }
.studio-shape.badge i { width: 52%; aspect-ratio: 1; border-radius: 50%; }
@media (max-width: 820px) {
  .studio { grid-template-columns: 1fr; gap: 18px; }
  .studio-stage-wrap { position: static; }
  .studio-stage { padding: 10px; }
  .pic-grid { max-height: 240px; }
}
.make-yours { margin: 10px 0 0; font-size: .95rem; } .make-yours a { font-weight: 700; color: var(--pink-deep); }
.fonts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.font-btn { border: 0; background: var(--paper); border-radius: 10px; padding: 8px 14px; font-size: 1.05rem; cursor: pointer; color: var(--ink); }
.font-btn.on { box-shadow: 0 0 0 2px var(--ink); background: var(--white); }
.bar-label { font: 700 .8rem var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; min-width: 56px; }
#pattern-bar + #selected { margin-top: 8px; }
.draft-note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--white); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; box-shadow: inset 0 0 0 1px var(--line); }
#mine-grid .tile-img img { object-fit: contain; background: #f6ede4; }
.pattern-grid .sw-grp, .pic-grid .sw-grp { grid-column: 1 / -1; margin-top: 8px; }
.pic-grid { max-height: 420px; }
.pic img.whole { object-fit: contain; padding: 6px; background: #f3ebe1; }
.themes { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.themes::-webkit-scrollbar { display: none; }
.chip-t { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 7px 12px 7px 8px; font: 600 .88rem var(--body); color: var(--muted); cursor: pointer; }
.chip-t i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.chip-t.on { background: var(--ink); color: var(--white); box-shadow: none; }
.studio > * { min-width: 0; }   /* a scrolling strip must not widen its column */

/* ── the studio workspace: rail | panel | canvas ───────────────────────── */
.studio { display: grid; grid-template-columns: 84px 360px minmax(0, 1fr); gap: 0; padding: 0; align-items: stretch; height: calc(100vh - 118px); min-height: 560px; width: min(1600px, 100%); margin-inline: auto; }
.studio > * { min-width: 0; }
.rail { display: flex; flex-direction: column; gap: 6px; padding: 14px 8px; border-right: 1px solid var(--line); background: var(--white); }
.rail button { border: 0; background: transparent; border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 .72rem var(--display); color: var(--muted); cursor: pointer; transition: background .15s, transform .15s cubic-bezier(.34,1.56,.64,1); }
.rail button i { font-style: normal; font-size: 1.35rem; line-height: 1; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--paper); }
.rail button:hover { transform: scale(1.06); color: var(--ink); }
.rail button[aria-selected="true"] { color: var(--ink); }
.rail button[aria-selected="true"] i { background: var(--ink); color: var(--white); }
.rail .order-step { margin-top: auto; }
.rail .order-step i { background: linear-gradient(135deg, var(--pink), #ff8c1a); color: #fff; }
.panel { overflow-y: auto; padding: 18px 18px 40px; background: var(--white); border-right: 1px solid var(--line); }
.panel h2 { font-size: 1.35rem; margin: 0 0 6px; font-weight: 800; }
.panel .tabpane { background: transparent; box-shadow: none; padding: 0; margin: 0; }
.next-row { margin: 22px 0 0; }
.btn.next { width: 100%; }
.work { display: flex; flex-direction: column; padding: 14px 24px 18px; overflow: hidden; }
.work-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.work-head .price { font-size: 1.15rem; font-weight: 800; margin: 0; }
.work .studio-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.work .studio-selected { margin-top: 10px; }
.grid-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow: visible; padding: 4px 0; }
.grid-cards .theme-card { width: auto; height: 104px; }
.theme-card { position: relative; flex: none; scroll-snap-align: start; width: 128px; height: 96px; border: 0; border-radius: 16px; padding: 10px 12px; text-align: left; color: #fff; cursor: pointer; overflow: hidden; text-decoration: none;
  background: linear-gradient(135deg, var(--a), var(--b) 60%, var(--c)); box-shadow: 0 6px 18px rgba(40,20,10,.14); transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s; display: flex; flex-direction: column; justify-content: flex-end; }
.theme-card .theme-pat { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; mix-blend-mode: soft-light; }
.theme-card b { position: relative; font: 800 1.05rem var(--display); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.theme-card small { position: relative; display: block; font-size: .72rem; opacity: .92; text-shadow: 0 1px 2px rgba(0,0,0,.35); line-height: 1.2; }
.theme-card:hover { transform: translateY(-3px) rotate(-1deg) scale(1.03); box-shadow: 0 12px 28px rgba(40,20,10,.2); }
.theme-card.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.theme-card.none { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.theme-card.none b, .theme-card.none small { text-shadow: none; } .theme-card.none small { color: var(--muted); }
.themes { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: none; }
.themes.big { gap: 14px; } .themes.big .theme-card { width: 200px; height: 150px; border-radius: 22px; padding: 14px 16px; }
.themes.big .theme-card b { font-size: 1.5rem; } .themes.big .theme-card small { font-size: .85rem; }
.surprise { width: 100%; margin: 6px 0 14px; background: linear-gradient(135deg, var(--pink), #ff8c1a); padding: 14px 18px; font-size: 1.05rem; box-shadow: 0 8px 20px rgba(255,79,163,.35); animation: wiggle 3.5s ease-in-out infinite; }
.surprise:hover { background: linear-gradient(135deg, var(--pink-deep), var(--pink)); transform: translateY(-2px) scale(1.02); }
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 90% { transform: rotate(-2deg) scale(1.03); } 94% { transform: rotate(2deg) scale(1.03); } 97% { transform: rotate(-1deg); } }
.studio-stage.pulse { animation: pulse .55s cubic-bezier(.34,1.56,.64,1); }
@keyframes pulse { 0% { transform: scale(.97); } 60% { transform: scale(1.015); } 100% { transform: scale(1); } }
.sw { transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s; } .sw:hover { transform: scale(1.3); z-index: 1; }
.sw { width: 34px; height: 34px; }
.pat, .pic, .font-btn { transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s; }
.pat:hover, .pic:hover { transform: translateY(-2px) scale(1.05); } .font-btn:hover { transform: scale(1.06); }
.pattern-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } .pat canvas { width: 80px; height: 80px; }
.pic-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); max-height: none; overflow: visible; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
.studio-shape { background: #f6ede4; display: grid; place-items: center; }
.studio-shape canvas.sample { object-fit: cover; box-shadow: 0 10px 24px rgba(40,20,10,.18); }
.studio-shape.mug canvas.sample { width: 72%; height: 58%; border-radius: 10px 10px 24px 24px / 10px 10px 30px 30px; }
.studio-shape.badge canvas.sample { width: 60%; height: 60%; border-radius: 50%; }
.studio-shape.notebook canvas.sample { width: 56%; height: 78%; border-radius: 3px 10px 10px 3px; }
.studio-shape.card canvas.sample { width: 64%; height: 64%; border-radius: 4px; }
.studio-tile:hover .tile-img { transform: translateY(-4px) rotate(-1.2deg) scale(1.02); }
.vibes h2.sec { margin-top: 1.4rem; }
@media (max-width: 900px) {
  .studio { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .work { order: 0; padding: 10px 16px 8px; position: sticky; top: 100px; z-index: 5; background: var(--paper); }
  .rail { order: 1; flex-direction: row; justify-content: space-between; border-right: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 10px; overflow-x: auto; }
  .rail button { padding: 6px 2px; flex: 1; } .rail .order-step { margin-top: 0; }
  .panel { order: 2; border-right: 0; padding: 16px; }
  .grid-cards { grid-template-columns: 1fr 1fr 1fr; } .grid-cards .theme-card { height: 92px; }
  .themes.big .theme-card { width: 160px; height: 120px; }
}
.themes.grid-cards { display: grid; overflow: visible; }   /* the panel's cards are a grid, not a strip */

.work-head { flex-wrap: wrap; align-items: center; }
.rude-switch { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 14px; font: 700 .85rem var(--display); color: var(--ink); cursor: pointer; user-select: none; }
.rude-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rude-switch .knob { width: 40px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.rude-switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.rude-switch input:checked + .knob { background: var(--ink); }
.rude-switch input:checked + .knob::after { transform: translateX(18px); }
.rude-switch input:focus-visible + .knob { outline: 3px solid var(--blue); outline-offset: 2px; }

/* pattern thumbnails: a big close-up, the name in two short lines */
.pattern-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.pat { padding: 0; overflow: hidden; border-radius: 14px; gap: 0; align-items: stretch; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.pat canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; display: block; }
.pat .pat-name { display: block; padding: 6px 8px 8px; text-align: left; line-height: 1.2; }
.pat .pat-name b { display: block; font: 700 .78rem var(--display); color: var(--ink); }
.pat .pat-name small { display: block; font-size: .7rem; color: var(--muted); }
.pat.none { min-height: 0; aspect-ratio: auto; display: grid; place-items: center; font: 700 .85rem var(--display); color: var(--muted); padding: 12px; }
.pat.on { box-shadow: 0 0 0 3px var(--ink); }

/* text style: Plain / Balloon */
.style-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.style-btn { border: 0; background: var(--paper); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 700 .8rem var(--display); color: var(--muted); cursor: pointer; transition: transform .15s cubic-bezier(.34,1.56,.64,1); }
.style-btn:hover { transform: scale(1.04); }
.style-btn.on { box-shadow: 0 0 0 3px var(--ink); color: var(--ink); background: var(--white); }
.style-btn .sp-plain { font: 400 1.8rem Kalam, cursive; color: var(--ink); line-height: 1.1; }
.style-btn .sp-balloon { font: 400 1.9rem "Titan One", var(--display); line-height: 1.1; color: #d85e97; -webkit-text-stroke: 3px #111; paint-order: stroke fill; text-shadow: 2px 2px 0 rgba(0,0,0,.25); }
.balloon-opts { background: var(--paper); border-radius: 14px; padding: 10px 12px 4px; margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border-radius: 999px; padding: 6px 12px; margin: 0 6px 6px 0; font: 600 .82rem var(--body); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.pill input { accent-color: var(--ink); }
.sw-none { border: 0; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; height: 34px; padding: 0 12px; font: 700 .75rem var(--body); cursor: pointer; }
.sw-none.on { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
@font-face { font-family: "Titan One"; src: url("/fonts/TitanOne-Regular.ttf") format("truetype"); font-display: swap; }

.studio-selected .text-only[hidden] { display: none !important; }

/* starters: finished designs to begin from */
.starters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.starter { border: 0; padding: 0; background: var(--white); border-radius: 14px; overflow: hidden; cursor: pointer; box-shadow: 0 4px 14px rgba(40,20,10,.10), inset 0 0 0 1px var(--line); text-align: left; transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s; }
.starter canvas { display: block; width: 100%; height: auto; background: #f6ede4; }
.starter span { display: block; padding: 7px 10px 9px; font: 700 .82rem var(--display); color: var(--ink); }
.starter:hover { transform: translateY(-3px) rotate(-.6deg) scale(1.02); box-shadow: 0 10px 24px rgba(40,20,10,.16); }
.starter.on { box-shadow: 0 0 0 3px var(--ink); }
.panel h2.sub { font-size: 1.05rem; margin: 18px 0 4px; }
@media (max-width: 900px) { .starters { grid-template-columns: 1fr 1fr 1fr; } }

.style-btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }

.style-row { grid-template-columns: 1fr 1fr 1fr; }
.style-btn .sp-img { height: 1.9rem; width: auto; display: inline-block; vertical-align: middle; filter: drop-shadow(0 0 0 transparent); }
.style-btn .sp-imgs { display: inline-flex; height: 2.1rem; align-items: center; }
.style-btn .sp-imgs .sp-img + .sp-img { margin-left: -8px; }
.style-btn .sp-imgs .sp-img:first-child { filter: sepia(1) saturate(6) hue-rotate(290deg); }
.style-btn .sp-imgs .sp-img:last-child { filter: sepia(1) saturate(5) hue-rotate(140deg); }
.balloon-opts [hidden] { display: none !important; }

/* ── /studio landing: real starters on real things ─────────────────────── */
.studio-hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; padding: 40px 0 16px; }
.studio-hero .lead { margin-bottom: 1.3em; }
.studio-hero .row-btns { margin: 0; align-items: center; }
.sec-lead { font-size: 1.02rem; margin: -.4em 0 1.2em; }
.showcase { position: relative; height: 470px; }
.show { position: absolute; display: block; transition: transform .22s cubic-bezier(.34,1.56,.64,1), z-index 0s; }
.show .shape { display: block; }
.show-0 { left: 30%; top: 190px; width: 44%; z-index: 3; transform: rotate(-2deg); }     /* the mug, in front and low */
.show-1 { left: 0; top: 0; width: 42%; transform: rotate(-7deg); z-index: 1; }            /* the card, top left */
.show-2 { right: 0; top: 10px; width: 29%; transform: rotate(6deg); z-index: 2; }         /* the hardback, top right */
.show:hover { transform: rotate(0) scale(1.04); z-index: 5; }
/* the things: a white mug with a handle, a card, a bound book, a pinned badge */
.shape { display: block; position: relative; }
.shape canvas.sample { display: block; width: 100%; height: auto; }
.card .shape { background: #fff; border-radius: 4px; box-shadow: var(--shadow); overflow: hidden; }
.mug .shape { background: #fff; padding: 7% 7% 9%; border-radius: 9% 9% 22% 22% / 7% 7% 18% 18%; box-shadow: var(--shadow); margin-right: 22%; }
.mug .shape canvas.sample { border-radius: 2px; }
.mug .shape::after { content: ""; position: absolute; right: -22%; top: 16%; width: 28%; height: 58%; border: 11px solid #fff; border-left: 0; border-radius: 0 50% 50% 0 / 0 46% 46% 0; box-shadow: 4px 6px 16px rgba(40,20,10,.12); z-index: -1; }
.notebook .shape { border-radius: 3px 10px 10px 3px; box-shadow: var(--shadow); overflow: hidden; }
.notebook .shape::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7%; background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,0)); z-index: 1; }
.badge .shape { border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px #fff, var(--shadow); }
.badge .shape::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.45), rgba(255,255,255,0) 42%); pointer-events: none; }
.things { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px 20px; }
.thing { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.thing-img { display: grid; place-items: center; aspect-ratio: 1; background: #f6ede4; border-radius: var(--radius); padding: 7%; transition: transform .18s cubic-bezier(.34,1.56,.64,1), background .18s; }
.thing-img .shape { width: 100%; }
.thing-img.card .shape { width: 82%; }
.thing-img.mug .shape { width: 78%; margin-right: 16%; }
.thing-img.notebook .shape { width: 62%; }
.thing-img.badge .shape { width: 72%; }
.thing:hover .thing-img { transform: translateY(-4px) rotate(-1deg); background: #f3e7da; }
.thing .tile-name { margin-top: 10px; font-size: 1.05rem; }
.themes.big .theme-card { font: inherit; }
.themes.big .theme-card.on { outline: 3px solid var(--ink); outline-offset: 3px; }
.themes.big .theme-card.none { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.themes.big .theme-card.none b, .themes.big .theme-card.none small { text-shadow: none; }
.themes.big .theme-card.none small { color: var(--muted); }
#mine { padding-top: 8px; }
#mine .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 16px; }
@media (max-width: 1000px) { .things { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) {
  .studio-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .showcase { height: 300px; max-width: 460px; margin-inline: auto; width: 100%; }
  .show-0 { top: 120px; }
  .showcase { height: 330px; }
  .things { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .studio-hero .row-btns .btn { padding: 12px 18px; font-size: .98rem; }
}

/* the mock-up preview */
.mock-preview { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 64px; }
.mock-stage { background: linear-gradient(135deg, #f6ede4, #fbf5ee); border-radius: var(--radius); padding: 16px; }
.mock-stage canvas { display: block; width: 100%; height: auto; border-radius: 8px; cursor: grab; touch-action: pan-y; }
.mock-hint { text-align: center; margin: 8px 0 0; }
.mock-preview .starters { grid-template-columns: 1fr 1fr 1fr; }
.mock-preview .starter span { padding: 12px 10px; text-align: center; }
@media (max-width: 820px) { .mock-preview { grid-template-columns: 1fr; } }
