:root {
  color-scheme: light;
  --native-bg: #f3f0ea;
  --native-surface: #ffffff;
  --native-ink: #1f2723;
  --native-muted: #68726c;
  --native-line: #d9ded9;
  --native-accent: #173f35;
  --native-accent-soft: #dcebe5;
  --native-warn: #a64b35;
  --native-shadow: 0 22px 60px rgba(37, 50, 44, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255,255,255,.94), transparent 36rem),
    var(--native-bg);
  color: var(--native-ink);
  font-family: "Roboto", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

button, textarea, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }

.native-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

.native-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(23, 63, 53, .15);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 20;
  box-shadow: 0 8px 30px rgba(37, 50, 44, .08);
}

.native-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.native-brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--native-accent);
  font-weight: 900;
  letter-spacing: -.05em;
}

.native-brand-copy strong { display: block; font-size: 15px; }
.native-brand-copy span { color: var(--native-muted); font-size: 12px; }

.native-auth {
  max-width: 46vw;
  color: var(--native-muted);
  font-size: 12px;
  text-align: right;
  overflow-wrap: anywhere;
}

.native-hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
  align-items: stretch;
  padding: 52px 4px 30px;
}

.native-hero-copy {
  padding: 34px 8px 28px;
}

.native-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--native-accent-soft);
  color: var(--native-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.native-hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 5vw, 76px);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.native-hero-copy > p {
  max-width: 700px;
  margin: 0;
  color: var(--native-muted);
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.9;
}

.native-direction-card {
  align-self: end;
  padding: 28px;
  border-radius: 28px;
  background: var(--native-accent);
  color: #fff;
  box-shadow: var(--native-shadow);
}

.native-direction-card span {
  display: block;
  margin-bottom: 12px;
  color: rgba(255,255,255,.64);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.native-direction-card p {
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
}

.native-workspace {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.native-controls {
  position: sticky;
  top: 94px;
  padding: 24px;
  border: 1px solid var(--native-line);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--native-shadow);
}

.native-controls h2,
.native-output-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.025em;
}

.native-controls-intro {
  margin: 10px 0 22px;
  color: var(--native-muted);
  font-size: 13px;
  line-height: 1.8;
}

.native-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.native-field label {
  font-size: 12px;
  font-weight: 800;
  color: #38443e;
}

.native-field small {
  color: var(--native-muted);
  line-height: 1.6;
}

.native-field textarea,
.native-field input,
.native-field select {
  width: 100%;
  border: 1px solid var(--native-line);
  border-radius: 14px;
  background: #fff;
  color: var(--native-ink);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.native-field textarea { min-height: 100px; padding: 13px 14px; line-height: 1.7; resize: vertical; }
.native-field textarea.is-primary { min-height: 230px; }
.native-field input,
.native-field select { min-height: 46px; padding: 0 13px; }

.native-field textarea:focus,
.native-field input:focus,
.native-field select:focus {
  border-color: var(--native-accent);
  box-shadow: 0 0 0 4px rgba(23,63,53,.09);
}

.native-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.native-button {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--native-line);
  border-radius: 14px;
  background: #fff;
  color: var(--native-ink);
  font-weight: 800;
}

.native-button.is-primary {
  grid-column: 1 / -1;
  min-height: 56px;
  border-color: var(--native-accent);
  background: var(--native-accent);
  color: #fff;
}

.native-button.is-danger { color: var(--native-warn); }

.native-progress-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f5f7f5;
  color: var(--native-muted);
  font-size: 12px;
}

.native-progress-box strong { color: var(--native-ink); }

.native-error {
  margin: 16px 0 0;
  padding: 13px 14px;
  border: 1px solid rgba(166, 75, 53, .25);
  border-radius: 14px;
  background: #fff2ee;
  color: #7e3625;
  line-height: 1.65;
  font-size: 13px;
}

.native-output { min-width: 0; }

.native-output-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 4px 4px 0;
}

.native-output-heading p {
  margin: 0;
  color: var(--native-muted);
  font-size: 13px;
}

.native-results {
  display: grid;
  gap: 24px;
}

.native-empty {
  display: grid;
  place-items: center;
  min-height: 420px;
  margin: 0;
  padding: 30px;
  border: 1px dashed #bdc7c1;
  border-radius: 24px;
  background: rgba(255,255,255,.54);
  color: var(--native-muted);
  text-align: center;
}

.native-result-card {
  overflow: hidden;
  border: 1px solid var(--native-line);
  border-radius: 26px;
  background: var(--native-surface);
  box-shadow: 0 14px 46px rgba(37,50,44,.08);
}

