/* ==========================================================================
   polish.css — 2026-11 UI 修复层（最后加载）
   ========================================================================== */

/* 1. 弹窗必须不透明且有遮罩：移动端上传资料时页面内容曾透过弹窗，造成文字重叠 */
.resource-modal-backdrop{background:rgba(12,16,28,.58);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);overflow-y:auto;overscroll-behavior:contain;}
:is(.resource-modal,.modal,.doc-tools-card){background:var(--surface-solid)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;}
.resource-modal{max-height:min(88vh,850px);max-height:min(88dvh,850px);}
@media(max-width:560px){
 .resource-modal-backdrop{padding:12px;align-items:end;place-items:end stretch;}
 .resource-modal{width:100%;max-height:calc(100dvh - 24px - env(safe-area-inset-bottom));padding:22px 16px calc(20px + env(safe-area-inset-bottom));border-radius:22px;}
 .resource-modal h2{font-size:22px;padding-right:40px;}
 .resource-file-row{gap:8px;padding:9px 10px;}
 .resource-file-row .rf-icon{width:26px;height:26px;}
 .resource-file-row .rf-meta{min-width:0;}
 .resource-file-row .rf-bar{min-width:16px;}
}

/* ==========================================================================
   v1.32 · 去掉页面顶部的大标题（英文眉标 / 大号标题 / 说明文字）
   标题仍保留给读屏器；页头里的按钮、统计等控件照常显示。
   首页各区块的小标题不受影响；申诉、验证、守则与问卷等需要说明的页面保留标题（.keep-head）。
   ========================================================================== */
.page-view .page-head:not(.keep-head) :is(.eyebrow,h1,p.lede,p.sub),
.page-view .page-head.resource-head>div:first-child>h2,
.page-view .page-head.resource-head>div:first-child>p,
.page-view .page-head:not(.keep-head)>div:first-child>p:not(.tiny):not([class*="hint"]){
 position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important;
}
.page-view .page-head:not(.keep-head){padding:18px 0 8px;}
.page-view .page-head:not(.keep-head) .head-row{justify-content:flex-end;align-items:center;}
.page-view .page-head:not(.keep-head).resource-head{justify-content:flex-end;}
/* 页头里没有任何可见控件时整块收起 */
.page-view .page-head:not(.keep-head):not(:has(a:not(.sr-only),button,select,input,.pill,.stat,.tiny)){padding:0!important;margin:0!important;min-height:0!important;height:0;overflow:hidden;border:0!important;}
html[data-workspace-layout="edge"] .workspace-page .page-head:not(.keep-head){padding-top:16px;}

/* ==========================================================================
   v1.32 · 成员页：页面板块切换（成员 / 玩家状态与排行榜）
   ========================================================================== */
