:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #0b0b0b;
  --muted: #666666;
  --line: #d9d9d9;
  --accent: #763cdc;
  --accent-dark: #6029c1;
  --accent-soft: #f0e9ff;
  --success: #0b0b0b;
  --warning: #0b0b0b;
  --shadow: 12px 12px 0 #763cdc;
  --radius: 30px;
  --work: #763cdc;
  --home: #ff9418;
  --road: #b986f4;
  --entertainment: #f6b04a;
  --recovery: #4e218a;
  --unplanned: #e7c59d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select { font: inherit; }

button { cursor: pointer; }

.app-shell {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
  padding: 28px 0 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.brand__dot {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 4px;
  background: #ff9418;
}

.card {
  min-height: 620px;
  padding: clamp(28px, 6vw, 64px);
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.step-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.progress {
  height: 6px;
  margin: -10px 0 36px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--accent-soft);
}

.progress__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .25s ease;
}

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

h1 {
  max-width: 660px;
  margin-bottom: 22px;
  font-size: clamp(52px, 7vw, 92px);
  line-height: .93;
  letter-spacing: -.055em;
}

h2 {
  max-width: 650px;
  margin-bottom: 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.04;
  letter-spacing: -.04em;
  font-weight: 650;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 650;
}

.lead {
  max-width: 610px;
  color: #353535;
  font-size: clamp(18px, 2.7vw, 22px);
  line-height: 1.52;
}

.hint, .supporting {
  color: var(--muted);
  line-height: 1.5;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
}

.button {
  min-height: 50px;
  padding: 13px 22px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  box-shadow: none;
  transition: transform .15s ease, background .15s ease;
}

.button:hover { background: var(--accent-dark); }
.button:active { transform: translateY(1px); box-shadow: none; }
.button:focus-visible { outline: 3px solid #ff9418; outline-offset: 3px; }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button--ghost { color: var(--text); background: #f1f1f1; box-shadow: none; }
.button--ghost:hover { color: var(--text); background: #e6e6e6; }
.button--small { min-height: 40px; padding: 8px 14px; font-size: 14px; }

.time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.field-label { display: grid; gap: 8px; font-weight: 600; }

.time-input, .duration-select {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #fff;
}

.time-input {
  appearance: none;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .04em;
}

.time-input:focus, .duration-select:focus {
  outline: 3px solid rgba(114, 86, 216, .18);
  border-color: var(--accent);
}

.message {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--warning);
  background: var(--accent-soft);
  line-height: 1.45;
}

.message--ok { color: var(--success); background: #f3f3f3; }

.distribution-summary {
  position: sticky;
  top: 10px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  font-weight: 600;
}

.time-rows { display: grid; gap: 10px; }

.time-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 122px 102px;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #ebe6dc;
}

.time-row__label { font-weight: 600; }
.time-row__description { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 450; }

.choice-list { display: grid; gap: 10px; margin-top: 26px; }

.choice {
  position: relative;
  display: block;
}

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice span {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 18px;
  border: 0;
  border-radius: 15px;
  background: #f4f4f4;
  font-weight: 500;
  transition: border .15s ease, background .15s ease, transform .15s ease;
}

.choice span::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border: 0;
  border-radius: 50%;
  background: #cfcfcf;
}

.choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(3px);
}

.choice input:checked + span::before {
  border: 0;
  background: var(--accent);
  box-shadow: 0 0 0 5px #e5d7ff;
}

.choice input:focus-visible + span { outline: 3px solid #ff9418; outline-offset: 2px; }

.result-intro { margin-bottom: 24px; }
.result-intro h2 { margin-bottom: 8px; }

.chart { display: grid; align-content: start; gap: 13px; margin: 0; }

.bar-row { display: grid; gap: 7px; }
.bar-row__meta { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.bar-row__name { font-weight: 550; }
.bar-row__time { display: flex; align-items: center; gap: 9px; color: var(--muted); white-space: nowrap; }
.bar-row__percent { min-width: 48px; padding: 4px 9px; border-radius: 999px; text-align: center; font-size: 13px; font-weight: 650; }
.bar-row__track { height: 12px; overflow: hidden; border-radius: 99px; background: #ededed; }
.bar-row__fill { height: 100%; min-width: 3px; border-radius: inherit; }

.result-section {
  padding: 0;
  border: 0;
}

.result-section p { max-width: 650px; margin-bottom: 10px; font-size: 16px; line-height: 1.48; }
.result-section p:last-child { margin-bottom: 0; }

.result-section--advice {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 5vw, 70px);
  align-items: start;
}

.result-layout__content { display: grid; gap: 20px; }

.card--result {
  min-height: 0;
  padding-top: 38px;
  padding-bottom: 38px;
}

.card--result .result-intro h2 { font-size: clamp(38px, 5vw, 58px); }
.card--result .actions { margin-top: 24px; }

.cat-note {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 0;
  border-radius: 20px;
  background: var(--accent-soft);
  font-size: 16px;
  font-weight: 450;
}

.cat-note__image {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  min-height: 490px;
}

.hero__copy { position: relative; z-index: 1; }
.hero__button { margin-top: 24px; }

.hero__visual {
  position: relative;
  align-self: end;
  min-height: 440px;
}

.hero__shape {
  position: absolute;
  inset: 70px 0 24px;
  border: 2px solid var(--text);
  border-radius: 50% 50% 18px 18px;
  background: var(--accent);
  transform: rotate(4deg);
}

.hero__cat {
  position: absolute;
  z-index: 1;
  right: -18px;
  bottom: 0;
  width: min(390px, 115%);
  max-height: 500px;
  object-fit: contain;
  filter: drop-shadow(6px 8px 0 rgba(11, 11, 11, .18));
}

.privacy-note {
  margin: 14px auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 620px) {
  .app-shell { width: min(100% - 28px, 820px); padding-top: 16px; }
  .card { min-height: 0; padding: 28px 20px; border-radius: 22px; box-shadow: none; }
  h1 { font-size: clamp(52px, 17vw, 72px); }
  .hero { grid-template-columns: 1fr; gap: 12px; }
  .hero__visual { min-height: 290px; }
  .hero__shape { inset: 48px 8% 14px; }
  .hero__cat { right: 50%; width: min(310px, 92%); transform: translateX(50%); }
  .hero__button { width: 100%; }
  .time-grid { grid-template-columns: 1fr; }
  .time-row { grid-template-columns: 1fr 1fr; }
  .time-row__label { grid-column: 1 / -1; }
  .actions { align-items: stretch; flex-direction: column-reverse; }
  .actions .button { width: 100%; }
  .distribution-summary { font-size: 14px; }
  .result-layout { grid-template-columns: 1fr; gap: 32px; }
  .result-layout__content { gap: 24px; }
  .card--result { padding-top: 28px; padding-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
