/* ==========================================================================
 * mobile-ui.css — Dota 2 3D Spatial Replay 移动端 / 触屏响应式 UI 适配样式
 *
 * 设计原则：
 *   1. 桌面宽屏（非 .m-ui）零侵入，保持原有完整 PC 布局与交互。
 *   2. 移动端（html.m-ui）全面适配 100dvh、刘海屏/手势条安全区、竖屏 & 横屏矮屏。
 *   3. 恢复被原样式隐藏的战术小地图与关键事件轴，改为按需弹出的浮层/抽屉。
 *   4. 精简顶部英雄条、英雄 HUD（支持折叠迷你态与点击弹窗查看技能/装备）及底部播放栏。
 *   5. 优化录像库弹窗、3D 资产抽屉及资源加载面板在窄屏下的表单排版与触控体验。
 * ========================================================================== */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --m-top-h: 96px;
}

/* --------------------------------------------------------------------------
 * 通用触控与视口底层加固（全端安全）
 * -------------------------------------------------------------------------- */
html,
body,
#root {
  height: 100%;
  height: 100dvh;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.replay-shell {
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
}

.viewport-3d,
.viewport-3d canvas,
.minimap-canvas {
  touch-action: none;
  -webkit-touch-callout: none;
}

/* 消除 iOS Safari 快速连点按钮时的双击放大与 300ms 延迟 */
button,
.hud-btn,
.icon-btn,
.m-qbtn,
.m-tdock-btn,
.layer-pill,
.segmented button,
.hero-slot-btn,
.dota-ab-slot,
.dota-innate-slot,
.dota-item-slot,
input[type="range"] {
  touch-action: manipulation;
}

/* 桌面端默认隐藏移动端专属浮层组件 */
#m-quick-bar,
#m-transport-dock,
#m-hud-collapse-btn,
#m-tooltip-backdrop,
#m-gesture-toast,
#m-minimap-close {
  display: none;
}

/* --------------------------------------------------------------------------
 * 触屏设备通用优化（平板 + 手机）
 * -------------------------------------------------------------------------- */
html.m-touch .dota-ab-slot:hover .dota-tooltip,
html.m-touch .dota-innate-slot:hover .dota-tooltip,
html.m-touch .dota-item-slot.has-item:hover .dota-tooltip,
html.m-ui .dota-ab-slot:hover .dota-tooltip,
html.m-ui .dota-innate-slot:hover .dota-tooltip,
html.m-ui .dota-item-slot.has-item:hover .dota-tooltip {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
 * 移动端核心布局（html.m-ui，含手机竖屏、手机横屏矮屏与窄屏平板）
 * ========================================================================== */
html.m-ui .camera-hint {
  display: none !important;
}

/* 隐藏原生孤立的事件展开按钮，由移动端快捷栏统一控制（直接按结构匹配避免首帧闪烁压住顶栏） */
html.m-ui .replay-shell > button.hud-btn,
html.m-ui button[data-m-native-events-btn="1"] {
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* ---------- 1. 顶部栏（竖屏默认：紧凑工具行 + 计分板 + 10 英雄自适配网格） ---------- */
html.m-ui .top-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 6px;
  padding: calc(var(--safe-top) + 6px) calc(var(--safe-right) + 8px) 6px calc(var(--safe-left) + 8px);
  z-index: 28;
}

html.m-ui .top-left-tools {
  grid-column: 1;
  grid-row: 1;
  gap: 6px;
  min-width: 0;
}

html.m-ui .top-right-tools {
  grid-column: 2;
  grid-row: 1;
  gap: 5px;
  min-width: 0;
  justify-content: flex-end;
}

html.m-ui .brand-mark {
  display: none;
}

html.m-ui .top-bar .hud-btn {
  height: 30px;
  padding: 0 9px;
  font-size: 11.5px;
  gap: 5px;
  min-width: 0;
  border-radius: 7px;
}

html.m-ui .top-bar .hud-btn svg {
  flex-shrink: 0;
}

html.m-ui #btn-open-library,
html.m-ui #btn-open-assets {
  max-width: 100%;
  overflow: hidden;
}

html.m-ui #btn-open-library > span,
html.m-ui #btn-open-assets > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.m-ui #btn-toggle-lang {
  padding: 0 8px;
  min-width: 34px;
  justify-content: center;
}