.hub-blocks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0 22px;}
.hub-block{display:flex;align-items:center;gap:14px;min-width:0;padding:16px 18px;border-radius:var(--r-lg,20px);border:1px solid var(--line-strong);background:var(--glass-panel,var(--surface));-webkit-backdrop-filter:blur(20px) saturate(150%);backdrop-filter:blur(20px) saturate(150%);box-shadow:var(--glass-shadow,var(--shadow-1));color:var(--text);text-align:left;cursor:pointer;transition:border-color .2s,box-shadow .2s,transform .2s var(--ease);}
.hub-block:hover{transform:translateY(-2px);}
.hub-block:focus-visible{outline:2px solid var(--accent);outline-offset:3px;}
.hub-block.is-active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent),var(--glass-shadow,var(--shadow-1));background:color-mix(in srgb,var(--accent) 8%,var(--glass-panel,var(--surface)));}
.hub-block-icon{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--accent-soft);color:var(--accent);}
.hub-block-icon svg{width:21px;height:21px;}
.hub-block.is-active .hub-block-icon{background:var(--accent);color:#fff;}
.hub-block-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;}
.hub-block-title{font-size:15.5px;font-weight:650;letter-spacing:-.01em;}
.hub-block-desc{font-size:12.5px;color:var(--text-2);line-height:1.5;}
.hub-block-meta{flex:none;font-size:12px;padding:4px 10px;border-radius:999px;background:var(--surface-hover);color:var(--text-2);white-space:nowrap;}
.hub-block.is-active .hub-block-meta{background:var(--accent-soft);color:var(--accent);}
.hub-panel[hidden]{display:none!important;}
.hub-panel{animation:fadeIn .22s var(--ease) both;}
.hub-subtitle{font-size:18px;margin:0 0 12px;}
/* 排行榜内嵌列表：外框限高，内部滚动 */
.lb-embed{max-height:min(460px,60vh);overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--line-strong);border-radius:16px;background:var(--glass-inset,var(--surface-2));-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);scrollbar-width:thin;}
.lb-embed:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.lb-embed .xt-rank[hidden]{display:none;}
.lb-filter{max-width:260px;min-height:36px;}
@media(max-width:640px){.hub-blocks{grid-template-columns:1fr;gap:8px;}.hub-block{padding:13px 14px;}.hub-block-desc{display:none;}.lb-filter{max-width:none;width:100%;}}

/* ==========================================================================
   v1.32 · 补齐毛玻璃：之前还是实色的浮层、卡片与面板统一加上背景模糊
   弹窗保持 90% 以上不透明度，文字不会被背后页面干扰（修复移动端上传弹窗重叠的初衷不变）
   ========================================================================== */
:is(.resource-modal,.modal,.doc-tools-card,.media-preview){
 background:color-mix(in srgb,var(--surface-solid) 90%,transparent)!important;
 -webkit-backdrop-filter:blur(28px) saturate(160%)!important;backdrop-filter:blur(28px) saturate(160%)!important;
}
:is(.fm-menu,.msg-menu,.line-detail,.xt-toc,.admin-ai-tooltip,.survey-sticky,.tabbar){
 background:color-mix(in srgb,var(--surface-solid) 78%,transparent);
 -webkit-backdrop-filter:blur(22px) saturate(160%);backdrop-filter:blur(22px) saturate(160%);
}
:is(.team-arrow,.line-detail-close,.player-chip,.line-card,.stat-strip>div,.flow>div,.xt-search-box input,.segmented){
 background:color-mix(in srgb,var(--surface-solid) 62%,transparent);
 -webkit-backdrop-filter:blur(16px) saturate(150%);backdrop-filter:blur(16px) saturate(150%);
}
/* 私信：会话列表、聊天顶栏与输入区也改为半透明毛玻璃 */
:is(.messages-people,.messages-chat-head,.messages-compose){
 background:color-mix(in srgb,var(--surface-solid) 66%,transparent);
 -webkit-backdrop-filter:blur(18px) saturate(150%);backdrop-filter:blur(18px) saturate(150%);
}
/* 页脚、居中模式的侧栏目录 */
.footer{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);}
html:not([data-workspace-layout="edge"]) .admin-directory{background:var(--glass-nav);-webkit-backdrop-filter:blur(24px) saturate(155%);backdrop-filter:blur(24px) saturate(155%);}
/* 卡片里嵌套的行不再叠加模糊（性能），这里只对外层生效 */
:is(.card,.auth-card,.hero-panel) :is(.player-chip,.segmented,.line-card){-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--glass-inset);}
@media (prefers-reduced-transparency: reduce),(prefers-contrast: more){
 :is(.resource-modal,.modal,.doc-tools-card,.media-preview,.fm-menu,.msg-menu,.line-detail,.messages-people,.messages-chat-head,.messages-compose){background:var(--surface-solid)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;}
}

