:root {
  --bg: #0f1113;
  --fg: #ecebe6;
  --muted: #8f8f88;
  --line: #26292c;
  --card: #171a1d;
  --accent: #d4a24c;
  --accent-dim: #8a6a33;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, #1c2024 0%, var(--bg) 55%);
  color: var(--fg);
  font: 16px/1.7 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top {
  max-width: 640px;
  margin: 0 auto;
  padding: 22px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  color: var(--muted);
  letter-spacing: .06em;
}

.logo { color: var(--accent); }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.screen { display: none; }
.screen.active { display: block; animation: fade .35s ease; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

h1 {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 1.12;
  margin: 24px 0 0;
  letter-spacing: -.02em;
  font-weight: 600;
}

.sub {
  color: var(--muted);
  margin: 20px 0 36px;
}

h2.q {
  font-size: 1.5rem;
  margin: 12px 0 6px;
  letter-spacing: -.01em;
  font-weight: 600;
}

.hint { color: var(--muted); margin: 0 0 26px; font-size: .95rem; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 12px 22px;
  transition: .18s;
}

.primary {
  background: var(--accent);
  color: #17130a;
  border-color: var(--accent);
  font-weight: 600;
}
.primary:hover:not(:disabled) { filter: brightness(1.08); }
.primary:disabled { opacity: .35; cursor: not-allowed; }

.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.ghost:hover { color: var(--fg); border-color: var(--muted); }

.linkbtn {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 8px 0;
  margin-top: 22px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.options { display: grid; gap: 10px; margin-bottom: 30px; }

.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  width: 100%;
}
.opt:hover { border-color: var(--accent-dim); }
.opt.selected { border-color: var(--accent); background: #1d1c16; }

.swatch {
  width: 34px; height: 34px;
  border-radius: 10px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.12);
}

.opt-name { font-size: .98rem; }
.opt-scene { color: var(--muted); font-size: .82rem; margin-top: 2px; }

.nav { display: flex; justify-content: space-between; gap: 12px; }

input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 14px;
  padding: 16px;
  font: inherit;
  outline: none;
  margin-bottom: 26px;
}
input:focus { border-color: var(--accent); }

/* 杯子 */
.glass {
  width: 120px; height: 150px;
  margin: 10px auto 26px;
  border-radius: 10px 10px 22px 22px;
  border: 1px solid rgba(255,255,255,.18);
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.03);
}
.glass::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 72%;
  background: var(--drink, #444);
  transition: background .5s;
}
.glass::after {
  content: "";
  position: absolute; left: 8%; right: 8%; top: 6%;
  height: 1px; background: rgba(255,255,255,.18);
}
.glass.small { width: 88px; height: 110px; margin-bottom: 30px; }

.cocktail-name {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 10px;
  letter-spacing: .02em;
}

.one-line {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 34px;
  max-width: 30ch;
}

#screen-card .primary { display: block; width: 100%; margin-bottom: 14px; }

.tiny { color: #61635f; font-size: .78rem; line-height: 1.6; }

.report-tag { color: var(--accent); font-size: .78rem; letter-spacing: .1em; margin: 0 0 6px; text-align: center; }

.report-body p { margin: 0 0 18px; }
.report-body p.pull {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  color: var(--fg);
}

.modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }

.modal-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}
.modal-box h3 { margin: 0 0 6px; font-weight: 600; }
.modal-box p { margin: 0 0 8px; color: var(--muted); }
.modal-box .primary, .modal-box .ghost { display: block; width: 100%; margin-top: 12px; }

/* 颜色：只要色块，不写名字 */
.options.swatches {
  display: block;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  justify-items: center;
  margin-bottom: 24px;
}

.chip {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: none;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,.14);
  padding: 0;
  transition: .18s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.chip:hover { transform: translateY(-2px); }
.chip.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,162,76,.28), inset 0 0 0 1px rgba(0,0,0,.25);
  transform: translateY(-2px);
}

.blend {
  grid-column: 1 / -1;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  transition: background .3s;
}
/* 色块网格 */
.chipgrid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.chipgrid .chip { max-width: none; }

/* 比例滑条 */
.ratiowrap { width: 100%; }
.ratiobar {
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  margin-bottom: 22px;
  transition: background .15s;
}
.ratioslider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--line);
  outline: none;
  margin: 0 0 14px;
}
.ratioslider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #14161a;
  cursor: pointer;
}
.ratioslider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 3px solid #14161a; cursor: pointer;
}
.ratiolabel {
  display: flex; justify-content: space-between;
  color: var(--muted); font-size: .88rem;
}

