/* 活动室终端大屏 · 1920×1080 固定版式，等比缩放铺满 16:9
   版式：顶栏（标题+时间+信号） / 中部（信息+播放+安排） / 六个大方块
   整屏底色是一种颜色，块与块之间的缝就是底色本身
   所有色值来自 themes.css，本文件不写死红/蓝/黑 */

.stage {
  position: relative; /* 应用面板要按 1920×1080 铺满，不能按视口算 */
  display: flex;
  flex-direction: column;
  background: var(--w-bg);
  color: var(--w-on);
  overflow: hidden;
}

/* ---------- ① 顶栏 14%：只放一行标题，右边把时间收在一处 ---------- */

.topbar {
  position: relative;
  flex: 0 0 13%;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 0 40px;
}

/* 顶栏底部一条细线，把标题区和内容区分开，不用色块 */
.topbar::after {
  content: "";
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 0;
  height: 1px;
  background: var(--w-rule);
}

/* 顶栏标题：一行大字，超长就向左匀速滚，老人不用等它换行 */
.top-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 72px;
  line-height: 1.1;
  letter-spacing: 4px;
  color: var(--w-on);
  overflow: hidden;
  white-space: nowrap;
}

.tt-track {
  display: inline-flex;
  align-items: baseline;
  gap: 120px;
  white-space: nowrap;
  will-change: transform;
}

.tt-track.is-run {
  animation: tt-scroll 26s linear infinite;
}

.tt-track > span {
  display: inline-block;
}

@keyframes tt-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* 系统里降级：不动画，静止也能读全（部分安卓 WebView 省电模式会关动画） */
@media (prefers-reduced-motion: reduce) {
  .tt-track.is-run {
    animation: none;
  }
}

/* 右上角：音量条 + 信号，都靠右，垂直居中于标题那一行 */
.top-right {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 0 0 auto;
}

/* 信号：三条横杠，长的在上，下面一个点，整体小一号 */
.sig {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 32px;
  padding: 14px 4px;
}

.sig-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--w-gold);
  transition: opacity 0.2s ease, background 0.2s ease;
}

/* 三条横杠：最长在上，依次变短，右端对齐 */
.sig-bar:nth-child(1) { width: 30px; }
.sig-bar:nth-child(2) { width: 21px; }
.sig-bar:nth-child(3) { width: 12px; }

/* 最下面一个点，跟最短那根右端对齐 */
.sig-dot {
  display: block;
  width: 6px;
  height: 6px;
  margin-top: 2px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--w-gold);
}

/* 断网：杠和点全部变灰，再压一道斜杠 */
.sig.is-off .sig-bar,
.sig.is-off .sig-dot {
  background: var(--w-on-faint);
  opacity: 0.45;
}

.sig.is-off {
  position: relative;
}

.sig.is-off::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 50%;
  height: 2px;
  background: var(--w-on);
  transform: rotate(-38deg);
  opacity: 0.8;
}

/* ---------- ② 中部 56% ---------- */

.main {
  flex: 0 0 66%;
  display: grid;
  grid-template-columns: 1255px minmax(0, 1fr);
  gap: 24px;
  padding: 8px 40px 20px;
  min-height: 0;
}

.side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  justify-content: flex-start;
}

/* 右栏底部一层底色遮罩：列表还有内容时，最下面一行是"淡出"的，看得出手指还能往上滑 */
.side-right {
  position: relative;
}

/* 标题贴顶、列表吃满中间、状态条贴底 */
.side-right > .side-head {
  flex: 0 0 auto;
}

.side-right > .media-list,
.side-right > .today-list {
  flex: 1 1 auto;
  min-height: 0;
}

.side-right.is-scroll .media-list,
.side-right.is-scroll .today-list {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 52px), rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 52px), rgba(0, 0, 0, 0) 100%);
}

.side > * {
  flex: 0 0 auto;
}

