:root {
  --bg-a: #f3eaed;
  --bg-b: #dff7ff;
  --paper: rgba(255, 255, 255, .66);
  --paper-strong: rgba(255, 255, 255, .92);
  --glass: rgba(255, 255, 255, .56);
  --glass-hover: rgba(255, 255, 255, .74);
  --text: #4d5968;
  --title: #303946;
  --muted: #8a99aa;
  --blue: #58a9ff;
  --blue-2: #2d8cf0;
  --cyan: #84e1dd;
  --green: #60d1ad;
  --border: rgba(64, 158, 255, .76);
  --soft-border: rgba(64, 158, 255, .18);
  --danger: #ff6575;
  --warning: #f6a94b;
  --shadow: 0 16px 42px rgba(62, 88, 116, .14), 0 3px 10px rgba(62, 88, 116, .08);
  --shadow-hover: 0 24px 62px rgba(64, 158, 255, .18), 0 8px 22px rgba(62, 88, 116, .10);
  --radius: 22px;
}

[data-theme="dark"] {
  --bg-a: #161923;
  --bg-b: #102d3b;
  --paper: rgba(22, 29, 43, .68);
  --paper-strong: rgba(22, 29, 43, .94);
  --glass: rgba(22, 29, 43, .58);
  --glass-hover: rgba(32, 41, 58, .76);
  --text: #dbe7f2;
  --title: #f1f7fb;
  --muted: #91a2b6;
  --blue: #6ab8ff;
  --blue-2: #409eff;
  --cyan: #66dfdd;
  --green: #70ddb8;
  --border: rgba(105, 183, 255, .84);
  --soft-border: rgba(105, 183, 255, .20);
  --danger: #ff8290;
  --warning: #ffc06d;
  --shadow: 0 20px 56px rgba(0, 0, 0, .34), 0 3px 10px rgba(0, 0, 0, .28);
  --shadow-hover: 0 26px 68px rgba(0, 0, 0, .42), 0 8px 22px rgba(64, 158, 255, .10);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: ui-rounded, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .74), transparent 28%),
    linear-gradient(110deg, var(--bg-a), var(--bg-b));
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: not-allowed; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -2; }
.ambient span { position: absolute; width: 34vw; height: 34vw; min-width: 320px; min-height: 320px; border-radius: 999px; filter: blur(42px); opacity: .28; transform: translateZ(0); animation: drift 18s ease-in-out infinite alternate; }
.ambient span:nth-child(1) { left: -12vw; top: 12vh; background: #ffd6dc; }
.ambient span:nth-child(2) { right: -10vw; top: 4vh; background: #b9ecff; animation-delay: -4s; }
.ambient span:nth-child(3) { right: 16vw; bottom: -14vh; background: #c2fff0; animation-delay: -9s; }
@keyframes drift { to { transform: translate3d(42px, -24px, 0) scale(1.08); } }

.corner-orbits { position: fixed; left: 18px; top: 18px; width: 58px; height: 58px; z-index: 10; opacity: .96; pointer-events: none; }
.corner-orbits span { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #ffd89b, #f59e78); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.corner-orbits span:nth-child(1) { left: 0; top: 12px; }
.corner-orbits span:nth-child(2) { right: 6px; top: 0; background: linear-gradient(135deg, #8ee6d8, #5aa7ff); }
.corner-orbits span:nth-child(3) { left: 24px; bottom: 0; background: linear-gradient(135deg, #f5d19a, #a87e4d); }

.topbar {
  position: fixed;
  top: 22px;
  right: 22px;
  display: flex;
  gap: 10px;
  z-index: 20;
}
.tool, .status-actions button, .page-actions button, .system-top-actions button {
  min-width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 14px;
  background: var(--paper-strong);
  color: var(--blue-2);
  box-shadow: 0 8px 18px rgba(62,88,116,.14);
  display: grid;
  place-items: center;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.tool:hover, .status-actions button:hover, .page-actions button:hover, .system-top-actions button:hover { transform: translateY(-2px); background: var(--glass-hover); box-shadow: var(--shadow-hover); }
.text-tool { padding: 0 16px; color: var(--muted); font-weight: 850; }

.stage {
  width: min(1100px, calc(100vw - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(120px, 16vh, 174px) 0 96px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.hero { text-align: center; margin-bottom: clamp(34px, 5vh, 56px); }
.brand { margin: 0; font-size: clamp(32px, 4.2vw, 48px); line-height: 1.1; letter-spacing: .02em; color: var(--title); font-weight: 950; }
.brand span { background: linear-gradient(90deg, var(--cyan), var(--blue)); -webkit-background-clip: text; color: transparent; }
.subtitle { margin: 14px 0 0; color: var(--muted); font-weight: 800; opacity: .86; }

.drop-zone {
  position: relative;
  height: clamp(260px, 35vh, 380px);
  border: 3px dashed var(--border);
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(255,255,255,.36), rgba(255,255,255,.14));
  display: grid;
  place-items: center;
  text-align: center;
  isolation: isolate;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
  outline: none;
  overflow: hidden;
}
.drop-zone::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(255,255,255,.28), rgba(255,255,255,.06));
  z-index: -1;
}
.drop-zone:hover, .drop-zone.dragging, .drop-zone:focus-visible { transform: translateY(-3px); border-color: var(--blue-2); box-shadow: var(--shadow-hover); }
.drop-zone input { display: none; }
.camera { font-size: 58px; color: var(--blue); filter: drop-shadow(0 10px 22px rgba(64,158,255,.22)); }
.drop-zone p { margin: -22px 0 0; font-size: 15px; color: var(--blue); font-weight: 850; }
.drop-zone small { display: block; margin-top: -44px; color: var(--muted); font-weight: 800; opacity: .86; }
.drop-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.44); color: var(--muted); font-size: 12px; font-weight: 850; opacity: .86; white-space: nowrap; }
[data-theme="dark"] .drop-hint { background: rgba(20,27,40,.42); }

.status-card, .queue-panel {
  margin-top: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.status-card { min-height: 70px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-text { font-weight: 900; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-actions { display: flex; gap: 9px; flex-shrink: 0; }
.status-actions button { width: 40px; height: 38px; min-width: 40px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--blue-2), #55b7ff); box-shadow: 0 8px 18px rgba(64,158,255,.22); }

.queue-panel { padding: 22px; max-height: min(46vh, 500px); overflow: auto; scrollbar-width: thin; }
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.queue-head h2 { margin: 0; color: var(--title); font-size: 30px; }
.queue-head p { margin: 4px 0 0; color: var(--muted); font-weight: 850; }
.queue-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.icon-pill { width: 44px; height: 40px; border-radius: 999px; border: 0; color: #fff; background: linear-gradient(135deg, var(--blue-2), #55b7ff); box-shadow: 0 8px 18px rgba(64,158,255,.20); display: grid; place-items: center; transition: transform .16s ease, box-shadow .16s ease; }
.icon-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.format-picker { position: relative; z-index: 5; }
#copyFormatBtn {
  height: 44px;
  min-width: 190px;
  border: 1px solid var(--soft-border);
  border-radius: 999px;
  padding: 0 14px 0 18px;
  background: rgba(255,255,255,.56);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
#copyFormatBtn b { color: var(--title); font-size: 18px; }
#copyFormatBtn i { margin-left: auto; font-size: 12px; transition: transform .18s ease; }
.format-picker.open #copyFormatBtn i { transform: rotate(180deg); }
.format-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 190px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.62);
  background: var(--paper-strong);
  box-shadow: 0 18px 42px rgba(36,67,94,.18);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.format-picker.open .format-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.format-menu button { height: 38px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; padding: 0 12px; font-weight: 850; }
.format-menu button:hover, .format-menu button.active { color: var(--blue-2); background: rgba(64,158,255,.10); }

.queue-list { display: grid; gap: 12px; }
.queue-list.empty, .gallery.empty, .timeline.empty { min-height: 96px; display: grid; place-items: center; color: var(--muted); font-weight: 900; text-align: center; border: 1px dashed var(--soft-border); border-radius: 18px; background: linear-gradient(135deg, rgba(64,158,255,.05), transparent); padding: 20px; }
.queue-item { content-visibility: auto; contain-intrinsic-size: 150px; display: grid; grid-template-columns: 150px minmax(0,1fr) 42px; gap: 18px; align-items: center; min-height: 150px; padding: 14px; border-radius: 18px; border: 1px solid rgba(64,158,255,.25); background: linear-gradient(100deg, rgba(255,255,255,.82), rgba(255,255,255,.40)); box-shadow: 0 6px 18px rgba(62,88,116,.05); transition: transform .16s ease, box-shadow .16s ease; }
.queue-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
[data-theme="dark"] .queue-item { background: linear-gradient(100deg, rgba(30,39,55,.80), rgba(20,27,40,.42)); }
.queue-thumb { width: 150px; height: 118px; border-radius: 14px; overflow: hidden; background: rgba(64,158,255,.08); display: grid; place-items: center; color: var(--blue); box-shadow: 0 10px 20px rgba(64,158,255,.14); }
.queue-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.queue-main { min-width: 0; }
.queue-line { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.queue-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; color: var(--title); font-size: 17px; font-weight: 950; }
.queue-badge { border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 950; color: white; background: var(--muted); }
.queue-badge.uploading { background: var(--blue); }
.queue-badge.success { background: var(--green); }
.queue-badge.error { background: var(--danger); }
.queue-detail { margin-top: 8px; color: var(--muted); font-size: 13px; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.progress { height: 5px; max-width: 560px; margin: 10px auto 0; border-radius: 999px; overflow: hidden; background: rgba(64,158,255,.13); }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .16s linear; }
.queue-item.is-success .progress, .queue-item.is-success .queue-detail { display: none; }
.result-table { width: min(640px, 100%); margin: 10px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-table[hidden] { display: none; }
.result-table button { min-width: 0; height: 34px; display: grid; grid-template-columns: 86px minmax(0,1fr); align-items: center; padding: 0; border: 1px solid rgba(64,158,255,.18); border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.46); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
.result-table span { height: 100%; display: grid; place-items: center; color: var(--muted); background: rgba(64,158,255,.08); font-weight: 900; }
.result-table b { min-width: 0; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; text-align: left; }
.result-table button:hover { border-color: var(--border); background: rgba(64,158,255,.08); }
.round-actions { display: flex; flex-direction: column; gap: 10px; justify-self: end; }
.round-actions button { width: 34px; height: 34px; min-width: 34px; border-radius: 999px; border: 0; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(64,158,255,.22); transition: transform .16s ease; }
.round-actions button:hover { transform: translateY(-2px) scale(1.04); }
.round-actions button:first-child { background: var(--blue-2); }
.round-actions button:last-child { background: var(--danger); }
.queue-item:not(.is-success) .round-actions { opacity: .35; pointer-events: none; }

.fab-dock { position: fixed; right: clamp(18px, 3vw, 34px); bottom: clamp(18px, 3vw, 34px); z-index: 40; width: 190px; height: 190px; pointer-events: none; }
.fab-menu, .fab-toggle { position: absolute; right: 0; bottom: 0; }
.fab-toggle, .fab-menu button { width: 54px; height: 54px; border: 0; border-radius: 999px; background: var(--paper-strong); color: var(--blue-2); box-shadow: 0 14px 30px rgba(62,88,116,.18); display: grid; place-items: center; transition: transform .2s cubic-bezier(.2,.7,.2,1), opacity .16s ease, background .16s ease; }
.fab-toggle { pointer-events: auto; z-index: 2; }
.fab-dock.open .fab-toggle { transform: rotate(45deg); background: rgba(64,158,255,.12); }
.fab-menu { inset: 0; pointer-events: none; }
.fab-menu button { position: absolute; right: 0; bottom: 0; opacity: 0; pointer-events: none; }
.fab-dock.open .fab-menu button { opacity: 1; pointer-events: auto; }
.fab-dock.open .fab-menu button:nth-child(1) { transform: translate(-86px, -4px); }
.fab-dock.open .fab-menu button:nth-child(2) { transform: translate(-122px, -72px); }
.fab-dock.open .fab-menu button:nth-child(3) { transform: translate(-74px, -132px); }
.fab-dock.open .fab-menu button:nth-child(4) { transform: translate(0, -150px); }
.fab-menu button:hover { background: var(--glass-hover); transform: translateY(-2px) scale(1.05); }
.fab-dock.open .fab-menu button:nth-child(1):hover { transform: translate(-86px, -8px) scale(1.04); }
.fab-dock.open .fab-menu button:nth-child(2):hover { transform: translate(-122px, -76px) scale(1.04); }
.fab-dock.open .fab-menu button:nth-child(3):hover { transform: translate(-74px, -136px) scale(1.04); }
.fab-dock.open .fab-menu button:nth-child(4):hover { transform: translate(0, -154px) scale(1.04); }

.modal { border: 0; background: transparent; color: var(--text); padding: 16px; max-width: 100vw; }
.modal::backdrop { background: rgba(15,23,42,.38); backdrop-filter: blur(9px); }
.modal-card { position: relative; background: var(--paper-strong); border: 1px solid rgba(255,255,255,.55); border-radius: 28px; box-shadow: 0 28px 76px rgba(15,23,42,.26); padding: 30px; backdrop-filter: blur(22px); }
.small-modal .modal-card { width: min(440px, calc(100vw - 24px)); }
.close { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(64,158,255,.10); color: var(--blue); display: grid; place-items: center; }
.modal-card label, .field-label { display: block; margin: 16px 0 8px; color: var(--muted); font-weight: 900; }
.modal-card input, .modal-card textarea, .field-label input, .soft-select { width: 100%; border: 1px solid var(--soft-border); background: rgba(255,255,255,.70); border-radius: 14px; padding: 12px 14px; outline: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); color: var(--text); }
[data-theme="dark"] .modal-card input, [data-theme="dark"] .modal-card textarea, [data-theme="dark"] .field-label input, [data-theme="dark"] .soft-select { background: rgba(10,15,24,.52); }
.modal-card input:focus, .modal-card textarea:focus, .field-label input:focus, .soft-select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(64,158,255,.10); }
.primary, .purple-btn, .green-btn, .orange-btn, .danger-soft { min-height: 42px; border: 0; border-radius: 14px; padding: 0 20px; color: #fff; font-weight: 950; background: linear-gradient(135deg, var(--blue), var(--green)); box-shadow: 0 12px 26px rgba(64,158,255,.22); }
.primary.narrow { display: block; min-width: 136px; margin: 22px auto 0; }
.small-primary { min-height: 38px; padding: 0 16px; }
.ghost { border: 1px solid var(--soft-border); background: rgba(255,255,255,.50); color: var(--blue-2); border-radius: 13px; padding: 9px 14px; font-weight: 900; }
.danger, .danger-soft { color: #fff; background: linear-gradient(135deg, #ff7b8b, #ff5367); }
.purple-btn { background: linear-gradient(135deg, #b895e9, #9e78df); }
.green-btn { background: linear-gradient(135deg, #58c977, #45b36c); }
.orange-btn { background: linear-gradient(135deg, #ffb145, #ff9618); }
.muted { color: var(--muted); font-weight: 800; }
.mini-help { margin-top: 8px; font-size: 13px; }

.full-modal { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; padding: 0; margin: 0; }
.sheet-page { position: fixed; inset: 18px; border-radius: 22px; background: linear-gradient(108deg, rgba(255,255,255,.86), rgba(238,250,255,.80)); box-shadow: 0 28px 80px rgba(15,23,42,.24); overflow: hidden; backdrop-filter: blur(22px); }
[data-theme="dark"] .sheet-page { background: linear-gradient(108deg, rgba(18,25,37,.96), rgba(14,44,58,.88)); }
.page-topbar, .system-topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(255,255,255,.54); box-shadow: 0 10px 26px rgba(62,88,116,.10); }
.page-topbar h2, .system-topbar div { margin: 0; color: var(--title); font-size: 26px; font-weight: 950; }
.page-topbar span { margin-left: 12px; color: var(--muted); font-weight: 850; }
.page-actions, .system-top-actions { display: flex; align-items: center; gap: 10px; }
.page-actions button, .system-top-actions button { width: 42px; min-width: 42px; height: 42px; border-radius: 999px; border: 0; box-shadow: none; }
.danger-round { color: white !important; background: var(--danger) !important; }

.system-page { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 72px 1fr; }
.system-topbar { grid-column: 1 / -1; }
.system-side { grid-row: 2; padding: 34px 18px; border-right: 1px dashed rgba(90,120,150,.20); display: flex; flex-direction: column; gap: 10px; }
.system-side button { height: 48px; border: 0; border-radius: 14px; background: transparent; color: var(--text); display: flex; align-items: center; gap: 10px; padding: 0 16px; font-weight: 900; text-align: left; transition: background .16s ease, color .16s ease, transform .16s ease; }
.system-side button:hover, .system-side button.active { color: var(--blue-2); background: rgba(64,158,255,.10); transform: translateX(3px); }
.system-main { grid-row: 2; padding: 34px; overflow: auto; scrollbar-width: thin; }
.system-tab { display: none; animation: fadeUp .18s ease both; }
.system-tab.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.section-title { text-align: center; margin: 8px auto 28px; }
.section-title h2 { margin: 0 0 8px; color: var(--title); font-size: 28px; }
.section-title p { margin: 0; color: var(--muted); font-weight: 850; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.stat-card, .chart-card, .maintenance-card, .latest-grid article, .security-card, .settings-form, .action-grid button {
  background: var(--paper-strong);
  border: 1px solid rgba(255,255,255,.56);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(62,88,116,.08);
}
.stat-card { min-height: 118px; padding: 22px; display: flex; align-items: center; gap: 18px; }
.stat-card i { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, #b997e8, #d4b5ef); font-size: 22px; }
.stat-card span, .stat-card small { color: var(--muted); font-weight: 800; }
.stat-card strong { display: block; color: var(--title); font-size: 28px; margin: 4px 0; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.chart-card, .maintenance-card { padding: 22px; min-height: 150px; }
.chart-card h3, .maintenance-card h3, .latest-grid h3 { margin: 0 0 18px; color: var(--title); }
.bar-row { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 12px; font-weight: 850; }
.bar-row b { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #bd9ce9, #e0bdf1); width: 0; transition: width .3s ease; }
.bar-row.green b { background: linear-gradient(90deg, #56bf66, #6fd486); }
.maintenance-card { margin-top: 18px; min-height: 120px; }
.maintenance-card div { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.latest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.latest-grid article { padding: 22px; }
.latest-grid p { margin: 0; color: var(--muted); font-weight: 850; overflow-wrap: anywhere; }

.manager-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.manager-head h2 { margin: 0; color: var(--title); font-size: 28px; }
.manager-head p { margin: 6px 0 0; }
.admin-strip { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.searchbox { flex: 1; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--soft-border); border-radius: 16px; background: rgba(255,255,255,.56); color: var(--muted); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); font-weight: 850; }
.soft-select { width: 170px; height: 46px; padding: 0 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.image-card { content-visibility: auto; contain-intrinsic-size: 280px; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,255,255,.55)); border: 1px solid rgba(64,158,255,.12); box-shadow: 0 6px 20px rgba(62,88,116,.07); transition: transform .16s ease, box-shadow .16s ease; }
.image-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.thumb-link { display: block; aspect-ratio: 16 / 10; background: rgba(64,158,255,.08); }
.thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-info { padding: 12px; }
.image-name { color: var(--title); font-weight: 950; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.image-sub { margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 800; }
.copy-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.copy-grid button { min-height: 34px; border: 0; border-radius: 11px; color: var(--blue-2); background: rgba(64,158,255,.08); font-size: 12px; font-weight: 950; }
.copy-grid .delete { color: var(--danger); background: rgba(255,101,117,.10); }

.settings-form { max-width: 820px; margin: 0 auto; padding: 28px; }
.form-block { margin: 20px 0; }
.form-block h3 { margin: 0 0 12px; color: var(--title); text-align: center; }
.single-channel { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(64,158,255,.08); color: var(--text); }
.single-channel i { color: var(--blue-2); }
.single-channel span { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 850; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.choice-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 360px; margin: 0 auto; }
.choice-grid label { margin: 0; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid span { min-height: 44px; border-radius: 14px; border: 1px solid var(--soft-border); background: rgba(255,255,255,.55); display: grid; place-items: center; color: var(--muted); font-weight: 900; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.choice-grid input:checked + span { color: var(--blue-2); border-color: var(--border); background: rgba(64,158,255,.12); box-shadow: 0 8px 18px rgba(64,158,255,.10); }
.choice-grid span:hover { transform: translateY(-1px); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.security-card { max-width: 720px; margin: 0 auto 18px; padding: 24px; display: flex; gap: 18px; align-items: center; }
.security-card i { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(64,158,255,.12); color: var(--blue-2); font-size: 24px; }
.security-card strong { display: block; color: var(--title); font-size: 20px; }
.security-card span { color: var(--muted); font-weight: 850; }
.notice-list { max-width: 720px; margin: 0 auto 18px; display: grid; gap: 10px; }
.notice-list p { margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.44); color: var(--text); font-weight: 850; }
.notice-list i { color: var(--blue-2); margin-right: 8px; }
#securityLogoutBtn { display: block; margin: 24px auto 0; }
.action-grid { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.action-grid button { min-height: 78px; display: flex; align-items: center; justify-content: center; gap: 10px; }

.history-page { overflow: auto; }
.timeline { padding: 28px 42px 60px; }
.timeline-day { position: relative; padding-left: 34px; margin-bottom: 30px; }
.timeline-day::before { content: ""; position: absolute; left: 9px; top: 16px; bottom: -36px; width: 1px; background: rgba(64,158,255,.30); }
.timeline-day h3 { position: relative; margin: 0 0 14px; color: var(--title); }
.timeline-day h3::before { content: ""; position: absolute; left: -31px; top: 6px; width: 12px; height: 12px; border: 3px solid var(--blue-2); background: var(--paper-strong); border-radius: 50%; }
.timeline-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.timeline-card { border-radius: 14px; overflow: hidden; background: var(--paper-strong); border: 1px solid rgba(64,158,255,.12); box-shadow: 0 8px 18px rgba(62,88,116,.10); cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.timeline-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.timeline-card a { display: block; aspect-ratio: 16/10; }
.timeline-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.timeline-card strong, .timeline-card small { display: block; text-align: center; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-card strong { margin-top: 10px; color: var(--title); }
.timeline-card small { margin: 5px 0 12px; color: var(--muted); }
.history-grid { padding: 28px 42px 60px; }

.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; background: var(--paper-strong); color: var(--text); border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 13px 20px; box-shadow: 0 20px 44px rgba(15,23,42,.18); z-index: 90; font-weight: 950; transition: opacity .2s ease, transform .2s ease; max-width: min(760px, calc(100vw - 28px)); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 860px) {
  .topbar { top: 12px; right: 12px; gap: 8px; }
  .tool { width: 40px; min-width: 40px; height: 40px; border-radius: 13px; }
  .text-tool { padding: 0 10px; width: auto; font-size: 12px; }
  .corner-orbits { transform: scale(.82); transform-origin: top left; }
  .stage { width: min(100vw - 24px, 1100px); padding-top: 92px; padding-bottom: 90px; }
  .subtitle { font-size: 13px; }
  .drop-zone { height: 310px; border-width: 2px; }
  .drop-hint { display: none; }
  .status-card { align-items: stretch; flex-direction: column; }
  .status-text { white-space: normal; }
  .status-actions { justify-content: flex-end; }
  .queue-panel { padding: 16px; max-height: none; }
  .queue-head { align-items: stretch; flex-direction: column; }
  .queue-tools { justify-content: flex-start; }
  #copyFormatBtn { min-width: 176px; }
  .queue-item { grid-template-columns: 92px minmax(0,1fr); gap: 12px; min-height: 124px; }
  .queue-thumb { width: 92px; height: 86px; }
  .queue-line { justify-content: flex-start; }
  .queue-name, .queue-detail { text-align: left; }
  .result-table { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .round-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .fab-dock { width: 164px; height: 164px; right: 18px; bottom: 18px; }
  .fab-toggle, .fab-menu button { width: 50px; height: 50px; }
  .fab-dock.open .fab-menu button:nth-child(1) { transform: translate(-74px, -4px); }
  .fab-dock.open .fab-menu button:nth-child(2) { transform: translate(-104px, -62px); }
  .fab-dock.open .fab-menu button:nth-child(3) { transform: translate(-62px, -114px); }
  .fab-dock.open .fab-menu button:nth-child(4) { transform: translate(0, -130px); }
  .sheet-page { inset: 0; border-radius: 0; }
  .system-page { grid-template-columns: 1fr; grid-template-rows: 64px auto 1fr; }
  .system-topbar { height: 64px; padding: 0 14px; }
  .system-topbar div { font-size: 20px; }
  .system-side { grid-row: 2; border-right: 0; border-bottom: 1px dashed rgba(90,120,150,.20); padding: 10px 12px; flex-direction: row; overflow-x: auto; }
  .system-side button { flex: 0 0 auto; height: 42px; padding: 0 12px; }
  .system-side button:hover, .system-side button.active { transform: none; }
  .system-main { grid-row: 3; padding: 18px 14px 72px; }
  .page-topbar { height: 64px; padding: 0 14px; }
  .page-topbar h2 { font-size: 22px; }
  .stat-grid, .chart-grid, .latest-grid, .two-col, .action-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 98px; }
  .settings-form { padding: 18px; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .single-channel { align-items: flex-start; flex-direction: column; }
  .single-channel span { margin-left: 0; }
  .manager-head, .admin-strip { flex-direction: column; align-items: stretch; }
  .soft-select { width: 100%; }
  .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .copy-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline, .history-grid { padding: 18px 14px 72px; }
  .timeline-day { padding-left: 24px; }
  .timeline-day h3::before { left: -27px; }
  .timeline-row { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
}

@media (max-width: 520px) {
  .topbar { left: 12px; right: 12px; justify-content: flex-end; }
  .text-tool { display: none; }
  .hero { margin-bottom: 28px; }
  .brand { font-size: 30px; }
  .drop-zone { height: 260px; }
  .camera { font-size: 48px; }
  .drop-zone small { display: none; }
  .queue-head h2 { font-size: 24px; }
  .queue-tools { display: grid; grid-template-columns: 1fr repeat(3, 42px); width: 100%; }
  #copyFormatBtn { width: 100%; min-width: 0; }
  .format-menu { left: 0; right: auto; width: min(220px, calc(100vw - 40px)); }
  .icon-pill { width: 42px; }
  .queue-item { grid-template-columns: 1fr; }
  .queue-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .gallery, .timeline-row { grid-template-columns: 1fr; }
  .modal { padding: 10px; }
  .modal-card { padding: 26px 18px; border-radius: 22px; }
  .system-top-actions button, .page-actions button { width: 38px; min-width: 38px; height: 38px; }
  .section-title h2 { font-size: 23px; }
  .choice-grid, .choice-grid.two { grid-template-columns: 1fr; }
  .stat-card strong { font-size: 24px; }
}

/* vNext: media support + linear quick menu + Edge performance mode */
.queue-thumb, .thumb-link, .timeline-card a { position: relative; overflow: hidden; }
.queue-thumb img, .queue-thumb video, .thumb-link img, .thumb-link video, .timeline-card a img, .timeline-card a video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.queue-thumb video, .thumb-link video, .timeline-card a video { background: rgba(28,40,55,.12); }
.media-kind-badge {
  position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 999px;
  color: #fff; background: rgba(36,55,74,.68); font-size: 10px; font-weight: 950; letter-spacing: .04em;
  backdrop-filter: blur(8px);
}
.media-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--blue-2); background: rgba(64,158,255,.08); font-size: 28px; }

.fab-dock {
  width: auto !important;
  height: auto !important;
  right: clamp(18px, 3vw, 34px) !important;
  bottom: clamp(18px, 3vw, 34px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 10px !important;
  pointer-events: auto !important;
}
.fab-menu, .fab-toggle { position: static !important; right: auto !important; bottom: auto !important; }
.fab-menu {
  inset: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 8px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.50) !important;
  background: rgba(255,255,255,.38) !important;
  box-shadow: 0 16px 38px rgba(62,88,116,.15) !important;
  backdrop-filter: blur(16px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(12px) !important;
  pointer-events: none !important;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease !important;
}
[data-theme="dark"] .fab-menu { background: rgba(22,29,43,.46) !important; }
.fab-menu button {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}
.fab-dock.open .fab-menu { opacity: 1 !important; visibility: visible !important; transform: translateY(0) !important; pointer-events: auto !important; }
.fab-dock.open .fab-menu button,
.fab-dock.open .fab-menu button:nth-child(1),
.fab-dock.open .fab-menu button:nth-child(2),
.fab-dock.open .fab-menu button:nth-child(3),
.fab-dock.open .fab-menu button:nth-child(4) { transform: none !important; }
.fab-menu button:hover,
.fab-dock.open .fab-menu button:nth-child(1):hover,
.fab-dock.open .fab-menu button:nth-child(2):hover,
.fab-dock.open .fab-menu button:nth-child(3):hover,
.fab-dock.open .fab-menu button:nth-child(4):hover { transform: translateY(-2px) !important; }
.fab-dock.open .fab-toggle { transform: rotate(90deg) !important; }

body.edge-lite .ambient span { animation: none !important; filter: blur(18px) !important; opacity: .16 !important; }
body.edge-lite .status-card,
body.edge-lite .queue-panel,
body.edge-lite .format-menu,
body.edge-lite .modal::backdrop,
body.edge-lite .modal-card,
body.edge-lite .sheet-page,
body.edge-lite .fab-menu,
body.edge-lite .media-kind-badge { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.edge-lite .queue-item,
body.edge-lite .image-card,
body.edge-lite .timeline-card,
body.edge-lite .stat-card,
body.edge-lite .chart-card,
body.edge-lite .maintenance-card,
body.edge-lite .latest-grid article { box-shadow: 0 8px 22px rgba(62,88,116,.10) !important; }
body.edge-lite .queue-item:hover,
body.edge-lite .image-card:hover,
body.edge-lite .timeline-card:hover { transform: none !important; }

@media (max-width: 860px) {
  .fab-dock { right: 14px !important; bottom: 14px !important; width: auto !important; height: auto !important; }
  .fab-menu { flex-direction: row !important; border-radius: 999px !important; }
  .fab-toggle, .fab-menu button { width: 48px !important; height: 48px !important; }
  .queue-panel { max-height: none !important; }
}

@media (max-width: 520px) {
  .fab-dock { left: 50% !important; right: auto !important; transform: translateX(-50%) !important; align-items: center !important; }
  .fab-menu { max-width: calc(100vw - 24px); }
  .fab-toggle, .fab-menu button { width: 46px !important; height: 46px !important; }
  .status-card { margin-bottom: 8px; }
  .queue-panel { padding: 14px; border-radius: 18px; }
  .queue-tools { gap: 8px; }
  .result-table button b { max-width: 100%; }
}

/* vNext: real dashboard gallery + file detail modal */
.full-modal.files-mode .system-page { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 72px 1fr; }
.full-modal.files-mode .system-topbar { display: flex !important; }
.full-modal.files-mode .system-side { display: flex !important; }
.full-modal.files-mode .system-main { min-height: 0; overflow: auto; }
.full-modal.files-mode .system-tab[data-panel="files"] { animation: fadeUp .14s ease both; }
.dashboard-shell { min-height: auto; }
.dashboard-bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border-radius: 0 0 18px 18px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 12px 26px rgba(62,88,116,.13);
}
[data-theme="dark"] .dashboard-bar { background: rgba(22,29,43,.82); border-color: rgba(255,255,255,.08); }
.dashboard-brand { display: flex; align-items: center; gap: 8px; padding: 0 8px; color: var(--title); font-size: 24px; font-weight: 950; white-space: nowrap; }
.dashboard-brand i { color: var(--title); }
.dashboard-search {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(64,158,255,.13);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 18px rgba(62,88,116,.06);
}
[data-theme="dark"] .dashboard-search { background: rgba(10,15,24,.38); }
.dashboard-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-weight: 850; }
.dashboard-count, .dashboard-sort, .dashboard-icon {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(64,158,255,.13);
  background: rgba(255,255,255,.82);
  color: var(--title);
  box-shadow: 0 8px 18px rgba(62,88,116,.08);
}
.dashboard-count { display: flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 900; white-space: nowrap; }
.dashboard-count i { font-size: 22px; color: var(--title); }
.dashboard-sort { width: 150px; padding: 0 12px; outline: none; font-weight: 850; }
.dashboard-icon { width: 44px; display: grid; place-items: center; color: var(--blue-2); }
.dashboard-icon:hover { transform: translateY(-1px); background: rgba(64,158,255,.10); }
.dashboard-path {
  height: 44px;
  margin: 14px 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(64,158,255,.10);
  box-shadow: 0 6px 16px rgba(62,88,116,.05);
}
[data-theme="dark"] .dashboard-path, [data-theme="dark"] .dashboard-count, [data-theme="dark"] .dashboard-sort, [data-theme="dark"] .dashboard-icon { background: rgba(10,15,24,.42); color: var(--text); }
.dashboard-path span { color: var(--title); font-weight: 900; }
.dashboard-path small { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.dashboard-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding: 0 14px 18px;
  contain: layout paint;
}
.dashboard-gallery.empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  margin: 14px;
  border-radius: 18px;
  border: 1px dashed rgba(64,158,255,.25);
  background: rgba(255,255,255,.44);
  color: var(--muted);
  font-weight: 900;
}
.dash-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(64,158,255,.13);
  box-shadow: 0 8px 18px rgba(62,88,116,.11);
  transition: transform .14s ease, box-shadow .14s ease;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(62,88,116,.18); }
.dash-thumb { position: relative; display: block; aspect-ratio: 16 / 10.5; overflow: hidden; background: rgba(64,158,255,.08); }
.dash-thumb img, .dash-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.storage-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 7px;
  color: #1f9d52;
  background: rgba(151,244,164,.78);
  font-size: 12px;
  font-weight: 950;
}
.dash-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0,0,0,.55);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .14s ease, transform .14s ease;
}
.dash-card:hover .dash-overlay { opacity: 1; transform: scale(1); }
.dash-overlay button, .dash-overlay a {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--blue-2);
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(0,0,0,.18);
  transition: transform .12s ease, filter .12s ease;
}
.dash-overlay button:hover, .dash-overlay a:hover { transform: translateY(-2px); filter: brightness(1.05); }
.dash-overlay .danger { background: var(--danger); }
.dash-foot { min-height: 48px; padding: 10px 12px; text-align: center; background: rgba(35,35,35,.72); color: white; }
.dash-foot strong, .dash-foot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-foot strong { font-weight: 950; }
.dash-foot small { margin-top: 4px; color: rgba(255,255,255,.72); font-size: 12px; }
.gallery-pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 0 24px; }
.gallery-pager button, .gallery-pager span {
  min-width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--title);
  background: rgba(255,255,255,.82);
  box-shadow: 0 5px 14px rgba(62,88,116,.10);
  font-weight: 900;
}
.gallery-pager button.active { color: white; background: var(--blue-2); }
.gallery-pager button:hover { transform: translateY(-1px); }
.detail-modal { width: min(1120px, calc(100vw - 24px)); }
.detail-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 28px 80px rgba(15,23,42,.28);
  padding: 24px;
}
[data-theme="dark"] .detail-card { background: rgba(22,29,43,.94); }
.detail-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(64,158,255,.08);
  color: var(--muted);
}
.detail-head { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 40px 18px; }
.detail-head h2 { margin: 0 auto; color: var(--title); font-size: 26px; }
.detail-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.detail-btn {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: white;
  background: var(--blue-2);
  text-decoration: none;
  font-weight: 900;
}
.detail-btn.danger { background: var(--danger); }
.detail-tabs { display: flex; gap: 22px; border-bottom: 2px solid rgba(64,158,255,.20); margin-bottom: 14px; overflow-x: auto; }
.detail-tabs button { padding: 12px 0; border: 0; background: transparent; color: var(--text); font-weight: 900; position: relative; }
.detail-tabs button.active { color: var(--blue-2); }
.detail-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--blue-2); border-radius: 999px; }
.detail-link { width: 100%; height: 44px; border: 1px solid rgba(64,158,255,.20); border-radius: 8px; padding: 0 12px; background: rgba(255,255,255,.86); color: var(--text); outline: none; font-weight: 850; }
[data-theme="dark"] .detail-link { background: rgba(10,15,24,.45); }
.detail-grid { display: grid; grid-template-columns: 360px 1fr; gap: 0; margin-top: 14px; border: 1px solid rgba(64,158,255,.14); border-radius: 10px; overflow: hidden; }
.detail-preview { min-height: 260px; display: grid; place-items: center; background: rgba(64,158,255,.04); }
.detail-preview img, .detail-preview video { width: 100%; height: 100%; max-height: 360px; object-fit: contain; }
.detail-meta { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-meta div { min-height: 86px; border-left: 1px solid rgba(64,158,255,.12); border-bottom: 1px solid rgba(64,158,255,.12); padding: 16px; }
.detail-meta div:nth-last-child(-n+1) { border-bottom: 0; }
.detail-meta .wide { grid-column: 1 / -1; }
.detail-meta dt { color: var(--title); font-weight: 950; margin-bottom: 14px; }
.detail-meta dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
body.edge-lite .dashboard-bar,
body.edge-lite .dashboard-search,
body.edge-lite .dashboard-count,
body.edge-lite .dash-card,
body.edge-lite .detail-card { backdrop-filter: none !important; box-shadow: 0 8px 22px rgba(62,88,116,.10) !important; }
body.edge-lite .dash-card:hover { transform: none; }
body.edge-lite .dash-overlay { transition: opacity .08s linear; }
@media (max-width: 980px) {
  .full-modal.files-mode .system-main { padding: 10px; }
  .dashboard-bar { grid-template-columns: auto 1fr auto; border-radius: 14px; }
  .dashboard-count { grid-column: 1 / 2; }
  .dashboard-sort { width: 100%; grid-column: 2 / 3; }
  .dashboard-icon { grid-column: 3 / 4; }
  .dashboard-gallery { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 0 8px 16px; }
  .dashboard-path { margin: 10px 8px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-preview { min-height: 220px; }
}
@media (max-width: 560px) {
  .dashboard-bar { grid-template-columns: 1fr auto; gap: 8px; padding: 10px; }
  .dashboard-brand { font-size: 20px; }
  .dashboard-search { grid-column: 1 / -1; order: 3; height: 42px; }
  .dashboard-count { grid-column: 1 / 2; order: 4; font-size: 13px; }
  .dashboard-sort { grid-column: 1 / 2; order: 5; height: 40px; width: 100%; }
  .dashboard-icon { grid-column: 2 / 3; order: 4; width: 42px; height: 42px; }
  .dashboard-path { height: auto; min-height: 42px; align-items: flex-start; flex-direction: column; padding: 10px 12px; gap: 4px; }
  .dashboard-path small { margin-left: 0; white-space: normal; }
  .dashboard-gallery { grid-template-columns: 1fr; }
  .dash-overlay { opacity: 1; align-items: flex-start; justify-content: flex-end; padding: 8px; background: linear-gradient(180deg, rgba(0,0,0,.42), transparent 55%); gap: 8px; }
  .dash-overlay button, .dash-overlay a { width: 36px; height: 36px; }
  .detail-modal { width: 100vw; height: 100vh; padding: 8px; }
  .detail-card { min-height: calc(100vh - 16px); padding: 18px 14px; border-radius: 18px; }
  .detail-head { display: block; padding: 0 34px 14px 0; }
  .detail-head h2 { font-size: 22px; margin-bottom: 12px; }
  .detail-actions { flex-wrap: wrap; }
  .detail-tabs { gap: 18px; }
  .detail-meta { grid-template-columns: 1fr; }
  .detail-meta div { border-left: 0; }
}
.dashboard-bar { grid-template-columns: auto minmax(280px, 1fr) auto auto auto auto; }
@media (max-width: 980px) { .dashboard-bar { grid-template-columns: auto 1fr auto auto; } }
@media (max-width: 560px) { .dashboard-bar { grid-template-columns: 1fr auto auto; } }


/* hotfix5: less clutter, stable video previews, real whitelist status, mobile text safety */
.queue-panel.is-hidden { display: none !important; }
.queue-item, .queue-main, .queue-line, .queue-name, .queue-detail, .result-table button b,
.dashboard-brand, .dash-foot strong, .dash-foot small, .detail-meta dd,
.security-card span, .security-card code { min-width: 0; overflow-wrap: anywhere; }
.queue-name { word-break: break-word; }
.queue-thumb video { pointer-events: none; }
.whitelist-card { align-items: flex-start; }
.whitelist-card code {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(64,158,255,.08);
  color: var(--title);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}
.system-side button { white-space: nowrap; }
.dashboard-shell { padding-bottom: 14px; }

@media (max-width: 980px) {
  .full-modal.files-mode .system-page { grid-template-columns: 1fr; grid-template-rows: 64px auto 1fr; }
  .full-modal.files-mode .system-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px dashed rgba(90,120,150,.20); }
  .full-modal.files-mode .system-main { padding: 14px; }
}

@media (max-width: 560px) {
  .brand { line-height: 1.15; }
  .status-card { border-radius: 18px; }
  .queue-head, .queue-tools { min-width: 0; }
  .queue-tools { grid-template-columns: 1fr repeat(3, 40px); gap: 8px; }
  #copyFormatBtn { height: 40px; font-size: 14px; }
  #copyFormatBtn b { font-size: 15px; }
  .queue-item { padding: 12px; gap: 10px; }
  .queue-line { align-items: flex-start; flex-direction: column; gap: 6px; }
  .result-table button { grid-template-columns: 74px minmax(0,1fr); }
  .system-main { min-width: 0; }
  .system-side button { font-size: 13px; }
  .settings-form, .security-card, .notice-list, .action-grid { max-width: 100%; }
  .choice-grid span { min-height: 42px; padding: 8px; text-align: center; white-space: normal; line-height: 1.25; }
  .single-channel span, .section-title p, .mini-help, .notice-list p { line-height: 1.55; }
  .dashboard-bar { align-items: start; }
  .dashboard-brand { font-size: 18px; }
  .dashboard-count span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .detail-actions { gap: 8px; }
  .detail-btn { min-height: 34px; padding: 0 10px; font-size: 13px; }
  .detail-meta div { min-height: auto; padding: 12px; }
  .toast { bottom: 78px; border-radius: 18px; }
}