/* 简笔画选项 */
.sketchgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 14px;
}
.sketch {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 10px;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.sketch .sk { width: 46px; height: 76px; }
.sketch.small .sk { width: 56px; height: 56px; }
.sketch:hover { border-color: var(--accent-dim); color: var(--fg); }
.sketch.selected { border-color: var(--accent); color: var(--accent); background: #1d1c16; }

/* 杯身 */
.cupwrap { position: relative; display: inline-block; }
.svgbottle { width: 104px; height: 170px; color: var(--fg); opacity: .9; }
.svggarnish {
  position: absolute; top: -6px; right: -14px;
  width: 40px; height: 40px;
  color: var(--accent);
}
/* 杯子容器：去掉原来那个方框，只留简笔画 */
.glass, .glass.small {
  width: auto;
  height: auto;
  border: 0;
  background: none;
  overflow: visible;
  margin: 6px auto 24px;
  border-radius: 0;
}
.glass::before, .glass::after { display: none; }
.cupwrap { display: flex; justify-content: center; }
/* 杯子：线稿要宽一点 */
.svgbottle { width: 120px; height: 144px; }
.sketch .sk { width: 52px; height: 62px; }
/* 副色比例：两端是颜色，中间是混出来的 */
.ratiohead { display: flex; align-items: center; gap: 12px; margin: 6px 0 22px; }
.ratiohead .dot { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); flex: 0 0 auto; }
.ratiohead .tail { flex: 1; height: 14px; border-radius: 999px; border: 1px solid var(--line); }
/* 微醺时刻（深度解析） */
.deep-title {
  margin: 48px 0 6px;
  font-size: 1.15rem;
  letter-spacing: .14em;
  color: var(--accent);
  font-weight: 600;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.deep-intro { color: var(--muted); font-size: .9rem; margin: 0 0 22px; }
.deep-note {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-left: 2px solid var(--accent-dim);
  color: var(--muted);
  font-size: .95rem;
}
.advice-title {
  margin: 30px 0 8px;
  font-size: .8rem;
  letter-spacing: .16em;
  color: var(--muted);
}
.advice {
  margin: 0;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: .98rem;
}
/* 气味选项：图标在上 */
.scentgrid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.sketch.scent {
  flex-direction: column;
  gap: 6px;
  padding: 16px 10px;
  text-align: center;
}
.sketch.scent .sk.tiny { width: 34px; height: 34px; }
.sname { font-size: .92rem; color: var(--fg); }
.sscene { font-size: .76rem; color: var(--muted); line-height: 1.3; }

/* 成品那杯酒放大一点 */
.svgbottle { width: 150px; height: 195px; }
/* 装饰：用他自己的图，只改颜色 */
.sketch.scent, .sketch.garnish {
  flex-direction: column;
  gap: 8px;
  padding: 16px 10px;
}
.gimg { width: 62px; height: 46px; object-fit: contain; opacity: .9; }
.gname { font-size: .88rem; color: var(--fg); }
.sketch.selected .gimg { opacity: 1; }
.sketch.selected .gname { color: var(--accent); }

/* 杯口挂的装饰图 */
.cupg {
  position: absolute;
  left: 55%;
  top: 4%;
  width: 24%;
  height: auto;
  transform: rotate(-8deg);
  opacity: .95;
  pointer-events: none;
}
.svgbottle { width: 170px; height: 226px; }


/* 支付弹窗 */
.modal-box .price { font-size: 1.5rem; color: var(--fg); margin: 2px 0 16px; }
.modal-box .price .tiny { font-size: .76rem; color: var(--muted); }
.qrwrap { display: flex; justify-content: center; margin: 6px 0 12px; }
#pay-qr { width: 168px; height: 168px; object-fit: contain; background: #fff; border-radius: 12px; padding: 6px; }
.modal-box input {
  margin: 10px 0 4px;
  padding: 12px;
  text-align: center;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.err { color: #e0705f; }
/* 收款码：白卡片 + 投影 */
#pay-qr {
  width: 208px;
  height: 208px;
  padding: 10px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08);
  image-rendering: auto;
}
.paycap {
  text-align: center;
  color: var(--accent);
  font-size: .86rem;
  letter-spacing: .08em;
  margin: 0 0 14px;
}
/* 爱发电购买按钮 */
.buybtn {
  display: block;
  width: 100%;
  text-align: center;
  margin: 14px 0 6px;
  text-decoration: none;
}
.buybtn:hover { text-decoration: none; }
.buyhint { text-align: center; margin: 0 0 14px; }

/* 类型名 */
.typecode {
  text-align: center;
  font-size: .76rem;
  letter-spacing: .22em;
  color: var(--accent);
  margin: 10px 0 4px;
  text-transform: uppercase;
}
.typedesc {
  text-align: center;
  color: var(--muted);
  max-width: 26em;
  margin: 8px auto 16px;
  line-height: 1.9;
  font-size: .95rem;
}
