/* ============================================================
   夜雀食堂 · 抽牌版
   东方 Project 风格 UI：红白巫女 × 金箔 × 夜樱 × 符卡
   ============================================================ */

:root {
  /* 夜色 */
  --bg-0: #07040e;
  --bg-1: #120a1b;
  --bg-2: #1b0f26;
  --panel: #170d21;
  --panel-2: #24142e;

  /* 文字 */
  --ink: #f6eadd;
  --ink-dim: #b9a9b7;
  --ink-faint: rgba(185, 169, 183, .62);

  /* 东方红白 + 金 */
  --red: #e0433c;
  --red-2: #ff6a5e;
  --red-deep: #8e1f2a;
  --gold: #f5c56b;
  --gold-2: #ffe4a8;
  --gold-3: #c98f3c;
  --sakura: #ffb7c9;
  --jade: #78d8bd;
  --cyan: #86c8ff;
  --purple: #b98cff;

  --line: rgba(245, 197, 107, .17);
  --line-strong: rgba(245, 197, 107, .42);

  /* 稀有度 */
  --n: #a9b2c8;
  --r: #78b8ff;
  --sr: #c69bff;
  --ssr: #ffd06e;

  --shadow: 0 24px 60px rgba(0, 0, 0, .6);

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-kai: "STKaiti", "KaiTi", "Kaiti SC", "Noto Serif SC", "Songti SC", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 680px at 50% -12%, rgba(224, 67, 60, .18), transparent 62%),
    radial-gradient(900px 620px at 88% 8%, rgba(185, 140, 255, .12), transparent 60%),
    radial-gradient(760px 540px at 6% 82%, rgba(120, 216, 189, .08), transparent 62%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 46%, #0b0612 78%, #08040e);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 细密的麻叶纹，压在最底下 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .35;
  background-image:
    repeating-linear-gradient(45deg, rgba(245, 197, 107, .045) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(245, 197, 107, .035) 0 1px, transparent 1px 26px);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 78%);
}

::selection { background: rgba(224, 67, 60, .5); color: #fff6e6; }

/* 页面滚动条也做成夜色里的金线 */
html { scrollbar-width: thin; scrollbar-color: rgba(245, 197, 107, .28) #0a0512; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0512; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(224, 67, 60, .62), rgba(245, 197, 107, .42));
  border: 2px solid #0a0512;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 106, 94, .8), rgba(245, 197, 107, .6));
}

/* ============================================================
   幻想乡夜景
   ============================================================ */

.scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.scene-moon {
  position: fixed;
  top: 1.5vh;
  left: 50%;
  width: clamp(96px, 9.5vw, 142px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 64% 36%, rgba(150, 108, 58, .16) 0 7%, transparent 8%),
    radial-gradient(circle at 38% 58%, rgba(150, 108, 58, .12) 0 10%, transparent 11%),
    radial-gradient(circle at 28% 74%, rgba(255, 248, 220, .16) 0 5%, transparent 6%),
    radial-gradient(circle at 36% 32%, #fff8e4 0 18%, #f7dfa8 42%, #d9a95c 72%, #9c6a30 100%);
  box-shadow:
    0 0 60px rgba(255, 226, 165, .35),
    0 0 140px rgba(255, 205, 130, .16),
    inset -14px -16px 30px rgba(120, 70, 20, .35);
  opacity: .55;
}

.scene-moon::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 52%, rgba(255, 226, 165, .1) 53%, transparent 66%);
}

.scene-stars {
  position: fixed;
  inset: 0;
  opacity: .7;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 18%, rgba(255, 255, 255, .9), transparent 60%),
    radial-gradient(1px 1px at 17% 42%, rgba(255, 226, 180, .8), transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 12%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 38% 30%, rgba(255, 255, 255, .85), transparent 60%),
    radial-gradient(1.5px 1.5px at 47% 8%, rgba(255, 214, 190, .75), transparent 60%),
    radial-gradient(1px 1px at 58% 24%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 66% 6%, rgba(255, 255, 255, .9), transparent 60%),
    radial-gradient(1px 1px at 73% 38%, rgba(255, 226, 180, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 84% 16%, rgba(255, 255, 255, .8), transparent 60%),
    radial-gradient(1px 1px at 93% 46%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 12% 68%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 74%, rgba(255, 214, 220, .6), transparent 60%);
}

/* 巨大的阴阳玉剪影 */
.scene-yinyang {
  position: fixed;
  right: -8vw;
  top: 12vh;
  font-size: clamp(360px, 46vw, 760px);
  line-height: 1;
  color: rgba(245, 197, 107, .04);
  text-shadow: 0 0 80px rgba(245, 197, 107, .08);
  user-select: none;
}

/* 背后的巨大符卡魔法阵 */
.scene-circle {
  position: fixed;
  left: 50%;
  top: 42%;
  width: min(1180px, 132vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: .28;
  background:
    repeating-conic-gradient(from 0deg, rgba(245, 197, 107, .16) 0deg 1deg, transparent 1deg 15deg),
    radial-gradient(circle, transparent 0 35%, rgba(245, 197, 107, .1) 35.2% 35.6%, transparent 36% 44%, rgba(224, 67, 60, .08) 44.2% 44.5%, transparent 45%);
  -webkit-mask-image: radial-gradient(circle, #000 0 58%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0 58%, transparent 60%);
}

/* 鸟居 */
.scene-torii {
  position: fixed;
  left: -36px;
  bottom: -34px;
  width: 330px;
  height: 280px;
  opacity: .28;
  filter: drop-shadow(0 0 28px rgba(224, 67, 60, .35));
}

.scene-torii span {
  position: absolute;
  display: block;
  background: linear-gradient(180deg, #f0655a, #9c252f 55%, #6d161f);
}

.torii-top {
  left: 0;
  right: 0;
  top: 14px;
  height: 20px;
  border-radius: 10px 10px 3px 3px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .3);
}

.torii-top::before,
.torii-top::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 34px;
  height: 15px;
  background: inherit;
  border-radius: 8px 8px 0 0;
}

.torii-top::before { left: -5px; transform: rotate(-5deg); }
.torii-top::after { right: -5px; transform: rotate(5deg); }

.torii-beam {
  left: 36px;
  right: 36px;
  top: 76px;
  height: 13px;
  border-radius: 4px;
}

.torii-pillar {
  top: 60px;
  bottom: 0;
  width: 22px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #d94b40, #7c1b26 70%, #4d1019);
}

.torii-pillar.l { left: 72px; }
.torii-pillar.r { right: 72px; }

.torii-plaque {
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  padding: 3px 12px;
  background: #1a0c17 !important;
  border: 2px solid #c8453c;
  color: var(--gold) !important;
  font-family: var(--font-kai);
  font-size: 15px;
  letter-spacing: .2em;
  line-height: 1.3;
  box-shadow: 0 0 18px rgba(224, 67, 60, .4);
}

/* 灯笼 */
.lantern {
  position: fixed;
  top: 0;
  z-index: 1;
  transform-origin: 50% 0;
  animation: lantern-sway 6s ease-in-out infinite;
}

.lantern-left { left: clamp(10px, 3vw, 46px); animation-delay: -1.5s; }
.lantern-right { right: clamp(10px, 3vw, 46px); animation-delay: -3.4s; }

.lantern-cord {
  display: block;
  width: 1px;
  height: 26px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(245, 197, 107, .5), transparent);
}

