/* 配置页：设备在局域网里提供的网页。结构学 ai-passport 的配置页（页头、设备状态条、卡片、分段选择、复制后的下一步提示），
   配色跟机身的橙色键走。模拟器里把它放在一个浏览器小窗里。 */
.sw {
  --bg: #f5f3ee; --card: #fff; --ink: #211f1a; --muted: #7b766a; --line: #e4e0d6; --soft: #f0ede5;
  --accent: #e28a06; --ok: #3f7a53; --warn: #a8650a; --err: #a23b2a;
  position: fixed; z-index: 40; top: 64px; right: 20px; bottom: 20px;
  width: min(660px, calc(100vw - 560px)); min-width: 440px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); color: var(--ink); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(30, 24, 10, .28), 0 0 0 1px #cbc6b8;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
}
.sw[hidden] { display: none; }
.sw.phone { width: 404px; min-width: 0; }
.sw * { box-sizing: border-box; }
.sw button, .sw input, .sw select, .sw textarea { font: inherit; color: inherit; }
/* :where 不加优先级，后面各个类的 margin / padding 才不会被它盖掉 */
:where(.sw) :is(p, h1, h2, h3, ol, ul, dl, dd) { margin: 0; padding: 0; }
@media (max-width: 1120px) { .sw { left: 12px; right: 12px; top: 12px; bottom: 12px; width: auto; min-width: 0; } .sw.phone { left: auto; width: min(404px, calc(100vw - 24px)); } }

/* 浏览器的外框 */
.sw-chrome { flex: none; height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 12px; background: #e8e5dc; border-bottom: 1px solid #d3cfc3; }
.sw-lights { display: flex; gap: 6px; }
.sw-lights i { width: 10px; height: 10px; border-radius: 50%; background: #c9c4b6; }
.sw-url { flex: 1; min-width: 0; height: 26px; padding: 0 12px; display: flex; align-items: center; background: #f7f5ef; border-radius: 7px; font-size: 12px; color: var(--muted); }
.sw-url b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-view { display: inline-flex; padding: 2px; border-radius: 7px; background: #d9d5c9; }
.sw-view button { border: 0; background: none; padding: 2px 10px; border-radius: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }
.sw-view button.is-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(30, 24, 10, .15); }
.sw-x { width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.sw-x:hover { background: #d9d5c9; }

/* 窗口里嵌的是设备上的真页面（sim/valet_setup.html） */
.sw-frame { flex: 1; width: 100%; border: 0; background: #060d0a; }

/* 小窗开着时，页面底部让出一点 */
body.sw-on .stage { padding-bottom: 40px; }
