/*
 * Light Train · 菜单场景与浮层（S3 分支 C）。只写 .lt-scr-* / .lt-overlay 自己的选择器，不覆盖组件库 .gs-*。
 * 位置全部由 screens.mjs 按 SCREEN_SPEC 的矩形写进 style（照图施工）；这里只管质感：深靛玻璃、霓虹描边、
 * 本作九宫格位图（ART_PLAN ui_is_dom：按钮 / 面板 / 卡片 / 开关 / 胶囊 / 模式切换），缺图时 CSS 替身。
 * 字号随画布缩放：--k = min(宽 / 360, 高 / 640)（screens.mjs 写进每个场景根）。
 */

.lt-scr, .lt-overlay {
  -webkit-text-size-adjust: 100%;
  position: absolute;
  inset: 0;
  color: #FFFFFF;
  font-family: var(--lt-font-body);
  -webkit-tap-highlight-color: transparent;
}
.lt-scr { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; z-index: 2; }
.lt-scr-content { position: relative; width: 100%; }
/* SPEC 分区容器（zoneify 装进来的）：坐标系 = 分区矩形，内容超出会被走查的 zone-overflow 如实量到 */
.lt-scr-zone { position: absolute; box-sizing: border-box; }
.lt-scr--dim50::before {
  content: ""; position: absolute; inset: 0; background: rgba(7, 6, 26, 0.5); pointer-events: none;
}
.lt-scr--error { background: linear-gradient(180deg, rgba(17, 14, 51, 0.55), rgba(7, 6, 26, 0.85)); }
.lt-scr-sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.lt-scr .is-missing, .lt-overlay .is-missing { visibility: hidden; }
/* hidden 必须赢过类上的 display（put() 没有矩形时、空的「下一颗星」行都靠它藏起来） */
.lt-scr [hidden], .lt-overlay [hidden] { display: none !important; }

/* ── 字 ── */
.lt-scr-name {
  margin: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--lt-font-display); font-weight: 800; letter-spacing: 0.02em; line-height: 1.15;
  font-size: calc(40px * var(--k, 1));
  color: #EFFFF7;
  text-shadow: 0 0 6px rgba(98, 255, 180, 0.9), 0 0 18px rgba(98, 255, 180, 0.55), 0 3px 0 #1D1852;
}
.lt-scr-tagline, .lt-scr-loading-text {
  margin: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: max(15px, calc(15px * var(--k, 1))); color: #E4E4FF; line-height: 1.25;
}
.lt-scr-loading-text { color: var(--lt-muted); }
/* 只给标题字用：标题页场景根也叫 .lt-scr-title（.lt-scr-<场景名>），不能让它变成居中的 flex（342×403 时头部按钮被居中到视口外） */
.lt-scr-title:not(.lt-scr) {
  margin: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--lt-font-display); font-weight: 800; line-height: 1.05;
  font-size: calc(28px * var(--k, 1)); color: var(--lt-cream);
  text-shadow: 0 0 10px rgba(255, 181, 71, 0.55), 0 2px 0 #1D1852;
}

/* ── logo / 加载条 ── */
.lt-scr-logo { display: flex; align-items: center; justify-content: center; }
.lt-scr-logo-img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(7, 6, 26, 0.6)); }
.lt-scr-logo-glow {
  position: absolute; left: 50%; top: 22%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 244, 201, 0.95), rgba(255, 244, 201, 0) 65%) center / contain no-repeat;
  mix-blend-mode: screen; pointer-events: none; transition: opacity 240ms ease-out;
}
.lt-scr-progress {
  border-radius: 999px; overflow: hidden; background: rgba(7, 6, 26, 0.65);
  box-shadow: inset 0 0 0 1px rgba(91, 95, 214, 0.7), 0 0 12px rgba(63, 230, 255, 0.25);
}
.lt-scr-progress-fill {
  height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--lt-track-0), var(--lt-track-1), var(--lt-track-2));
  box-shadow: 0 0 10px rgba(98, 255, 180, 0.6); transition: width 200ms ease-out;
}

