.theme-trigger{flex-shrink:0;gap:8px;min-height:40px}
.theme-dot{width:15px;height:15px;border:1.5px solid currentColor;border-radius:50%;background:linear-gradient(90deg,var(--text) 50%,transparent 50%);display:inline-block;flex-shrink:0}
.login-form-wrap{position:relative}
.login-theme{position:absolute;top:24px;right:28px;z-index:3}
.appearance-dialog{width:min(700px,calc(100vw - 28px))}
.appearance-content{display:flex;flex-direction:column;gap:22px}
.theme-options{margin:0;padding:0;border:0;min-width:0}
.theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.theme-choice{position:relative;display:flex;flex-direction:column;min-width:0;padding:6px;border:1px solid var(--border);border-radius:12px;cursor:pointer;background:var(--surface);transition:border-color .15s}
.theme-choice:hover{border-color:var(--border-strong)}
.theme-choice.is-selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.theme-choice:focus-within{outline:2px solid var(--accent);outline-offset:4px}
.theme-choice input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.theme-choice-info{padding:12px 7px 8px;display:flex;flex-direction:column;gap:5px}
.theme-choice-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.theme-choice strong{font-size:14px;font-weight:600}
.theme-tag{font-size:10px;color:var(--muted);padding:1px 6px;border:1px solid var(--border);border-radius:4px;white-space:nowrap}
.theme-description{display:block;color:var(--muted);font-size:12px;line-height:1.6}
.theme-check{display:none;position:absolute;right:14px;top:14px;background:var(--accent);color:var(--accent-contrast);width:21px;height:21px;border-radius:50%;align-items:center;justify-content:center;box-shadow:0 0 0 3px var(--surface)}
.is-selected>.theme-check{display:flex}
.theme-preview{display:grid;grid-template-columns:44px minmax(0,1fr);height:132px;overflow:hidden;border:1px solid var(--border);border-radius:7px;background:var(--bg);pointer-events:none}
.preview-rail{display:flex;align-items:center;gap:9px;flex-direction:column;background:var(--sidebar);border-right:1px solid var(--border);padding:13px 7px 9px}
.preview-logo{width:12px;height:12px;border-radius:4px;background:var(--text);margin-bottom:1px;opacity:.8}
.preview-nav{width:24px;height:4px;border-radius:3px;background:var(--muted);opacity:.45}
.preview-nav.active{background:var(--accent);opacity:1;height:10px}
.preview-avatar{width:11px;height:11px;border-radius:50%;margin-top:auto;background:var(--avatar)}
.preview-workspace{display:flex;flex-direction:column;min-width:0}
.preview-top{display:flex;align-items:center;justify-content:space-between;height:24px;padding:0 11px;border-bottom:1px solid var(--border)}
.preview-top i:first-child{width:40px;height:4px;background:var(--text);border-radius:2px;opacity:.8}
.preview-top i:last-child{width:14px;height:5px;background:var(--muted);border-radius:2px;opacity:.5}
.preview-body{display:grid;grid-template-columns:40% minmax(0,1fr);flex:1;min-height:0}
.preview-controls{display:flex;flex-direction:column;padding:9px;gap:7px;border-right:1px solid var(--border)}
.preview-line{width:65%;height:3px;border-radius:2px;background:var(--muted);opacity:.7}
.preview-line.short{width:40%}
.preview-prompt{height:24px;border:1px solid var(--border);border-radius:4px;background:var(--prompt)}
.preview-field{height:9px;border:1px solid var(--border);border-radius:3px;background:var(--field)}
.preview-submit{height:11px;border-radius:3px;background:var(--accent);margin-top:auto}
.preview-canvas{display:flex;flex-direction:column;gap:9px;align-items:center;justify-content:center;padding:9px;background:var(--canvas-background)}
.preview-frame{display:grid;place-items:center;width:48px;height:48px;border:1px solid var(--border);border-radius:5px;color:var(--canvas-mark);background:var(--canvas)}
.preview-caption{width:38px;height:3px;background:var(--muted);border-radius:2px;opacity:.5}
.system-choice{flex-direction:row;align-items:center;gap:13px;margin-top:16px;padding:16px 44px 16px 16px}
.system-choice .theme-check{top:calc(50% - 10px)}
.system-symbol{width:27px;height:27px;border-radius:50%;background:linear-gradient(90deg,var(--text) 50%,var(--surface) 50%);border:1px solid var(--border-strong);flex-shrink:0}
.appearance-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid var(--border);padding-top:18px}
.appearance-footer .help{max-width:420px;font-size:12px}
.appearance-footer .button{min-width:80px}
.topbar>div:first-child{min-width:0}
.topbar h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar-right{flex-shrink:0}
/* The neutral workspaces use a flatter canvas, like the supplied references. */
[data-theme="graphite"] .canvas-surface,[data-theme="graphite"] .canvas-surface.has-images{border-radius:0;background:var(--canvas-background)}
[data-theme="graphite"] .canvas-surface .empty{background:var(--canvas);margin:24px;padding:26px;border:1px solid var(--border);border-radius:10px;min-height:260px}
[data-theme="graphite"] .canvas-surface .large-mark{color:var(--text)}
[data-theme="graphite"] .canvas-surface .empty-icon{border-radius:12px}
[data-theme="graphite"] .prompt-area textarea{border-radius:18px}
[data-theme="obsidian"] .canvas-surface,[data-theme="obsidian"] .panel,[data-theme="obsidian"] .card{border-radius:8px}
[data-theme="pearl"] .card,[data-theme="pearl"] .panel{box-shadow:0 2px 8px var(--shadow)}
.button.primary:hover{filter:brightness(.94)}
.card .fav-button.starred{color:#f1d36c}
.result-image,.card-media>img,.reference img,.detail-layout>img{filter:none}
@media(max-width:540px){
  .topbar-right{gap:6px}.topbar h1{font-size:19px}.topbar{gap:8px}
  .topbar-right .theme-trigger{width:36px;padding:8px}.topbar-right .theme-button-label{display:none}
  .login-theme{top:20px;right:20px}.login-form-wrap{padding-top:92px;padding-bottom:48px}
  .theme-grid{gap:10px}.theme-preview{height:106px;grid-template-columns:29px minmax(0,1fr)}
  .preview-rail{padding:10px 4px;gap:8px}.preview-nav{width:16px}
  .preview-controls{padding:6px;gap:5px}.preview-frame{width:34px;height:34px}
  .preview-top{height:21px;padding:0 6px}.preview-top i:first-child{width:29px}
  .preview-canvas{padding:5px}.theme-choice-info{padding:9px 3px 5px}
  .theme-choice-title{display:block}.theme-tag{display:none}.theme-description{font-size:11px}
  .theme-choice strong{font-size:13px}.appearance-content{gap:16px}
  .appearance-dialog .modal-body{padding:16px}.theme-check{right:10px;top:10px}
  .appearance-footer{gap:12px}.appearance-footer .button{min-width:68px}
  .admin-tabs{flex-wrap:wrap}
}
@media(max-width:359px){.theme-grid{grid-template-columns:1fr}.theme-preview{height:120px}}
