/* 壁纸后台的样式。和 App 一个路子：纯白底、墨色字、浅灰的块，颜色只有这几种。 */

:root {
  --paper: #fff;
  --ink: #111;
  --ink2: #8a8a8f;
  --ink3: #c2c2c7;
  --line: #ededed;
  --mist: #f5f5f5;
  --red: #d92d20;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --bar: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.boot, .blank { padding: 96px 24px; text-align: center; color: var(--ink2); }
.offscreen { position: fixed; top: 0; left: -9999px; opacity: 0; }

/* ---------- 按钮、输入框 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background .15s, opacity .15s, transform .1s;
}
.btn:hover { background: #2b2b2b; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn.wide { width: 100%; height: 48px; }
.btn.small { height: 34px; padding: 0 14px; font-size: 14px; font-weight: 500; gap: 6px; }
.btn.ghost { background: var(--mist); color: var(--ink); }
.btn.ghost:hover { background: #ebebeb; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #c0271c; }
.btn.ghost.danger { background: var(--mist); color: var(--red); }
.btn.ghost.danger:hover { background: #fdecea; }

.link { font-size: 14px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink3); text-underline-offset: 3px; white-space: nowrap; }
.link:hover { text-decoration-color: var(--ink); }
.link.danger { color: var(--red); text-decoration-color: rgba(217, 45, 32, .35); }

.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ink2); transition: background .15s, color .15s; }
.icon-btn:hover { background: #e8e8e9; color: var(--ink); }

.field {
  width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: 14px;
  background: var(--mist); font-size: 16px; outline: none;
  transition: background .15s, box-shadow .15s;
}
.field::placeholder { color: var(--ink2); }
.field:focus { background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.field.small { width: 128px; height: 36px; padding: 0 12px; border-radius: 12px; font-size: 14px; }
select.field.small {
  width: auto; padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238a8a8f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
}
.field-row { display: flex; align-items: center; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }
.form-error { font-size: 13.5px; color: var(--red); text-align: left; }
.form-error:empty { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border-radius: 999px;
  background: var(--mist); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s, color .15s;
}
.chip:hover { background: #ebebeb; }
.chip.is-on { background: var(--ink); color: #fff; }
.chip .n { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .55; }
.chip .n:empty { display: none; }

/* 「锁屏 / 主屏幕 / 纯图」这种几选一 */
.seg { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.seg button { height: 32px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink2); transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button.is-on { background: var(--ink); color: #fff; }

/* 编号：小号的 No. 加数字 */
.code { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; white-space: nowrap; }
.code i { margin-right: .28em; font-size: .7em; font-style: normal; font-weight: 500; opacity: .5; }

.spinner { flex: none; width: 16px; height: 16px; border: 2px solid var(--ink3); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; inset: auto auto 28px 50%; z-index: 100; margin: 0; max-width: calc(100vw - 32px);
  padding: 12px 20px; border: 0; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 登录等整页 ---------- */

.auth { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 32px 24px 96px; text-align: center; }
.auth-mark { margin-bottom: 20px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 10px 24px -12px rgba(0, 0, 0, .25); }
.auth h1 { font-size: 26px; font-weight: 700; letter-spacing: .01em; }
.auth > p { max-width: 340px; margin: 8px 0 26px; color: var(--ink2); text-wrap: balance; }
.auth form { display: grid; gap: 12px; width: min(340px, 100%); }
.auth form .btn { margin-top: 4px; }
.auth > .link { margin-top: 20px; color: var(--ink2); }
.auth > .btn { width: min(340px, 100%); }

/* ---------- 顶栏 ---------- */

.bar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
.bar-in { display: flex; align-items: center; gap: 28px; max-width: 1240px; height: var(--bar); margin: 0 auto; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; white-space: nowrap; }
.brand img { border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.tabs { display: flex; gap: 8px; }
.who { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 14px; color: var(--ink2); white-space: nowrap; }
main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 28px; }

/* ---------- 上传 ---------- */

.upload { --tall: calc(100vh - var(--bar) - 56px); }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: max(420px, var(--tall)); padding: 40px 24px;
  border: 1.5px dashed var(--ink3); border-radius: 28px; color: var(--ink2); text-align: center;
  transition: background .15s, border-color .15s;
}
.drop:hover { background: #fafafa; border-color: var(--ink); }
.drop-icon { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 14px; border-radius: 50%; background: var(--mist); color: var(--ink); }
.drop strong { font-size: 19px; font-weight: 600; color: var(--ink); }
.drop small { margin-top: 18px; font-size: 13px; }

.veil { position: fixed; inset: 0; z-index: 40; display: none; place-items: center; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; }
.upload.is-dragging .veil { display: grid; }
.veil span { display: flex; align-items: center; gap: 10px; padding: 20px 30px; border: 1.5px dashed var(--ink); border-radius: 22px; font-size: 17px; font-weight: 600; }

.work { display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: 20px; align-items: start; }

/* 左边：样机 */
.stage {
  position: sticky; top: calc(var(--bar) + 28px);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  height: var(--tall); min-height: 600px; padding: 18px 24px 22px;
  border-radius: 28px; background: var(--mist);
}
.stage-device { display: grid; place-items: center; flex: 1; width: 100%; min-height: 0; --device: clamp(340px, calc(100vh - var(--bar) - 290px), 640px); }
.stage-info { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; max-width: 560px; min-height: 76px; text-align: center; }
.stage-info h2 { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.stage-info p { font-size: 13.5px; color: var(--ink2); overflow-wrap: anywhere; }
.stage-info h2.stage-code { display: flex; align-items: center; gap: 12px; font-size: 28px; }
.stage-notes { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink2); }
.stage-error { display: grid; justify-items: center; gap: 8px; max-width: 320px; color: var(--ink2); text-align: center; }
.stage-error strong { font-size: 16px; color: var(--ink); }

/* 右边：列表 */
.queue { position: sticky; top: calc(var(--bar) + 28px); display: flex; flex-direction: column; height: var(--tall); min-height: 600px; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; }
.queue-head { display: flex; align-items: center; gap: 14px; padding: 16px 16px 10px 20px; }
.queue-head strong { margin-right: auto; font-size: 16px; }
.rows { flex: 1; margin: 0; padding: 0 8px 8px; overflow-y: auto; list-style: none; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 8px 8px 12px; border-radius: 16px; cursor: pointer; transition: background .12s; }
.row:hover { background: #fafafa; }
.row.is-selected { background: var(--mist); }
.row-pic { display: block; width: 44px; height: 44px; border-radius: 10px; background: #e9e9eb; object-fit: cover; }
.row.is-reading .row-pic { animation: pulse 1.2s ease-in-out infinite; }
.row.is-duplicate .row-pic, .row.is-invalid .row-pic { opacity: .45; }
.row-text { min-width: 0; }
.row-text b, .row-text small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-text b { font-size: 14px; font-weight: 500; }
.row-text small { font-size: 12.5px; color: var(--ink2); }
.row.is-invalid small, .row.is-failed small { color: var(--red); }
.row-tail { display: flex; align-items: center; gap: 2px; min-height: 30px; }
.row-tail .spinner { margin-right: 7px; }
.code-chip { height: 28px; margin-right: 2px; padding: 0 11px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; transition: opacity .15s; }
.code-chip:hover { opacity: .8; }
.row.is-duplicate .code-chip { background: #e6e6e8; color: var(--ink); }
.queue-foot { display: grid; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.queue-note { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink2); }
.queue-note:empty { display: none; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- 样机 ---------- */
/*
 * 手机和笔记本都是用盒子拼出来的。屏幕里的东西一律用 cqw 做单位（屏幕宽度的百分之几），
 * 所以样机放大缩小时里面的时间、图标跟着等比例变。
 */

.device { position: relative; flex: none; container-type: inline-size; }
.device .screen { position: absolute; overflow: hidden; background: #1c1c1e; container-type: inline-size; isolation: isolate; }
.device .wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.device .wall:not([src]) { display: none; }
.device .ui { position: absolute; inset: 0; color: #fff; pointer-events: none; transition: opacity .25s, visibility 0s; }
/* 上下各压暗一点，白字在浅色壁纸上也看得清 */
.device .ui::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .24)); }
/* 没轮到的那一层淡出以后彻底藏起来，浏览器就不用再给看不见的毛玻璃算模糊了 */
:root[data-screen="lock"] .ui.home, :root[data-screen="home"] .ui.lock, :root[data-screen="none"] .ui { opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.device .ui i, .device .ui b { display: block; flex: none; font-style: normal; }

/* 手机：屏幕 1320×2868，四周留一圈边框 */
.phone {
  width: calc(var(--device, 560px) * .4756); height: var(--device, 560px);
  border-radius: 16.5% / 7.85%;
  background: linear-gradient(150deg, #3a3a3d, #0c0c0d 38%, #1b1b1d);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1.5px rgba(255, 255, 255, .16), 0 38px 60px -30px rgba(0, 0, 0, .55), 0 14px 26px -14px rgba(0, 0, 0, .28);
}
.phone::before, .phone::after { content: ""; position: absolute; z-index: -1; width: 2%; border-radius: 3px; background: #19191b; }
.phone::before { left: -1%; top: 19%; height: 6%; box-shadow: 0 calc(var(--device, 560px) * .078) 0 #19191b; }
.phone::after { right: -1%; top: 25%; height: 10%; }
.phone .screen { inset: 1.427% 3%; border-radius: 14.47% / 6.66%; }
.phone .island { position: absolute; top: 3cqw; left: 50%; width: 28.5cqw; height: 8.4cqw; margin-left: -14.25cqw; border-radius: 5cqw; background: #000; }

.phone .status { position: absolute; top: 4.9cqw; left: 10.5cqw; right: 8.2cqw; display: flex; align-items: center; justify-content: space-between; height: 5cqw; font: 600 4.3cqw/1 var(--sans); }
.status-right { display: flex; align-items: center; gap: 1.5cqw; }
.status-right svg { width: 4.6cqw; height: 4.6cqw; stroke-width: 2.6; }
.bars { display: flex; align-items: flex-end; gap: .55cqw; height: 3cqw; }
.bars i { width: .85cqw; border-radius: .3cqw; background: #fff; }
.bars i:nth-child(1) { height: 40%; }
.bars i:nth-child(2) { height: 60%; }
.bars i:nth-child(3) { height: 80%; }
.bars i:nth-child(4) { height: 100%; }
.battery { position: relative; width: 6.4cqw; height: 3.2cqw; padding: .32cqw; border: .3cqw solid rgba(255, 255, 255, .55); border-radius: 1cqw; }
.battery::before { content: ""; display: block; width: 78%; height: 100%; border-radius: .45cqw; background: #fff; }
.battery::after { content: ""; position: absolute; top: 28%; right: -.9cqw; width: .42cqw; height: 44%; border-radius: 0 .3cqw .3cqw 0; background: rgba(255, 255, 255, .55); }

.phone .lock-date { position: absolute; top: 16.2cqw; left: 0; right: 0; font: 600 5.5cqw/1 var(--sans); text-align: center; text-shadow: 0 .3cqw 2.4cqw rgba(0, 0, 0, .28); }
.phone .lock-time { position: absolute; top: 23.4cqw; left: 0; right: 0; font: 700 27cqw/1 var(--round); font-variant-numeric: tabular-nums; letter-spacing: -.01em; text-align: center; text-shadow: 0 .4cqw 3.4cqw rgba(0, 0, 0, .24); }
.phone .lock-tools { position: absolute; left: 12cqw; right: 12cqw; bottom: 12.4cqw; display: flex; justify-content: space-between; }
.phone .tool { display: grid; place-items: center; width: 13.4cqw; height: 13.4cqw; border-radius: 50%; background: rgba(38, 38, 40, .36); -webkit-backdrop-filter: blur(3cqw) saturate(1.5); backdrop-filter: blur(3cqw) saturate(1.5); }
.phone .tool svg { width: 48%; height: 48%; }
.phone .homebar { position: absolute; left: 32cqw; right: 32cqw; bottom: 2.3cqw; height: 1.35cqw; border-radius: 1cqw; background: #fff; }

.phone .apps { position: absolute; top: 19cqw; left: 7cqw; right: 7cqw; display: grid; grid-template-columns: repeat(4, 15.4cqw); justify-content: space-between; row-gap: 5.4cqw; }
.phone .app { display: grid; justify-items: center; gap: 1.8cqw; }
.phone .app i, .phone .dock i { width: 15.4cqw; height: 15.4cqw; border-radius: 23.5%; background: rgba(255, 255, 255, .27); box-shadow: inset 0 0 0 .22cqw rgba(255, 255, 255, .2); }
.phone .app i { -webkit-backdrop-filter: blur(2.6cqw) saturate(1.7); backdrop-filter: blur(2.6cqw) saturate(1.7); }
/* 隔几个换一种中灰的：深色壁纸上比背景亮，浅色壁纸上比背景暗，两头都看得见 */
.phone .app:nth-child(5n + 2) i, .phone .app:nth-child(7n + 4) i { background: rgba(120, 120, 128, .42); box-shadow: inset 0 0 0 .22cqw rgba(255, 255, 255, .12); }
.phone .app b { width: 9cqw; height: 1.5cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .8); }
.phone .app:nth-child(3n) b { width: 11.5cqw; }
.phone .app:nth-child(4n + 1) b { width: 7.4cqw; }
.phone .search { position: absolute; left: 50%; bottom: 31.5cqw; display: flex; align-items: center; gap: 1.1cqw; height: 7.4cqw; padding: 0 3.4cqw; border-radius: 4cqw; background: rgba(255, 255, 255, .26); font: 500 3.3cqw/1 var(--sans); transform: translateX(-50%); -webkit-backdrop-filter: blur(3cqw) saturate(1.6); backdrop-filter: blur(3cqw) saturate(1.6); }
.phone .search svg { width: 3.5cqw; height: 3.5cqw; stroke-width: 2.4; }
.phone .dock { position: absolute; left: 3.6cqw; right: 3.6cqw; bottom: 3.6cqw; display: flex; align-items: center; justify-content: space-between; height: 22.8cqw; padding: 0 3.7cqw; border-radius: 9.6cqw; background: rgba(255, 255, 255, .26); -webkit-backdrop-filter: blur(4cqw) saturate(1.7); backdrop-filter: blur(4cqw) saturate(1.7); }
.phone .dock i { background: rgba(255, 255, 255, .36); }
.phone .dock i:nth-child(2) { background: rgba(120, 120, 128, .45); }

.phone.is-blank { background: #dedee1; box-shadow: none; }
.phone.is-blank::before, .phone.is-blank::after { display: none; }
.phone.is-blank .screen { background: #ececee; animation: pulse 1.2s ease-in-out infinite; }
.phone.is-blank .island { background: #dedee1; }

/* 笔记本：屏幕 16:10，下面一条底座 */
.laptop { display: grid; justify-items: center; width: min(100%, 680px); filter: drop-shadow(0 28px 26px rgba(0, 0, 0, .22)); }
.laptop .lid { position: relative; width: 84.5%; aspect-ratio: 1.56; border-radius: 3.1% / 4.8%; background: #0c0c0d; box-shadow: 0 0 0 1px #2c2c2e, inset 0 0 0 1px rgba(255, 255, 255, .1); }
.laptop .screen { inset: 2.5% 1.7% 3.3%; border-radius: 1.5% / 2.4%; }
.laptop .deck { position: relative; width: 100%; height: 2.3cqw; border-radius: .5cqw .5cqw 2.6cqw 2.6cqw / .5cqw .5cqw 1.8cqw 1.8cqw; background: linear-gradient(#e7e7ea, #c2c2c7 55%, #96969c); }
.laptop .deck::before { content: ""; position: absolute; top: 0; left: 50%; width: 13cqw; height: .85cqw; margin-left: -6.5cqw; border-radius: 0 0 .9cqw .9cqw; background: #a8a8ae; }
.laptop .notch { position: absolute; top: 0; left: 50%; width: 9.4cqw; height: 1.75cqw; margin-left: -4.7cqw; border-radius: 0 0 .7cqw .7cqw; background: #0c0c0d; }

.laptop .lock-date { position: absolute; top: 8.4cqw; left: 0; right: 0; font: 600 2.1cqw/1 var(--sans); text-align: center; text-shadow: 0 .1cqw 1cqw rgba(0, 0, 0, .28); }
.laptop .lock-time { position: absolute; top: 11.6cqw; left: 0; right: 0; font: 700 10.5cqw/1 var(--round); font-variant-numeric: tabular-nums; text-align: center; text-shadow: 0 .2cqw 1.6cqw rgba(0, 0, 0, .24); }
.laptop .lock-user { position: absolute; left: 0; right: 0; bottom: 5.4cqw; display: grid; justify-items: center; gap: 1.1cqw; }
.laptop .lock-user i { width: 5.2cqw; height: 5.2cqw; border-radius: 50%; background: rgba(255, 255, 255, .32); box-shadow: inset 0 0 0 .12cqw rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(2cqw); backdrop-filter: blur(2cqw); }
.laptop .lock-user b { width: 8.6cqw; height: .95cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .82); }

.laptop .menubar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; height: 2.75cqw; padding: 0 1.5cqw; background: rgba(255, 255, 255, .2); font: 600 1.25cqw/1 var(--sans); -webkit-backdrop-filter: blur(2.4cqw) saturate(1.6); backdrop-filter: blur(2.4cqw) saturate(1.6); }
.menubar span { display: flex; align-items: center; gap: 1.35cqw; }
.menubar i { width: 2.9cqw; height: .62cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .82); }
.menubar i.dot { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; }
.menubar span:first-child i:nth-child(2) { width: 3.9cqw; background: #fff; }
.menubar span:first-child i:nth-child(4) { width: 2.2cqw; }
.menubar em { font-style: normal; }
.laptop .dock { position: absolute; left: 50%; bottom: 1.1cqw; display: flex; gap: .75cqw; padding: .7cqw; border-radius: 2cqw; background: rgba(255, 255, 255, .25); box-shadow: inset 0 0 0 .1cqw rgba(255, 255, 255, .25); transform: translateX(-50%); -webkit-backdrop-filter: blur(2.6cqw) saturate(1.7); backdrop-filter: blur(2.6cqw) saturate(1.7); }
.laptop .dock i { width: 4.5cqw; height: 4.5cqw; border-radius: 24%; background: rgba(255, 255, 255, .36); box-shadow: inset 0 0 0 .08cqw rgba(255, 255, 255, .2); }
.laptop .dock i:nth-child(3n) { background: rgba(120, 120, 128, .45); }

/* ---------- 壁纸库 ---------- */

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; }
.spacer { flex: 1; }

.masonry { display: flex; align-items: flex-start; gap: 14px; }
.masonry-col { display: grid; flex: 1; gap: 14px; min-width: 0; }
.tile { display: block; width: 100%; text-align: left; }
.tile-pic { position: relative; display: block; border-radius: 16px; overflow: hidden; }
.tile-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tile-pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); transition: background .2s; }
.tile:hover .tile-pic img { transform: scale(1.03); }
.tile:hover .tile-pic::after { background: rgba(0, 0, 0, .06); }
.tile-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; height: 30px; padding: 7px 3px 0; font-size: 14px; }
.tile-cap small { overflow: hidden; font-size: 12px; color: var(--ink2); white-space: nowrap; text-overflow: ellipsis; }

/* ---------- 对话框 ---------- */

dialog { padding: 0; border: 0; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(17, 17, 17, .4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

.box { width: min(420px, calc(100vw - 32px)); padding: 24px; border-radius: 24px; }
.box h3 { font-size: 18px; font-weight: 600; }
.box p { margin: 8px 0 16px; font-size: 14px; color: var(--ink2); }
.box-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.box .field-row { margin-top: 4px; }
/* 给人抄走的账号和初始密码 */
.secret { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--mist); font-size: 14px; }
.secret dt { color: var(--ink2); }
.secret dd { margin: 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; overflow-wrap: anywhere; user-select: all; }

.detail { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border-radius: 28px; overflow: hidden auto; }
.detail.is-wide { width: min(1120px, calc(100vw - 32px)); }
.detail[open] { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.detail-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; padding: 18px 24px 30px; background: var(--mist); }
.detail-device { display: grid; place-items: center; flex: 1; width: 100%; --device: clamp(320px, calc(100vh - 170px), 600px); }
.detail-info { display: flex; flex-direction: column; gap: 20px; padding: 30px 24px 24px; }
.detail-info h2 { font-size: 32px; line-height: 1.2; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--ink2); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-info > .btn.danger { align-self: flex-start; height: 34px; margin-top: auto; padding: 0 14px; font-size: 14px; font-weight: 500; gap: 6px; }
.detail-close { position: absolute; top: 12px; right: 12px; }

/* ---------- 账号 ---------- */

.account { display: grid; gap: 20px; max-width: 560px; }
.card { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 24px; }
.card h2 { font-size: 18px; font-weight: 600; }
.card h3 { font-size: 15px; font-weight: 600; }
.card-hint { margin-bottom: 4px; font-size: 13.5px; color: var(--ink2); }
.card .btn { justify-self: start; }
.users { display: grid; }
.user { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-main { display: flex; align-items: center; flex: 1; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.user-main small { flex-basis: 100%; font-size: 12.5px; color: var(--ink2); }
.user-actions { display: flex; gap: 14px; }
.tag { padding: 2px 9px; border-radius: 999px; background: var(--mist); font-size: 12px; color: var(--ink2); white-space: nowrap; }
.tag.warn { background: #fff3e0; color: #a85a00; }
.add-user { display: grid; gap: 12px; padding-top: 14px; }

/* ---------- 窄屏 ---------- */

@media (max-width: 960px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .stage, .queue { position: static; height: auto; min-height: 0; }
  .stage-device { --device: clamp(340px, 62vh, 560px); padding: 6px 0; }
  .rows { max-height: 420px; }
  .detail[open] { grid-template-columns: minmax(0, 1fr); }
  .detail-device { --device: clamp(300px, 58vh, 520px); }
}

@media (max-width: 640px) {
  :root { --bar: 104px; }
  .bar-in { flex-wrap: wrap; gap: 0 16px; height: var(--bar); padding: 10px 16px; }
  .tabs { order: 3; width: 100%; }
  main { padding: 20px 16px 24px; }
  .upload { --tall: calc(100vh - var(--bar) - 44px); }
  .stage { padding: 16px 12px 20px; border-radius: 24px; }
  .toolbar .spacer { flex-basis: 100%; height: 0; }
  .field.small { flex: 1; }
}
