:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-soft: #f6f2ec;
  --line: #e5ded4;
  --line-strong: #d8cdbf;
  --text: #22201d;
  --muted: #736b61;
  --accent: #45b89e;
  --accent-deep: #177f69;
  --peach: #f2a98c;
  --lavender: #a99be7;
  --warn: #b75b44;
  --shadow: 0 20px 60px rgba(79, 65, 43, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(140deg, rgba(69, 184, 158, 0.16), transparent 34rem),
    linear-gradient(320deg, rgba(242, 169, 140, 0.18), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background: #1b8f76;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(27, 143, 118, 0.22);
}

button.secondary {
  color: var(--text);
  background: #efe8dd;
  box-shadow: none;
}

button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 34px 18px 42px;
}

.intro {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 0.94;
  letter-spacing: 0;
  word-break: keep-all;
}

h2 {
  margin: 0 0 12px;
  color: #2c2823;
  font-size: 17px;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.workspace {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
  gap: 18px;
  align-items: start;
}

.questionnaire {
  display: grid;
  gap: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.result-panel {
  display: grid;
  gap: 14px;
}

.result-content {
  display: grid;
  gap: 14px;
}

.empty-state {
  display: grid;
  min-height: 360px;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(69, 184, 158, 0.12), transparent 50%),
    linear-gradient(315deg, rgba(169, 155, 231, 0.18), transparent 54%),
    #ffffff;
  box-shadow: var(--shadow);
}

.empty-state span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: #126f5c;
  background: rgba(69, 184, 158, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.empty-state h2 {
  max-width: 420px;
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  word-break: keep-all;
}

.empty-state p {
  max-width: 430px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

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

label {
  color: var(--muted);
  font-size: 14px;
}

.option-grid label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--accent);
}

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

.control-row label {
  display: grid;
  gap: 7px;
}

small {
  color: #8b8175;
  font-size: 12px;
  line-height: 1.45;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: #fffdf9;
}

.warning-options label {
  border-color: rgba(183, 91, 68, 0.26);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.routine-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(69, 184, 158, 0.16), transparent 46%),
    linear-gradient(315deg, rgba(242, 169, 140, 0.2), transparent 52%),
    #ffffff;
  box-shadow: var(--shadow);
}

.routine-card span {
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 900;
}

.routine-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1;
  word-break: keep-all;
}

.routine-card p {
  grid-column: 1 / -1;
  color: #4c463f;
  font-size: 16px;
}

.score-ring {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  align-content: center;
  border: 8px solid rgba(69, 184, 158, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  background: #fffdf9;
}

.score-ring span {
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.score-ring small {
  font-size: 11px;
}

.result-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-tags span,
.chips li {
  border: 1px solid rgba(69, 184, 158, 0.3);
  border-radius: 999px;
  padding: 7px 10px;
  color: #126f5c;
  background: rgba(69, 184, 158, 0.1);
  font-size: 13px;
  font-weight: 800;
}

.routine-columns,
.insight-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.92);
}

ol,
ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.note p,
.care-note {
  color: var(--muted);
  line-height: 1.65;
}

.product-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.92);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title h2 {
  margin-bottom: 0;
}

.section-title span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #7a3525;
  background: rgba(242, 169, 140, 0.2);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.affiliate-note {
  font-size: 13px;
}

.product-card {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
}

.product-score {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  color: #7a3525;
  background: rgba(242, 169, 140, 0.2);
  font-size: 12px;
  font-weight: 900;
}

.product-card p {
  font-size: 14px;
}

.product-criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 0;
  list-style: none;
}

.product-criteria li {
  border-radius: 999px;
  padding: 5px 8px;
  color: #126f5c;
  background: rgba(69, 184, 158, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.product-evidence {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.product-evidence dt {
  color: var(--accent-deep);
  font-weight: 900;
}

.product-evidence dd {
  margin: 0;
}

.product-card a {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  color: #ffffff;
  background: #1b8f76;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
}

.care-note.urgent {
  border-color: rgba(183, 91, 68, 0.32);
  color: #7a3525;
  background: rgba(242, 169, 140, 0.18);
}

.care-note.safe {
  border-color: rgba(69, 184, 158, 0.26);
  color: #126f5c;
  background: rgba(69, 184, 158, 0.1);
}

@media (max-width: 920px) {
  .routine-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100%, 390px);
    margin: 0;
    padding: 20px 10px 30px;
  }

  h1 {
    font-size: 38px;
  }

  .intro p {
    font-size: 15px;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .option-grid,
  .control-row {
    grid-template-columns: 1fr;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
