/* ==========================================================================
   去水印解析 — “看片台”视觉
   冷白背光台面 + 深色取景框 + 一支品红油性笔（唯一的强调色）
   ========================================================================== */

:root {
  color-scheme: light;
  --table: #EDF0F3;        /* 台面 */
  --sheet: #FFFFFF;        /* 纸面 */
  --ink: #18212C;          /* 正文 */
  --graphite: #5B6675;     /* 次要文字 */
  --line: #D5DBE2;         /* 分隔 */
  --line-strong: #B9C2CC;
  --frame: #1F242B;        /* 取景框 */
  --frame-ink: #E7EBEF;
  --marker: #D6336C;       /* 油性笔 */
  --marker-ink: #B0224F;
  --marker-soft: rgba(214, 51, 108, .18);
  --ok: #1F8A5B;
  --warn: #B4540A;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI",
          "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei UI",
          "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-num: "SF Pro Display", "Segoe UI Variable Display", "Helvetica Neue", var(--font);

  /* 字号：纯四度（1.333） */
  --t-xs: .8125rem;   /* 13 */
  --t-s: .9375rem;    /* 15 */
  --t-m: 1.0625rem;   /* 17 */
  --t-l: 1.375rem;    /* 22 */
  --t-xl: 1.875rem;   /* 30 */
  --t-hero: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --shadow-lift: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 40px -24px rgba(24, 33, 44, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --measure: 72ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --table: #14181D;
    --sheet: #1C2128;
    --ink: #E6EAEE;
    --graphite: #98A3B0;
    --line: #2C333C;
    --line-strong: #3B444F;
    --frame: #0E1114;
    --frame-ink: #E7EBEF;
    --marker: #F0588E;
    --marker-ink: #FF7AA6;
    --marker-soft: rgba(240, 88, 142, .24);
    --shadow-lift: 0 18px 40px -24px rgba(0, 0, 0, .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1rem/1.65 var(--font);
  color: var(--ink);
  background: var(--table);
  /* 背光台面：极淡的中心光晕，不做装饰性渐变 */
  background-image: radial-gradient(1200px 520px at 30% -10%, rgba(255,255,255,.75), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: dark) {
  body { background-image: radial-gradient(1200px 520px at 30% -10%, rgba(255,255,255,.04), transparent 70%); }
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--marker); }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--marker); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--graphite); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--ink); color: var(--table); padding: 8px 14px; border-radius: var(--r-s);
}
.skip:focus { top: 12px; }

/* ---------- 顶栏 ---------- */
.top {
  max-width: 1120px; margin: 0 auto; padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.01em; }
.brand img { border-radius: 7px; }
.top-nav { display: flex; gap: 22px; font-size: var(--t-s); }
.top-nav a { text-decoration: none; color: var(--graphite); }
.top-nav a:hover { color: var(--ink); }

main { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- 输入区 ---------- */
.compose { padding: clamp(28px, 6vw, 72px) 0 28px; max-width: 860px; }
.compose h1 {
  margin: 0 0 18px;
  font-size: var(--t-hero); line-height: 1.12; font-weight: 750; letter-spacing: -.035em;
  text-wrap: balance;
}
.lede { margin: 0 0 30px; max-width: 36em; font-size: var(--t-m); color: var(--graphite); }

.field {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-lift);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field:focus-within { border-color: var(--line-strong); box-shadow: var(--shadow-lift), 0 0 0 4px var(--marker-soft); }
.field.has-url { border-color: color-mix(in srgb, var(--marker) 45%, var(--line)); }

.field-surface { position: relative; }
.mirror, .field textarea {
  margin: 0; padding: 22px 24px 8px;
  font: 400 var(--t-m)/1.7 var(--font);
  letter-spacing: 0;
  white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere;
}
.mirror {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  color: transparent;
}
/* 油性笔高亮：识别出的链接 */
.mirror mark {
  color: transparent; background: transparent; border-radius: 3px;
  box-shadow: inset 0 -.62em 0 var(--marker-soft);
}
.mirror mark.fresh { animation: stroke .45s var(--ease) both; }
@keyframes stroke { from { box-shadow: inset 0 0 0 var(--marker-soft); } }
.field textarea {
  position: relative; display: block; width: 100%;
  min-height: 7.4em; max-height: 16em; resize: none; overflow-y: auto;
  border: 0; outline: 0; background: transparent; color: var(--ink);
  caret-color: var(--marker);
}
.field textarea::placeholder { color: color-mix(in srgb, var(--graphite) 70%, transparent); }

.field-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 12px 24px;
}
.detect { margin: 0; display: flex; align-items: center; gap: 9px; font-size: var(--t-s); color: var(--graphite); min-width: 0; }
.detect-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; transition: background .2s; }
.detect.on { color: var(--ink); }
.detect.on .detect-dot { background: var(--marker); box-shadow: 0 0 0 4px var(--marker-soft); }
.detect.bad .detect-dot { background: var(--warn); }
#detect-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#detect-text b { font-weight: 650; }