.lantern-body {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 52px;
  border-radius: 50% / 42%;
  background: radial-gradient(circle at 40% 30%, #ffb07a, #e0433c 52%, #8e1f2a 100%);
  color: #3a0f14;
  font-family: var(--font-kai);
  font-size: 16px;
  font-weight: 700;
  box-shadow:
    0 0 26px rgba(255, 120, 70, .45),
    inset 0 0 14px rgba(255, 226, 170, .35);
}

.lantern-body::before,
.lantern-body::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f5c56b, #9c6a30);
}

.lantern-body::before { top: -2px; }
.lantern-body::after { bottom: -2px; }

/* 夜樱 */
.petals { position: fixed; inset: 0; overflow: hidden; }

.petal {
  position: absolute;
  top: -8vh;
  left: var(--x, 50vw);
  width: var(--size, 10px);
  height: calc(var(--size, 10px) * .72);
  border-radius: 78% 0 78% 0;
  background: linear-gradient(135deg, #ffe1e9, #ffabc4 52%, #d9648c);
  opacity: .7;
  animation: petal-fall var(--dur, 20s) linear var(--delay, 0s) infinite;
}

/* ============================================================
   布局
   ============================================================ */

.app {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 20px 152px;
}

/* ============================================================
   顶栏
   ============================================================ */

.topbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 4px 22px;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 197, 107, .55) 18%, rgba(224, 67, 60, .55) 50%, rgba(245, 197, 107, .55) 82%, transparent);
}

.topbar::after {
  content: "❖";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  padding: 0 8px;
  background: #0c0613;
  color: var(--gold);
  font-size: 10px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(245, 197, 107, .6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
  color: var(--gold);
  background: radial-gradient(circle at 32% 28%, #3c1728, #160a17 72%);
  border: 1px solid rgba(245, 197, 107, .5);
  box-shadow:
    0 0 0 4px rgba(245, 197, 107, .05),
    0 0 30px rgba(224, 67, 60, .3),
    inset 0 0 18px rgba(224, 67, 60, .15);
  animation: slow-spin 48s linear infinite;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px dashed rgba(245, 197, 107, .32);
  border-radius: 50%;
}

.brand-text { min-width: 0; }

.topbar h1 {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .12em;
  color: #fff3e2;
  text-shadow:
    0 0 26px rgba(245, 197, 107, .28),
    0 2px 0 rgba(0, 0, 0, .55);
}

.topbar h1 em {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 9px 3px;
  vertical-align: 4px;
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: #ffe9bf;
  background: linear-gradient(150deg, #d9473f, #9d2629 65%, #7d1c24);
  border: 1px solid rgba(255, 224, 170, .45);
  border-radius: 3px;
  box-shadow: 0 0 16px rgba(224, 67, 60, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
  transform: rotate(-2deg);
}

.brand-sub {
  margin: 3px 0 0;
  font-family: var(--font-serif);
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: .32em;
  color: rgba(245, 197, 107, .62);
  white-space: nowrap;
}

.topbar-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.version-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 4px;
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: .14em;
  white-space: nowrap;
  color: var(--gold-2);
  text-decoration: none;
  background: rgba(245, 197, 107, .07);
  border: 1px solid rgba(245, 197, 107, .34);
  border-radius: 999px;
  transition: color .16s, background .16s, border-color .16s, box-shadow .16s;
}

.version-link:hover {
  color: #fff4e6;
  background: rgba(224, 67, 60, .13);
  border-color: rgba(245, 197, 107, .68);
  box-shadow: 0 0 16px rgba(245, 197, 107, .12);
}

.version-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.shop-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: .24em;
  color: rgba(245, 197, 107, .78);
}

.shop-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 10px var(--jade);
  animation: pulse 2.2s ease-in-out infinite;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.stat {
  position: relative;
  min-width: 84px;
  padding: 7px 13px 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(42, 22, 44, .92), rgba(20, 11, 27, .92));
  border: 1px solid var(--line);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .55;
}

.stat .k {
  display: block;
  font-size: 9.5px;
  line-height: 1.6;
  letter-spacing: .18em;
  color: var(--ink-faint);
}

.stat b {
  display: block;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.35;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(245, 197, 107, .28);
}

.stat-rep b {
  color: var(--sakura);
  text-shadow: 0 0 16px rgba(255, 183, 201, .45);
}

/* ============================================================
   区块标题
   ============================================================ */

.zone {
  position: relative;
  margin-top: 24px;
}

.zone-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 11px;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: .12em;
  color: #efdfc9;
}

.zone-kanji {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  font-family: var(--font-kai);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #1a0b12;
  background: linear-gradient(150deg, var(--gold-2), var(--gold) 60%, var(--gold-3));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 0 14px rgba(245, 197, 107, .3);
}

.zone-glyph {
  display: block;
  width: 14px;
  height: 14px;
  overflow: visible;
}

.zone-text { font-weight: 700; letter-spacing: .16em; }

.zone-en {
  font-family: var(--font-serif);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .3em;
  color: rgba(245, 197, 107, .42);
  text-transform: uppercase;
  white-space: nowrap;
}

.zone-hint {
  margin-left: auto;
  font-family: var(--font-serif);
  font-size: 10.5px;
  letter-spacing: .02em;
  color: rgba(185, 169, 183, .72);
}

/* ============================================================
   标签
   ============================================================ */

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  line-height: 1.5;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: .02em;
}

