:root {
      --cream: #f7efe4;
      --cream-deep: #eadbc8;
      --paper: #fffaf3;
      --paper-strong: #ffffff;
      --espresso: #26170f;
      --coffee: #5b3823;
      --coffee-soft: #7b5a43;
      --caramel: #a86228;
      --caramel-soft: #f1dfcc;
      --sage: #315f53;
      --sage-soft: #e5f0eb;
      --danger: #d65544;
      --danger-soft: #ffece9;
      --positive: #4eb262;
      --positive-soft: #deeee1;
      --line: #d3cfc5;
      --focus: #155eef;
      --shadow: 0 18px 55px rgba(72, 42, 20, .14);
      --shadow-soft: 0 9px 30px rgba(72, 42, 20, .1);
      --serif: "Fraunces", Georgia, "Noto Serif SC", "Songti SC", "Times New Roman", serif;
      --sans: "Inter", "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

      /* ── FortuneTell.AI 设计系统语义别名（bazixuan 同款融合层）──
         映射到 cupread 品牌值；FT 生态组件可直接复用这些别名。 */
      --ft-primary: var(--caramel);
      --ft-on-primary: #fff7ea;
      --ft-primary-container: var(--caramel-soft);
      --ft-on-primary-container: var(--espresso);
      --ft-background: var(--cream);
      --ft-surface: var(--paper);
      --ft-surface-strong: var(--paper-strong);
      --ft-text-primary: var(--espresso);
      --ft-text-secondary: var(--coffee-soft);
      --ft-text-muted: var(--coffee-soft);
      --ft-border: var(--line);
      --ft-positive: #4eb262;
      --ft-on-positive: #fcfbfa;
      --ft-positive-container: #deeee1;
      --ft-on-positive-container: #393736;
      --ft-error: #d65544;
      --ft-on-error: #fcfbfa;
      --ft-error-container: #ffece9;
      --ft-on-error-container: #393736;
      --ft-font-sans: var(--sans);
      --ft-font-serif: var(--serif);
      --ft-radius-card: 26px;
      --ft-radius-list-group: 26px;
      --ft-radius-input: 12px;
      --ft-button-height: 44px;
      --ft-target-min: 48px;
      --ft-shadow-result: 0 20px 40px 0 rgb(187 146 102 / 12%);
      --ft-space-1: 4px;
      --ft-space-2: 8px;
      --ft-space-3: 12px;
      --ft-space-4: 16px;
      --ft-space-5: 20px;
      --ft-space-6: 24px;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    html.is-translating .shell { opacity: .72; }
    .shell { transition: opacity .12s ease; }
    body {
      margin: 0;
      min-width: 320px;
      min-height: 100dvh;
      color: var(--espresso);
      background:
        radial-gradient(circle at 12% 0%, rgba(255,255,255,.92), transparent 33rem),
        radial-gradient(circle at 100% 25%, rgba(205,158,112,.18), transparent 28rem),
        linear-gradient(180deg, #faf3e9 0%, var(--cream) 55%, #f2e5d5 100%);
      font-family: var(--sans);
      line-height: 1.55;
      -webkit-font-smoothing: antialiased;
    }

    button, input, textarea { font: inherit; }
    button, a, label[for] { -webkit-tap-highlight-color: transparent; }
    button { min-height: 44px; }
    a { color: var(--coffee); }
    img { max-width: 100%; }
    [hidden] { display: none !important; }

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

    .skip-link {
      position: fixed;
      top: 8px;
      left: 8px;
      z-index: 100;
      transform: translateY(-150%);
      border-radius: 8px;
      padding: 10px 14px;
      color: #fff;
      background: var(--espresso);
    }
    .skip-link:focus { transform: none; }

    .shell {
      width: min(100% - 32px, 680px);
      margin: 0 auto;
      padding-bottom: calc(44px + env(safe-area-inset-bottom));
    }

    .site-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 70px;
      padding-top: env(safe-area-inset-top);
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--espresso);
      font-weight: 750;
      letter-spacing: -.01em;
      text-decoration: none;
    }

    .brand-mark {
      position: relative;
      width: 34px;
      height: 34px;
      border: 2px solid var(--coffee);
      border-radius: 8px 8px 15px 15px;
      background: linear-gradient(180deg, #855333 0 31%, #3c2417 32%);
      box-shadow: inset 0 -5px 9px rgba(0,0,0,.15);
    }
    .brand-mark::after {
      content: "";
      position: absolute;
      top: 8px;
      right: -10px;
      width: 11px;
      height: 13px;
      border: 2px solid var(--coffee);
      border-left: 0;
      border-radius: 0 9px 9px 0;
    }

    [dir="rtl"] .site-header,
    [dir="rtl"] .history-foot,
    [dir="rtl"] .chat-row,
    [dir="rtl"] .master-cta { flex-direction: row-reverse; }
    [dir="rtl"] .history-item { grid-template-columns: auto 1fr 64px; }
    [dir="rtl"] .chat-msg.user { justify-self: start; border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }
    [dir="rtl"] .chat-msg.assistant { justify-self: end; border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
    .lang-switcher {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--paper-strong);
      color: var(--coffee);
      font-size: .72rem;
      font-weight: 700;
      padding: 5px 8px;
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
    }
    .lang-switcher:hover { border-color: var(--caramel); }
    .beta-pill {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 6px 11px;
      color: var(--coffee);
      background: rgba(255,255,255,.55);
      font-size: .74rem;
      font-weight: 750;
      letter-spacing: .05em;
      text-transform: uppercase;
    }

    main { display: block; }
    .hero {
      padding: clamp(24px, 7vw, 54px) 4px 20px;
      text-align: center;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      margin: 0 0 14px;
      color: var(--caramel);
      font-size: .75rem;
      font-weight: 800;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    .eyebrow::before, .eyebrow::after { content: "✦"; font-size: .65rem; }

    h1, h2, h3, p { overflow-wrap: anywhere; }
    .hero h1 {
      max-width: 15ch;
      margin: 0 auto;
      font-family: var(--serif);
      font-size: clamp(2.35rem, 10vw, 4.25rem);
      font-weight: 600;
      letter-spacing: -.045em;
      line-height: .98;
    }
    .hero h1 em { color: var(--caramel); font-weight: 500; }
    .hero > p:last-child {
      max-width: 43ch;
      margin: 18px auto 0;
      color: var(--coffee-soft);
      font-size: clamp(.95rem, 3.4vw, 1.06rem);
    }

    .app-card {
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 26px;
      background: rgba(255,250,243,.96);
      box-shadow: var(--shadow);
    }

    .state-panel { padding: clamp(20px, 5.5vw, 34px); }
    .state-panel[hidden] { display: none; }

    .drop-zone {
      display: grid;
      min-height: 310px;
      place-items: center;
      border: 2px dashed #bda383;
      border-radius: 19px;
      padding: 28px 22px;
      background:
        linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)),
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(168,98,40,.035) 12px 24px);
      cursor: pointer;
      text-align: center;
      transition: border-color .18s ease, background .18s ease, transform .18s ease;
    }
    .drop-zone:hover, .drop-zone.is-dragging {
      border-color: var(--caramel);
      background-color: #fff7eb;
    }
    .drop-zone:active { transform: scale(.992); }

    .photo-guide {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(190px, .92fr);
      gap: 18px;
      align-items: center;
      margin-top: 18px;
      padding: 18px;
      border: 1px solid var(--caramel-soft);
      border-radius: 16px;
      background: #fff7eb;
    }
    .photo-guide-kicker {
      margin: 0 0 4px;
      color: var(--caramel);
      font-size: .7rem;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .photo-guide h2 {
      margin: 0;
      font-family: var(--serif);
      font-size: 1.12rem;
      line-height: 1.15;
    }
    .photo-guide-copy > p:last-child {
      margin: 7px 0 0;
      color: var(--coffee-soft);
      font-size: .84rem;
      line-height: 1.45;
    }
    .photo-guide-example {
      width: min(100%, 360px);
      margin: 0 auto;
    }
    .photo-guide-example img {
      display: block;
      width: 100%;
      height: auto;
      aspect-ratio: 2 / 1;
      object-fit: contain;
      border-radius: 10px;
      box-shadow: 0 5px 14px rgba(72, 42, 20, .12);
    }
    .photo-guide-example figcaption {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px;
      margin-top: 7px;
      font-size: .67rem;
      font-weight: 700;
      line-height: 1.25;
    }
    .guide-good { color: var(--sage); }
    .guide-bad { color: #a44737; text-align: right; }

    .cup-art {
      width: 96px;
      height: 96px;
      margin: 4px auto 18px;
    }
    .cup-art svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 12px rgba(70,39,19,.15)); }

    .drop-title {
      display: block;
      margin: 0;
      font-family: var(--serif);
      font-size: 1.4rem;
      line-height: 1.2;
    }
    .drop-copy {
      display: block;
      max-width: 34ch;
      margin: 8px auto 18px;
      color: var(--coffee-soft);
      font-size: .92rem;
    }
    .fake-button {
      display: inline-flex;
      min-height: 48px;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border-radius: 999px;
      padding: 12px 22px;
      color: #fffaf2;
      background: var(--espresso);
      box-shadow: 0 9px 19px rgba(38,23,15,.2);
      font-weight: 750;
    }
    .upload-note { display: block; margin: 14px 0 0; color: var(--coffee-soft); font-size: .76rem; }

    .visually-hidden {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      overflow: hidden !important;
      clip: rect(0 0 0 0) !important;
      clip-path: inset(50%) !important;
      white-space: nowrap !important;
    }

    .steps {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 9px;
      margin-top: 16px;
    }
    .step {
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 10px 7px;
      color: var(--coffee-soft);
      background: rgba(255,255,255,.5);
      font-size: .72rem;
      text-align: center;
    }
    .step b { display: block; color: var(--coffee); font-size: .78rem; }

    .center-state {
      display: grid;
      min-height: 330px;
      align-content: center;
      justify-items: center;
      text-align: center;
    }
    .center-state h2 { margin: 15px 0 6px; font-family: var(--serif); font-size: 1.45rem; }
    .center-state p { max-width: 36ch; margin: 0; color: var(--coffee-soft); font-size: .9rem; }

    .spinner {
      width: 55px;
      height: 55px;
      border: 5px solid var(--cream-deep);
      border-top-color: var(--caramel);
      border-radius: 50%;
      animation: spin .9s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .progress {
      overflow: hidden;
      width: min(280px, 80%);
      height: 5px;
      margin-top: 24px;
      border-radius: 999px;
      background: var(--cream-deep);
    }
    .reading-stages {
      display: grid;
      gap: 7px;
      width: min(280px, 86%);
      margin: 18px 0 0;
      padding: 0;
      color: var(--coffee-soft);
      font-size: .78rem;
      list-style: none;
      text-align: left;
    }
    .reading-stages li {
      position: relative;
      padding-left: 21px;
      opacity: .56;
      transition: opacity .2s ease, color .2s ease;
    }
    .reading-stages li::before {
      content: "";
      position: absolute;
      top: .3em;
      left: 0;
      width: 10px;
      height: 10px;
      border: 1.5px solid currentColor;
      border-radius: 50%;
    }
    .reading-stages li.is-active { color: var(--coffee); font-weight: 750; opacity: 1; }
    .reading-stages li.is-active::before { border-color: var(--caramel); background: var(--caramel); box-shadow: 0 0 0 4px var(--caramel-soft); }
    .reading-stages li.is-complete { opacity: .86; }
    .reading-stages li.is-complete::before { border-color: var(--sage); background: var(--sage); }
    .progress span {
      display: block;
      width: 45%;
      height: 100%;
      border-radius: inherit;
      background: var(--caramel);
      animation: progress 1.6s ease-in-out infinite;
    }
    @keyframes progress {
      0% { transform: translateX(-110%); }
      100% { transform: translateX(245%); }
    }

    .link-button {
      margin-top: 20px;
      border: 0;
      padding: 8px 12px;
      color: var(--coffee);
      background: transparent;
      font-weight: 720;
      text-decoration: underline;
      text-underline-offset: 3px;
      cursor: pointer;
    }

    .preview-frame {
      position: relative;
      overflow: hidden;
      aspect-ratio: 4 / 3;
      border-radius: 17px;
      background: #27180f;
    }
    .preview-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
    .change-photo {
      position: absolute;
      top: 12px;
      right: 12px;
      border: 1px solid rgba(255,255,255,.55);
      border-radius: 999px;
      padding: 9px 14px;
      color: #fff;
      background: rgba(25,14,8,.78);
      backdrop-filter: blur(8px);
      font-size: .8rem;
      font-weight: 750;
      cursor: pointer;
    }

    .image-meta { margin: 10px 2px 0; color: var(--coffee-soft); font-size: .77rem; }
    .quality-note {
      margin-top: 12px;
      border: 1px solid #ddad72;
      border-radius: 12px;
      padding: 11px 13px;
      color: #704018;
      background: #fff2df;
      font-size: .82rem;
    }
    .advanced-options {
      margin-top: 16px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.45);
    }
    .advanced-options summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 48px;
      padding: 0 14px;
      color: var(--coffee);
      cursor: pointer;
      font-size: .84rem;
      font-weight: 750;
      list-style: none;
    }
    .advanced-options summary::-webkit-details-marker { display: none; }
    .advanced-options summary::after {
      content: "+";
      margin-left: auto;
      color: var(--caramel);
      font-size: 1.2rem;
      line-height: 1;
    }
    .advanced-options[open] summary::after { content: "−"; }
    .advanced-options summary span {
      margin-left: 8px;
      color: var(--coffee-soft);
      font-size: .72rem;
      font-weight: 600;
    }
    .advanced-options-content {
      border-top: 1px solid var(--line);
      padding: 0 14px 14px;
    }
    .mode-toggle {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      margin-top: 18px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px;
      background: var(--cream);
    }
    .mode-option {
      border: none;
      border-radius: 999px;
      background: transparent;
      color: var(--coffee-soft);
      font-size: .78rem;
      font-weight: 700;
      padding: 9px 10px;
      cursor: pointer;
      transition: background .15s ease, color .15s ease;
    }
    .mode-option.is-active { background: var(--espresso); color: #fff6ea; }
    .ritual-card {
      margin-top: 14px;
      border: 1px solid #9c7454;
      border-radius: 16px;
      padding: 16px;
      background:
        radial-gradient(circle at 95% 0%, rgba(204,139,77,.35), transparent 11rem),
        linear-gradient(135deg, #2c1a11, #53311f);
      color: #fff6ea;
      box-shadow: var(--shadow-soft);
    }
    .ritual-card .field-label { color: #e2c9a8; }
    .ritual-card .optional { color: #c9ab88; }
    .ritual-checks { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
    .ritual-check {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      border: 1px solid rgba(255,255,255,.22);
      border-radius: 11px;
      background: rgba(255,255,255,.05);
      color: #f0ddc4;
      font-size: .78rem;
      text-align: left;
      padding: 10px 12px;
      cursor: pointer;
    }
    .ritual-check:hover { border-color: #e2a565; }
    .rc-dot {
      flex: 0 0 auto;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      border: 1.5px solid #dcaa72;
      position: relative;
    }
    .ritual-check.is-done { color: #fff6ea; border-color: rgba(226,165,101,.55); }
    .ritual-check.is-done .rc-dot::after {
      content: "✓";
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      color: #e2a565;
      font-size: .72rem;
      font-weight: 900;
    }
    .ritual-copy { margin: 12px 0 0; color: #d9bd9c; font-size: .74rem; }
    .side-views { margin-top: 18px; }
    .persona-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
    .persona-chip {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--paper-strong);
      color: var(--coffee-soft);
      font-size: .72rem;
      font-weight: 700;
      padding: 6px 11px;
      cursor: pointer;
    }
    .persona-chip:hover { border-color: var(--caramel); color: var(--coffee); }
    .persona-chip.is-on { background: var(--espresso); color: #fff6ea; border-color: var(--espresso); }
    .theme-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
    .theme-chip {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--paper-strong);
      color: var(--coffee-soft);
      font-size: .74rem;
      font-weight: 700;
      padding: 7px 12px;
      cursor: pointer;
    }
    .theme-chip:hover { border-color: var(--caramel); color: var(--coffee); }
    .theme-chip.is-on { background: var(--caramel-soft); border-color: var(--caramel); color: var(--coffee); }
    .daily-card {
      margin-top: 16px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: linear-gradient(135deg, #fffaf0, #f7ecd6);
      padding: 14px 16px;
      font-size: .8rem;
      color: var(--coffee);
    }
    .daily-card .dc-label { font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--caramel); }
    .daily-card .dc-line { margin: 6px 0 4px; }
    .daily-card .dc-line b { font-family: var(--serif); font-size: .95rem; }
    .daily-card a { color: var(--caramel); font-weight: 650; }
    .daily-card .dc-more { margin: 2px 0 0; }
    .chat { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
    .chat h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 1.02rem; }
    .chat-log { display: grid; gap: 9px; margin-bottom: 12px; }
    .chat-msg { max-width: 92%; border-radius: 14px; padding: 10px 13px; font-size: .84rem; line-height: 1.5; }
    .chat-msg.user { justify-self: end; background: var(--espresso); color: #fff6ea; border-bottom-right-radius: 4px; }
    .chat-msg.assistant { justify-self: start; background: var(--cream); color: var(--ink, var(--espresso)); border-bottom-left-radius: 4px; border: 1px solid var(--line); }
    .chat-msg.pending { opacity: .6; font-style: italic; }
    .chat-row { display: flex; gap: 8px; }
    .chat-row input {
      flex: 1;
      border: 1.5px solid var(--line);
      border-radius: 999px;
      padding: 11px 15px;
      font-size: .88rem;
      font-family: inherit;
      background: var(--paper-strong);
      color: var(--espresso);
    }
    .chat-row input:focus { outline: none; border-color: var(--caramel); }
    .chat-row .button { flex: 0 0 auto; border-radius: 999px; }
    .chat-note { margin: 9px 0 0; font-size: .7rem; color: var(--coffee-soft); }
    .chat-mic {
      flex: 0 0 auto;
      border-radius: 999px;
      padding: 11px 14px;
      font-size: 1rem;
      line-height: 1;
    }
    .chat-mic.listening {
      background: var(--danger);
      color: #fff;
      animation: pulse 1.2s ease-in-out infinite;
    }
    @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.1); }
    }
    .voice-reply-note { font-size: .68rem; color: var(--caramel); margin-top: 4px; }
    .side-copy { margin: 5px 0 10px; color: var(--coffee-soft); font-size: .78rem; max-width: 46ch; }
    .side-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
    .side-slot {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      min-height: 88px;
      border: 1.5px dashed var(--line);
      border-radius: 14px;
      background: var(--paper-strong);
      color: var(--coffee-soft);
      font-size: .76rem;
      font-weight: 600;
      cursor: pointer;
      overflow: hidden;
      padding: 8px;
    }
    .side-slot:hover { border-color: var(--caramel); color: var(--coffee); }
    .side-slot.is-filled {
      border-style: solid;
      justify-content: flex-end;
      padding: 0;
      color: #fff6ea;
      text-shadow: 0 1px 6px rgba(0,0,0,.7);
    }
    .side-slot.is-filled img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .side-slot .side-slot-label { position: relative; z-index: 1; padding-bottom: 6px; }
    .side-slot .side-remove {
      position: absolute;
      top: 6px;
      right: 6px;
      z-index: 2;
      width: 26px;
      height: 26px;
      border: none;
      border-radius: 50%;
      background: rgba(24,13,7,.62);
      color: #fff6ea;
      font-size: .82rem;
      line-height: 1;
      cursor: pointer;
    }
    .tradition-card {
      margin-top: 16px;
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 22px;
      background: var(--paper);
      box-shadow: var(--shadow-soft);
    }
    .tradition-card .concept-label { border-color: var(--caramel); color: var(--caramel); }
    .tradition-card h2 { max-width: 20ch; margin: 12px 0 7px; font-family: var(--serif); font-size: 1.55rem; line-height: 1.12; }
    .tradition-card > p { max-width: 58ch; margin: 0 0 14px; color: var(--coffee-soft); font-size: .84rem; }
    .ritual-steps { display: grid; gap: 9px; margin: 0 0 15px; padding: 0; list-style: none; counter-reset: ritual; }
    .ritual-steps li { position: relative; padding-left: 40px; color: var(--coffee-soft); font-size: .8rem; }
    .ritual-steps li::before {
      counter-increment: ritual;
      content: counter(ritual);
      position: absolute;
      left: 0;
      top: 1px;
      display: grid;
      place-items: center;
      width: 26px;
      height: 26px;
      border: 1px solid var(--line);
      border-radius: 50%;
      background: var(--cream);
      color: var(--caramel);
      font-size: .78rem;
      font-weight: 800;
    }
    .ritual-steps b { display: block; color: var(--espresso); font-size: .78rem; }
    .zone-note {
      margin: 0;
      padding: 11px 13px;
      border-left: 3px solid var(--caramel);
      border-radius: 8px;
      background: var(--cream);
      color: var(--coffee);
      font-size: .8rem;
    }
    .header-tools { display: inline-flex; align-items: center; gap: 8px; }
    .history-pill {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--paper-strong);
      color: var(--coffee);
      font-size: .74rem;
      font-weight: 650;
      padding: 6px 12px;
      cursor: pointer;
    }
    .history-pill:hover { border-color: var(--caramel); color: var(--caramel); }
    .dictionary-link { margin: -8px 0 16px; font-size: .78rem; }
    .dictionary-link a { color: var(--caramel); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
    .history-dialog { max-height: min(78dvh, 620px); display: flex; flex-direction: column; }
    .history-list {
      list-style: none; margin: 14px 0 0; padding: 0; overflow-y: auto;
      border: 0.5px solid var(--line); border-radius: 26px; background: var(--paper-strong);
      overflow: hidden;
    }
    .history-item {
      display: grid;
      grid-template-columns: 64px 1fr auto;
      align-items: center;
      gap: 10px;
      width: 100%;
      border: none;
      border-bottom: 0.5px solid var(--line);
      border-radius: 0;
      background: var(--paper-strong);
      padding: 14px 16px;
      min-height: 70px;
      text-align: left;
      cursor: pointer;
    }
    .history-item:last-child { border-bottom: none; }
    .history-item:hover { border-color: var(--caramel); }
    .hi-date { color: var(--coffee-soft); font-size: .72rem; }
    .hi-title { color: var(--espresso); font-family: var(--serif); font-size: .95rem; font-weight: 600; }
    .hi-symbols { color: var(--caramel); font-size: .85rem; }
    .history-empty { margin: 18px 0 0; text-align: center; color: var(--coffee-soft); font-size: .82rem; }
    .history-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
    .history-note { color: var(--coffee-soft); font-size: .7rem; }
    .badge-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
    .badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: .68rem; font-weight: 700;
      background: var(--caramel-soft); color: var(--coffee);
      border-radius: 999px; padding: 4px 10px;
    }
    .badge.locked { background: var(--cream); color: var(--coffee-soft); opacity: .5; }    .history-note { color: var(--coffee-soft); font-size: .7rem; }
    .paywall-icon { font-size: 2.1rem; line-height: 1; }
    .paywall-offer {
      width: 100%;
      max-width: 36ch;
      margin: 16px auto 0;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 16px;
      background: var(--paper-strong);
      text-align: left;
    }
    .offer-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
    .offer-row b { font-family: var(--serif); font-size: 1.02rem; }
    .offer-row .price { font-family: var(--serif); font-weight: 700; color: var(--caramel); font-size: 1.25rem; }
    .offer-perks { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; color: var(--coffee-soft); font-size: .78rem; }
    .offer-perks li::before { content: "✓"; margin-right: 8px; color: var(--caramel); font-weight: 900; }
    .secure-note { margin: 10px 0 0; text-align: center; color: var(--coffee-soft); font-size: .7rem; }
    .sub-offer { border-color: var(--caramel); background: #fdf6e7; margin-top: 10px; }
    .sub-offer .price { color: var(--caramel); }

    .question-wrap { margin-top: 20px; }
    .field-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: .88rem; font-weight: 750; }
    .optional { color: var(--coffee-soft); font-size: .75rem; font-weight: 500; }
    textarea, input[type="email"] {
      width: 100%;
      border: 1.5px solid var(--line);
      border-radius: 12px;
      color: var(--espresso);
      background: var(--paper-strong);
    }
    textarea { min-height: 88px; resize: vertical; padding: 12px 13px; }
    input[type="email"] { min-height: 48px; padding: 11px 13px; }
    textarea:focus, input[type="email"]:focus { border-color: var(--focus); outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(21,94,239,.16); }
    .char-count { margin: 5px 2px 0; color: var(--coffee-soft); font-size: .72rem; text-align: right; }

    .button-row { display: flex; gap: 10px; margin-top: 18px; }
    .button {
      display: inline-flex;
      min-height: 48px;
      flex: 1;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border: 0;
      border-radius: 999px;
      padding: 11px 18px;
      font-weight: 780;
      cursor: pointer;
      transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    }
    .button:active { transform: scale(.98); }
    .button:disabled { cursor: not-allowed; opacity: .62; transform: none; }
    .button-primary { color: #fffaf3; background: var(--espresso); box-shadow: 0 9px 20px rgba(38,23,15,.2); }
    .button-primary:hover { background: #3b2518; }
    .button-secondary { border: 1.5px solid var(--line); color: var(--coffee); background: transparent; }
    .button-secondary:hover { background: var(--cream); }
    .button-warm { color: #fff; background: var(--caramel); }

    .error-icon {
      display: grid;
      width: 58px;
      height: 58px;
      place-items: center;
      border-radius: 50%;
      color: var(--danger);
      background: var(--danger-soft);
      font-size: 1.6rem;
      font-weight: 800;
    }
    .error-actions { display: grid; width: min(100%, 360px); gap: 10px; margin-top: 24px; }
    .demo-offer {
      margin-top: 22px;
      border-top: 1px solid var(--line);
      padding-top: 20px;
    }
    .demo-offer p { font-size: .8rem; }

    .result-head { text-align: center; }
    .result-label {
      color: var(--caramel);
      font-size: .72rem;
      font-weight: 850;
      letter-spacing: .11em;
      text-transform: uppercase;
    }
    /* CR-03: observed symbols (model judgment) vs cultural interpretation are
       labelled as separate sections, never blended into one verdict. */
    .result-section-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin: 20px 0 6px;
    }
    .result-section-head .rsh-title {
      color: var(--espresso);
      font-family: var(--serif);
      font-size: 1.02rem;
      font-weight: 750;
    }
    .result-section-head .rsh-note { color: var(--coffee-soft); font-size: .72rem; text-align: right; }
    .history-search { margin: 4px 0 10px; }
    .history-search input {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 8px 12px;
      font: 600 .84rem/1.3 ui-sans-serif, system-ui, sans-serif;
      color: var(--espresso);
      background: var(--paper);
    }
    .history-list li.history-row { display: flex; align-items: center; gap: 6px; }
    .history-row .history-item { flex: 1; min-width: 0; }
    .hi-remove { font-size: .68rem; padding: 4px 6px; flex-shrink: 0; }
    .hi-sync { margin-left: auto; font-size: .68rem; color: var(--coffee-soft); }
    .demo-banner {
      margin: 0 0 18px;
      border: 1px solid #d89043;
      border-radius: 12px;
      padding: 10px 12px;
      color: #6d3b12;
      background: #fff1dc;
      font-size: .79rem;
      font-weight: 720;
      text-align: left;
    }
    .result-head h2 {
      margin: 8px auto 5px;
      font-family: var(--serif);
      font-size: clamp(1.8rem, 7vw, 2.5rem);
      font-weight: 600;
      letter-spacing: -.025em;
      line-height: 1.08;
    }
    .result-subtitle { margin: 0; color: var(--coffee-soft); font-size: .85rem; }

    .symbols, .themes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .symbols { margin: 19px 0; }
    .symbol-chip {
      display: inline-flex;
      min-height: 38px;
      align-items: center;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 12px;
      color: var(--coffee);
      background: var(--cream);
      font-size: .82rem;
      font-weight: 740;
    }

    .reading-copy {
      border: 1px solid var(--line);
      border-radius: 17px;
      padding: clamp(17px, 4.5vw, 25px);
      background: linear-gradient(180deg, #fffdf8, #f8ecdc);
    }
    .themes { justify-content: flex-start; margin-bottom: 16px; }
    .theme-tag { border-radius: 6px; padding: 5px 9px; color: #7c461c; background: var(--caramel-soft); font-size: .72rem; font-weight: 760; }
    .reading-body p { margin: 0 0 15px; color: #352318; font-family: var(--serif); font-size: 1.03rem; line-height: 1.7; }
    .reading-body p:last-child { margin-bottom: 0; }
    .reading-body p:first-child::first-letter { float: left; padding: 7px 7px 0 0; color: var(--caramel); font-family: var(--serif); font-size: 2.4rem; line-height: .75; }
    .disclaimer { margin: 13px 3px 0; color: var(--coffee-soft); font-size: .73rem; text-align: center; }

    .feedback {
      margin-top: 19px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 15px;
      background: rgba(255,255,255,.55);
      text-align: center;
    }
    .feedback p { margin: 0 0 10px; font-size: .86rem; font-weight: 750; }
    .feedback-buttons { display: flex; justify-content: center; gap: 9px; }
    .feedback-button {
      min-width: 112px;
      border: 1.5px solid var(--line);
      border-radius: 999px;
      padding: 8px 13px;
      color: var(--coffee);
      background: var(--paper-strong);
      font-weight: 720;
      cursor: pointer;
    }
    .feedback-button[aria-pressed="true"] { border-color: var(--sage); color: var(--sage); background: var(--sage-soft); }
    .feedback-thanks { margin: 9px 0 0 !important; color: var(--sage); font-size: .78rem !important; font-weight: 650 !important; }

    .master-cta {
      margin-top: 14px; padding: 11px 14px;
      border: 1px solid var(--line); border-radius: 12px;
      background: var(--cream); font-size: .78rem; color: var(--coffee-soft);
      display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
    }
    .master-cta .mc-text b { color: var(--coffee); }
    .master-cta .mc-link { color: var(--caramel); font-weight: 700; text-decoration: none; white-space: nowrap; }
    .master-cta .mc-link:hover { text-decoration: underline; }
    .result-actions { display: grid; gap: 10px; margin-top: 16px; }
    .result-actions .button { width: 100%; }
    .result-more-actions {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255,255,255,.42);
    }
    .result-more-actions summary {
      min-height: 42px;
      padding: 10px 13px;
      color: var(--coffee);
      cursor: pointer;
      font-size: .8rem;
      font-weight: 720;
      text-align: center;
      list-style: none;
    }
    .result-more-actions summary::-webkit-details-marker { display: none; }
    .result-more-actions summary::after { content: " +"; color: var(--caramel); }
    .result-more-actions[open] summary::after { content: " −"; }
    .result-more-actions > div {
      display: grid;
      gap: 9px;
      border-top: 1px solid var(--line);
      padding: 10px;
    }
    .wide { grid-column: 1 / -1; }

    .subscribe-cta {
      display: grid;
      gap: 9px;
      margin-top: 19px;
      border-top: 1px solid var(--line);
      padding-top: 18px;
      text-align: center;
    }
    .subscribe-cta p { margin: 0; color: var(--coffee-soft); font-size: .83rem; }

    .evidence-strip {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin-top: 16px;
    }
    .evidence-item {
      min-height: 80px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 12px 8px;
      color: var(--coffee-soft);
      background: rgba(255,255,255,.42);
      font-size: .7rem;
      text-align: center;
    }
    .evidence-item span { display: block; margin-bottom: 4px; color: var(--coffee); font-size: 1.05rem; }
    .evidence-item b { display: block; color: var(--espresso); font-size: .75rem; }

    .mode-card {
      position: relative;
      overflow: hidden;
      margin-top: 16px;
      border: 1px solid #9c7454;
      border-radius: 20px;
      padding: 22px;
      color: #fff6ea;
      background:
        radial-gradient(circle at 90% 0%, rgba(204,139,77,.45), transparent 13rem),
        linear-gradient(135deg, #28170f, #53311f);
      box-shadow: var(--shadow-soft);
    }
    .mode-card::after {
      content: "☾";
      position: absolute;
      top: -23px;
      right: 7px;
      color: rgba(255,239,213,.09);
      font-family: var(--serif);
      font-size: 8rem;
      line-height: 1;
    }
    .mode-card > * { position: relative; z-index: 1; }
    .concept-label {
      display: inline-block;
      border: 1px solid rgba(255,255,255,.35);
      border-radius: 999px;
      padding: 5px 9px;
      color: #f6d7af;
      font-size: .66rem;
      font-weight: 820;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .mode-card h2 { max-width: 18ch; margin: 12px 0 7px; font-family: var(--serif); font-size: 1.55rem; line-height: 1.12; }
    .mode-card p { max-width: 52ch; margin: 0 0 14px; color: #e7d5c2; font-size: .84rem; }
    .mode-features { display: grid; gap: 5px; margin: 0 0 17px; padding: 0; list-style: none; color: #fff1df; font-size: .78rem; }
    .mode-features li::before { content: "✓"; margin-right: 8px; color: #e2a565; font-weight: 900; }
    .price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
    .price { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; }
    .mode-card .button { flex: 0 1 auto; border: 1px solid #dcaa72; color: #29170e; background: #f2c58e; }
    .mode-card .button[aria-pressed="true"] { color: #dcf5ea; background: #315f53; }
    .no-charge { margin: 12px 0 0 !important; color: #dec5ad !important; font-size: .7rem !important; }

    .legal-links {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px 18px;
      margin: 27px 0 16px;
      font-size: .8rem;
    }
    .legal-links a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 3px; }

    .legal-copy {
      display: grid;
      gap: 9px;
      margin-bottom: 12px;
    }
    .legal-copy details {
      border-top: 1px solid var(--line);
      padding: 10px 2px;
      color: var(--coffee-soft);
      font-size: .75rem;
    }
    .legal-copy summary {
      min-height: 44px;
      display: flex;
      align-items: center;
      color: var(--coffee);
      font-weight: 760;
      cursor: pointer;
    }
    .legal-copy p { margin: 7px 0; }
    .legal-copy h3 { margin: 13px 0 3px; color: var(--espresso); font-size: .8rem; }
    .matrix { margin-top: 30px; }
    .matrix-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
    .matrix-head h2 { font-family: var(--serif); font-size: 1.02rem; color: var(--espresso); margin: 0; }
    .matrix-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
    .matrix-card {
      display: flex; flex-direction: column; align-items: center; text-align: center;
      background: var(--paper-strong); border: 1px solid var(--line); border-radius: 16px;
      padding: 14px 10px 12px; text-decoration: none;
      transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    }
    .matrix-card:hover { transform: translateY(-2px); border-color: var(--caramel); box-shadow: var(--shadow-soft); }
    .matrix-card.is-here { border-color: #C9A227; background: #fdf6e7; }
    .mc-icon {
      width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
      color: #fff7ea; font-family: var(--serif); font-weight: 700; font-size: 1.1rem;
      margin-bottom: 8px; box-shadow: 0 3px 8px rgba(42,24,16,.18);
    }
    .mc-name { font-family: var(--serif); font-weight: 650; font-size: .85rem; color: var(--espresso); }
    .mc-en { font-size: .62rem; color: var(--coffee-soft); margin-top: 1px; }
    .mc-desc { font-size: .68rem; color: var(--coffee-soft); line-height: 1.5; margin-top: 6px; }
    .mc-tag {
      margin-top: 7px; font-size: .62rem; font-weight: 700;
      background: var(--cream); color: var(--coffee-soft);
      border-radius: 999px; padding: 3px 9px;
    }
    .matrix-card.is-here .mc-tag { background: rgba(201,162,39,.16); color: #8a6d1a; }
    .footer-note a { color: var(--coffee-soft); }
    .footer-note a:hover { color: var(--caramel); }
    @media (min-width: 560px) { .matrix-grid { grid-template-columns: repeat(5, 1fr); } }
    .footer-note { margin: 18px 0 0; color: var(--coffee-soft); font-size: .7rem; text-align: center; }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: grid;
      place-items: end center;
      padding: 16px;
      background: rgba(29,16,9,.62);
      backdrop-filter: blur(5px);
    }
    .modal {
      position: relative;
      width: min(100%, 500px);
      max-height: calc(100dvh - 32px);
      overflow: auto;
      border-radius: 22px;
      padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
      background: var(--paper);
      box-shadow: 0 28px 80px rgba(19,9,4,.36);
    }
    .modal-close {
      position: absolute;
      top: 11px;
      right: 11px;
      width: 44px;
      border: 0;
      border-radius: 50%;
      color: var(--coffee);
      background: transparent;
      font-size: 1.5rem;
      cursor: pointer;
    }
    .modal h2 { margin: 4px 45px 7px 0; font-family: var(--serif); font-size: 1.55rem; }
    .modal-copy { margin: 0 0 18px; color: var(--coffee-soft); font-size: .88rem; }
    .form-field { display: grid; gap: 7px; margin-bottom: 13px; }
    .form-field label { font-size: .82rem; font-weight: 760; }
    .consent {
      display: grid;
      grid-template-columns: 24px 1fr;
      gap: 10px;
      align-items: start;
      margin: 13px 0;
      color: var(--coffee-soft);
      font-size: .76rem;
      cursor: pointer;
    }
    .consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--sage); }
    .form-error { min-height: 1.3em; margin: 5px 0; color: var(--danger); font-size: .77rem; }
    .success-box { padding: 24px 4px 10px; text-align: center; }
    .success-icon { display: grid; width: 55px; height: 55px; margin: 0 auto 12px; place-items: center; border-radius: 50%; color: var(--sage); background: var(--sage-soft); font-size: 1.5rem; }

    .toast {
      position: fixed;
      left: 50%;
      bottom: calc(20px + env(safe-area-inset-bottom));
      z-index: 90;
      max-width: calc(100% - 32px);
      transform: translate(-50%, 18px);
      border-radius: 999px;
      padding: 11px 17px;
      color: #fff;
      background: #23150d;
      box-shadow: 0 12px 35px rgba(0,0,0,.25);
      font-size: .82rem;
      opacity: 0;
      pointer-events: none;
      text-align: center;
      transition: opacity .2s ease, transform .2s ease;
    }
    .toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
    .toast.toast-success { background: var(--positive); }
    .toast.toast-error { background: var(--danger); }

    @media (max-width: 430px) {
      .photo-guide { grid-template-columns: 1fr; }
      .shell { width: min(100% - 22px, 680px); }
      .state-panel { padding: 16px; }
      .button-row { flex-direction: column-reverse; }
      .result-actions { grid-template-columns: 1fr; }
      .wide { grid-column: auto; }
      .feedback-buttons { flex-direction: column; }
      .evidence-item { padding-inline: 4px; }
      .evidence-item b { font-size: .68rem; }
    }

    @media (min-width: 650px) {
      .modal-backdrop { place-items: center; }
      .modal { border-radius: 22px; }
    }

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