/* 计分板与 10 英雄头像条 */
html.m-ui .broadcast-strip {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

html.m-ui .clock-box {
  grid-column: 1 / -1;
  order: -1;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 3px 10px;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 26px;
}

html.m-ui.m-heroes-collapsed .clock-box {
  border-bottom: none;
}

html.m-ui .score-num {
  font-size: 15px;
  min-width: 20px;
}

html.m-ui .clock-center {
  flex-direction: row;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

html.m-ui .clock-time {
  font-size: 13px;
}

html.m-ui .clock-meta {
  font-size: 10px;
  gap: 4px;
}

html.m-ui .team-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 3px 4px;
  min-width: 0;
}

html.m-ui .broadcast-strip .team-strip:first-of-type {
  border-right: 1px solid var(--border-subtle);
}

html.m-ui.m-heroes-collapsed .broadcast-strip .team-strip {
  display: none !important;
}

html.m-ui .hero-slot-btn {
  width: auto !important;
  min-width: 0;
  padding: 2px;
  gap: 1.5px;
  border-radius: 4px;
}

html.m-ui .hero-slot-img-wrap {
  height: 22px;
}

html.m-ui .hero-slot-name {
  display: none !important;
}

html.m-ui .hero-slot-lv {
  font-size: 8px;
  padding: 0 2px;
  line-height: 1.2;
}

html.m-ui .hero-slot-hp,
html.m-ui .hero-slot-mp {
  height: 2.5px;
}

/* ---------- 2. 移动端快捷悬浮控制栏（小地图 / 关键事件 / 英雄条折叠） ---------- */
html.m-ui #m-quick-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: fixed;
  top: calc(var(--m-top-h, 102px) + 6px);
  right: calc(var(--safe-right) + 8px);
  z-index: 29;
  pointer-events: auto;
}

.m-qbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  -webkit-backdrop-filter: var(--blur-hud);
  backdrop-filter: var(--blur-hud);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 6px 18px #00000073;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.1s;
}

.m-qbtn:active {
  transform: scale(0.95);
}

.m-qbtn.is-active {
  background: var(--bg-active);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.m-qbtn svg {
  flex-shrink: 0;
}

.m-qbtn[hidden] {
  display: none !important;
}

/* ---------- 3. 战术小地图（恢复展示，按需左上浮层） ---------- */
html.m-ui .minimap-wrap {
  display: none !important;
}

html.m-ui.m-minimap-open .minimap-wrap {
  display: flex !important;
  position: fixed;
  left: calc(var(--safe-left) + 8px);
  top: calc(var(--m-top-h, 102px) + 6px);
  bottom: auto;
  right: auto;
  z-index: 32;
  padding: 6px;
  gap: 5px;
  border-radius: 10px;
  border-color: var(--border-strong);
  box-shadow: 0 14px 36px #000000b8;
}

html.m-ui .minimap-head {
  font-size: 10.5px;
  gap: 8px;
  padding: 0 2px;
}

html.m-ui .minimap-canvas {
  width: min(176px, 46vw);
  height: min(176px, 46vw);
  border-radius: 6px;
}

/* ---------- 4. 关键事件时间轴（恢复展示，右侧滑出抽屉） ---------- */
html.m-ui .event-feed {
  display: none !important;
}

html.m-ui.m-events-open .event-feed {
  display: flex !important;
  position: fixed;
  top: calc(var(--m-top-h, 102px) + 6px);
  right: calc(var(--safe-right) + 8px);
  bottom: calc(var(--transport-h, 76px) + var(--safe-bottom) + 14px);
  left: auto;
  width: min(296px, calc(100vw - 16px - var(--safe-left) - var(--safe-right)));
  max-height: min(440px, 60dvh);
  z-index: 36;
  border-radius: 10px;
  border-color: var(--border-strong);
  box-shadow: 0 16px 42px #000000c7;
}

html.m-ui .event-feed-head {
  padding: 9px 11px;
  font-size: 12px;
}

html.m-ui .event-feed-head .icon-btn {
  width: 28px !important;
  height: 28px !important;
}

html.m-ui .event-feed-list {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  gap: 5px;
  padding: 6px;
}

html.m-ui .event-row {
  padding: 8px 9px;
  min-height: 36px;
  align-items: center;
}

html.m-ui .event-time {
  font-size: 11px;
}

html.m-ui .event-label {
  font-size: 11.5px;
}

/* 事件抽屉展开时避免悬浮快捷栏压在关闭按钮上 */
html.m-ui.m-events-open #m-quick-bar {
  opacity: 0;
  pointer-events: none;
}

/* ---------- 5. 英雄详情 HUD（紧凑三层卡片 + 可一键折叠迷你态） ---------- */
html.m-ui .unit-inspector {
  position: absolute !important;
  top: auto !important;
  left: calc(var(--safe-left) + 8px) !important;
  right: calc(var(--safe-right) + 8px) !important;
  bottom: calc(var(--transport-h, 74px) + var(--safe-bottom) + 16px) !important;
  transform: none !important;
  max-width: none !important;
  width: auto !important;
  border-radius: 10px;
  z-index: 24;
}

/* 展开底部高级控制时，临时隐藏底部英雄 HUD 避免相互挤压 */
html.m-ui.m-controls-open .unit-inspector {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) !important;
  transition: opacity 0.14s, transform 0.14s;
}

html.m-ui .unit-inspector-compact {
  min-width: 0;
  max-width: none;
  padding: 8px 10px;
  gap: 6px;
}

/* 注意：.dota-hud 与 .unit-inspector 在同一 <section> 节点上，严禁覆盖 position: absolute，
   否则会退回文档流顶部并被 bottom 负向抬出屏幕、与顶栏严重堆叠 */
html.m-ui .dota-hud {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 7px 9px;
}