.field-actions { display: flex; align-items: center; gap: 6px; flex: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid transparent; background: none; cursor: pointer;
  font-size: var(--t-s); font-weight: 560; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s var(--ease), color .15s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.ghost { color: var(--graphite); }
.btn.ghost:hover { background: color-mix(in srgb, var(--table) 80%, var(--line)); color: var(--ink); }
.btn.icon-only { width: 42px; padding: 0; justify-content: center; }
.btn.primary { background: var(--ink); color: var(--sheet); padding: 0 14px 0 20px; }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--marker)); }
.btn.primary kbd {
  font-size: 12px; line-height: 1; padding: 4px 6px; border-radius: 6px;
  background: rgba(255,255,255,.14); color: inherit; opacity: .8;
}
.btn.primary[aria-busy="true"] { pointer-events: none; }
.btn.primary[aria-busy="true"] .btn-label::after { content: "中…"; }
.btn.small { height: 34px; padding: 0 12px; font-size: var(--t-xs); border-radius: 10px; }
.btn.outline { border-color: var(--line); background: var(--sheet); color: var(--ink); }
.btn.outline:hover { border-color: var(--line-strong); }
.btn.accent { background: var(--marker); color: #fff; }
.btn.accent:hover { background: var(--marker-ink); }

.link-btn { background: none; border: 0; padding: 0; color: var(--graphite); cursor: pointer; font-size: var(--t-s); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); text-decoration-color: var(--marker); }

/* 支持的平台：安静的一行字，被识别的平台用油性笔划线 */
.platforms { list-style: none; margin: 22px 0 0; padding: 0 4px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--t-s); color: var(--graphite); }
.platforms li { position: relative; transition: color .2s; }
.platforms li::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 3px; height: .42em;
  background: var(--marker-soft); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.platforms li.hit { color: var(--ink); }
.platforms li.hit::after { transform: scaleX(1); }

/* ---------- 结果 ---------- */
.result { padding: 18px 0 8px; scroll-margin-top: 18px; }
.sheet {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 0;
  background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow-lift); overflow: hidden;
}
.stage {
  position: relative; background: var(--frame); color: var(--frame-ink);
  min-height: 420px; display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.stage video, .stage .poster, .stage audio { max-height: 72vh; border-radius: 10px; background: #000; }
.stage video { width: 100%; }
.stage .poster { object-fit: contain; }
/* 冲洗显影：结果出现时的唯一一段编排动效 */
.develop { animation: develop .9s var(--ease) both; }
@keyframes develop { from { filter: blur(14px) saturate(.2) brightness(1.4); opacity: .3; } }

.info { padding: 30px 32px 28px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.info-head { display: flex; flex-direction: column; gap: 10px; }
.source { display: flex; align-items: center; gap: 10px; font-size: var(--t-s); color: var(--graphite); }
.source .pill { padding: 2px 10px; border-radius: 999px; background: var(--marker-soft); color: var(--marker-ink); font-weight: 600; font-size: var(--t-xs); }
.info h2 { margin: 0; font-size: var(--t-l); line-height: 1.4; font-weight: 680; letter-spacing: -.01em; overflow-wrap: anywhere; }
.info h2.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }

.author { display: flex; align-items: center; gap: 12px; min-width: 0; }
.author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--table); flex: none; }
.author .avatar-fallback { width: 38px; height: 38px; border-radius: 50%; background: var(--table); display: grid; place-items: center; font-weight: 650; color: var(--graphite); flex: none; }
.author-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-sub { font-size: var(--t-xs); color: var(--graphite); }