.tag.taste   { background: rgba(255, 140, 90, .15);  border-color: rgba(255, 140, 90, .4);  color: #ffc9a8; }
.tag.cat     { background: rgba(110, 200, 255, .13); border-color: rgba(110, 200, 255, .34); color: #a8dcff; }
.tag.style   { background: rgba(200, 140, 255, .14); border-color: rgba(200, 140, 255, .36); color: #ddbcff; }
.tag.special { background: rgba(130, 230, 170, .13); border-color: rgba(130, 230, 170, .34); color: #a9ecc6; }
.tag.plain   { background: rgba(255, 255, 255, .055); border-color: var(--line); color: var(--ink-dim); }

.tag.need {
  background: linear-gradient(180deg, rgba(245, 197, 107, .2), rgba(245, 197, 107, .1));
  border-color: rgba(245, 197, 107, .55);
  color: #ffe6ad;
  font-weight: 700;
  box-shadow: inset 0 0 8px rgba(245, 197, 107, .08);
}

.tag.hate {
  background: rgba(255, 90, 120, .14);
  border-color: rgba(255, 90, 120, .44);
  color: #ffb3c0;
}

.tag.met {
  box-shadow: 0 0 0 1px rgba(120, 216, 189, .75), 0 0 12px rgba(120, 216, 189, .3);
}

.tag.done {
  background: rgba(120, 216, 189, .24);
  border-color: rgba(120, 216, 189, .6);
  color: #d3f7e4;
  font-weight: 700;
}

.tag.struck {
  text-decoration: line-through;
  opacity: .5;
}

.tag.need.struck {
  background: rgba(245, 197, 107, .12);
  border-color: rgba(245, 197, 107, .42);
  color: var(--gold);
}

.tag.hate.struck {
  background: rgba(120, 216, 189, .12);
  border-color: rgba(120, 216, 189, .42);
  color: #9ff0c6;
}

/* ============================================================
   客人
   ============================================================ */

.customer-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.customer {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 15px 15px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(165deg, rgba(55, 27, 51, .84), rgba(20, 11, 27, .96)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 14px 30px rgba(0, 0, 0, .38);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.customer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--char, var(--gold)), transparent);
  opacity: .9;
}

.customer::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -44px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .055), transparent 68%);
  pointer-events: none;
}

.customer:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 197, 107, .34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 18px 38px rgba(0, 0, 0, .5);
}

.customer.ready {
  border-color: rgba(120, 216, 189, .55);
  box-shadow:
    0 0 0 1px rgba(120, 216, 189, .18),
    0 0 32px rgba(120, 216, 189, .12),
    0 16px 36px rgba(0, 0, 0, .45);
}

.customer.ready::before {
  background: linear-gradient(90deg, transparent, var(--jade), transparent);
}

.customer.part {
  border-color: rgba(120, 216, 189, .4);
  box-shadow: inset 0 0 26px rgba(120, 216, 189, .055), 0 14px 30px rgba(0, 0, 0, .4);
}

.customer.fatal {
  border-color: rgba(224, 67, 60, .55);
  box-shadow:
    0 0 0 1px rgba(224, 67, 60, .16),
    0 0 30px rgba(224, 67, 60, .12),
    0 16px 36px rgba(0, 0, 0, .45);
}

.customer.fatal::before {
  background: linear-gradient(90deg, transparent, var(--red-2), transparent);
}

.customer.leaving { animation: leave .42s ease forwards; }

.customer.arriving { animation: arrive .5s cubic-bezier(.2, .9, .3, 1.2); }

.cust-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.cust-avatar {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  font-family: var(--font-kai);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  color: #1c0c14;
  background: radial-gradient(circle at 34% 28%, #fff2dc, var(--char, var(--gold)) 72%);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow:
    0 0 20px rgba(255, 255, 255, .08),
    inset 0 0 12px rgba(255, 255, 255, .28);
}

.cust-avatar::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .24);
  animation: slow-spin 26s linear infinite;
}

.cust-avatar::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .16);
}

.customer.ready .cust-avatar::before {
  border-color: rgba(120, 216, 189, .65);
  animation-duration: 10s;
}

.cust-id { flex: 1; min-width: 0; }

.cust-name {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .02em;
  color: #fff4e6;
  overflow-wrap: anywhere;
}

.cust-title {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: .06em;
  color: var(--ink-dim);
  opacity: .9;
}

.cust-line {
  position: relative;
  z-index: 1;
  margin-top: 11px;
  padding-left: 10px;
  min-height: 38px;
  border-left: 1px solid rgba(245, 197, 107, .28);
  font-family: var(--font-serif);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-dim);
}

.cust-row {
  position: relative;
  z-index: 1;
  margin-top: 9px;
}

.cust-row .rowkey {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-serif);
  font-size: 9.5px;
  letter-spacing: .18em;
  color: rgba(245, 197, 107, .55);
}

.cust-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cust-verdict {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  margin-top: 11px;
  padding: 7px 9px;
  min-height: 34px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-dim);
  background: rgba(0, 0, 0, .14);
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.cust-verdict.ok {
  border-style: solid;
  border-color: rgba(120, 216, 189, .45);
  background: linear-gradient(90deg, rgba(120, 216, 189, .13), rgba(120, 216, 189, .025));
  color: #bdf3de;
}

.cust-verdict.bad {
  border-color: rgba(245, 197, 107, .32);
  color: #e8d3a8;
}

.cust-verdict.fatal {
  border-style: solid;
  border-color: rgba(224, 67, 60, .5);
  background: linear-gradient(90deg, rgba(224, 67, 60, .16), rgba(224, 67, 60, .03));
  color: #ffc2c6;
}

.cust-serve {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  font: inherit;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(185, 169, 183, .72);
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(245, 197, 107, .18);
  border-radius: 6px;
  cursor: not-allowed;
  transition: transform .16s, background .18s, border-color .18s, box-shadow .18s;
}