/* 右栏底部"正在播"状态条：分类 / 进度 / 接着播哪条 */
/* 本周小结：领导检查时一眼能读的数字，只有数，没有人名 */
.week-box {
  flex: 0 0 auto;
  margin-top: 14px;
  padding: 14px 18px 16px;
  border-radius: 14px;
  background: var(--w-gold-soft);
  border: 1.5px solid var(--w-gold);
}

.week-box[hidden] {
  display: none;
}

.wk-h {
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--w-gold);
  margin-bottom: 8px;
}

.wk-line {
  font-size: 26px;
  line-height: 1.5;
  color: var(--w-on-sub);
  white-space: nowrap;
}

.wk-line b {
  font-size: 32px;
  color: var(--w-on);
  padding: 0 2px;
}

.now-line {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  padding-top: 16px;
  border-top: 1px solid var(--w-rule);
}

.now-line[hidden] {
  display: none;
}

/* 空闲时这一行只留一句"今天共几场"，不显示进度 */
.now-line.is-idle .now-clock {
  display: none;
}

.now-line.is-idle .next-line {
  justify-content: flex-end;
}

.now-cat {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 18px;
  line-height: 31px;
  letter-spacing: 1px;
  color: var(--w-gold);
  background: var(--w-gold-soft);
  border: 1.5px solid var(--w-gold);
  white-space: nowrap;
}

.now-clock {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 19px;
  color: var(--w-on-faint);
  font-variant-numeric: tabular-nums;
}

.now-clock b {
  font-size: 22px;
  font-weight: 500;
  color: var(--w-on);
}

.now-clock i {
  font-style: normal;
}

.next-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 19px;
  font-weight: 400;
  color: var(--w-on-sub);
  white-space: nowrap;
  overflow: hidden;
}

.next-line b {
  flex: 0 0 auto;
  color: var(--w-on-faint);
  font-weight: 400;
  letter-spacing: 1px;
}

.next-line span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右栏标题行：平时是"今日安排"，点开板块后变成该板块清单 + 一个返回 */
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.side-back {
  height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid var(--w-rule);
  font-size: 17px;
  font-weight: 400;
  color: var(--w-on-sub);
  background: transparent;
}

.side-back:active {
  background: var(--w-gold-soft);
}

/* 今日安排 / 板块清单 的标题 */
.side-h {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--w-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* 清单态时，标题前面点一个该板块的颜色，跟下面那个方块对上 */
.side-right .side-h::before {
  content: "";
  display: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, var(--w-gold));
  flex: 0 0 auto;
}

.side-right[data-cat]:not([data-cat=""]) .side-h::before {
  display: block;
}

.side-right[data-cat="family"] { --dot: var(--cat-family); }
.side-right[data-cat="exercise"] { --dot: var(--cat-exercise); }
.side-right[data-cat="health"] { --dot: var(--cat-health); }
.side-right[data-cat="opera"] { --dot: var(--cat-opera); }
.side-right[data-cat="news"] { --dot: var(--cat-news); }
.side-right[data-cat="safety"] { --dot: var(--cat-safety); }

.today-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--w-rule);
}

.today-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--w-rule);
}

.today-item .t-time {
  font-size: 24px;
  color: var(--w-gold);
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.today-item .t-name {
  font-size: 25px;
  font-weight: 400;
  color: var(--w-on);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.today-item.is-now .t-name {
  color: var(--w-gold);
}

.today-item.is-now .t-time::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--w-gold);
  vertical-align: 4px;
}

/* 板块内容清单：点大板块后出现在右栏，点哪条播哪条 */
.media-list,
.today-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--w-rule);
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--w-gold) transparent;
  padding-right: 10px;
}

/* 滚动条做粗一点、用金色，老人看得见"这里能滑" */
.media-list::-webkit-scrollbar,
.today-list::-webkit-scrollbar {
  width: 8px;
}

.media-list::-webkit-scrollbar-track,
.today-list::-webkit-scrollbar-track {
  background: var(--w-rule);
  border-radius: 4px;
}

.media-list::-webkit-scrollbar-thumb,
.today-list::-webkit-scrollbar-thumb {
  background: var(--w-gold);
  border-radius: 4px;
}

