/* FLA · FYX Lesson All — 黑白轻奢科技风 UI */
:root {
  --ink: #0b0c0f;
  --ink2: #3a3d45;
  --mut: #8a8d96;
  --paper: #ffffff;
  --bg: #f4f4f2;
  --line: #e7e7e3;
  --soft: #efefec;
  --glass: rgba(255, 255, 255, .78);
  --grad-ink: linear-gradient(135deg, #23262d 0%, #0b0c0f 60%);
  --shadow-sm: 0 1px 2px rgba(11, 12, 15, .06), 0 4px 14px rgba(11, 12, 15, .05);
  --shadow-md: 0 2px 6px rgba(11, 12, 15, .08), 0 14px 40px rgba(11, 12, 15, .10);
  --shadow-lg: 0 24px 70px rgba(11, 12, 15, .22);
  --ease: cubic-bezier(.22, .8, .36, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { color-scheme: light; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Helvetica Neue", "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: #fff; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(11,12,15,.3); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 24px; font-weight: 800; }
hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.boot-loading { display: grid; place-items: center; height: 100vh; color: var(--mut); letter-spacing: 2px; }
input[type="range"] { accent-color: var(--ink); }
input[type="checkbox"] { accent-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border: 1px solid var(--ink); border-radius: 10px;
  background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .18s var(--ease); font-family: inherit; white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--soft); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.primary {
  background: var(--grad-ink); color: #fff; border-color: transparent;
  box-shadow: 0 1px 2px rgba(11,12,15,.3), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn.primary:hover { transform: translateY(-1.5px); box-shadow: 0 8px 22px rgba(11,12,15,.32), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.danger { border-color: var(--ink); font-weight: 700; }
.btn.danger:hover { background: var(--ink); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--mut); font-weight: 500; }
.btn.ghost:hover { background: rgba(11,12,15,.06); color: var(--ink); box-shadow: none; transform: none; }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.xs { padding: 3px 9px; font-size: 12px; gap: 3px; border-radius: 7px; }
.btn:disabled { opacity: .32; cursor: not-allowed; }
.btn:disabled:hover { transform: none; box-shadow: none; background: var(--paper); color: var(--ink); }
.btn.primary:disabled:hover { background: var(--grad-ink); color: #fff; }

/* ---------- 表单 ---------- */
label { display: block; margin: 13px 0; font-size: 11.5px; color: var(--mut); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }
label input, label select, label textarea, .inp {
  display: block; width: 100%; margin-top: 7px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
  font-family: inherit; background: var(--paper); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
label input:focus, label select:focus, label textarea:focus, .inp:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11, 12, 15, .08);
}
.switch-row { display: flex; align-items: center; justify-content: space-between; }
.switch-row input { width: auto; margin: 0; transform: scale(1.25); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 22px;
  padding: 10px 24px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand span {
  font-weight: 800; font-size: 19px; letter-spacing: 3px;
  background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 15px; color: var(--ink2); font-size: 14px; font-weight: 500; text-decoration: none; border-radius: 9px; transition: all .15s; }
.nav a:hover { background: rgba(11,12,15,.05); color: var(--ink); }
.nav a.on { background: var(--grad-ink); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(11,12,15,.22); }
.top-right { display: flex; align-items: center; gap: 10px; }
.uchip { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.avatar { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--line); }
.avatar-ph { background: var(--grad-ink); color: #fff; font-weight: 700; }
.cert {
  display: inline-flex; align-items: center; gap: 3px; background: var(--grad-ink); color: #f5e9c8;
  font-size: 11px; padding: 3px 9px; font-weight: 600; letter-spacing: .8px; border-radius: 6px;
}
.cert-big { background: var(--grad-ink); color: #f5e9c8; padding: 11px; text-align: center; font-weight: 700; letter-spacing: 1.5px; border-radius: 10px; }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 24px 70px; }
.muted { color: var(--mut); font-size: 13px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--mut); padding: 52px 10px; }
.empty svg { opacity: .25; margin-bottom: 10px; }
.warnbar { border: 1px solid var(--ink); background: var(--paper); padding: 11px 16px; margin-bottom: 16px; font-size: 14px; font-weight: 600; border-radius: 10px; box-shadow: var(--shadow-sm); }

/* ---------- 登录注册 ---------- */
.auth-bg {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: var(--bg);
  background-image: radial-gradient(rgba(11,12,15,.10) 1px, transparent 1px);
  background-size: 26px 26px;
}
.auth-card {
  width: 430px; max-width: 94vw; background: rgba(255,255,255,.9); backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: 20px; padding: 40px 38px 28px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.auth-logo { color: var(--ink); }
.auth-card h1 {
  margin: 10px 0 2px; font-size: 38px; font-weight: 800; letter-spacing: 5px;
  background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-card .sub { color: var(--mut); font-size: 12px; margin: 0 0 16px; letter-spacing: 2.5px; text-transform: uppercase; }
.auth-card label { text-align: left; }
.auth-foot { margin-top: 18px; font-size: 13px; color: var(--mut); }

/* ---------- 课件库 ---------- */
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.lib-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.storage { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 12.5px; color: var(--mut); font-variant-numeric: tabular-nums; }
.sbar { width: 180px; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: var(--grad-ink); border-radius: 99px; transition: width .3s; }
.sbar.sm { width: 100%; height: 5px; margin-bottom: 5px; }
.dropzone {
  border: 1.5px dashed #c9c9c4; border-radius: 14px; padding: 18px; text-align: center;
  color: var(--mut); font-size: 13px; margin-bottom: 20px; background: rgba(255,255,255,.6); transition: all .18s;
}
.dropzone.over { background: var(--ink); color: #fff; border-color: var(--ink); border-radius: 18px; }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 16px; }
.file-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  cursor: pointer; transition: all .2s var(--ease); display: flex; flex-direction: column; gap: 9px;
  box-shadow: var(--shadow-sm);
}
.file-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d6d6d0; }
.fc-top { display: flex; justify-content: space-between; align-items: center; }
.kbadge {
  font-size: 10.5px; font-weight: 800; padding: 4px 8px; border-radius: 7px;
  background: var(--grad-ink); color: #fff; letter-spacing: 1.2px;
}
.kbadge.board { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }
.st { font-size: 12px; font-weight: 700; }
.st.converting { color: var(--mut); }
.st.converting::before { content: '◌'; display: inline-block; animation: rot 1.2s linear infinite; margin-right: 3px; }
.st.failed { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.fc-name { font-weight: 700; font-size: 14px; line-height: 1.4; word-break: break-all; max-height: 2.8em; overflow: hidden; }
.fc-meta { color: var(--mut); font-size: 12px; font-variant-numeric: tabular-nums; }
.file-card .act { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.file-card .act button {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink2);
  padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px; transition: all .15s; border-radius: 8px;
}
.file-card .act button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.file-card .act button.danger { font-weight: 700; }
@keyframes rot { to { transform: rotate(360deg); } }
.uplist { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; width: 320px; }
.upitem { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; font-size: 13px; box-shadow: var(--shadow-md); }
.upitem .row { display: flex; justify-content: space-between; gap: 8px; }
.upitem .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.upitem .pct { color: var(--mut); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pbar { height: 5px; background: var(--line); margin-top: 7px; overflow: hidden; border-radius: 99px; }
.pbar i { display: block; height: 100%; width: 0; background: var(--grad-ink); border-radius: 99px; transition: width .2s; }
.upitem .msg { color: var(--ink); font-size: 12px; margin-top: 5px; font-weight: 700; }
.upitem .msg::before { content: '✕ '; }

/* ---------- 卡片 / 个人中心 ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-sm); }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.p-card .avatar-big { display: grid; place-items: center; margin-bottom: 8px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv span { color: var(--mut); }

/* ---------- 管理后台 ---------- */
.adm { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.adm-side {
  background: var(--grad-ink); color: #fff; padding: 20px 14px;
  display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh;
}
.adm-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: #fff; padding: 4px 10px; letter-spacing: 3px; font-size: 17px; }
.adm-nav { display: flex; flex-direction: column; gap: 3px; }
.adm-nav button {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: none; border-radius: 10px;
  background: transparent; color: rgba(255,255,255,.55); font-size: 14px; font-weight: 500;
  cursor: pointer; text-align: left; font-family: inherit; transition: all .16s;
}
.adm-nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.adm-nav button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.adm-back { margin-top: auto; padding: 11px 13px; color: rgba(255,255,255,.5); font-size: 13px; display: flex; gap: 8px; align-items: center; text-decoration: none; border-radius: 10px; transition: all .16s; }
.adm-back:hover { color: #fff; background: rgba(255,255,255,.08); }
.adm-main { padding: 28px 32px; max-width: 1200px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head .inp { width: 260px; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 5px; box-shadow: var(--shadow-sm); }
.stat-card span { color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 600; }
.stat-card b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.stat-card i { font-style: normal; color: var(--mut); font-size: 12px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.tbl th { text-align: left; padding: 11px 13px; color: var(--mut); font-weight: 600; background: var(--soft); white-space: nowrap; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.tbl td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; }
.tbl tr:hover td { background: rgba(11,12,15,.025); }
.chip { display: inline-block; font-size: 12px; padding: 2px 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink2); border-radius: 99px; font-weight: 500; }
.chip.admin { background: var(--grad-ink); color: #fff; border-color: transparent; }
.chip.ok { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.warn { background: var(--soft); color: var(--ink2); }
.row-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.inv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.inv-card h4 { border-bottom: 2px solid var(--ink); padding-bottom: 7px; }
.icode { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--soft); padding: 3px 9px; font-size: 13px; border: 1px solid var(--line); border-radius: 7px; }
.pw-show { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; background: var(--paper); border: 1px solid var(--ink); border-radius: 12px; padding: 13px; text-align: center; margin: 10px 0; user-select: all; letter-spacing: 1px; box-shadow: var(--shadow-sm); }
.confirm-p { margin: 4px 0 0; line-height: 1.6; }

/* ---------- 弹窗 / 提示 ---------- */
.ovl { position: fixed; inset: 0; background: rgba(11, 12, 15, .44); backdrop-filter: blur(6px); z-index: 200; display: grid; place-items: center; padding: 20px; animation: fadein .16s; }
.modal {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  width: 520px; max-width: 96vw; max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: pop .2s var(--ease);
}
.m-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.m-head b { font-size: 15px; font-weight: 700; letter-spacing: .3px; }
.m-x { border: none; background: transparent; font-size: 22px; cursor: pointer; color: var(--mut); line-height: 1; border-radius: 8px; transition: all .14s; }
.m-x:hover { color: var(--ink); background: var(--soft); }
.m-body { padding: 18px 20px; overflow: auto; }
.m-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96) translateY(6px); opacity: 0; } }
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--grad-ink); color: #fff; padding: 11px 20px; font-size: 14px; opacity: 0;
  transform: translateY(-8px); transition: all .28s var(--ease); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(11,12,15,.3); max-width: 86vw;
}
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: var(--shadow-md); }
.toast.err::before { content: '✕ '; font-weight: 800; }
.toast.warn { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }

/* ---------- 查看器 / 白板 ---------- */
#viewer { position: fixed; inset: 0; z-index: 100; background: #e9e9e6; display: flex; flex-direction: column; }
.v-top {
  display: flex; align-items: center; gap: 14px; padding: 9px 16px;
  background: var(--grad-ink); color: #fff; flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 18px rgba(11,12,15,.25);
}
.v-title { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .3px; }
.v-save { font-size: 12px; color: #fff; opacity: .7; flex-shrink: 0; }
.v-save.saving { opacity: 1; animation: blink 1s steps(2) infinite; }
.v-save.err { opacity: 1; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
@keyframes blink { 50% { opacity: .25; } }
.v-zoom { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255,255,255,.75); flex-shrink: 0; font-variant-numeric: tabular-nums; }
#vstage { position: relative; flex: 1; overflow: hidden; touch-action: none; cursor: crosshair; }
#bgWrap { position: absolute; background: #fff; box-shadow: 0 10px 44px rgba(11,12,15,.24); border-radius: 6px; overflow: hidden; }
/* 无限画布: 铺满舞台 + 细点阵网格 */
#bgWrap.inf {
  left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important;
  border-radius: 0; box-shadow: none;
  background-color: #fdfdfd;
  background-image: radial-gradient(rgba(11,12,15,.13) 1px, transparent 1px);
  background-size: 28px 28px;
}
#bgWrap.inf.bg-k { background-color: #101216; background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); }
#bgWrap.inf.bg-g { background-color: #173428; background-image: radial-gradient(rgba(255,255,255,.13) 1px, transparent 1px); }
#bgWrap .bgc { width: 100%; height: 100%; display: block; }
#bgWrap video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
#bgWrap.media-page { background: #000; display: grid; place-items: center; }
.audio-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 86%; }
.audio-ico { font-size: 90px; color: #fff; }
.audio-wrap audio { width: 100%; }
#bgWrap.oo-page { background: #fff; }
#ink { position: absolute; left: 0; top: 0; pointer-events: none; }
.v-toolbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 120;
  display: flex; align-items: center; gap: 3px; padding: 9px 12px;
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 6px 18px rgba(11,12,15,.12), 0 18px 50px rgba(11,12,15,.16);
  flex-wrap: wrap; justify-content: center; max-width: 96vw;
}
.vbtn {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px;
  border: none; background: transparent; color: var(--ink2); border-radius: 12px;
  cursor: pointer; transition: all .15s var(--ease); font-family: inherit; font-size: 12px;
}
.vbtn:hover { background: rgba(11,12,15,.07); color: var(--ink); transform: translateY(-1px); }
.vbtn.on { background: var(--grad-ink); color: #fff; box-shadow: 0 4px 12px rgba(11,12,15,.28); }
.vbtn:disabled { opacity: .22; cursor: not-allowed; transform: none; }
.vbtn.sm { min-width: 30px; height: 30px; border-radius: 9px; }
.v-top .vbtn { color: #fff; }
.v-top .vbtn:hover { background: rgba(255,255,255,.14); color: #fff; }
.v-top .vbtn.on { background: #fff; color: var(--ink); }
.v-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.v-page { min-width: 64px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink); user-select: none; font-family: ui-monospace, Menlo, Consolas, monospace; }
#vpop {
  position: fixed; z-index: 130; padding: 16px; border-radius: 16px;
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); width: 254px;
}
#vpop.hidden { display: none; }
.pop-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pop-lb { font-size: 11px; color: var(--mut); flex-shrink: 0; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.pop-val { font-size: 12.5px; min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.swatches { flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; transition: transform .13s; }
.swatch:hover { transform: scale(1.14); }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.swatch.custom { position: relative; overflow: hidden; background: conic-gradient(#333, #999, #333); display: inline-grid; place-items: center; }
.swatch.custom input { position: absolute; inset: -8px; opacity: 0; cursor: pointer; }
.pop-preview { display: grid; place-items: center; padding: 6px 0; }
.pop-preview svg { width: 100%; }
.eraser-demo { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; margin: 10px auto; box-shadow: inset 0 0 0 2px var(--line); }
.pop-hint { font-size: 11.5px; color: var(--mut); text-align: center; margin: 8px 0 0; line-height: 1.55; }
.seg-row { background: rgba(11,12,15,.05); border-radius: 11px; padding: 3px; gap: 3px; }
.seg-b {
  flex: 1; padding: 8px 6px; border: none; border-radius: 9px; background: transparent;
  color: var(--ink2); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s;
}
.seg-b:hover { color: var(--ink); }
.seg-b.on { background: var(--grad-ink); color: #fff; box-shadow: 0 2px 8px rgba(11,12,15,.25); }
#selbar {
  position: absolute; z-index: 125; display: flex; align-items: center; gap: 4px;
  background: var(--glass); backdrop-filter: blur(18px); border: 1px solid var(--line);
  border-radius: 13px; padding: 6px 8px; box-shadow: var(--shadow-md);
}
#selbar.hidden { display: none; }
#selbar button {
  display: inline-flex; align-items: center; gap: 4px; border: none; background: transparent;
  padding: 7px 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink2);
  font-family: inherit; border-radius: 9px; transition: all .14s;
}
#selbar button:hover { background: var(--ink); color: #fff; }
#selbar button.danger { color: var(--ink); }
#selbar button.danger:hover { background: var(--ink); color: #fff; }
#selbar .hint { font-size: 11px; color: var(--mut); padding: 0 6px 0 2px; }
.v-msgscreen { position: fixed; inset: 0; z-index: 150; background: var(--bg); display: grid; place-items: center; color: var(--ink); }
.v-msgbox { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 480px; padding: 20px; text-align: center; }
.v-msgbox .muted { color: var(--mut); }
.err-t { color: var(--ink); font-weight: 800; font-size: 17px; margin: 0; text-decoration: underline; text-underline-offset: 5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: rot 1s linear infinite; }

/* ---------- 文本输入 / 倒计时 ---------- */
.tedit {
  position: absolute; z-index: 60; border: 1.5px dashed var(--ink); border-radius: 8px;
  background: rgba(255,255,255,.94); outline: none; padding: 3px 7px; min-width: 60px;
  font-family: inherit; line-height: 1.3; box-shadow: var(--shadow-sm);
}
#fla-timer {
  position: fixed; top: 56px; right: 16px; z-index: 140;
  background: var(--glass); backdrop-filter: blur(20px); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; padding: 11px 15px;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-md);
}
#fla-timer .t { font-size: 30px; font-weight: 800; letter-spacing: 1px; font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, Consolas, monospace; }
#fla-timer.warn { background: var(--grad-ink); color: #fff; border-color: transparent; animation: timerblink 1s steps(2) infinite; }
@keyframes timerblink { 50% { opacity: .82; } }
#fla-timer .tt { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 10px; width: 34px; height: 34px; cursor: pointer; font-size: 14px; transition: all .14s; }
#fla-timer .tt:hover { background: var(--ink); color: #fff; }
#fla-timer.warn .tt { border-color: rgba(255,255,255,.4); }

/* ---------- 图形选择 / 底色 ---------- */
.shapes-row { flex-wrap: wrap; }
.shape-b {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--paper); border-radius: 11px;
  cursor: pointer; color: var(--ink2); padding: 0; transition: all .15s var(--ease);
}
.shape-b:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.shape-b.on { background: var(--grad-ink); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(11,12,15,.25); }
.pop-preview #txtprev { color: var(--ink); font-weight: 700; }
#bgWrap.blank-page.bg-k { background: #101216; }
#bgWrap.blank-page.bg-g { background: #173428; }

@media (max-width: 860px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .adm-nav { flex-direction: row; flex-wrap: wrap; }
  .adm-back { margin: 0 0 0 auto; }
  .topbar { flex-wrap: wrap; gap: 8px; }
  .nav { order: 3; width: 100%; }
}

/* ================= v1.12 放映引擎 (present) ================= */
.present-body { margin: 0; background: #000; overflow: hidden; }
#pboot { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85); font: 14px/1.6 -apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  letter-spacing: .12em; }
#pboot.perr { color: #f87171; white-space: pre-wrap; padding: 24px; text-align: center; }
#pwrap { position: fixed; inset: 0; background: #000; }
#pstage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ppage { position: relative; background: #fff; flex: none; }
.ppage .pbg { position: absolute; left: 0; top: 0; display: block; }
.ppage .pelayer { position: absolute; inset: 0; z-index: 2; }
.ppage .pink { position: absolute; left: 0; top: 0; z-index: 3; }
.pel { position: absolute; will-change: transform, opacity; }
.pel-in { position: absolute; inset: 0; will-change: transform; }
.pel-text { display: flex; flex-direction: column; width: 100%; height: 100%;
  align-items: stretch; justify-content: flex-start; }
.pel-para { margin: 0; min-height: 1em; word-wrap: break-word; overflow-wrap: break-word; }
.pel-para span { display: inline; }

#pbar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; z-index: 6;
  background: rgba(255,255,255,.12); transition: opacity .5s; }
#pbar.idle { opacity: 0; }
#pbarin { display: block; height: 100%; width: 0; background: #fff; transition: width .25s ease; }

#ptop { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; z-index: 10;
  background: rgba(12,12,14,.82); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 6px 14px; color: rgba(255,255,255,.9);
  font: 13px/1 -apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  box-shadow: 0 6px 24px rgba(0,0,0,.4); backdrop-filter: blur(6px);
  transition: opacity .5s, transform .5s; user-select: none; }
#ptop.idle { opacity: 0; transform: translateX(-50%) translateY(-8px); pointer-events: none; }
#ptop span { cursor: pointer; padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
#ptop span:hover { background: rgba(255,255,255,.12); }
#ptop span.on { background: #fff; color: #111; }
#pexit:hover { background: #ef4444 !important; color: #fff; }
#pbtn-prev, #pbtn-next { font-size: 19px; line-height: 1; padding: 2px 11px 6px; }
#ppg { min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; }
#ptime { font-variant-numeric: tabular-nums; opacity: .92; }
.pt-sep { width: 1px; height: 14px; background: rgba(255,255,255,.2); padding: 0 !important; cursor: default !important; }

#ptools { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; z-index: 10;
  background: rgba(12,12,14,.88); border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px; padding: 8px 12px; color: rgba(255,255,255,.92);
  font: 13px/1 -apple-system,"PingFang SC","Microsoft YaHei",sans-serif; user-select: none; }
#ptools.hidden { display: none; }
#ptools .ptl { width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(255,255,255,.35); padding: 0; }
#ptools .ptl.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
#ptools span.ptl, #ptools span[id^="ptl-"] { padding: 5px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
#ptools span[id^="ptl-"]:hover { background: rgba(255,255,255,.14); }
#ptools .pt-sep { width: 1px; height: 16px; background: rgba(255,255,255,.22); padding: 0; cursor: default; }

#phint { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.62); font: 12px/1 -apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  letter-spacing: .1em; z-index: 9; transition: opacity 1s; pointer-events: none; }
#phint.off { opacity: 0; }

#pblack { position: absolute; inset: 0; z-index: 50; display: none; cursor: pointer; }
#plaser { position: fixed; width: 14px; height: 14px; border-radius: 50%; z-index: 60;
  background: #ff2020; box-shadow: 0 0 10px 4px rgba(255,32,32,.75);
  pointer-events: none; display: none; opacity: .25; transition: opacity .8s; }
#plaser.hot { opacity: 1; transition: opacity .08s; }
.ppage .pelayer, .ppage .pink { pointer-events: none; }

/* ---- v1.14 元素扩展: 形状/表格 ---- */
.ppage .pel-shape { position: absolute; inset: 0; box-sizing: border-box; }
.ppage .pel-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ppage .peltbl { width: 100%; height: 100%; table-layout: fixed; border-collapse: collapse;
  box-sizing: border-box; }
.ppage .peltbl td { box-sizing: border-box; overflow: hidden; }