.cust-serve.on {
  cursor: pointer;
  color: #ffe7b5;
  background: linear-gradient(135deg, #c9403a, #9b202c 58%, #7a1822);
  border-color: rgba(245, 197, 107, .52);
  box-shadow:
    0 8px 20px rgba(160, 30, 40, .32),
    inset 0 1px 0 rgba(255, 255, 255, .16);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

.cust-serve.on:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 26px rgba(190, 40, 50, .5),
    0 0 18px rgba(245, 197, 107, .12),
    inset 0 1px 0 rgba(255, 255, 255, .2);
}

.cust-serve.danger.on {
  color: #fff;
  background: linear-gradient(135deg, #ff7b86, #c22a3c 60%, #861824);
  box-shadow: 0 10px 24px rgba(210, 40, 70, .42);
}

/* ============================================================
   料理锅
   ============================================================ */

.potzone {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 15px;
  border: 1px solid rgba(245, 197, 107, .24);
  border-radius: 14px;
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(224, 67, 60, .12), transparent 55%),
    linear-gradient(180deg, rgba(36, 20, 38, .92), rgba(14, 8, 20, .96));
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, .55),
    0 10px 26px rgba(0, 0, 0, .3);
}

.potzone::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 197, 107, .55), transparent);
}

.potzone::after {
  content: "♨";
  position: absolute;
  right: 14px;
  bottom: 6px;
  font-family: serif;
  font-size: 48px;
  line-height: 1;
  color: rgba(245, 197, 107, .06);
  pointer-events: none;
  transition: color .3s;
}

.potzone.has-items {
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, .55),
    0 0 34px rgba(224, 120, 60, .14),
    0 10px 26px rgba(0, 0, 0, .35);
}

.potzone.has-items::after {
  color: rgba(245, 197, 107, .18);
  animation: steam 3.2s ease-in-out infinite;
}

.pot-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
}

.pot-head .zone-label { margin-bottom: 0; }

.pot-head .zone-hint {
  margin-left: 0;
  font-size: 11.5px;
  color: var(--gold);
}

.pot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.pot-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  min-height: 66px;
  padding: 5px;
  border: 1px dashed rgba(245, 197, 107, .14);
  border-radius: 10px;
  background: rgba(0, 0, 0, .12);
}

.pot-empty {
  padding-left: 7px;
  font-family: var(--font-serif);
  font-size: 12px;
  color: rgba(185, 169, 183, .58);
}

.pot-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(245, 197, 107, .34);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(120, 52, 44, .48), rgba(41, 20, 32, .72));
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}

.pot-item:hover {
  transform: translateY(-1px);
  border-color: var(--red-2);
  background: rgba(224, 67, 60, .16);
}

.pot-item .pi-name {
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
}

.pot-item .pi-x {
  font-size: 10px;
  color: var(--ink-faint);
}

.pot-item .pi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.pot-item.has-fx {
  border-color: rgba(245, 197, 107, .55);
  box-shadow: inset 0 0 18px rgba(245, 197, 107, .08);
}

.fx-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--gold-2);
  background: rgba(245, 197, 107, .14);
  border: 1px solid rgba(245, 197, 107, .4);
  border-radius: 3px;
}

/* ============================================================
   手牌（食材筐）
   ============================================================ */

.hand-scroll {
  position: relative;
}

.hand-row {
  display: flex;
  gap: 12px;
  min-height: 152px;
  overflow-x: auto;
  padding: 6px 4px 16px;
  cursor: grab;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 197, 107, .3) transparent;
}

.hand-row.dragging {
  cursor: grabbing;
  user-select: none;
  scroll-behavior: auto;
}

.hand-row::-webkit-scrollbar { height: 7px; }
.hand-row::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(224, 67, 60, .45), rgba(245, 197, 107, .4));
  border-radius: 999px;
}
.hand-row::-webkit-scrollbar-track { background: rgba(255, 255, 255, .03); border-radius: 999px; }

/* 两侧翻页箭头：只在有更多食材可看时出现 */
.hand-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 34px;
  height: 58px;
  padding: 0;
  font-family: Georgia, var(--font-serif);
  font-size: 25px;
  line-height: 1;
  color: var(--gold-2);
  background: linear-gradient(180deg, rgba(28, 15, 35, .96), rgba(14, 8, 20, .96));
  border: 1px solid rgba(245, 197, 107, .34);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity .18s, visibility .18s, background .18s, border-color .18s;
}

.hand-nav.prev { left: 2px; }
.hand-nav.next { right: 2px; }

.hand-scroll.can-prev .hand-nav.prev,
.hand-scroll.can-next .hand-nav.next {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hand-nav:hover {
  color: #fff4e6;
  background: linear-gradient(180deg, rgba(93, 31, 42, .96), rgba(45, 15, 27, .96));
  border-color: rgba(245, 197, 107, .65);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .5), 0 0 18px rgba(245, 197, 107, .12);
}

.hand-nav:active { transform: translateY(-50%) scale(.95); }

.hand-nav:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.hand-empty {
  align-self: center;
  padding: 22px 0;
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: rgba(185, 169, 183, .6);
}

.ing {
  position: relative;
  flex: 0 0 auto;
  width: 144px;
  min-height: 128px;
  padding: 11px 11px 10px;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background:
    linear-gradient(168deg, rgba(46, 25, 47, .96), rgba(19, 11, 26, .98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 3px);
  border: 1px solid rgba(245, 197, 107, .18);
  border-radius: 9px;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  cursor: pointer;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}

.ing::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rarity, var(--gold)), transparent);
  opacity: .9;
}

.ing::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(245, 197, 107, .1);
  background: radial-gradient(circle, rgba(245, 197, 107, .06), transparent 70%);
  pointer-events: none;
}

.ing:hover:not(:disabled) {
  transform: translateY(-5px);
  border-color: var(--rarity, var(--gold));
  box-shadow:
    0 16px 30px rgba(0, 0, 0, .5),
    0 0 20px rgba(245, 197, 107, .1);
}

.ing.selected {
  opacity: .32;
  cursor: default;
  transform: none;
  filter: grayscale(.55);
}

.ing.selected::after {
  content: "已入锅";
  inset: auto 0 0 0;
  width: auto;
  height: auto;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, .55);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-align: center;
  opacity: 1;
}

.ing.r-N   { --rarity: var(--n);   border-color: rgba(169, 178, 200, .32); }
.ing.r-R   { --rarity: var(--r);   border-color: rgba(120, 184, 255, .42); }
.ing.r-SR  { --rarity: var(--sr);  border-color: rgba(198, 155, 255, .48); box-shadow: 0 8px 18px rgba(0, 0, 0, .3), inset 0 0 20px rgba(198, 155, 255, .08); }
.ing.r-SSR { --rarity: var(--ssr); border-color: rgba(255, 208, 110, .58); box-shadow: 0 8px 18px rgba(0, 0, 0, .3), 0 0 18px rgba(255, 208, 110, .14), inset 0 0 22px rgba(255, 208, 110, .09); }

