:root {
  color-scheme: light;
  --paper: #f7f3e7;
  --light: #fffdf7;
  --ink: #303b29;
  --olive: #536344;
  --soft-olive: #e7ebdd;
  --line: #c8cdbb;
  --secondary: #5d6851;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  scrollbar-color: #89957b var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, h4, p { margin: 0; }
button, select { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .3em; }
::selection { color: var(--light); background: var(--olive); }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 4px; }
.fortune-shell { width: min(65rem, calc(100% - 3rem)); margin: 3.25rem auto 2rem; }
.page-heading { text-align: center; }
h1 { color: var(--olive); font-size: clamp(1.8rem, 4.8vw, 3rem); line-height: 1.35; font-weight: 900; letter-spacing: -.025em; text-wrap: balance; }
.page-heading > p { margin-top: .8rem; color: var(--secondary); font-size: 1.05rem; line-height: 1.85; }
.welcome { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; width: min(54rem, 100%); margin: 2.5rem auto 3.5rem; }
.draw-area { display: grid; place-items: center; min-width: 0; }
.mascot { display: block; width: min(100%, 22rem); height: auto; }
.entry { min-width: 0; max-width: 25rem; }
.birthday-form { display: grid; gap: .85rem; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .85rem; padding: 0; color: var(--olive); font-size: 1rem; font-weight: 700; }
.birth-date-row { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: .6rem; }
.birth-date-row label { display: grid; gap: .4rem; min-width: 0; }
.birth-date-row label > span { color: var(--secondary); font-size: .8rem; }
select { width: 100%; min-width: 0; min-height: 3.5rem; margin: 0; padding: .5rem .55rem; border: 1px solid #8a957b; border-radius: .25rem; background: var(--light); color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
select:disabled { opacity: 1; color: var(--secondary); background: #eeefe6; }
.selected-sign { min-height: 1.5em; color: var(--olive); font-size: .9rem; font-weight: 600; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 1.25rem; width: 100%; min-height: 3.7rem; padding: .8rem 1rem; border: 0; border-radius: .25rem; background: var(--olive); color: var(--light); font-size: 1.05rem; font-weight: 700; transition: background-color 160ms ease; }
.primary-button:disabled { background: #777f6c; cursor: default; }
.arrow { display: inline-block; position: relative; flex: 0 0 auto; width: 1.3rem; height: 1px; background: currentColor; }
.arrow::after { position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); content: ""; }
.text-button { min-height: 44px; padding: .45rem 0; border: 0; background: transparent; color: var(--olive); font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: .32em; }
.remember-controls { margin-top: .9rem; }
.note { color: var(--secondary); font-size: .8rem; line-height: 1.85; }
.forget-button { font-size: .75rem; font-weight: 400; }
.profile-lead { color: var(--secondary); font-size: .9rem; }
.saved-profile h2 { margin-top: .3rem; color: var(--olive); font-size: 2.25rem; font-weight: 800; }
.saved-message { margin-top: .75rem; line-height: 1.9; }
.saved-profile .primary-button { margin-top: 1.5rem; }
.saved-profile > .text-button { display: block; margin: .45rem auto 0; }
.reading { margin: 2rem auto 3.5rem; }
.reading-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.reading-head time { color: var(--secondary); font-size: .9rem; font-variant-numeric: tabular-nums; }
.reading-head h2 { margin-top: .35rem; color: var(--olive); font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 800; line-height: 1.5; scroll-margin-top: 1.5rem; }
.reading-head h2:focus { outline: 0; }
.reading-columns { display: grid; grid-template-columns: 1.15fr 1fr; align-items: start; gap: 3rem; }
.summary-reading { min-width: 0; }
.overall { padding: clamp(1.25rem, 3vw, 2rem); border-radius: 14px; background: var(--soft-olive); }
.overall-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.overall-head h3 { color: var(--olive); font-size: 1.1rem; font-weight: 700; }
.score { color: var(--olive); white-space: nowrap; font-variant-numeric: tabular-nums; }
.score strong { font-size: 1.9rem; font-weight: 800; }
.score > span { font-size: .85rem; }
.headline { margin-top: 1rem; font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; line-height: 1.6; text-wrap: balance; }
.headline span { display: inline-block; }
.overall-copy { margin-top: 1rem; font-size: 1rem; line-height: 1.95; }
.one-word { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; align-items: center; gap: 1rem; margin-top: 1.4rem; padding: .25rem .3rem; }
.one-word h3 { color: var(--olive); font-size: .9rem; font-weight: 700; }
.one-word p { margin-top: .55rem; font-size: 1.05rem; font-weight: 600; line-height: 1.9; }
.one-word img { display: block; width: 100%; height: auto; }
.detail-help { margin-bottom: .9rem; color: var(--secondary); font-size: .85rem; }
.forecast { border-top: 1px solid var(--line); }
.forecast:last-child { border-bottom: 1px solid var(--line); }
.forecast summary { display: flex; align-items: center; gap: .75rem; min-height: 5rem; padding: 1rem .2rem; color: var(--olive); cursor: pointer; list-style: none; }
.forecast summary::-webkit-details-marker { display: none; }
.forecast-name { flex: 1; font-size: 1.15rem; font-weight: 700; }
.forecast-score { margin-right: .6rem; color: var(--secondary); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { position: relative; width: 20px; height: 20px; flex: 0 0 20px; }
.plus::before, .plus::after { position: absolute; left: 2px; top: 9px; width: 16px; height: 2px; background: currentColor; content: ""; }
.plus::after { transform: rotate(90deg); }
.forecast[open] .plus::after { transform: rotate(0); }
.forecast-content { padding: 0 .2rem 1.5rem; font-size: .95rem; line-height: 1.95; }
.today-action { margin-top: 1rem; padding-top: .85rem; border-top: 1px dashed var(--line); }
.today-action h4 { color: var(--olive); font-size: .8rem; font-weight: 700; }
.today-action p { margin-top: .25rem; }
.reading-bottom { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.page-footer { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--secondary); font-size: .75rem; line-height: 1.9; }
.page-footer a { display: inline-flex; align-items: center; gap: 1rem; min-height: 44px; white-space: nowrap; font-weight: 600; }
@media (hover: hover) {
  .primary-button:not(:disabled):hover { background: #3f4f32; }
  .text-button:hover, .page-footer a:hover { color: #2d3e23; }
  .forecast summary:hover { background: #eeefe3; }
}
@media (prefers-reduced-motion: no-preference) {
  .reading { animation: reveal 300ms cubic-bezier(.16, 1, .3, 1); }
  @keyframes reveal { from { transform: translateY(8px); } to { transform: translateY(0); } }
}
@media (max-width: 760px) {
  .fortune-shell { width: min(31rem, calc(100% - 2rem)); margin: 1.65rem auto 1.5rem; }
  h1 { font-size: clamp(1.7rem, 7.1vw, 2.2rem); }
  .page-heading > p { margin-top: .55rem; font-size: .95rem; }
  .welcome { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1rem; margin-bottom: 2rem; }
  .mascot { width: min(62%, 14rem); }
  .entry { max-width: none; }
  legend { font-size: .95rem; margin-bottom: .5rem; }
  .birth-date-row { gap: .45rem; }
  .saved-profile { text-align: center; }
  .saved-profile h2 { font-size: 1.9rem; }
  .saved-message { margin-top: .5rem; font-size: .95rem; }
  .saved-profile .primary-button { margin-top: 1rem; }
  .remember-controls { margin-top: .7rem; }
  .reading { margin-top: 1.5rem; margin-bottom: 2rem; }
  .reading-head { margin-bottom: 1rem; }
  .reading-head time { font-size: .8rem; }
  .reading-head > .text-button { font-size: .75rem; }
  .reading-columns { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .one-word { grid-template-columns: minmax(0, 1fr) 5.5rem; gap: .6rem; margin-top: 1.25rem; }
  .one-word p { font-size: 1rem; }
  .overall-copy { font-size: .95rem; line-height: 1.95; }
  .forecast summary { min-height: 4.5rem; }
  .page-footer { display: block; }
  .page-footer a { margin-top: .5rem; }
}
@media (max-width: 350px) {
  .birth-date-row { grid-template-columns: 1.35fr 1fr 1fr; gap: .3rem; }
  select { padding-inline: .3rem; }
  .one-word { grid-template-columns: minmax(0, 1fr) 4.5rem; }
}

