:root { --bg: #EEF0F2; --card: #fff; --ink: #1B2430; --muted: #5B6573; --accent: #1F3A5F; --line: #D5DAE0; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.top { display: flex; align-items: baseline; gap: 12px; padding: 14px 16px; }
.brand { color: var(--ink); font-weight: 700; text-decoration: none; }
.tag { color: var(--muted); font-size: 14px; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 0 16px 32px; max-width: 1180px; margin: 0 auto; }
@media (min-width: 860px) { .studio { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .preview { position: sticky; top: 16px; } }
.preview { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* Preview shown framed on a wall, like the product photos of the bestsellers */
.scene { position: relative; display: flex; justify-content: center; align-items: center; overflow: hidden; background: linear-gradient(180deg, #ECE6DD, #E2D9CC); border-radius: 14px; padding: clamp(16px, 4vw, 44px); }
.frame { position: relative; z-index: 1; width: 100%; max-width: 520px; background: #fff; padding: 3.2%; border: 9px solid #2B2621; box-shadow: 0 18px 40px rgba(40, 30, 20, .28); transition: max-width .35s ease; }
.frame:has(.sheet[data-orientation="landscape"]) { max-width: 760px; }
.frame[data-frame="oak"] { border-image: linear-gradient(135deg, #C9A57D, #A47E57 35%, #C29A6F 62%, #9C7650) 1; }
.frame[data-frame="white"] { border-color: #F6F3EE; box-shadow: 0 0 0 1px #D9D2C6, 0 18px 40px rgba(40, 30, 20, .22); }
/* "On the wall": the same live poster, smaller, above a sideboard in window light */
.sideboard { display: none; }
.scene.room { padding: 6% 0 21%; background: radial-gradient(ellipse 70% 60% at 18% 0%, rgba(255, 252, 245, .9), transparent 70%), linear-gradient(180deg, #E7DFD2, #D9CEBD); }
.scene.room .frame { max-width: 40%; border-width: 6px; box-shadow: 12px 22px 30px rgba(50, 36, 22, .26), 2px 4px 6px rgba(50, 36, 22, .18); }
.scene.room .frame:has(.sheet[data-orientation="landscape"]) { max-width: 58%; }
.scene.room .sideboard { display: block; position: absolute; left: 10%; right: 10%; bottom: 0; height: 11%; background: linear-gradient(180deg, #9B7A58 0, #9B7A58 12%, #B8946D 12%, #A9855F 100%); box-shadow: 0 -10px 24px rgba(50, 36, 22, .18); }
.vase { position: absolute; right: 9%; bottom: 100%; width: 11%; height: auto; }
.view-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-size: 14px; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.frames { display: inline-flex; gap: 8px; }
.frames button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.frames button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.frames [data-frame="black"] { background: #2B2621; }
.frames [data-frame="oak"] { background: linear-gradient(135deg, #C9A57D, #A47E57); }
.frames [data-frame="white"] { background: #F6F3EE; }
.sheet { position: relative; width: 100%; aspect-ratio: 210 / 297; background: #F7F3EC; }
.sheet[data-orientation="landscape"] { aspect-ratio: 297 / 210; }
.sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .4 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.sheet svg { display: block; width: 100%; height: 100%; }
.loading { margin: 0; padding: 24px; color: var(--muted); }
.controls { background: var(--card); border-radius: 12px; padding: 20px; }
.controls h1 { font-size: 22px; margin: 0 0 16px; }
.field { display: block; font-weight: 600; margin: 16px 0 6px; }
fieldset.field { border: 0; padding: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
fieldset.field label { font-weight: 400; margin-right: 16px; display: inline-block; white-space: nowrap; }
.hint { font-weight: 400; color: var(--muted); font-size: 14px; }
.add input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.add input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.error { color: #A3271F; font-size: 14px; margin: 6px 0 0; }
.chips { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.chips li { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 6px; background: var(--bg); border-radius: 10px; padding: 4px 4px 4px 6px; }
.chips li:not(:has(.grip)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; padding-left: 12px; }
.chips li.dragging { background: var(--card); box-shadow: 0 6px 18px rgba(20, 30, 45, .18); }
.grip { cursor: grab; touch-action: none; user-select: none; color: var(--muted); font-size: 18px; line-height: 1; width: 28px; height: 32px; display: grid; place-items: center; border-radius: 6px; }
.grip:hover, .grip:focus-visible { background: var(--line); color: var(--ink); }
.dragging .grip { cursor: grabbing; }
.cname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.clabel { min-width: 0; font: inherit; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); }
.chips button { border: 0; background: none; font-size: 18px; line-height: 1; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.chips button:hover { background: var(--line); color: var(--ink); }
.sheet svg { cursor: crosshair; }
.places { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.places li { display: flex; align-items: center; gap: 6px; }
.places .pin { color: #C2544B; width: 18px; text-align: center; }
.places input { flex: 1; min-width: 0; font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.places .where { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.places button { border: 0; background: none; font-size: 18px; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.places button:hover { background: var(--line); color: var(--ink); }
@font-face { font-family: 'MG Sans'; src: url(fonts/Jost-400.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'MG Script'; src: url(fonts/GreatVibes.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'MG Serif'; src: url(fonts/CormorantGaramond-500.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'MG Serif Italic'; src: url(fonts/CormorantGaramond-Italic-500.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'MG Typewriter'; src: url(fonts/CourierPrime.ttf) format('truetype'); font-display: swap; }
.texts { display: grid; gap: 8px; }
.texts input { width: 100%; font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
.late .f-script { font-family: 'MG Script', cursive; } .f-script { font-size: 20px; } /* sample fonts load after the first poster */
.late .f-serif { font-family: 'MG Serif Italic', serif; } .f-serif { font-size: 18px; font-style: italic; }
.late .f-typewriter { font-family: 'MG Typewriter', monospace; } .f-typewriter { font-family: monospace; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.check { display: block; margin-top: 6px; }
.get { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.get h2 { font-size: 18px; margin: 0 0 4px; }
.dl { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.dl li { display: flex; align-items: center; gap: 8px; }
.dl .size { flex: 1; }
.dl .size small { color: var(--muted); }
.dl button { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.dl button.alt { background: #fff; color: var(--accent); }
.dl button:disabled { opacity: .5; cursor: progress; }
.status { min-height: 1.5em; color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.buy-btn { display: block; text-align: center; background: #C2544B; color: #fff; text-decoration: none; font-weight: 600; padding: 12px; border-radius: 10px; margin: 12px 0 4px; }
.key { display: flex; gap: 8px; }
.key input { flex: 1; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.key button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent); background: #fff; color: var(--accent); cursor: pointer; }
.about { max-width: 760px; margin: 0 auto; padding: 8px 16px 48px; }
.about h2 { font-size: 22px; margin: 28px 0 12px; }
.steps { padding-left: 20px; display: grid; gap: 8px; }
.about details { background: var(--card); border-radius: 10px; padding: 12px 16px; margin: 8px 0; }
.about summary { cursor: pointer; font-weight: 600; }
.about details p { margin: 8px 0 0; }
.credit { color: var(--muted); font-size: 13px; margin-top: 24px; }
.when { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.when label { display: grid; gap: 4px; font-weight: 600; }
.when input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.f-modern { font-family: 'MG Sans', sans-serif; letter-spacing: .18em; font-size: 13px; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.story { cursor: pointer; display: block !important; white-space: normal !important; margin-right: 0 !important; }
.story input { position: absolute; opacity: 0; pointer-events: none; }
.story span { display: grid; gap: 2px; height: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 400; }
.story b { font-size: 14px; line-height: 1.25; }
.story small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.story input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #F4F7FB; }
.story input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tone-row { display: flex; gap: 10px; align-items: end; margin: 10px 0 4px; flex-wrap: wrap; }
.tones { display: flex; gap: 6px; flex-wrap: wrap; }
.tones button { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.tones button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.year { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.year input { width: 72px; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.hint.small { font-size: 12px; line-height: 1.4; }
.key-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--ink); }
.consent input { margin-top: 2px; flex: none; }
.key button:disabled { opacity: .45; cursor: not-allowed; }