.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 18px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { font-size: var(--t-xs); color: var(--graphite); margin-bottom: 2px; }
.facts dd { margin: 0; font-family: var(--font-num); font-size: var(--t-m); font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { height: 44px; }

.more { display: flex; flex-direction: column; gap: 6px; }
details.fold { border-radius: var(--r-m); }
details.fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 2px; font-size: var(--t-s); font-weight: 560; color: var(--graphite);
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s var(--ease); }
details.fold[open] > summary::after { transform: rotate(225deg) translateY(-1px); }
details.fold > summary:hover { color: var(--ink); }
.links { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.links li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--table); font-size: var(--t-xs); }
.links .lbl { flex: none; font-weight: 600; min-width: 4.5em; }
.links .u { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--graphite); }
.links button { flex: none; }
pre.raw { margin: 0 0 8px; max-height: 340px; overflow: auto; padding: 14px; border-radius: 12px; background: var(--table); font-size: 12px; line-height: 1.55; }

.music { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-m); background: var(--table); }
.music img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.music-meta { flex: 1; min-width: 0; }
.music-meta b { display: block; font-size: var(--t-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-meta span { font-size: var(--t-xs); color: var(--graphite); }
.music audio { display: none; }
.round {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--sheet);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.round svg { width: 16px; height: 16px; fill: currentColor; }
.round:hover { border-color: var(--marker); color: var(--marker-ink); }

/* 图集：看片台上的接触印样 */
.sheet.gallery { grid-template-columns: 1fr; }
.contact {
  background: var(--frame); padding: 18px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px;
}
.frame-cell {
  position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 3 / 4;
  border: 0; padding: 0; cursor: zoom-in; display: block; width: 100%;
}
.frame-cell img, .frame-cell video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.frame-cell:hover img { transform: scale(1.035); }
.frame-cell .no { position: absolute; left: 8px; top: 7px; font: 600 11px/1 var(--font-num); color: #fff; background: rgba(0,0,0,.5); padding: 4px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.frame-cell .live-tag { position: absolute; right: 8px; top: 7px; font-size: 11px; color: #fff; background: rgba(214,51,108,.85); padding: 3px 7px; border-radius: 5px; }
.frame-cell video { position: absolute; inset: 0; opacity: 0; }
.frame-cell.playing video { opacity: 1; }
.frame-cell .pick {
  position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 8px;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .2s;
}
.frame-cell:hover .pick, .frame-cell:focus-visible .pick { opacity: 1; }
.frame-cell .pick svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.gallery .info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: start; }
.gallery .info .facts { grid-column: 1 / -1; }
.gallery .info .more { grid-column: 1 / -1; }

/* 分 P 列表 */
.parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.parts button {
  width: 100%; display: grid; grid-template-columns: 2.4em 1fr auto; gap: 8px; align-items: center; text-align: left;
  padding: 9px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; font-size: var(--t-s);
}
.parts button:hover { background: var(--table); }
.parts button[aria-current="true"] { background: var(--marker-soft); }
.parts .pn { font-family: var(--font-num); color: var(--graphite); font-variant-numeric: tabular-nums; }
.parts .pt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parts .pd { color: var(--graphite); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }

/* 音频（网易云） */
.stage.audio-stage { flex-direction: column; gap: 22px; }
.disc { width: min(64%, 300px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 10px #000, 0 0 0 11px #333; }
.disc.spin { animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.stage audio { width: min(100%, 420px); background: transparent; }
.lyric { max-height: 240px; overflow: auto; font-size: var(--t-s); line-height: 2; color: var(--graphite); white-space: pre-line; mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); padding: 12px 0; }

/* 加载 / 错误 */
.loading { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.loading .stage { overflow: hidden; }
.scan { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.07) 50%, transparent 70%); background-size: 220% 100%; animation: scan 1.3s linear infinite; }
@keyframes scan { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.loading-text { position: relative; font-size: var(--t-s); color: rgba(231,235,239,.7); }
.bones { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.bone { height: 14px; border-radius: 7px; background: var(--table); }
.bone.w60 { width: 60%; } .bone.w80 { width: 80%; } .bone.w40 { width: 40%; } .bone.big { height: 26px; width: 90%; }

.problem { padding: 28px 30px; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; background: var(--sheet); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--r-l); }
.problem .code { grid-row: span 3; font: 700 var(--t-xl)/1 var(--font-num); color: var(--warn); font-variant-numeric: tabular-nums; }
.problem h3 { margin: 0; font-size: var(--t-m); }
.problem p { margin: 0; color: var(--graphite); font-size: var(--t-s); max-width: var(--measure); }
.problem .row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- 最近解析 ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: var(--t-l); letter-spacing: -.01em; }
.section-head p { margin: 0; font-size: var(--t-s); max-width: var(--measure); }
.api .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
.history { padding: 40px 0 8px; }
.history-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.history-list button {
  width: 100%; display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; text-align: left;
  padding: 9px; border-radius: var(--r-m); border: 1px solid transparent; background: color-mix(in srgb, var(--sheet) 70%, transparent); cursor: pointer;
}
.history-list button:hover { border-color: var(--line); background: var(--sheet); }
.history-list .thumb { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; background: var(--line); }
.history-list .h-title { font-size: var(--t-s); font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-list .h-meta { font-size: var(--t-xs); color: var(--graphite); display: flex; gap: 10px; }

/* ---------- 接口 ---------- */
.api { padding: 64px 0 24px; }
.api code { background: color-mix(in srgb, var(--line) 55%, transparent); padding: 1px 6px; border-radius: 5px; }
.api-try { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-radius: var(--r-m); background: var(--frame); color: var(--frame-ink); margin-bottom: 18px; }
.api-try code { flex: 1; min-width: 0; background: none; padding: 0; overflow-x: auto; white-space: nowrap; font-size: 13px; }
.api-try .btn { color: var(--frame-ink); flex: none; }
.api-try .btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.api-table { width: 100%; border-collapse: collapse; font-size: var(--t-s); }
.api-table th { text-align: left; font-weight: 600; color: var(--graphite); font-size: var(--t-xs); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-strong); }
.api-table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.api-table td:first-child { white-space: nowrap; }
.api-table td:first-child code { background: none; padding: 0; font-weight: 600; color: var(--ink); }
.api-table td:last-child code { background: none; padding: 0; color: var(--graphite); font-size: 12px; }
.api-table tr.featured td:first-child code { color: var(--marker-ink); }

/* ---------- 页脚 ---------- */
.foot { max-width: 1120px; margin: 40px auto 0; padding: 28px 28px 48px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--graphite); }
.foot p { margin: 0 0 6px; max-width: var(--measure); }

/* ---------- 灯箱 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 15, .92); display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; height: 100vh; justify-content: center; padding: 40px 0; }
.lb-figure img { max-height: calc(100vh - 120px); max-width: 100%; object-fit: contain; border-radius: 6px; }
.lb-figure figcaption { color: rgba(255,255,255,.7); font-size: var(--t-s); display: flex; gap: 16px; align-items: center; }
.lb-figure figcaption a { color: #fff; }
.lb-nav, .lb-close { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; justify-self: center; }
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.18); }
.lb-nav svg, .lb-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { position: absolute; top: 18px; right: 18px; }

/* ---------- 提示 ---------- */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--sheet); padding: 10px 16px; border-radius: 12px; font-size: var(--t-s); box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); animation: toast .28s var(--ease) both; }
.toast.out { animation: toast-out .25s ease forwards; }
@keyframes toast { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .sheet, .loading { grid-template-columns: 1fr; }
  .stage { min-height: 300px; padding: 12px; }
  .info { padding: 24px 20px; }
  .gallery .info { grid-template-columns: 1fr; }
  .api-table td:last-child, .api-table th:last-child { display: none; }
}
@media (max-width: 560px) {
  .top { padding: 16px 18px; }
  main { padding: 0 18px; }
  .field-bar { flex-wrap: wrap; padding: 8px 10px 10px 18px; }
  .mirror, .field textarea { padding: 18px 18px 6px; font-size: 16px; }
  .detect { width: 100%; }
  .field-actions { width: 100%; justify-content: flex-end; }
  .btn.primary { flex: 1; justify-content: center; }
  .btn.primary kbd { display: none; }
  .contact { grid-template-columns: repeat(2, 1fr); padding: 10px; gap: 8px; }
  .lightbox { grid-template-columns: 44px 1fr 44px; }
  .lb-nav { width: 38px; height: 38px; }
  .actions .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
}

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