/* ==========================================================================
   文脉知行 · 传统文化空间体验调查
   视觉语言：宣纸底 + 水墨远山 + 靛青/朱砂点睛
   ========================================================================== */

:root {
  /* 纸与墨 */
  --paper:      #f4efe4;
  --paper-deep: #ebe3d4;
  --paper-card: #fbf8f1;
  --ink:        #1f1b16;
  --ink-2:      #4a4238;
  --ink-3:      #8a7f70;
  --line:       #d8cfbd;
  --line-soft:  #e6dfd0;

  /* 传统色 */
  --indigo:     #2f4f5e;   /* 靛青 */
  --indigo-lt:  #6a8b99;
  --cinnabar:   #a8382c;   /* 朱砂 */
  --cinnabar-lt:#c9604f;
  --gold:       #b08a3e;   /* 赭金 */
  --jade:       #5c7a5a;   /* 苔绿 */

  --shadow-sm: 0 1px 2px rgba(31, 27, 22, .05), 0 2px 8px rgba(31, 27, 22, .04);
  --shadow-md: 0 2px 6px rgba(31, 27, 22, .06), 0 12px 32px rgba(31, 27, 22, .09);
  --shadow-lg: 0 4px 12px rgba(31, 27, 22, .08), 0 24px 60px rgba(31, 27, 22, .14);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* 关键：类选择器（如 .scene / .panel 上的 display）会覆盖 UA 的 [hidden]{display:none}，
   这里显式兜底，保证 hidden 属性始终生效。 */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  /* 宣纸纹理：极淡的斜向纤维
     注意：z-index 必须是 -1。若用 0，这个 fixed 定位层会按绘制顺序
     盖住 z-index:auto 的普通内容（看板就曾被它整页盖住）。 */
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  background:
    repeating-linear-gradient(115deg, rgba(139,124,98,.030) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(25deg, rgba(139,124,98,.022) 0 1px, transparent 1px 7px),
    radial-gradient(120% 80% at 50% 0%, #fbf7ee 0%, var(--paper) 45%, var(--paper-deep) 100%);
}

/* ==========================================================================
   背景气氛层
   ========================================================================== */

.atmos {
  /* 同样必须为负 z-index，保证永远在内容之下 */
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1; overflow: hidden;
}
.atmos__wash {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 50% at 12% 8%, rgba(47,79,94,.09), transparent 60%),
    radial-gradient(60% 45% at 92% 22%, rgba(168,56,44,.07), transparent 62%),
    radial-gradient(80% 60% at 50% 108%, rgba(176,138,62,.11), transparent 65%);
}
.atmos__mountains {
  position: absolute; left: -4%; right: -4%; bottom: 0;
  width: 108%; height: 46vh; min-height: 260px;
}
.mtn { transform-origin: 50% 100%; }
.mtn--far  { animation: drift 46s ease-in-out infinite; }
.mtn--mid  { animation: drift 34s ease-in-out infinite reverse; }
.mtn--near { animation: drift 26s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scaleY(1); }
  50%      { transform: translate3d(-18px, 4px, 0) scaleY(1.02); }
}

.atmos__mist {
  position: absolute; left: -20%; width: 140%; height: 30vh;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,.55), transparent 70%);
  filter: blur(22px);
}
.atmos__mist--a { bottom: 12vh; animation: mist 60s linear infinite; }
.atmos__mist--b { bottom: 2vh;  animation: mist 84s linear infinite reverse; opacity: .7; }
@keyframes mist {
  from { transform: translateX(-8%); }
  to   { transform: translateX(8%); }
}

.atmos__grain {
  position: absolute; inset: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .mtn, .atmos__mist { animation: none !important; }
  * { transition-duration: .01ms !important; }
}

/* ==========================================================================
   顶部进度条
   ========================================================================== */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 239, 228, .88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  animation: slideDown .5s ease both;
}
@keyframes slideDown { from { transform: translateY(-100%); } }

.topbar__inner {
  max-width: 760px; margin: 0 auto;
  padding: 11px 20px 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.topbar__brand {
  font-family: var(--serif);
  font-size: 13.5px; letter-spacing: .06em; color: var(--ink-2);
}
.topbar__count {
  font-family: var(--serif);
  font-size: 14px; font-variant-numeric: tabular-nums; color: var(--indigo);
  letter-spacing: .04em;
}
.progress { max-width: 760px; margin: 0 auto; padding: 8px 20px 12px; position: relative; }
.progress__track {
  height: 3px; border-radius: 3px; background: var(--line-soft); overflow: hidden;
}
.progress__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--indigo), var(--indigo-lt) 60%, var(--gold));
  border-radius: 3px;
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}
.progress__trail { position: relative; height: 0; }
.progress__walker {
  position: absolute; top: -13px; left: 0;
  font-size: 12px; line-height: 1;
  transform: translateX(-50%);
  transition: left .45s cubic-bezier(.4, 0, .2, 1);
  filter: saturate(.4) opacity(.75);
}