.media-list[hidden],
.today-list[hidden] {
  display: none;
}

.media-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--w-rule);
  flex: 0 0 auto;
}

.media-item:active {
  background: var(--w-gold-soft);
}

/* 照片墙那条置顶：用金色小图标和一条金线，跟普通条目区分开 */
.media-item.is-wall {
  border-bottom-color: var(--w-gold);
}

.media-item.is-wall .m-idx {
  color: var(--w-gold);
  font-size: 19px;
}

.media-item .m-idx {
  flex: 0 0 auto;
  min-width: 26px;
  font-size: 21px;
  color: var(--w-on-faint);
  font-variant-numeric: tabular-nums;
}

.media-item .m-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 25px;
  font-weight: 400;
  color: var(--w-on);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-item .m-dur {
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--w-on-faint);
  font-variant-numeric: tabular-nums;
}

/* 正在播的那一条：金字 + 左侧小三角，一眼找到 */
.media-item.is-now .m-name,
.media-item.is-now .m-idx {
  color: var(--w-gold);
}

.media-more {
  border-bottom: 0;
}

.media-more .m-name {
  color: var(--w-on-faint);
  font-size: 19px;
  white-space: normal;
}

.media-item.is-now .m-idx::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 8px;
  border-left: 8px solid var(--w-gold);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  vertical-align: middle;
}

/* 播放窗口：深一档的底 + 一圈金边，映在红底上有层次 */
.player {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #140707;
  box-shadow: 0 0 0 3px var(--w-player-ring), 0 22px 50px rgba(30, 1, 6, 0.45);
}

.player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  background: #140707;
}

.player.is-video video {
  display: block;
}

.player.is-video .gfx {
  display: none;
}

.gfx {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 44px 72px;
  text-align: center;
  background: var(--w-player);
}

.gfx-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--w-panel);
  box-shadow: 0 0 0 3px var(--w-player-ring), 0 14px 34px rgba(0, 0, 0, 0.28);
}

.gfx-ico svg {
  width: 94px;
  height: 94px;
  display: block;
}

.gfx-title {
  font-size: 54px;
  line-height: 1.22;
  letter-spacing: 4px;
  color: var(--w-player-text);
  max-width: 820px;
  text-wrap: balance;
}

.gfx-sub {
  font-size: 26px;
  font-weight: 400;
  color: var(--w-player-sub);
  max-width: 730px;
  line-height: 1.55;
}

.gfx-sub:empty {
  display: none;
}

/* 照片墙：九宫格铺满画面，缺口是底不是白，看着像一本相册 */
.wall {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  /* 必须 minmax(0,1fr)：默认 1fr 的 min 是内容尺寸，图片会把行撑高，第三行被挤出画面 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  /* 不加 border-box 时 padding 会撑出去，整格右移、第三列被裁掉一条 */
  box-sizing: border-box;
  background: #0C0506;
  overflow: hidden;
}

.wall[hidden] {
  display: none;
}

.wall img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  background: #1A0A0C;
}

/* 生日卡：今天有寿星，空闲时的画面就是这张 */
.gfx.is-birthday .gfx-ico {
  box-shadow: 0 0 0 4px var(--w-gold), 0 0 0 14px rgba(235, 201, 120, 0.16), 0 14px 34px rgba(0, 0, 0, 0.3);
}

.gfx.is-birthday .gfx-title {
  font-size: 62px;
  letter-spacing: 6px;
}

/* 护工传的照片：整张铺满、不裁切，标题压在最底一条 */
.gfx-photo {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

/* 竖屏手机照放 16:9 大屏，两侧本来会黑边；垫一层同图虚化背景，填满又不裁人 */
.gfx-photo-bg {
  position: absolute;
  inset: -10%;
  display: block;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(58px) saturate(1.35);
  transform: scale(1.1);
  opacity: 0.9;
}

/* 横构图差得不多（手机横拍、相机照）直接铺满，裁掉边角看不出来，比虚化补边干净 */
.gfx-photo.is-cover .gfx-photo-bg {
  display: none;
}

.gfx-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  z-index: 1;
}