.ing.r-SSR::before { height: 3px; }

.ing.dealing {
  animation: deal-in .55s cubic-bezier(.2, .9, .3, 1.2) both;
}

.ing-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.ing-name {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff3e3;
}

.ing-rar {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 19px;
  padding: 0 4px;
  font-family: var(--font-serif);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .03em;
  color: currentColor;
  border: 1px solid currentColor;
  border-radius: 2px;
  transform: rotate(-5deg);
  opacity: .9;
}

.r-N   .ing-rar { color: var(--n); }
.r-R   .ing-rar { color: var(--r); }
.r-SR  .ing-rar { color: var(--sr); }
.r-SSR .ing-rar { color: var(--ssr); }

.ing-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.ing-cat {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: 9.5px;
  letter-spacing: .12em;
  color: rgba(185, 169, 183, .62);
}

.ing-fx {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-2);
  text-shadow: 0 0 10px rgba(245, 197, 107, .4);
}

.ing.has-fx {
  border-color: rgba(245, 197, 107, .55);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .3),
    inset 0 0 22px rgba(245, 197, 107, .09);
}

.ing.has-fx:hover:not(:disabled) {
  border-color: var(--gold-2);
  box-shadow:
    0 0 0 1px rgba(245, 197, 107, .35),
    0 16px 32px rgba(0, 0, 0, .5),
    0 0 24px rgba(245, 180, 80, .2);
}

.ing.blank {
  opacity: .7;
  border-style: dashed;
  filter: saturate(.5);
}

.ing.blank .ing-name { color: var(--ink-dim); }

/* 页脚小注 */
.colophon {
  margin: 28px 0 0;
  font-family: var(--font-serif);
  font-size: 9.5px;
  line-height: 1.8;
  letter-spacing: .26em;
  text-align: center;
  color: rgba(245, 197, 107, .32);
  user-select: none;
}

.colophon em {
  font-style: normal;
  letter-spacing: .16em;
  color: rgba(255, 183, 201, .32);
}

.disclaimer {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 9.5px;
  line-height: 1.8;
  letter-spacing: .08em;
  text-align: center;
  color: rgba(226, 207, 196, .62);
  user-select: none;
}

/* ============================================================
   底部操作
   ============================================================ */

.actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 20px 21px;
  background: linear-gradient(180deg, rgba(11, 6, 18, .15), rgba(11, 6, 18, .94) 42%, rgba(7, 4, 12, .99));
}

.actions::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 197, 107, .34), transparent);
}

.actions-ornament {
  color: rgba(245, 197, 107, .42);
  font-size: 10px;
  pointer-events: none;
  user-select: none;
}

.btn {
  position: relative;
  padding: 11px 20px;
  font: inherit;
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: #f3e5d4;
  background: linear-gradient(180deg, rgba(50, 28, 50, .92), rgba(24, 13, 31, .95));
  border: 1px solid rgba(245, 197, 107, .22);
  border-radius: 7px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 6px 16px rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: transform .14s, background .18s, border-color .18s, box-shadow .18s, color .18s;
  overflow: hidden;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  color: #fff7ea;
  border-color: rgba(245, 197, 107, .55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    0 10px 22px rgba(0, 0, 0, .4);
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: .35;
  cursor: not-allowed;
  filter: grayscale(.4);
}

.btn.primary {
  min-width: 170px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #ffe8bd;
  background: linear-gradient(135deg, #d4443c, #9b1f2c 58%, #7c1824);
  border-color: rgba(255, 218, 150, .5);
  box-shadow:
    0 10px 28px rgba(190, 40, 50, .35),
    inset 0 1px 0 rgba(255, 255, 255, .18);
}

.btn.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .22) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform .6s ease;
  pointer-events: none;
}

.btn.primary:hover:not(:disabled)::after { transform: translateX(120%); }

.btn.primary:hover:not(:disabled) {
  border-color: rgba(255, 228, 168, .8);
  box-shadow:
    0 14px 32px rgba(210, 50, 60, .45),
    0 0 22px rgba(245, 197, 107, .16),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn.gold {
  color: #2a1408;
  font-weight: 700;
  background: linear-gradient(135deg, #f7d48a, #d69a3f 60%, #b87824);
  border-color: rgba(255, 240, 200, .6);
  box-shadow:
    0 10px 26px rgba(245, 180, 80, .3),
    inset 0 1px 0 rgba(255, 255, 255, .4);
}

.btn.gold:hover:not(:disabled) {
  color: #1f0d05;
  box-shadow:
    0 14px 32px rgba(245, 180, 80, .42),
    0 0 22px rgba(245, 197, 107, .2),
    inset 0 1px 0 rgba(255, 255, 255, .5);
}

.btn.ghost {
  color: rgba(226, 207, 196, .8);
  background: transparent;
  border-color: rgba(245, 197, 107, .14);
}

/* 跳过抽牌：虚线边框，和普通操作区分开 */
.btn.skip {
  color: rgba(255, 183, 201, .88);
  background: linear-gradient(180deg, rgba(58, 30, 52, .55), rgba(24, 13, 31, .75));
  border-style: dashed;
  border-color: rgba(255, 183, 201, .32);
}

.btn.skip:hover:not(:disabled) {
  color: #ffe1ea;
  border-color: rgba(255, 183, 201, .7);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, .4),
    0 0 18px rgba(255, 183, 201, .12),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* 随机换客：青绿色，和跳过/普通操作区分 */
.btn.swap {
  color: rgba(120, 216, 189, .92);
  background: linear-gradient(180deg, rgba(24, 58, 52, .72), rgba(14, 31, 28, .88));
  border-color: rgba(120, 216, 189, .3);
}

.btn.swap:hover:not(:disabled) {
  color: #d3f7e4;
  border-color: rgba(120, 216, 189, .65);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, .42),
    0 0 18px rgba(120, 216, 189, .12),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ============================================================
   抽屉
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background:
    radial-gradient(circle at 70% 30%, rgba(224, 67, 60, .08), transparent 55%),
    rgba(6, 3, 11, .84);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.overlay.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: min(580px, 94vw);
  padding: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #1c0f26, #0e0716 72%);
  border-left: 1px solid rgba(245, 197, 107, .3);
  box-shadow:
    -30px 0 70px rgba(0, 0, 0, .7),
    inset 1px 0 0 rgba(255, 255, 255, .04);
  transform: translateX(102%);
  transition: transform .32s cubic-bezier(.3, .8, .3, 1);
}

.drawer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--red), transparent);
  opacity: .5;
}

