:root {
  color-scheme: light dark;
  --page: #f6f6f4;
  --surface: #fff;
  --stage: #eeeeec;
  --placeholder: #dfdfdc;
  --ink: #1d1d1f;
  --muted: #55555a;
  --line: #e2e2df;
  --field-line: #b6b6b3;
  --button-line: #d3d3d0;
  --accent: #a9432b;
  --button: #b4472e;
  --on-button: #fff;
  --accent-wash: #fbefea;
  --error: #a3262b;
  --shadow: 0 22px 44px -20px #0000004d, 0 3px 8px #00000014;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #121212;
    --surface: #1c1c1e;
    --stage: #161617;
    --placeholder: #333336;
    --ink: #f5f5f7;
    --muted: #bdbdc2;
    --line: #333336;
    --field-line: #6e6e73;
    --button-line: #48484c;
    --accent: #ffb59f;
    --button: #ffad96;
    --on-button: #3b140a;
    --accent-wash: #3a241d;
    --error: #ffb3b0;
    --shadow: 0 20px 40px -14px #000a, 0 3px 8px #0005;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; background: var(--page); }
h1, h2, p { margin: 0; }
button, input { font: inherit; }
button, summary, .starter, .check, label.button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }

.masthead { border-bottom: 1px solid var(--line); }
.brand { min-height: 66px; display: flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -.02em; }
.brand-link { display: flex; align-items: center; gap: 11px; min-height: 44px; color: inherit; text-decoration: none; }
.brand-mark { flex: none; color: var(--button); }
.brand-mark .mark-line { stroke: var(--on-button); }
.brand-by { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--ink); font-size: .92rem; font-weight: 620; text-decoration: none; }
.nav-link:hover { color: var(--accent); }
.intro { padding-block: 46px 30px; }
h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); font-weight: 680; line-height: 1.06; letter-spacing: -.048em; overflow-wrap: anywhere; }
.intro-home { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; padding-block: 40px 34px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 26px; }
.hero-actions .button { min-height: 48px; padding-inline: 22px; font-size: .98rem; }
.hero-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 620; text-decoration: none; }
.hero-link::after { content: '›'; margin-left: 6px; font-size: 1.2em; line-height: 1; }
.hero-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.samples { position: relative; width: 390px; height: 220px; }
.samples img { position: absolute; top: 14px; width: 190px; height: 190px; border-radius: 18px; box-shadow: 0 18px 36px -16px #0000005c, 0 2px 6px #0000001a; }
.samples img:nth-child(1) { left: 0; transform: rotate(-7deg); }
.samples img:nth-child(2) { left: 100px; top: 0; z-index: 1; width: 200px; height: 200px; }
.samples img:nth-child(3) { right: 0; transform: rotate(7deg); }
.intro p { margin-top: 13px; font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); }

.tool { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 1px 2px #0000000d; }
.chooser { grid-column: 1 / -1; margin: 0; padding: 24px 28px 26px; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.chooser legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 16px; font-size: 1.06rem; font-weight: 700; letter-spacing: -.02em; }
.chooser legend + * { clear: both; }
.stage-col { display: flex; flex-direction: column; justify-content: center; padding: 32px; border-right: 1px solid var(--line); border-radius: 0 0 0 21px; background: var(--stage); }
.frame-page .stage-col { border-radius: 21px 0 0 21px; }
.stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--placeholder); box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage.has-photo { cursor: grab; touch-action: none; }
.stage.has-photo:active { cursor: grabbing; }
.stage.dragging { outline: 3px dashed var(--accent); outline-offset: 4px; }
.stage-add { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 680; box-shadow: var(--shadow); }
.stage-add:hover { background: var(--accent-wash); }
.has-photo .stage-add { display: none; }