html.m-ui .dota-portrait-col {
  width: 100%;
  border-right: none;
  border-bottom: 1px solid #ffffff12;
  padding: 0 0 5px 0;
  gap: 5px;
}

html.m-ui.m-hud-collapsed .dota-portrait-col {
  border-bottom: none;
  padding-bottom: 0;
}

html.m-ui .dota-portrait-top {
  align-items: center;
  gap: 8px;
}

html.m-ui .dota-portrait-frame {
  width: 44px;
  height: 32px;
}

html.m-ui .dota-attr-badge {
  width: 13px;
  height: 13px;
  top: -4px;
  left: -4px;
}

html.m-ui .dota-lv-badge {
  min-width: 17px;
  height: 17px;
  font-size: 9px;
  bottom: -4px;
  right: -4px;
}

html.m-ui .dota-hero-id {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 3px 6px;
}

html.m-ui .dota-hero-name-row {
  flex: 1 1 auto;
  min-width: 0;
}

html.m-ui .dota-hero-name {
  font-size: 13px;
}

html.m-ui .dota-player-name {
  display: none;
}

html.m-ui .dota-hud-actions {
  margin-top: 0;
  flex-shrink: 0;
  gap: 4px;
}

html.m-ui .dota-hud-actions .layer-pill {
  padding: 3px 7px;
  font-size: 10.5px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html.m-ui .dota-close-btn {
  padding: 3px 6px !important;
  min-width: 24px;
}

html.m-ui .dota-telemetry-row {
  font-size: 10px;
  padding: 2px 7px;
}

html.m-ui .dota-status-row {
  gap: 3px;
}

/* 血蓝条与技能列：用 column-reverse 让血蓝条始终紧贴英雄头部 */
html.m-ui .dota-center-col {
  flex-direction: column-reverse;
  gap: 6px;
}

html.m-ui .dota-bars-stack {
  gap: 2.5px;
}

html.m-ui .dota-bar-hp {
  height: 14px;
}

html.m-ui .dota-bar-mp {
  height: 11px;
}

html.m-ui .dota-bar-text {
  font-size: 9.5px;
}

html.m-ui .dota-bar-mp .dota-bar-text {
  font-size: 8.5px;
}

/* 技能槽水平条 */
html.m-ui .dota-abilities-strip {
  justify-content: flex-start;
  overflow-x: auto;
  gap: 5px;
  padding: 1px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html.m-ui .dota-abilities-strip::-webkit-scrollbar {
  display: none;
}

html.m-ui .dota-innate-slot {
  width: 32px;
  padding-top: 2px;
  gap: 2px;
  cursor: pointer;
}

html.m-ui .dota-innate-ring {
  width: 28px;
  height: 28px;
}

html.m-ui .dota-innate-label {
  font-size: 8.5px;
}

html.m-ui .dota-ab-slot {
  width: 40px;
  gap: 2px;
  cursor: pointer;
}

html.m-ui .dota-ab-icon-box {
  width: 38px;
  height: 38px;
}

html.m-ui .dota-ab-hotkey {
  font-size: 8px;
  line-height: 11px;
  min-width: 11px;
  padding: 0 2px;
}

html.m-ui .dota-ab-mana {
  font-size: 8px;
  line-height: 11px;
  padding: 0 3px;
}

html.m-ui .dota-ab-cd-mask {
  font-size: 12px;
}

html.m-ui .dota-ab-pips {
  width: 38px;
  height: 4px;
}

html.m-ui .dota-ab-pip {
  height: 4px;
}

html.m-ui .dota-ab-name {
  display: none;
}

/* 物品栏：改为单行超薄横向滚动条 */
html.m-ui .dota-items-col {
  border-left: none;
  border-top: 1px solid #ffffff12;
  padding: 5px 0 0 0;
  gap: 5px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html.m-ui .dota-items-col::-webkit-scrollbar {
  display: none;
}

html.m-ui .dota-inv-main {
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

html.m-ui .dota-inv-grid {
  display: flex;
  gap: 3px;
}

html.m-ui .dota-backpack-row {
  display: flex;
  gap: 3px;
  border-top: none;
  border-left: 1px solid #ffffff1a;
  padding: 0 0 0 5px;
}

html.m-ui .dota-inv-side {
  flex-direction: row;
  gap: 4px;
  padding: 0 0 0 5px;
  border-left: 1px solid #ffffff1a;
}

html.m-ui .dota-item-slot.has-item {
  cursor: pointer;
}

html.m-ui .dota-item-slot.is-main {
  width: 36px;
  height: 26px;
  flex-shrink: 0;
}

html.m-ui .dota-item-slot.is-backpack {
  width: 28px;
  height: 21px;
  flex-shrink: 0;
}

html.m-ui .dota-item-slot.is-tp,
html.m-ui .dota-item-slot.is-neutral {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* 英雄 HUD 折叠精简态：
 *   - 竖屏（not .m-landscape）：双行高密度迷你栏
 *       第 1 行：[头像+等级] [英雄名+阵营] [缩小技能条（可横滑）] [跟随/关闭]
 *       第 2 行：[缩短血蓝条（左侧）] [缩小 6 格主装备 + TP/中立（右侧）]
 *   - 横屏（.m-landscape）：单行超薄迷你条（仅头像+名称+操作+血蓝条） */
html.m-ui.m-hud-collapsed .dota-hud .dota-telemetry-row,
html.m-ui.m-hud-collapsed .dota-hud .dota-status-row,
html.m-ui.m-landscape.m-hud-collapsed .dota-hud .dota-abilities-strip,
html.m-ui.m-landscape.m-hud-collapsed .dota-hud .dota-items-col {
  display: none !important;
}

html.m-ui.m-hud-collapsed .dota-hud {
  gap: 4px;
  padding: 6px 9px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-hud {
  display: grid;
  grid-template-columns: 36px minmax(0, auto) minmax(0, 1fr) minmax(0, auto) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 5px;
  row-gap: 5px;
  padding: 6px 8px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-portrait-col,
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-portrait-top,
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-hero-id,
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-center-col {
  display: contents !important;
}

/* 第 1 行第 1 列：迷你头像 */
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-portrait-frame {
  grid-column: 1;
  grid-row: 1;
  width: 36px;
  height: 26px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-attr-badge {
  width: 11px;
  height: 11px;
  top: -3px;
  left: -3px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-lv-badge {
  min-width: 15px;
  height: 15px;
  font-size: 8.5px;
  padding: 0 2px;
  bottom: -3px;
  right: -3px;
}

/* 第 1 行第 2 列：英雄名 + 阵营胶囊 */
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-hero-name-row {
  grid-column: 2;
  grid-row: 1;
  max-width: 96px;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-hero-name {
  font-size: 11.5px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-side-pill {
  font-size: 8.5px;
  padding: 0 3px;
  line-height: 1.35;
}

/* 第 1 行第 3~4 列（绿圈区）：缩小技能条（保留冷却扫盘与点击详情） */
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-abilities-strip {
  display: flex !important;
  grid-column: 3 / 5;
  grid-row: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding: 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-innate-slot,
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-hotkey,
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-mana,
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-passive-dot,
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-pips {
  display: none !important;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-slot {
  width: 24px;
  gap: 0;
  flex-shrink: 0;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-icon-box {
  width: 24px;
  height: 24px;
  border-width: 1px;
  border-radius: 3px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-cd-mask {
  font-size: 9.5px;
}

/* 第 1 行第 5 列：跟随 / 关闭操作按钮 */
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-hud-actions {
  grid-column: 5;
  grid-row: 1;
  justify-self: end;
  gap: 3px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-hud-actions .layer-pill {
  padding: 2px 6px;
  font-size: 10px;
  min-height: 22px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-close-btn {
  padding: 2px 5px !important;
  min-width: 22px;
}

/* 第 2 行第 1~3 列：缩短后的血蓝条（左侧约 38%~45%） */
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-bars-stack {
  grid-column: 1 / 4;
  grid-row: 2;
  min-width: 0;
  gap: 2px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-bar-hp {
  height: 12px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-bar-mp {
  height: 10px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-bar-text {
  font-size: 9px;
  line-height: 1;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-bar-mp .dota-bar-text {
  font-size: 8px;
}

/* 第 2 行第 4~5 列（红圈区）：缩小主装备 6 格 + TP / 中立槽 */
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-items-col {
  display: flex !important;
  grid-column: 4 / 6;
  grid-row: 2;
  justify-self: end;
  align-items: center;
  width: 100%;
  max-width: min(218px, 58vw);
  min-width: 0;
  border-top: none;
  border-left: none;
  padding: 0;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-inv-main {
  gap: 0;
  margin-left: auto;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-inv-grid {
  gap: 2px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-backpack-row {
  display: none !important;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-inv-side {
  gap: 2px;
  padding-left: 4px;
  border-left: 1px solid #ffffff1a;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-item-slot.is-main {
  width: 26px;
  height: 20px;
  border-radius: 2.5px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-item-slot.is-tp,
html.m-ui:not(.m-landscape).m-hud-collapsed .dota-item-slot.is-neutral {
  width: 20px;
  height: 20px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-item-empty-lbl {
  font-size: 7px;
}

html.m-ui:not(.m-landscape).m-hud-collapsed .dota-item-cd-text {
  font-size: 9px;
}

/* 独立定位在 HUD 顶部居中的精致折叠/展开拉手小耳（脱离 React 树，竖横屏通用） */
html.m-ui #m-hud-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: fixed;
  height: 18px;
  min-width: 52px;
  padding: 0 10px;
  border-radius: 8px 8px 0 0;
  border: 1px solid #cca35655;
  border-bottom: none;
  background: #131922f2;
  color: var(--gold-bright);
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
  z-index: 25;
  transform: translateX(-50%);
  box-shadow: 0 -4px 12px #00000066;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

html.m-ui #m-hud-collapse-btn:active {
  background: var(--bg-active);
  border-color: var(--border-gold);
}

html.m-ui #m-hud-collapse-btn[hidden],
html.m-ui.m-controls-open #m-hud-collapse-btn,
html.m-ui.m-controls-open #m-gesture-toast,
html.m-ui.m-hud-open #m-gesture-toast,
html.m-ui.m-modal-open #m-hud-collapse-btn,
html.m-ui.m-modal-open #m-quick-bar,
html.m-ui.m-modal-open #m-transport-dock,
html.m-ui.m-modal-open #m-gesture-toast {
  display: none !important;
}

/* ---------- 6. 底部播放控制栏（精简 2 层 + 向上展开高级设置） ---------- */
html.m-ui .transport-bar {
  left: calc(var(--safe-left) + 8px);
  right: calc(var(--safe-right) + 8px);
  bottom: calc(var(--safe-bottom) + 8px);
  padding: 6px 10px 7px;
  gap: 5px;
  border-radius: 10px;
  z-index: 28;
}

html.m-ui .scrubber-wrap {
  height: 26px;
}

html.m-ui .scrubber-markers {
  top: 2px;
}

html.m-ui .timeline-range {
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

html.m-ui .timeline-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: #ffffff26;
}

html.m-ui .timeline-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold-bright);
  border: 2px solid #0b0f15;
  box-shadow: 0 0 0 2px #cca35655, 0 2px 6px #000a;
  margin-top: -6px;
}

html.m-ui .timeline-range::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: #ffffff26;
}

html.m-ui .timeline-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold-bright);
  border: 2px solid #0b0f15;
}

html.m-ui .transport-controls {
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 8px;
}

/* 第 1 组：核心播放按钮始终固定在最底行，右侧留空给移动端倍速+选项胶囊 */
html.m-ui .transport-controls > .control-group:nth-child(1) {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding-right: 108px;
  min-height: 32px;
}

html.m-ui .transport-controls > .control-group:nth-child(1) .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

html.m-ui #btn-play-pause {
  width: 34px !important;
  height: 32px !important;
}

html.m-ui .transport-controls > .control-group:nth-child(1) > .mono {
  min-width: 0 !important;
  margin-left: 2px !important;
  font-size: 11px !important;
  white-space: nowrap;
}

/* 加载分片提示徽章悬浮在进度条左上，避免切换分片时引起底栏高度抖动 */
html.m-ui .transport-controls > .control-group:nth-child(1) > .badge {
  position: absolute;
  top: -22px;
  left: 8px;
  pointer-events: none;
  background: #0c1119eb;
  box-shadow: 0 2px 8px #0009;
}

/* 折叠态隐藏倍速条、视野/视角组、图层组 */
html.m-ui:not(.m-controls-open) .transport-controls > .control-group:nth-child(1) .segmented,
html.m-ui:not(.m-controls-open) .transport-controls > .control-group:nth-child(2),
html.m-ui:not(.m-controls-open) .transport-controls > .control-group:nth-child(3) {
  display: none !important;
}

/* 展开态：优雅展示倍速、视野、视角、图层 */
html.m-ui.m-controls-open .transport-controls > .control-group:nth-child(1) .segmented {
  display: flex;
  width: calc(100% + 108px);
  margin-right: -108px;
  margin-bottom: 4px;
}

html.m-ui.m-controls-open .transport-controls > .control-group:nth-child(1) .segmented button {
  flex: 1;
  padding: 6px 4px;
  font-size: 11px;
}

html.m-ui.m-controls-open .transport-controls > .control-group:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

html.m-ui.m-controls-open .transport-controls > .control-group:nth-child(2) .segmented {
  flex: 1 1 auto;
}

html.m-ui.m-controls-open .transport-controls > .control-group:nth-child(2) .segmented button {
  flex: 1;
  padding: 6px 6px;
  font-size: 11px;
}

html.m-ui.m-controls-open .transport-controls > .control-group:nth-child(2) .icon-btn {
  width: 30px;
  height: 30px;
}

html.m-ui.m-controls-open .transport-controls > .control-group:nth-child(3) {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

html.m-ui.m-controls-open .transport-controls > .control-group:nth-child(3) .layer-pill {
  padding: 5px 8px;
  font-size: 11px;
  border-radius: 6px;
}

/* 底部右侧固定挂载的快捷胶囊（倍速循环 + 展开设置） */
html.m-ui #m-transport-dock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: fixed;
  right: calc(var(--safe-right) + 18px);
  bottom: calc(var(--safe-bottom) + 17px);
  z-index: 30;
}

.m-tdock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: #ffffff0c;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.m-tdock-btn.is-speed {
  font-family: var(--font-mono);
  min-width: 38px;
  color: var(--gold-bright);
  border-color: #cca3564d;
  background: #cca35618;
}

.m-tdock-btn.is-active {
  background: var(--bg-active);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

/* ---------- 7. 移动端点击查看技能/物品详情居中浮层 ---------- */
#m-tooltip-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #04060a99;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 16px) calc(var(--safe-right) + 16px) calc(var(--safe-bottom) + 16px) calc(var(--safe-left) + 16px);
}

#m-tooltip-backdrop.is-open {
  display: flex !important;
}

.m-tooltip-sheet {
  position: relative;
  width: min(330px, 100%);
  max-height: 70dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #0c1119fa;
  border: 1px solid #cca35699;
  border-radius: 12px;
  padding: 13px 15px;
  box-shadow: 0 20px 54px #000000e0;
  color: var(--text-primary);
}

.m-tooltip-sheet .dota-tt-head {
  padding-right: 28px;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.m-tooltip-sheet .dota-tt-title {
  font-size: 15px;
}

.m-tooltip-sheet .dota-tt-sub {
  font-size: 11px;
}

.m-tooltip-sheet .dota-tt-stats {
  font-size: 11.5px;
  gap: 10px;
  margin-bottom: 8px;
}

.m-tooltip-sheet .dota-tt-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e4;
}

.m-tooltip-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #ffffff0e;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* ---------- 8. 移动端轻触控引导提示（首次自动淡出，置于底栏上方避开顶栏/快捷栏/加载环） ---------- */
html.m-ui #m-gesture-toast.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: fixed;
  left: 50%;
  top: auto;
  bottom: calc(var(--m-transport-h, 76px) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  padding: 5px 11px;
  border-radius: 99px;
  background: #080b10d9;
  border: 1px solid #cca35659;
  color: #dce4ee;
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 27;
  box-shadow: 0 6px 20px #00000099;
  animation: m-toast-fade 0.25s ease-out;
}

@keyframes m-toast-fade {
  from {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ---------- 9. 3D 场景头顶血条在手机上略微精简 ---------- */
html.m-ui .unit-plate-head {
  font-size: 9px;
  padding: 0.5px 4px;
}

html.m-ui .unit-plate-bars {
  width: 48px;
}

html.m-ui .unit-plate-bars.is-small {
  width: 28px;
}

/* ---------- 10. 录像库弹窗 & 3D 资产抽屉移动端适配 ---------- */
html.m-ui .modal-backdrop {
  padding: calc(var(--safe-top) + 8px) calc(var(--safe-right) + 8px) calc(var(--safe-bottom) + 8px) calc(var(--safe-left) + 8px);
  align-items: flex-end;
}

html.m-ui .modal-card {
  width: 100%;
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px);
  border-radius: 14px;
}

html.m-ui .drawer-card {
  width: 100vw;
  max-width: 100vw;
  border-left: none;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

html.m-ui .modal-head {
  padding: 12px 14px;
  position: sticky;
  top: 0;
  background: var(--bg-surface-solid);
  z-index: 3;
}

html.m-ui .modal-head h2 {
  font-size: 14.5px;
}

html.m-ui .modal-head .icon-btn {
  width: 34px;
  height: 34px;
}

html.m-ui .modal-body {
  padding: 12px 14px calc(var(--safe-bottom) + 18px);
  gap: 12px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

html.m-ui .section-block {
  padding: 11px 12px;
  gap: 9px;
}

html.m-ui .field-row {
  flex-wrap: wrap;
  gap: 8px;
}

/* iOS Safari 输入框/下拉框 >= 16px 防止聚焦页面自动放大 */
html.m-ui .text-input,
html.m-ui select.text-input {
  font-size: 16px !important;
  height: 40px;
  min-width: 0;
  flex: 1 1 180px;
}

html.m-ui .field-row > .hud-btn,
html.m-ui .field-row > a.hud-btn {
  height: 38px;
  flex: 1 1 auto;
  justify-content: center;
  font-size: 12.5px;
}

html.m-ui .upload-zone {
  padding: 18px 12px;
}

html.m-ui .replay-item {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 11px;
}

html.m-ui .replay-item > div:last-child {
  justify-content: flex-end;
}

html.m-ui .replay-item .hud-btn {
  height: 34px;
  flex: 1 1 auto;
  justify-content: center;
}

html.m-ui .slider-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

html.m-ui .slider-field {
  font-size: 12px;
  gap: 6px;
}

html.m-ui .slider-field input[type="range"] {
  height: 28px;
}

html.m-ui .asset-row {
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 9px;
}

/* ---------- 11. 资源加载器面板（#d3l-panel）移动端适配 ---------- */
html.m-ui #d3l-panel {
  top: calc(var(--m-top-h, 102px) + 8px) !important;
  width: calc(100vw - 16px - var(--safe-left) - var(--safe-right)) !important;
  max-width: 440px !important;
  padding: 10px 12px !important;
  z-index: 55 !important;
}

html.m-ui #d3l-panel .d3l-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 4px 8px !important;
  margin: 6px 0 !important;
}

html.m-ui #d3l-panel .d3l-bar {
  grid-column: 1 / -1 !important;
  order: 2 !important;
  height: 6px !important;
}

html.m-ui #d3l-panel .d3l-val {
  order: 1 !important;
  font-size: 10.5px !important;
  white-space: nowrap !important;
}

html.m-ui #d3l-panel .d3l-foot {
  flex-wrap: wrap !important;
  gap: 6px !important;
  font-size: 10.5px !important;
}

/* ---------- 11b. 游戏内资源加载圆环 HUD（#d3l-hud，assets-loader 注入）移动端适配 ----------
   载入游戏后不再弹大面板：顶部土黄色圆环转圈，悬停/点按圆环才展开详情 tooltip */
html.m-ui #d3l-hud {
  /* 顶栏左下角，避开居中计分板（时钟 + 英雄头像条） */
  left: calc(var(--safe-left) + 8px) !important;
  top: calc(var(--m-top-h, 102px) + 10px) !important;
  transform: none !important;
}

/* 展开小地图浮层时将资源加载圆环下移至小地图下方，避免与小地图标题叠在一起 */
html.m-ui.m-minimap-open #d3l-hud {
  top: calc(var(--m-top-h, 102px) + min(176px, 46vw) + 52px) !important;
}

html.m-ui #d3l-tip {
  left: 0 !important;
  transform: none !important;
  width: calc(100vw - 16px - var(--safe-left) - var(--safe-right)) !important;
  max-width: 440px !important;
  padding: 10px 12px !important;
}

html.m-ui #d3l-tip .d3l-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 4px 8px !important;
  margin: 6px 0 !important;
}

html.m-ui #d3l-tip .d3l-bar {
  grid-column: 1 / -1 !important;
  order: 2 !important;
  height: 6px !important;
}

html.m-ui #d3l-tip .d3l-val {
  order: 1 !important;
  font-size: 10.5px !important;
  white-space: nowrap !important;
}

html.m-ui #d3l-tip .d3l-foot {
  flex-wrap: wrap !important;
  gap: 6px !important;
  font-size: 10.5px !important;
}

/* 触屏设备没有 hover：点按圆环展开/收起详情（见 mobile-ui.js） */
html.m-ui #d3l-hud.d3l-tip-open #d3l-tip {
  display: block;
}

/* ---------- 12. 超窄手机屏（<= 375px）精细微调 ---------- */
@media (max-width: 375px) {
  html.m-ui .top-bar .hud-btn {
    padding: 0 7px;
    font-size: 11px;
  }

  html.m-ui #btn-open-assets > span {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.m-ui .hero-slot-img-wrap {
    height: 19px;
  }

  html.m-ui .dota-ab-slot {
    width: 36px;
  }

  html.m-ui .dota-ab-icon-box {
    width: 34px;
    height: 34px;
  }

  html.m-ui .dota-ab-pips {
    width: 34px;
  }

  html.m-ui .dota-item-slot.is-main {
    width: 32px;
    height: 24px;
  }

  html.m-ui:not(.m-landscape).m-hud-collapsed .dota-hero-name-row {
    max-width: 82px;
  }

  html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-slot {
    width: 22px;
  }

  html.m-ui:not(.m-landscape).m-hud-collapsed .dota-ab-icon-box {
    width: 22px;
    height: 22px;
  }

  html.m-ui:not(.m-landscape).m-hud-collapsed .dota-items-col {
    max-width: min(204px, 58vw);
  }

  html.m-ui:not(.m-landscape).m-hud-collapsed .dota-item-slot.is-main {
    width: 24px;
    height: 19px;
  }

  html.m-ui:not(.m-landscape).m-hud-collapsed .dota-item-slot.is-tp,
  html.m-ui:not(.m-landscape).m-hud-collapsed .dota-item-slot.is-neutral {
    width: 19px;
    height: 19px;
  }

  html.m-ui .transport-controls > .control-group:nth-child(1) {
    gap: 4px;
    padding-right: 98px;
  }

  html.m-ui .m-tdock-btn {
    padding: 0 6px;
    font-size: 10.5px;
  }
}

/* ==========================================================================
 * 手机横屏矮屏专属模式（html.m-ui.m-landscape，例如 844x390 / 667x375）
 * 横向空间充裕、垂直高度紧张 -> 单行顶栏 + 横向紧凑英雄 HUD + 超薄播放条
 * ========================================================================== */
html.m-ui.m-landscape .top-bar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto;
  gap: 6px;
  padding: calc(var(--safe-top) + 4px) calc(var(--safe-right) + 8px) 4px calc(var(--safe-left) + 8px);
}

html.m-ui.m-landscape .top-left-tools {
  grid-column: 1;
  grid-row: 1;
}

html.m-ui.m-landscape .broadcast-strip {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  justify-content: safe center;
  width: auto;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  justify-self: center;
}

html.m-ui.m-landscape .broadcast-strip::-webkit-scrollbar {
  display: none;
}

html.m-ui.m-landscape .top-right-tools {
  grid-column: 3;
  grid-row: 1;
}

html.m-ui.m-landscape .top-bar .hud-btn {
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

/* 横屏下隐藏顶栏大按钮长文案，仅保留清晰图标或超短标识 */
html.m-ui.m-landscape #btn-open-library span,
html.m-ui.m-landscape #btn-open-assets span {
  display: none;
}

html.m-ui.m-landscape .clock-box {
  order: 0;
  flex-shrink: 0;
  border-bottom: none;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  padding: 2px 8px;
  gap: 6px;
}

html.m-ui.m-landscape.m-heroes-collapsed .clock-box {
  border-left: none;
  border-right: none;
}

html.m-ui.m-landscape .clock-center {
  flex-direction: column;
  gap: 0;
}

html.m-ui.m-landscape .clock-time {
  font-size: 12px;
  line-height: 1.15;
}

html.m-ui.m-landscape .clock-meta {
  font-size: 9px;
}

html.m-ui.m-landscape .team-strip {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 2px 4px;
}

html.m-ui.m-landscape .broadcast-strip .team-strip:first-of-type {
  border-right: none;
}

html.m-ui.m-landscape .hero-slot-btn {
  width: clamp(26px, 4.6vw, 35px) !important;
  flex-shrink: 0;
}

html.m-ui.m-landscape .hero-slot-img-wrap {
  height: 19px;
}

html.m-ui.m-landscape #m-quick-bar {
  flex-direction: row;
  gap: 5px;
  top: calc(var(--m-top-h, 44px) + 4px);
}

html.m-ui.m-landscape .m-qbtn {
  height: 28px;
  padding: 0 8px;
  font-size: 10.5px;
}

html.m-ui.m-landscape.m-minimap-open .minimap-wrap {
  top: calc(var(--m-top-h, 44px) + 4px);
}

html.m-ui.m-landscape.m-minimap-open #d3l-hud {
  top: calc(var(--m-top-h, 44px) + min(144px, 40dvh) + 48px) !important;
}

html.m-ui.m-landscape .minimap-canvas {
  width: min(144px, 40dvh);
  height: min(144px, 40dvh);
}

html.m-ui.m-landscape.m-events-open .event-feed {
  top: calc(var(--m-top-h, 44px) + 4px);
  max-height: calc(100dvh - var(--m-top-h, 44px) - var(--transport-h, 62px) - 24px);
}

/* 横屏英雄 HUD：保持三列横向紧凑排列，总高 < 96px */
html.m-ui.m-landscape .unit-inspector {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  bottom: calc(var(--transport-h, 62px) + var(--safe-bottom) + 11px) !important;
  max-width: calc(100vw - var(--safe-left) - var(--safe-right) - 16px) !important;
}

html.m-ui.m-landscape .dota-hud {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
}

html.m-ui.m-landscape .dota-portrait-col {
  width: 148px;
  border-bottom: none;
  border-right: 1px solid #ffffff14;
  padding: 0 8px 0 0;
  gap: 3px;
}

html.m-ui.m-landscape.m-hud-collapsed .dota-portrait-col {
  width: auto;
  border-right: none;
  padding-right: 0;
}

html.m-ui.m-landscape .dota-hero-id {
  padding-right: 0;
}

html.m-ui.m-landscape .dota-center-col {
  flex-direction: column;
  gap: 4px;
}

html.m-ui.m-landscape .dota-ab-slot {
  width: 34px;
}

html.m-ui.m-landscape .dota-ab-icon-box {
  width: 32px;
  height: 32px;
}

html.m-ui.m-landscape .dota-ab-pips {
  width: 32px;
}

html.m-ui.m-landscape .dota-items-col {
  border-top: none;
  border-left: 1px solid #ffffff14;
  padding: 0 0 0 8px;
}

html.m-ui.m-landscape .dota-inv-main {
  flex-direction: column;
  gap: 3px;
}

html.m-ui.m-landscape .dota-inv-grid {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  grid-template-rows: repeat(2, 22px);
  gap: 2px;
}

html.m-ui.m-landscape .dota-backpack-row {
  display: none;
}

html.m-ui.m-landscape .dota-inv-side {
  flex-direction: column;
  border-left: none;
  padding-left: 0;
  gap: 3px;
}

html.m-ui.m-landscape .dota-item-slot.is-main {
  width: 30px;
  height: 22px;
}

html.m-ui.m-landscape .dota-item-slot.is-tp,
html.m-ui.m-landscape .dota-item-slot.is-neutral {
  width: 22px;
  height: 22px;
}

html.m-ui.m-landscape .transport-bar {
  padding: 4px 10px 5px;
  gap: 3px;
  bottom: calc(var(--safe-bottom) + 5px);
}

html.m-ui.m-landscape .scrubber-wrap {
  height: 20px;
}

html.m-ui.m-landscape .transport-controls > .control-group:nth-child(1) {
  min-height: 28px;
}

html.m-ui.m-landscape .transport-controls > .control-group:nth-child(1) .icon-btn,
html.m-ui.m-landscape #btn-play-pause {
  height: 26px !important;
  width: 28px !important;
}

html.m-ui.m-landscape #m-transport-dock {
  bottom: calc(var(--safe-bottom) + 12px);
}

html.m-ui.m-landscape .m-tdock-btn {
  height: 26px;
}

html.m-ui.m-landscape .modal-backdrop {
  align-items: center;
}

html.m-ui.m-landscape .slider-grid {
  grid-template-columns: 1fr 1fr;
}
