/*
 * 展示台：手机外框、顶部工具栏、总览、演示。
 * 只影响电脑和 iPad 上的展示方式，不影响手机屏幕里的内容。
 */

html, body { margin: 0; height: 100%; }
body {
  background: #E8EBF0;
  color: var(--ink-900);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 手机外框 ---------- */

.device {
  position: relative; flex: none; box-sizing: content-box;
  width: var(--device-w); height: var(--device-h);
  padding: 12px; border-radius: 56px;
  background: #101B30;
  box-shadow:
    inset 0 0 0 1px #34425E,
    inset 0 0 0 4px #101B30,
    inset 0 0 0 5px #1E2A43,
    0 2px 4px rgba(16, 27, 48, .12),
    0 30px 60px -24px rgba(16, 27, 48, .45);
}

/* 手机上直接打开：全屏，不要外框 */
.device--bare { width: 100vw; height: 100vh; height: 100dvh; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.device--bare .app {
  padding-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
body.is-app { background: var(--page); overflow: hidden; }

/* 体验版：只有一部手机 */
body.is-xp { background: radial-gradient(circle at 50% 42%, #F4F6F9 0%, #E4E8EE 72%); }
body.is-xp .st-bar { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.st-stagearea.xp-area { height: 100%; }

/* ---------- 顶部工具栏 ---------- */

.st-bar {
  position: sticky; top: 0; z-index: 10;
  height: 56px; padding: 0 20px;
  display: flex; align-items: center; gap: 16px;
  background: rgba(243, 245, 248, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 rgba(21, 48, 90, .08);
}
.st-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.st-logo {
  flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--navy-800); color: #fff; font-size: 15px; font-weight: 700;
}
.st-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ver { flex: none; padding: 2px 6px; border-radius: 6px; background: rgba(21, 48, 90, .06); font-size: 12px; color: var(--ink-500); }

.st-modes { flex: none; display: flex; padding: 3px; border-radius: 10px; background: rgba(21, 48, 90, .07); }
.st-mode {
  padding: 6px 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--ink-500); text-decoration: none;
}
.st-mode.is-on { background: #fff; color: var(--ink-900); box-shadow: 0 1px 2px rgba(21, 48, 90, .12); }

.st-tools { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.st-label { font-size: 12px; color: var(--ink-400); margin-right: 2px; }
.st-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--ink-500); white-space: nowrap;
}
.st-btn .ic { width: 16px; height: 16px; }
.st-btn:hover { background: rgba(21, 48, 90, .06); color: var(--ink-900); }
.st-btn[aria-pressed="true"] { background: rgba(21, 48, 90, .09); color: var(--navy-800); }
a.st-btn { text-decoration: none; }
.st-btn--accent { color: #fff; background: var(--navy-800); }
.st-btn--accent:hover { color: #fff; background: var(--navy-700); }
.st-ver--accent { background: var(--orange-50); color: var(--orange-600); box-shadow: inset 0 0 0 1px var(--orange-200); }
.st-seg { display: flex; padding: 2px; border-radius: 8px; background: rgba(21, 48, 90, .07); }
.st-seg .st-btn { height: 26px; padding: 0 10px; border-radius: 6px; }
.st-seg .st-btn[aria-pressed="true"] { background: #fff; color: var(--ink-900); box-shadow: 0 1px 2px rgba(21, 48, 90, .12); }
.st-bar :focus-visible, .st-main :focus-visible { outline: 2px solid var(--orange-400); outline-offset: 2px; }

/* ---------- 总览：所有页面并排 ---------- */

.st-main--overview { padding: 28px 40px 96px; }
.st-group + .st-group { margin-top: 52px; }
.st-group__head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid rgba(21, 48, 90, .1);
}
.st-group__head h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--navy-900); }
.st-group__meta { font-size: 13px; color: var(--ink-400); }
.st-group__head p { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--ink-500); }
.st-row { display: flex; flex-wrap: wrap; gap: 36px 28px; }
.st-item { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; }
.st-item .device { zoom: var(--zoom, .56); pointer-events: none; }
.st-cap {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 0; border-radius: 8px;
  background: none; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink-700);
}
.st-cap__no {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-800); color: #fff; font: 600 11px/1 var(--font-num);
}
.st-cap__todo { padding: 1px 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 11px; color: var(--ink-400); }
.st-item.is-todo .st-cap__no { background: var(--ink-300); }
@media (hover: hover) {
  .st-item:hover .st-cap__name { color: var(--orange-600); }
}

/* ---------- 演示：一部可点击的手机 ---------- */

.st-main--demo { height: calc(100vh - 56px); height: calc(100dvh - 56px); }
.st-demo { display: grid; grid-template-columns: 232px minmax(0, 1fr) 300px; height: 100%; }
.st-demo.no-side { grid-template-columns: 0 minmax(0, 1fr) 300px; }
.st-demo.no-notes { grid-template-columns: 232px minmax(0, 1fr) 0; }
.st-demo.no-side.no-notes { grid-template-columns: 0 minmax(0, 1fr) 0; }
.st-demo.no-side .st-side, .st-demo.no-notes .st-notes { display: none; }

.st-side {
  grid-column: 1; grid-row: 1; overflow-y: auto; padding: 16px 10px 40px;
  background: rgba(255, 255, 255, .45); box-shadow: 1px 0 0 rgba(21, 48, 90, .08);
}
.st-side__group + .st-side__group { margin-top: 18px; }
.st-side__title { padding: 0 10px 6px; font-size: 12px; font-weight: 600; color: var(--ink-400); }
.st-nav {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px;
  border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left;
  font: inherit; font-size: 14px; color: var(--ink-700);
}
.st-nav:hover { background: rgba(21, 48, 90, .05); }
.st-nav.is-on { background: #fff; color: var(--navy-900); font-weight: 600; box-shadow: 0 1px 2px rgba(21, 48, 90, .1); }
.st-nav__no { flex: none; width: 14px; text-align: right; font: 12px/1 var(--font-num); color: var(--ink-400); }
.st-nav__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-nav.is-todo .st-nav__name { color: var(--ink-400); }
.st-nav__todo { flex: none; font-size: 11px; color: var(--ink-300); }

.st-stagearea {
  box-sizing: border-box;
  grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; padding: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.st-hint { display: none; font-size: 12px; color: var(--ink-400); }
.st-hint kbd {
  display: inline-block; min-width: 18px; margin-right: 3px; padding: 1px 4px; border-radius: 4px;
  background: #fff; box-shadow: 0 1px 0 rgba(21, 48, 90, .15); font: inherit; text-align: center;
}
@media (hover: hover) and (pointer: fine) { .st-hint { display: block; } }

.st-notes {
  grid-column: 3; grid-row: 1; overflow-y: auto; padding: 24px 22px 40px;
  background: rgba(255, 255, 255, .55); box-shadow: -1px 0 0 rgba(21, 48, 90, .08);
}
.st-notes__crumb { font-size: 12px; color: var(--ink-400); }
.st-notes h3 { margin: 6px 0 10px; font-size: 20px; line-height: 28px; color: var(--navy-900); }
.st-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.st-badge.is-done { background: var(--green-50); color: var(--green-600); }
.st-badge.is-todo { background: rgba(21, 48, 90, .07); color: var(--ink-500); }
.st-notes__text { margin-top: 16px; font-size: 14px; line-height: 1.75; color: var(--ink-700); }
.st-notes__text p { margin: 0 0 8px; }
.st-notes__text ul { margin: 0; padding-left: 18px; }
.st-notes__text li + li { margin-top: 6px; }
.st-notes__nav { display: flex; gap: 8px; margin-top: 28px; }
.st-notes__nav .st-btn { flex: 1; justify-content: center; background: #fff; color: var(--ink-900); box-shadow: inset 0 0 0 1px rgba(21, 48, 90, .12); }
.st-notes__reset { margin-top: 8px; width: 100%; justify-content: center; }

@media (max-width: 760px) {
  .st-name, .st-ver, .st-label { display: none; }
  .st-main--overview { padding: 20px 16px 80px; }
}