.panel { display: flex; flex-direction: column; justify-content: center; padding: 30px 32px 24px; min-width: 0; }
.step { margin: 0; padding: 0 0 20px; border: 0; min-width: 0; }
.step + .step { padding-top: 18px; border-top: 1px solid var(--line); }
.step h2, .step legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px; font-size: 1.06rem; font-weight: 700; letter-spacing: -.02em; }
.step-number { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-wash); color: var(--accent); font-size: .8rem; font-weight: 750; }
.starters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.starter { position: relative; display: grid; gap: 8px; padding: 7px 7px 10px; border: 1px solid var(--line); border-radius: 14px; font-size: .86rem; font-weight: 640; text-align: center; line-height: 1.25; transition: border-color .15s, box-shadow .15s; }
.starter:hover { border-color: var(--field-line); }
.starter img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; background: var(--placeholder); }
.starter input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.starter:has(:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 18px -10px #6b2a1880; background: var(--accent-wash); }
.starter:has(:checked)::after { content: ''; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--button) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: 0 0 0 2px var(--surface); }
.starter:has(:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.photo-actions, .save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 17px; border: 1px solid var(--button-line); border-radius: 11px; background: var(--stage); color: var(--ink); font-size: .92rem; font-weight: 660; text-decoration: none; }
button:not(:disabled):hover, .button:hover { background: var(--accent-wash); }
label.button:has(+ input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.primary, .button.primary { border-color: var(--button); background: var(--button); color: var(--on-button); }
.primary:not(:disabled):hover, .button.primary:hover { background: color-mix(in srgb, var(--button) 88%, var(--ink)); }
button:disabled { background: var(--stage); border-color: var(--line); color: var(--muted); }
.save-actions .primary { flex: 1 1 220px; }
.zoom { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; margin-top: 14px; font-size: .9rem; font-weight: 620; }
.zoom input { width: 100%; min-height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.zoom input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--placeholder); }
.zoom input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--placeholder); }
.zoom input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border: 3px solid var(--surface); border-radius: 50%; background: var(--button); box-shadow: 0 1px 4px #0004; }
.zoom input::-moz-range-thumb { width: 18px; height: 18px; border: 3px solid var(--surface); border-radius: 50%; background: var(--button); box-shadow: 0 1px 4px #0004; }
.zoom input:disabled { cursor: default; opacity: .55; }
.zoom input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hint { margin-top: 8px; font-size: .875rem; color: var(--muted); }
.status { min-height: 1.4em; margin-top: 10px; font-size: .88rem; }
.status.is-error { color: var(--error); font-weight: 600; }
.private-note { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--muted); font-size: .84rem; }
.private-note svg { flex: none; color: var(--accent); }
.frame-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .88rem; }
.frame-foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 620; }
.text-button { border: 0; padding-inline: 4px; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-weight: 560; }
.text-button:not(:disabled):hover { background: transparent; color: var(--ink); }
.text-button.danger { color: var(--error); }