/* ==========================================================================
   舞台与场景
   ========================================================================== */

#stage {
  position: relative; z-index: 10;
  max-width: 760px; margin: 0 auto;
  padding: 0 20px 96px;
}

.scene { animation: fadeUp .55s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------- 第一幕：情景引导 ---------------- */

.scene--intro { padding-top: clamp(48px, 11vh, 116px); }

.intro__frame { text-align: center; }

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px; letter-spacing: .3em; text-indent: .3em;
  color: var(--gold); text-transform: uppercase;
  font-weight: 600;
}

.intro__title {
  font-family: var(--serif);
  font-size: clamp(38px, 9vw, 62px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: .04em;
  margin: 0 0 14px;
  color: var(--ink);
}
.intro__title em {
  font-style: normal;
  color: var(--cinnabar);
  position: relative;
  white-space: nowrap;
}
.intro__title em::after {
  content: "";
  position: absolute; left: -2%; right: -2%; bottom: .08em; height: .34em;
  background: linear-gradient(90deg, rgba(168,56,44,.16), rgba(176,138,62,.20));
  border-radius: 2px; z-index: -1;
}

.intro__sub {
  margin: 0 0 40px;
  font-size: 14.5px; letter-spacing: .12em; color: var(--ink-3);
}

.intro__story {
  text-align: left;
  max-width: 560px; margin: 0 auto 34px;
  padding: 30px 28px;
  background: linear-gradient(180deg, rgba(251,248,241,.86), rgba(251,248,241,.62));
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(4px);
}
.intro__story .line {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 16.5px; line-height: 2;
  color: var(--ink-2);
  opacity: 0; transform: translateY(10px);
  animation: lineIn .8s cubic-bezier(.2,.7,.3,1) forwards;
}
.intro__story .line:last-child { margin-bottom: 0; }
.intro__story .line--key {
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-weight: 600;
}
@keyframes lineIn { to { opacity: 1; transform: none; } }

.intro__meta {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 30px;
}
.chip {
  padding: 5px 13px;
  font-size: 12.5px; letter-spacing: .05em;
  color: var(--ink-2);
  background: rgba(255,255,255,.6);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.chip--live { color: var(--cinnabar); border-color: rgba(168,56,44,.3); background: rgba(168,56,44,.05); }

.intro__note {
  margin: 22px 0 0;
  font-size: 12.5px; line-height: 1.9; color: var(--ink-3);
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  letter-spacing: .04em;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .22s ease, background .22s ease, color .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

.btn--lg { padding: 15px 34px; font-size: 16.5px; }

.btn--primary {
  background: linear-gradient(150deg, var(--indigo), #24404d 60%, #1c333d);
  color: #f7f3ea;
  box-shadow: 0 2px 10px rgba(47,79,94,.28), 0 12px 30px rgba(47,79,94,.22);
}
.btn--primary:hover { box-shadow: 0 4px 16px rgba(47,79,94,.34), 0 18px 40px rgba(47,79,94,.28); }
.btn--primary svg { transition: transform .22s ease; }
.btn--primary:hover svg { transform: translateX(4px); }
.btn--primary[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn--ghost {
  background: rgba(255,255,255,.5);
  color: var(--ink-2);
  border-color: var(--line);
}
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: var(--ink-3); }

/* ---------------- 第二幕：题目卡 ---------------- */

.scene--quiz { padding-top: clamp(24px, 6vh, 60px); }

.qcard {
  background: linear-gradient(180deg, var(--paper-card), #f7f3ea);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 5vw, 40px);
  position: relative;
  overflow: hidden;
}
.qcard::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--indigo), var(--gold));
  opacity: .55;
}

.qcard__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.qcard__dim {
  font-size: 12.5px; letter-spacing: .16em; font-weight: 600;
  color: var(--indigo);
}
.qcard__idx {
  font-family: var(--serif);
  font-size: 34px; line-height: 1; color: var(--line);
  font-variant-numeric: tabular-nums;
}

.qcard__text {
  font-family: var(--serif);
  font-size: clamp(20px, 4.6vw, 27px);
  line-height: 1.62;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--ink);
  letter-spacing: .01em;
}
.qcard__hint {
  margin: 0 0 28px;
  font-size: 13px; color: var(--ink-3); min-height: 1.7em;
  transition: color .2s ease;
}
/* 题目与星级之间留白 */
.qcard__text { margin-bottom: 26px; }

/* 星级 */
.stars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(6px, 1.6vw, 12px);
  margin-bottom: 10px;
}
.star {
  appearance: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 14px 4px 11px;
  min-height: 74px;
  background: rgba(255,255,255,.55);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: var(--sans);
  transition: transform .16s cubic-bezier(.2,.7,.3,1), background .18s ease,
              border-color .18s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.star__glyph { font-size: clamp(22px, 5.8vw, 28px); line-height: 1; color: var(--line); transition: color .18s ease, transform .18s ease; }
.star__num   { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.star:hover { transform: translateY(-3px); border-color: var(--indigo-lt); box-shadow: var(--shadow-sm); }
.star.is-active {
  background: linear-gradient(180deg, #fffdf7, #fdf6e6);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,138,62,.14), var(--shadow-sm);
}
.star.is-active .star__glyph { color: var(--cinnabar); transform: scale(1.08); }
.star.is-active .star__num   { color: var(--ink-2); font-weight: 700; }
.star:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* 当前所选星级的语义说明（不挤在按钮里，避免折行） */
.starlabel {
  margin: 0 0 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-3);
  min-height: 1.7em;
  transition: color .2s ease;
}
.starlabel.is-set { color: var(--cinnabar); font-weight: 600; }
.starlabel b { font-variant-numeric: tabular-nums; }

.qcard__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 18px; border-top: 1px dashed var(--line);
}
.qcard__kbd { font-size: 12px; color: var(--ink-3); }

/* 中途提交入口：低调但随时可见 */
.btn--early {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}
.btn--early:hover {
  color: var(--indigo);
  border-color: var(--indigo-lt);
  background: rgba(47,79,94,.05);
}
kbd {
  display: inline-block; padding: 1px 6px; margin: 0 1px;
  font-family: var(--sans); font-size: 11px;
  background: #fff; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; color: var(--ink-2);
}

/* 卡片切换动画 */
.qcard.is-leaving  { animation: cardOut .22s ease both; }
.qcard.is-entering { animation: cardIn .34s cubic-bezier(.2,.7,.3,1) both; }
@keyframes cardOut { to { opacity: 0; transform: translateY(-14px) scale(.99); } }
@keyframes cardIn  { from { opacity: 0; transform: translateY(16px) scale(.99); } }

/* ---------------- 第三幕：基本信息 ---------------- */

.scene--profile { padding-top: clamp(24px, 6vh, 56px); }

.panel {
  background: linear-gradient(180deg, var(--paper-card), #f7f3ea);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(26px, 5vw, 42px);
}
.panel__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(24px, 5vw, 31px); line-height: 1.4;
  margin: 0 0 12px;
}
.panel__lead { margin: 0 0 32px; color: var(--ink-2); font-size: 15px; }
.panel__lead b { color: var(--cinnabar); font-weight: 600; }

.field { margin-bottom: 28px; }
.field label, .field__label {
  display: block; margin-bottom: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  letter-spacing: .02em;
}
.field__count {
  display: block; margin-top: 6px; text-align: right;
  font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}

input[type="text"], textarea {
  width: 100%;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 12px 15px;
  background: rgba(255,255,255,.7);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  resize: vertical;
}
input[type="text"]::placeholder, textarea::placeholder { color: #b6ab99; }
input[type="text"]:focus, textarea:focus {
  outline: none; background: #fff;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(47,79,94,.12);
}

.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  appearance: none;
  padding: 9px 16px;
  font-family: var(--sans); font-size: 14px; color: var(--ink-2);
  background: rgba(255,255,255,.6);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.opt:hover { border-color: var(--indigo-lt); background: #fff; }
.opt.is-active {
  background: linear-gradient(150deg, var(--indigo), #24404d);
  border-color: var(--indigo); color: #f7f3ea; font-weight: 600;
  box-shadow: 0 2px 8px rgba(47,79,94,.24);
}
.opt:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

.submit__status {
  margin: 16px 0 0; min-height: 1.5em;
  font-size: 13.5px; color: var(--cinnabar); text-align: center;
}

/* ---------------- 第四幕：诊断结果 ---------------- */

.scene--result { padding-top: clamp(24px, 6vh, 56px); }
.panel--result { text-align: center; }

.result__badge {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 7.4vw, 46px); line-height: 1.28;
  margin: 0 0 14px;
  color: var(--cinnabar);
  letter-spacing: .04em;
}
.result__badgeDesc {
  max-width: 480px; margin: 0 auto 28px;
  font-size: 15px; line-height: 1.9; color: var(--ink-2);
}
.result__sample {
  display: inline-block; margin-bottom: 26px;
  padding: 7px 16px; font-size: 12.5px;
  color: var(--indigo); background: rgba(47,79,94,.07);
  border: 1px solid rgba(47,79,94,.18); border-radius: 999px;
}

.section-h {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(19px, 4.2vw, 23px);
  margin: 44px 0 8px; text-align: left;
  padding-left: 14px; border-left: 3px solid var(--gold);
  line-height: 1.5;
}
.section-sub {
  margin: 0 0 22px; text-align: left;
  font-size: 13.5px; color: var(--ink-3);
}

/* 雷达图 */
.radar { margin: 0 0 8px; }
.radar svg { width: 100%; max-width: 380px; height: auto; }
.radar figcaption {
  font-size: 12px; color: var(--ink-3);
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.legend { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-left: 8px; }
.legend--you  { background: var(--cinnabar); }
.legend--site { background: var(--indigo); opacity: .75; }

/* 四维对比卡 */
.dims { display: grid; gap: 12px; text-align: left; }
.dim {
  padding: 18px 20px;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.dim__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.dim__name { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.dim__gap {
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 2px 9px; border-radius: 999px;
}
.dim__gap--up   { color: #fff; background: var(--cinnabar); }
.dim__gap--flat { color: var(--ink-2); background: var(--line-soft); }
.dim__gap--down { color: #fff; background: var(--jade); }
.dim__tagline { font-size: 12.5px; color: var(--ink-3); margin: 0 0 14px; }

.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 62px 1fr 42px; align-items: center; gap: 10px; }
.bar__label { font-size: 11.5px; color: var(--ink-3); }
.bar__track { height: 9px; border-radius: 5px; background: var(--line-soft); overflow: hidden; }
/* 填充条用 <i> 元素，必须显式 display:block —— inline 元素会忽略 width/height */
.bar__fill  { display: block; height: 100%; border-radius: 5px; width: 0; transition: width .8s cubic-bezier(.2,.7,.3,1); }
.bar__fill--you  { background: linear-gradient(90deg, var(--cinnabar-lt), var(--cinnabar)); }
.bar__fill--site { background: linear-gradient(90deg, var(--indigo-lt), var(--indigo)); }
.bar__val { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; }

/* 卡点列表 */
.gaps { list-style: none; padding: 0; margin: 0; text-align: left; display: grid; gap: 10px; }
.gap {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 15px 18px;
  background: linear-gradient(100deg, rgba(168,56,44,.06), rgba(255,255,255,.5));
  border: 1px solid rgba(168,56,44,.16);
  border-radius: var(--r-md);
}
.gap__rank {
  font-family: var(--serif); font-size: 22px; color: var(--cinnabar); opacity: .5;
  text-align: center; line-height: 1;
}
.gap__body { min-width: 0; }
.gap__name { display: block; font-family: var(--serif); font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.gap__meta { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.gap__val {
  font-family: var(--serif); font-size: 21px; font-weight: 700;
  color: var(--cinnabar); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gap--none {
  grid-template-columns: 1fr;
  background: rgba(255,255,255,.6);
  border-color: var(--line-soft);
  color: var(--ink-2);
}
.gap--good {
  background: linear-gradient(100deg, rgba(92,122,90,.07), rgba(255,255,255,.5));
  border-color: rgba(92,122,90,.22);
}
.gap--good .gap__rank { color: var(--jade); opacity: .8; font-size: 18px; }
.gap__val--good { color: var(--jade); }

.result__actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 40px 0 0;
}
.result__foot { margin: 22px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 90;
  transform: translate(-50%, 20px);
  padding: 11px 22px;
  font-size: 14px; color: #f7f3ea;
  background: rgba(31,27,22,.92);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .24s ease, transform .24s cubic-bezier(.2,.7,.3,1);
  max-width: calc(100vw - 40px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   小屏适配
   ========================================================================== */

@media (max-width: 560px) {
  .star { min-height: 66px; padding: 12px 2px 9px; border-radius: 12px; }
  .star__num { font-size: 10.5px; }
  .qcard__foot { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .qcard__kbd { text-align: center; }
  .gap { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; padding: 13px 14px; }
  .gap__rank { font-size: 18px; }
  .gap__name { font-size: 15px; }
  .gap__meta { font-size: 11.5px; }
  .gap__val { font-size: 18px; }
  .bar { grid-template-columns: 52px 1fr 38px; gap: 8px; }
  .intro__story { padding: 24px 20px; }
  .intro__story .line { font-size: 15.5px; }
}

/* 打印友好 */
@media print {
  .atmos, .topbar, .toast, .result__actions { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; border-color: #ccc; }
}