/* Shared translucent surfaces for tools, file views and transient menus. */
:is(.hub-file-surface,.resource-empty,.doc-tools-card,.media-preview,.fm-menu,.msg-menu,.messages-selectbar) {
  background:color-mix(in srgb,var(--accent) 5%,var(--glass-overlay));
  border-color:var(--line-strong);
  backdrop-filter:blur(20px) saturate(155%);
  -webkit-backdrop-filter:blur(20px) saturate(155%);
}
html[data-workspace-layout="edge"] .workspace-tabs .personal-form>.row-wrap:has(.btn-primary) {
  position:static;
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.personal-preset-grid,
html[data-workspace-layout="edge"] .workspace-tabs .personal-preset-grid {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,112px),1fr));
  max-width:none;
}
html[data-workspace-layout="edge"] .workspace-tabs .personal-presets>legend {float:none;width:auto;}
html[data-workspace-layout="edge"] .workspace-tabs .personal-presets>:not(legend) {margin-left:0;}
@media(max-width:480px){.personal-preset-grid,html[data-workspace-layout="edge"] .workspace-tabs .personal-preset-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}

.library-panel .resource-head,.library-private-intro {padding:4px 0 20px;}
.library-panel h2 {margin:0;}
.library-panel .resource-head p,.library-private-intro p {margin-top:8px;color:var(--text-2);}
.resource-media-trigger {text-align:left;font:inherit;color:inherit;cursor:pointer;overflow-wrap:anywhere;}
.resource-media-trigger:hover,.resource-media-trigger:focus-visible {color:var(--accent);text-decoration:underline;}
.hub-file-tools {gap:10px;}
.hub-file-tools select {width:auto;max-width:100%;}
.hub-file-surface {min-height:180px;padding:14px 16px 28px;overflow:auto;max-height:min(70vh,760px);}
.hub-file-surface .hub-file {border-radius:8px;}
.hub-file-surface .hub-file.is-selected {background:var(--accent-soft);}
.hub-file-icon,.hub-file-menu {flex:none;border-radius:8px;cursor:pointer;}
.hub-file-icon:hover,.hub-file-menu:hover {background:var(--surface-hover);}
.hub-file-menu {font-size:20px;width:34px;height:34px;}
.hub-file-meta {display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:5px 18px;margin-left:auto;text-align:right;}
.hub-view-detail .hub-file {display:grid;grid-template-columns:auto 34px minmax(0,1fr) minmax(220px,auto) 34px;}
.hub-view-detail .hub-file-meta {display:grid;grid-template-columns:55px 90px minmax(120px,auto);}
.hub-view-icons {display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;}
.hub-view-icons .hub-file {position:relative;display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:12px;border:1px solid var(--line);min-width:0;}
.hub-view-icons .hub-file-select {position:absolute;top:7px;left:8px;z-index:1;}
.hub-view-icons .hub-file-menu {position:absolute;top:4px;right:7px;}
.hub-view-icons .hub-file-icon {position:relative;display:grid;place-items:center;width:100%;height:82px;font-size:32px;margin-top:18px;}
.hub-view-icons .hub-file-icon img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:6px;background:var(--glass-inset);}
.hub-view-icons .hub-file-main {width:100%;text-align:center;}
.hub-view-icons .hub-file-name {margin:auto;}
.hub-view-icons .hub-file-meta {margin:0;justify-content:center;text-align:center;gap:4px 8px;}
@media(max-width:640px){
 .hub-view-detail .hub-file {grid-template-columns:auto 30px minmax(0,1fr) 32px;}
 .hub-view-detail .hub-file-meta {grid-column:3;grid-row:2;display:flex;justify-content:flex-start;margin:0;}
 .hub-view-detail .hub-file-menu {grid-column:4;grid-row:1;}
 .hub-view-list .hub-file-meta {order:1;justify-content:flex-end;flex-basis:100%;}
 .hub-view-icons {grid-template-columns:repeat(auto-fill,minmax(116px,1fr));}
}
.drag-selecting {user-select:none;-webkit-user-select:none;}
.drag-selection-rectangle {position:fixed;z-index:390;pointer-events:none;border:1px solid var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent);border-radius:3px;}
.message-check {display:grid;place-items:center;border-radius:6px;background:var(--glass-field);}
.message-row.is-selected .message-check {background:var(--accent);box-shadow:none;color:var(--on-accent,#fff);}
.message-row.is-selected .message-check::after {content:'✓';font-size:14px;font-weight:750;line-height:1;}
.message-row.is-selectable .message-check:focus-visible {outline:2px solid var(--accent);outline-offset:2px;}
.menu-fade {animation:selection-menu-in .14s ease-out both;}
.menu-fade.menu-leaving {pointer-events:none;animation:selection-menu-out .14s ease-in both;}
@keyframes selection-menu-in {from{opacity:0}to{opacity:1}}
@keyframes selection-menu-out {from{opacity:1}to{opacity:0}}
@media(prefers-reduced-motion:reduce){.menu-fade,.menu-fade.menu-leaving{animation-duration:1ms;}}

/* ==========================================================================
   2026-11-19 · 资料库 / 个人主页 细节修复
   ========================================================================== */

/* 1. 私人资料库：拖拽框选与浏览器「选中文字」会互相打架，文件区域禁用文本选择 */
.hub-file-surface,
.hub-file-surface * { user-select: none; -webkit-user-select: none; }
.hub-file-surface input { user-select: auto; -webkit-user-select: auto; }

/* 4. 个人主页：头像右侧的信息压在封面图上，垫一层遮罩保证对比度
      深色模式 = 黑色遮罩 + 白字；浅色模式反之 */
.member-home .profile-head .info {
  position: relative;
  padding: 16px 20px !important;      /* workspace.css 里非边缘布局给 .info 设过 14px 0，这里要盖住 */
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, rgba(6,8,14,.28), rgba(6,8,14,.72));
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}
.member-home .profile-head .info :is(.dim,.muted,.tiny,.mono,.small) { color: rgba(255,255,255,.8); }
.member-home .profile-head .info .tag { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; }
html[data-theme="light"] .member-home .profile-head .info {
  color: #15171c;
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.92));
  box-shadow: 0 14px 40px rgba(15,20,30,.08);
}
html[data-theme="light"] .member-home .profile-head .info :is(.dim,.muted,.tiny,.mono,.small) { color: rgba(21,23,28,.72); }
html[data-theme="light"] .member-home .profile-head .info .tag { background: rgba(15,20,30,.06); border-color: rgba(15,20,30,.16); color: #15171c; }
@media(max-width:600px){
 .member-home .profile-head .info { padding: 14px 16px !important; border-radius: 16px; }
}

/* 5. 个人中心：原来排一排的按钮收进「⋯ 更多」菜单 */
.profile-more {
  width: 36px; min-width: 36px; height: 36px; min-height: 36px !important;
  padding: 0 !important; display: inline-grid; place-items: center;
  font-size: 20px; line-height: 1; letter-spacing: .02em; border-radius: 11px;
}
.profile-more[aria-expanded="true"] { background: var(--surface-hover); }

/* ==========================================================================
   2026-11-19 · 管理台文件管理：拖拽移动 / 去掉「上一级」行
   ========================================================================== */
.fm-item[draggable="true"] { cursor: grab; }
.fm-item.is-dragging { opacity: .45; }
.fm-item.is-drop { background: var(--accent-soft); border-color: var(--accent); }
.fm-crumbs .is-drop { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.fm-picker { display: grid; gap: 10px; }
.fm-picker-list { display: grid; gap: 4px; max-height: 46vh; overflow: auto; padding: 2px 0; }
.fm-picker-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  padding: 10px 12px; border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.fm-picker-row:hover, .fm-picker-row:focus-visible { background: var(--surface-hover); border-color: var(--line); }
.fm-picker-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   2026-11-19 · 手机 / 平板适配与触摸手感
   ========================================================================== */

/* 1. 触摸设备没有真正的 hover：去掉「悬浮抬起」，避免点一下按钮就一直飘着 */
@media (hover: none) {
  .btn:hover, .icon-btn:hover { transform: none; box-shadow: none; }
  .resource-card:hover, .hub-block:hover, .member-card:hover { transform: none; }
  .btn:active { transform: scale(.97); }
}

/* 2. 窄屏不要再套一层内部滚动：手机上列表套滚动条很容易「划不动」 */
@media (max-width: 720px) {
  .hub-file-surface { max-height: none; overflow: visible; padding-bottom: 10px; }
  .fm-body { max-height: none; }
  .lb-embed { max-height: none; }
  .hub-file-surface .hub-file { padding: 10px 2px; gap: 10px; }
  .hub-file-menu { width: 40px; height: 40px; }
  .fm-item { min-height: 44px; padding: 9px 10px; }
  .fm-more { width: 36px; height: 36px; }
}

/* 平板与手机：三列卡片在中等宽度会挤成细条，补两档栅格 */
@media (max-width: 980px) {
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .special-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .resource-grid, .special-grid { grid-template-columns: 1fr; }
}

/* 动效：换页入场从 520ms 收到 360ms，手机上只做淡入，避免滑动时掉帧 */
.page-view { animation: pageEnter .36s var(--spring) both; }
@keyframes ncpPageFade { from { opacity: 0 } to { opacity: 1 } }
@media (max-width: 720px) {
  .page-view { animation: ncpPageFade .26s var(--ease) both; }
  .page-view.is-leaving { animation-duration: .18s; }
}

/* ==========================================================================
   v1.33 · 换页动效与加载态
   换页：旧页面淡出上移，新页面淡入 + 上浮 + 极轻缩放（微软 Fluent 那种“滑进来”的观感）。
   侧栏模式下内容区的子元素里有 sticky 侧栏，只能用纯透明度淡入淡出，
   否则动画期间的 transform 会让 sticky 定位跳一下。
   ========================================================================== */
@keyframes ncpPageIn {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.994); }
  to { opacity: 1; transform: none; }
}
@keyframes ncpPageOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translate3d(0, -10px, 0) scale(.996); }
}
@keyframes ncpPageInFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ncpPageOutFade {
  from { opacity: 1; }
  to { opacity: 0; }
}
.page-view { animation: ncpPageIn .42s var(--spring) both; }
.page-view.is-leaving { animation: ncpPageOut .17s var(--ease) both; pointer-events: none; }

