:root {
  --ink: #171714;
  --paper: #f4f1ea;
  --card: #fffdf8;
  --accent: #c94f37;
  --accent-dark: #9e3726;
  --sage: #aeb9a5;
  --line: #d8d2c7;
  --muted: #706b62;
  --shadow: 0 24px 70px rgba(43, 35, 27, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", "Noto Sans JP", sans-serif; }
a { color: inherit; }

header {
  position: sticky; top: 0; z-index: 10;
  height: 72px; padding: 0 max(22px, 5vw);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(23, 23, 20, .12);
  background: rgba(244, 241, 234, .9); backdrop-filter: blur(16px);
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; letter-spacing: .14em; }
.logo i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font: italic 19px Georgia, serif; }
.logo small { margin: 0 0 5px -4px; align-self: flex-end; color: var(--muted); font-size: 7px; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { text-decoration: none; font-size: 12px; font-weight: 600; }
.nav-cta { padding: 10px 16px; border-radius: 999px; background: var(--ink); color: white; }

.hero {
  width: min(1200px, 100%); min-height: 620px; margin: auto;
  padding: 84px max(28px, 7vw) 76px;
  display: flex; align-items: center;
}
.hero-copy { max-width: 820px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .2em; }
h1 { margin: 20px 0 26px; font-size: clamp(46px, 6vw, 80px); line-height: 1.02; letter-spacing: -.065em; }
h1 em { color: var(--accent); font: italic 1em Georgia, serif; }
.lead { max-width: 620px; color: var(--muted); font-size: 15px; line-height: 1.95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0; }
.primary, .secondary { display: inline-flex; justify-content: center; padding: 14px 21px; border-radius: 999px; text-decoration: none; font-size: 12px; font-weight: 700; }
.primary { background: var(--ink); color: white; }
.secondary { border: 1px solid var(--line); background: var(--card); }
.hero ul { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 10px; }
.hero li::before { content: "●"; margin-right: 7px; color: var(--accent); font-size: 7px; }

.proof { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); background: var(--card); }
.proof p { margin: 0; padding: 24px max(20px, 3vw); border-right: 1px solid var(--line); }
.proof p:last-child { border-right: 0; }
.proof small, .proof strong { display: block; }
.proof small { margin-bottom: 7px; color: var(--muted); font-size: 8px; letter-spacing: .18em; }
.proof strong { font: 600 14px/1.2 "Noto Sans JP", sans-serif; }

.case-study, .how, .studio, .output { padding: 112px max(28px, 7vw); }
.case-study { background: #e7e0d5; }
.case-visuals { display: grid; grid-template-columns: minmax(240px, .65fr) minmax(0, 1.35fr); gap: 16px; align-items: stretch; }
.case-visuals figure { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.case-visuals figure > span { display: block; padding: 7px 8px 13px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.case-visuals img { width: 100%; height: auto; display: block; border-radius: 13px; }
.prompt-example { margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.prompt-example summary { padding: 18px 20px; cursor: pointer; font-size: 12px; font-weight: 700; }
.prompt-example div { padding: 0 20px 8px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.prompt-example strong { display: block; color: var(--ink); }
.case-note { margin: 16px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.how { background: var(--card); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how-grid article { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.how-grid b { color: var(--accent); font-size: 11px; letter-spacing: .16em; }
.how-grid h3 { margin: 28px 0 10px; font-size: 18px; }
.how-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.studio { background: #ebe5db; }
.section-title { max-width: 720px; margin-bottom: 44px; }
.section-title h2, .pricing h2, .trust h2 { margin: 12px 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.12; letter-spacing: -.045em; }
.section-title > p:last-child, .pricing > div > p:last-child, .trust p { color: var(--muted); line-height: 1.85; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr); gap: 22px; align-items: start; }
form, .studio aside { padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 15px 45px rgba(43, 35, 27, .06); }
.studio aside { position: sticky; top: 94px; }
label { display: block; margin-bottom: 18px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, select, textarea { width: 100%; display: block; margin-top: 7px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #faf8f3; color: var(--ink); font: 12px/1.5 inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 79, 55, .12); }
.upload { position: relative; min-height: 190px; margin-top: 7px; display: grid; place-items: center; align-content: center; overflow: hidden; cursor: pointer; border: 1px dashed #aaa297; border-radius: 14px; background: #faf8f3; }
.upload::before { content: "+"; margin-bottom: 7px; color: var(--accent); font: 300 30px/1 sans-serif; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: contain; background: #f5f1e9; }
.upload b, .upload small { position: relative; z-index: 1; }
.upload small { margin-top: 5px; font-weight: 400; }
form button { width: 100%; padding: 15px; border: 0; border-radius: 999px; cursor: pointer; background: var(--accent); color: white; font: 700 12px inherit; }
form button:hover { background: var(--accent-dark); }
form button:disabled { opacity: .55; cursor: wait; }
#status { min-height: 18px; margin-bottom: 0; text-align: center; color: var(--muted); font-size: 10px; }
.data-note { margin: 12px 0 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
#status[data-kind="error"], #edit-status[data-kind="error"] { color: #b42318; }
#status[data-kind="success"], #edit-status[data-kind="success"] { color: #28784a; }
.studio aside > span { color: var(--accent); font-size: 8px; font-weight: 700; letter-spacing: .2em; }
.studio ol { margin: 18px 0 0; padding: 0; list-style: none; }
.studio li { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.studio li > b { color: var(--accent); font-size: 11px; }
.studio li div { display: flex; flex-direction: column; }
.studio li strong { font-size: 12px; }
.studio li small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.output { background: #ded8cd; }
.results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.results article { overflow: hidden; border: 1px solid transparent; border-radius: 14px; background: var(--card); box-shadow: 0 10px 30px rgba(43, 35, 27, .06); }
.results article.selected { outline: 3px solid var(--accent); outline-offset: 3px; }
.results img { width: 100%; display: block; aspect-ratio: 4/5; object-fit: cover; cursor: pointer; }
.results article div { display: flex; justify-content: space-between; padding: 13px; font-size: 10px; }
.results a { color: var(--accent); text-decoration: none; }
.edit-panel { margin-top: 24px; }
.edit-panel h3 { margin-top: 0; }
.edit-panel > p { color: var(--muted); font-size: 11px; }
.output > label { margin-top: 24px; }
.output textarea { background: var(--card); }

.pricing { padding: 112px max(28px, 10vw); display: grid; grid-template-columns: 1fr minmax(330px, 460px); gap: 10vw; align-items: center; background: var(--sage); }
.pricing article { padding: 36px; border-radius: 22px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.pricing article > span { display: block; color: #aaa59d; font-size: 9px; letter-spacing: .16em; }
.pricing article > strong { display: block; margin: 6px 0 20px; font-size: 40px; }
.pricing article small { margin-left: 6px; color: #aaa59d; font-size: 9px; }
.pricing hr { margin: 0 0 18px; border: 0; border-top: 1px solid #3c3934; }
.pricing ul { margin: 22px 0; padding: 0; list-style: none; }
.pricing li { padding: 7px 0; font-size: 11px; }
.pricing li::before { content: "●"; margin-right: 9px; color: var(--accent); font-size: 7px; }
.pricing .primary { width: 100%; background: white; color: var(--ink); }
.trust { padding: 110px max(28px, 18vw); text-align: center; background: var(--card); }
.trust p { max-width: 720px; margin-inline: auto; }
footer { padding: 38px max(28px, 7vw); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
footer p { color: var(--muted); font-size: 9px; }

.image-url { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin: -3px 0 18px; }
.image-url label { margin: 0; }
.image-url button { width: auto; white-space: nowrap; border-radius: 10px; }
.model-field { margin-bottom: 18px; color: var(--muted); font-size: 10px; font-weight: 600; }
.model-picker { margin-top: 7px; border: 1px solid var(--line); border-radius: 10px; background: #faf8f3; color: var(--ink); text-align: left; }
.model-picker:hover { background: #f0ece4; }
dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 24px 90px rgba(23, 23, 20, .32); }
dialog::backdrop { background: rgba(23, 23, 20, .65); backdrop-filter: blur(4px); }
dialog form { margin: 0; border: 0; box-shadow: none; }
dialog h3 { margin-top: 0; font: 600 24px/1.2 Georgia, serif; }
dialog p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions button:first-child { background: #e9e4dc; color: var(--ink); }

@media (max-width: 850px) {
  nav a:not(.nav-cta) { display: none; }
  .hero { min-height: auto; padding-top: 60px; }
  .case-visuals, .how-grid, .studio-grid, .pricing { grid-template-columns: 1fr; }
  .studio aside { position: static; }
  .results { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  header { padding-inline: 18px; }
  .logo small { display: none; }
  .hero, .case-study, .how, .studio, .output, .pricing, .trust { padding-left: 18px; padding-right: 18px; }
  h1 { font-size: 44px; }
  .hero-actions { display: grid; }
  .proof { grid-template-columns: 1fr 1fr; }
  .proof p:nth-child(2) { border-right: 0; }
  .proof p:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .two, .image-url { grid-template-columns: 1fr; }
  .image-url button { width: 100%; }
  form, .studio aside { padding: 22px; }
  .results { gap: 8px; }
  .pricing article { padding: 26px; }
  footer { padding: 30px 18px; align-items: flex-start; gap: 20px; }
  footer p { text-align: right; }
}
