@import url("../player/FZG_CN/result.css");
@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Ma+Shan+Zheng&family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@500;600;700&family=ZCOOL+XiaoWei&display=swap");
@import url("https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.7.0/style.css");

@font-face { font-family:"Bodoni Moda Local"; src:url("./fonts/BodoniModa-Latin.woff2") format("woff2"); font-style:normal; font-weight:400 900; font-display:swap; }
@font-face { font-family:"Cormorant Garamond Local"; src:url("./fonts/CormorantGaramond-Latin.woff2") format("woff2"); font-style:normal; font-weight:300 700; font-display:swap; }
@font-face { font-family:"Inter Local"; src:url("./fonts/Inter-Latin.woff2") format("woff2"); font-style:normal; font-weight:100 900; font-display:swap; }
@font-face { font-family:"Special Elite Local"; src:url("./fonts/SpecialElite-Latin.woff2") format("woff2"); font-style:normal; font-weight:400; font-display:swap; }
@font-face { font-family:"Meddon Local"; src:url("./fonts/Meddon-Latin.woff2") format("woff2"); font-style:normal; font-weight:400; font-display:swap; }

:root {
  --app-accent: #526f7a;
  --app-accent-dark: #304a53;
  --app-bg: #e8ebeb;
  --app-paper: #fbfbf8;
  --app-ink: #293237;
  --app-muted: #6f7c80;
  --app-line: #cbd2d2;
  --mobile-preview-height: 40%;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--app-ink); background: var(--app-bg); font-family: "Noto Sans SC","Microsoft YaHei",sans-serif; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
input, select, textarea { outline: none; }
[hidden] { display: none !important; }

