/* andaodev 2.1 layouts (/_ui/v1/layouts.css, loaded by appearance.js): one page, five ways to arrange it, chosen by
   <html data-ad-layout>. classic is the page as it always was; islands / hud / deck also dock the conversation at the
   bottom of the dashboard (shell.js adds .ad-chat-docked); tiling keeps it on the right. Only the shell and the shared
   components are touched here; op arranges its own sidebar in its style.css with the same attribute. */

/* ── docked conversation: an input bar floating over the bottom of the dashboard; the history lifts up from it ── */
.ad-app.ad-chat-docked .ad-shell{position:relative}
.ad-app.ad-chat-docked .ad-chat{display:flex;position:absolute;z-index:20;left:50%;bottom:12px;transform:translateX(-50%);
  width:min(980px,calc(100% - 32px));border:1px solid var(--ad-line-strong);border-radius:var(--ad-radius-xl);
  background:color-mix(in srgb,var(--ad-raised) 88%,transparent);backdrop-filter:blur(16px) saturate(1.3);box-shadow:var(--ad-shadow)}
.ad-app.ad-chat-docked .ad-main{padding-bottom:128px}
.ad-app.ad-chat-docked .ad-chat-body{display:flex;flex-direction:column;min-height:0;max-height:0;opacity:0;overflow:hidden;
  transition:max-height .28s cubic-bezier(.2,.8,.2,1),opacity .2s ease}
.ad-app.ad-chat-docked .ad-chat.ad-chat-up .ad-chat-body{max-height:min(62vh,680px);opacity:1}
.ad-app.ad-chat-docked .ad-chat .ad-messages{flex:1 1 auto;min-height:0}
.ad-app.ad-chat-docked .ad-chat .ad-chat-head{border-bottom-color:var(--ad-line)}
.ad-app.ad-chat-docked .ad-chat .ad-ask{border-top:0;padding:10px 12px}
.ad-app.ad-chat-docked .ad-chat.ad-chat-up .ad-ask{border-top:1px solid var(--ad-line)}
.ad-app.ad-chat-docked .ad-chat:not(.ad-chat-up) .ad-ask textarea{min-height:42px;height:42px;resize:none}
.ad-app.ad-chat-docked .ad-chat:not(.ad-chat-up) .ad-ask-actions{flex-direction:row}
.ad-app.ad-chat-docked .ad-chat [data-chat="close"]{display:none}
@media (prefers-reduced-motion:reduce){.ad-app.ad-chat-docked .ad-chat-body{transition:none}}

/* ── 悬浮岛：透明顶栏、大圆角半透明卡片、背景透出 ── */
[data-ad-layout="islands"] .ad-header{background:transparent;border-bottom:0;backdrop-filter:none;padding:14px 26px}
[data-ad-layout="islands"] .ad-main{padding:10px 26px 28px}
[data-ad-layout="islands"] .ad-app.ad-chat-docked .ad-main{padding-bottom:128px}
[data-ad-layout="islands"] :is(.ad-panel,.ad-card,.ad-tile,.ad-form,.ad-banner){border-radius:18px;background:var(--ad-panel-glass);backdrop-filter:blur(14px) saturate(1.3);box-shadow:var(--ad-shadow)}
[data-ad-layout="islands"] .ad-panel :is(.ad-card,.ad-tile,.ad-form){box-shadow:none;border-radius:12px}
[data-ad-layout="islands"] .ad-kpi{border-radius:16px;box-shadow:var(--ad-shadow)}
[data-ad-layout="islands"] .ad-kpi b{font-size:24px}
[data-ad-layout="islands"] :where(.ad-app) h2::after{content:"";display:block;flex-basis:100%;width:36px;max-width:36px;height:3px;border-radius:2px;margin-top:4px;
  background:linear-gradient(90deg,var(--ad-orange),var(--ad-deep) 60%,var(--ad-deep-2))}
[data-ad-layout="islands"] :where(.ad-app) button{border-radius:var(--ad-pill)}
[data-ad-layout="islands"] .ad-scroll{border-radius:14px}

/* ── 指挥舱：便当盒网格、大数字、渐变首卡 ── */
[data-ad-layout="deck"] :is(.ad-panel,.ad-card,.ad-tile,.ad-form){border-radius:16px}
[data-ad-layout="deck"] .ad-panel{background:var(--ad-panel-glass)}
[data-ad-layout="deck"] .ad-kpis{gap:12px}
[data-ad-layout="deck"] .ad-kpi{border-radius:16px;padding:14px 16px 12px 18px}
[data-ad-layout="deck"] .ad-kpi b{font-size:24px;line-height:1.25}
[data-ad-layout="deck"] .ad-kpi:first-child{border-color:transparent;color:#fff;
  background:linear-gradient(135deg,color-mix(in srgb,var(--ad-deep) 78%,var(--ad-panel)),color-mix(in srgb,var(--ad-deep-2) 62%,var(--ad-panel)))}
