:root {
  color-scheme: light;
  --ink: #13243a;
  --muted: #65758b;
  --line: #dfe7f0;
  --surface: #ffffff;
  --background: #f3f7fb;
  --blue: #1667d9;
  --blue-dark: #0c4ca4;
  --mint: #16a47a;
  --amber: #bd6b00;
  --danger: #b42318;
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
.hero { background: linear-gradient(135deg, #0b1f3a 0%, #174f91 70%, #177aa5 100%); color: white; }
.hero-inner { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 38px; }
.brand-row { display: flex; gap: 14px; align-items: center; }
.logo { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); font-weight: 900; letter-spacing: -.05em; }
.eyebrow { margin: 0 0 4px; font-size: 11px; letter-spacing: .16em; opacity: .78; }
h1 { margin: 0; font-size: clamp(30px, 7vw, 46px); letter-spacing: -.04em; }
.lead { max-width: 660px; margin: 18px 0 0; line-height: 1.75; font-size: 15px; color: rgba(255,255,255,.88); }
main { width: min(760px, calc(100% - 24px)); margin: -16px auto 54px; position: relative; }
.card { background: var(--surface); border: 1px solid rgba(29,63,101,.1); border-radius: 22px; padding: clamp(20px, 5vw, 30px); box-shadow: 0 14px 40px rgba(31,62,97,.10); margin-bottom: 18px; }
.hidden { display: none !important; }
.section-heading { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 22px; }
.section-heading h2 { margin: 1px 0 5px; font-size: 21px; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.step { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #eaf2ff; color: var(--blue); font-weight: 800; }
.step.success { color: white; background: var(--mint); }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 700; }
input[type="password"], input[type="number"] { width: 100%; min-height: 48px; border: 1px solid #cdd8e5; border-radius: 12px; padding: 0 14px; font: inherit; color: var(--ink); background: white; }
input:focus { outline: 3px solid rgba(22,103,217,.14); border-color: var(--blue); }
.upload-box { min-height: 145px; display: grid; place-items: center; align-content: center; gap: 6px; border: 2px dashed #b7c8dc; background: #f8fbff; border-radius: 18px; cursor: pointer; text-align: center; padding: 22px; margin-bottom: 17px; transition: .2s ease; }
.upload-box:hover { border-color: var(--blue); background: #f1f7ff; }
.upload-box:focus-visible { outline: 3px solid rgba(22,103,217,.20); outline-offset: 3px; }
.upload-box.drag-active { border-color: var(--blue); border-style: solid; background: #eaf3ff; box-shadow: 0 0 0 5px rgba(22,103,217,.11); transform: translateY(-1px); }
.upload-box.has-file { border-color: var(--mint); border-style: solid; background: #effaf7; }
.upload-box.file-error { border-color: var(--danger); border-style: solid; background: #fff5f4; }
.upload-box input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.upload-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #e5efff; color: var(--blue); font-size: 27px; line-height: 1; }
.upload-box strong { font-size: 16px; }
.upload-box small { color: var(--muted); }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.toggle-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 75px; border: 1px solid #d8e1eb; border-radius: 14px; padding: 13px 14px; }
.toggle-field span { display: grid; gap: 4px; }
.toggle-field small { color: var(--muted); }
.toggle-field input { width: 24px; height: 24px; accent-color: var(--blue); }
button { border: 0; border-radius: 13px; min-height: 50px; padding: 0 20px; font: inherit; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { width: 100%; color: white; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); box-shadow: 0 8px 18px rgba(22,103,217,.22); }
.secondary { width: 100%; color: var(--blue-dark); background: #eaf2ff; }
.privacy, .notice, .background-note { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 14px 0 0; }
.progress-track { height: 13px; background: #e8edf4; border-radius: 99px; overflow: hidden; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1772e8, #17a3b8); transition: width .35s ease; }
.progress-footer { display: flex; justify-content: space-between; margin-top: 9px; font-size: 12px; color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.metric { background: #f6f9fc; border: 1px solid #e3ebf3; border-radius: 15px; padding: 15px 12px; }
.metric small { display: block; color: var(--muted); margin-bottom: 6px; }
.metric strong { font-size: 21px; }
.warning { border-left: 4px solid #e29a21; background: #fff8e9; color: #744c08; padding: 12px 14px; border-radius: 8px 13px 13px 8px; margin: 9px 0; font-size: 13px; line-height: 1.55; }
.jump-list { display: grid; gap: 12px; margin-top: 18px; }
.jump-card { border: 1px solid #dfe8f1; border-radius: 17px; padding: 16px; }
.jump-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.jump-top h3 { margin: 0; font-size: 16px; }
.badge { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 99px; font-size: 11px; font-weight: 800; background: #e7f6f1; color: #08765a; }
.badge.review { background: #fff1dc; color: #915400; }
.jump-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
.jump-values div { background: #f7f9fc; border-radius: 10px; padding: 10px; }
.jump-values small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.jump-values b { font-size: 14px; }
.value-note { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.review-reasons { color: var(--amber); font-size: 12px; line-height: 1.5; margin: 10px 0 0; }
.coach { margin: 20px 0; padding: 17px; border-radius: 17px; color: #0d3c36; background: #eaf8f4; }
.coach h3 { margin: 0 0 9px; font-size: 16px; }
.coach ul { margin: 0; padding-left: 20px; line-height: 1.65; font-size: 13px; }
.error-card { border-color: #f3c7c3; }
.error-card h2 { color: var(--danger); margin-top: 0; }
.error-card p { white-space: pre-wrap; line-height: 1.65; color: #6e2923; }
.how-it-works { padding: 22px 5px; }
.how-it-works h2 { font-size: 18px; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.flow div { min-height: 110px; display: grid; align-content: start; gap: 8px; padding: 14px; border-radius: 15px; background: #eaf0f7; color: #40536a; font-size: 12px; line-height: 1.5; }
.flow b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: white; color: var(--blue); }
footer { text-align: center; color: #738196; font-size: 11px; padding: 0 16px 34px; }
@media (max-width: 560px) {
  .grid-two { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .jump-values { grid-template-columns: 1fr 1fr; }
}

/* Invite beta hardening */
input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid #cdd8e5;
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: white;
}
select { min-height: 48px; }
textarea { min-height: 104px; padding-top: 12px; resize: vertical; line-height: 1.55; }
.upload-box.checking-file { border-color: #6686ad; background: #f1f5fa; }
.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 6px 0 17px;
  padding: 14px;
  border: 1px solid #d8e3ee;
  border-radius: 14px;
  background: #f8fbfe;
  font-size: 12px;
  line-height: 1.7;
  color: #40536a;
}
.consent-box input { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--blue); }
a { color: var(--blue-dark); text-underline-offset: 2px; }
.helper-links { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 13px; font-size: 12px; color: var(--muted); }
.test-id-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: -4px 0 16px;
  border: 1px solid #dce6f0;
  border-radius: 14px;
  background: #f8fbfe;
}
.test-id-panel div { display: grid; gap: 3px; }
.test-id-panel small { color: var(--muted); }
.test-id-panel strong { letter-spacing: .08em; }
.mini-button { min-height: 38px; padding: 0 13px; color: var(--blue-dark); background: #eaf2ff; font-size: 12px; }
.feedback-panel {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid #d9e8e3;
  border-radius: 18px;
  background: #f2fbf8;
}
.feedback-panel h3 { margin: 0 0 5px; }
.feedback-panel > p { margin: 0 0 15px; color: var(--muted); font-size: 13px; }
.feedback-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field.compact { margin-bottom: 11px; }
.feedback-status { min-height: 20px; margin: 9px 0 0; color: #0b7258; font-size: 12px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.danger-button { width: 100%; color: var(--danger); background: #fff0ee; border: 1px solid #f1c8c3; }
footer a { color: #5e7189; }

.policy-page { min-height: 100vh; background: var(--background); }
.policy-shell { width: min(820px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 60px; }
.policy-header { margin-bottom: 18px; }
.policy-header h1 { color: var(--ink); font-size: clamp(28px, 6vw, 40px); }
.policy-header p { color: var(--muted); line-height: 1.7; }
.policy-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 5vw, 34px); box-shadow: 0 12px 34px rgba(31,62,97,.08); }
.policy-card h2 { margin-top: 28px; font-size: 19px; }
.policy-card h2:first-child { margin-top: 0; }
.policy-card p, .policy-card li { color: #40536a; line-height: 1.8; font-size: 14px; }
.policy-card ul, .policy-card ol { padding-left: 22px; }
.policy-back { display: inline-block; margin-top: 18px; font-weight: 700; }
.guide-points { display: grid; gap: 12px; }
.guide-point { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 15px; background: #f4f8fc; }
.guide-point b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e5efff; color: var(--blue); }
.guide-point h3 { margin: 0 0 5px; font-size: 15px; }
.guide-point p { margin: 0; }

@media (max-width: 560px) {
  .feedback-grid, .result-actions { grid-template-columns: 1fr; }
  .test-id-panel { align-items: stretch; flex-direction: column; }
  .mini-button { width: 100%; }
}

.field-note { color: var(--muted); font-size: 11px; line-height: 1.55; }