.make { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 48px; margin-top: 48px; padding: 40px 0 8px; border-top: 1px solid var(--line); }
.make h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); letter-spacing: -.04em; line-height: 1.15; }
.make-copy > p { margin-top: 10px; color: var(--muted); }
.needs { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .92rem; }
.needs li { display: flex; gap: 10px; align-items: baseline; }
.needs li::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; font-size: .9rem; font-weight: 670; }
.file-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; min-width: 0; }
.file-row .button { flex: none; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .88rem; }
.field > input { display: block; width: 100%; min-height: 46px; margin-top: 6px; padding: 9px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.field > input[type=file] { padding: 8px; }
.field > input::file-selector-button { min-height: 32px; margin-right: 10px; padding: 4px 12px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--stage); color: var(--ink); font: inherit; font-size: .86rem; font-weight: 620; }
.field > input::placeholder { color: var(--muted); opacity: 1; }
[aria-invalid='true'] { border-color: var(--error) !important; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-top: 4px; margin-bottom: 12px; font-size: .92rem; }
.check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--button); }
.make-form .primary { width: 100%; }
.make-open { margin-top: 22px; }
.make:has(#make-form[hidden]) { grid-template-columns: 1fr; }
.make:has(#make-form[hidden]) .needs { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.make-copy .hint { margin-top: 14px; }

.organizer { margin-top: 30px; padding: 22px 24px; border: 1px solid var(--accent); border-radius: 18px; background: var(--accent-wash); }
.organizer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.organizer-state { margin-top: 6px; font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.organizer-state + p { margin-top: 2px; color: var(--muted); }
.share-row { display: flex; gap: 8px; margin-top: 14px; }
.share-row input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.organizer .text-button { margin-top: 6px; padding-left: 0; }
.unavailable { padding-bottom: 50px; color: var(--muted); }
.unavailable .button { margin-top: 18px; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; padding: 34px 0; }
.facts > div { padding: 4px 6px 0 0; }
.facts svg { display: block; box-sizing: content-box; width: 22px; height: 22px; margin-bottom: 14px; padding: 11px; border-radius: 12px; background: var(--accent-wash); color: var(--accent); }
.facts h2 { margin-bottom: 4px; font-size: 1rem; }
.facts p, .faq p, dialog p { color: var(--muted); font-size: .92rem; }
.faq { display: grid; grid-template-columns: minmax(0, .67fr) minmax(0, 1fr); gap: 25px; padding: 28px 0 58px; border-top: 1px solid var(--line); }
.frame-page .facts { padding-top: 40px; }
.faq h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); letter-spacing: -.04em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: translateY(-2px) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq p { padding: 0 22px 15px 0; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-height: 65px; }
.site-footer button { border: 0; padding-inline: 7px; background: transparent; color: var(--accent); }
dialog { width: min(440px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: #160b07a0; }
dialog h2 { font-size: 1.2rem; letter-spacing: -.02em; }
dialog p, dialog > form { margin-top: 12px; }
dialog > form:only-of-type { display: flex; justify-content: end; }
#report-form { display: block; margin: 0; }
.reasons { display: grid; gap: 2px; margin: 12px 0 0; padding: 0; border: 0; }
.reasons legend { padding: 0; margin-bottom: 6px; color: var(--muted); font-size: .9rem; }
.reasons label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; border-radius: 8px; font-size: .94rem; cursor: pointer; }
.reasons label:hover { background: var(--accent-wash); }
.reasons input { width: 18px; height: 18px; margin: 0; accent-color: var(--button); }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 14px; }
.danger-fill { border-color: var(--error); background: var(--error); color: var(--surface); }

@media (max-width: 860px) {
  .wrap { width: min(560px, calc(100% - 32px)); }
  .brand { min-height: 57px; }
  .intro { padding-block: 28px 20px; }
  .tool { grid-template-columns: minmax(0, 1fr); }
  .chooser { padding: 18px 17px 20px; }
  .starters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .starter { font-size: .8rem; padding: 6px 6px 8px; }
  .starter:has(:checked)::after { top: 10px; right: 10px; width: 20px; height: 20px; }
  .stage-col, .frame-page .stage-col { padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .frame-page .stage-col { border-radius: 21px 21px 0 0; }
  .panel { padding: 20px 17px 14px; }
  .make { grid-template-columns: 1fr; gap: 22px; padding: 28px 0 4px; }
  .intro-home { grid-template-columns: 1fr; gap: 22px; padding-block: 26px 22px; }
  .samples { width: 100%; max-width: 300px; height: 150px; margin-inline: auto; }
  .samples img { width: 128px; height: 128px; border-radius: 14px; top: 10px; }
  .samples img:nth-child(2) { left: calc(50% - 68px); width: 136px; height: 136px; top: 0; }
  .facts, .faq { grid-template-columns: 1fr; }
  .facts { gap: 10px; padding-block: 24px; }
  .facts > div { padding: 8px 0; }
  .nav-wide { display: none; }
  .hero-actions { margin-top: 18px; }
  .faq { gap: 7px; padding-block: 22px 36px; }
  .share-row { flex-wrap: wrap; }
  .share-row .primary { flex: 1 1 100%; }
}
