@charset "UTF-8";

:root {
  --paper: #F4F1EA;
  --card: #FBF9F4;
  --ink: #37342E;
  --ink-soft: #7C766A;
  --line: #CFC9BC;
  --olive: #4B4E3A;
  --olive-band: #6E6E58;
  --sage: #E1E1D2;
  --danger: #7A4439;
  --danger-soft: #F0E3DE;
  --serif: "Shippori Mincho", "Noto Serif JP", serif;
  --sans: "Noto Sans JP", sans-serif;
  --max-width: 680px;
  --season-tint: var(--sage);
  --season-accent: var(--olive);
  --season-accent-dark: var(--olive);
  --season-line: var(--line);
  font-size: 16px;
}

body[data-season="spring"] {
  --season-tint: #ECE8DD;
  --season-accent: #70705A;
  --season-accent-dark: #4B4E3A;
  --season-line: #CCC7B8;
}

body[data-season="summer"] {
  --season-tint: #E4EBE4;
  --season-accent: #64715D;
  --season-accent-dark: #465243;
  --season-line: #C5CEC3;
}

body[data-season="autumn"] {
  --season-tint: #EBE6D8;
  --season-accent: #756F55;
  --season-accent-dark: #52503E;
  --season-line: #CEC6B2;
}

body[data-season="winter"] {
  --season-tint: #E4E7E5;
  --season-accent: #5F6A64;
  --season-accent-dark: #444E49;
  --season-line: #C4CBC7;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .035em;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body[data-season] {
  background: linear-gradient(180deg, var(--paper) 0%, var(--season-tint) 100%);
}

[hidden] { display: none !important; }

#app {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: .1em;
}
ul, ol { margin-top: 0; }
button, input { font: inherit; }
a { color: inherit; text-underline-offset: 4px; }

button,
a,
input,
summary { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

/* Header */
.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 234, .95);
  backdrop-filter: blur(8px);
}

.app-header__inner {
  width: min(1120px, calc(100% - 48px));
  min-height: 82px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.app-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.app-header__mark { width: 30px; height: 46px; flex: none; }

.app-header__logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .06em;
  white-space: nowrap;
}

.app-header__back {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .1em;
  text-decoration: none;
  white-space: nowrap;
}

.app-header__back:hover,
.app-header__back:focus-visible { text-decoration: underline; }

.expectation-banner {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 18px auto 0;
  padding: 12px 16px;
  border-block: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .78rem;
  line-height: 1.75;
  text-align: center;
}

.expectation-banner strong { color: var(--ink); font-weight: 500; }

.app-main {
  width: min(var(--max-width), 100%);
  margin-inline: auto;
  padding: 18px 20px 48px;
  flex: 1;
}

.app-footer {
  width: min(var(--max-width), 100%);
  margin-inline: auto;
  padding: 22px 20px 42px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .72rem;
  line-height: 1.8;
  text-align: center;
}