.gfx-photo.is-cover img {
  object-fit: cover;
}

.gfx.is-photo {
  padding: 0;
  gap: 0;
}

.gfx.is-photo .gfx-photo {
  display: block;
}

.gfx.is-photo .gfx-ico,
.gfx.is-photo .gfx-sub {
  display: none;
}

.gfx.is-photo .gfx-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  max-width: none;
  padding: 46px 40px 28px;
  /* 左下角压着扫码牌，标题左边留出让位；全屏收起扫码牌后再收回来 */
  padding-left: 165px;
  text-align: left;
  font-size: 42px;
  letter-spacing: 2px;
  color: #FFFFFF;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.46) 58%, rgba(0, 0, 0, 0) 100%);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stage.is-full .gfx.is-photo .gfx-title {
  padding-left: 56px;
}

/* 扫码上传牌：二维码在上、一行字在下，贴着画面左下角；只有全屏时才收起来 */
.qr-post {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 9px 9px 10px;
  border-radius: 11px;
  background: var(--w-panel);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.qr-post[hidden] {
  display: none;
}

/* 比原来小三分之一：150 → 100 */
.qr-img {
  width: 100px;
  height: 100px;
  display: block;
  border-radius: 3px;
  background: #fff;
}

.qr-tip {
  font-size: 18px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--w-panel-text);
  white-space: nowrap;
}

/* 全屏铺满画面时它必须让位；看照片墙时也让位，别压在老人照片上 */
.stage.is-full .qr-post,
.stage.is-wall .qr-post {
  display: none;
}

/* 播放进度：贴着画面最底一条，不占画面、不遮字幕 */
.film-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  height: 6px;
  background: rgba(255, 255, 255, 0.14);
  display: none;
}

.stage.is-playing .film-progress {
  display: block;
}

.film-bar {
  height: 100%;
  width: 0;
  background: var(--w-gold);
  transition: width 0.4s linear;
}

/* 全屏按钮：贴在画面右下角，不抢戏但随时能点 */
.fs-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.30);
  background: rgba(0, 0, 0, 0.40);
  color: #fff;
  font-size: 20px;
  font-weight: 400;
}

.fs-btn svg {
  width: 24px;
  height: 24px;
}

.fs-btn:active {
  background: rgba(0, 0, 0, 0.60);
}

/* ---------- 全屏：画面铺满整屏，顶栏变成压在画面上的悬浮层 ---------- */

.stage.is-full .main {
  flex: 1 1 auto;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
}

.stage.is-full .side {
  display: none;
}

.stage.is-full .player {
  border-radius: 0;
  box-shadow: none;
}

.stage.is-full .dock {
  display: none;
}

.stage.is-full .topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  flex: none;
  height: 140px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.36) 60%, rgba(0, 0, 0, 0) 100%);
}

.stage.is-full .topbar::after {
  display: none;
}

.stage.is-full .top-title,
.stage.is-full .clock-time,
.stage.is-full .wx b {
  color: #fff;
}





.stage.is-full .wx {
  border-left-color: rgba(255, 255, 255, 0.24);
}

.stage.is-full .wx-ico {
  color: #F0D9A0;
}

.stage.is-full .sig-bar,
.stage.is-full .sig-dot {
  background: #F0D9A0;
}

/* ---------- ③ 六个大方块 30%，缝里露红 ---------- */

/* 底部九张正方形卡：四个字上下两行，不放任何图标 */
.dock {
  flex: 0 0 21%;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 14px;
  padding: 2px 40px 18px;
  min-height: 0;
}

/* 九张卡：米白玉牌 + 一道金色细框 + 上方一枚金色符号
   符号与字都往中间收，四周留白，远看是"一块牌"不是"一个键" */