.topbar {
  position: relative;
  z-index: 50;
  height: 76px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--app-line);
  background: rgba(251,251,248,.97);
  box-shadow: 0 3px 16px rgba(35,49,53,.05);
}
.brand { min-width: 270px; display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 48px;
  height: 48px;
  padding: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border-radius: 9px;
  background: var(--app-accent-dark);
  box-shadow: 5px 5px 0 #c0cdd0;
}
.brand-mark i { display: block; background: #eef6f7; }
.brand b, .brand small { display: block; }
.brand b { font: 700 18px/1.15 "Noto Serif SC",serif; }
.brand small { margin-top: 5px; color: var(--app-muted); font: 700 8px/1 "DM Mono",monospace; letter-spacing: .11em; }
.project-field { min-width: 0; display: flex; align-items: center; gap: 8px; }
.project-field span { color: var(--app-muted); font-size: 10px; font-weight: 800; }
.project-field input { width: min(30vw,360px); height: 43px; padding: 0 12px; border: 1px solid var(--app-line); border-radius: 6px; background: #fff; font-size: 13px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.button { min-height: 39px; padding: 0 13px; border: 1px solid var(--app-line); border-radius: 5px; background: #fff; font-size: 10px; font-weight: 800; }
.button:hover { border-color: var(--app-accent); }
.button.primary { color: #fff; border-color: var(--app-accent-dark); background: var(--app-accent-dark); box-shadow: 0 5px 14px rgba(48,74,83,.18); }
.button.quiet { color: var(--app-muted); background: transparent; }
.button.compact { min-height: 33px; padding-inline: 9px; font-size: 9px; }
.button.wide { width: 100%; }
.file-button { position: relative; display: inline-grid; place-items: center; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.text-button { padding: 4px 0; border: 0; color: var(--app-accent-dark); background: transparent; font-size: 10px; font-weight: 800; }
.mobile-label, .mobile-main-tabs, .mobile-resizer { display: none; }

.workspace { height: calc(100vh - 76px); display: grid; grid-template-columns: 335px minmax(430px,1fr) 310px; overflow: hidden; }
.editor-panel { min-height: 0; display: flex; flex-direction: column; background: #f5f7f6; }
.content-panel { border-right: 1px solid var(--app-line); }
.style-panel { border-left: 1px solid var(--app-line); }
.panel-heading { min-height: 80px; padding: 15px 17px; display: flex; align-items: flex-start; gap: 13px; border-bottom: 1px solid var(--app-line); background: rgba(255,255,255,.72); }
.panel-heading > span { margin-top: 4px; color: var(--app-accent); font: 800 10px/1 "DM Mono",monospace; }
.panel-heading h1 { margin: 0; font: 700 18px/1.2 "Noto Serif SC",serif; }
.panel-heading p { margin: 6px 0 0; color: var(--app-muted); font-size: 10px; }
.editor-scroll { flex: 1; min-height: 0; padding: 12px; overflow: auto; scrollbar-width: thin; }
.editor-card { margin-bottom: 10px; padding: 13px; border: 1px solid var(--app-line); border-radius: 7px; background: #fff; box-shadow: 0 4px 14px rgba(42,59,63,.035); }
.card-title { margin-bottom: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-title h2 { margin: 0; font: 700 15px/1.25 "Noto Serif SC",serif; }
.card-title p { margin: 5px 0 0; color: var(--app-muted); font-size: 9px; line-height: 1.45; }
.field { margin-bottom: 11px; display: grid; gap: 5px; }
.field:last-child { margin-bottom: 0; }
.field > span { color: #536166; font-size: 10px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--app-line); border-radius: 5px; background: #fff; }
.field input, .field select { height: 39px; padding: 0 10px; font-size: 12px; }
.field input[type="color"] { padding: 3px; }
.field textarea { min-height: 70px; padding: 9px 10px; resize: vertical; font-size: 12px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus, .project-field input:focus { border-color: var(--app-accent); box-shadow: 0 0 0 3px rgba(82,111,122,.11); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.check-field { min-height: 42px; margin-bottom: 8px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--app-line); border-radius: 5px; font-size: 10px; font-weight: 700; }
.check-field input { accent-color: var(--app-accent); }
.field-help { margin: 9px 0 0; color: var(--app-muted); font-size: 9px; line-height: 1.55; }
.add-actions, .window-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.window-buttons .button { flex: 1; min-width: 82px; }

.profile-editor, .wallpaper-editor { margin-bottom: 12px; display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 10px; align-items: center; }
.image-preview { display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--app-line); border-radius: 6px; color: var(--app-muted); background: #f8faf9; font: 700 9px/1 "DM Mono",monospace; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview { width: 78px; height: 78px; border-radius: 50%; }
.wallpaper-preview { width: 78px; height: 58px; }
.image-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }

.asset-list { display: grid; gap: 6px; }
.asset-row {
  min-height: 54px;
  padding: 7px;
  display: grid;
  grid-template-columns: 20px 42px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--app-line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}
.asset-row.active { border-color: var(--app-accent); background: #f0f5f5; box-shadow: inset 3px 0 var(--app-accent); }
.asset-row.system-layer { background: #f7f6f2; }
.asset-row.is-layer-dragging { border-color: var(--app-accent); background: #eef3f2; box-shadow: 0 10px 24px rgba(31,48,53,.18); opacity: .78; }
.layer-drag-handle { width: 20px; height: 38px; padding: 0; display: grid; place-content: center; gap: 3px; border: 0; color: var(--app-muted); background: transparent; cursor: grab; touch-action: none; }
.layer-drag-handle:active { cursor: grabbing; }
.layer-drag-handle span { width: 12px; height: 2px; display: block; border-radius: 2px; background: currentColor; }
.asset-thumb.system-thumb { color: var(--app-accent-dark); border: 1px solid var(--app-line); background: #e7ecea; font-size: 7px; }
.layer-rank { min-width: 24px; color: var(--app-muted); font: 700 8px/1 "DM Mono",monospace; text-align: center; }
.asset-thumb { width: 42px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 3px; color: #fff; background: var(--app-accent); font: 800 9px/1 "DM Mono",monospace; }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset-row strong, .asset-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-row strong { font-size: 10px; }
.asset-row span { margin-top: 4px; color: var(--app-muted); font-size: 8px; }
.row-actions { display: flex; gap: 3px; }
.row-actions button { width: 25px; height: 28px; padding: 0; border: 1px solid var(--app-line); border-radius: 4px; background: #fff; font-size: 10px; }
.empty-note { margin: 0; padding: 11px; color: var(--app-muted); border: 1px dashed var(--app-line); font-size: 10px; line-height: 1.55; text-align: center; }

.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.theme-button { min-height: 70px; padding: 8px; display: grid; grid-template-columns: 32px 1fr; gap: 8px; align-items: center; border: 1px solid var(--app-line); border-radius: 5px; background: #fff; text-align: left; }
.theme-button.active { border-color: var(--app-accent); box-shadow: inset 0 0 0 1px var(--app-accent); }
.theme-swatch { position: relative; width: 32px; height: 48px; overflow: hidden; border: 1px solid rgba(0,0,0,.16); border-radius: 2px; background: var(--swatch-desktop); }
.theme-swatch::after { content: ""; position: absolute; inset: auto 0 0; height: 9px; background: var(--swatch-bar); }
.theme-button strong, .theme-button small { display: block; }
.theme-button strong { font-size: 10px; }
.theme-button small { margin-top: 4px; color: var(--app-muted); font-size: 7px; line-height: 1.3; }

.preview-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #d8dddd; }
.preview-toolbar { min-height: 44px; padding: 5px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #c3cccc; background: rgba(255,255,255,.9); }
.preview-toolbar > div:first-child { display: flex; align-items: center; gap: 7px; }
.preview-toolbar strong { font-size: 10px; }
.preview-dot { width: 8px; height: 8px; margin-right: 26px; border-radius: 50%; background: var(--app-accent); box-shadow: 13px 0 #c59a6a,26px 0 #849b8c; }
.preview-actions { display: flex; gap: 4px; }
.preview-actions button { min-height: 30px; padding-inline: 8px; border: 1px solid var(--app-line); border-radius: 4px; background: #fff; font-size: 8px; font-weight: 700; }
.preview-viewport { flex: 1; min-height: 0; padding: 26px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.preview-stage { position: relative; margin: 0 auto; transform-origin: top left; }

.desktop-canvas {
  --os-desktop: #6e8895;
  --os-desktop-2: #394d59;
  --os-taskbar: rgba(27,40,48,.78);
  --os-panel: rgba(239,246,248,.9);
  --os-ink: #1f2c32;
  --os-muted: #60727a;
  --os-line: rgba(36,54,62,.28);
  --os-accent: #6ba3bc;
  --os-title: rgba(224,239,245,.74);
  position: relative;
  width: 1440px;
  height: 900px;
  overflow: hidden;
  color: var(--os-ink);
  background: linear-gradient(145deg,var(--os-desktop),var(--os-desktop-2));
  font-family: "Noto Sans SC","Microsoft YaHei",sans-serif;
  box-shadow: 0 28px 80px rgba(28,43,48,.28);
  isolation: isolate;
  user-select: none;
}
.desktop-canvas[data-theme="win95"] {
  --os-desktop: #2f7c7b; --os-desktop-2: #2f7c7b; --os-taskbar: #c0c0c0; --os-panel: #c0c0c0;
  --os-ink: #000; --os-muted: #404040; --os-line: #707070; --os-accent: #000080; --os-title: #000080;
  font-family: "DM Mono","Microsoft YaHei",monospace;
}
.desktop-canvas[data-theme="luna"] {
  --os-desktop: #6692bd; --os-desktop-2: #6ba46a; --os-taskbar: #245ac4; --os-panel: #f4f0dc;
  --os-ink: #162337; --os-muted: #58677a; --os-line: #4c6fa0; --os-accent: #2e65d2; --os-title: #2f70dc;
}
.desktop-canvas[data-theme="aero"] {
  --os-desktop: #7595a4; --os-desktop-2: #354c58; --os-taskbar: rgba(24,38,46,.76); --os-panel: rgba(242,248,250,.9);
  --os-ink: #1e2a30; --os-muted: #60737c; --os-line: rgba(39,61,70,.28); --os-accent: #6aa5bd; --os-title: rgba(221,238,244,.76);
}
.desktop-canvas[data-theme="modern"] {
  --os-desktop: #3d4654; --os-desktop-2: #1d2530; --os-taskbar: rgba(19,23,29,.92); --os-panel: #f3f4f4;
  --os-ink: #20272d; --os-muted: #6b757c; --os-line: #c1c7cb; --os-accent: #5b8fa1; --os-title: #e7eaec;
}
.desktop-canvas[data-theme="mac"] {
  --os-desktop: #b7b6ad; --os-desktop-2: #777b7d; --os-taskbar: rgba(237,237,232,.92); --os-panel: #f5f4ee;
  --os-ink: #1f2223; --os-muted: #6b6c68; --os-line: #8c8d88; --os-accent: #4e6f82; --os-title: #deddd7;
  font-family: "DM Mono","Noto Sans SC",monospace;
}
.desktop-canvas[data-theme="editorial"] {
  --os-desktop: #f2f0e9; --os-desktop-2: #f2f0e9; --os-taskbar: #111; --os-panel: #fff;
  --os-ink: var(--os-accent); --os-muted: #555; --os-line: var(--os-accent); --os-accent: #111; --os-title: var(--os-accent);
  font-family: "Noto Sans SC","Microsoft YaHei",sans-serif;
  background: #f2f0e9;
  box-shadow: none;
}

.desktop-wallpaper { position: absolute; inset: 0; z-index: 0; background-position: center; background-size: cover; }
.desktop-wallpaper.is-uncropped { background-size: contain; background-repeat: no-repeat; }
.desktop-wallpaper::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg,rgba(255,255,255,.09),transparent 46%,rgba(0,0,0,.08)); pointer-events: none; }
.desktop-canvas[data-theme="editorial"] .desktop-wallpaper::after { display: none; }
.desktop-grid { position: absolute; inset: 0; z-index: 1; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.35) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.35) 1px,transparent 1px); background-size: 48px 48px; pointer-events: none; }
.desktop-icons { position: absolute; left: 28px; top: 28px; z-index: 5; display: grid; gap: 20px; }
.desktop-icon { width: 94px; padding: 5px; border: 1px solid transparent; border-radius: 5px; color: #fff; background: transparent; text-shadow: 0 1px 3px rgba(0,0,0,.65); }
.desktop-icon:hover, .desktop-icon:focus-visible { border-color: rgba(255,255,255,.48); background: rgba(255,255,255,.14); outline: none; }
.desktop-icon > i { width: 52px; height: 48px; margin: 0 auto 7px; display: grid; place-items: center; filter: drop-shadow(0 3px 2px rgba(0,0,0,.25)); }
.desktop-icon span { display: block; font-size: 12px; line-height: 1.25; text-align: center; }
.desktop-icon.folder > i { position: relative; height: 36px; margin-top: 8px; border: 2px solid rgba(77,60,22,.7); border-radius: 3px; background: #e6c15a; }
.desktop-icon.folder > i::before { content: ""; position: absolute; left: 2px; top: -10px; width: 24px; height: 10px; border: 2px solid rgba(77,60,22,.7); border-bottom: 0; border-radius: 3px 3px 0 0; background: #d6ad42; }
.desktop-icon.settings > i { font-size: 45px; font-style: normal; line-height: 1; }
.desktop-canvas[data-theme="editorial"] .desktop-icon { color: var(--os-accent); text-shadow: none; }
.desktop-canvas[data-theme="editorial"] .desktop-icon:hover,
.desktop-canvas[data-theme="editorial"] .desktop-icon:focus-visible { border-color: var(--os-accent); border-radius: 0; background: #fff; }
.desktop-canvas[data-theme="editorial"] .desktop-icon > i { filter: none; }
.desktop-canvas[data-theme="editorial"] .desktop-icon.folder > i { border-color: var(--os-accent); border-radius: 0; background: #fff; }
.desktop-canvas[data-theme="editorial"] .desktop-icon.folder > i::before { border-color: var(--os-accent); border-radius: 0; background: #fff; }
.desktop-canvas:not(.show-icon-labels) .desktop-icon span { display: none; }

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  height: 58px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: var(--os-taskbar);
  border-top: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 -4px 18px rgba(0,0,0,.14);
  backdrop-filter: blur(14px);
}
.desktop-canvas[data-theme="win95"] .taskbar { height: 48px; color: #000; border-top: 2px solid #fff; box-shadow: inset 0 2px #fff; backdrop-filter: none; }
.desktop-canvas[data-theme="luna"] .taskbar { background: linear-gradient(#3475de,#164aaa); backdrop-filter: none; }
.desktop-canvas[data-theme="mac"] .taskbar { left: 28%; right: 28%; bottom: 12px; height: 62px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.65); border-radius: 16px; color: #222; }
.desktop-canvas[data-theme="editorial"] .taskbar { height: 52px; color: #fff; border-top: 2px solid var(--os-accent); background: var(--os-accent); box-shadow: none; backdrop-filter: none; }
.start-button, .task-button { height: 40px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.22); border-radius: 5px; color: inherit; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 700; }
.start-button { flex: 0 0 96px; width: 96px; min-width: 96px; justify-content: center; white-space: nowrap; }
.start-button > span:last-child { display: inline-block; line-height: 1; white-space: nowrap; word-break: keep-all; }
.start-button.active, .task-button.active { background: rgba(255,255,255,.2); }
.desktop-canvas[data-theme="win95"] .start-button, .desktop-canvas[data-theme="win95"] .task-button { height: 34px; border: 2px outset #e8e8e8; border-radius: 0; background: #c0c0c0; }
.desktop-canvas[data-theme="luna"] .start-button { padding-inline: 18px; border: 0; border-radius: 0 18px 18px 0; background: #3f8d32; font-style: italic; }
.desktop-canvas[data-theme="editorial"] .start-button,
.desktop-canvas[data-theme="editorial"] .task-button { height: 34px; border: 1px solid #fff; border-radius: 0; background: var(--os-accent); }
.desktop-canvas[data-theme="editorial"] .start-button.active,
.desktop-canvas[data-theme="editorial"] .task-button.active { color: var(--os-accent); background: #fff; }
.start-logo { flex: 0 0 18px; width: 18px; height: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.start-logo i { display: block; background: currentColor; }
.task-list { min-width: 0; display: flex; align-items: center; gap: 6px; }
.task-button { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taskbar-spacer { flex: 1; }
.task-status { color: inherit; font-size: 11px; opacity: .82; white-space: nowrap; }
.task-clock { min-width: 78px; text-align: right; }
.task-clock b, .task-clock span { display: block; }
.task-clock b { font: 600 13px/1 "DM Mono",monospace; }
.task-clock span { margin-top: 5px; font-size: 9px; opacity: .75; }

.os-window {
  position: absolute;
  z-index: var(--window-z,30);
  overflow: hidden;
  border: 1px solid var(--os-line);
  border-radius: 8px;
  color: var(--os-ink);
  background: var(--os-panel);
  box-shadow: 0 18px 48px rgba(10,22,27,.28);
  backdrop-filter: blur(18px);
}
.window-titlebar { height: 38px; padding: 0 9px 0 12px; display: flex; align-items: center; gap: 9px; color: var(--os-ink); background: var(--os-title); border-bottom: 1px solid var(--os-line); cursor: move; touch-action: none; }
.window-titlebar > i { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 3px; color: #fff; background: var(--os-accent); font: 800 9px/1 "DM Mono",monospace; font-style: normal; }
.window-titlebar strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.window-controls { margin-left: auto; display: flex; gap: 5px; }
.window-controls button, .fake-control { width: 23px; height: 20px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 3px; color: inherit; background: rgba(255,255,255,.35); font: 700 10px/1 "DM Mono",monospace; }
.window-controls button:last-child, .fake-control:last-child { color: #fff; background: #b75353; }
.desktop-canvas[data-theme="editorial"] .os-window { border: 2px solid var(--os-accent); border-radius: 0; background: #fff; box-shadow: none; backdrop-filter: none; }
.desktop-canvas[data-theme="editorial"] .window-titlebar { color: #fff; background: var(--os-accent); }
.desktop-canvas[data-theme="editorial"] .window-titlebar > i { color: var(--os-accent); border-radius: 0; background: #fff; }
.desktop-canvas[data-theme="editorial"] .window-controls button { color: #fff; border: 1px solid #fff; border-radius: 0; background: var(--os-accent); }
.desktop-canvas[data-theme="editorial"] .window-controls button:last-child { color: var(--os-accent); background: #fff; }
.window-body { height: calc(100% - 38px); overflow: auto; }
.window-explorer .window-body { display: grid; grid-template-columns: 150px 1fr; }
.explorer-sidebar { padding: 14px; border-right: 1px solid var(--os-line); background: rgba(255,255,255,.2); }
.explorer-sidebar b { display: block; color: var(--os-accent); font: 700 9px/1 "DM Mono",monospace; letter-spacing: .1em; }
.explorer-sidebar span { margin-top: 12px; display: block; font-size: 10px; }
.explorer-content { padding: 14px; }
.explorer-heading { display: flex; align-items: center; justify-content: space-between; }
.explorer-heading strong { font: 700 14px/1 "Noto Serif SC",serif; }
.explorer-heading span { color: var(--os-muted); font-size: 9px; }
.explorer-files { margin-top: 13px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.explorer-file { min-width: 0; padding: 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; text-align: center; }
.explorer-file:hover, .explorer-file.active { border-color: var(--os-accent); background: rgba(255,255,255,.35); }
.explorer-file i { height: 56px; display: grid; place-items: center; overflow: hidden; border-radius: 3px; color: #fff; background: var(--os-accent); font: 800 12px/1 "DM Mono",monospace; font-style: normal; }
.explorer-file img { width: 100%; height: 100%; object-fit: cover; }
.explorer-file span { margin-top: 7px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.explorer-empty { grid-column: 1 / -1; padding: 30px; color: var(--os-muted); border: 1px dashed var(--os-line); font-size: 11px; text-align: center; }

.window-settings .window-body { padding: 16px; }
.settings-title { margin: 0 0 12px; font: 700 16px/1 "Noto Serif SC",serif; }
.settings-theme-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.settings-theme { padding: 8px 5px; border: 1px solid var(--os-line); border-radius: 5px; background: rgba(255,255,255,.32); text-align: center; }
.settings-theme.active { border-color: var(--os-accent); box-shadow: inset 0 0 0 1px var(--os-accent); }
.settings-theme i { height: 44px; display: block; border: 1px solid rgba(0,0,0,.18); background: var(--setting-color); }
.settings-theme span { margin-top: 6px; display: block; font-size: 8px; }
.settings-frame-row { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--os-line); }
.settings-frame-row b { font-size: 10px; }
.settings-frame-row p { margin: 6px 0 0; color: var(--os-muted); font-size: 9px; line-height: 1.55; }

.start-menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 12px;
  bottom: 66px;
  z-index: var(--window-z,70);
  width: 520px;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--os-line);
  border-radius: 12px;
  color: var(--os-ink);
  background: var(--os-panel);
  box-shadow: 0 24px 70px rgba(8,19,23,.36);
  backdrop-filter: blur(22px);
}
.desktop-canvas[data-theme="win95"] .start-menu { bottom: 50px; width: 460px; border: 3px outset #e8e8e8; border-radius: 0; backdrop-filter: none; }
.desktop-canvas[data-theme="mac"] .start-menu { left: 50%; bottom: 86px; transform: translateX(-50%); }
.desktop-canvas[data-theme="editorial"] .start-menu { bottom: 60px; border: 2px solid var(--os-accent); border-radius: 0; background: #fff; box-shadow: none; backdrop-filter: none; }
.start-profile { padding: 24px; display: grid; grid-template-columns: 116px 1fr; gap: 20px; color: #fff; background: linear-gradient(135deg,var(--os-accent),color-mix(in srgb,var(--os-accent) 55%,#17252c)); }
.desktop-canvas[data-theme="editorial"] .start-profile { color: #fff; background: var(--os-accent); }
.desktop-canvas[data-theme="editorial"] .start-avatar { border-color: #fff; border-radius: 0; background: var(--os-accent); }
.start-avatar { width: 116px; height: 116px; display: grid; place-items: center; overflow: hidden; border: 3px solid rgba(255,255,255,.7); border-radius: 18px; background: rgba(255,255,255,.16); font: 800 24px/1 "Noto Serif SC",serif; }
.start-avatar img { width: 100%; height: 100%; object-fit: cover; }
.start-avatar img.is-uncropped,.image-preview img.is-uncropped { object-fit: contain; background: repeating-linear-gradient(135deg,#edf1f2 0 8px,#dfe5e7 8px 16px); }
.desktop-canvas[data-theme="win95"] .start-avatar { border-radius: 0; }
.start-profile-copy span { font: 700 9px/1 "DM Mono",monospace; letter-spacing: .12em; opacity: .78; }
.start-profile-copy h2 { margin: 10px 0 4px; font: 700 28px/1.2 "Noto Serif SC",serif; }
.start-profile-copy strong { font-size: 11px; }
.start-profile-copy p { margin: 14px 0 0; font: 500 12px/1.65 "Noto Serif SC",serif; }
.start-content { padding: 20px 24px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.character-summary { grid-column: 1 / -1; margin: 0; color: var(--os-muted); font-size: 11px; line-height: 1.75; }
.character-facts { display: grid; gap: 9px; }
.character-fact { padding-bottom: 8px; border-bottom: 1px solid var(--os-line); }
.character-fact span, .character-fact b { display: block; }
.character-fact span { color: var(--os-muted); font: 700 8px/1 "DM Mono",monospace; letter-spacing: .1em; }
.character-fact b { margin-top: 5px; font-size: 11px; }
.character-tags { align-content: start; display: flex; flex-wrap: wrap; gap: 6px; }
.character-tags span { padding: 7px 9px; border: 1px solid var(--os-line); border-radius: 999px; background: rgba(255,255,255,.25); font-size: 9px; white-space: nowrap; }
.desktop-canvas[data-theme="win95"] .character-tags span { border-radius: 0; }
.desktop-canvas[data-theme="editorial"] .character-tags span,
.desktop-canvas[data-theme="editorial"] .start-recent-list > div { border-radius: 0; background: #fff; }
.desktop-canvas[data-theme="editorial"] .start-archive { background: #fff; }
.desktop-canvas[data-theme="editorial"] .explorer-sidebar,
.desktop-canvas[data-theme="editorial"] .settings-theme,
.desktop-canvas[data-theme="editorial"] .start-content,
.desktop-canvas[data-theme="editorial"] .start-footer { background: #fff; }
.desktop-canvas[data-theme="editorial"] .settings-theme { border-radius: 0; }
.desktop-canvas[data-theme="editorial"] .settings-theme.active { color: #fff; background: var(--os-accent); box-shadow: none; }
.start-archive { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--os-line); background: rgba(255,255,255,.16); }
.start-archive-head { display: flex; align-items: center; justify-content: space-between; color: var(--os-muted); font: 700 8px/1 "DM Mono",monospace; letter-spacing: .08em; }
.start-archive-head b { color: var(--os-accent); font-size: 8px; }
.start-recent-list { margin-top: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.start-recent-list > div { min-width: 0; padding: 9px; display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 4px 6px; border: 1px solid var(--os-line); border-radius: 5px; background: rgba(255,255,255,.22); }
.start-recent-list span { grid-row: 1 / 3; align-self: center; color: var(--os-accent); font: 700 13px/1 "DM Mono",monospace; }
.start-recent-list b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.start-recent-list em { color: var(--os-muted); font: 700 7px/1 "DM Mono",monospace; font-style: normal; }
.start-system-strip { margin-top: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--os-line); }
.start-system-strip > span { min-width: 0; padding: 8px 9px; border-right: 1px solid var(--os-line); }
.start-system-strip > span:last-child { border-right: 0; }
.start-system-strip small, .start-system-strip b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-system-strip small { color: var(--os-muted); font: 700 7px/1 "DM Mono",monospace; }
.start-system-strip b { margin-top: 5px; font: 700 9px/1 "DM Mono",monospace; }
.desktop-canvas[data-theme="win95"] .start-recent-list > div, .desktop-canvas[data-theme="win95"] .start-system-strip { border-radius: 0; }
.start-footer { padding: 12px 18px; display: flex; justify-content: space-between; border-top: 1px solid var(--os-line); color: var(--os-muted); font: 700 9px/1 "DM Mono",monospace; }

.desktop-item {
  position: absolute;
  z-index: var(--item-z,10);
  left: var(--item-x);
  top: var(--item-y);
  width: var(--item-width);
  opacity: var(--item-opacity,1);
  transform: rotate(var(--item-rotation,0deg));
  transform-origin: center;
  touch-action: none;
  cursor: move;
}
.desktop-item.text-item { height: var(--item-height,125px); }
.desktop-item .item-frame { width: 100%; overflow: hidden; border: 1px solid var(--os-line); border-radius: 7px; background: var(--os-panel); box-shadow: 0 15px 38px rgba(9,22,27,.25); }
.desktop-item.text-item .item-frame { height: 100%; }
.desktop-item .item-titlebar { height: 32px; padding: 0 7px 0 10px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--os-line); background: var(--os-title); }
.desktop-item .item-titlebar strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.desktop-item .item-controls { margin-left: auto; display: flex; gap: 4px; }
.desktop-item .item-content { width: 100%; min-height: 44px; overflow: hidden; }
.desktop-item.image-item .item-content img { width: 100%; height: auto; display: block; pointer-events: none; }
.desktop-item.text-item .item-content { height: calc(100% - 32px); min-height: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--item-color,#253137); font-family: var(--item-font,"Noto Sans SC",sans-serif); font-size: var(--item-font-size,22px); line-height: 1.55; text-align: var(--item-text-align,left); }
.desktop-item.style-note .item-content { color: var(--item-color,#493d27); background: var(--item-background,#f4dc86); font-family: var(--item-font,"Noto Serif SC",serif); }
.desktop-item.style-terminal .item-content { color: var(--item-color,#c4efcc); background: #17231d; font-family: var(--item-font,"DM Mono",monospace); }
.desktop-item.style-document .item-content { color: var(--item-color,#2c2c2b); background: #faf8f0; font-family: var(--item-font,"Noto Serif SC",serif); }
.desktop-item.style-plain .item-content { padding: 0; color: var(--item-color,#fff); background: transparent; font-family: var(--item-font,"Noto Serif SC",serif); font-size: var(--item-font-size,38px); font-weight: var(--item-font-weight,700); line-height: 1.25; text-shadow: 0 3px 12px rgba(0,0,0,.25); }
.desktop-item.no-frame .item-frame { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.desktop-item.no-frame .item-titlebar { display: none; }
.desktop-item.text-item.no-frame .item-content { height: 100%; }
.desktop-item.no-frame.image-item .item-content { background: transparent; }
.desktop-item.frame-win95 .item-frame, .os-window.frame-win95 { border: 3px outset #e7e7e7; border-radius: 0; background: #c0c0c0; backdrop-filter: none; }
.desktop-item.frame-win95 .item-titlebar, .os-window.frame-win95 .window-titlebar { height: 31px; color: #fff; background: #000080; border: 0; }
.desktop-item.frame-win95 .fake-control, .os-window.frame-win95 .window-controls button { color: #000; border: 2px outset #eee; border-radius: 0; background: #c0c0c0; }
.desktop-item.frame-luna .item-frame, .os-window.frame-luna { border: 3px solid #2c62bd; border-radius: 8px 8px 4px 4px; background: #f5f0dd; }
.desktop-item.frame-luna .item-titlebar, .os-window.frame-luna .window-titlebar { color: #fff; background: linear-gradient(#4a86ed,#1c58bd); border: 0; }
.desktop-item.frame-aero .item-frame, .os-window.frame-aero { border: 1px solid rgba(255,255,255,.68); background: rgba(234,244,248,.83); box-shadow: 0 18px 45px rgba(10,28,36,.3),inset 0 0 0 1px rgba(36,76,94,.28); backdrop-filter: blur(20px); }
.desktop-item.frame-aero .item-titlebar, .os-window.frame-aero .window-titlebar { background: linear-gradient(rgba(255,255,255,.58),rgba(174,207,221,.48)); }
.desktop-item.frame-modern .item-frame, .os-window.frame-modern { border: 1px solid #aeb7bc; border-radius: 4px; background: #f5f6f6; }
.desktop-item.frame-modern .item-titlebar, .os-window.frame-modern .window-titlebar { background: #e8ebed; }
.desktop-item.frame-mac .item-frame, .os-window.frame-mac { border: 1px solid #777; border-radius: 8px; background: #f4f3ed; }
.desktop-item.frame-mac .item-titlebar, .os-window.frame-mac .window-titlebar { justify-content: flex-end; background: #deddd7; }
.desktop-item.frame-mac .item-titlebar strong, .os-window.frame-mac .window-titlebar strong { order: 2; margin-right: auto; }
.desktop-item.frame-mac .item-controls, .os-window.frame-mac .window-controls { order: -1; margin-left: 0; margin-right: 8px; }
.desktop-item.frame-mac .fake-control, .os-window.frame-mac .window-controls button { width: 12px; height: 12px; overflow: hidden; border-radius: 50%; color: transparent; background: #d65b57; }
.desktop-item.frame-mac .fake-control:nth-child(2), .os-window.frame-mac .window-controls button:nth-child(2) { background: #d9a83f; }
.desktop-item.frame-mac .fake-control:nth-child(3), .os-window.frame-mac .window-controls button:nth-child(3) { background: #5fac62; }
.desktop-item.frame-editorial .item-frame, .os-window.frame-editorial { border: 2px solid var(--os-accent); border-radius: 0; background: #fff; box-shadow: none; backdrop-filter: none; }
.desktop-item.frame-editorial .item-titlebar, .os-window.frame-editorial .window-titlebar { color: #fff; background: var(--os-accent); border-color: var(--os-accent); }
.desktop-item.frame-editorial .item-titlebar > i, .os-window.frame-editorial .window-titlebar > i { color: var(--os-accent); border-radius: 0; background: #fff; }
.desktop-item.frame-editorial .fake-control, .os-window.frame-editorial .window-controls button { color: #fff; border: 1px solid #fff; border-radius: 0; background: var(--os-accent); }
.desktop-item.frame-editorial .fake-control:last-child, .os-window.frame-editorial .window-controls button:last-child { color: var(--os-accent); background: #fff; }
.desktop-canvas[data-theme="editorial"] .desktop-item.style-plain .item-content { color: var(--item-color,#111); text-shadow: none; }
.desktop-canvas[data-theme="editorial"] .desktop-item.style-note .item-content { color: var(--item-color,#111); border: 1px solid var(--os-accent); background: var(--item-background,#fff); }
.desktop-canvas[data-theme="editorial"] .desktop-item.style-document .item-content { color: var(--item-color,#111); border: 1px solid var(--os-accent); background: #fff; }
.desktop-canvas[data-theme="editorial"] .desktop-item.style-terminal .item-content { color: var(--item-color,#fff); border: 1px solid var(--os-accent); background: var(--os-accent); }
.desktop-canvas[data-theme="editorial"] .desktop-item.is-selected::after,
.desktop-canvas[data-theme="editorial"] .transform-handle { box-shadow: none; }

.desktop-item.is-selected::after { content: ""; position: absolute; inset: -7px; border: 2px dashed #fff; box-shadow: 0 0 0 1px var(--os-accent),0 0 0 4px rgba(0,0,0,.18); pointer-events: none; }
.transform-handle { position: absolute; z-index: 4; width: 22px; height: 22px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--os-accent); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.desktop-item:not(.is-selected) .transform-handle { display: none; }
.resize-handle { right: -16px; bottom: -16px; cursor: nwse-resize; }
.rotate-handle { left: 50%; top: -39px; transform: translateX(-50%); cursor: grab; }
.rotate-handle::after { content: ""; position: absolute; left: 50%; top: 19px; width: 1px; height: 19px; background: #fff; }
.desktop-canvas.is-exporting .desktop-item.is-selected::after,
.desktop-canvas.is-exporting .transform-handle { display: none; }
.desktop-canvas.is-exporting .desktop-item { cursor: default; }
.desktop-canvas.is-exporting { transform: none !important; transform-origin: top left !important; box-shadow: none !important; }
.desktop-canvas.is-exporting .taskbar,
.desktop-canvas.is-exporting .os-window,
.desktop-canvas.is-exporting .start-menu,
.desktop-canvas.is-exporting .desktop-item .item-frame { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.desktop-canvas.is-exporting[data-theme="aero"] .taskbar { background: rgba(24,38,46,.96); }
.desktop-canvas.is-exporting[data-theme="mac"] .taskbar { left: 403px; right: 403px; background: #edede8; }
.desktop-canvas.is-exporting[data-theme="mac"] .start-menu { left: 460px; transform: none; }

.tour-overlay { position: fixed; inset: 0; z-index: 700; }
.tour-blocker { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: default; }
.tour-focus { position: fixed; z-index: 1; border: 3px solid var(--app-accent); border-radius: 8px; box-shadow: 0 0 0 9999px rgba(24,32,35,.74),0 0 0 6px rgba(82,111,122,.24); pointer-events: none; transition: left .22s ease,top .22s ease,width .22s ease,height .22s ease; }
.tour-card { position: fixed; z-index: 2; width: min(350px,calc(100vw - 24px)); padding: 18px; border: 1px solid var(--app-line); border-radius: 8px; background: var(--app-paper); box-shadow: 0 24px 72px rgba(15,26,30,.34); }
.tour-card > header { display: flex; align-items: center; justify-content: space-between; }
.tour-card > header span { color: var(--app-accent-dark); font: 800 10px/1 "DM Mono",monospace; letter-spacing: .14em; }
.tour-card > header button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--app-line); border-radius: 50%; background: #fff; color: var(--app-ink); font-size: 20px; line-height: 1; }
.tour-card h2 { margin: 15px 0 8px; font: 700 22px/1.25 "Noto Serif SC",serif; }
.tour-card p { margin: 0; color: var(--app-muted); font-size: 13px; line-height: 1.75; }
.tour-card > footer { margin-top: 18px; padding-top: 14px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--app-line); }
.tour-card > footer .button { min-width: 92px; }
.tour-card > footer .button:disabled { opacity: .38; cursor: not-allowed; }
body.tour-open { overflow: hidden; }

.avatar-crop-modal { position: fixed; inset: 0; z-index: 620; display: grid; place-items: center; padding: 18px; }
.avatar-crop-backdrop { position: absolute; inset: 0; background: rgba(24,32,35,.76); backdrop-filter: blur(7px); }
.avatar-crop-dialog { position: relative; z-index: 1; width: min(94vw,520px); max-height: calc(100dvh - 24px); overflow: auto; padding: 18px; border: 1px solid var(--app-line); border-radius: 8px; background: var(--app-paper); box-shadow: 0 28px 90px rgba(0,0,0,.4); }
.avatar-crop-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.avatar-crop-dialog > header span { color: var(--app-accent-dark); font: 800 9px/1 "DM Mono",monospace; letter-spacing: .16em; }
.avatar-crop-dialog > header h2 { margin: 6px 0 0; font: 700 21px/1.2 "Noto Serif SC",serif; }
.avatar-crop-dialog > header button { width: 32px; height: 32px; border: 1px solid var(--app-line); border-radius: 4px; background: #fff; font-size: 20px; }
.avatar-crop-stage { position: relative; width: min(76vw,400px); aspect-ratio: 1; margin: 18px auto 13px; overflow: hidden; border: 8px solid #eef2f2; border-radius: 50%; outline: 1px solid var(--app-line); background: #dce3e4; cursor: grab; touch-action: none; }
.avatar-crop-stage.is-wallpaper { border-radius: 5px; }
.avatar-crop-stage:active { cursor: grabbing; }
.avatar-crop-stage::after { content: ""; position: absolute; inset: 0; z-index: 2; border: 2px solid rgba(255,255,255,.9); border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(30,50,56,.28); pointer-events: none; }
.avatar-crop-stage canvas { width: 100%; height: 100%; display: block; user-select: none; pointer-events: none; }
.avatar-crop-dialog > p { margin: 0 0 14px; color: var(--app-muted); font-size: 10px; line-height: 1.5; text-align: center; }
.avatar-crop-range { display: block; }
.avatar-crop-range span { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; }
.avatar-crop-range input { width: 100%; margin-top: 8px; accent-color: var(--app-accent); }
.avatar-crop-dialog > footer { margin-top: 15px; padding-top: 12px; display: grid; grid-template-columns: auto 1fr auto auto; gap: 7px; border-top: 1px solid var(--app-line); }
body.avatar-crop-open { overflow: hidden; }

.toast { position: fixed; left: 50%; bottom: 18px; z-index: 320; padding: 10px 14px; transform: translate(-50%,12px); border-radius: 5px; color: #fff; background: #27363b; box-shadow: 0 8px 30px rgba(0,0,0,.24); font-size: 11px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

body.focus-mode { height: 100dvh; overflow: hidden; background: #101416; }
body.focus-mode .topbar, body.focus-mode .editor-panel, body.focus-mode .mobile-resizer, body.focus-mode .preview-toolbar { display: none !important; }
body.focus-mode .workspace { position: fixed; inset: 0; width: 100vw; height: 100dvh; display: block; overflow: hidden; background: #101416; }
body.focus-mode .preview-panel { width: 100%; height: 100%; display: flex; border: 0; background: #101416; }
body.focus-mode .preview-viewport { flex: 1; padding: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
body.focus-mode .preview-stage { flex: none; margin: 0; }
body.focus-mode .desktop-item.is-selected::after, body.focus-mode .transform-handle { display: none; }
body.focus-mode .desktop-item { cursor: default; }
.focus-toolbar { position: fixed; top: max(14px,env(safe-area-inset-top)); right: max(14px,env(safe-area-inset-right)); z-index: 500; padding: 7px 8px 7px 12px; display: none; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.28); border-radius: 7px; color: #fff; background: rgba(17,25,29,.82); box-shadow: 0 12px 34px rgba(0,0,0,.3); font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .18s,transform .18s; backdrop-filter: blur(10px); }
.focus-toolbar button { min-height: 31px; padding: 0 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; color: #fff; background: rgba(255,255,255,.12); font-size: 10px; font-weight: 800; }
body.focus-mode .focus-toolbar { display: flex; }
body.focus-mode.focus-controls-visible .focus-toolbar { opacity: 1; pointer-events: auto; transform: translateY(0); }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 310px minmax(400px,1fr) 285px; }
  .brand { min-width: 210px; }
  .project-field { display: none; }
  .desktop-action { display: none; }
}

@media (max-width: 900px) {
  html { height: 100%; overflow: hidden; }
  body { height: 100dvh; overflow: hidden; }
  .topbar { height: calc(58px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); padding-inline: max(9px,env(safe-area-inset-left)); }
  .brand { min-width: 0; }
  .brand-mark { width: 36px; height: 36px; padding: 7px; box-shadow: 3px 3px 0 #c0cdd0; }
  .brand b { font-size: 14px; }
  .brand small { display: none; }
  .top-actions { gap: 4px; }
  .top-actions .button { min-height: 40px; padding-inline: 10px; font-size: 11px; }
  .desktop-label { display: none; }
  .mobile-label { display: inline; }
  .workspace { position: relative; height: calc(100dvh - 58px - env(safe-area-inset-top)); display: grid; grid-template-columns: 1fr; grid-template-rows: var(--mobile-preview-height) 18px minmax(0,1fr); }
  .preview-panel { position: relative; z-index: 0; grid-column: 1; grid-row: 1; }
  .preview-toolbar { min-height: 42px; padding: 4px 6px; }
  .preview-toolbar > div:first-child strong { display: none; }
  .preview-actions { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .preview-actions button { min-width: 0; padding-inline: 2px; font-size: 8px; }
  .preview-viewport { padding: 0; overflow: hidden; scrollbar-width: none; }
  .mobile-resizer { grid-column: 1; grid-row: 2; position: relative; z-index: 20; width: 100%; height: 18px; min-height: 0; padding: 0; outline: none; display: grid; place-items: center; border-block: 1px solid var(--app-line); background: #fff; cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
  .mobile-resizer span { width: 48px; height: 4px; border-radius: 5px; background: #91a6ad; }
  .editor-panel { position: relative; z-index: 0; grid-column: 1; grid-row: 3; min-height: 0; display: none; border: 0; overflow: hidden; }
  body[data-mobile-panel="content"] .content-panel, body[data-mobile-panel="style"] .style-panel { display: flex; }
  .mobile-main-tabs { position: sticky; top: 0; z-index: 12; height: 46px; flex: none; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--app-line); background: #fff; }
  .mobile-main-tabs button { border: 0; border-right: 1px solid var(--app-line); color: var(--app-muted); background: #fff; font-size: 12px; font-weight: 800; }
  .mobile-main-tabs button.active { color: var(--app-accent-dark); background: #edf3f4; box-shadow: inset 0 -3px var(--app-accent); }
  .panel-heading { display: none; }
  .editor-scroll { padding: 10px 10px calc(24px + env(safe-area-inset-bottom)); }
  .editor-card { padding: 14px; }
  .card-title h2 { font-size: 17px; }
  .card-title p { font-size: 12px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .field > span { font-size: 12px; }
  .field input, .field select { height: 46px; font-size: 14px; }
  .field textarea { min-height: 92px; font-size: 14px; }
  .button.compact { min-height: 40px; font-size: 12px; }
  .asset-row { min-height: 62px; }
  .asset-row strong { font-size: 13px; }
  .asset-row span { font-size: 11px; }
  .theme-button { min-height: 80px; }
  .theme-button strong { font-size: 13px; }
  .theme-button small { font-size: 10px; }
  .tour-focus { border-radius: 5px; }
  .tour-card { left: 10px !important; right: 10px; top: auto !important; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; padding: 16px; }
  .tour-card h2 { font-size: 20px; }
  .tour-card > footer .button { min-height: 42px; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
body.mobile-resizing { user-select: none; -webkit-user-select: none; }
