:root {
      color-scheme: light;
      --paper: #f3f5ef;
      --ink: #6ae8b4;
      --muted: #68746d;
      --line: #cbd2c8;
      --lime: #d7ed52;
      --coral: #ff765e;
      --blue: #477aee;
      --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
      --sans: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    }

    * { box-sizing: border-box; }
    html { min-width: 320px; background: var(--paper); }
    body {
      margin: 0;
      color: var(--ink);
      background-color: var(--paper);
      background-image: radial-gradient(#cbd2c8 0.65px, transparent 0.65px);
      background-size: 15px 15px;
      font-family: var(--sans);
      -webkit-font-smoothing: antialiased;
    }
    button { font: inherit; }
    .shell { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
    .topbar {
      min-height: 76px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--line);
    }
    .wordmark { display: flex; align-items: center; gap: 11px; font-size: 12px; font-weight: 800; letter-spacing: 0.13em; }
    .mark { width: 23px; height: 23px; position: relative; display: inline-block; transform: rotate(-12deg); }
    .mark::before, .mark::after { content: ""; position: absolute; background: var(--coral); }
    .mark::before { width: 8px; height: 23px; left: 7px; top: 0; border-radius: 8px 0; }
    .mark::after { width: 23px; height: 8px; left: 0; top: 7px; border-radius: 0 8px; }
    .top-note { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; }

    main { min-height: calc(100svh - 76px); display: grid; align-items: center; }
    .intro {
      display: grid;
      grid-template-columns: 1.05fr 0.95fr;
      align-items: center;
      gap: 46px;
      padding: 48px 0 64px;
      animation: rise-in 650ms both;
    }
    .eyebrow { margin: 0 0 20px; color: #52714c; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; }
    h1, h2, p { margin-top: 0; }
    .intro h1 {
      margin-bottom: 20px;
      font-family: var(--serif);
      font-size: clamp(42px, 5.3vw, 68px);
      line-height: 1.38;
      font-weight: 500;
    }
    .intro h1 span { position: relative; z-index: 0; white-space: nowrap; }
    .intro h1 span::after {
      content: ""; position: absolute; z-index: -1; height: 15px; bottom: 7px; left: -3px; right: -5px;
      background: var(--lime); transform: rotate(-1.5deg);
    }
    .intro-copy { max-width: 390px; margin-bottom: 30px; color: var(--muted); font-size: 14px; line-height: 2; }
    .primary-button {
      min-height: 58px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; gap: 28px;
      border: 1px solid var(--ink); background: var(--ink); color: white; cursor: pointer; font-size: 13px; font-weight: 700;
      transition: background 160ms ease, color 160ms ease, transform 160ms ease;
    }
    .primary-button:hover { background: var(--lime); color: var(--ink); transform: translateY(-2px); }
    .arrow { font-size: 20px; font-weight: 400; line-height: 1; }
    .hero-art { min-height: 465px; position: relative; display: grid; place-items: center; }
    .photo-frame {
      width: min(350px, 78%); aspect-ratio: 0.82; overflow: hidden; position: relative; z-index: 1;
      border-radius: 48% 48% 4px 4px; background: #d8d9c9;
    }
    .photo-frame img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 51% center; filter: saturate(0.82); }
    .frame-outline { position: absolute; width: min(350px, 78%); aspect-ratio: 0.82; border: 1px solid var(--ink); border-radius: 48% 48% 4px 4px; transform: translate(17px, 17px); }
    .sun-shape { position: absolute; width: 112px; height: 112px; right: 4%; top: 12%; background: var(--coral); border-radius: 50%; mix-blend-mode: multiply; }
    .art-label { position: absolute; z-index: 2; left: 2%; bottom: 7%; padding: 13px 15px; background: var(--lime); color: var(--ink); font-family: var(--serif); font-size: 15px; transform: rotate(-4deg); }
    .art-index { position: absolute; right: 1%; bottom: 5%; color: var(--muted); font-size: 10px; letter-spacing: 0.13em; writing-mode: vertical-rl; }

    .quiz, .result { width: min(740px, 100%); margin: 0 auto; padding: 54px 0 70px; animation: rise-in 450ms both; }
    .quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; }
    .progress-track { height: 3px; background: #dce1d8; margin-bottom: 52px; }
    .progress-fill { width: 12.5%; height: 100%; background: var(--coral); transition: width 300ms ease; }
    .question-kicker { color: #52714c; font-size: 11px; letter-spacing: 0.12em; font-weight: 700; margin-bottom: 16px; }
    .question-title { max-width: 690px; min-height: 94px; margin: 0 0 35px; font-family: var(--serif); font-size: clamp(28px, 4vw, 42px); line-height: 1.55; font-weight: 500; }
    .answers { display: grid; gap: 12px; }
    .answer {
      width: 100%; min-height: 72px; display: flex; align-items: center; gap: 18px; padding: 17px 20px;
      border: 1px solid var(--line); background: rgba(255,255,255,0.64); color: var(--ink); text-align: left; cursor: pointer;
      transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
    }
    .answer:hover, .answer:focus-visible { border-color: var(--ink); background: var(--lime); transform: translateX(4px); outline: none; }
    .answer-letter { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-family: var(--serif); font-size: 14px; }
    .answer-text { font-size: 14px; line-height: 1.75; }
    .quiz-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; }
    .back-button, .text-button {
      display: inline-flex; align-items: center; gap: 9px; padding: 8px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px;
    }
    .back-button:hover, .text-button:hover { color: var(--ink); }
    .footer-note { color: var(--muted); font-size: 11px; }

    .result { width: min(840px, 100%); }
    .result-banner { position: relative; overflow: hidden; padding: clamp(28px, 6vw, 58px); background: var(--lime); }
    .result-banner::after { content: ""; width: 225px; height: 225px; position: absolute; right: -40px; bottom: -120px; border: 1px solid rgba(29,41,36,.48); border-radius: 50%; box-shadow: 0 0 0 20px rgba(29,41,36,.07), 0 0 0 40px rgba(29,41,36,.06); }
    .result-type { position: relative; z-index: 1; margin: 0 0 11px; color: #52714c; font-size: 11px; font-weight: 700; letter-spacing: 0.15em; }
    .result-title { position: relative; z-index: 1; max-width: 600px; margin: 0; font-family: var(--serif); font-size: clamp(36px, 6vw, 62px); line-height: 1.35; font-weight: 500; }
    .result-subtitle { position: relative; z-index: 1; margin: 16px 0 0; color: #405242; font-size: 14px; }
    .result-body { display: grid; grid-template-columns: 1fr 0.75fr; gap: 48px; padding: 38px 0 30px; border-bottom: 1px solid var(--line); }
    .result-body h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 21px; font-weight: 500; }
    .result-description { margin: 0; color: #4f5c55; font-size: 14px; line-height: 2; }
    .traits { display: grid; gap: 21px; align-content: center; }
    .trait { display: grid; gap: 9px; }
    .trait-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
    .trait-name { color: var(--ink); font-size: 12px; font-weight: 700; }
    .trait-track { height: 5px; background: #dce1d8; }
    .trait-fill { height: 100%; background: var(--blue); }
    .result-footnote { margin: 20px 0 27px; color: var(--muted); font-size: 11px; line-height: 1.8; }
    .result-actions { display: flex; align-items: center; gap: 22px; }
    .result-actions .primary-button { min-height: 50px; }
    .toast { min-height: 20px; margin-top: 15px; color: #52714c; font-size: 12px; }
    [hidden] { display: none !important; }

    @keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
    @media (max-width: 720px) {
      .shell { width: min(100% - 40px, 520px); }
      .topbar { min-height: 64px; }
      main { min-height: calc(100svh - 64px); }
      .intro { grid-template-columns: 1fr; gap: 15px; padding: 38px 0 48px; }
      .intro h1 { font-size: clamp(42px, 11vw, 58px); }
      .intro-copy { font-size: 13px; margin-bottom: 23px; }
      .hero-art { min-height: 310px; grid-row: 1; }
      .photo-frame, .frame-outline { width: 220px; }
      .sun-shape { width: 76px; height: 76px; right: 12%; top: 10%; }
      .art-label { left: 6%; bottom: 5%; }
      .art-index { right: 7%; bottom: 8%; }
      .quiz, .result { padding: 38px 0 52px; }
      .progress-track { margin-bottom: 37px; }
      .question-title { min-height: 0; margin-bottom: 27px; }
      .answer { min-height: 68px; padding: 14px; gap: 13px; }
      .answer-text { font-size: 13px; }
      .result-body { grid-template-columns: 1fr; gap: 30px; padding-top: 28px; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    }
