:root {
  color-scheme: light;
  --bg: #fff9fc;
  --bg-strong: #ffffff;
  --ink: #1f2330;
  --muted: #626777;
  --line: #e9eaf1;
  --panel: rgba(255, 255, 255, 0.92);
  --accent: #ff2f86;
  --accent-2: #1677ff;
  --accent-3: #ffd85a;
  --accent-soft: #fff0f6;
  --ok: #18794e;
  --bad: #c92a2a;
  --warn: #b26b00;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(33, 39, 66, 0.12);
  --shadow-soft: 0 10px 30px rgba(33, 39, 66, 0.08);
  --font: "Inter", "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-variant="b"] {
  --bg: #f5f8fb;
  --ink: #172033;
  --muted: #5c667a;
  --accent: #0d5bd7;
  --accent-2: #00a3a3;
  --accent-3: #f2c94c;
  --accent-soft: #eaf2ff;
  --radius: 10px;
  --shadow: 0 18px 44px rgba(13, 35, 70, 0.12);
}

:root[data-variant="c"] {
  --bg: #fffaf2;
  --ink: #261f35;
  --muted: #685f77;
  --accent: #e54d5e;
  --accent-2: #6c63ff;
  --accent-3: #35c88a;
  --accent-soft: #fff0e6;
  --radius: 22px;
  --shadow: 0 20px 54px rgba(58, 35, 70, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 47, 134, 0.09), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(22, 119, 255, 0.11), transparent 22%),
    linear-gradient(180deg, var(--bg), #ffffff 48%, #f8fbff);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(233, 234, 241, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a {
  padding: 9px 12px;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

.app-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.76fr) minmax(340px, 1.24fr);
  gap: clamp(18px, 2vw, 28px);
  align-items: stretch;
}

.hero-card,
.wizard-panel,
.preview-panel {
  background: var(--panel);
  border: 1px solid rgba(233, 234, 241, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 316px;
  padding: clamp(22px, 3vw, 36px);
}

.hero-card > :not(.hero-visual) {
  position: relative;
  z-index: 2;
}

.hero-card::after {
  position: absolute;
  inset: auto -40px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-3) 34%, transparent);
  content: "";
  z-index: 0;
}

.hero-visual {
  position: absolute;
  right: clamp(10px, 2vw, 30px);
  bottom: -4px;
  width: min(42%, 240px);
  filter: drop-shadow(0 18px 20px rgba(30, 40, 70, 0.12));
  pointer-events: none;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 900;
}

.hero-title {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  margin: 0;
  font-size: clamp(2.15rem, 3.25vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.pill-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(620px, 72%);
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  line-height: 1.8;
}

.security-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 470px);
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 850;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  white-space: normal;
}

.cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  padding: 13px 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 62%, var(--accent-2)));
  box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 28%, transparent);
}

.secondary-button {
  padding: 12px 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
}

.step-dot span:first-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  font-weight: 900;
  background: #9aa0ad;
  border-radius: 50%;
}

.step-dot span:last-child {
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

.step-dot.is-active span:first-child,
.step-dot.is-complete span:first-child {
  background: var(--accent);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(380px, 1.05fr);
  gap: clamp(18px, 2vw, 28px);
  margin-top: 20px;
  align-items: start;
}

.wizard-panel,
.preview-panel {
  padding: clamp(18px, 2vw, 28px);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-title h2,
.preview-panel h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  line-height: 1.25;
}

.panel-title p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 900;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.choice-card,
.option-card,
.file-row,
.warning-item,
.output-row,
.reference-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.choice-card,
.option-card {
  position: relative;
  width: 100%;
  padding: 16px;
  color: var(--ink);
  text-align: left;
}

.choice-card {
  min-height: 178px;
}

.choice-card:hover,
.choice-card:focus-visible,
.option-card:hover,
.option-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  box-shadow: var(--shadow-soft);
}

.choice-card.is-selected,
.option-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow-soft);
}

.choice-card img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin: 0 auto 10px;
}

.choice-title {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
}

.choice-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
}

.selected-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.term-row-label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.option-list,
.kind-grid {
  display: grid;
  gap: 10px;
}

.option-card {
  min-height: 72px;
}

.option-card strong {
  display: block;
  margin-bottom: 4px;
}

.option-card small {
  color: var(--muted);
  line-height: 1.5;
}

.kind-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

.check-chip input {
  accent-color: var(--accent);
}

.file-drop {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: color-mix(in srgb, var(--accent-soft) 58%, #fff);
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: var(--radius-sm);
}

.file-drop input {
  max-width: 100%;
}

.file-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.file-row {
  padding: 12px;
}

.file-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row span {
  color: var(--muted);
  font-size: 0.84rem;
}

.term-table {
  display: grid;
  gap: 12px;
}

.term-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.3fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.term-row-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segment {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
  background: #f8f9fc;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.segment.is-selected {
  color: #fff;
  background: var(--accent-2);
}

.tooltip-trigger {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent-2) 35%, var(--line));
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.preview-card {
  overflow: hidden;
  margin: 18px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.usage-card-preview {
  position: relative;
  padding: 22px;
  min-height: 380px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 76%, #fff), #fff 42%),
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--accent-3) 34%, transparent), transparent 22%);
}

.usage-card-preview h3 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}

.usage-card-preview p {
  margin: 0;
  color: var(--muted);
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.usage-pill {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 850;
}

.usage-pill span:last-child {
  color: var(--accent-2);
}

.zip-preview,
.warning-list,
.output-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.output-row,
.warning-item {
  padding: 12px 14px;
}

.warning-item {
  border-color: color-mix(in srgb, var(--warn) 34%, var(--line));
  background: #fff8e8;
  color: #4a3200;
}

.output-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.output-row strong {
  color: var(--ink);
}

.status-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-2) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent-2) 28%, var(--line));
  color: var(--ink);
  font-weight: 850;
  line-height: 1.65;
}

.status-banner.error {
  background: #fff1f1;
  border-color: #ffc9c9;
  color: #7a1b1b;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 24, 35, 0.38);
}

.modal {
  width: min(620px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 22px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal h2 {
  margin: 0 0 10px;
}

.modal p {
  color: var(--muted);
  line-height: 1.75;
}

.modal a {
  color: var(--accent-2);
  font-weight: 850;
}

.content-page {
  padding: clamp(22px, 5vw, 64px);
}

.content-inner {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 48px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.content-inner h1 {
  margin-top: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.12;
}

.content-inner h2 {
  margin-top: 32px;
}

.content-inner p,
.content-inner li {
  color: var(--muted);
  line-height: 1.9;
}

.content-inner a {
  color: var(--accent-2);
  font-weight: 850;
}

.site-footer {
  padding: 30px clamp(18px, 5vw, 56px);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 6px 0;
}

.noscript {
  padding: 20px;
  background: #fff1f1;
  border: 1px solid #ffc9c9;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1160px) {
  .hero-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero-title,
  .hero-copy {
    width: min(680px, 100%);
  }

  .hero-visual {
    opacity: 0.45;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .app-shell {
    padding: 14px;
  }

  .hero-card {
    min-height: auto;
  }

  .hero-visual {
    position: static;
    width: 180px;
    margin-top: 16px;
  }

  .stepper {
    grid-template-columns: repeat(4, 1fr);
  }

  .choice-grid,
  .form-grid,
  .kind-grid,
  .term-row,
  .usage-grid {
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    flex-direction: column-reverse;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 86vh;
    border-radius: 18px 18px 0 0;
  }
}