/* 侧栏工作区：整页容器不做位移，只淡入淡出 */
html[data-workspace-layout="edge"] .workspace-page > .page-view {
  animation: ncpPageInFade .3s var(--ease) both;
  transform: none;
}
html[data-workspace-layout="edge"] .workspace-page > .page-view.is-leaving {
  animation: ncpPageOutFade .17s var(--ease) both;
}

/* 加载态：转圈 + 「正在加载中」 */
.page-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; min-height: min(56vh, 460px); padding: 72px 0 96px;
  animation: ncpPageInFade .18s var(--ease) both;
}
.page-loading-ring {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: ncpSpin .78s linear infinite;
}
.page-loading-text {
  font-size: 12.5px; letter-spacing: .04em; color: var(--text-3);
  display: inline-flex; align-items: baseline; gap: 1px;
}
.page-loading-text::after {
  content: '…'; margin-left: 2px; animation: ncpLoadDots 1.4s steps(1, end) infinite;
}
@keyframes ncpSpin { to { transform: rotate(360deg); } }
@keyframes ncpLoadDots {
  0%, 24% { opacity: .25; }
  25%, 49% { opacity: .55; }
  50%, 74% { opacity: .8; }
  75%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .page-view, .page-view.is-leaving,
  html[data-workspace-layout="edge"] .workspace-page > .page-view,
  html[data-workspace-layout="edge"] .workspace-page > .page-view.is-leaving {
    animation: ncpPageFade .18s linear both;
  }
  .page-loading-ring { animation-duration: 2.4s; }
  .page-loading-text::after { animation: none; }
}