.drawer.open { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245, 197, 107, .14);
}

.drawer-head h2 {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .14em;
  color: #fff2df;
}

.drawer-head h2::before {
  content: "〆";
  margin-right: 8px;
  vertical-align: 3px;
  font-size: 14px;
  color: var(--red);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  font: inherit;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: color .16s, border-color .16s, background .16s;
}

.icon-btn:hover {
  color: var(--gold-2);
  border-color: rgba(245, 197, 107, .5);
  background: rgba(245, 197, 107, .06);
}

/* ============================================================
   一览
   ============================================================ */

.drawer.guide {
  width: min(780px, 96vw);
  gap: 12px;
}

.guide-tabs { display: flex; gap: 8px; }

.guide-tab {
  padding: 7px 15px;
  font: inherit;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: color .16s, border-color .16s, background .16s, box-shadow .16s;
}

.guide-tab:hover {
  color: var(--gold-2);
  border-color: rgba(245, 197, 107, .45);
}

.guide-tab.on {
  color: #ffe8bd;
  background: linear-gradient(135deg, #d4443c, #8e1f2a);
  border-color: rgba(255, 220, 160, .5);
  box-shadow: 0 6px 18px rgba(180, 35, 45, .3), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.guide-tools {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.guide-search {
  padding: 9px 13px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: rgba(0, 0, 0, .34);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.guide-search::placeholder { color: rgba(185, 169, 183, .45); }
.guide-search:focus { border-color: rgba(245, 197, 107, .55); box-shadow: 0 0 18px rgba(245, 197, 107, .08); }

.guide-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-chip {
  padding: 3px 10px;
  font: inherit;
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: color .14s, border-color .14s, background .14s;
}

.guide-chip:hover { color: var(--ink); border-color: rgba(245, 197, 107, .35); }

.guide-chip.on {
  color: var(--gold-2);
  border-color: rgba(245, 197, 107, .55);
  background: rgba(245, 197, 107, .12);
  box-shadow: inset 0 0 10px rgba(245, 197, 107, .06);
}

.guide-list {
  flex: 1;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 197, 107, .28) transparent;
}

.guide-card {
  position: relative;
  padding: 12px 14px;
  background: linear-gradient(165deg, rgba(39, 22, 42, .85), rgba(17, 9, 24, .9));
  border: 1px solid rgba(245, 197, 107, .13);
  border-radius: 7px;
  transition: border-color .16s, background .16s;
}

.guide-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 14%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--char, var(--gold)), transparent);
  opacity: .5;
}

.guide-card:hover {
  border-color: rgba(245, 197, 107, .3);
  background: linear-gradient(165deg, rgba(46, 26, 48, .9), rgba(19, 10, 27, .92));
}

.guide-card.has-fx {
  border-color: rgba(245, 197, 107, .4);
  background: linear-gradient(165deg, rgba(58, 36, 40, .8), rgba(21, 11, 25, .92));
}

.gc-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.gc-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  font-family: var(--font-kai);
  font-size: 15px;
  font-weight: 700;
  color: #1b0c13;
  background: radial-gradient(circle at 35% 30%, #fff2dc, var(--char, var(--gold)) 72%);
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 0 0 14px rgba(255, 255, 255, .07);
}

.gc-name {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: #fff3e4;
}

.gc-title {
  font-family: var(--font-serif);
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--ink-dim);
  opacity: .85;
}

.gc-meta {
  padding: 2px 8px;
  font-family: var(--font-serif);
  font-size: 10px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.gc-meta.rar-N   { color: var(--n); }
.gc-meta.rar-R   { color: var(--r); }
.gc-meta.rar-SR  { color: var(--sr); }
.gc-meta.rar-SSR { color: var(--ssr); border-color: rgba(255, 208, 110, .5); }

.gc-line {
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-dim);
}

.gc-desc {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-dim);
}

.gc-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 7px;
}

.gc-key {
  flex: none;
  width: 50px;
  padding-top: 3px;
  font-family: var(--font-serif);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--ink-faint);
  text-align: right;
}

.gc-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.gc-fx {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold-2);
}

.guide-empty {
  padding: 34px 10px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink-dim);
  text-align: center;
}

.guide-foot {
  font-family: var(--font-serif);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--ink-dim);
}

/* ============================================================
   弹窗
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(224, 67, 60, .12), transparent 55%),
    rgba(5, 2, 9, .9);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.modal.show { opacity: 1; pointer-events: auto; }

.modal-box {
  position: relative;
  width: min(470px, 100%);
  max-height: 88vh;
  padding: 26px 26px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  text-align: center;
  background: linear-gradient(170deg, #29162e, #120a1b 72%);
  border: 1px solid rgba(245, 197, 107, .35);
  border-radius: 10px;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .7),
    inset 0 0 0 1px rgba(255, 255, 255, .035),
    0 0 50px rgba(224, 67, 60, .1);
  transform: translateY(14px) scale(.97);
  transition: transform .32s cubic-bezier(.2, .9, .3, 1.2);
}

.modal-box::before {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(245, 197, 107, .16) 0deg 1deg, transparent 1deg 12deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 45%, #000 46% 47%, transparent 48%);
  mask-image: radial-gradient(circle, transparent 0 45%, #000 46% 47%, transparent 48%);
  opacity: .5;
  pointer-events: none;
}

.modal-box > * { position: relative; z-index: 1; }

.modal.show .modal-box { transform: none; }

.grade {
  font-family: var(--font-kai);
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  background: linear-gradient(160deg, #fff6de, var(--gold) 55%, #c06a2f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(245, 197, 107, .5));
}

.grade-S {
  background: linear-gradient(160deg, #fff8e6, #ffd06e 50%, #e08a2f);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(255, 208, 110, .75));
}

.grade-A {
  background: linear-gradient(160deg, #eafaff, #86c8ff 60%, #3a7fc4);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(134, 200, 255, .45));
}

.grade-D {
  background: linear-gradient(160deg, #cdc6d6, #6f677e);
  -webkit-background-clip: text;
  background-clip: text;
  filter: none;
}

.grade-text {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--ink-dim);
}

.result-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 2px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-dim);
  border-bottom: 1px dashed rgba(245, 197, 107, .16);
}

.result-line b {
  color: var(--gold-2);
  font-family: var(--font-serif);
  font-variant-numeric: tabular-nums;
}

.roster { margin-top: 14px; text-align: left; }

.roster-title {
  margin-bottom: 7px;
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-faint);
}

.roster-list { display: flex; flex-wrap: wrap; gap: 6px; }

.roster-chip {
  padding: 3px 9px;
  font-family: var(--font-serif);
  font-size: 11px;
  color: #ffe4a8;
  background: rgba(245, 197, 107, .1);
  border: 1px solid rgba(245, 197, 107, .3);
  border-radius: 3px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.modal-actions .btn { flex: 1; min-width: 0; }

/* 特殊牌事件弹窗 */
.modal.evt { z-index: 80; }

