:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --ink:#202237; --muted:#60647a; --light:#74798c; --line:#dedfe9; --paper:#fff; --page:#f6f6fa;
  --accent:#6447c8; --accent-dark:#5034af; --lavender:#f1ecfc; --focus:#7257d4; --danger:#ac3549;
  --radius:16px; --gutter:clamp(32px,5vw,88px); --header:68px;
  font: 400 16px/1.55 var(--font); color:var(--ink); background:var(--page); -webkit-font-smoothing:antialiased;
}
*,*::before,*::after { box-sizing:border-box; }
body,h1,h2,p,ul { margin:0; }
body { min-height:100vh; }
h1,h2 { font-weight:650; text-wrap:pretty; }
h1 { line-height:1.25; letter-spacing:-.025em; }
button,input { font:inherit; }
button,summary { -webkit-tap-highlight-color:transparent; cursor:pointer; }
button:disabled { opacity:.65; cursor:wait; }
[hidden],body:not([data-view="login"]) #login,body:not([data-view="library"]) #library,body:not([data-view="loading"]) #loading { display:none!important; }
.symbols { position:absolute; width:0; height:0; overflow:hidden; pointer-events:none; }
.glyph { flex:none; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
:where(a,button,summary,input):focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.bar { height:var(--header); background:var(--paper); border-bottom:1px solid #e7e7ef; }
.bar-inner,.library { max-width:1480px; padding-inline:var(--gutter); margin-inline:auto; }
.bar-inner { height:100%; display:flex; align-items:center; justify-content:space-between; }
.brand { display:flex; gap:12px; align-items:center; color:#515268; font-size:15px; font-weight:530; white-space:nowrap; }
.brand b { color:var(--ink); font-size:18px; font-weight:660; letter-spacing:.05em; }
.brand-divider { height:16px; width:1px; background:#cdd0dd; }
.primary,.secondary,.quiet,.danger,.icon { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent; border-radius:9px; font-size:14px; line-height:1.4; min-height:40px; padding:0 16px; font-weight:580; }
.primary { color:#fff; background:var(--accent); box-shadow:0 2px 4px #49338e24; }
.primary:hover:not(:disabled) { background:var(--accent-dark); }
.secondary { border-color:var(--line); color:var(--ink); background:var(--paper); }
.quiet,.icon { color:var(--muted); background:transparent; }
.quiet { padding-inline:11px; }.quiet .glyph { width:16px; }
.quiet:hover,.icon:hover,.secondary:hover { background:#f1eff7; }
.danger { color:#fff; background:var(--danger); }.danger:hover { background:#90283a; }

/* 登录页顶栏脱离文档流，卡片的几何中心始终取整个窗口中心。 */
body[data-view="login"] .bar { position:absolute; z-index:2; inset:0 0 auto; background:transparent; border:0; }
.login-stage { position:relative; isolation:isolate; overflow:hidden; min-height:100vh; min-height:100dvh; padding:78px 24px; display:grid; place-items:center;
  background:radial-gradient(ellipse at 4% 27%,#ece9f8 0,transparent 49%),radial-gradient(ellipse at 95% 85%,#e5eaf7 0,transparent 48%),#f6f6fa; }
.auth-decoration { position:absolute; inset:0; overflow:hidden; z-index:-1; pointer-events:none; }
.auth-decoration::before { content:""; position:absolute; inset:0; opacity:.38; background-image:radial-gradient(#b6b5d0 .8px,transparent 1px); background-size:22px 22px; mask-image:linear-gradient(115deg,#000,transparent 45%,transparent 65%,#000); }
.auth-decoration i { position:absolute; display:block; width:265px; height:180px; left:calc(50% - 630px); top:25%; border:1px solid #a99bc646; border-radius:24px; transform:rotate(-24deg) skewX(11deg); }
.auth-decoration i::before,.auth-decoration i::after { content:""; position:absolute; inset:0; border:inherit; border-radius:inherit; transform:translate(-10px,15px); }
.auth-decoration i::after { transform:translate(-20px,30px); }
.auth-decoration i+i { left:calc(50% + 345px); top:58%; width:300px; height:200px; border-color:#97a9ca48; }
.login-panel { position:relative; width:438px; max-width:100%; padding:40px 42px 42px; border:1px solid #deddea; border-radius:22px; background:var(--paper);
  box-shadow:0 20px 60px -30px #39305945,0 3px 13px #3930590b; }
.login-heading { display:grid; justify-items:center; gap:16px; margin-bottom:28px; }
.login-heading img { filter:drop-shadow(0 4px 5px #6952a926); }
.login-heading h1 { font-size:29px; }
form label { display:block; margin:19px 0 8px; font-size:14px; font-weight:560; line-height:1.5; }
form input:not([type=file]) { width:100%; min-height:45px; padding:10px 13px; border:1px solid #cdd0dd; border-radius:9px; color:var(--ink); background:var(--paper); font-size:15px; line-height:1.45; }
form input::placeholder { color:#74798a; font-weight:400; }
form input:focus-visible { outline:2px solid #b19be9; outline-offset:1px; border-color:var(--focus); }
.field-icon { position:relative; }
.field-icon .glyph { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:#777b92; pointer-events:none; }
.field-icon input:not([type=file]) { padding-left:42px; }
.field-icon:focus-within .glyph { color:var(--accent); }
.login-submit { width:100%; position:relative; margin-top:28px; min-height:45px; font-size:16px; }
.login-submit .glyph { position:absolute; right:17px; }
.loading { min-height:65vh; display:flex; align-items:center; justify-content:center; gap:12px; color:var(--muted); }
.loading span { width:12px; height:12px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px var(--lavender); }
.library { padding-block:46px 64px; }
.mast { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:28px; }
.mast h1 { font-size:clamp(32px,2.7vw,41px); }
.mast p { margin-top:8px; color:var(--muted); font-size:15px; font-variant-numeric:tabular-nums; }
.mast .primary { padding:0 18px; min-height:42px; }
.grid { list-style:none; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; padding:0; }
.card { position:relative; min-width:0; display:flex; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 3px 9px #27213b09; }
.card:hover,.card:focus-within { border-color:#b7a5e5; box-shadow:0 6px 17px #30274e12; }
.card-link { display:flex; width:100%; min-width:0; flex-direction:column; text-decoration:none; color:inherit; border-radius:var(--radius); }
.cover { position:relative; overflow:hidden; display:flex; align-items:center; height:70px; flex:none; border-radius:10px; margin:10px 10px 0; background:linear-gradient(105deg,var(--wash),var(--pale)); color:var(--tint); }
.cover::after { content:""; position:absolute; inset:0 0 0 34%; opacity:.23; background:radial-gradient(currentColor .8px,transparent 1px) 0 0 / 9px 9px; mask-image:linear-gradient(110deg,transparent,#000 83%); }
.cover svg { width:92px; height:61px; margin-left:10px; stroke-width:1.4; stroke-linejoin:round; stroke-linecap:round; }
.tone-0 { --tint:#7960bf; --wash:#e9e2fa; --pale:#f4f0fc; }.tone-1 { --tint:#477e79; --wash:#daeee9; --pale:#eef6f1; }
.tone-2 { --tint:#5b79aa; --wash:#dfe8f7; --pale:#eef3fa; }.tone-3 { --tint:#9b7451; --wash:#f3e5d9; --pale:#faf2e9; }
.card h2 { padding:17px 20px 16px; font-size:18px; line-height:1.5; font-weight:610; letter-spacing:-.01em; overflow-wrap:anywhere; }
.open { margin:auto 20px 17px; display:flex; align-items:center; gap:6px; width:fit-content; color:var(--accent); font-size:14px; font-weight:590; }
.open .glyph { width:15px; height:15px; }
.card-menu { position:absolute; top:17px; right:17px; }
.card-menu>summary { display:grid; place-items:center; width:30px; height:28px; list-style:none; border:1px solid #ffffffc9; border-radius:7px; color:#4c5063; background:#ffffffe6; }
.card-menu>summary::-webkit-details-marker { display:none; }
.card-menu>summary::before { content:""; width:3px; height:3px; border-radius:50%; background:currentColor; box-shadow:-5px 0 currentColor,5px 0 currentColor; }
.card-menu[open] { z-index:2; }.card-menu>summary:hover,.card-menu[open]>summary { color:var(--accent); background:white; }
.menu-items { position:absolute; right:0; top:33px; min-width:116px; padding:5px; background:white; border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px #201b331c; }
.menu-items button { width:100%; padding:8px 10px; text-align:left; border:0; border-radius:6px; background:transparent; color:var(--ink); font-size:14px; }
.menu-items button:hover { background:var(--lavender); }.menu-items .remove { color:var(--danger); }
.empty { padding:64px 24px; display:grid; justify-items:center; text-align:center; border:1px dashed #cfcbdc; background:#fbfaff; border-radius:var(--radius); }
.empty-mark { display:grid; place-items:center; width:50px; height:50px; border-radius:15px; color:var(--accent); background:var(--lavender); }
.empty h2 { margin-top:14px; font-size:20px; }.empty p,.hint { margin-top:7px; font-size:14px; color:var(--muted); }
dialog { width:460px; max-height:calc(100vh - 48px); margin:auto; padding:28px; border:1px solid var(--line); border-radius:18px; box-shadow:0 20px 60px #18122930; color:var(--ink); background:white; }
dialog::backdrop { background:#24203966; }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.dialog-heading h2 { font-size:23px; letter-spacing:-.02em; }.icon { min-height:32px; width:32px; padding:0; }
.actions { display:flex; justify-content:flex-end; gap:9px; margin-top:24px; }
.file-field { display:flex; align-items:center; gap:11px; padding:13px 14px; background:#f8f7fc; border:1px dashed #b9b1ce; border-radius:9px; }
.file-field .glyph { color:var(--accent); }.file-field input { width:100%; min-width:0; color:var(--muted); font-size:14px; }
input::file-selector-button { margin-right:10px; border:1px solid #cfcbde; color:#4a4164; background:#fff; border-radius:6px; padding:5px 9px; cursor:pointer; font:inherit; }
.error,#notice,#jobs,#transfer { font-size:14px; overflow-wrap:anywhere; }
.error { color:var(--danger); margin-top:14px; }.hint { line-height:1.6; }
#notice,#jobs { padding:12px 15px; margin-bottom:16px; border-radius:9px; background:#f0ecfa; color:#594485; }
#notice[data-kind="error"] { background:#faeef0; color:var(--danger); }
#jobs { background:white; border:1px solid var(--line); }
.job { display:flex; align-items:center; gap:12px; justify-content:space-between; padding:2px 0; }
.job strong { color:var(--ink); font-weight:550; }.job span,#transfer { color:var(--muted); font-variant-numeric:tabular-nums; }
#transfer { margin-top:12px; }progress { width:100%; height:5px; display:block; margin-top:6px; accent-color:var(--accent); }
