/* iPhone 17 逻辑尺寸约 402×874；外框按常见产品站比例 */
:root {
  --iphone-w: 320px;
  --iphone-h: 692px;
  --iphone-radius: 52px;
  --iphone-bezel: 10px;
  --app-bg: #f5f5f5;
  --app-card: #ffffff;
  --app-ink: #1a1c1e;
  --app-muted: #6b7280;
  --app-accent: #ec5b13;
  --app-disabled: #bdbdbd;
}

.device-17 {
  position: relative;
  width: var(--iphone-w);
  height: var(--iphone-h);
  margin-inline: auto;
  padding: var(--iphone-bezel);
  border-radius: var(--iphone-radius);
  background: linear-gradient(160deg, #2a2a2c 0%, #0c0c0e 45%, #1a1a1c 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 28px 80px rgba(0,0,0,0.45),
    0 0 0 1px rgba(0,0,0,0.4);
}

.device-17__side {
  position: absolute;
  background: #1c1c1e;
  border-radius: 2px;
}
.device-17__side--power {
  right: -2px; top: 160px; width: 3px; height: 72px;
}
.device-17__side--vol-up {
  left: -2px; top: 140px; width: 3px; height: 36px;
}
.device-17__side--vol-down {
  left: -2px; top: 184px; width: 3px; height: 36px;
}
.device-17__side--action {
  left: -2px; top: 110px; width: 3px; height: 22px;
}

.device-17__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--iphone-radius) - var(--iphone-bezel));
  overflow: hidden;
  background: var(--app-bg);
  color: var(--app-ink);
}

/* 灵动岛 + 截图：默认顶距；报告列表加大（约 2 倍），周报封面不贴岛 */
.device-17__screen--shot {
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  padding-top: 11px;
  box-sizing: border-box;
}
.device-17[data-screen="reports"] .device-17__screen--shot {
  /* 原 36，缩短约 30% */
  padding-top: 25px;
}
.device-17__island {
  position: absolute;
  z-index: 6;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 24px;
  border-radius: 18px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 1px 2px rgba(0,0,0,0.35);
  pointer-events: none;
}
.device-17__shot {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: var(--app-bg);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.device-17__missing {
  margin: 0;
  padding: 72px 20px;
  text-align: center;
  color: var(--app-muted);
  font-size: 14px;
}

.lang-bar {
  display: none; /* 旧 pill 条已弃用，改用右上角下拉 */
}

.lang-switch {
  position: fixed;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  z-index: 200;
  font-family: inherit;
  color: #1a1c1e; /* 不继承页面浅色字，避免深色主题看不清 */
}
.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 7.5em;
  border: 1px solid rgba(26, 28, 30, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: #1a1c1e;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lang-switch__chev {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  margin-left: auto;
}
.lang-switch.is-open .lang-switch__chev {
  transform: rotate(180deg);
}
.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 11em;
  max-height: min(70vh, 420px);
  overflow: auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  color: #1a1c1e;
  border: 1px solid rgba(26, 28, 30, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lang-switch__menu[hidden] {
  display: none !important;
}
.lang-switch__menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #1a1c1e;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.82;
}
.lang-switch__menu button:hover,
.lang-switch__menu button.on {
  opacity: 1;
  background: rgba(236, 91, 19, 0.12);
  color: #ec5b13;
}

/* 给右上角语言下拉留位，避免与「获取」等 pill 重叠 */
.nav {
  padding-right: max(9.5rem, calc(14px + 8.5em + env(safe-area-inset-right, 0px))) !important;
}

.screen-tabs {
  display: none !important; /* 六屏标签已去掉，靠讲解区滚动 */
}

/* 跟随 tabs 的当前屏讲解（若页面仍挂了 data-screen-caption） */
.screen-caption {
  text-align: center;
  max-width: 28em;
  margin: 0 auto 18px;
  padding: 0 12px;
}
.screen-caption__title {
  margin: 0 0 6px;
  font-size: clamp(18px, 4.2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.screen-caption__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.72;
}
.screen-caption__body mark.hl {
  background: linear-gradient(180deg, transparent 55%, rgba(236, 91, 19, 0.22) 55%);
  color: inherit;
  font-weight: 600;
  padding: 0 2px;
  border-radius: 2px;
}

@media (max-width: 420px) {
  :root {
    --iphone-w: min(300px, 82vw);
    --iphone-h: min(650px, 78svh);
  }
}
