:root {
  color-scheme: dark;
  --ink: #191514;
  --wine-dark: #261a17;
  --wine-light: #4c231e;
  --cream: #f1e5ce;
  --muted: #bfb19e;
  --brass: #d8ad73;
  --line: #c6a57441;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.65 var(--sans); background: var(--ink); color: var(--cream); }
body::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 660px; z-index: -1;
  background: radial-gradient(ellipse at 77% 50%, var(--wine-light) 0, var(--wine-dark) 44%, transparent 75%);
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid #efc48a; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(1140px, calc(100% - 44px)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.top-inner { min-height: 76px; }
.brand { font: 600 18px/1.1 var(--serif); white-space: nowrap; }
.brand small { display: block; margin-top: 5px; font: 9px/1.2 Georgia, serif; letter-spacing: .19em; color: var(--brass); }
.top nav { display: flex; align-items: center; gap: 23px; }
.nav-button, .text-button { border: 0; padding: 5px 0; background: transparent; color: var(--brass); }
.nav-button { color: var(--cream); white-space: nowrap; }
.nav-button span { margin-left: 5px; color: var(--brass); }
.nav-button:hover, .text-button:hover, .source:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-button:disabled { cursor: default; opacity: .65; text-decoration: none; }
.hero { padding-block: 65px 55px; }
.hero-copy { padding-block: 9px; }
.eyebrow { color: var(--brass); font: 600 11px/1.5 Georgia, serif; letter-spacing: .21em; }
.eyebrow span { display: inline-block; vertical-align: middle; width: 23px; height: 1px; background: var(--brass); margin: 0 8px 2px 0; }
.eyebrow b { color: #9b765d; padding-inline: 4px; }
.hero h1 { font-size: clamp(45px, 5.45vw, 78px); line-height: 1.12; letter-spacing: -.045em; margin: 21px 0 14px; }
.hero-subtitle { color: #e5c79f; font: 400 clamp(21px, 2.5vw, 33px)/1.35 var(--serif); letter-spacing: .08em; }
.hero-description { color: var(--muted); margin: 22px 0 28px; line-height: 1.95; }
.button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 25px;
  min-height: 48px; padding: 10px 18px; border: 1px solid #c89a63; font-weight: 650;
  color: #211712; background: linear-gradient(115deg, #edcca0, #c89a63);
}
.button span { font-size: 19px; line-height: 1; }
.button:hover { background: #f0d2a7; }
figcaption { color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); margin-bottom: 40px; }
.steps div { display: flex; gap: 15px; align-items: center; justify-content: center; min-height: 73px; padding: 10px; }
.steps div + div { border-left: 1px solid var(--line); }
.steps em { color: var(--brass); font: italic 26px Georgia, serif; }
.steps span { font: 600 15px/1.3 var(--serif); }
.steps small { display: block; margin-top: 4px; color: var(--muted); font: 9px Georgia, serif; letter-spacing: .15em; }
.order-section { background: linear-gradient(115deg, var(--wine-dark), #321d19); border-block: 1px solid var(--line); scroll-margin: 12px; }
.order-grid { display: grid; grid-template-columns: .8fr 1.55fr; gap: clamp(34px, 8vw, 115px); padding-block: 65px; }
.section-intro h2, .reveal h2 { margin: 12px 0; font-size: clamp(35px, 4.1vw, 53px); line-height: 1.2; }
.form { min-width: 0; padding: clamp(17px, 3vw, 34px); background: var(--wine-light); border: 1px solid var(--line); }
.field + .field { margin-top: 20px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.field-label label { font-weight: 650; }
.field-label > span { color: var(--muted); font: 12px Georgia, serif; }
.field-label > span.over, .field-error { color: #ffc0a9; }
.required { color: var(--brass); }
.optional { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: normal; }
input, textarea { display: block; width: 100%; background: var(--wine-light); color: var(--cream); border: 1px solid #a17c61; border-radius: 0; padding: 11px 13px; font-size: 16px; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #a39b8d; }
[aria-invalid=true] { border-color: #e69b80; }
.field-hint, .field-error, .form-note { margin-top: 5px; font-size: 12px; }
.field-hint, .form-note { color: var(--muted); }
.form-actions, .result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-top: 24px; }
#sample-note:empty { display: none; }
.sample-picker { max-width: 290px; margin-top: 16px; }
.sample-picker summary { width: fit-content; padding-block: 10px; color: var(--brass); cursor: pointer; }
.profile-collection { display: block; min-height: 44px; margin-top: 8px; padding: 10px 0; }
.sample-list { display: grid; gap: 8px; margin-top: 10px; }
.sample-list button {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px;
  min-height: 44px; padding: 8px 12px; text-align: left;
  color: var(--cream); background: var(--wine-dark); border: 1px solid var(--line);
}
.sample-list button:hover { background: var(--wine-light); border-color: var(--brass); }
.sample-list strong { font-family: var(--serif); }
.sample-list span { color: var(--muted); font-size: 12px; }
.saved-profile-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.saved-profile-row strong { overflow-wrap: anywhere; }
#save-card-status:empty { display: none; }
.reveal { padding: 75px 0 90px; text-align: center; }
.reveal svg { color: var(--brass); animation: illuminate .95s ease-in-out infinite alternate; margin-bottom: 20px; }
.reveal > p:last-child { color: var(--muted); }
@keyframes illuminate { from { opacity: .45; transform: translateY(8px) rotate(-8deg); } to { opacity: 1; transform: translateY(0) rotate(8deg); filter: drop-shadow(0 0 16px #d69868a0); } }
.result { padding-block: 58px 64px; animation: arrive .5s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.result-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.result-grid { max-width: 760px; }
.result-visual { font-size: .9rem; }
.result-for { color: var(--muted); overflow-wrap: anywhere; }
.result h2 { font-size: clamp(34px, 5vw, 63px); line-height: 1.15; margin-top: 7px; }
.english { font: italic 23px Georgia, serif; color: var(--brass); margin: 7px 0 15px; }
.base { margin: 10px 0; }
.base > span:first-child { color: var(--muted); margin-right: 8px; }
.flavors { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 13px 0 23px; list-style: none; }
.flavors li { font-size: 12px; padding: 4px 11px; color: #e8c594; border: 1px solid var(--line); }
.explanation { padding: 18px 21px; border: 1px solid var(--line); border-left: 2px solid var(--brass); background: linear-gradient(115deg, var(--wine-light), var(--wine-dark)); }
.explanation h3 { font-size: 24px; margin: 4px 0 8px; }
.explanation p + p { margin-top: 10px; }
.explanation p:not(.eyebrow) { color: #e2d1bd; overflow-wrap: anywhere; }
.source { display: inline-block; margin-top: 13px; color: var(--brass); font-size: 12px; }
footer { border-top: 1px solid var(--line); background: #151313; }
.creator-footer { padding-block: 34px 40px; }
.creator-name { font: 600 18px/1.6 var(--serif); }
.creator-invite { margin-top: 6px; color: var(--muted); font-size: 13px; }
.creator-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.creator-link {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  min-height: 80px; padding: 14px 18px; border: 1px solid var(--line);
  color: var(--brass); background: var(--wine-dark);
}
.creator-link strong { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.creator-link small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.creator-link:hover { background: var(--wine-light); border-color: var(--brass); }
.creator-feedback { grid-column: 1 / -1; min-height: 52px; flex-direction: row; align-items: center; justify-content: space-between; }
.dialog { width: min(640px, calc(100% - 26px)); max-height: calc(100% - 26px); overflow: auto; background: #231c19; color: var(--cream); border: 1px solid #a58159; padding: clamp(17px, 4vw, 30px); }
.dialog::backdrop { background: #080605d9; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-head h2 { font-size: 29px; margin-top: 4px; }
.close { min-width: 42px; min-height: 42px; border: 1px solid var(--line); background: transparent; color: var(--cream); font-size: 25px; line-height: 1; }
.dialog-note { color: var(--muted); font-size: 13px; margin: 9px 0; }
.notice-link { margin-top: 16px; }
.notice-dialog { width: min(680px, calc(100% - 26px)); }
.notice-header h1 { font: 600 clamp(24px, 5vw, 34px)/1.35 var(--serif); }
.notice-header h1:focus, #site:focus { outline: none; }
.notice-header p, .notice-copy p { color: var(--muted); margin-top: 8px; }
.notice-copy section { margin-top: 20px; }
.notice-copy h2 { font-size: 17px; line-height: 1.45; }
.notice-form { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.notice-check { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; cursor: pointer; }
.notice-check input { width: 17px; height: 17px; flex-shrink: 0; margin: 4px 0 0; padding: 0; accent-color: var(--brass); }
.notice-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.notice-actions .button { min-height: 42px; padding: 8px 13px; }
#notice-decline { background: transparent; color: var(--cream); border-color: var(--line); }
#notice-decline:hover { border-color: var(--brass); }
.notice-actions button:disabled { cursor: not-allowed; }
.menu-search-label { display: block; margin: 16px 0 6px; color: var(--brass); font-size: 13px; }
#menu-search { background: var(--wine-dark); }
.menu-list { margin: 10px 0 0; padding-left: 25px; }
.menu-list li { padding: 10px 0 10px 5px; border-top: 1px solid var(--line); }
.menu-list li::marker { color: var(--brass); }
.menu-list p { color: var(--muted); font-size: 13px; }
.menu-list a { color: var(--brass); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.collection-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 16px 0 0; }
.collection-list:empty { display: none; }
.collection-entry {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
  border: 1px solid var(--line); background: var(--wine-dark); padding: 12px 15px;
}
.collection-entry h3 { font-size: 19px; overflow-wrap: anywhere; }
.collection-entry p { color: var(--muted); font-size: 13px; }
.collection-entry-actions, .collection-backup { display: flex; flex-wrap: wrap; gap: 14px; }
.collection-entry-actions button, .collection-backup button, #save-card { min-height: 44px; }
.card-dialog { width: min(490px, calc(100% - 26px)); }
.card-themes { min-width: 0; margin-top: 10px; padding: 0; border: 0; }
.card-themes legend { margin-bottom: 5px; color: var(--muted); font-size: 13px; }
#card-theme-options { display: flex; flex-wrap: wrap; gap: 8px; }
#card-theme-options label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 5px 10px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
#card-theme-options label:has(input:checked) { border-color: var(--brass); background: var(--wine-light); }
#card-theme-options input { width: auto; padding: 0; accent-color: var(--brass); }
.card-frame { margin-top: 12px; }
.card-frame img { display: block; width: auto; height: auto; max-height: 57vh; max-width: 100%; margin-inline: auto; border: 1px solid var(--line); }
.card-dialog .button { width: 100%; }
@media (max-width: 780px) {
  .order-grid { grid-template-columns: 1fr 1.7fr; gap: 24px; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 36px); }
  .top-inner { min-height: 65px; }
  .brand { font-size: 16px; }
  .top nav { gap: 9px; }
  .nav-button { font-size: 12px; min-height: 44px; }
  .order-grid { grid-template-columns: 1fr; }
  .hero { padding-block: 30px 32px; }
  .hero h1 { font-size: clamp(38px, 10vw, 61px); margin-top: 14px; }
  .hero-description { margin: 14px 0 20px; }
  .steps { margin-bottom: 26px; }
  .steps div { gap: 5px; padding: 5px 2px; min-height: 57px; }
  .steps em { font-size: 17px; }
  .steps span { font-size: 12px; }
  .steps small { font-size: 7px; letter-spacing: .05em; }
  .order-grid, .result { padding-block: 34px; }
    .creator-footer { padding-block: 28px; }
  .creator-links { grid-template-columns: 1fr; }
  .creator-link { min-height: 64px; padding-block: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; }
}
