/* ==========================================================================
   Device Showcase · iPhone Pro frame + desktop stage
   ========================================================================== */

.stage {
  min-height: 100vh;
  background:
    radial-gradient(80% 60% at 50% -10%, #fdfcfa 0%, rgba(253,252,250,0) 62%),
    radial-gradient(60% 50% at 12% 100%, #f0eee6 0%, rgba(240,238,230,0) 70%),
    linear-gradient(180deg, #f4f2ec 0%, #eeece5 100%);
  padding: 56px 32px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.stage-head {
  width: 100%; max-width: 1180px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(20,22,26,0.09);
}
.stage-brand { display: flex; align-items: center; gap: 13px; }
.stage-mark {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: linear-gradient(158deg, #232730, #12141a);
  display: grid; place-items: center; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(18,20,26,0.25), 0 8px 20px -12px rgba(18,20,26,0.6);
}
.stage-mark::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 70% at 78% 12%, rgba(216,189,138,0.55), transparent 62%);
}
.stage-mark span {
  font-family: var(--font-serif); font-size: 20px; color: #f2e7cd;
  position: relative; z-index: 1; font-weight: 600; letter-spacing: 0;
}
.stage-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: #1a1d23; }
.stage-sub { font-size: 12.5px; color: #7b8089; margin-top: 3px; letter-spacing: 0.01em; }
.stage-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stage-link {
  height: 34px; padding: 0 14px; border-radius: 8px;
  font-size: 13px; font-weight: 550; color: #4a505a;
  border: 1px solid rgba(20,22,26,0.12); background: rgba(255,255,255,0.7);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 160ms ease;
}
.stage-link:hover { background: #fff; border-color: rgba(20,22,26,0.2); }
.stage-link.primary { background: #1a1d23; color: #f5f1e6; border-color: #1a1d23; }
.stage-link.primary:hover { background: #262a32; }

/* ---------------- Device ---------------- */
.deck {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 44px; flex-wrap: wrap;
  width: 100%;
}
.device-unit { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.device {
  position: relative;
  width: 393px; height: 852px;
  flex: none;
}

/* 机身边框：深色金属 + 分层内阴影 */
.device-shell {
  position: absolute; inset: -11px;
  border-radius: 66px;
  background:
    linear-gradient(148deg, #6d727a 0%, #3a3e46 12%, #23262c 34%, #35383f 52%, #1a1c21 72%, #4a4e56 88%, #2a2d33 100%);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.14) inset,
    0 1px 1px rgba(0,0,0,0.5) inset,
    0 2px 3px rgba(10,12,16,0.35),
    0 26px 50px -24px rgba(12,14,18,0.55),
    0 60px 96px -52px rgba(12,14,18,0.6);
}
/* 金属高光边 */
.device-shell::before {
  content: ""; position: absolute; inset: 0; border-radius: 66px;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,0.42), rgba(255,255,255,0.02) 28%, rgba(255,255,255,0.02) 68%, rgba(255,255,255,0.28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* 哑光内圈 */
.device-bezel {
  position: absolute; inset: -3px;
  border-radius: 60px;
  background: #08090c;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.device-screen {
  position: absolute; inset: 0;
  border-radius: 55px;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}

/* 屏幕反光（极轻，不遮挡内容） */
.device-glare {
  position: absolute; inset: 0; z-index: 55; pointer-events: none;
  border-radius: 55px;
  background: linear-gradient(114deg,
    rgba(255,255,255,0.10) 0%,
    rgba(255,255,255,0.03) 16%,
    rgba(255,255,255,0) 34%,
    rgba(255,255,255,0) 74%,
    rgba(255,255,255,0.05) 100%);
  mix-blend-mode: screen;
}

/* 侧键 */
.device-btn {
  position: absolute; background: linear-gradient(90deg, #1e2126, #3d4149 40%, #24272d);
  border-radius: 3px;
}
.device-btn.vol-up { left: -14px; top: 172px; width: 3.5px; height: 30px; }
.device-btn.vol-dn { left: -14px; top: 214px; width: 3.5px; height: 30px; }
.device-btn.silent { left: -14px; top: 124px; width: 3.5px; height: 18px; }
.device-btn.power { right: -14px; top: 190px; width: 3.5px; height: 58px; }

/* 机牌 */
.device-label { text-align: center; }
.device-label .dn { font-size: 13.5px; font-weight: 650; color: #22262d; letter-spacing: 0.005em; }
.device-label .dd { font-size: 11.5px; color: #868c96; margin-top: 3px; letter-spacing: 0.01em; }

/* 单机展示（手机内嵌预览） */
.device-solo { display: flex; justify-content: center; padding: 40px 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .stage { padding: 30px 14px 44px; }
  .stage-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .stage-nav { justify-content: flex-start; }
  .deck { gap: 34px; }
}

/* 真机 / 小屏：隐藏模型，页面满屏 */
@media (max-width: 560px) {
  .stage { padding: 0; background: var(--paper); display: block; min-height: 0; }
  .stage-head { display: none; }
  .deck { display: block; }
  .device-unit { gap: 0; display: block; }
  .device { width: 100vw; height: 100vh; height: 100dvh; }
  .device-shell, .device-bezel, .device-glare, .device-btn, .island, .gesture, .device-label { display: none !important; }
  .device-screen { inset: 0; border-radius: 0; }
  .screen { width: 100%; height: 100%; }
  .screen-body { -webkit-overflow-scrolling: touch; }
  .st-body { height: calc(54px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
  .nav { padding-top: calc(54px + env(safe-area-inset-top, 0px)); }
  .tabbar { height: calc(84px + env(safe-area-inset-bottom, 0px)); padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px)); }
  .gesture-off { display: none; }
}

/*  Calvary: 让 body 在移动端无外边距 */
@media (max-width: 560px) {
  body { background: var(--paper); }
}