/* ── 按钮 ── */
.lt-scr-btn, .lt-scr-card-btn, .lt-scr-seg, .lt-scr-toggle {
  box-sizing: border-box; margin: 0; padding: 0 4px; min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 6px; container-type: inline-size;
  font: inherit; font-weight: 800; color: #FFFFFF; cursor: pointer; touch-action: manipulation; user-select: none;
  border-style: solid; border-color: transparent; border-width: 0;
  transition: transform 90ms ease-out, filter 90ms ease-out;
}
.lt-scr-btn:active, .lt-scr-card-btn:active, .lt-scr-seg:active, .lt-scr-toggle:active { transform: translateY(2px) scale(0.98); filter: brightness(0.9); }
.lt-scr-btn:focus-visible, .lt-scr-card-btn:focus-visible, .lt-scr-seg:focus-visible, .lt-scr-toggle:focus-visible {
  outline: 3px solid var(--lt-track-0); outline-offset: 3px;
}
/* 胶囊按钮的九宫格位图两端被横向压过，CSS 圆角的焦点环贴不上它：改成沿位图轮廓（alpha）发的青光 */
.lt-scr-btn--primary:focus-visible, .lt-scr-btn--secondary:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 1.5px #3FE6FF) drop-shadow(0 0 1.5px #3FE6FF) drop-shadow(0 0 6px rgba(63, 230, 255, 0.85));
}
.lt-scr-ico--inline { display: inline-block; vertical-align: -0.2em; margin-right: 8px; }
.lt-scr-row-text { display: block; min-width: 0; }
.lt-scr-mask {
  display: inline-block; background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.lt-scr-ico { width: calc(20px * var(--k, 1)); height: calc(20px * var(--k, 1)); min-width: 16px; min-height: 16px; flex: none; }
.lt-scr-btn-label {
  min-width: 0; font-size: max(15px, calc(17px * var(--k, 1))); line-height: 1.1; text-align: center;
  white-space: normal; overflow-wrap: anywhere;
}
.lt-scr-btn-sub { min-width: 0; font-size: max(13px, calc(13px * var(--k, 1))); font-weight: 700; opacity: 0.9; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
/* 窄按钮先让出图标，把宽度留给字（文字不裁、不省略号） */
@container (max-width: 112px) {
  .lt-scr-btn:not(.lt-scr-btn--icon) > .lt-scr-ico, .lt-scr-seg > .lt-scr-ico { display: none; }
}

.lt-scr-btn--primary {
  border-radius: 999px; color: #15123A;
  background: linear-gradient(180deg, #9DFFD2, #62FFB4 55%, #2FD08A);
  box-shadow: 0 0 18px rgba(98, 255, 180, 0.45), inset 0 -4px 0 rgba(21, 18, 58, 0.25);
  border-width: 0 calc(14px * var(--k, 1));
  border-image-source: url("./assets/ui-btn-primary@2x.webp");
  border-image-source: image-set(url("./assets/ui-btn-primary@1x.webp") 1x, url("./assets/ui-btn-primary@2x.webp") 2x);
  border-image-slice: 0 16.667% fill; border-image-repeat: stretch;
}
.lt-scr-btn--primary:active {
  border-image-source: image-set(url("./assets/ui-btn-primary-press@1x.webp") 1x, url("./assets/ui-btn-primary-press@2x.webp") 2x);
}
.lt-scr-stars .lt-scr-ico, .lt-scr-result-row [data-icon="icon-star"] { color: var(--lt-gold); }
.lt-scr-card-btn .lt-scr-ico { color: var(--lt-track-0); }
.lt-scr-card-btn.is-locked .lt-scr-ico, .lt-scr-line-locked .lt-scr-ico { color: var(--lt-muted); }
.lt-scr-toggle .lt-scr-ico { color: var(--lt-track-0); }
.lt-scr-btn--secondary, .lt-scr-btn--locked {
  border-radius: 999px;
  background: linear-gradient(180deg, #3A2F8F, #241D66);
  box-shadow: inset 0 0 0 2px rgba(155, 107, 255, 0.85), 0 0 14px rgba(155, 107, 255, 0.35);
  border-width: 0 calc(14px * var(--k, 1));
  border-image-source: image-set(url("./assets/ui-btn-secondary@1x.webp") 1x, url("./assets/ui-btn-secondary@2x.webp") 2x);
  border-image-slice: 0 16.667% fill; border-image-repeat: stretch;
}
.lt-scr-btn--secondary:active {
  border-image-source: image-set(url("./assets/ui-btn-secondary-press@1x.webp") 1x, url("./assets/ui-btn-secondary-press@2x.webp") 2x);
}
.lt-scr-btn--locked { filter: saturate(0.2) brightness(0.8); color: var(--lt-muted); }
.lt-scr-btn--locked .lt-scr-btn-label { font-size: max(14px, calc(14px * var(--k, 1))); }
.lt-scr-btn--hero { flex-direction: column; gap: 2px; }
.lt-scr-btn--hero .lt-scr-ico { position: absolute; left: calc(24px * var(--k, 1)); width: calc(30px * var(--k, 1)); height: calc(30px * var(--k, 1)); }
.lt-scr-btn--hero .lt-scr-btn-label { font-family: var(--lt-font-display); font-size: calc(34px * var(--k, 1)); }
.lt-scr-btn--wide { justify-content: flex-start; padding-left: calc(18px * var(--k, 1)); }
.lt-scr-btn--wide .lt-scr-btn-sub { margin-left: auto; color: var(--lt-gold); }
.lt-scr-btn--icon {
  padding: 0; border-radius: 50%; background: rgba(23, 20, 63, 0.85);
  box-shadow: inset 0 0 0 2px rgba(91, 95, 214, 0.9), 0 0 12px rgba(91, 95, 214, 0.4);
}
.lt-scr-btn--icon .lt-scr-ico { width: 56%; height: 56%; }
.is-nudge { animation: lt-scr-nudge 320ms ease-out; }
@keyframes lt-scr-nudge { 0%, 100% { translate: 0 0; } 25% { translate: -5px 0; } 50% { translate: 5px 0; } 75% { translate: -3px 0; } }

/* 标题页两张入口卡 */
.lt-scr-card-btn {
  flex-direction: column; border-radius: 20px; text-align: center;
  background: linear-gradient(180deg, rgba(41, 36, 110, 0.92), rgba(23, 20, 63, 0.92));
  box-shadow: inset 0 0 0 2px rgba(255, 212, 71, 0.75), 0 0 16px rgba(255, 212, 71, 0.25);
  border-width: calc(10px * var(--k, 1));
  border-image-source: image-set(url("./assets/ui-card@1x.webp") 1x, url("./assets/ui-card@2x.webp") 2x);
  border-image-slice: 18.75% fill; border-image-repeat: stretch;
  padding: 2px;
}
.lt-scr-card-btn .lt-scr-ico { width: calc(34px * var(--k, 1)); height: calc(34px * var(--k, 1)); }
.lt-scr-card-btn .lt-scr-btn-label { font-family: var(--lt-font-display); font-size: max(16px, calc(19px * var(--k, 1))); white-space: normal; }
.lt-scr-card-btn .lt-scr-btn-sub { font-size: max(13px, calc(13px * var(--k, 1))); color: var(--lt-gold); white-space: normal; }
.lt-scr-card-btn { overflow: hidden; isolation: isolate; }
.lt-scr-entry-art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: -2; pointer-events: none;
}
.lt-scr-card-btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 6, 26, 0.55), transparent 35%, rgba(7, 6, 26, 0.92));
}
.lt-scr-card-btn > .lt-scr-btn-label { order: -1; margin-bottom: auto; text-shadow: 0 2px 4px #07061A; }
.lt-scr-card-btn > .lt-scr-ico { margin-top: auto; }
.lt-scr-card-btn.is-tight > .lt-scr-ico { display: none; }
.lt-scr-card-btn.is-tight > .lt-scr-btn-sub { margin-top: auto; line-height: 1.05; }
.lt-scr-card-btn.is-locked .lt-scr-entry-art { filter: saturate(0.4) brightness(0.65); }
.lt-scr-card-btn.is-locked {
  box-shadow: inset 0 0 0 2px rgba(138, 143, 184, 0.6);
  border-image-source: image-set(url("./assets/ui-card-locked@1x.webp") 1x, url("./assets/ui-card-locked@2x.webp") 2x);
}
.lt-scr-card-btn.is-locked .lt-scr-btn-sub { color: var(--lt-muted); }

/* 胶囊 */
.lt-scr-chip {
  box-sizing: border-box; margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; font-weight: 800; font-size: max(15px, calc(16px * var(--k, 1))); white-space: nowrap;
  background: rgba(23, 20, 63, 0.85); box-shadow: inset 0 0 0 1px rgba(169, 170, 219, 0.6);
  border-style: solid; border-color: transparent; border-width: 0 calc(14px * var(--k, 1));
  border-image-source: image-set(url("./assets/ui-chip@1x.webp") 1x, url("./assets/ui-chip@2x.webp") 2x);
  border-image-slice: 0 18.75% fill; border-image-repeat: stretch;
}
.lt-scr-stars .lt-scr-ico { filter: drop-shadow(0 0 4px rgba(255, 212, 71, 0.8)); }

/* ── 线路图 ── */
.lt-scr-list { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.lt-scr-list-inner { position: relative; width: 100%; }
.lt-scr-line-card {
  box-sizing: border-box; border-radius: 22px;
  background: linear-gradient(180deg, rgba(41, 36, 110, 0.94), rgba(17, 14, 51, 0.94));
  box-shadow: inset 0 0 0 2px rgba(255, 181, 71, 0.7), 0 8px 24px rgba(7, 6, 26, 0.55);
}
.lt-scr-line-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: calc(14px * var(--k, 1)) solid transparent;
  border-image-source: image-set(url("./assets/ui-card@1x.webp") 1x, url("./assets/ui-card@2x.webp") 2x);
  border-image-slice: 18.75%; border-image-repeat: stretch;
}
.lt-scr-line-card.is-locked { box-shadow: inset 0 0 0 2px rgba(138, 143, 184, 0.55), 0 8px 24px rgba(7, 6, 26, 0.55); }
.lt-scr-line-card.is-locked::before { border-image-source: image-set(url("./assets/ui-card-locked@1x.webp") 1x, url("./assets/ui-card-locked@2x.webp") 2x); }
.lt-scr-line-art {
  overflow: hidden; border-radius: 12px;
  background: linear-gradient(180deg, var(--sky), var(--sky-hi));
  box-shadow: inset 0 0 0 2px var(--neon);
}
.lt-scr-line-art-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lt-scr-line-art.is-locked .lt-scr-line-art-img { filter: grayscale(1) brightness(0.4); }
.lt-scr-line-art-lock { position: absolute; left: 50%; top: 50%; width: 36%; height: 50%; transform: translate(-50%, -50%); object-fit: contain; }
.lt-scr-line-name {
  margin: 0; display: flex; align-items: center; font-family: var(--lt-font-display); font-weight: 800;
  font-size: max(16px, calc(21px * var(--k, 1))); color: var(--lt-cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lt-scr-line-best { margin: 0; display: flex; align-items: center; justify-content: flex-end; font-weight: 800; font-size: max(13px, calc(14px * var(--k, 1))); color: var(--lt-gold); white-space: nowrap; }
.lt-scr-line-card--daily .lt-scr-line-best { justify-content: flex-start; }
.lt-scr-line-new { margin: 0; display: flex; align-items: center; font-size: max(13px, calc(13px * var(--k, 1))); color: #D9DAF7; line-height: 1.15; overflow: hidden; }
.lt-scr-line-locked { margin: 0; display: flex; align-items: center; gap: 6px; font-size: max(13px, calc(14px * var(--k, 1))); color: var(--lt-muted); line-height: 1.2; }
.lt-scr-starrow { display: flex; align-items: center; gap: 4px; }
.lt-scr-starrow .lt-scr-star { height: 100%; aspect-ratio: 1; object-fit: contain; }
.lt-scr-star.is-off { opacity: 0.55; filter: grayscale(0.6); }
/* 模式页签：与 Play 一样的胶囊（ui-seg-* 位图是方角，拉成胶囊会变形，这里用同色系 CSS 画）；选中 = 薄荷底 + 深字 */
.lt-scr-seg {
  border-radius: 999px; font-size: max(14px, calc(14px * var(--k, 1))); padding: 0 6px;
  background: linear-gradient(180deg, #2E2672, #1B1650); box-shadow: inset 0 0 0 2px rgba(255, 95, 184, 0.8), 0 0 10px rgba(255, 95, 184, 0.25);
}
.lt-scr-seg .lt-scr-btn-label { font-size: inherit; }
.lt-scr-seg[aria-pressed="true"] {
  color: #15123A;
  background: linear-gradient(180deg, #B6FFE0, #62FFB4 60%, #2FD08A);
  box-shadow: inset 0 0 0 2px #E8FFF5, 0 0 12px rgba(98, 255, 180, 0.55);
}
.lt-scr-seg[aria-pressed="true"] .lt-scr-ico { color: #15123A; }
.lt-scr-seg[aria-disabled="true"] { filter: saturate(0.25) brightness(0.8); color: var(--lt-muted); }
.lt-scr-line-card .lt-scr-btn--primary { border-width: 0 calc(10px * var(--k, 1)); }

/* ── 帮助 ── */
.lt-scr-help-body {
  box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: calc(16px * var(--k, 1)) calc(18px * var(--k, 1)) calc(36px * var(--k, 1)); border-radius: 20px;
  background: rgba(17, 14, 51, 0.9);
  box-shadow: inset 0 0 0 2px rgba(91, 95, 214, 0.75), 0 10px 30px rgba(7, 6, 26, 0.6);
  /* 可滚：底部渐隐，被面板底边切到的那一行看得出是「还有」而不是被裁 */
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 64px), rgba(0, 0, 0, 0.1) calc(100% - 6px), rgba(0, 0, 0, 0.9) 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 64px), rgba(0, 0, 0, 0.1) calc(100% - 6px), rgba(0, 0, 0, 0.9) 100%);
}
.lt-scr-help-sec + .lt-scr-help-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(91, 95, 214, 0.45); }
.lt-scr-help-head { margin: 0 0 8px; font-family: var(--lt-font-display); font-size: max(18px, calc(20px * var(--k, 1))); color: var(--lt-cream); }
.lt-scr-help-p, .lt-scr-help-item, .lt-scr-help-faq dd { font-size: max(15px, calc(15px * var(--k, 1))); line-height: 1.4; color: #E4E4FF; }
.lt-scr-help-p { margin: 0 0 8px; }
.lt-scr-help-list { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.lt-scr-help-list.has-art { list-style: none; padding-left: 0; }
.lt-scr-help-list.has-art .lt-scr-help-item { display: flex; align-items: center; gap: 12px; }
.lt-scr-help-art {
  flex: none; width: 52px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(7, 6, 26, 0.7); box-shadow: inset 0 0 0 1px rgba(91, 95, 214, 0.6);
}
.lt-scr-help-art img { width: 96%; height: 96%; object-fit: contain; }
.lt-scr-help-art .lt-scr-mask { width: 78%; height: 84%; color: var(--lt-track-0); }
.lt-scr-help-ring::after {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid #B9A6FF; box-shadow: 0 0 10px rgba(185, 166, 255, 0.8);
}
.lt-scr-help-faq { margin: 0; }
.lt-scr-help-faq dt { margin-top: 10px; font-weight: 800; font-size: max(15px, calc(15px * var(--k, 1))); color: #FFFFFF; }
.lt-scr-help-faq dd { margin: 4px 0 0; }

/* ── 涂装 ── */
.lt-scr-skin-card {
  box-sizing: border-box; border-radius: 20px;
  background: linear-gradient(180deg, rgba(41, 36, 110, 0.9), rgba(17, 14, 51, 0.92));
  box-shadow: inset 0 0 0 2px var(--skin-glow, #5B5FD6), 0 0 16px color-mix(in srgb, var(--skin-glow, #5B5FD6) 40%, transparent);
}
.lt-scr-skin-card.is-locked { box-shadow: inset 0 0 0 2px rgba(138, 143, 184, 0.5); }
.lt-scr-skin-card.is-current { box-shadow: inset 0 0 0 3px var(--lt-gold), 0 0 22px rgba(255, 212, 71, 0.5); }
.lt-scr-skin-preview { position: absolute; left: 4%; top: 4%; width: 92%; height: 52%; }
/* 锁着的涂装照样看得出颜色（压暗、去一半饱和），上面压一把锁 */
.lt-scr-skin-card.is-locked .lt-scr-skin-preview { filter: saturate(0.5) brightness(0.62); }
.lt-scr-skin-card .lt-scr-btn--locked .lt-scr-btn-label { white-space: nowrap; overflow-wrap: normal; }
.lt-scr-skin-lock {
  position: absolute; left: 50%; top: 30%; width: 22%; height: 22%; transform: translate(-50%, -50%);
  color: #FFFFFF; filter: drop-shadow(0 0 6px rgba(7, 6, 26, 0.9)); pointer-events: none;
}
.lt-scr-skin-name {
  position: absolute; left: 4%; right: 4%; top: 57%; margin: 0; text-align: center; font-weight: 800;
  font-size: max(15px, calc(16px * var(--k, 1))); color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lt-scr-skin-card .lt-scr-btn { padding: 0 2px; border-width: 0 calc(10px * var(--k, 1)); }
.lt-scr-skin-card .lt-scr-btn-label { font-size: max(14px, calc(15px * var(--k, 1))); }

/* ── 加载失败 ── */
.lt-scr-error-art { display: flex; align-items: flex-end; justify-content: center; }
.lt-scr-error-track {
  position: absolute; left: 20%; right: 20%; bottom: 4%; height: 10%; border-radius: 999px;
  background: linear-gradient(90deg, rgba(43, 39, 102, 0), #2B2766 20%, #2B2766 80%, rgba(43, 39, 102, 0));
  box-shadow: 0 0 14px rgba(63, 230, 255, 0.25);
}
.lt-scr-error-engine { position: relative; height: 82%; max-width: 70%; object-fit: contain; filter: saturate(0.4) brightness(0.65); }
.lt-scr-error-text {
  margin: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: max(16px, calc(18px * var(--k, 1))); line-height: 1.35; color: #E4E4FF;
}

/* ═══════════════════ 浮层 ═══════════════════ */
.lt-overlay { z-index: 20; }
.lt-scr-backdrop {
  position: absolute; inset: 0; background: rgba(7, 6, 26, var(--dim, 0.7));
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lt-scr-ov-scroll { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.lt-scr-panel {
  box-sizing: border-box; border-radius: 26px;
  background: rgba(23, 20, 63, 0.9);
  box-shadow: inset 0 0 0 2px rgba(63, 230, 255, 0.7), 0 0 24px rgba(63, 230, 255, 0.25), 0 16px 40px rgba(7, 6, 26, 0.6);
}
.lt-scr-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: calc(22px * var(--k, 1)) solid transparent;
  border-image-source: image-set(url("./assets/ui-panel@1x.webp") 1x, url("./assets/ui-panel@2x.webp") 2x);
  border-image-slice: 25% fill; border-image-repeat: stretch;   /* fill：面板中间也用位图的玻璃底，不再露出边框与底色之间的竖缝 */
}
.lt-scr-ov-title {
  font-size: calc(32px * var(--k, 1)); color: #FFFFFF; border-radius: 999px;
  text-shadow: 0 0 12px rgba(63, 230, 255, 0.7), 0 2px 0 #1D1852, 0 0 18px #07061A, 0 0 28px #07061A;
  background: radial-gradient(closest-side, rgba(7, 6, 26, 0.85), rgba(7, 6, 26, 0.55) 60%, rgba(7, 6, 26, 0));
}

/* 设置行 */
.lt-scr-toggle {
  justify-content: flex-start; border-radius: 16px; padding: 0 calc(12px * var(--k, 1));
  background: rgba(7, 6, 26, 0.6); box-shadow: inset 0 0 0 1px rgba(91, 95, 214, 0.65); text-align: left;
}
.lt-scr-toggle-label { flex: 1 1 auto; min-width: 0; font-size: max(15px, calc(15px * var(--k, 1))); line-height: 1.2; overflow-wrap: anywhere; }
.lt-scr-toggle-state { flex: none; font-size: max(13px, calc(13px * var(--k, 1))); color: var(--lt-muted); }
.lt-scr-toggle.is-on .lt-scr-toggle-state { color: var(--lt-track-1); }
.lt-scr-switch {
  position: relative; flex: none; width: calc(48px * var(--k, 1)); height: calc(28px * var(--k, 1)); border-radius: 999px;
  background: #3A3560 image-set(url("./assets/ui-toggle-off@1x.webp") 1x, url("./assets/ui-toggle-off@2x.webp") 2x) center / 100% 100% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(169, 170, 219, 0.5);
}
.lt-scr-toggle.is-on .lt-scr-switch {
  background: #2FD08A image-set(url("./assets/ui-toggle-on@1x.webp") 1x, url("./assets/ui-toggle-on@2x.webp") 2x) center / 100% 100% no-repeat;
}
.lt-scr-switch-knob {
  position: absolute; top: 12%; left: 8%; height: 76%; aspect-ratio: 1; border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 2px 4px rgba(7, 6, 26, 0.5); transition: left 120ms ease-out;
}
.lt-scr-toggle.is-on .lt-scr-switch-knob { left: 50%; }

/* 暂停：线路胶囊 */
.lt-scr-line-chip { flex-direction: column; gap: 4px; font-size: max(14px, calc(14px * var(--k, 1))); }
/* 暂停面板的线名胶囊：「Linha das Lanternas · Normal · Percurso: 6%」一行在 320 宽伸出胶囊两侧——允许折成两行（格高装得下两行 + 进度条） */
.lt-scr-line-chip-text { white-space: normal; text-align: center; line-height: 1.15; }
.lt-scr-line-chip-bar { width: 80%; height: 5px; border-radius: 999px; background: rgba(7, 6, 26, 0.7); overflow: hidden; }
.lt-scr-line-chip-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--lt-track-0), var(--lt-track-1), var(--lt-track-2)); }

/* 结算 */
.lt-scr-result-title {
  margin: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--lt-font-display); font-weight: 800; font-size: calc(42px * var(--k, 1)); line-height: 1.15;
}
.lt-scr-result-title.is-arrive {
  color: #FFE9A8; text-shadow: 0 0 14px rgba(255, 181, 71, 0.75), 0 3px 0 #7A3E12;
}
.lt-scr-result-title.is-derail { color: #FFFFFF; text-shadow: 0 0 12px rgba(255, 74, 92, 0.55), 0 3px 0 #1D1852; }
.lt-scr-result-line { margin: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: max(15px, calc(17px * var(--k, 1))); color: var(--lt-gold); }
.lt-scr-result-stars { display: flex; align-items: center; justify-content: center; gap: 6%; }
.lt-scr-result-stars .lt-scr-star { height: 92%; aspect-ratio: 1; object-fit: contain; }
.lt-scr-result-stars .lt-scr-star.is-on { animation: lt-scr-pop 420ms ease-out both; }
@keyframes lt-scr-pop { 0% { transform: scale(0.2); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.lt-scr-result-score {
  margin: 0; display: flex; align-items: center; justify-content: center; font-family: var(--lt-font-display);
  font-weight: 800; font-size: calc(36px * var(--k, 1)); line-height: 1.15; color: var(--lt-gold); text-shadow: 0 0 12px rgba(255, 212, 71, 0.45);
}
.lt-scr-result-score.is-derail { color: #FFFFFF; text-shadow: none; }
.lt-scr-result-row { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; font-weight: 700; font-size: max(15px, calc(15px * var(--k, 1))); line-height: 1.2; }
.lt-scr-result-small { margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-size: max(15px, calc(15px * var(--k, 1))); line-height: 1.25; color: var(--lt-muted); }
.lt-scr-newbest { color: var(--lt-gold); box-shadow: inset 0 0 0 2px var(--lt-gold), 0 0 12px rgba(255, 212, 71, 0.5); animation: lt-scr-pop 420ms ease-out both; }
.lt-scr-coach {
  box-sizing: border-box; margin: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 2px 6px; border-radius: 16px; color: var(--lt-text-dark); font-weight: 700; line-height: 1.22;
  font-size: max(15px, calc(15px * var(--k, 1))); background: linear-gradient(180deg, #FFFBF3, var(--lt-cream));
  /* ui-coach 位图顶边正中有一个气泡尖角，九宫格拉伸后在卡片顶边中间成了一段波浪毛刺：结算卡不用它，用同色描边 */
  border: 2px solid #8FE6DA; box-shadow: 0 6px 16px rgba(7, 6, 26, 0.45);
  padding: 1px 10px; line-height: 1.12;
}
.lt-scr-try { justify-content: flex-start; gap: 12px; text-align: left; }
.lt-scr-try p { margin: 0; }
.lt-scr-try-art {
  flex: none; width: 22%; max-width: 72px; aspect-ratio: 1; border-radius: 12px; background: #1D1852 center / 64% no-repeat;
}
.lt-scr-try-art.is-pocket { background-image: url("./assets/obj-gold@1x.webp"); }
.lt-scr-try-art.is-block, .lt-scr-try-art.is-idle { background-image: url("./assets/obj-block@1x.webp"); }
.lt-scr-try-art.is-late { background-image: none; box-shadow: inset 0 0 0 999px #1D1852; outline: 3px dashed #FFFFFF; outline-offset: -14px; border-radius: 50%; }
.lt-scr-offer {
  box-sizing: border-box; border-radius: 18px;
  background: rgba(23, 20, 63, 0.92); box-shadow: inset 0 0 0 2px rgba(255, 216, 107, 0.7);
}
.lt-scr-offer .lt-scr-result-small { font-size: max(14px, calc(14px * var(--k, 1))); }
.lt-scr-share-status { margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: max(14px, calc(14px * var(--k, 1))); color: var(--lt-track-1); }
.lt-scr-share-status.is-failed { color: #FFB547; }

/* 减少动态：去掉晃动、弹出、过渡（判定不受影响） */
@media (prefers-reduced-motion: reduce) {
  .is-nudge, .lt-scr-result-stars .lt-scr-star.is-on, .lt-scr-newbest { animation: none; }
  .lt-scr-progress-fill, .lt-scr-switch-knob, .lt-scr-logo-glow { transition: none; }
}
/* 设置里的「减少动态」：ui.mjs 在 .lt-root 上切 is-reduced（原来挂在没人设置的 :root 属性上，设置开关对菜单动效无效） */
.lt-root.is-reduced .is-nudge,
.lt-root.is-reduced .lt-scr-result-stars .lt-scr-star.is-on,
.lt-root.is-reduced .lt-scr-newbest { animation: none; }
.lt-root.is-reduced .lt-scr-progress-fill, .lt-root.is-reduced .lt-scr-switch-knob, .lt-root.is-reduced .lt-scr-logo-glow { transition: none; }

/* 342 × 403 站点盒子（竖但矮）：菜单页整屏滚动、居中，按钮不缩到 44 以下（SPEC short_portrait） */
@media (orientation: portrait) and (max-height: 560px) {
  /* 内容按一块虚拟高度排（≥ 视口高），只需从顶上开始滚；不写 align-content: center——Chromium 对块容器的 safe 不生效，
     内容会被居中到负坐标、头部按钮滚不到（342×403 实测 Help / Settings 在 −98 px） */
  .lt-scr, .lt-scr-ov-scroll { overflow-y: auto; }
  .lt-scr-btn, .lt-scr-card-btn, .lt-scr-seg, .lt-scr-toggle { min-height: 44px; }
}