[data-ad-layout="deck"] .ad-kpi:first-child :is(span,small,b small){color:#ffffffcc}
[data-ad-layout="deck"] .ad-kpi:first-child b{font-size:30px}
[data-ad-layout="deck"] .ad-kpi:first-child :is(b,b *){color:#fff}
[data-ad-layout="deck"] .ad-header{background:color-mix(in srgb,var(--ad-page) 70%,transparent)}
[data-ad-layout="deck"] .ad-mark{border-radius:12px}

/* ── 数据台（借 HokFANG）：细网格底、窄体标题、等宽大写小标签、直角窗格与描角、橙色左标记 ── */
[data-ad-layout="hud"]{--ad-radius-s:2px;--ad-radius:2px;--ad-radius-m:2px;--ad-radius-l:3px;--ad-radius-xl:3px}
[data-ad-layout="hud"] .ad-app{background-image:linear-gradient(var(--ad-grid) 1px,transparent 1px),linear-gradient(90deg,var(--ad-grid) 1px,transparent 1px);background-size:48px 48px}
[data-ad-layout="hud"] .ad-header{border-bottom-color:var(--ad-line-strong)}
[data-ad-layout="hud"] .ad-brand strong{font-family:var(--ad-display);font-size:19px;letter-spacing:.06em;font-weight:700}
[data-ad-layout="hud"] :where(.ad-app) h2{font:600 12px var(--ad-font-mono);text-transform:uppercase;letter-spacing:.12em;color:var(--ad-muted)}
[data-ad-layout="hud"] :where(.ad-app) h2::before{content:"// ";color:var(--ad-orange)}
[data-ad-layout="hud"] :is(.ad-panel,.ad-form){position:relative;border-color:var(--ad-line-strong);background:color-mix(in srgb,var(--ad-panel) 90%,transparent)}
[data-ad-layout="hud"] .ad-panel::before,[data-ad-layout="hud"] .ad-panel::after{content:"";position:absolute;width:8px;height:8px;pointer-events:none}
[data-ad-layout="hud"] .ad-panel::before{top:-1px;left:-1px;border-top:2px solid var(--ad-accent);border-left:2px solid var(--ad-accent)}
[data-ad-layout="hud"] .ad-panel::after{bottom:-1px;right:-1px;border-bottom:2px solid var(--ad-accent);border-right:2px solid var(--ad-accent)}
[data-ad-layout="hud"] .ad-kpi>span{font:10.5px var(--ad-font-mono);text-transform:uppercase;letter-spacing:.1em}
[data-ad-layout="hud"] .ad-kpi b{font-family:var(--ad-display);font-size:30px;line-height:1.15;letter-spacing:0}
[data-ad-layout="hud"] .ad-kpi:first-child b{color:var(--ad-orange)}
[data-ad-layout="hud"] .ad-tag{border-radius:0;border-left:3px solid currentColor;font:11px var(--ad-font-mono);letter-spacing:.04em}
[data-ad-layout="hud"] .ad-table th{font:600 11px var(--ad-font-mono);text-transform:uppercase;letter-spacing:.08em}
[data-ad-layout="hud"] :where(.ad-app) button{font-family:var(--ad-font-mono);font-size:12.5px;letter-spacing:.03em}
[data-ad-layout="hud"] .ad-app.ad-chat-docked .ad-chat{border-radius:3px}
[data-ad-layout="hud"] .ad-msg{border-radius:2px}
[data-ad-layout="hud"] .ad-msg.user{box-shadow:inset 3px 0 0 var(--ad-orange)}

/* ── 平铺（omarchy）：窄顶栏、等距缝隙、强调色描边、等宽小写窗格标题；对话在右侧 ── */
[data-ad-layout="tiling"]{--ad-radius-s:3px;--ad-radius:3px;--ad-radius-m:4px;--ad-radius-l:4px;--ad-radius-xl:4px}
[data-ad-layout="tiling"] .ad-header{padding:4px 12px;font:12.5px var(--ad-font-mono);background:var(--ad-well)}
[data-ad-layout="tiling"] .ad-mark{width:22px;height:22px;font-size:11px}
[data-ad-layout="tiling"] .ad-main{padding:8px 8px 20px}
[data-ad-layout="tiling"] :is(.ad-panel,.ad-kpi,.ad-card,.ad-tile){border-color:var(--ad-line-strong);box-shadow:none;margin-top:8px}
[data-ad-layout="tiling"] .ad-kpi{margin-top:0}
[data-ad-layout="tiling"] .ad-panel:hover{border-color:var(--ad-accent);box-shadow:0 0 0 1px var(--ad-accent)}
[data-ad-layout="tiling"] :where(.ad-app) h2{font:600 12px var(--ad-font-mono);text-transform:lowercase}
[data-ad-layout="tiling"] .ad-kpis{gap:8px}
[data-ad-layout="tiling"] .ad-chat{border-left:1px solid var(--ad-line-strong);background:var(--ad-well);box-shadow:none}