/* Common controls */
.btn {
  min-height: 46px;
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--olive);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn--large { width: 100%; padding-block: 14px; }
.btn--primary { background: var(--olive); color: #FFF; }
.btn--primary:not(:disabled):hover { background: #3D402F; }
.btn--ghost { border-color: var(--line); background: var(--card); }
.btn--ghost:not(:disabled):hover { border-color: var(--olive); }
#screen-result .btn--primary { background: var(--season-accent-dark); }

.screen { animation: screen-in .28s ease; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Intro */
.intro { padding: 26px 0 10px; }

.intro__title {
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.65rem);
  line-height: 1.55;
}

.text-grad { color: var(--ink); }

.intro__lead {
  margin-bottom: 22px;
  color: var(--ink-soft);
  font-size: .94rem;
  line-height: 1.9;
}

.intro__points {
  margin-bottom: 30px;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}

.intro__points li {
  position: relative;
  padding-left: 25px;
  font-size: .86rem;
}

.check-mark { position: absolute; left: 0; color: var(--olive); font-weight: 600; }

.course-list { display: grid; gap: 12px; }

.course-card {
  width: 100%;
  min-height: 118px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}

.course-card:hover { border-color: var(--olive); }
.course-card--primary { border-color: var(--olive); background: var(--sage); }
.course-card__eyebrow { color: var(--olive); font-size: .7rem; font-weight: 500; letter-spacing: .14em; }
.course-card__title { font-family: var(--serif); font-size: 1.13rem; font-weight: 500; letter-spacing: .1em; }
.course-card__desc { color: var(--ink-soft); font-size: .8rem; line-height: 1.7; }

/* Questions */
.progress { padding: 18px 0 10px; }
.progress__bar { height: 3px; overflow: hidden; background: var(--line); }
.progress__fill { width: 0; height: 100%; background: var(--olive); transition: width .25s ease; }
.progress__label { margin-top: 9px; color: var(--ink-soft); font-size: .75rem; letter-spacing: .1em; text-align: right; }

.question { padding: 20px 0 14px; }
.question__title { margin-bottom: 9px; font-size: clamp(1.4rem, 1.16rem + 1vw, 1.8rem); line-height: 1.65; }
.question__sub { margin-bottom: 20px; color: var(--ink-soft); font-size: .84rem; }

.options { display: grid; gap: 10px; }
.options--compact { grid-template-columns: 1fr; }

.option {
  min-height: 50px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}

.option:hover { border-color: var(--olive); }
.option.is-selected { border-color: var(--olive); background: var(--sage); }

.option__mark {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #FFF;
  font-size: .72rem;
}

.option[data-shape="circle"] .option__mark { border-radius: 50%; }
.option.is-selected .option__mark { border-color: var(--olive); background: var(--olive); }
.option__label { font-size: .92rem; font-weight: 500; }
.option__desc { margin-top: 2px; display: block; color: var(--ink-soft); font-size: .77rem; font-weight: 400; }

.option-group-heading {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  padding: 14px 2px 5px;
  border-bottom: 1px solid var(--line);
  color: var(--olive);
  font-family: var(--serif);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .12em;
}

.option-group-heading:first-child { padding-top: 2px; }

.question-nav {
  position: sticky;
  z-index: 10;
  bottom: 0;
  margin-inline: -20px;
  padding: 12px 20px calc(10px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: rgba(244, 241, 234, .96);
  backdrop-filter: blur(8px);
}

.question-nav__buttons { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.question-nav__buttons .btn--primary { margin-left: auto; flex: 1; }
.selection-counter { margin-bottom: 0; color: var(--ink-soft); font-size: .76rem; text-align: center; }

/* Search fields */
.oil-filter { position: relative; margin-bottom: 14px; }
.search-container { margin-bottom: 28px; display: grid; gap: 14px; }
.search-box { position: relative; display: flex; align-items: center; }

.oil-filter__input,
.search-input {
  width: 100%;
  min-height: 48px;
  padding: 11px 42px 11px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font-size: .88rem;
}

.oil-filter__input::placeholder,
.search-input::placeholder { color: var(--ink-soft); }

.oil-filter__input:focus,
.search-input:focus { border-color: var(--olive); outline: 2px solid var(--sage); outline-offset: 0; }

.oil-filter__clear,
.search-clear {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.2rem;
  cursor: pointer;
}

.oil-filter__clear:hover,
.search-clear:hover { background: var(--sage); color: var(--ink); }
.oil-filter-empty { grid-column: 1 / -1; padding: 26px 8px; color: var(--ink-soft); font-size: .84rem; text-align: center; }

.search-results {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
}

.search-result-item { padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.search-result-item:last-child { border-bottom: 0; }
.search-result-item:hover { background: var(--sage); }
.search-result-item__name { margin-bottom: 2px; font-weight: 500; }
.search-result-item__brand { color: var(--ink-soft); font-size: .76rem; }
.search-result-empty { padding: 16px; color: var(--ink-soft); font-size: .82rem; text-align: center; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--olive);
  border-radius: 3px;
  background: var(--olive);
  color: #FFF;
  font-size: .8rem;
}

.chip__close { margin-left: 7px; padding: 0; border: 0; background: none; color: #FFF; font-size: 1.05rem; line-height: 1; cursor: pointer; }

.fallback-accordion { margin-top: 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }
.fallback-accordion summary { padding: 13px 15px; color: var(--ink); font-family: var(--serif); font-weight: 500; letter-spacing: .08em; cursor: pointer; }
.fallback-accordion .options { padding: 0 14px 14px; }

/* Result */
.result-hero {
  margin: 14px 0 20px;
  padding: 40px 24px 34px;
  border: 1px solid var(--season-line);
  border-radius: 4px;
  background: var(--season-tint);
  text-align: center;
}

.result-hero__eyebrow { margin-bottom: 13px; color: var(--season-accent-dark); font-family: var(--serif); font-size: .76rem; letter-spacing: .18em; }
.result-hero__title { margin-bottom: 13px; font-size: clamp(1.9rem, 1.55rem + 1.4vw, 2.55rem); line-height: 1.5; }
.result-hero__scene { margin-bottom: 12px; color: var(--season-accent-dark); font-family: var(--serif); font-size: .96rem; line-height: 1.8; }
.result-hero__desc { max-width: 47ch; margin: 0 auto; color: var(--ink-soft); font-size: .85rem; }

.card {
  margin-bottom: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
}

.card__title { margin-bottom: 15px; font-size: 1.12rem; line-height: 1.65; }
.waitlist-card { background: var(--sage); }

.vessel-toggle__label { margin-bottom: 10px; color: var(--ink-soft); font-size: .78rem; }
.vessel-toggle__switch { display: flex; gap: 8px; }

.vessel-btn {
  min-height: 44px;
  padding: 10px 8px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 500;
  cursor: pointer;
}

.vessel-btn.is-active { border-color: var(--season-accent-dark); background: var(--season-accent-dark); color: #FFF; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .86rem; cursor: pointer; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch__slider { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); transition: background-color .16s ease; }
.switch__slider::before { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 50%; background: #FFF; content: ""; transition: transform .16s ease; }
.switch input:checked + .switch__slider { border-color: var(--season-accent-dark); background: var(--season-accent-dark); }
.switch input:checked + .switch__slider::before { transform: translateX(20px); }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.recipe-table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: .82rem; }
.recipe-table th,
.recipe-table td { padding: 11px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.recipe-table th { background: var(--paper); color: var(--ink); font-weight: 500; }
.recipe-table td:first-child,
.recipe-table th:first-child { white-space: normal; }

.recipe-summary { margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; }
.recipe-summary div { display: contents; }
.recipe-summary dt { color: var(--ink-soft); font-size: .74rem; }
.recipe-summary dd { margin: 0; font-size: .86rem; font-weight: 500; }
.howto-steps { margin-bottom: 0; padding-left: 1.3em; display: grid; gap: 9px; font-size: .84rem; }

.notices-list { display: grid; gap: 10px; }
.notice { padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px; font-size: .8rem; line-height: 1.7; }
.notice--high { border-color: #CDAFA5; background: var(--danger-soft); color: #60372E; }
.notice--info { background: var(--sage); }
.notice__title { margin-bottom: 3px; display: block; font-weight: 600; }

.owned-card__lead { margin-bottom: 15px; color: var(--ink-soft); font-size: .83rem; }
.owned-presets { margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 7px; }

.preset-btn {
  min-height: 39px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
}

.preset-btn.is-active { border-color: var(--season-accent-dark); background: var(--season-accent-dark); color: #FFF; }
.owned-details { margin-bottom: 8px; }
.owned-details summary { padding: 8px 0; color: var(--olive); font-family: var(--serif); font-size: .84rem; font-weight: 500; cursor: pointer; }
.owned-checklist { max-height: 270px; margin-top: 6px; padding: 10px 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; overflow-y: auto; border-top: 1px solid var(--line); }
.owned-checklist label { padding: 5px 2px; display: flex; align-items: center; gap: 6px; font-size: .77rem; }
.owned-checklist input { width: 16px; height: 16px; flex: none; accent-color: var(--olive); }
.owned-result { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.repro-score { margin-bottom: 14px; padding: 13px 16px; display: flex; align-items: baseline; justify-content: space-between; border: 1px solid var(--season-line); border-radius: 3px; background: var(--season-tint); }
.repro-score__label { color: var(--season-accent-dark); font-size: .82rem; font-weight: 500; }
.repro-score__value { color: var(--season-accent-dark); font-family: var(--serif); font-size: 1.55rem; }
.owned-suggestions { margin-top: 14px; display: grid; gap: 8px; }
.suggestion-item { padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 9px; border: 1px solid var(--line); border-radius: 3px; font-size: .8rem; }
.suggestion-item__gain { color: var(--olive); font-weight: 600; flex: none; }
.suggestion-item__link { padding: 4px 8px; border: 1px solid var(--olive); border-radius: 3px; color: var(--olive); font-size: .73rem; text-decoration: none; flex: none; }

.waitlist-card__lead { margin-bottom: 15px; font-size: .86rem; }
.waitlist-card__note { margin: 11px 0 0; color: var(--ink-soft); font-size: .75rem; }
.share-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.share-actions .btn { min-width: 130px; flex: 1; }
.copy-feedback { margin: 10px 0 0; color: var(--olive); font-size: .78rem; }
.result-footer { padding: 12px 0 25px; text-align: center; }

@media (min-width: 480px) {
  .options { gap: 11px; }
  .options--compact { grid-template-columns: 1fr 1fr; }
  .result-hero { padding: 48px 40px 38px; }
}

@media (max-width: 620px) {
  .app-header__inner { width: calc(100% - 28px); min-height: 68px; gap: 14px; }
  .app-header__brand { gap: 8px; }
  .app-header__mark { width: 25px; height: 39px; }
  .app-header__logo { font-size: 15px; }
  .app-header__back { font-size: 11px; letter-spacing: .05em; }
  .expectation-banner { width: calc(100% - 28px); margin-top: 13px; padding-inline: 8px; }
  .intro { padding-top: 18px; }
  .course-card { min-height: 0; }
  .card { padding: 18px 16px; }
  .recipe-table { min-width: 390px; }
  .owned-checklist { grid-template-columns: 1fr; }
  .suggestion-item { align-items: flex-start; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
