:root {
  --bg: #0e0b14;
  --bg2: #17121f;
  --panel: #1d1726;
  --panel-edge: #4a3a26;
  --gold: #e6b35a;
  --gold-soft: #f3d9a1;
  --text: #ece4d6;
  --muted: #a99c88;
  --alliance: #3f6fd8;
  --horde: #c53a2c;
  --accent: var(--gold);
  --radius: 14px;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --display: "Cinzel", "Noto Serif TC", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, #2a1f3a 0%, transparent 60%),
    radial-gradient(800px 500px at 100% 100%, #2a160f 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.7;
}

#app { max-width: 720px; margin: 0 auto; padding: 24px 16px 32px; }

.screen { display: none; animation: rise .45s ease both; }
.screen.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.panel {
  background: linear-gradient(180deg, #221a2c, var(--panel));
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px #00000060, 0 20px 50px -20px #000, inset 0 1px 0 #ffffff10;
  overflow: hidden;
}

/* ---------- 首頁 ---------- */
.intro-banner {
  height: 200px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
  border: 1px solid var(--panel-edge); border-bottom: 0;
}
.intro-banner svg, .scene svg { width: 100%; height: 100%; display: block; }
.intro-panel { border-top-left-radius: 0; border-top-right-radius: 0; padding: 28px 24px 30px; text-align: center; }
.eyebrow { font-family: var(--display); letter-spacing: .3em; font-size: 12px; color: var(--gold); margin: 0 0 8px; }
h1 {
  font-family: var(--display); font-weight: 800; margin: 0 0 14px;
  font-size: clamp(34px, 8vw, 48px); line-height: 1.15;
  background: linear-gradient(180deg, #fff4d6, var(--gold) 70%, #a8762e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 span { font-family: var(--serif); font-weight: 900; font-size: .62em; letter-spacing: .12em; }
.lead { color: var(--muted); margin: 0 0 18px; }
.intro-meta { list-style: none; padding: 0; margin: 0 0 24px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.intro-meta li { border: 1px solid #ffffff1c; border-radius: 99px; padding: 4px 14px; font-size: 14px; color: var(--muted); }
.intro-meta b { color: var(--gold-soft); }

/* ---------- 按鈕 ---------- */
.btn {
  display: block; width: 100%; margin: 10px 0 0; padding: 14px 18px;
  font: 600 16px/1.3 var(--serif); color: var(--text); letter-spacing: .05em;
  background: #ffffff0c; border: 1px solid #ffffff26; border-radius: 10px; cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { background: #ffffff16; border-color: #ffffff40; }
.btn:active { transform: scale(.98); }
.btn.primary {
  background: linear-gradient(180deg, #c8402c, #8e1f16); border-color: #e6b35a;
  color: #fff6e3; box-shadow: inset 0 1px 0 #ffffff40, 0 6px 20px -8px #c8402c;
}
.btn.primary:hover { background: linear-gradient(180deg, #d84a34, #9e271c); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--gold-soft); }
.btn.small { width: auto; margin: 0; padding: 8px 14px; font-size: 14px; }
.btn:focus-visible, .opt:focus-visible, .back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- 題目 ---------- */
.progress {
  position: sticky; top: 0; z-index: 5; margin: -24px -16px 14px; padding: 14px 16px 12px;
  background: linear-gradient(180deg, var(--bg) 75%, #0e0b1400);
}
.progress-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.progress-text { flex: 1; min-width: 0; }
.counter { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.counter b { font: 800 24px var(--display); color: var(--gold); }
.counter span { color: var(--muted); font-size: 14px; font-weight: 400; }
.remain { margin: 0; font-size: 13px; color: var(--muted); }
.dim-tag { flex: none; font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid #e6b35a66; color: var(--gold-soft); }
.steps { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; }
.step {
  height: 8px; padding: 0; border: 0; border-radius: 3px; background: #ffffff14; cursor: pointer;
  transition: background .2s, transform .2s;
}
.step:disabled { cursor: default; }
.step.done { background: linear-gradient(90deg, #a8762e, var(--gold)); }
.step.current { background: var(--gold-soft); transform: scaleY(1.6); box-shadow: 0 0 8px #e6b35a; }
.step:nth-child(5n):not(:last-child) { margin-right: 3px; }
.q-card { position: relative; }
.scene-no {
  position: absolute; top: 12px; left: 14px; font: 800 13px var(--display); letter-spacing: .1em;
  padding: 2px 10px; border-radius: 99px; background: #000a; color: var(--gold-soft); border: 1px solid #e6b35a66;
}
.scene-no::before { content: "SCENE "; opacity: .7; }
.back {
  width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid #ffffff26;
  background: transparent; color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}
.back:disabled { opacity: .3; cursor: default; }

.scene { height: 180px; position: relative; background: #000; }
.scene img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60px; background: linear-gradient(transparent, #221a2c); }
.q-body { padding: 4px 22px 24px; }
.place { margin: 0; font-size: 13px; color: var(--gold); letter-spacing: .08em; }
.q-body h2 { margin: 2px 0 10px; font-size: 24px; font-weight: 900; color: var(--gold-soft); }
.story { margin: 0 0 12px; }
.lore { margin: 0 0 18px; font-size: 14px; color: var(--muted); border-left: 2px solid #e6b35a55; padding-left: 12px; }
.lore summary { cursor: pointer; color: var(--gold); list-style: none; }
.lore summary::-webkit-details-marker { display: none; }
.lore summary::before { content: "📜 "; }
.lore p { margin: 6px 0 0; }
.q { font-weight: 600; margin: 0 0 12px; font-size: 17px; }

.options { display: grid; gap: 10px; }
.opt {
  text-align: left; padding: 14px 16px; border-radius: 10px; cursor: pointer;
  font: 400 16px/1.55 var(--serif); color: var(--text);
  background: #ffffff08; border: 1px solid #ffffff22;
  transition: background .2s, border-color .2s, transform .15s;
  display: flex; gap: 12px; align-items: flex-start;
}
.opt .key {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 800 13px var(--display); color: var(--gold); border: 1px solid #e6b35a80;
}
.opt:hover { background: #e6b35a14; border-color: #e6b35a90; }
.opt.chosen { background: #e6b35a26; border-color: var(--gold); }
.opt:active { transform: scale(.99); }

/* ---------- 結果 ---------- */
.result-card { --c: var(--gold); }
.r-hero {
  position: relative; padding: 30px 22px 24px; text-align: center;
  background: radial-gradient(500px 220px at 50% 0%, color-mix(in srgb, var(--c) 35%, transparent), transparent 70%);
  border-bottom: 1px solid #ffffff14;
}
.r-type { font: 800 clamp(48px, 14vw, 72px)/1 var(--display); letter-spacing: .08em; color: var(--c); text-shadow: 0 0 30px color-mix(in srgb, var(--c) 50%, transparent); margin: 0; }
.r-nick { margin: 8px 0 14px; color: var(--muted); letter-spacing: .1em; }
.r-combo { font-size: clamp(28px, 7vw, 36px); font-weight: 900; margin: 0; }
.r-combo .cls { color: var(--c); }
.badges { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.badge { font-size: 13px; padding: 3px 12px; border-radius: 99px; border: 1px solid #ffffff2a; color: var(--muted); }
.badge.alliance { border-color: var(--alliance); color: #9db8ff; }
.badge.horde { border-color: var(--horde); color: #ff9a8c; }
.badge.new { border-color: var(--gold); color: var(--gold-soft); }

.r-body { padding: 22px; }
.r-body h3 { font-size: 14px; letter-spacing: .15em; color: var(--gold); margin: 22px 0 10px; font-weight: 600; }
.r-body h3:first-child { margin-top: 0; }
.r-body p { margin: 0; }
.dims { display: grid; gap: 12px; }
.dim-row { display: grid; grid-template-columns: 1fr; gap: 4px; font-size: 13px; }
.dim-labels { display: flex; justify-content: space-between; color: var(--muted); }
.dim-labels b { color: var(--text); }
.dim-labels .win { color: var(--c); }
.dim-bar { height: 8px; background: #ffffff12; border-radius: 99px; position: relative; overflow: hidden; }
.dim-bar i { position: absolute; top: 0; bottom: 0; background: var(--c); border-radius: 99px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 12px; border-radius: 8px; background: #ffffff0d; border: 1px solid #ffffff1a; font-size: 14px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info { background: #ffffff08; border: 1px solid #ffffff14; border-radius: 10px; padding: 10px 12px; }
.info small { display: block; color: var(--muted); font-size: 12px; }
.partner { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: #ffffff08; border: 1px solid #ffffff14; cursor: pointer; width: 100%; color: inherit; font: inherit; text-align: left; }
.partner:hover { border-color: #ffffff40; }
.partner .pt { font: 800 20px var(--display); }

.partner .why-icon { width: 40px; height: 40px; }

/* 種族 / 職業圖示 */
.emblems { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 4px 0 16px; }
.emblem { margin: 0; text-align: center; }
.emblem .ring {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 6px;
  background: radial-gradient(circle at 50% 35%, #ffffff14, #00000055);
  border: 2px solid currentColor; box-shadow: 0 0 0 4px #00000066, 0 0 24px -4px currentColor, inset 0 0 18px #00000088;
}
.emblem .ring svg { width: 52px; height: 52px; }
.emblem figcaption { font-weight: 900; font-size: 16px; color: var(--text); }
.emblem figcaption small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: .2em; }
.emblem.cls { color: var(--c); }
.emblem.alliance { color: #7fa2ff; }
.emblem.horde { color: #ff6f5e; }
.plus { font-size: 22px; color: var(--muted); margin-top: -26px; }
.why { display: grid; gap: 12px; }
.why-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; background: #ffffff08; border: 1px solid #ffffff14; }
.why-row b { display: block; margin-bottom: 2px; }
.why-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; background: #00000040; }
.why-icon svg { width: 26px; height: 26px; }
.why-icon.cls { color: var(--c); }
.why-icon.alliance { color: #7fa2ff; }
.why-icon.horde { color: #ff6f5e; }
.cell-top { display: flex; justify-content: space-between; align-items: center; }
.cell .ci { width: 26px; height: 26px; color: var(--c); opacity: .9; }
.cell .ci svg { width: 100%; height: 100%; }

.actions { margin-top: 14px; }
.toast { text-align: center; color: var(--gold-soft); min-height: 1.5em; margin: 10px 0 0; font-size: 14px; }

/* ---------- 圖鑑 ---------- */
.gallery-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.gallery-head h2 { margin: 0; font-size: 22px; color: var(--gold-soft); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cell {
  --c: var(--gold);
  text-align: left; padding: 14px; border-radius: 12px; cursor: pointer; color: var(--text); font: inherit;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, #1d1726), #1d1726 70%);
  border: 1px solid color-mix(in srgb, var(--c) 40%, #3a2f22);
  transition: transform .15s, border-color .2s;
}
.cell:hover { transform: translateY(-2px); border-color: var(--c); }
.cell .ct { font: 800 20px var(--display); color: var(--c); letter-spacing: .05em; }
.cell .cc { font-weight: 600; margin-top: 2px; }
.cell .cn { font-size: 13px; color: var(--muted); }
.cell .cf { font-size: 12px; margin-top: 6px; }
.cell .cf.alliance { color: #9db8ff; } .cell .cf.horde { color: #ff9a8c; }

footer { max-width: 720px; margin: 0 auto; padding: 0 16px 28px; text-align: center; font-size: 12px; color: #6f6556; }

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scene { height: 220px; }
  .q-body { padding: 4px 30px 30px; }
  .r-body { padding: 26px 30px 30px; }
}
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } * { transition: none !important; } }

/* ---------- 作者 ---------- */
.author {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px; margin-bottom: 14px; text-align: left;
  border: 1px solid var(--panel-edge); border-radius: var(--radius);
  background: linear-gradient(180deg, #221a2c, var(--panel));
}
.author-avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font: 800 22px var(--display); color: var(--bg); background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}
.author-info { flex: 1; min-width: 140px; line-height: 1.4; }
.author-info small { display: block; font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.author-info b { display: block; font-size: 17px; color: var(--text); }
.author-info span { font-size: 13px; color: var(--muted); }
.author-links { display: flex; gap: 8px; flex-wrap: wrap; }
.author-links a {
  font-size: 13px; padding: 5px 12px; border-radius: 99px; text-decoration: none;
  color: var(--gold-soft); border: 1px solid #e6b35a55; transition: background .2s;
}
.author-links a:hover { background: #e6b35a1f; }
.disclaimer { margin: 0; line-height: 1.6; }

/* ---------- 種族頭像 ---------- */
img.portrait { display: block; width: 100%; height: 100%; object-fit: cover; }
.emblem.race .ring {
  border-radius: 12px; overflow: hidden; padding: 0;
  border: 3px solid #c9a35a; box-shadow: 0 0 0 2px #3a2a14, 0 0 0 4px currentColor, 0 0 24px -2px currentColor;
}
.why-icon { overflow: hidden; }
.why-icon img.portrait { border-radius: 50%; }
.cell-icons { display: flex; gap: 6px; align-items: center; }
.cell .cp { width: 30px; height: 30px; border-radius: 6px; overflow: hidden; border: 1px solid #c9a35a; flex: none; }
.cell .cp.alliance { box-shadow: 0 0 0 1px #3f6fd8; } .cell .cp.horde { box-shadow: 0 0 0 1px #c53a2c; }

/* ---------- 結果頁 v3 ---------- */
.r-hero .eyebrow { margin-bottom: 14px; }
.r-mbti { margin-top: 18px; display: flex; justify-content: center; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.r-mbti .r-type { font: 800 40px/1 var(--display); letter-spacing: .06em; color: var(--gold); text-shadow: none; }
.r-mbti .r-nick { margin: 0; color: var(--gold-soft); font-weight: 600; letter-spacing: .05em; }
.r-shadow { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.r-shadow b { color: var(--text); }
.muted { color: var(--muted); }
.why-row .muted { margin: 0 0 6px; font-size: 14px; }
.why-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.why-lines li { display: flex; gap: 8px; align-items: flex-start; }
.why-lines .pole {
  flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 6px; display: grid; place-items: center;
  font: 800 12px var(--display); color: var(--bg); background: var(--c);
}
.why-row + h3 { margin-top: 18px; }
.note { margin: 14px 0 0 !important; padding: 12px 14px; border-radius: 10px; font-size: 14px; background: #e6b35a12; border: 1px dashed #e6b35a55; }
.note b { color: var(--gold-soft); }
.rank { display: grid; gap: 8px; }
.rank-row {
  display: grid; grid-template-columns: 18px 36px auto 1fr 40px; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; background: #ffffff06; border: 1px solid #ffffff10;
}
.rank-row.chosen { border-color: color-mix(in srgb, var(--rc) 60%, transparent); background: color-mix(in srgb, var(--rc) 10%, transparent); }
.rank-no { font: 800 14px var(--display); color: var(--muted); text-align: center; }
.rank-icon { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; border: 1px solid currentColor; }
.rank-icon.cls { border-radius: 50%; color: var(--rc); }
.rank-icon.alliance { color: #7fa2ff; } .rank-icon.horde { color: #ff6f5e; } .rank-icon.both { color: #b9a2f0; }
.rank-icon svg { width: 22px; height: 22px; }
.rank-name { font-weight: 600; white-space: nowrap; }
.rank-name em { font-style: normal; font-size: 11px; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--rc); color: var(--bg); vertical-align: 2px; }
.rank-bar { height: 6px; border-radius: 99px; background: #ffffff12; overflow: hidden; min-width: 40px; }
.rank-bar i { display: block; height: 100%; background: var(--rc); border-radius: 99px; }
.rank-pct { font: 600 13px var(--display); color: var(--muted); text-align: right; }
.dim-strength { font-size: 12px; color: var(--muted); }
.dim-strength b { color: var(--c); }
.info.wide { grid-column: 1 / -1; }
.emblem.both, .why-icon.both, .badge.both { color: #b9a2f0; }
.badge.both { border-color: #8a6fd8; }
.cell .cp.both { box-shadow: 0 0 0 1px #8a6fd8; }

/* ---------- 分享視窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: #000c; backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-box { width: min(440px, 100%); max-height: 100%; overflow: auto; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-edge); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--gold-soft); }
.modal-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ffffff26; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; }
.share-preview { min-height: 200px; display: grid; place-items: center; border-radius: 10px; overflow: hidden; background: #0007; }
.share-preview img { width: 100%; display: block; }
.share-hint { text-align: center; font-size: 13px; margin: 8px 0 0; }
a.btn { text-align: center; text-decoration: none; }

/* 職業圖示圖片 */
img.class-img { border-radius: 50%; }
.emblem.cls .ring { padding: 0; overflow: hidden; border: 3px solid #c9a35a; box-shadow: 0 0 0 2px #3a2a14, 0 0 0 4px currentColor, 0 0 24px -2px currentColor; }
.why-icon.cls, .rank-icon.cls { overflow: hidden; }
.cell .ci { border-radius: 50%; overflow: hidden; border: 1px solid #c9a35a; }
img.author-avatar { width: 56px; height: 56px; padding: 0; object-fit: cover; background: none; border: 2px solid var(--gold); box-shadow: 0 0 0 3px #00000088; }

/* ---------- 首頁說明（SEO） ---------- */
.about { margin-top: 18px; padding: 20px 22px; border-radius: var(--radius); border: 1px solid #ffffff14; background: #ffffff05; }
.about h2 { margin: 0 0 8px; font-size: 18px; color: var(--gold-soft); }
.about p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.about details { border-top: 1px solid #ffffff10; padding: 10px 0 0; margin-top: 10px; }
.about summary { cursor: pointer; font-size: 15px; color: var(--text); }
.about details p { margin: 8px 0 0; }

/* ---------- 對照表 ---------- */
.hint { font-size: 13px; color: var(--muted); margin: -10px 0 8px; }
.sec-title { margin: 22px 0 4px; font-size: 16px; color: var(--gold); letter-spacing: .1em; }
.sec-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.class-table { display: grid; gap: 8px; }
.ct-row { border-radius: 12px; background: #ffffff06; border: 1px solid #ffffff12; border-left: 3px solid var(--rc); }
.ct-row summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; align-items: center; padding: 10px 12px; }
.ct-row summary::-webkit-details-marker { display: none; }
.ct-icon { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 1px solid #c9a35a; }
.ct-main b { color: var(--rc); margin-right: 8px; }
.ct-main small { color: var(--muted); font-size: 12px; }
.ct-row p { margin: 0; padding: 0 12px 12px 64px; font-size: 14px; color: var(--muted); }
.mb-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mb { font: 700 12px var(--display); letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; border: 1px solid #ffffff26; color: var(--muted); }
.mb.on { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.rec-box { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #00000030; border: 1px solid #ffffff12; }
.rec-box small { display: block; color: var(--gold); font-size: 12px; margin-bottom: 6px; letter-spacing: .05em; }
.rec-box p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.rank-name em.rec { background: transparent; color: var(--gold-soft); border: 1px solid #e6b35a88; }

/* ---------- 統計與投票 ---------- */
.stats-wrap { max-width: 720px; margin: 0 auto 20px; padding: 0 16px; }
.stats-wrap > h2 { font-size: 18px; color: var(--gold-soft); margin: 0 0 12px; text-align: center; letter-spacing: .1em; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { text-align: center; padding: 14px 6px; border-radius: 12px; border: 1px solid var(--panel-edge); background: linear-gradient(180deg, #221a2c, var(--panel)); }
.stat b { display: block; font: 800 24px var(--display); color: var(--gold); }
.stat small { color: var(--muted); font-size: 12px; }
.vote-card { padding: 16px; margin-bottom: 12px; border-radius: var(--radius); border: 1px solid var(--panel-edge); background: linear-gradient(180deg, #221a2c, var(--panel)); }
.vote-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.vote-head h3 { margin: 0; font-size: 16px; }
.vote-head small { color: var(--muted); font-size: 12px; }
.vote-list { display: grid; gap: 6px; }
.vote-list.faction { grid-template-columns: 1fr 1fr; }
.vote-opt {
  display: grid; grid-template-columns: auto auto 1fr 40px; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left;
  font: 600 15px var(--serif); color: var(--text); background: #ffffff08; border: 1px solid #ffffff1c;
  transition: border-color .2s, background .2s;
}
.vote-opt:hover:not([disabled]) { border-color: var(--vc); background: color-mix(in srgb, var(--vc) 14%, transparent); }
.vote-opt[disabled] { cursor: default; }
.vote-opt.mine { border-color: var(--vc); background: color-mix(in srgb, var(--vc) 16%, transparent); }
.vote-list.faction .vote-opt { grid-template-columns: 1fr 40px; border-left: 4px solid var(--vc); }
.vote-list.faction .vote-bar { grid-column: 1 / -1; grid-row: 2; }
.vote-icon { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: block; }
.vote-name { white-space: nowrap; }
.vote-name em { font-style: normal; font-size: 11px; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--vc); color: #fff; }
.vote-bar { height: 6px; border-radius: 99px; background: #ffffff10; overflow: hidden; }
.vote-bar i { display: block; height: 100%; background: var(--vc); border-radius: 99px; transition: width .6s ease; }
.vote-pct { font: 600 13px var(--display); color: var(--muted); text-align: right; }
.stats-note { text-align: center; font-size: 12px; color: #6f6556; margin: 4px 0 0; }

/* 首頁主視覺 */
.intro-banner { position: relative; height: auto; aspect-ratio: 16 / 9; background: #0e0b14; }
.intro-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.intro-banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, #221a2c); pointer-events: none; }
.fan-tag { position: absolute; top: 10px; right: 10px; z-index: 1; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #000a; color: var(--gold-soft); border: 1px solid #e6b35a66; }

/* ---------- 首頁縮小（約 80%） ---------- */
#intro { max-width: 580px; margin: 0 auto; }
#intro .intro-panel { padding: 20px 22px 22px; }
#intro .eyebrow { font-size: 11px; margin-bottom: 4px; }
#intro h1 { font-size: clamp(30px, 7vw, 40px); margin-bottom: 10px; }
#intro .lead { font-size: 15px; line-height: 1.6; margin-bottom: 14px; }
#intro .intro-meta { margin-bottom: 14px; gap: 8px; }
#intro .intro-meta li { font-size: 13px; padding: 3px 12px; }
#intro .hint { margin: 0 0 4px; font-size: 12px; }
#intro .btn { padding: 12px 16px; font-size: 15px; margin-top: 8px; }
#intro .about { padding: 16px 18px; }

/* ---------- IMSB 隱藏人格 ---------- */
.imsb {
  position: relative; text-align: center; padding: 26px 22px 22px;
  background: radial-gradient(400px 200px at 50% 0%, #8b5a2b55, transparent 70%), #2a1d14;
  border-bottom: 2px dashed #8b5a2b;
}
.poop { font-size: 96px; line-height: 1; animation: poop-drop .9s cubic-bezier(.3,1.6,.5,1) both, poop-wobble 2.4s ease-in-out 1s infinite; display: inline-block; }
@keyframes poop-drop { from { transform: translateY(-120px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes poop-wobble { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.05); } }
.imsb-tag { margin: 8px 0 0; font-size: 12px; letter-spacing: .3em; color: #d9a46a; }
.imsb h2 { margin: 2px 0 0; font: 800 48px/1 var(--display); letter-spacing: .12em; color: #e8b77d; }
.imsb-nick { margin: 6px 0 14px; color: var(--gold-soft); font-weight: 600; }
.imsb-voices { display: grid; gap: 8px; margin: 0 auto 14px; max-width: 420px; }
.imsb-voices p { margin: 0; padding: 8px 14px; border-radius: 14px; font-weight: 600; font-size: 15px; }
.imsb-voices .v1 { justify-self: start; background: #c8402c; color: #fff; border-bottom-left-radius: 4px; }
.imsb-voices .v2 { justify-self: end; background: #3a3f55; color: #dfe4ff; border-bottom-right-radius: 4px; text-align: left; }
.imsb-desc { margin: 0 0 10px; color: var(--text); }
.imsb-list { text-align: left; margin: 0 auto 12px; padding-left: 20px; max-width: 460px; font-size: 14px; color: var(--muted); }
.imsb-list li { margin-bottom: 4px; }
.imsb-note { margin: 0; font-size: 12px; color: #9a8a74; }
.imsb-cell { --c: #b07a45; background: linear-gradient(160deg, #3a2a1c, #1d1726 70%); border-style: dashed; }
.poop-sm { font-size: 24px; }
@media (prefers-reduced-motion: reduce) { .poop { animation: none; } }
.opt.opt-poop { border-style: dashed; border-color: #8b5a2b; background: #2a1d1480; }
.opt.opt-poop .key { color: #e8b77d; border-color: #8b5a2b; }
.opt.opt-poop:hover { background: #8b5a2b33; border-color: #e8b77d; }

/* ---------- IMSB 獨立結果頁 ---------- */
.imsb-hero { background: radial-gradient(500px 240px at 50% 0%, #8b5a2b66, transparent 70%), #21170f; }
.imsb-hero .eyebrow { color: #e8b77d; }
.imsb-hero .poop { margin: 6px 0 4px; }
.imsb-type { color: #e8b77d !important; font: 800 64px/1 var(--display) !important; letter-spacing: .12em; margin: 4px 0 0; text-shadow: 0 0 30px #8b5a2b; }
.imsb-hero .imsb-nick { margin: 10px 0 2px; font-size: 20px; }
.imsb-alias { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.imsb-emblem { color: #b07a45; }
.imsb-emblem .ring { background: radial-gradient(circle at 50% 35%, #8b5a2b55, #00000066); border: 3px dashed #b07a45; }
.imsb-emblem .emoji { font-size: 52px; line-height: 1; }
.imsb-mini { font-size: 24px; color: #b07a45; }
.imsb-voices .v3 { justify-self: center; background: #8b5a2b; color: #fff6e3; border-radius: 14px; }
.r-body .imsb-voices { margin: 0 0 4px; max-width: none; }
.r-body .imsb-list { margin: 0; max-width: none; }
.imsb-hero ~ .r-body .why-lines .pole { background: transparent; font-size: 16px; }
.imsb-hero ~ .r-body .imsb-note { margin-top: 18px; text-align: center; }

/* ---------- 回報 ---------- */
.feedback-btn {
  position: fixed; top: 12px; right: 12px; z-index: 40;
  padding: 7px 12px; border-radius: 99px; cursor: pointer;
  font: 600 13px var(--serif); color: var(--gold-soft);
  background: #17121fe6; border: 1px solid #e6b35a88; box-shadow: 0 4px 16px #0008;
  backdrop-filter: blur(4px);
}
.feedback-btn:hover { background: #2a1f35; border-color: var(--gold); }
.progress-top { padding-right: 82px; }
.fb-prompt {
  display: block; width: 100%; margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; cursor: pointer;
  font: 400 14px var(--serif); color: var(--gold-soft); text-align: center;
  background: #e6b35a10; border: 1px dashed #e6b35a66;
}
.fb-prompt:hover { background: #e6b35a1f; }
.fb-form { display: grid; gap: 12px; }
.fb-field { display: grid; gap: 6px; font-size: 14px; }
.fb-field > span { color: var(--muted); font-size: 13px; }
.fb-form select, .fb-form textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; font: 400 15px var(--serif);
  color: var(--text); background: #0e0b14; border: 1px solid #ffffff26;
}
.fb-form textarea { resize: vertical; min-height: 90px; }
.fb-form select:focus, .fb-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fb-acc { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fb-acc label { cursor: pointer; }
.fb-acc input { position: absolute; opacity: 0; pointer-events: none; }
.fb-acc span { display: block; text-align: center; padding: 8px 2px; border-radius: 8px; font-size: 12px; border: 1px solid #ffffff22; background: #ffffff08; }
.fb-acc input:checked + span { background: var(--gold); color: var(--bg); border-color: var(--gold); font-weight: 700; }
.fb-acc input:focus-visible + span { outline: 2px solid var(--gold); }
.fb-context { margin: 0; font-size: 12px; color: var(--muted); word-break: break-all; }
.fb-form .btn { margin-top: 0; }
.fb-done { text-align: center; padding: 10px 0; }
.fb-done-icon { font-size: 48px; }
.fb-done p { color: var(--muted); }
.fb-acc { grid-template-columns: repeat(3, 1fr); }
.opt-tag { font-style: normal; font-size: 11px; margin-left: 8px; padding: 1px 6px; border-radius: 4px; color: var(--gold-soft); border: 1px solid #e6b35a66; white-space: nowrap; vertical-align: 1px; }

/* ---------- 右上角快捷按鈕 ---------- */
.top-actions { position: fixed; top: 12px; right: 12px; z-index: 40; display: flex; gap: 8px; }
.top-actions .feedback-btn { position: static; }
.top-btn {
  padding: 7px 12px; border-radius: 99px; cursor: pointer;
  font: 600 13px var(--serif); color: var(--gold-soft);
  background: #17121fe6; border: 1px solid #e6b35a88; box-shadow: 0 4px 16px #0008; backdrop-filter: blur(4px);
}
.top-btn:hover { background: #2a1f35; border-color: var(--gold); }
.progress-top { padding-right: 168px; }
@media (max-width: 420px) {
  .top-btn { padding: 6px 9px; font-size: 12px; }
  .progress-top { padding-right: 150px; }
  .progress-top .dim-tag { display: none; }
}
@media (min-width: 1080px) { .progress-top { padding-right: 0; } }
.stat-cards { grid-template-columns: 1fr; }
