/* 开场背景介绍：逐页翻阅的图文档案卡，玩家自己点「继续」翻页，节奏自控。
   z-index 高于 #boot(50)、低于 #fatal(99)。 */
#intro-story {
  --is-pad-l: max(22px, env(safe-area-inset-left, 0px));
  --is-pad-r: max(22px, env(safe-area-inset-right, 0px));
  position: absolute; inset: 0; z-index: 80;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
  padding: calc(12px + var(--sat, 0px)) var(--is-pad-r) calc(12px + var(--sab, 0px)) var(--is-pad-l);
  background: radial-gradient(1100px 700px at 68% 18%, #1d3354 0%, rgba(29, 51, 84, 0) 62%),
              radial-gradient(900px 700px at 12% 88%, #16283d 0%, rgba(22, 40, 61, 0) 60%),
              linear-gradient(160deg, #101a30, #070b16);
  color: var(--bone, #e8e4da); opacity: 1;
  transition: opacity .55s ease; overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
#intro-story.done { opacity: 0; pointer-events: none; }
#intro-story[hidden] { display: none; }
#intro-story::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}
#intro-story::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 55% at 50% 50%, transparent 40%, rgba(0, 0, 0, .55) 100%);
}
/* 文字区固定在屏幕左上角，宽度收窄，给右侧 3D 人物让出空间 */
.is-inner {
  position: relative; z-index: 5;
  width: min(400px, calc(50vw - var(--is-pad-l) - 44px));
  max-height: 100%; display: flex; flex-direction: column;
  margin: 0;
}

/* 文字卡：浮在全屏 3D 人物左侧，半透明 */
.is-card {
  border: 1px solid rgba(232, 228, 218, .16);
  border-left: 3px solid var(--signal, #ffb347);
  background: rgba(8, 12, 16, .72);
  padding: clamp(16px, 3vh, 30px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
/* 3D 人物画布：右侧半屏，可拖动旋转 */
.is-3d { position: absolute; inset: 0; z-index: 1; touch-action: none; cursor: grab; }
.is-3d:active { cursor: grabbing; }
.is-3d canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .45s ease; }
#intro-story.has-3d .is-3d canvas { opacity: 1; }
/* 立绘兜底：3D 未就绪时先显示，对应页的 3D 人物出现后淡出 */
.is-hero {
  position: absolute; z-index: 2; right: 2%; top: 50%; transform: translateY(-50%);
  width: min(56vh, 78vw); max-width: 460px; height: auto; pointer-events: none;
  transition: opacity .4s ease;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 74%);
}
#intro-story.has-3d .is-hero { opacity: 0; }
.is-3d-hint {
  position: absolute; right: 14px; top: 14px; z-index: 6; pointer-events: none;
  font: 500 clamp(9px, 2.2vw, 11px)/1 var(--f-mono, monospace);
  letter-spacing: .1em; color: rgba(255, 179, 71, .85);
  background: rgba(0, 0, 0, .5); padding: 5px 9px; border: 1px solid rgba(255, 179, 71, .25);
}

.is-copy { min-width: 0; }
.is-lines {
  font: 400 clamp(14px, 1.9vh + 5px, 19px)/1.7 var(--f-cjk, system-ui, sans-serif);
  letter-spacing: .02em; color: #ddd9cf; text-shadow: 0 1px 10px rgba(0, 0, 0, .8);
}
.is-line { margin: 0 0 10px; }
.is-line:last-child { margin-bottom: 0; }
.is-line.is-final { color: var(--signal-hot, #ffc977); font-weight: 700; letter-spacing: .08em; }

/* 翻页按钮：上页在左下、继续在右下，玩家自己掌控节奏 */
.is-prev, .is-enter {
  position: absolute; bottom: calc(24px + var(--sab, 0px)); z-index: 6;
  display: block; margin: 0;
  padding: 12px 30px; min-width: 130px;
  border-radius: 2px;
  font: 800 clamp(12px, 3vw, 15px)/1 var(--f-label, sans-serif);
  letter-spacing: .2em; text-transform: uppercase; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .1s ease, opacity .18s ease;
}
.is-prev { left: var(--is-pad-l, 22px); background: rgba(8, 12, 16, .7); color: var(--bone, #e8e4da); border: 1px solid rgba(232, 228, 218, .32); }
.is-enter { right: var(--is-pad-r, 22px); background: var(--signal, #ffb347); color: #0b0d0f; border: 1px solid var(--signal, #ffb347); }
.is-prev:hover:not(:disabled), .is-prev:focus-visible { background: rgba(232, 228, 218, .16); outline: none; }
.is-enter:hover, .is-enter:focus-visible { background: var(--signal-hot, #ffc977); box-shadow: 0 0 26px rgba(255, 179, 71, .4); outline: none; }
.is-prev:active, .is-enter:active { transform: translateY(1px); }
.is-prev:disabled { opacity: .35; cursor: default; }

/* 介绍播放期间：所有游戏界面整层隐藏，只留背景介绍。
   竖屏提示也隐藏：介绍页自身已适配竖屏，弹框会挡住剧情。 */
body.intro-playing #mp-hud,
body.intro-playing #mp-summary,
body.intro-playing #mp-rolebar,
body.intro-playing #fsFloat,
body.intro-playing #sssBack,
body.intro-playing #sssInvite,
body.intro-playing #deploy-hint,
body.intro-playing #ui,
body.intro-playing #mp-pvp,
body.intro-playing #envtime-hud,
/* 竖屏提示框已去掉（原本介绍页期间才隐藏，现在全局隐藏） */
#rotateLandscapeHint { display: none !important; }

/* 窄屏 / 竖屏：文字卡贴左上，人物在右半边 */
@media (max-width: 720px), (orientation: portrait) {
  #intro-story { padding-top: calc(10px + var(--sat, 0px)); }
  .is-card { padding: 12px 13px; background: rgba(8, 12, 16, .82); }
  .is-lines { font-size: clamp(12px, 2.7vw, 14px); line-height: 1.5; }
  .is-line { margin-bottom: 7px; }
  .is-prev, .is-enter { bottom: calc(16px + var(--sab, 0px)); padding: 10px 18px; min-width: 0; font-size: 12px; letter-spacing: .12em; }
  .is-prev { left: max(16px, env(safe-area-inset-left, 0px)); }
  .is-enter { right: max(16px, env(safe-area-inset-right, 0px)); }
  .is-3d { inset: 0; } /* 全屏画布，人物居中 */
}
@media (prefers-reduced-motion: reduce) {
  #intro-story { transition-duration: .01ms !important; }
}

/* ===== 首屏：2050 任务档案（左）+ 作战设置（右），底部常驻角色下载进度 =====
   整屏是一块「天网终端」：细线外框 + 四角定位括号 + 顶部状态条，
   左侧讲任务（品牌 / 档案号 / 故事 / 数据），右侧做设置（昵称 / 房间方式 / 模式 / 出击）。
   主题：合作 = 琥珀橙（默认），内讧 = 血红（html.mode-pvp 覆盖 --signal*）。 */
#intro-loading {
  --signal: #ffb347; --signal-hot: #ffc977;
  --signal-soft: rgba(255, 179, 71, .13); --signal-halo: rgba(255, 179, 71, .45);
  --il-line: rgba(232, 228, 218, .14);
  --il-line-soft: rgba(232, 228, 218, .075);
  position: absolute; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: calc(clamp(8px, 1.5vw, 24px) + var(--sat, 0px)) clamp(8px, 1.5vw, 24px) calc(clamp(8px, 1.5vw, 24px) + var(--sab, 0px));
  background:
    radial-gradient(1200px 780px at 20% 4%, #1c3556 0%, rgba(28, 53, 86, 0) 64%),
    radial-gradient(1000px 760px at 92% 96%, #132639 0%, rgba(19, 38, 57, 0) 62%),
    linear-gradient(158deg, #0c1424, #05070d 76%);
  color: var(--bone, #e8e4da);
  transition: opacity .45s ease;
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
html.mode-pvp #intro-loading {
  --signal: #ff4d4f; --signal-hot: #ff7a70;
  --signal-soft: rgba(255, 77, 79, .15); --signal-halo: rgba(255, 77, 79, .45);
  background:
    radial-gradient(1200px 780px at 20% 4%, #401d28 0%, rgba(64, 29, 40, 0) 64%),
    radial-gradient(1000px 760px at 92% 96%, #2a1520 0%, rgba(42, 21, 32, 0) 62%),
    linear-gradient(158deg, #160e18, #05070d 76%);
}
/* 第三种主题：选中「加入Ta的计划」时整屏换成青绿深水色（index.html 的 setChoice()
   给 #intro-loading 挂 .join-selected）。创建 / 加入是两条不同的路，背景一眼分开；
   房间号键盘的薄荷绿（.il-kp-head b）从此有同一个色系可依，不再是琥珀底上的孤色。
   选择器带 html 前缀是为了压过上面的 html.mode-pvp ——「加入」与「合作 / 内讧」两种模式正交，
   内讧模式下的加入页同样是青绿。 */
#intro-loading.join-selected,
html.mode-pvp #intro-loading.join-selected {
  --signal: #3fd9b6; --signal-hot: #7fffd4;
  --signal-soft: rgba(63, 217, 182, .14); --signal-halo: rgba(63, 217, 182, .45);
  background:
    radial-gradient(1200px 780px at 20% 4%, #12403d 0%, rgba(18, 64, 61, 0) 64%),
    radial-gradient(1000px 760px at 92% 96%, #0d2c33 0%, rgba(13, 44, 51, 0) 62%),
    linear-gradient(158deg, #08191d, #04080c 76%);
}
/* 这层皮肤里还有几处写死的琥珀（顶栏元信息 / 巨大字标残影 / 选中卡片），
   加入页要整块换色，否则青绿底上会冒出零星的橙色零件。 */
#intro-loading.join-selected .il-top-c i { color: rgba(63, 217, 182, .45); }
#intro-loading.join-selected .il-kicker::after { background: linear-gradient(90deg, rgba(63, 217, 182, .35), transparent); }
#intro-loading.join-selected .il-title-ghost { -webkit-text-stroke-color: rgba(63, 217, 182, .22); }
#intro-loading.join-selected .il-console {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 34%),
    radial-gradient(120% 90% at 100% 0%, rgba(63, 217, 182, .07), transparent 56%);
}
#intro-loading.join-selected .il-name-input:focus { box-shadow: 0 1px 0 rgba(63, 217, 182, .55); }
#intro-loading.join-selected .il-room-btn.on {
  border-color: var(--signal-halo);
  background: linear-gradient(158deg, var(--signal-soft), rgba(63, 217, 182, .03));
  box-shadow: inset 0 0 0 1px rgba(63, 217, 182, .08);
}
#intro-loading.join-selected .il-room-btn.on::before { box-shadow: 0 0 14px var(--signal-halo); }
#intro-loading.join-selected .il-kp-head b { color: var(--signal-hot); }
#intro-loading[hidden] { display: none !important; }
#intro-loading.done { opacity: 0; pointer-events: none; }

/* 底纹：细网格 + 扫描线 + 暗角，叠在最外层，不接事件 */
#intro-loading::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(232, 228, 218, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 228, 218, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(75% 70% at 42% 26%, #000 0%, transparent 78%);
  mask-image: radial-gradient(75% 70% at 42% 26%, #000 0%, transparent 78%);
}
#intro-loading::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 80% at 50% 45%, transparent 48%, rgba(0, 0, 0, .5) 100%);
}
.il-scan {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}
/* 巨大的字标残影：只留描边，压在画面右下方，给整块面板一点纵深 */
.il-mark {
  position: absolute; z-index: 1; left: 50%; bottom: -9vh;
  transform: translateX(-30%);
  font: 900 min(34vw, 520px)/.8 var(--f-display, Impact, sans-serif);
  letter-spacing: .02em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(232, 228, 218, .07);
  pointer-events: none;
}

/* 终端外框 */
.il-panel {
  position: relative; z-index: 2; flex: 0 1 auto; width: 100%; max-width: 1680px; min-height: 0;
  /* 面板高度跟着内容走，只给一个下限保证存在感：内容精简后不会再出现大片空白 */
  height: auto; max-height: 100%;
  min-height: min(100%, clamp(560px, 70vh, 720px));
  display: flex; flex-direction: column;
  border: 1px solid var(--il-line);
  background:
    radial-gradient(900px 420px at 82% 0%, var(--signal-soft), transparent 62%),
    linear-gradient(180deg, rgba(9, 15, 25, .88), rgba(4, 7, 12, .95));
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .03);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  overflow: hidden;
}
/* 顶部信号线：只亮中间一段 */
.il-panel::before {
  content: ""; position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--signal) 20%, var(--signal) 62%, transparent 92%);
  opacity: .8;
}
/* 四角定位括号 */
.il-panel::after {
  content: ""; position: absolute; z-index: 5; inset: 10px; pointer-events: none;
  background:
    linear-gradient(var(--signal), var(--signal)) left top / 16px 1px no-repeat,
    linear-gradient(var(--signal), var(--signal)) left top / 1px 16px no-repeat,
    linear-gradient(var(--signal), var(--signal)) right top / 16px 1px no-repeat,
    linear-gradient(var(--signal), var(--signal)) right top / 1px 16px no-repeat,
    linear-gradient(var(--signal), var(--signal)) left bottom / 16px 1px no-repeat,
    linear-gradient(var(--signal), var(--signal)) left bottom / 1px 16px no-repeat,
    linear-gradient(var(--signal), var(--signal)) right bottom / 16px 1px no-repeat,
    linear-gradient(var(--signal), var(--signal)) right bottom / 1px 16px no-repeat;
  opacity: .32;
}

/* —— 顶部状态条 —— */
.il-top {
  flex: 0 0 auto; z-index: 3;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: 44px; padding: 0 clamp(14px, 2.2vw, 30px);
  border-bottom: 1px solid var(--il-line);
  font: 500 10px/1 var(--f-mono, monospace); letter-spacing: .2em; text-transform: uppercase;
  color: rgba(232, 228, 218, .5);
}
.il-top > div { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; overflow: hidden; }
.il-top-r { justify-content: flex-end; }
.il-top-c span, .il-top-l span { overflow: hidden; text-overflow: ellipsis; }
.il-top-c i { font-style: normal; color: rgba(255, 179, 71, .38); }
.il-top-c span:last-child { color: rgba(232, 228, 218, .72); }
.il-top-r b { color: var(--signal); font-weight: 600; }
#il-clock { color: rgba(232, 228, 218, .78); font-variant-numeric: tabular-nums; margin-left: 2px; }
.il-dot {
  flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 9px var(--signal-halo);
  animation: il-pulse 2.8s ease-in-out infinite;
}
@keyframes il-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* —— 主体：左档案 / 右终端 —— */
.il-body {
  position: relative; z-index: 2; flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(232, 228, 218, .18) transparent;
}
.il-body::-webkit-scrollbar { width: 6px; }
.il-body::-webkit-scrollbar-thumb { background: rgba(232, 228, 218, .16); }

/* 左：任务档案 */
.il-hero {
  position: relative; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(22px, 3.6vw, 56px) clamp(22px, 4.2vw, 72px);
}
.il-hero::after {
  content: ""; position: absolute; right: 0; top: 12%; bottom: 12%; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--il-line) 16%, var(--il-line) 84%, transparent);
}
.il-kicker {
  display: flex; align-items: center; gap: 12px;
  font: 600 clamp(10px, .95vw, 12px)/1 var(--f-mono, monospace);
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--signal);
}
.il-kicker::before { content: ""; flex: 0 0 auto; width: 22px; height: 1px; background: currentColor; }
.il-kicker::after {
  content: ""; flex: 1 1 auto; height: 1px; margin-left: 2px;
  background: linear-gradient(90deg, rgba(255, 179, 71, .35), transparent);
}
.il-title-wrap {
  position: relative; margin: clamp(12px, 2.2vh, 34px) 0 clamp(8px, 1.6vh, 22px);
}
.il-title {
  position: relative; z-index: 2; margin: 0;
  /* 字标 ZZOJ：四个字母各占一个同宽字格（等宽），再加均匀字距。
     逐字拆成 span 排成列，Z/O/J 的原生字宽差（O 最宽、J 最窄）被抹平成一致的节奏。
     字格宽度取 O 的字宽（.78em），字距 .07em，整串约 3.33em 宽。 */
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: .78em;
  column-gap: .07em;
  font: 900 clamp(60px, 12.5vw, 215px)/.8 var(--f-display, Impact, sans-serif);
  text-transform: uppercase; color: var(--bone, #e8e4da);
  text-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}
.il-title > span { display: block; text-align: center; }
.il-title-ghost {
  position: absolute; z-index: 1; left: 10px; top: 7px;
  font: 900 clamp(72px, 15vw, 230px)/.8 var(--f-display, Impact, sans-serif);
  letter-spacing: .015em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 179, 71, .26);
  pointer-events: none;
}
.il-hero-rule {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 clamp(16px, 3vh, 42px);
  font: 500 clamp(8.5px, .75vw, 10px)/1 var(--f-mono, monospace);
  letter-spacing: .24em; text-transform: uppercase;
  color: rgba(232, 228, 218, .4); white-space: nowrap;
}
.il-hero-rule i { flex: 1 1 auto; height: 1px; background: var(--il-line); min-width: 16px; }
.il-hero-rule span:last-child { color: rgba(232, 228, 218, .6); }
.il-story {
  margin: 0 0 clamp(18px, 3.2vh, 40px); max-width: 30em;
  font: 400 clamp(15px, 1.1vw + 6px, 22px)/1.9 var(--f-cjk, system-ui, sans-serif);
  letter-spacing: .015em; color: #ddd9cf;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}
.il-story::first-letter { color: var(--signal); }

/* 右：作战设置 */
.il-console {
  position: relative; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(13px, 2.4vh, 30px);
  padding: clamp(20px, 3vw, 48px) clamp(20px, 3.4vw, 56px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 34%),
    radial-gradient(120% 90% at 100% 0%, rgba(255, 179, 71, .07), transparent 56%);
}
html.mode-pvp .il-console {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 34%),
    radial-gradient(120% 90% at 100% 0%, rgba(255, 77, 79, .08), transparent 56%);
}

/* 昵称：只留一条底线，像在终端里敲自己的呼号 */
.il-name-wrap { position: relative; }
.il-name-label {
  display: block; margin-bottom: 2px;
  font: 500 9px/1 var(--f-mono, monospace);
  letter-spacing: .28em; text-transform: uppercase; color: rgba(232, 228, 218, .42);
}
.il-name-input {
  width: 100%; box-sizing: border-box;
  -webkit-appearance: none; appearance: none;
  padding: 10px 0 9px; border: 0; border-bottom: 1px solid rgba(232, 228, 218, .24); border-radius: 0;
  background: transparent; color: var(--bone, #e8e4da);
  font: 700 clamp(18px, 1.85vw, 26px)/1.1 var(--f-label, sans-serif);
  letter-spacing: .06em; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.il-name-input:hover { border-bottom-color: rgba(232, 228, 218, .42); }
.il-name-input:focus {
  border-bottom-color: var(--signal);
  box-shadow: 0 1px 0 rgba(255, 179, 71, .55);
}

/* 分区标题 */
.il-room-label, .il-modes-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 9px;
  font: 500 9px/1 var(--f-mono, monospace);
  letter-spacing: .26em; text-transform: uppercase; color: rgba(232, 228, 218, .45);
}
.il-room-label::before, .il-modes-label::before {
  content: ""; flex: 0 0 auto; width: 2px; height: 10px; background: var(--signal);
}

/* 房间方式：两张并排卡片，选中 = 暖色填充 + 左侧亮条 */
.il-room-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.il-room-btn {
  position: relative; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 12px 11px; text-align: left;
  -webkit-appearance: none; appearance: none;
  border: 1px solid var(--il-line); border-radius: 0;
  background: rgba(255, 255, 255, .018); color: var(--bone, #e8e4da);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.il-idx {
  font: 500 8px/1 var(--f-mono, monospace); font-style: normal;
  letter-spacing: .16em; color: rgba(232, 228, 218, .32);
  transition: color .18s ease;
}
.il-room-btn b {
  max-width: 100%;
  font: 700 clamp(14px, 1.12vw, 17px)/1.15 var(--f-label, sans-serif);
  letter-spacing: .06em; text-transform: uppercase; color: rgba(232, 228, 218, .9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .18s ease;
}
.il-room-btn span {
  max-width: 100%;
  font: 500 10px/1.35 var(--f-mono, monospace);
  letter-spacing: .01em; color: rgba(232, 228, 218, .42);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .18s ease;
}
.il-tag {
  position: absolute; top: 10px; right: 10px;
  font: 600 8px/1 var(--f-mono, monospace); font-style: normal;
  letter-spacing: .14em; color: rgba(232, 228, 218, .3);
  transition: color .18s ease;
}
.il-room-btn:hover, .il-room-btn:focus-visible {
  border-color: rgba(232, 228, 218, .32); background: rgba(255, 255, 255, .04); outline: none;
}
.il-room-btn.on {
  border-color: var(--signal-halo, rgba(255, 179, 71, .45));
  background: linear-gradient(158deg, var(--signal-soft, rgba(255, 179, 71, .13)), transparent 90%);
  box-shadow: inset 0 0 0 1px var(--signal-soft, rgba(255, 179, 71, .13));
}
.il-room-btn.on::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--signal); box-shadow: 0 0 14px var(--signal-halo);
}
.il-room-btn.on b { color: var(--signal-hot); }
.il-room-btn.on span { color: rgba(232, 228, 218, .64); }
.il-room-btn.on .il-idx, .il-room-btn.on .il-tag { color: var(--signal); }

/* 模式：单选行（与上面的卡片在形状、层级上都不同） */
.il-modes { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.il-mode {
  position: relative; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 12px;
  flex: 1 1 0; min-height: 44px; max-height: 68px;
  padding: 11px 12px; text-align: left;
  -webkit-appearance: none; appearance: none;
  border: 0; border-top: 1px solid var(--il-line-soft); border-radius: 0;
  background: transparent; color: var(--bone, #e8e4da);
  transition: background .18s ease;
}
.il-mode:last-child { border-bottom: 1px solid var(--il-line-soft); }
.il-mode::before {
  content: ""; flex: 0 0 auto; width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid rgba(232, 228, 218, .34);
  box-shadow: inset 0 0 0 3px transparent;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.il-mode b {
  font: 700 clamp(14px, 1.1vw, 17px)/1.1 var(--f-label, sans-serif);
  letter-spacing: .08em; text-transform: uppercase; color: rgba(232, 228, 218, .88);
  white-space: nowrap; transition: color .18s ease;
}
.il-mode span {
  min-width: 0;
  font: 500 9.5px/1.35 var(--f-mono, monospace);
  letter-spacing: .02em; color: rgba(232, 228, 218, .42);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .18s ease;
}
.il-mode:hover, .il-mode:focus-visible { background: rgba(255, 255, 255, .03); outline: none; }
.il-mode:hover::before, .il-mode:focus-visible::before { border-color: var(--signal-halo); }
.il-mode.on { background: linear-gradient(90deg, var(--signal-soft, rgba(255, 179, 71, .13)), transparent 72%); }
.il-mode.on::before { border-color: var(--signal); box-shadow: inset 0 0 0 3px var(--signal); }
.il-mode.on b { color: var(--signal-hot); }
.il-mode.on span { color: rgba(232, 228, 218, .62); }

/* 创建 / 加入两个面板叠在同一格里，切换高度不跳 */
.il-modes-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; }
.il-room-detail {
  position: relative; z-index: 1;
  display: grid; grid-template-areas: "panel"; grid-template-columns: minmax(0, 1fr);
}
.il-room-detail > * { grid-area: panel; align-self: stretch; min-width: 0; }
.il-room-detail > [hidden] {
  display: block !important; visibility: hidden !important; pointer-events: none !important;
}

/* 房间号占位：创建成功后才会生成，这里只说明「会有」，和加入页的房号栏左右呼应 */
.il-create-meta {
  display: flex; align-items: baseline; gap: 12px;
  margin-top: auto; padding: 13px 0 0; border-top: 1px solid var(--il-line-soft);
}
.il-create-meta-k {
  flex: 0 0 auto;
  font: 500 9px/1 var(--f-mono, monospace);
  letter-spacing: .22em; text-transform: uppercase; color: rgba(232, 228, 218, .38);
}
.il-create-meta-code {
  flex: 0 0 auto;
  font: 600 15px/1 var(--f-mono, monospace);
  letter-spacing: .26em; color: rgba(232, 228, 218, .34);
}
.il-create-meta em {
  flex: 1 1 auto; min-width: 0; text-align: right;
  font: 500 8.5px/1.3 var(--f-mono, monospace); font-style: normal;
  letter-spacing: .06em; color: rgba(232, 228, 218, .3);
}

/* 出击：整行主按钮，右端一枚描边圆箭头 */
.il-enter {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; height: clamp(46px, 5.8vh, 56px);
  margin: 14px 0 0; padding: 0 14px 0 20px;
  border: 1px solid var(--signal); border-radius: 0;
  background: var(--signal); color: #0b0d0f;
  font: 800 clamp(12px, 1.05vw, 14px)/1 var(--f-label, sans-serif);
  letter-spacing: .22em; text-transform: uppercase;
  transition: background .18s ease, box-shadow .18s ease, transform .1s ease, color .18s ease;
}
.il-enter span {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(11, 13, 15, .38);
  font-size: 13px; letter-spacing: 0; transition: transform .18s ease;
}
.il-enter:hover, .il-enter:focus-visible {
  background: var(--signal-hot); box-shadow: 0 0 36px var(--signal-halo); outline: none;
}
.il-enter:hover span { transform: translateX(3px); }
.il-enter:active { transform: translateY(1px); }
.il-enter:disabled {
  cursor: default; color: rgba(232, 228, 218, .45);
  background: rgba(232, 228, 218, .07); border-color: rgba(232, 228, 218, .2);
  box-shadow: none;
}
.il-enter:disabled:hover { background: rgba(232, 228, 218, .07); box-shadow: none; }
.il-enter:disabled:hover span { transform: none; }
.il-enter:disabled span { border-color: rgba(232, 228, 218, .24); }

/* 加入房间：数字键盘 */
.il-join-panel {
  border: 1px solid var(--il-line);
  background: rgba(0, 0, 0, .22); padding: 12px;
}
.il-kp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
  font: 500 9px/1 var(--f-mono, monospace);
  letter-spacing: .22em; text-transform: uppercase; color: rgba(232, 228, 218, .45);
}
.il-kp-head b {
  font: 700 22px/1 var(--f-mono, monospace); letter-spacing: .3em;
  padding-left: .3em; color: var(--signal);
}
.il-kp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.il-kp-grid button {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding: 6px 0;
  border: 1px solid var(--il-line); border-radius: 0;
  background: rgba(255, 255, 255, .035); color: var(--bone, #e8e4da);
  font: 600 16px/1 var(--f-mono, monospace);
  transition: background .15s, border-color .15s, transform .1s;
}
.il-kp-grid button:hover, .il-kp-grid button:focus-visible {
  background: var(--signal-soft); border-color: var(--signal); outline: none;
}
.il-kp-grid button:active { transform: translateY(1px); }
.il-kp-fn { color: var(--signal) !important; }
.il-kp-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.il-kp-foot span {
  flex: 1; text-align: left; min-width: 0;
  font: 500 9px/1.35 var(--f-mono, monospace);
  letter-spacing: .04em; color: rgba(232, 228, 218, .58);
}
/* 加入失败（房号不存在 / 满员）：提示在键盘下方变红，玩家直接改号重试 */
.il-kp-foot span.err { color: #ff7a70; }
.il-kp-foot button {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding: 9px 18px;
  border: 1px solid var(--signal); border-radius: 0;
  background: var(--signal); color: #0b0d0f;
  font: 800 12px/1 var(--f-label, sans-serif); letter-spacing: .16em;
  transition: background .18s, box-shadow .18s;
}
.il-kp-foot button:hover, .il-kp-foot button:focus-visible {
  background: var(--signal-hot); box-shadow: 0 0 20px var(--signal-halo); outline: none;
}
.il-kp-foot button:disabled {
  cursor: not-allowed; opacity: .42; filter: grayscale(.4);
  background: rgba(232, 228, 218, .3); border-color: rgba(232, 228, 218, .3);
  box-shadow: none;
}

/* —— 底部进度条：常驻，不随内容滚动 —— */
.il-progress {
  flex: 0 0 auto; z-index: 3;
  padding: clamp(8px, 1.4vh, 14px) clamp(16px, 2.6vw, 32px) clamp(10px, 1.4vh, 14px);
  border-top: 1px solid var(--il-line);
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .32));
}
.il-progress-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px;
  font: 500 clamp(9px, .8vw, 10.5px)/1 var(--f-mono, monospace);
  letter-spacing: .24em; text-transform: uppercase; color: rgba(232, 228, 218, .62);
}
.il-progress-head b {
  font-weight: 600; color: var(--signal); letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}
.il-progress-bar {
  position: relative; height: 3px; background: rgba(232, 228, 218, .12); overflow: hidden;
  background-image: repeating-linear-gradient(90deg, transparent 0 59px, rgba(232, 228, 218, .06) 59px 60px);
}
.il-progress-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--signal), var(--signal-hot));
  box-shadow: 0 0 14px var(--signal-halo);
  transition: width .25s ease;
}
/* 进度明细：左边「正在下哪个 glb」，右边「STEP n/3 · 在干什么」。
   两边都可能很长（三个 8MB 模型并发、文件名是中文），各自省略号，不换行撑高进度栏。 */
.il-progress-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 7px;
  font: 500 clamp(8.5px, .72vw, 9.5px)/1.35 var(--f-mono, monospace);
  letter-spacing: .04em; color: rgba(232, 228, 218, .48);
  font-variant-numeric: tabular-nums;
}
.il-progress-file {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.il-progress-step {
  flex: 0 0 auto; white-space: nowrap;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(232, 228, 218, .58);
}

/* —— 窄屏 / 竖屏：单列，档案在上、设置在下 —— */
@media (max-width: 900px) and (orientation: portrait) {
  #intro-loading { padding: calc(6px + var(--sat, 0px)) 6px calc(6px + var(--sab, 0px)); }
  .il-top { height: 26px; padding: 0 13px; font-size: 8px; letter-spacing: .1em;
    display: flex; justify-content: space-between; gap: 10px; }
  .il-top > .il-top-c { display: none; }
  .il-top > div { flex: 0 1 auto; }
  /* 竖屏走块级流：两段各按内容高度排，整块可滚，不会被网格行拉伸挤爆 */
  /* 竖屏：面板按内容高度收缩，宽屏平板不会在底部留一大片空白 */
  .il-panel { height: auto; max-height: 100%; }
  .il-body { display: block; }
  .il-hero, .il-console { justify-content: flex-start; }
  .il-hero { padding: 16px 18px 12px; justify-content: flex-start; }
  .il-hero::after {
    left: 18px; right: 18px; top: auto; bottom: 0; width: auto; height: 1px;
    background: linear-gradient(90deg, var(--il-line), transparent);
  }
  .il-kicker { font-size: 9.5px; letter-spacing: .24em; }
  .il-title-wrap { margin: 9px 0 7px; }
  .il-title, .il-title-ghost { font-size: clamp(58px, 18vw, 96px); }
  .il-title-ghost { left: 6px; top: 5px; }
  .il-hero-rule { margin-bottom: 12px; font-size: 8px; letter-spacing: .16em; }
  .il-story { font-size: clamp(13px, 3.5vw, 15px); line-height: 1.74; margin-bottom: 8px; }
  .il-console {
    justify-content: flex-start;
    gap: 7px; padding: 13px 18px 14px;
    border-top: 1px solid var(--il-line);
  }
  .il-name-input { font-size: 20px; padding: 7px 0 6px; }
  .il-room-btn { padding: 10px 10px 9px; }
  .il-room-btn b { font-size: 13.5px; letter-spacing: .03em; }
  .il-room-btn span { font-size: 9px; }
  .il-tag { top: 8px; right: 8px; font-size: 7.5px; }
  .il-mode { padding: 9px 10px; }
  .il-mode b { font-size: 14px; }
  .il-mode span { font-size: 9px; }
  .il-enter { height: 44px; margin-top: 10px; }
  .il-create-meta { padding-top: 10px; }
  .il-progress { padding: 8px 16px 10px; }
  .il-progress-head b { font-size: 10px; }
  .il-progress-meta { margin-top: 5px; gap: 8px; font-size: 8.5px; }
  .il-kp-grid button { padding: 8px 0; }
}
/* —— 竖屏矮机（高 ≤ 700，如 iPhone SE / 360×640）：收紧档案区与设置区，
       让「任务简报 + 作战设置」一屏放下，创建按钮不用先往下滚 —— */
@media (max-width: 900px) and (orientation: portrait) and (max-height: 700px) {
  .il-hero { padding: 10px 18px 8px; }
  .il-kicker { font-size: 9px; letter-spacing: .22em; }
  .il-title-wrap { margin: 6px 0 4px; }
  .il-title, .il-title-ghost { font-size: clamp(42px, 13vw, 62px); }
  .il-hero-rule { display: none; }
  .il-story {
    font-size: 12.5px; line-height: 1.55; margin-bottom: 10px;
  }
  .il-console { padding: 10px 18px 12px; gap: 6px; }
  .il-name-input { font-size: 18px; padding: 5px 0; }
  .il-room-btn { padding: 8px 10px 7px; }
  .il-room-btn b { font-size: 12.5px; }
  .il-room-btn span { font-size: 8.5px; }
  .il-mode { padding: 7px 10px; }
  .il-mode b { font-size: 13px; }
  .il-mode span { font-size: 8.5px; }
  .il-create-meta { padding-top: 7px; }
  .il-enter { height: 44px; margin-top: 8px; }
}
/* —— 超矮竖屏（高 ≤ 600，老小屏机）：简介整段收起，只留标题 + 表单 —— */
@media (max-width: 900px) and (orientation: portrait) and (max-height: 600px) {
  .il-story { display: none; }
  .il-title, .il-title-ghost { font-size: clamp(38px, 12vw, 52px); }
}
@media (max-width: 380px) {
  .il-room-actions { gap: 6px; }
  .il-room-btn { padding: 9px 8px 8px; }
  .il-room-btn b { font-size: 12.5px; }
  .il-room-btn span { font-size: 8.5px; }
  .il-tag { display: none; }
  .il-story { font-size: 13px; }
}

/* —— 矮屏（横屏手机 / 小笔记本）：收紧纵向节奏，两列照旧 —— */
@media (orientation: landscape) and (max-height: 620px) {
  #intro-loading { padding: calc(6px + var(--sat, 0px)) 8px calc(6px + var(--sab, 0px)); }
  .il-top { height: 30px; font-size: 8.5px; letter-spacing: .16em; }
  /* 矮屏横置：两栏按内容高度排，顶栏收起，把高度让给表单 */
  .il-top { display: none; }
  .il-body { display: grid; grid-template-columns: 54% 46%; align-items: stretch; }
  .il-hero, .il-console { justify-content: flex-start; }
  .il-create-meta { display: none; }
  .il-kp-grid { grid-template-columns: repeat(4, 1fr); }
  .il-hero { padding: 14px clamp(18px, 3.2vw, 40px); }
  .il-kicker { font-size: 8.5px; letter-spacing: .22em; }
  .il-title-wrap { margin: 6px 0 6px; }
  .il-title, .il-title-ghost { font-size: clamp(48px, 7.4vw, 96px); }
  .il-hero-rule { margin-bottom: 9px; font-size: 8px; }
  .il-story {
    font-size: clamp(12px, 1.5vw, 14px); line-height: 1.6; margin-bottom: 10px;
  }
  .il-hero { justify-content: center; }
  .il-console { padding: 7px clamp(16px, 2.6vw, 34px); gap: 4px; }
  .il-name-label, .il-room-label, .il-modes-label { font-size: 8px; margin-bottom: 5px; }
  .il-name-input { font-size: 16px; padding: 4px 0 4px; }
  .il-room-btn { padding: 6px 8px 5px; gap: 2px; }
  .il-room-btn b { font-size: 12.5px; }
  .il-room-btn span { font-size: 8.5px; }
  .il-idx { font-size: 7px; }
  .il-tag { top: 7px; right: 7px; font-size: 7px; }
  .il-mode { padding: 5px 8px; gap: 9px; }
  .il-mode b { font-size: 13px; }
  .il-mode span { font-size: 8.5px; }
  .il-enter { height: 34px; margin-top: 6px; font-size: 11px; padding: 0 9px 0 13px; }
  .il-create-meta { padding-top: 7px; }
  .il-create-meta-k, .il-create-meta em { font-size: 7.5px; }
  .il-create-meta-code { font-size: 12px; }
  .il-enter span { width: 22px; height: 22px; font-size: 11px; }
  .il-kp-head { margin-bottom: 6px; font-size: 8px; }
  .il-kp-head b { font-size: 17px; }
  .il-kp-grid button { padding: 4px 0; font-size: 13px; }
  .il-kp-foot { margin-top: 6px; }
  .il-progress { padding: 5px 14px 7px; }
  .il-progress-head { margin-bottom: 5px; font-size: 8px; }
  .il-progress-bar { height: 2px; }
  .il-progress-meta { margin-top: 4px; font-size: 7.5px; gap: 6px; }
  .il-progress-step { letter-spacing: .12em; }
}
/* 中等高度（800 左右的笔记本）只收一点标题与留白，保持呼吸感 */
@media (orientation: landscape) and (min-width: 901px) and (min-height: 621px) and (max-height: 820px) {
  .il-title, .il-title-ghost { font-size: clamp(64px, 9vw, 132px); }
  .il-story { margin-bottom: 22px; }
  .il-console { padding-top: clamp(18px, 2.4vw, 34px); padding-bottom: clamp(18px, 2.4vw, 34px); }
}
@media (prefers-reduced-motion: reduce) {
  #intro-loading, .il-dot, .il-enter, .il-room-btn, .il-mode { animation: none !important; transition-duration: .01ms !important; }
}

#intro-roles {
  position: absolute; inset: 0; z-index: 91;
  padding: calc(58px + var(--sat, 0px)) 14px calc(46px + var(--sab, 0px));
  /* 模式主题：与加载页同源，合作琥珀橙 / 内讧血红 */
  --signal: #ffb347; --signal-hot: #ffc977;
  --signal-soft: rgba(255, 179, 71, .13); --signal-halo: rgba(255, 179, 71, .45);
  background: radial-gradient(900px 620px at 50% 0%, #1c3452 0%, rgba(28,52,82,0) 68%),
              linear-gradient(160deg, #101a30, #070b16 76%);
  color: var(--bone, #e8e4da); opacity: 0; transition: opacity .42s ease;
  -webkit-user-select: none; user-select: none; overflow: hidden;
}
html.mode-pvp #intro-roles {
  --signal: #ff4d4f; --signal-hot: #ff7a70;
  --signal-soft: rgba(255, 77, 79, .15); --signal-halo: rgba(255, 77, 79, .45);
  background: radial-gradient(900px 620px at 50% 0%, #3a1a26 0%, rgba(58, 26, 38, 0) 68%),
              linear-gradient(160deg, #190e1a, #060a14 76%);
}
#intro-roles.show { opacity: 1; }
#intro-roles::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px);
}
.ir-head {
  position: absolute; top: calc(8px + var(--sat, 0px)); left: 0; right: 0; z-index: 2;
  text-align: center; pointer-events: none;
}
.ir-head h2 {
  margin: 6px 0 4px; font: 900 clamp(22px, 3.2vw, 36px)/1.1 var(--f-display, Impact, sans-serif);
  letter-spacing: .05em; color: var(--bone, #e8e4da);
}
.ir-head p {
  margin: 0; font: 500 clamp(10px, 1.8vw, 12px)/1.4 var(--f-mono, monospace);
  letter-spacing: .22em; color: rgba(232,228,218,.62);
}
.ir-grid {
  position: relative; z-index: 1; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px); width: min(1220px, 96vw);
  height: calc(100vh - 104px - var(--sat, 0px) - var(--sab, 0px));
}
.ir-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%;
  padding: 0; overflow: hidden; cursor: pointer; -webkit-appearance: none; appearance: none;
  border: 1px solid rgba(232,228,218,.24); border-radius: 2px;
  background: rgba(8,12,18,.72); color: var(--bone, #e8e4da);
  transition: border-color .18s, box-shadow .18s, transform .12s;
}
/* 六个实时 3D 预览共用一个 WebGL canvas，按卡片视口分屏渲染 */
.ir-3d-canvas {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%; display: block;
}
.ir-card { background: transparent; }
.ir-portrait { background: transparent; }
.ir-card.ready .ir-portrait img { opacity: 0; }
.ir-info { background: rgba(8,12,18,.82); }
.ir-card.r0 { color: #b9bcc6; }
.ir-card.r1 { color: #c0392b; }
.ir-card.r2 { color: #3aa0ff; }
.ir-card.r3 { color: #d8b46a; }
.ir-card.r4 { color: #d8dee9; }
.ir-card.r5 { color: #4ec9ff; }
.ir-card:hover, .ir-card:focus-visible {
  border-color: var(--signal, #ffb347); box-shadow: 0 0 0 1px var(--signal, #ffb347), 0 14px 40px rgba(0,0,0,.5);
  outline: none; transform: translateY(-2px);
}
.ir-portrait {
  display: block; width: 100%; flex: 1 1 auto; min-height: 0; overflow: hidden;
  background: transparent;
}
.ir-portrait img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%;
  transition: transform .35s ease;
}
.ir-card:hover .ir-portrait img { transform: scale(1.06); }
.ir-info {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 6px 4px 8px; border-top: 1px solid rgba(232,228,218,.14);
}
.ir-info b {
  font: 700 clamp(14px, 2vw, 18px)/1 var(--f-label, sans-serif);
  letter-spacing: .08em; color: var(--bone, #e8e4da);
}
.ir-info em {
  font: 500 clamp(9px, 1.5vw, 11px)/1 var(--f-mono, monospace);
  letter-spacing: .14em; color: currentColor; font-style: normal;
}
.ir-pick {
  position: absolute; top: 8px; right: 8px; padding: 4px 7px;
  font: 600 8px/1 var(--f-mono, monospace); letter-spacing: .16em;
  color: #0b0d0f; background: var(--signal, rgba(255,179,71,.9)); opacity: 0; transition: opacity .18s;
}
.ir-card:hover .ir-pick, .ir-card:focus-visible .ir-pick { opacity: 1; }
/* 返回按钮固定在左上角，和顶部居中标题各占一头 */
.ir-back {
  position: absolute; top: calc(10px + var(--sat, 0px)); left: calc(14px + var(--sal, 0px)); z-index: 3;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding: 7px 16px; border: 1px solid rgba(232,228,218,.3); border-radius: 2px;
  background: transparent; color: rgba(232,228,218,.78);
  font: 600 clamp(9px, 1.8vw, 11px)/1 var(--f-mono, monospace); letter-spacing: .2em;
}
.ir-back:hover, .ir-back:focus-visible { border-color: var(--signal, #ffb347); color: var(--signal, #ffb347); outline: none; }

@media (max-height: 620px) {
  .ir-head h2 { font-size: clamp(18px, 3vw, 26px); }
  .ir-head p, .ir-kicker { font-size: 9px; }
  .ir-grid { gap: 7px; width: min(1100px, 95vw); height: calc(100vh - 88px - var(--sat, 0px) - var(--sab, 0px)); }
  .ir-info { padding: 6px 3px 7px; gap: 3px; }
  .ir-info em { font-size: 8px; }
}
@media (orientation: portrait) {
  .ir-grid { width: 96vw; }
  .ir-info b { font-size: clamp(10px, 3vw, 13px); }
}
/* 窄屏（竖屏手机）：左上角的返回按钮和居中标题会撞车，标题让到按钮下面一行 */
@media (max-width: 560px) {
  #intro-roles { padding-top: calc(80px + var(--sat, 0px)); }
  .ir-head { top: calc(42px + var(--sat, 0px)); }
  .ir-grid { height: calc(100vh - 126px - var(--sat, 0px) - var(--sab, 0px)); }
}
