:root {
  color-scheme: light;
  --paper: #f4f1e9;
  --surface: #fffdf8;
  --ink: #17211b;
  --muted: #657068;
  --line: #d8d8cd;
  --green: #154f3d;
  --green-soft: #dfe9e2;
  --orange: #d7682e;
  --shadow: 0 18px 60px rgba(23, 33, 27, 0.08);
  font-family:
    "Noto Sans JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN",
    system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
input, textarea, select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  color: var(--ink);
}
textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
label { color: var(--muted); font-size: 12px; font-weight: 700; }
label input, label textarea, label select { margin-top: 8px; }

.web-app { min-height: 100vh; }
.site-header {
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}
.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-family: serif;
  font-size: 18px;
}
.brand strong { display: block; font-family: serif; font-size: 17px; }
.brand small {
  display: block;
  margin-top: 1px;
  font-size: 8px;
  letter-spacing: 0.13em;
  color: var(--muted);
}

nav { display: flex; gap: 4px; }
nav button {
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}
nav button:hover, nav button.is-active {
  background: var(--green-soft);
  color: var(--green);
}
.header-status {
  justify-self: end;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

main { min-height: calc(100vh - 150px); }
.hero {
  max-width: 1240px;
  min-height: 600px;
  margin: 0 auto;
  padding: 88px clamp(22px, 5vw, 80px);
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(40px, 8vw, 110px);
  align-items: center;
}
.eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.hero h1, .workspace-section h1 {
  margin: 0;
  font-family: serif;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.17;
}
.hero__copy > p {
  max-width: 600px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 2;
}
.hero__actions { display: flex; gap: 12px; margin-top: 32px; }
.button {
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
}
.button:disabled { cursor: not-allowed; opacity: 0.55; }
.button--primary { background: var(--green); color: white; }
.button--secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--green);
}
.button--danger {
  border-color: #b44b43;
  background: transparent;
  color: #9e312a;
}
.hero__panel {
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero__panel-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.16em;
}
.flow-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.flow-row > span { color: var(--orange); font-family: serif; }
.flow-row strong { display: block; font-size: 15px; }
.flow-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.section {
  padding: 82px clamp(22px, 5vw, 80px);
  background: var(--green);
  color: white;
}
.section > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.section__heading h2, .section__heading h1 {
  margin: 0;
  font-family: serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 500;
}
.section__heading--wide p {
  margin-top: 18px;
  color: var(--muted);
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.action-card {
  min-height: 230px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  cursor: pointer;
  text-align: left;
}
.action-card:hover { background: rgba(255, 255, 255, 0.11); }
.action-card__number { display: block; color: #e9a47d; }
.action-card strong {
  display: block;
  margin-top: 35px;
  font-family: serif;
  font-size: 25px;
  font-weight: 500;
}
.action-card p { color: #c6d4cc; line-height: 1.8; }
.action-card__link { display: block; margin-top: 22px; font-size: 12px; }

.workspace-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px clamp(20px, 5vw, 56px);
}
.workspace-section h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.25;
}
.company-search {
  margin-top: 42px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.company-search label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}
.company-search > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.company-search input {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: white;
}
.system-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.empty-panel {
  margin-top: 34px;
  padding: 60px 28px;
  border: 1px dashed #b9bdb4;
  text-align: center;
  background: rgba(255, 253, 248, 0.5);
}
.empty-panel__mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 24px;
}
.empty-panel h2 { margin: 0; font-family: serif; font-weight: 500; }
.empty-panel p { color: var(--muted); }
.request-list {
  max-width: 520px;
  margin: 24px auto 0;
  padding: 0;
  list-style: none;
}
.request-list li {
  padding: 13px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 40px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.form-grid__wide { grid-column: 1 / -1; }

.search-box {
  display: block;
  margin-top: 38px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.catalog-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.catalog-card.is-selected {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.catalog-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.catalog-card__head > div > span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
}
.catalog-card h2 {
  margin: 7px 0 0;
  font-family: serif;
  font-size: 24px;
  font-weight: 500;
}
.catalog-card > p { color: var(--muted); line-height: 1.7; }
.catalog-card > small { color: var(--muted); }
.fact-list { margin: 20px 0 0; }
.fact-list > div {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.fact-list dt { color: var(--muted); font-size: 11px; }
.fact-list dd { margin: 5px 0; }
.fact-list small { color: var(--muted); font-size: 9px; }
.compare-panel, .request-panel {
  margin-top: 46px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.comparison-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.comparison-table article {
  padding: 18px;
  border: 1px solid var(--line);
}
.comparison-table h3 { margin-top: 0; font-family: serif; }
.comparison-table p { color: var(--muted); line-height: 1.6; }
.request-panel form, .inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 20px;
}
.empty-copy { color: var(--muted); }

.select-company {
  display: block;
  max-width: 480px;
  margin-top: 32px;
}
.document-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.document-editor {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.document-editor--wide { grid-column: 1 / -1; }
.document-editor__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  margin-bottom: 14px;
}
.document-editor__head h2 {
  margin: 0;
  font-family: serif;
  font-weight: 500;
}
.document-editor textarea { min-height: 260px; }
.toolbar, .data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.application-list { margin-top: 22px; }
.application-row {
  display: grid;
  grid-template-columns: 1fr 130px 1.4fr 150px auto;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
}
.application-row:first-child { border-top: 1px solid var(--line); }
.text-button {
  border: 0;
  background: transparent;
  color: #9e312a;
  cursor: pointer;
}
.file-button { display: inline-flex; align-items: center; }
.file-button input { display: none; }

.document-grid, .plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 38px;
}
.document-card, .web-plan {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.document-card > span { color: var(--orange); font-family: serif; }
.document-card h2, .web-plan h2 {
  margin: 24px 0 9px;
  font-family: serif;
  font-size: 27px;
  font-weight: 500;
}
.document-card p { min-height: 48px; color: var(--muted); }
.web-plan.is-featured { border: 2px solid var(--green); }
.web-plan__head { display: flex; justify-content: space-between; }
.web-plan__head h2 { margin: 0; }
.web-plan__head span {
  height: fit-content;
  padding: 4px 8px;
  background: var(--green);
  color: white;
  font-size: 10px;
}
.web-plan__price {
  display: block;
  margin-top: 26px;
  font-size: 24px;
}
.web-plan__positioning {
  margin: 14px 0 4px;
  color: var(--green);
  font-weight: 800;
}
.web-plan__tagline {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--ink-muted);
}
.web-plan ul {
  min-height: 104px;
  margin: 23px 0;
  padding-left: 19px;
  color: var(--muted);
  line-height: 2;
}
.web-plan__limits {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px;
  margin: 16px 0 10px;
  border-radius: 12px;
  background: var(--surface-soft);
}
.web-plan__limits span { color: var(--ink-muted); }
.web-plan__example {
  min-height: 48px;
  color: var(--ink-muted);
  font-size: 13px;
}
.age-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 720px;
  padding: 14px 16px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.age-confirmation input { margin-top: 3px; }

.ai-action-panel { margin-top: 16px; }
.ai-confirmation {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.ai-confirmation > p { margin: 0; color: var(--muted); }
.ai-confirmation dl { display: grid; gap: 9px; margin: 0; }
.ai-confirmation dl div {
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ai-confirmation dt { color: var(--green); font-weight: 800; }
.ai-confirmation dd {
  max-height: 160px;
  margin: 6px 0 0;
  overflow: auto;
  white-space: pre-wrap;
}
.ai-confirmation label { display: flex; align-items: flex-start; gap: 9px; }
.ai-result {
  padding: 24px;
  margin-top: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ai-result pre {
  overflow: auto;
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.8;
}
.legal-page { max-width: 880px; }
.legal-page h2 { margin: 34px 0 10px; font-family: serif; }
.legal-page p { line-height: 1.9; }
.legal-list { border: 1px solid var(--line); background: var(--surface); }
.legal-list div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}
.legal-list div:first-child { border-top: 0; }
.legal-list dt { color: var(--muted); }
.legal-list dd { margin: 0; }
.operator-import {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.operator-import label { display: grid; gap: 8px; }
.operator-import textarea { min-height: 420px; font-family: monospace; }

.account-panel {
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.account-panel > div {
  display: flex;
  justify-content: space-between;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
}
.account-panel > div:first-child { border-top: 0; }
.account-panel span { color: var(--muted); }

footer {
  padding: 32px clamp(20px, 5vw, 64px);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}
footer strong { color: var(--ink); font-family: serif; }
footer button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
footer button:hover { color: var(--ink); }

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .site-header nav {
    grid-column: 1 / -1;
    order: 3;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .header-status { grid-column: 2; grid-row: 1; }
  .hero { grid-template-columns: 1fr; padding-top: 58px; }
  .action-grid { grid-template-columns: 1fr; }
  .action-card { min-height: 190px; }
  .catalog-grid, .document-editor-grid { grid-template-columns: 1fr; }
  .document-editor--wide { grid-column: auto; }
  .application-row { grid-template-columns: 1fr 1fr; }
  .application-row strong { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .site-header { position: static; }
  .header-status { display: none; }
  nav { width: calc(100vw - 36px); }
  nav button { flex: 0 0 auto; }
  .hero { min-height: 0; padding: 50px 20px 62px; }
  .hero h1 { font-size: 42px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .button { width: 100%; }
  .hero__panel { padding: 22px; }
  .section, .workspace-section { padding: 58px 20px; }
  .document-grid, .plan-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; padding: 20px; }
  .form-grid__wide { grid-column: auto; }
  .catalog-card__head { flex-direction: column; }
  .comparison-table { grid-template-columns: 1fr; }
  .request-panel form, .inline-form { grid-template-columns: 1fr; }
  .application-row { grid-template-columns: 1fr; }
  .application-row strong { grid-column: auto; }
  .company-search { padding: 18px; }
  .company-search > div { grid-template-columns: 1fr; }
  .legal-list div { grid-template-columns: 1fr; gap: 6px; }
  footer { flex-direction: column; gap: 7px; }
}

@media print {
  .site-header, footer, .no-print { display: none !important; }
  body, :root { background: white; }
  .workspace-section { max-width: none; padding: 0; }
  .document-editor-grid { display: block; margin: 0; }
  .document-editor {
    break-inside: avoid;
    margin-bottom: 20px;
    padding: 0;
    border: 0;
  }
  .document-editor textarea {
    min-height: 0;
    border: 0;
    overflow: visible;
    white-space: pre-wrap;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__copy, .hero__panel, .workspace-section {
    animation: appear 0.38s ease-out both;
  }
  @keyframes appear {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}
