/*! LSS-COPYRIGHT © 2026 Newmeth · 教具工坊 LSS Toolkit Studio
 * 保留所有权利 / All rights reserved. 非开源；授权见 /license.html
 * 不授权：复制、改写换皮、用作模型训练语料。 */
:root {
  --sv2-ink: #071016;
  --sv2-panel: rgba(8, 17, 23, .86);
  --sv2-line: rgba(178, 211, 220, .19);
  --sv2-cyan: #5bdaf1;
  --sv2-orange: #ff9b51;
  --sv2-cream: #edf5f2;
  --sv2-muted: #92a9af;
  --sv2-mono: "SFMono-Regular", Consolas, monospace;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.sv2-profile { position: relative; }
.sv2-profile__chip { display: flex; align-items: center; gap: .55rem; min-height: 2.6rem; padding: .28rem .7rem .28rem .32rem; color: var(--sv2-cream); border: 1px solid var(--sv2-line); border-radius: 999px; background: rgba(6, 14, 19, .62); backdrop-filter: blur(16px); cursor: pointer; }
.sv2-profile__avatar { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; color: #071016; border-radius: 50%; background: linear-gradient(135deg, var(--sv2-orange), #ffd166); font: 900 .8rem/1 var(--sv2-mono); }
.sv2-profile__chip > span:last-child { display: grid; min-width: 3.4rem; text-align: left; }
.sv2-profile__chip strong { font-size: .72rem; line-height: 1.1; }
.sv2-profile__chip small { margin-top: .18rem; color: var(--sv2-muted); font: 500 .56rem/1 var(--sv2-mono); }
.sv2-profile__panel { position: absolute; z-index: 50; top: calc(100% + .55rem); right: 0; display: none; width: min(19rem, calc(100vw - 1rem)); padding: 1rem; color: var(--sv2-cream); border: 1px solid rgba(91, 218, 241, .3); border-radius: .8rem; background: rgba(5, 13, 18, .96); box-shadow: 0 24px 60px rgba(0, 0, 0, .44); }
.sv2-profile.is-open .sv2-profile__panel { display: grid; gap: .8rem; }
.sv2-profile__panel > div:first-child { display: grid; gap: .3rem; }
.sv2-profile__panel small { color: var(--sv2-cyan); font: 700 .58rem/1 var(--sv2-mono); letter-spacing: .12em; }
.sv2-profile__panel label { display: grid; gap: .32rem; color: var(--sv2-muted); font-size: .68rem; }
.sv2-profile__panel input { width: 100%; padding: .62rem .72rem; color: white; border: 1px solid #344952; border-radius: .4rem; background: #0b171e; }
.sv2-profile__actions { display: flex; justify-content: space-between; gap: .5rem; }
.sv2-profile__actions button { padding: .55rem .75rem; color: var(--sv2-cream); border: 1px solid #41555c; border-radius: .4rem; background: transparent; cursor: pointer; }
.sv2-profile__actions button:last-child { color: #221003; border-color: #ffc18f; background: var(--sv2-orange); font-weight: 800; }

.sv2-faux-fullscreen { position: fixed !important; z-index: 9999 !important; inset: 0 !important; width: 100vw !important; height: 100dvh !important; }
.sv2-fullscreen-lock { overflow: hidden; }

.sv2-ghost-stats { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.sv2-ghost-card { position: relative; min-width: 0; min-height: 12rem; overflow: hidden; padding: .8rem; color: var(--sv2-cream); border: 1px solid var(--sv2-line); border-radius: .75rem; background: rgba(4, 14, 19, .55); cursor: pointer; text-align: left; transition: opacity 180ms ease, border-color 180ms ease, background 180ms ease;
}
.sv2-ghost-card:hover { border-color: rgba(91, 218, 241, .55); }
.sv2-ghost-card > span { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; opacity: .5; }
.sv2-ghost-card small { color: var(--sv2-cyan); font: 700 .56rem/1 var(--sv2-mono); letter-spacing: .08em; }
.sv2-ghost-card strong { font-size: .7rem; }
.sv2-ghost-card canvas { width: 100%; height: 9rem; opacity: .18; }
.sv2-ghost-card em { position: absolute; right: .7rem; bottom: .55rem; color: var(--sv2-muted); font: normal 500 .55rem/1 var(--sv2-mono); opacity: .6; }
.sv2-ghost-card > .sv2-ghost-empty { position: absolute; inset: 1.9rem .8rem 1.35rem; display: grid; place-items: center; color: var(--sv2-muted); font: 500 .72rem/1.4 var(--sv2-sans, "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif); letter-spacing: 0; white-space: nowrap; opacity: .78; pointer-events: none; }
.sv2-ghost-card > .sv2-ghost-empty[hidden] { display: none; }
.sv2-ghost-card > .sv2-chart-labels { position: absolute; inset: 1.9rem .75rem 1.2rem; display: block; color: var(--sv2-muted); font: 650 .7rem/1 var(--sv2-sans, "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif); font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; opacity: .9; pointer-events: none; }
.sv2-ghost-card > .sv2-chart-labels[hidden] { display: none; }
.sv2-chart-labels > span { position: absolute; }
.sv2-chart-labels [data-chart-primary] { top: 0; left: 12px; }
.sv2-chart-labels [data-chart-secondary] { top: 50%; left: 12px; }
.sv2-chart-labels [data-chart-min] { bottom: 0; left: 12px; }
.sv2-chart-labels [data-chart-max] { right: 8px; bottom: 0; }
.sv2-ghost-stats.has-expanded .sv2-ghost-card:not(.is-expanded) { display: none; }
.sv2-ghost-card.is-expanded { grid-column: 1 / -1; min-height: 23rem; color: white; border-color: rgba(91, 218, 241, .65); background: rgba(4, 14, 19, .94); }
.sv2-ghost-card.is-expanded > span, .sv2-ghost-card.is-expanded canvas, .sv2-ghost-card.is-expanded em { opacity: 1; }
.sv2-ghost-card.is-expanded canvas { height: 19rem; }

.sv2-records { color: var(--sv2-cream); }
.sv2-records__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.sv2-records__head > div { display: grid; gap: .25rem; }
.sv2-records__head small { color: var(--sv2-cyan); font: 700 .58rem/1 var(--sv2-mono); letter-spacing: .1em; }
.sv2-records__head strong { font-size: 1rem; }
.sv2-records__head button { padding: .45rem .65rem; color: var(--sv2-muted); border: 1px solid var(--sv2-line); border-radius: .4rem; background: transparent; cursor: pointer; }
.sv2-records__table { position: relative; min-height: 10rem; max-height: 20rem; overflow: auto; border: 1px solid var(--sv2-line); border-radius: .55rem; background: rgba(2, 9, 13, .65); }
.sv2-records table { width: 100%; border-collapse: collapse; white-space: nowrap; font: 500 .63rem/1.3 var(--sv2-mono); }
.sv2-records th { position: sticky; z-index: 2; top: 0; padding: .65rem; color: #aac0c6; border-bottom: 1px solid #35484f; background: #132127; text-align: left; }
.sv2-records td { padding: .58rem .65rem; border-bottom: 1px solid rgba(178, 211, 220, .08); }
.sv2-records tbody tr:hover td { background: rgba(91, 218, 241, .05); }
/* 常显：原来 opacity:0 只在 tr:hover 显形，触屏没有 hover ⇒ 删除功能完全不可达，
   桌面端学员看表格也看不出能删。改为低对比度常显，hover/focus 时加强。 */
.sv2-row-delete { opacity: .62; padding: .25rem .45rem; color: #ffc1b5; border: 1px solid rgba(255, 129, 103, .42); border-radius: .3rem; background: transparent; cursor: pointer; transition: opacity var(--sv2-fast, 150ms) ease, background var(--sv2-fast, 150ms) ease; }
.sv2-records tr:hover .sv2-row-delete, .sv2-row-delete:hover, .sv2-row-delete:focus-visible { opacity: 1; background: rgba(255, 129, 103, .12); }
@media (hover: none) { .sv2-row-delete { opacity: 1; } }
.sv2-export-check { display: inline-flex; gap: .25rem; align-items: center; cursor: pointer; }
.sv2-export-check input { accent-color: var(--sv2-orange); }
.sv2-export-fixed { color: var(--sv2-muted); }
.sv2-records__empty { position: absolute; inset: 2.6rem 0 0; display: grid; place-items: center; color: #71868c; font-size: .74rem; }
.sv2-records__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: .75rem; }
.sv2-records__actions button { min-height: 2.45rem; padding: .55rem .85rem; color: #1c1007; border: 1px solid #ffc18f; border-radius: .4rem; background: var(--sv2-orange); font-weight: 800; cursor: pointer; }
.sv2-records__actions button + button { color: var(--sv2-cream); border-color: #40545b; background: #17262c; }
.sv2-records__actions small { margin-left: auto; color: var(--sv2-muted); }
.sv2-toast-region { position: fixed; z-index: 12000; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; }
.sv2-toast { display: flex; align-items: center; gap: 1.5rem; min-width: 14rem; padding: .8rem 1rem; color: var(--sv2-cream); border: 1px solid rgba(91, 218, 241, .42); border-radius: .55rem; background: #0b181e; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); animation: sv2-toast-in 180ms ease-out; }
.sv2-toast button { margin-left: auto; color: var(--sv2-orange); border: 0; background: transparent; font-weight: 800; cursor: pointer; }
@keyframes sv2-toast-in { from { opacity: 0; transform: translateY(.6rem); } }

@media (max-width: 720px) {
  .sv2-ghost-stats { grid-template-columns: 1fr; }
  /* ⚠ 英文标题比中文长，窄屏下会换到第三行，而卡片是 overflow:hidden 的定高盒
     （实测内容 195px、容器 158px，字直接被切掉）。窄屏让卡片按内容长高。 */
  .sv2-ghost-card { min-height: 10rem; height: auto; overflow: visible; }
  .sv2-ghost-card canvas { height: 7.5rem; }
  .sv2-records__actions small { width: 100%; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sv2-toast, .sv2-ghost-card { animation: none; transition: none; }
}

/* Cross-batch V3 contract: common visible hooks and action collision guard. */
[data-v3-brand] { display: inline-flex; align-items: center; gap: .1rem; width: max-content; text-decoration: none; }
[data-v3-brand] > span { padding-right: .38rem; border-right: 1px solid rgba(220, 232, 232, .18); }
[data-v3-brand] > .newmeth-topbar-mark { display: block; width: auto; height: .82rem; margin: 0 .34rem 0 .42rem; object-fit: contain; }
[data-v3-brand] > strong { padding-left: .28rem; }
[data-data-drawer-handle] { font-size: 0 !important; }
[data-data-drawer-handle] > span, [data-data-drawer-handle] > b, [data-data-drawer-handle] > .v3-global-drawer-copy { font-size: .72rem !important; }
[data-data-drawer-handle] > strong, [data-data-drawer-handle] > i { display: none !important; }
.v3-global-drawer-copy { white-space: nowrap; }
/* 归一化后的手把统一走 flex：f3 那批原本是 grid 四列，注入的说明 span 会被塞进一个
   1px 宽的列，文字溢出压在箭头上（实测 9 页）。盒子不重叠、但画出来的字重叠。 */
/* 主按钮自纠上移量，由归一化在布局后实测写入 */
[data-primary-action] { margin-bottom: var(--sv2-primary-lift, 0) !important; transform: translateX(calc(-1 * var(--sv2-primary-shift, 0))) !important; }
[data-data-drawer-handle] { display: inline-flex !important; align-items: center; gap: .42rem; }
[data-data-drawer-handle] > .v3-global-drawer-copy { flex: 0 1 auto; min-width: 0; }

.v3-global-help { left: 1rem !important; right: auto !important; border-radius: 50% !important; }
.v3-global-primary { z-index: 20 !important; border-radius: 999px !important; }
#fullscreen-stage > [data-primary-action],
#fullscreen-stage [data-v3-hud] [data-primary-action],
#fullscreen-stage .v3-controls [data-primary-action],
#fullscreen-stage .f3-controls [data-primary-action] {
  position: absolute !important; right: 1.15rem; bottom: 6.9rem; left: auto !important;
  min-height: 3.4rem; padding: .8rem 1.5rem !important;
  box-shadow: 0 16px 40px rgba(242, 145, 61, .3) !important;
}
@media (max-width: 768px) {
  #fullscreen-stage > [data-primary-action],
  #fullscreen-stage [data-v3-hud] [data-primary-action],
  #fullscreen-stage .v3-controls [data-primary-action],
  #fullscreen-stage .f3-controls [data-primary-action] { right: .6rem; bottom: 6.2rem; }
}
#fullscreen-stage .t5-live [data-primary-action],
#t5-fullscreen-stage .t5-live [data-primary-action] {
  position: fixed !important; right: 1.15rem; bottom: 5.6rem; left: auto !important; float: none !important;
  min-height: 3.4rem; padding: .8rem 1.5rem !important; box-shadow: 0 16px 40px rgba(242, 145, 61, .3) !important;
}
#fullscreen-stage [data-v3-hud] [data-primary-action] {
  position: fixed !important; right: 1.15rem; bottom: 5.6rem; left: auto !important;
  min-height: 3.4rem; padding: .8rem 1.5rem !important; border-radius: 999px !important;
  box-shadow: 0 16px 40px rgba(242, 145, 61, .3) !important;
}

.v3-t4-stage:has([data-v3-hud] [data-primary-action]) .v3-t4-primary { bottom: 10.4rem; }
@media (max-width: 768px) {
  #fullscreen-stage .t5-live [data-primary-action],
  #t5-fullscreen-stage .t5-live [data-primary-action],
  #fullscreen-stage [data-v3-hud] [data-primary-action] { right: .6rem; bottom: 5rem; }
  .v3-t4-stage:has([data-v3-hud] [data-primary-action]) .v3-t4-primary { bottom: 9.6rem; }
}

.t5-live .v3-global-primary { position: sticky !important; right: 1rem; bottom: 1rem; float: right; min-height: 3.2rem; padding: .65rem 1rem !important; box-shadow: 0 12px 34px rgba(242, 145, 61, .32) !important; }
@media (max-width: 768px) {
  [data-v3-brand] > strong { display: none; }
  .v3-global-drawer-copy { font-size: .64rem !important; }
  .t5-live .v3-global-primary { right: .5rem; bottom: .5rem; }
}

/* 主行动安全区：主按钮固定在右下后，会反向压住因子档位/动作卡/选项这些可点目标
   （实测 1440px 13 页 21 处、390px 18 页 51 处）。给舞台上这些控件容器留出主按钮的位置：
   宽屏让出右侧一列，窄屏让出底部一行。 */
#fullscreen-stage .v3-factors,
#fullscreen-stage [data-v3-hud],
#fullscreen-stage .v3-controls,
#fullscreen-stage .f3-controls,
#fullscreen-stage .t3-choices,
#t5-fullscreen-stage .t5-live {
  --sv2-primary-gutter: 12.5rem;
}
@media (min-width: 769px) {
  #fullscreen-stage .v3-factors,
  #fullscreen-stage [data-v3-hud],
  #fullscreen-stage .v3-controls,
  #fullscreen-stage .f3-controls { padding-right: var(--sv2-primary-gutter) !important; }
  #fullscreen-stage .t3-choices { max-width: calc(100% - var(--sv2-primary-gutter)); }
}
/* ⚠ 这个 @media 块曾经少了一个 `}`：`padding-bottom:4.6rem !important;` 后面直接跟了下一条
   选择器列表，于是 6.2rem / 5.4rem 两条被解析器整条丢弃，窄屏让位从来没生效过
   （实测 390px 下 .t5-live 的 padding-bottom 恒为 5.6rem——那是最后那条全局规则）。
   改动这段时先在浏览器里读 computed 值，别只看源码。 */
@media (max-width: 768px) {
  #fullscreen-stage .v3-factors,
  #fullscreen-stage [data-v3-hud],
  #fullscreen-stage .v3-controls,
  #fullscreen-stage .f3-controls { padding-bottom: 4.6rem !important; }
  #t5-fullscreen-stage .t5-live,
  #fullscreen-stage #t3-panel-body,
  #fullscreen-stage .v3-t4-panel { padding-bottom: 6.2rem !important; }
  #fullscreen-stage .t3-choices { bottom: var(--sv2-choices-bottom, 12.6rem); }
}
#t5-fullscreen-stage .t5-live,
#fullscreen-stage #t3-panel-body,
#fullscreen-stage .v3-t4-panel { padding-bottom: 5.6rem !important; }
#fullscreen-stage .t3-choices { max-width: calc(100% - 13rem); bottom: var(--sv2-choices-bottom, 7.4rem); }

/* ── 主行动停靠位 ────────────────────────────────────────────────────────────
   铺满整块的网格（点位格/任务格/数字格）靠上移与左移都清不掉：格子占满可用区，
   浮动按钮无论挪到哪都压在某个格子上，而且滚动一下压住的还换一批。
   唯一「任何滚动位置都不重叠」的构造是把按钮移出滚动区——把舞台底边抬高一条，
   按钮占住抬出来的那条。由 studio-v2.js 在实测清不掉时给 <html> 打 data-sv2-dock。 */
:root { --sv2-dock-h: 4.4rem; }
/* ⚠ .t5-live 有 backdrop-filter —— 它会成为 position:fixed 后代的**包含块**，
   于是按钮的 bottom 是相对舞台底边算的，永远escape不出舞台（实测：设了 bottom:3.9rem，
   拿到的 rect.bottom 仍在舞台内 703px 处）。停靠时必须把它关掉，fixed 才重新相对视口。 */
html[data-sv2-dock] #t5-fullscreen-stage .t5-live { bottom: calc(3.9rem + var(--sv2-dock-h)) !important; padding-bottom: 1.2rem !important; backdrop-filter: none !important; }
html[data-sv2-dock] #t5-fullscreen-stage .t5-live [data-primary-action],
html[data-sv2-dock] #t5-fullscreen-stage .t5-live .v3-global-primary {
  position: fixed !important; right: 1.2rem !important; left: 1.2rem !important;
  bottom: 3.9rem !important; float: none !important;
  display: flex !important; align-items: center; justify-content: center;
  width: auto !important; min-height: calc(var(--sv2-dock-h) - .5rem) !important;
  margin: 0 !important; padding: .8rem 1.5rem !important; transform: none !important;
  border-radius: .85rem !important; box-shadow: 0 -10px 34px rgba(0, 0, 0, .35) !important;
}
/* 停靠条占了原来「?」的位置，把它抬到条子上方 */
html[data-sv2-dock] .v3-global-help { bottom: calc(3.9rem + var(--sv2-dock-h) + .8rem) !important; }
@media (max-width: 768px) {
  html[data-sv2-dock] { --sv2-dock-h: 4rem; }
  html[data-sv2-dock] .v3-global-help { bottom: calc(3.55rem + var(--sv2-dock-h) + .7rem) !important; }
  html[data-sv2-dock] #t5-fullscreen-stage .t5-live { right: .55rem; left: .55rem; bottom: calc(3.55rem + var(--sv2-dock-h)) !important; }
  html[data-sv2-dock] #t5-fullscreen-stage .t5-live [data-primary-action],
  html[data-sv2-dock] #t5-fullscreen-stage .t5-live .v3-global-primary { right: .55rem !important; left: .55rem !important; bottom: 3.55rem !important; }
}

/* 句读级不可断：中文无词间空格，不包起来浏览器会在词中间折行 */
.sv2-clause { display: inline-block; max-width: 100%; }

/* 铺满整块的网格/列表：主按钮浮在右下会压住最后一行的格子。
   给容器补出按钮的高度，最后一行就永远不在按钮底下。 */
#fullscreen-stage .dot-board,
#fullscreen-stage .task-grid,
#fullscreen-stage .matrix,
#t5-fullscreen-stage .dot-board,
#t5-fullscreen-stage .task-grid,
#t5-fullscreen-stage .matrix,
#t5-fullscreen-stage .ae__rank { padding-bottom: 5.6rem !important; }

/* 前置动作提示：主按钮点下去要把「该做的那一步」指出来 */
.sv2-pick-hint { outline: 2px solid var(--sv2-orange); outline-offset: 4px; border-radius: .5rem; animation: sv2-pick 1.6s ease; }
@keyframes sv2-pick { 0%,100% { outline-color: rgba(255,155,81,.25); } 30% { outline-color: rgba(255,155,81,1); } }
@media (prefers-reduced-motion: reduce) { .sv2-pick-hint { animation: none; } }

/* ── 中英切换 ────────────────────────────────────────────────────────────────
   英文模式下先藏住 body，等词典替换完再显示；i18n.js 里有 1.2s 兜底，
   词典拉不到也不会一直白屏。 */
html[data-i18n-pending] body { visibility: hidden; }
.lss-lang { display: inline-flex; overflow: hidden; align-items: stretch; border: 1px solid rgba(220, 232, 232, .28); border-radius: 999px; }
.lss-lang button { min-width: 2.3rem; padding: .3rem .55rem; color: var(--sv2-cream, #edf5f2); border: 0; background: transparent; font: 800 .62rem/1 var(--sv2-mono, monospace); letter-spacing: .06em; cursor: pointer; }
.lss-lang button[aria-pressed="true"] { color: #1c1007; background: var(--sv2-orange, #ff9b51); }
.lss-lang button:focus-visible { outline: 2px solid var(--sv2-cyan, #5bdaf1); outline-offset: -2px; }
@media (max-width: 768px) { .lss-lang button { min-width: 2rem; padding: .28rem .4rem; font-size: .58rem; } }

/* 英文标签比中文多一行，定高胶囊里的字会溢出（实测内容 80px、容器 69px）。
   页级 CSS 先于 studio-v2.css 加载，所以修正必须写在这里才压得住。 */
#fullscreen-stage .launch-button,
#fullscreen-stage [data-primary-action] { height: auto !important; }


/* 停靠位（非 T5 壳）：两轴都让不开时，主行动改成底部整条，
   把原本贴底的读数/控制条一起顶上去。窄屏英文最容易走到这一步。 */
html[data-sv2-dock] #fullscreen-stage [data-primary-action],
html[data-sv2-dock] #fullscreen-stage .launch-button,
html[data-sv2-dock] #fullscreen-stage .t3-action {
  position: fixed !important; right: 1.1rem !important; left: 1.1rem !important;
  bottom: 1rem !important; width: auto !important; max-width: none !important;
  display: flex !important; align-items: center; justify-content: center;
  min-height: calc(var(--sv2-dock-h) - .4rem) !important; margin: 0 !important;
  transform: none !important; border-radius: .85rem !important;
}
html[data-sv2-dock] #fullscreen-stage .t3-result,
html[data-sv2-dock] #fullscreen-stage .t3-choices,
html[data-sv2-dock] #fullscreen-stage .t3-choice,
html[data-sv2-dock] #fullscreen-stage [data-v3-hud],
html[data-sv2-dock] #fullscreen-stage .f3-controls,
html[data-sv2-dock] #fullscreen-stage .v3-controls,
html[data-sv2-dock] #fullscreen-stage .v3-factors {
  bottom: calc(1rem + var(--sv2-dock-h) + .7rem) !important;
}
html[data-sv2-dock] #fullscreen-stage .v3-global-help { bottom: calc(1rem + var(--sv2-dock-h) + .8rem) !important; }
@media (max-width: 768px) {
  /* 窄屏英文的分支选项会换行长高，停靠条要再让出一截 */
  html[data-sv2-dock] #fullscreen-stage .t3-choices { bottom: calc(1rem + var(--sv2-dock-h) + 1.4rem) !important; max-height: 40vh; overflow: auto; }
}