.evt-box {
  border-color: rgba(224, 67, 60, .6);
  background:
    radial-gradient(circle at 50% 0%, rgba(224, 67, 60, .3), transparent 55%),
    linear-gradient(170deg, #3a1420, #140810 72%);
  box-shadow:
    0 0 70px rgba(224, 40, 60, .3),
    0 30px 70px rgba(0, 0, 0, .7);
}

.evt-box::before {
  background: repeating-conic-gradient(from 0deg, rgba(224, 67, 60, .22) 0deg 1deg, transparent 1deg 10deg);
}

.evt-art {
  font-size: 56px;
  line-height: 1;
  animation: flare 1.6s ease-in-out infinite;
}

.evt-name {
  margin-top: 10px;
  font-family: var(--font-kai);
  font-size: 27px;
  font-weight: 750;
  letter-spacing: .08em;
  background: linear-gradient(160deg, #fff0d8, #ff5a78);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.evt-sub {
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--ink-dim);
}

.evt-desc {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.75;
  color: #f3d9d0;
  text-align: left;
}

.evt-list {
  margin-top: 14px;
  padding-top: 12px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-dim);
  text-align: left;
  border-top: 1px dashed rgba(245, 197, 107, .16);
}

.evt-list b { color: var(--red-2); font-variant-numeric: tabular-nums; }
.evt-list .safe { color: var(--jade); }

.btn.danger {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #ff8a9a, #d32b4a 55%, #a01d33);
  border-color: rgba(255, 190, 200, .45);
  box-shadow: 0 10px 26px rgba(210, 40, 70, .42), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.btn.danger:hover:not(:disabled) {
  box-shadow: 0 13px 32px rgba(210, 40, 70, .6), 0 0 20px rgba(255, 80, 100, .18);
}

/* ============================================================
   答题抽卡弹窗
   ============================================================ */

.modal.quiz { z-index: 78; }

.quiz-box {
  width: min(560px, 100%);
  padding: 24px 26px 22px;
  text-align: left;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 197, 107, .1), transparent 52%),
    linear-gradient(170deg, #2b1729, #120a1b 72%);
  border-color: rgba(245, 197, 107, .42);
}

.quiz-box::before {
  background: repeating-conic-gradient(from 0deg, rgba(224, 67, 60, .18) 0deg 1deg, transparent 1deg 12deg);
  opacity: .42;
}

.quiz-kicker {
  font-family: var(--font-serif);
  font-size: 9px;
  letter-spacing: .28em;
  color: var(--gold);
  text-align: center;
  text-transform: uppercase;
}

.quiz-sigil {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 11px auto 7px;
  border-radius: 50%;
  font-family: var(--font-kai);
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  color: #1c0c14;
  background: radial-gradient(circle at 34% 28%, #fff2dc, var(--gold) 72%);
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow:
    0 0 26px rgba(245, 197, 107, .38),
    inset 0 0 12px rgba(255, 255, 255, .3);
}

.quiz-sigil::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(245, 197, 107, .55);
}

.quiz-title {
  margin: 6px 0 1px;
  font-family: var(--font-kai);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .08em;
  color: #fff2df;
  text-align: center;
}

.quiz-sub {
  font-family: var(--font-serif);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .12em;
  color: var(--ink-dim);
  text-align: center;
}

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(245, 197, 107, .18);
  font-family: var(--font-serif);
  font-size: 9.5px;
  letter-spacing: .1em;
  color: var(--ink-faint);
}

.quiz-meta b { color: var(--gold-2); font-weight: 700; }

.quiz-question {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 2px solid var(--gold);
  border-radius: 0 6px 6px 0;
  background: rgba(0, 0, 0, .17);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  color: #fff4e6;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 11px;
}

.quiz-opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.55;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: transform .14s, background .16s, border-color .16s, box-shadow .16s;
}

.quiz-opt:hover:not(:disabled) {
  transform: translateX(2px);
  background: rgba(245, 197, 107, .075);
  border-color: rgba(245, 197, 107, .55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}

.quiz-opt:disabled {
  cursor: default;
  opacity: .92;
}

.quiz-opt .q-letter {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-2);
  background: rgba(245, 197, 107, .1);
  border: 1px solid rgba(245, 197, 107, .3);
}

.quiz-opt .q-text { flex: 1; min-width: 0; }

.quiz-opt.correct {
  border-color: rgba(120, 216, 189, .7);
  background: rgba(120, 216, 189, .12);
  box-shadow: inset 0 0 18px rgba(120, 216, 189, .06);
}

.quiz-opt.correct .q-letter {
  color: #d3f7e4;
  background: rgba(120, 216, 189, .2);
  border-color: rgba(120, 216, 189, .6);
}

.quiz-opt.wrong {
  border-color: rgba(224, 67, 60, .7);
  background: rgba(224, 67, 60, .12);
}

.quiz-opt.wrong .q-letter {
  color: #ffd0d4;
  background: rgba(224, 67, 60, .2);
  border-color: rgba(224, 67, 60, .6);
}

.quiz-feedback {
  display: none;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.7;
}

.quiz-feedback.show { display: block; }
.quiz-feedback.ok {
  color: #c7f5e3;
  background: linear-gradient(90deg, rgba(120, 216, 189, .11), rgba(120, 216, 189, .02));
  border: 1px solid rgba(120, 216, 189, .4);
}
.quiz-feedback.bad {
  color: #ffc2c6;
  background: linear-gradient(90deg, rgba(224, 67, 60, .13), rgba(224, 67, 60, .02));
  border: 1px solid rgba(224, 67, 60, .42);
}
.quiz-feedback b { color: var(--gold-2); }
.quiz-feedback .quiz-answer { margin-top: 3px; color: var(--ink); }

