@font-face {
  font-family: "Pretendard Variable";
  src: url("/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #3f3945;
  background: #f7f1e9;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --canvas: #f7f1e9;
  --surface: #fffdf9;
  --ink: #3f3945;
  --muted: #756e78;
  --line: #e8ddd3;
  --lilac: #d8c4dd;
  --lilac-soft: #eee5f0;
  --plum: #66566f;
  --coral: #e86f54;
  --coral-deep: #bd4f3a;
  --danger: #bd454b;
  --danger-soft: #fff1f0;
  --shadow: 0 16px 44px rgba(82, 67, 73, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 85% 4%, rgba(216, 196, 221, 0.34), transparent 23rem),
    var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

button:not(:disabled),
a {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible + span {
  outline: 3px solid rgba(232, 111, 84, 0.42);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.site-header {
  border-bottom: 1px solid rgba(130, 112, 118, 0.12);
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(14px);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(100% - 36px, 760px);
  margin-inline: auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #625968;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.page-shell {
  min-height: calc(100vh - 190px);
  padding-block: 42px 70px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 36px;
}

.intro-copy {
  display: grid;
  justify-items: start;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
legend {
  color: #3b3540;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 620px;
  margin-bottom: 20px;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.16;
}

.lead {
  max-width: 610px;
  margin-bottom: 14px;
  color: #625a65;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: -0.015em;
}

.boundary {
  max-width: 600px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
}

.quiet-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.intro-visual {
  display: grid;
  place-items: center;
}

.character-frame {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 55% 48%, #fffdf9 0 38%, rgba(238, 229, 240, 0.82) 72%);
  box-shadow: var(--shadow);
}

.character-frame img {
  width: 190px;
  height: 190px;
  object-fit: contain;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.primary-button {
  padding: 14px 22px;
  background: var(--coral);
  color: #fffdf9;
  box-shadow: 0 10px 26px rgba(232, 111, 84, 0.22);
}

.primary-button:hover:not(:disabled) {
  background: #dc644c;
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #d7d0ce;
  color: #817a7c;
  box-shadow: none;
}

.secondary-button {
  padding: 13px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--plum);
}

.secondary-button:hover {
  border-color: #c8b7ca;
  background: #fbf7fb;
}

.text-button {
  padding: 10px 4px;
  background: transparent;
  color: #675f69;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.checker,
.result {
  width: min(100%, 660px);
  margin-inline: auto;
}

.progress-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.progress-label {
  min-width: 42px;
  margin: 0;
  color: var(--plum);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: #e9dfd8;
}

.progress-track span {
  width: 25%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--plum);
  transition: width 180ms ease;
}

.check-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.check-step legend {
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.28;
}

.step-help {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 15px;
}

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

.option {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  color: #4d4651;
  font-weight: 650;
  box-shadow: 0 7px 20px rgba(82, 67, 73, 0.035);
}

.option:hover {
  border-color: #cbb9ce;
  background: #fffbf8;
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.option span {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 16px;
}

.option input:checked + span {
  background: var(--lilac-soft);
  color: #4f4056;
  box-shadow: inset 0 0 0 2px var(--plum);
}

.option-risk input:checked + span {
  background: var(--danger-soft);
  color: #77383c;
  box-shadow: inset 0 0 0 2px var(--danger);
}

.form-error {
  margin: 16px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

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

.form-actions .primary-button {
  margin-left: auto;
}

.result-status {
  margin-bottom: 12px;
  color: var(--coral-deep);
  font-size: 14px;
  font-weight: 800;
}

.result h2 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: clamp(31px, 6vw, 45px);
  line-height: 1.2;
}

.result-summary {
  margin-bottom: 28px;
  color: #625a65;
  font-size: 17px;
  line-height: 1.68;
}

.hypothesis-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: hypothesis;
}

.hypothesis-list li {
  counter-increment: hypothesis;
  position: relative;
  min-height: 92px;
  padding: 18px 20px 18px 58px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
}

.hypothesis-list li::before {
  position: absolute;
  top: 18px;
  left: 19px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lilac-soft);
  color: var(--plum);
  font-size: 13px;
  font-weight: 850;
  content: counter(hypothesis);
}

.hypothesis-list strong {
  display: block;
  margin-bottom: 4px;
  color: #463f4a;
  font-size: 17px;
}

.hypothesis-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.next-check {
  margin-top: 24px;
  padding: 21px 23px;
  border-left: 4px solid var(--coral);
  border-radius: 0 17px 17px 0;
  background: #fff8f4;
}

.next-check h3 {
  margin-bottom: 7px;
  color: #624339;
  font-size: 17px;
}

.next-check p {
  margin: 0;
  color: #6a5952;
}

.result-boundary {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

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

.urgent-result {
  padding: 28px;
  border-left: 5px solid var(--danger);
  border-radius: 0 24px 24px 0;
  background: var(--danger-soft);
}

.urgent-result .result-status {
  color: var(--danger);
}

.urgent-action {
  border-left-color: var(--danger);
  background: #fff9f7;
}

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

.source-links a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid #e6c7c5;
  border-radius: 14px;
  background: #fffdf9;
  color: #6c4245;
  font-size: 14px;
  font-weight: 700;
}

.restart-only {
  width: 100%;
  margin-top: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #efe6dc;
}

.footer-inner {
  display: grid;
  gap: 9px;
  padding-block: 28px 36px;
  color: #746b72;
  font-size: 13px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: inherit;
  font-weight: 700;
}

@media (max-width: 620px) {
  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(100% - 28px, 760px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand-copy small {
    display: none;
  }

  .page-shell {
    padding-block: 30px 54px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .intro-copy {
    justify-items: stretch;
  }

  .intro h1 {
    margin-bottom: 16px;
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

  .boundary {
    margin-bottom: 20px;
  }

  .intro .primary-button {
    width: 100%;
  }

  .quiet-note {
    text-align: center;
  }

  .intro-visual {
    grid-row: 1;
  }

  .character-frame {
    width: 142px;
    height: 142px;
  }

  .character-frame img {
    width: 126px;
    height: 126px;
  }

  .progress-row {
    margin-bottom: 24px;
  }

  .check-step legend {
    font-size: 27px;
  }

  .step-help {
    margin-bottom: 19px;
  }

  .option,
  .option span {
    min-height: 56px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

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

  .form-actions .primary-button:only-child {
    grid-column: 1 / -1;
  }

  .result h2 {
    font-size: 31px;
  }

  .urgent-result {
    padding: 22px 19px;
    border-radius: 0 20px 20px 0;
  }
}

@media (max-width: 360px) {
  .form-actions {
    grid-template-columns: 1fr;
  }

  .form-actions .primary-button {
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-track span {
    transition: none;
  }
}

.share-redirect-page {
  min-height: 100vh;
}

.share-redirect-shell {
  display: grid;
  min-height: calc(100vh - 78px);
  place-items: center;
}

.share-redirect-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 18px 46px rgba(63, 48, 67, 0.1);
  max-width: 620px;
  padding: clamp(28px, 7vw, 52px);
  text-align: center;
}

.share-redirect-card img {
  border-radius: 50%;
  height: 128px;
  margin: 0 auto 22px;
  object-fit: cover;
  width: 128px;
}

.share-redirect-card h1 {
  font-size: clamp(28px, 7vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin: 0;
}

.share-redirect-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 18px auto 24px;
  max-width: 440px;
}

.share-redirect-card .primary-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 52px;
  text-decoration: none;
}