.dock-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.dock-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 100%;
  place-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background-color: var(--w-panel);
  background-image: linear-gradient(180deg, var(--card-sheen) 0%, rgba(255, 255, 255, 0) 54%);
  box-shadow: var(--w-panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: var(--w-panel-text);
  transition: transform 0.12s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

/* 内嵌金线：用伪元素画，才能压到 55% 而不发死 */
.dock-card::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px solid var(--w-gold);
  border-radius: 22px;
  opacity: 0.5;
  pointer-events: none;
}

/* 底边那道短金线压不住 192px 的牌，反而显脏，去掉，只留一圈内框 */

.dock-card:active {
  transform: scale(0.97);
}

.dc-ico {
  display: block;
  width: 62px;
  height: 62px;
  color: var(--w-gold-deep);
}

.dc-ico svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dc-a,
.dc-b {
  display: block;
  font-size: 48px;
  line-height: 1.06;
  letter-spacing: 4px;
  color: var(--w-panel-text);
}

/* 播放态 / 正在看的那个入口：整张压深红，金框点亮，字转暖金 */
.dock-card.is-playing,
.dock-tool.is-on {
  background-color: var(--w-brand-deep);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 58%);
  box-shadow: 0 10px 24px rgba(20, 0, 6, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.dock-card.is-playing::after,
.dock-tool.is-on::after {
  opacity: 1;
  border-width: 2px;
}

.dock-card.is-playing .dc-a,
.dock-card.is-playing .dc-b,
.dock-tool.is-on .dc-a,
.dock-tool.is-on .dc-b {
  color: #FBE9C7;
}

.dock-card.is-playing .dc-ico,
.dock-tool.is-on .dc-ico {
  color: var(--w-gold);
}

.dock-card[data-cat="family"] { --c: var(--cat-family); }
.dock-card[data-cat="exercise"] { --c: var(--cat-exercise); }
.dock-card[data-cat="health"] { --c: var(--cat-health); }
.dock-card[data-cat="opera"] { --c: var(--cat-opera); }
.dock-card[data-cat="news"] { --c: var(--cat-news); }
.dock-card[data-cat="safety"] { --c: var(--cat-safety); }
.dock-card[data-cat="shows"] { --c: var(--cat-shows); }

/* ---------- 应用面板：装好的看电视 / 唱歌 APP，点一下就开 ---------- */

.app-layer {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 56px 72px 64px;
  background: var(--w-bg);
}

.app-layer[hidden] {
  display: none;
}

.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.app-acts {
  display: flex;
  gap: 16px;
  flex: none;
}

.app-head h3 {
  font-size: 48px;
  letter-spacing: 3px;
  color: var(--w-on);
}

.app-close {
  height: 76px;
  padding: 0 40px;
  border-radius: 999px;
  border: 3px solid var(--w-rule);
  background: transparent;
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--w-on);
}

.app-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: 26px;
  align-content: start;
  overflow: hidden;
}

.app-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 10px 16px;
  border-radius: 24px;
  background: var(--w-panel);
  border: 3px solid transparent;
  color: var(--w-panel-text);
}

.app-item:active {
  transform: scale(0.97);
}

.app-item img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: #fff;
  object-fit: contain;
}

/* 加号那一格：虚线框，一眼知道这里能加东西 */
.app-item.is-add {
  background: transparent;
  border: 3px dashed var(--w-rule);
}

.app-plus {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  line-height: 1;
  color: var(--w-on-sub);
  background: rgba(255, 255, 255, 0.10);
}

.app-name {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 1px;
  max-width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 移除只在「整理」模式下露出来，平时不引诱老人误点 */
.app-del {
  position: absolute;
  right: 8px;
  top: 8px;
  display: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 20px;
  line-height: 1.5;
  color: #fff;
}

.app-layer.is-manage .app-del {
  display: block;
}

.app-hint {
  grid-column: 1 / -1;
  font-size: 32px;
  line-height: 1.6;
  color: var(--w-on-sub);
}

/* 非开放时段：只压一点亮度，不洗掉颜色 */
.stage.is-idle .topbar,
.stage.is-idle .main,
.stage.is-idle .dock {
  filter: brightness(0.93);
}