.quiz-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.quiz-actions .btn { flex: 1; min-width: 0; }

.quiz-note {
  margin-top: 11px;
  font-family: var(--font-serif);
  font-size: 9.5px;
  line-height: 1.6;
  letter-spacing: .08em;
  color: rgba(185, 169, 183, .58);
  text-align: center;
}

.quiz-error {
  margin-top: 16px;
  padding: 14px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #ffc2c6;
  background: rgba(224, 67, 60, .1);
  border: 1px solid rgba(224, 67, 60, .4);
  border-radius: 6px;
}

.quiz-error code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px;
  color: var(--gold-2);
}

/* ============================================================
   toast / 浮动评价
   ============================================================ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 45;
  max-width: min(560px, calc(100vw - 24px));
  padding: 10px 20px;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(44, 23, 45, .98), rgba(24, 12, 30, .98));
  border: 1px solid rgba(245, 197, 107, .4);
  border-radius: 5px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, .55),
    0 0 24px rgba(224, 67, 60, .12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s, transform .2s;
}

.toast::before {
  content: "❖";
  margin-right: 9px;
  font-size: 8px;
  color: var(--gold);
  vertical-align: 2px;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.float {
  position: fixed;
  z-index: 65;
  transform: translate(-50%, -50%);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
  pointer-events: none;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, .85),
    0 0 18px currentColor;
  animation: floatUp 1s ease forwards;
}

/* ============================================================
   动画
   ============================================================ */

@keyframes slow-spin { to { transform: rotate(360deg); } }

@keyframes twinkle {
  from { opacity: .45; }
  to   { opacity: .8; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.78); }
}

@keyframes lantern-sway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

@keyframes petal-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }
  8% { opacity: .75; }
  50% {
    opacity: .6;
    transform: translate3d(calc(var(--drift, 40px) * .6), 50vh, 0) rotate(360deg);
  }
  92% { opacity: .45; }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 40px), 112vh, 0) rotate(720deg);
  }
}

@keyframes steam {
  0%, 100% { transform: translateY(0) scale(1); opacity: .55; }
  50%      { transform: translateY(-5px) scale(1.08); opacity: 1; }
}

@keyframes deal-in {
  from { opacity: 0; transform: translateY(24px) rotate(4deg) scale(.9); }
  to   { opacity: 1; transform: none; }
}

@keyframes leave {
  to { opacity: 0; transform: translateY(-14px) scale(.94); }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(14px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

@keyframes flare {
  0%, 100% {
    transform: scale(1);
    opacity: .88;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes floatUp {
  to { opacity: 0; transform: translate(-50%, -130%) scale(1.15); }
}

/* ============================================================
   低负载保护
   弹窗打开或页面切到后台时，暂停背景动画，避免持续占用 GPU。
   ============================================================ */

body.modal-open .petals { display: none; }

body.modal-open .scene *,
body.modal-open .app * {
  animation-play-state: paused !important;
}

body.page-hidden * {
  animation-play-state: paused !important;
}

body.page-hidden .petals { display: none; }

/* 极简模式：index.html?safe=1 */
body.safe-mode .scene,
body.safe-mode .petals { display: none; }

body.safe-mode .modal-box::before { display: none; }

body.safe-mode *,
body.safe-mode *::before,
body.safe-mode *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1100px) {
  .scene-torii { opacity: .18; left: -70px; }
  .lantern-left { left: 8px; }
  .lantern-right { right: 8px; }
}

@media (max-width: 980px) {
  .customer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { align-items: flex-start; }
  .topbar-side { align-items: flex-start; }
  .stats { justify-content: flex-start; }
  .scene-moon { display: none; }
}

@media (max-width: 820px) {
  .topbar { gap: 14px; }
  .brand-sub { letter-spacing: .22em; }
  .zone-hint { flex-basis: 100%; margin-left: 0; padding-left: 31px; }
  .pot-head .zone-hint { padding-left: 0; }
}

@media (max-width: 620px) {
  .app { padding: 14px 12px 188px; }

  .topbar { padding: 12px 2px 18px; }
  .topbar h1 { font-size: 25px; letter-spacing: .08em; }
  .brand-mark { width: 46px; height: 46px; font-size: 25px; }
  .brand-sub { font-size: 8.5px; }
  .topbar-side { width: 100%; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 0; }
  .stat b { font-size: 16px; }

  .customer-row { grid-template-columns: 1fr; gap: 11px; }
  .zone-en { display: none; }
  .zone-label { font-size: 12px; }
  .zone-hint { padding-left: 0; font-size: 10px; }

  .pot-head { gap: 8px; }
  .pot-tags { justify-content: flex-start; }

  .ing { width: 134px; }
  .hand-nav { width: 30px; height: 50px; font-size: 21px; }

  .actions { gap: 7px; padding: 12px 10px 16px; }
  .actions-ornament { display: none; }
  .btn { padding: 10px 13px; font-size: 12.5px; }
  .btn.primary { min-width: 132px; }

  .toast { bottom: 176px; font-size: 12px; }

  .drawer {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    bottom: auto;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  }

  .drawer.guide {
    width: 100vw;
    gap: 10px;
  }

  .drawer-head { padding-bottom: 8px; }
  .drawer-head h2 { font-size: 20px; }

  .icon-btn {
    width: 42px;
    height: 42px;
    font-size: 18px;
    border-radius: 9px;
  }

  .guide-tabs { gap: 6px; }

  .guide-tab {
    flex: 1;
    min-height: 42px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .guide-tools { gap: 7px; }

  .guide-search {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;
  }

  .guide-filter {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 2px 0 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .guide-filter::-webkit-scrollbar { display: none; }

  .guide-chip {
    flex: none;
    min-height: 38px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .guide-tab,
  .guide-chip,
  .icon-btn { touch-action: manipulation; }

  .guide-list {
    min-height: 0;
    gap: 8px;
    padding-right: 0;
    padding-bottom: 4px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .guide-card { padding: 11px 12px; }
  .gc-title { font-size: 10px; }
  .guide-foot { font-size: 11px; }

  .modal-box { padding: 22px 18px 20px; }
  .grade { font-size: 66px; }

  .lantern { display: none; }
  .scene-torii { opacity: .14; }
}

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

  .petals { display: none; }
}