.native-result-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--native-line);
  background: #fbfcfb;
}

.native-result-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--native-accent-soft);
  color: var(--native-accent);
  font-weight: 900;
  font-size: 12px;
}

.native-result-heading h2 { margin: 0; font-size: 18px; }
.native-result-heading p { margin: 5px 0 0; color: var(--native-muted); font-size: 12px; line-height: 1.6; }

.native-status {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf1ee;
  color: var(--native-muted);
  font-size: 10px;
  font-weight: 800;
}
.native-status-complete { background: #dff0e7; color: #245943; }
.native-status-failed { background: #fae2db; color: #8a3c29; }
.native-status-generating_images { background: #fff0c9; color: #775711; }

.native-card-error {
  margin: 16px 20px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff2ee;
  color: #7e3625;
}

.native-panel-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 20px;
  background: #eef1ef;
}

.native-panel {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(20, 35, 28, .1);
}

.native-panel-image {
  display: block;
  width: 100%;
  height: auto;
  background: #e7ebe8;
}

.native-panel-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  border-top: 1px solid var(--native-line);
}

.native-small-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--native-line);
  border-radius: 10px;
  background: #fff;
  color: var(--native-accent);
  font-size: 11px;
  font-weight: 800;
}

.native-panel-copy-preview {
  min-height: 420px;
  padding: 34px 28px;
  background: linear-gradient(155deg, #fff, #edf4f1);
}

.native-panel-number {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--native-accent);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.native-panel-eyebrow {
  margin: 28px 0 8px;
  color: var(--native-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}

.native-panel-copy-preview h3 {
  margin: 18px 0 14px;
  font-size: 28px;
  line-height: 1.3;
}

.native-panel-copy-preview p,
.native-panel-copy-preview li { color: #536058; line-height: 1.85; }

.native-copy-cta {
  display: inline-flex;
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--native-accent);
  color: #fff;
  font-weight: 800;
}

.native-html-section { padding: 28px 22px 34px; }
.native-html-title { margin: 0; text-align: center; font-size: clamp(26px, 4vw, 48px); letter-spacing: -.04em; }
.native-html-intro,
.native-html-footer { max-width: 780px; margin: 16px auto 0; color: var(--native-muted); line-height: 1.85; text-align: center; }
.native-html-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 24px; }
.native-html-card { padding: 20px; border: 1px solid var(--native-line); border-radius: 18px; background: #fff; }
.native-html-card.is-emphasis { border: 2px solid var(--native-accent); background: #f0f7f4; transform: translateY(-4px); }
.native-html-card-title { margin: 0; font-size: 20px; }
.native-html-card-subtitle { margin: 7px 0 0; color: var(--native-muted); font-size: 12px; line-height: 1.6; }
.native-html-rows { display: grid; grid-template-columns: minmax(82px, .8fr) minmax(0, 1.2fr); margin: 18px 0 0; border-top: 1px solid var(--native-line); }
.native-html-row-label,
.native-html-row-value { margin: 0; padding: 11px 6px; border-bottom: 1px solid var(--native-line); font-size: 13px; line-height: 1.6; }
.native-html-row-label { color: var(--native-muted); font-weight: 700; }
.native-html-row-value { color: var(--native-ink); }

.native-note {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--native-line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: var(--native-muted);
  font-size: 12px;
  line-height: 1.8;
}

@media (max-width: 1080px) {
  .native-hero { grid-template-columns: 1fr; }
  .native-direction-card { align-self: auto; }
  .native-workspace { grid-template-columns: 1fr; }
  .native-controls { position: static; }
}

@media (max-width: 640px) {
  .native-shell { width: min(100% - 20px, 1480px); padding-top: 10px; }
  .native-topbar { top: 6px; padding: 10px 12px; border-radius: 14px; }
  .native-brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .native-auth { max-width: 42vw; font-size: 10px; }
  .native-hero { padding-top: 30px; gap: 12px; }
  .native-hero-copy { padding: 18px 4px; }
  .native-hero h1 { font-size: 42px; }
  .native-direction-card { padding: 20px; border-radius: 20px; }
  .native-controls { padding: 18px; border-radius: 20px; }
  .native-actions { grid-template-columns: 1fr; }
  .native-button.is-primary { grid-column: auto; }
  .native-output-heading { align-items: flex-start; flex-direction: column; }
  .native-result-header { grid-template-columns: auto minmax(0, 1fr); }
  .native-status { grid-column: 2; justify-self: start; }
  .native-panel-list { grid-template-columns: 1fr; padding: 10px; }
  .native-html-grid { grid-template-columns: 1fr; }
  .native-html-card.is-emphasis { transform: none; }
}
