:root {
  --navy: #0b1930;
  --navy-800: #10284b;
  --cyan: #25d6c8;
  --ink: #122033;
  --muted: #5e6a7d;
  --line: #dce3ec;
  --wash: #f3f7fb;
  --white: #fff;
  --danger: #b42318;
  --warn: #9a6700;
  --ok: #0e7a4d;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(11, 25, 48, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(37, 214, 200, 0.12), transparent 34%),
    linear-gradient(180deg, #eef4fa 0%, var(--wash) 40%, #f8fafc 100%);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

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

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

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex-wrap: wrap;
}

.brand strong { font-size: 22px; }
.brand > span:not(.version-badge) {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--navy-800);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-panel,
.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 227, 236, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.hero-panel h1,
.panel h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.next-steps {
  margin: 16px 0 0;
  padding: 14px 16px 14px 36px;
  border-radius: 12px;
  background: #f5f8fc;
  color: var(--navy-800);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.next-steps li + li {
  margin-top: 2px;
}

.reassure-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 700;
}

.progress {
  margin-top: 22px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #e4ebf3;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #4aa8ff);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.button-primary {
  color: var(--navy);
  background: var(--cyan);
}

.button-secondary {
  color: var(--navy);
  background: #e8eef6;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-links {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.nav-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f7fafc;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

textarea { min-height: 120px; resize: vertical; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge-req { background: #fdecea; color: var(--danger); }
.badge-opt { background: #eef5fb; color: var(--navy-800); }

.status-banner {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef5fb;
  font-size: 13px;
  font-weight: 700;
}

.audit-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.audit-list li {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7fafc;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.notice-local {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff6dd;
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}

.locked-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff6dd;
  color: var(--warn);
  font-weight: 700;
}

.footer-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.flash {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.flash.ok { background: #e8f7ef; color: var(--ok); }
.flash.warn { background: #fff6dd; color: var(--warn); }
.flash.error { background: #fdecea; color: var(--danger); }

.error-list,
.missing-list {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fdecea;
  color: var(--danger);
}

.summary {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.summary details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfcfe;
}

.summary pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  color: var(--muted);
}

.sticky-cta {
  position: sticky;
  bottom: 12px;
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.token-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.token-list a {
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
}

.help-list {
  margin: 12px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 14px;
}

.button.is-busy {
  opacity: 0.72;
  cursor: wait;
}

.form-grid label {
  cursor: pointer;
  display: grid;
  gap: 6px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  min-height: 44px;
  width: 100%;
  max-width: 100%;
}

.form-grid textarea {
  min-height: 96px;
}

.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.form-grid label.has-error textarea {
  border-color: var(--danger);
}

.field-hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.field-group {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.field-group-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.field-group-lead {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.55;
}

.field-error {
  margin: -8px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.check {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.check.has-error {
  border-color: #f0b4ad;
  background: #fff8f7;
}

.check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: var(--navy-800);
  cursor: pointer;
}

.date-field .date-input {
  cursor: pointer;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #eef5fb, #fff) border-box;
  border: 1.5px solid var(--navy-800);
}

.date-field .date-input:hover,
.date-field .date-input:focus {
  outline: 2px solid rgba(37, 214, 200, 0.35);
  outline-offset: 1px;
}

.summary-dl {
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(120px, 32%) 1fr;
  gap: 10px 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f6;
}

.summary-row:last-child { border-bottom: 0; padding-bottom: 0; }

.summary-row dt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

.dev-panel {
  margin-top: 28px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed #c5d0de;
  background: #f7fafc;
  color: var(--muted);
  font-size: 12px;
}

.dev-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.dev-panel-list {
  margin: 10px 0 0;
  padding-left: 1.2em;
}

.dev-panel-note {
  margin: 8px 0 0;
  font-size: 11px;
}

.dev-token-box {
  margin-top: 18px;
}

@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 920px); padding-top: 16px; overflow-x: hidden; }
  .hero-panel, .panel { padding: 20px; }
  .sticky-cta { flex-direction: column; }
  .button { width: 100%; }
  input, select, textarea { font-size: 16px; }
  .summary-row { grid-template-columns: 1fr; gap: 4px; }
}