/* v1.33 · 举报与申诉页：侧栏模式下三个板块用侧边栏切换，页内不再放一排切换按钮 */
html[data-workspace-layout="edge"] .workspace-page .admin-tab-switch{display:none;}
/* 手机上仍然只做淡入淡出：位移与缩放虽然只走合成器，但在窄屏上观感更晃 */
@media (max-width: 720px) {
  .page-view { animation: ncpPageFade .26s var(--ease) both; }
  .page-view.is-leaving { animation: ncpPageOutFade .16s var(--ease) both; }
}

/* ==========================================================================
   v1.33 · 右下角浮钮统一毛玻璃 + 日志内嵌抽屉
   ========================================================================== */
:is(.admin-ai, .admin-ai-split, .to-top) {
  background: color-mix(in srgb, var(--surface-solid) 42%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-color: color-mix(in srgb, var(--line-strong) 55%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .18);
}
html[data-theme="light"] :is(.admin-ai, .admin-ai-split, .to-top) {
  background: color-mix(in srgb, #ffffff 62%, transparent);
  box-shadow: 0 10px 28px rgba(20, 30, 60, .16), inset 0 1px 0 rgba(255, 255, 255, .7);
}
:is(.admin-ai, .admin-ai-split, .to-top):hover { background: color-mix(in srgb, var(--surface-solid) 62%, transparent); }
html[data-theme="light"] :is(.admin-ai, .admin-ai-split, .to-top):hover { background: color-mix(in srgb, #ffffff 78%, transparent); }
.admin-ai-split a:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :is(.admin-ai, .admin-ai-split, .to-top) { background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* 日志内嵌抽屉：右下角浮层，不挡住整页 */
.log-drawer {
  position: fixed; right: 24px; bottom: 84px; z-index: 120;
  width: min(760px, calc(100vw - 48px)); height: min(60vh, 520px);
  display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
  opacity: 0; transform: translateY(12px) scale(.985);
  transition: opacity .2s var(--ease), transform .26s var(--spring);
}
.log-drawer.show { opacity: 1; transform: none; }
.log-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.log-drawer-title { font-size: 13px; font-weight: 650; }
.log-drawer-actions { display: inline-flex; align-items: center; gap: 10px; }
.log-drawer-link { font-size: 12px; color: var(--accent); text-decoration: none; }
.log-drawer-link:hover { text-decoration: underline; }
.log-drawer-close { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer; font-size: 13px; line-height: 1; }
.log-drawer-close:hover { background: var(--surface-hover); color: var(--text); }
.log-drawer-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.log-drawer-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; padding: 10px 12px 12px; }
.log-drawer-body .server-log-view { max-height: none; height: 100%; min-height: 0; }
.log-drawer-body .server-log-bar { gap: 8px; }
.log-drawer-body .server-log-bar .btn { min-height: 30px; }
.log-drawer-body [data-log-foot] { margin: 0; }
@media (max-width: 720px) {
  .log-drawer { right: 10px; left: 10px; bottom: calc(78px + env(safe-area-inset-bottom)); width: auto; height: min(58vh, 460px); }
  .log-drawer-body .server-log-bar select { max-width: 108px; }
}
/* 手机上抽屉里的工具栏收紧：来源一行截断，自动刷新只留开关，按钮一行放得下 */
@media (max-width: 720px) {
  .log-drawer-body .server-log-bar { display: grid; gap: 8px; }
  .log-drawer-body .server-log-bar > .tiny.dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .log-drawer-body .server-log-auto > span { display: none; }
  .log-drawer-body .server-log-bar .btn { padding: 0 9px; min-height: 30px; font-size: 12px; }
  .log-drawer-body .server-log-lines select { max-width: 104px; font-size: 12px; }
}
