@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/noto-sans-jp-japanese-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url("/assets/fonts/noto-sans-jp-japanese-800-normal.woff2") format("woff2");
}

:root {
  --ink: #17121b;
  --muted: #625a64;
  --paper: #fffdf9;
  --pink: #ff4b8b;
  --pink-soft: #ffe8f1;
  --yellow: #ffd400;
  --yellow-soft: #fff1a6;
  --cyan: #5ce1e6;
  --line: #e8dfe5;
  --shadow: 7px 7px 0 var(--ink);
  --radius-lg: 28px;
  --radius-md: 18px;
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header {
  display: flex;
  width: min(1220px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 2px solid var(--ink); border-radius: 11px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); font-size: 22px; font-weight: 950; transform: rotate(-5deg); }
.brand strong { display: block; font-size: 15px; letter-spacing: .03em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.site-header nav { display: flex; gap: 25px; color: var(--muted); font-size: 13px; font-weight: 750; }
.site-header nav a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--pink); }

main { overflow: hidden; }
.hero { display: grid; width: min(1220px, calc(100% - 48px)); min-height: 560px; margin: 18px auto 0; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: center; gap: clamp(28px, 6vw, 90px); }
.hero-copy { padding: 36px 0 48px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.eyebrow-dot { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--ink); border-radius: 50%; background: var(--pink); }
.eyebrow-dot.yellow { background: var(--yellow); }
.eyebrow-dot.pink { background: var(--pink); }
.eyebrow-dot.black { background: var(--ink); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 610px; margin-bottom: 23px; font-size: clamp(42px, 5.5vw, 75px); line-height: .99; letter-spacing: -.065em; font-weight: 950; }
h1 em { display: inline-block; padding: 0 .08em .04em; color: var(--pink); font-style: normal; background: linear-gradient(transparent 64%, var(--yellow) 64%); }
.hero-lead { max-width: 530px; margin-bottom: 28px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.hero-note { margin: 18px 0 0; color: #847b84; font-size: 12px; }
.hero-art { position: relative; overflow: hidden; min-height: 390px; border: 2px solid var(--ink); border-radius: 32px; background: var(--yellow); box-shadow: var(--shadow); transform: rotate(1.3deg); }
.hero-art::after { position: absolute; inset: 0; pointer-events: none; content: ""; border: 12px solid rgba(255,255,255,.18); border-radius: inherit; mix-blend-mode: screen; }
.hero-art img { display: block; width: 100%; height: 100%; min-height: 390px; object-fit: cover; }
.art-label { position: absolute; z-index: 1; display: inline-flex; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 6px; background: var(--yellow); font-size: 10px; font-weight: 950; letter-spacing: .11em; box-shadow: 3px 3px 0 var(--ink); }
.art-label-top { top: 24px; left: 22px; transform: rotate(-5deg); }
.art-label-bottom { right: 22px; bottom: 24px; background: var(--pink); transform: rotate(4deg); }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; border: 2px solid var(--ink); border-radius: 999px; padding: 0 20px; cursor: pointer; font-size: 13px; font-weight: 850; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover:not(:disabled), .button:focus-visible:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.button:active:not(:disabled) { transform: translate(0); box-shadow: none; }
.button:disabled { cursor: not-allowed; opacity: .4; }
.button-primary { background: var(--pink); }
.button-dark { color: #fff; background: var(--ink); }
.button-yellow { background: var(--yellow); }
.button-quiet { border-color: var(--line); color: var(--muted); background: #fff; }
.hero-cta { padding: 0 24px; }

.workbench-section { width: min(1220px, calc(100% - 48px)); margin: 100px auto 0; scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
h2 { margin-bottom: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.055em; font-weight: 950; }
.section-intro { max-width: 410px; margin-bottom: 2px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.maker-grid { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr); align-items: start; gap: 24px; }
.control-panel, .preview-panel { border: 2px solid var(--ink); border-radius: var(--radius-lg); background: #fff; }
.control-panel { padding: clamp(22px, 3vw, 34px); box-shadow: 8px 8px 0 var(--pink); }
.preview-panel { padding: clamp(20px, 3vw, 30px); background: #fffafc; }
.panel-topline, .field-heading, .preview-header, .range-ends, .toggle-row, .save-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-topline { margin-bottom: 25px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.status-chip, .preview-badge { display: inline-flex; min-height: 23px; align-items: center; border: 1px solid var(--ink); border-radius: 99px; padding: 0 9px; color: var(--ink); background: var(--yellow); font-size: 9px; letter-spacing: .08em; }
.preview-badge[data-state="error"] { background: var(--pink-soft); }
.preview-badge[data-state="ready"] { background: var(--cyan); }
.field { min-width: 0; margin-bottom: 18px; }
.field label, .style-fieldset legend { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 850; }
.field-heading { margin-bottom: 8px; }
.field-heading label { margin: 0; }
.field-heading span, .field-heading output { color: var(--muted); font-size: 11px; font-weight: 750; }
#char-count[data-over="true"] { color: var(--pink); font-weight: 900; }
textarea, input[type="number"], select { width: 100%; min-height: 45px; border: 1.5px solid #cfc4cc; border-radius: 11px; padding: 10px 12px; color: var(--ink); background: #fff; outline: none; }
textarea { min-height: 112px; resize: vertical; line-height: 1.65; }
textarea:focus, input:focus, select:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--pink); }
.field-hint { margin: 7px 0 0; color: #847b84; font-size: 11px; }
.field-error { min-height: 16px; margin: 4px 0 0; color: #bc1f5a; font-size: 11px; line-height: 1.45; }
.field-row { display: grid; gap: 12px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.unit-input { position: relative; }
.unit-input input { padding-right: 42px; }
.unit-input span { position: absolute; top: 50%; right: 12px; color: var(--muted); font-size: 12px; transform: translateY(-50%); }
.slider-field { padding-top: 1px; }
input[type="range"] { display: block; width: 100%; height: 26px; accent-color: var(--pink); cursor: pointer; }
.range-ends { color: #847b84; font-size: 10px; }
.range-ends span:nth-child(2) { color: var(--ink); font-weight: 850; }
.style-fieldset { min-width: 0; margin: 5px 0 18px; border: 1.5px solid var(--line); border-radius: 14px; padding: 18px 14px 4px; }
.style-fieldset legend { width: auto; margin-left: 2px; padding: 0 7px; }
.color-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 2px; }
.color-control { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 5px 7px 5px 10px; color: var(--muted); font-size: 11px; }
.color-control input { width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.color-presets { display: flex; gap: 9px; margin: 10px 0 10px; }
.swatch { width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.swatch:focus-visible, .swatch:hover { transform: translate(-1px, -1px); }
.swatch-pop { background: linear-gradient(135deg, #fff3f8 0 36%, #ffd400 36% 68%, #17121b 68%); }
.swatch-sky { background: linear-gradient(135deg, #f6fdff 0 36%, #5ce1e6 36% 68%, #17121b 68%); }
.swatch-night { background: linear-gradient(135deg, #fff7d6 0 36%, #ff4b8b 36% 68%, #17121b 68%); }
.toggle-row { min-height: 44px; border-top: 1px solid var(--line); }
.toggle { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; cursor: pointer; font-size: 12px; font-weight: 800; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { position: relative; width: 38px; height: 23px; border: 2px solid #baaeb7; border-radius: 999px; background: #f5edf1; transition: background .15s ease, border .15s ease; }
.toggle-track::after { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #baaeb7; content: ""; transition: transform .15s ease, background .15s ease; }
.toggle input:checked + .toggle-track { border-color: var(--pink); background: var(--pink); }
.toggle input:checked + .toggle-track::after { background: #fff; transform: translateX(15px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--pink-soft); }
.toggle-help { color: #847b84; font-size: 10px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.panel-actions .button-primary { flex: 1; }
.form-status { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.form-status[data-type="error"], .global-status[data-type="error"] { color: #bc1f5a; }
.form-status[data-type="success"], .global-status[data-type="success"] { color: #18745f; }

.preview-header { align-items: start; margin-bottom: 17px; }
.panel-kicker { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.preview-header h3 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.preview-frame { display: grid; min-height: 370px; place-items: center; overflow: hidden; border: 1.5px solid var(--line); border-radius: 16px; padding: clamp(16px, 4vw, 34px); background-color: #fff; background-image: linear-gradient(45deg, #f8f0f4 25%, transparent 25%), linear-gradient(-45deg, #f8f0f4 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f8f0f4 75%), linear-gradient(-45deg, transparent 75%, #f8f0f4 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; }
.preview-svg-wrap { display: flex; width: min(100%, 580px); max-height: 500px; align-items: center; justify-content: center; filter: drop-shadow(0 6px 0 rgba(23,18,27,.13)); }
.preview-svg-wrap svg { display: block; width: 100%; height: auto; max-height: 500px; }
.preview-empty { display: grid; place-items: center; gap: 9px; color: var(--muted); text-align: center; }
.preview-empty p { margin: 0; font-size: 14px; font-weight: 750; line-height: 1.7; }
.preview-empty small { max-width: 240px; color: #bc1f5a; font-size: 11px; line-height: 1.55; }
.empty-icon { display: grid; width: 54px; height: 54px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); background: var(--yellow); font-size: 28px; font-weight: 900; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 13px 2px 17px; color: var(--muted); font-size: 11px; font-weight: 750; }
.preview-note { display: flex; gap: 9px; margin-bottom: 22px; border-top: 1px solid var(--line); padding-top: 15px; }
.note-mark { display: grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #fff; background: var(--ink); font-size: 12px; font-weight: 900; }
.preview-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.output-panel { border: 2px solid var(--ink); border-radius: 15px; padding: 16px; background: var(--pink-soft); }
.output-panel .panel-topline { margin-bottom: 13px; }
.output-panel select { width: auto; min-height: 44px; margin-left: 4px; padding: 7px 30px 7px 9px; border-color: var(--ink); border-radius: 7px; font-size: 16px; font-weight: 800; }
.output-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.output-buttons .button { min-height: 43px; padding: 0 7px; border-radius: 10px; font-size: 11px; }
.output-help { margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.save-row { justify-content: start; gap: 15px; padding: 16px 2px 0; }
.text-button { min-height: 44px; border: 0; padding: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover, .text-button:focus-visible { color: var(--pink); }
.text-button-danger:hover, .text-button-danger:focus-visible { color: #bc1f5a; }
.global-status { min-height: 23px; margin: 19px 2px 0; font-size: 12px; }

.guide-section, .limits-section { width: min(1220px, calc(100% - 48px)); margin: 150px auto 0; scroll-margin-top: 24px; }
.guide-heading { margin-bottom: 31px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.step-card { min-height: 230px; border: 2px solid var(--ink); border-radius: 22px; padding: 24px; background: var(--pink-soft); }
.step-card-yellow { background: var(--yellow); }
.step-card-dark { color: #fff; background: var(--ink); }
.step-number { display: block; margin-bottom: 34px; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.step-card-dark .step-number { color: #bdb3bc; }
.step-card h3 { margin-bottom: 11px; font-size: 21px; letter-spacing: -.04em; }
.step-card p { max-width: 290px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.step-card-dark p { color: #d8d0d6; }
.limits-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 55px; margin-top: 140px; border-top: 2px solid var(--ink); padding-top: 30px; }
.limits-section h2 { font-size: clamp(25px, 3.5vw, 40px); }
.limits-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.limits-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.95; }
.site-footer { display: flex; width: min(1220px, calc(100% - 48px)); min-height: 150px; align-items: end; justify-content: space-between; gap: 25px; margin: 130px auto 0; border-top: 1px solid var(--line); padding: 28px 0 35px; }
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { font-size: 13px; }
.site-footer span { margin-top: 6px; color: var(--muted); font-size: 11px; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); font-size: 11px; font-weight: 800; text-decoration: none; }
.site-footer a:hover { color: var(--pink); }

@media (max-width: 900px) {
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 18px; }
  .hero-copy { padding: 48px 0 10px; }
  .hero-art { min-height: 300px; transform: rotate(0); }
  .hero-art img { min-height: 300px; }
  .maker-grid { grid-template-columns: 1fr; }
  .control-panel { box-shadow: 6px 6px 0 var(--pink); }
  .preview-frame { min-height: 310px; }
  .limits-section { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 620px) {
  .site-header, .hero, .workbench-section, .guide-section, .limits-section, .site-footer { width: min(100% - 30px, 1220px); }
  .site-header { min-height: 66px; }
  .site-header nav { gap: 13px; font-size: 11px; }
  .brand small { font-size: 8px; }
  .hero { margin-top: 0; }
  .hero-copy { padding-top: 34px; }
  h1 { font-size: clamp(40px, 12vw, 60px); }
  .hero-lead { font-size: 14px; line-height: 1.8; }
  .hero-art, .hero-art img { min-height: 225px; }
  .hero-art { border-radius: 22px; }
  .art-label { padding: 6px 8px; font-size: 8px; }
  .workbench-section { margin-top: 83px; }
  .section-heading { display: block; }
  .section-intro { margin-top: 15px; }
  .control-panel, .preview-panel { border-radius: 21px; }
  .two-col { gap: 8px; }
  .color-grid { gap: 5px; }
  .color-control { padding-left: 7px; font-size: 10px; }
  .toggle-help { max-width: 110px; text-align: right; }
  .panel-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .panel-actions .button-primary { grid-column: 1 / -1; }
  .preview-frame { min-height: 260px; padding: 15px; }
  .output-buttons { grid-template-columns: 1fr; }
  .output-buttons .button { min-height: 45px; }
  .save-row { flex-wrap: wrap; gap: 5px 14px; }
  .guide-section, .limits-section { margin-top: 100px; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .step-card { min-height: 170px; padding: 21px; }
  .step-number { margin-bottom: 20px; }
  .limits-copy { grid-template-columns: 1fr; gap: 16px; }
  .site-footer { min-height: 130px; margin-top: 100px; }
}

@media print {
  .site-header, .hero, .workbench-section, .guide-section, .limits-section, .site-footer { display: none; }
}
