/* Shared editor chrome. Tool canvases and content remain purpose-specific. */
.aw-page { --aw-accent:#b582ec; --aw-line:#513960; width:min(1640px,calc(100% - 32px)); margin:24px auto 44px; color:#f6effc; font:14px/1.5 system-ui,sans-serif; }
.aw-page *, .aw-page *::before, .aw-page *::after { box-sizing:border-box; }
.aw-page [hidden] { display:none!important; }
.aw-page button, .aw-page input, .aw-page select, .aw-page textarea { font:inherit; }
.aw-page h1, .aw-page h2, .aw-page h3 { font-family:inherit; }
.aw-hero { display:grid; grid-template-columns:minmax(0,1fr) 250px; gap:32px; padding:32px; margin-bottom:24px; border:1px solid #74548c; border-radius:20px; background:radial-gradient(ellipse at 90% 20%,#68448655,transparent 65%),linear-gradient(125deg,#30213f,#191322); }
.aw-eyebrow { display:block; margin-bottom:12px; color:#dbb4ff; font-size:11px; letter-spacing:.15em; font-weight:750; }
.aw-hero h1 { margin:0 0 12px; font-size:clamp(25px,3vw,38px); line-height:1.25; }
.aw-hero p { max-width:850px; margin:0 0 17px; color:#d2c1df; line-height:1.8; }
.aw-tags { display:flex; flex-wrap:wrap; gap:8px; }
.aw-tags span { border:1px solid #624875; border-radius:20px; background:#21162e; padding:5px 11px; color:#e6cef8; font-size:11px; }
.aw-hero-art { align-self:center; border:1px solid #795594; border-radius:16px; padding:24px; background:#25182f; box-shadow:10px 10px 0 #41294e; color:#d6affb; font-size:30px; text-align:center; }
.aw-hero-art small { display:block; font-size:11px; margin-top:13px; letter-spacing:.12em; color:#c9aedb; }
.aw-workspace { position:relative; height:850px; min-height:650px; display:flex; flex-direction:column; overflow:hidden; border:1px solid #6d4b82; border-radius:15px; background:#140e1d; font-family:system-ui,sans-serif; }
.aw-projectbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:14px; background:linear-gradient(100deg,#35223f,#24192f); border-bottom:1px solid var(--aw-line); }
.aw-projectbar>label { flex:1 1 240px; max-width:380px; }
.aw-project-actions { margin-left:auto; display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.aw-page button, .aw-file { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:35px; padding:8px 12px; border:1px solid #664a7b; border-radius:8px; background:#30213e; color:#f3eafa; font-size:12px; font-weight:600; line-height:1.3; cursor:pointer; text-decoration:none; }
.aw-page button:hover:not(:disabled), .aw-file:hover { background:#4a2f60; border-color:#c19be5; }
.aw-page button:disabled { cursor:default; opacity:.4; }
.aw-page .aw-primary { background:#8d55c6; color:white; border-color:#c69af1; }
.aw-page .aw-danger { color:#ffbfc9; border-color:#8a4a61; background:#3d2232; }
.aw-page :focus-visible { outline:3px solid #a9c9ff; outline-offset:2px; }
.aw-page label { display:flex; flex-direction:column; gap:6px; min-width:0; color:#cbb7dc; font-size:11px; }
.aw-page label.aw-check { flex-direction:row; align-items:center; gap:8px; }
.aw-page input:not([type=checkbox]):not([type=file]), .aw-page textarea, .aw-page select { width:100%; min-width:0; min-height:37px; padding:8px 10px; border:1px solid #654a79; border-radius:7px; background:#180f22; color:#f3e9fc; font-size:12px; color-scheme:dark; }
.aw-page input[type=color] { padding:3px!important; }
.aw-page textarea { min-height:90px; resize:vertical; line-height:1.6; }
.aw-page input[type=checkbox] { accent-color:#b77bea; }
.aw-file { position:relative; flex-direction:row!important; color:#f3eafa!important; overflow:hidden; }
.aw-file input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.aw-viewbar { display:flex; align-items:center; gap:10px; padding:9px 13px; background:#25192f; border-bottom:1px solid var(--aw-line); }
.aw-tabs { display:flex; gap:5px; overflow:auto; min-width:0; scrollbar-width:thin; }
.aw-tabs button { white-space:nowrap; background:transparent; border-color:transparent; }
.aw-tabs button.active { background:#593a72; border-color:#c592ef; }
.aw-viewbar>button:last-child { margin-left:auto; }
.aw-layout { position:relative; display:grid; grid-template-columns:205px minmax(0,1fr) 290px; min-height:0; flex:1; overflow:hidden; }
.aw-nav, .aw-properties { overflow:auto; padding:15px; scrollbar-width:thin; background:#21162c; min-width:0; }
.aw-nav { border-right:1px solid var(--aw-line); }
.aw-properties { border-left:1px solid var(--aw-line); }
.aw-layout>.aw-properties { display:flex; flex-direction:column; gap:12px; }
.aw-layout>.aw-properties>* { margin:0; flex-shrink:0; }
.aw-nav h3, .aw-properties h3 { margin:4px 0 14px; font-size:12px; }
.aw-nav>*, .aw-properties>* { margin-bottom:13px; }
.aw-nav>button { width:100%; }
.aw-nav .aw-item { display:flex; width:100%; text-align:left; justify-content:space-between; padding:13px 10px; background:#2a1d36; }
.aw-nav .aw-item.active { border-color:#c393ef; box-shadow:inset 3px 0 #be89ef; background:#453052; }
.aw-nav .aw-item span { text-overflow:ellipsis; overflow:hidden; white-space:nowrap; }
.aw-main { display:flex; flex-direction:column; overflow:auto; min-width:0; min-height:0; width:auto; max-width:none; margin:0; padding:0; scrollbar-width:thin; background:#140e1e; }
.aw-content { padding:23px; min-height:0; }
.aw-content>*+* { margin-top:16px; }
.aw-content h2 { margin:0 0 18px; font-size:20px; }
.aw-content h3 { margin:0 0 14px; font-size:15px; }
.aw-row { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.aw-row>label { flex:1 1 110px; }
.aw-row h2 { margin:0; flex:1; }
.aw-card { border:1px solid #533a66; border-radius:12px; padding:18px; background:#24172e; margin-bottom:16px; }
.aw-card h3 { margin:0 0 14px; font-size:14px; }
.aw-card>*+* { margin-top:12px; }
.aw-card>button { margin-right:8px; margin-bottom:8px; }
.aw-muted { color:#bda7ce; font-size:12px; line-height:1.7; }
.aw-notice { border:1px solid #654e80; border-radius:9px; padding:12px; background:#2c2040; color:#d5c5e5; font-size:12px; line-height:1.7; }
.aw-notice.error { border-color:#965568; color:#ffbdcd; background:#3c202f; }
.aw-notice.success { border-color:#4d8375; color:#b4ebd7; background:#183c36; }
.aw-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(115px,1fr)); gap:12px; margin:16px 0; }
.aw-metric { display:flex; flex-direction:column; gap:3px; padding:16px; border:1px solid #5d416d; border-radius:10px; background:#30213a; }
.aw-metric strong { color:#e6c3ff; font-size:25px; }
.aw-metric span { font-size:11px; color:#c6acd8; }
.aw-table-wrap { overflow:auto; max-height:440px; border:1px solid #563b6a; border-radius:9px; }
.aw-page table { width:100%; border-collapse:collapse; font-size:12px; }
.aw-page td, .aw-page th { padding:11px 12px; border-bottom:1px solid #473151; text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.aw-page th { position:sticky; top:0; background:#382343; color:#e0c9f1; }
.aw-page td { color:#d8c7e5; }
.aw-page pre { padding:18px; border:1px solid #51385e; border-radius:10px; background:#100a17; color:#dfc9f1; font:12px/1.7 ui-monospace,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.aw-status { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:9px 14px; border-top:1px solid var(--aw-line); background:#2c1e36; min-height:38px; font-size:11px; }
.aw-status [data-tone=error] { color:#ffb1c6; }
.aw-status [data-tone=success] { color:#b0e5cf; }
.aw-status [data-aw=status] { white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.aw-status label { font-size:10px; white-space:nowrap; }
.aw-dialog { width:min(660px,calc(100% - 25px)); max-height:85%; padding:20px; border:1px solid #b27ce0; border-radius:16px; background:#24162f; color:#f3e9fc; overflow:auto; }
.aw-dialog::backdrop { background:#09030dcc; backdrop-filter:blur(3px); }
.aw-dialog .aw-row h2 { font-size:20px; }
.aw-dialog-body { display:grid; gap:13px; padding:20px 0; }
.aw-dialog-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.aw-export-choice { justify-content:flex-start!important; padding:15px!important; }
.aw-close { margin-left:auto; }
.aw-guide { display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-top:24px; }
.aw-guide>article { border:1px solid #50315f; border-radius:15px; padding:25px; background:#21162b; }
.aw-guide h2 { margin:0 0 15px; font-size:19px; }
.aw-guide p, .aw-guide li { color:#c6b0d5; line-height:1.8; font-size:13px; }
.aw-guide li { padding:5px 0; }
.aw-workspace:fullscreen, .aw-workspace.aw-expanded { width:100vw; height:100dvh; min-height:0; max-width:none; border-radius:0; }
.aw-workspace.aw-expanded { position:fixed; inset:0; z-index:100000; }
.aw-properties:empty { display:none; }
@media (max-width:1200px) {
  .aw-layout { grid-template-columns:185px minmax(0,1fr); }
  .aw-layout>.aw-properties { display:none; position:absolute; z-index:30; top:0; right:0; bottom:0; width:300px; box-shadow:-20px 0 45px #0a041177; }
  .aw-props-open .aw-layout>.aw-properties:not(:empty) { display:flex; }
}
@media (max-width:800px) {
  .aw-page { width:calc(100% - 20px); margin-top:14px; }
  .aw-hero { grid-template-columns:1fr; padding:24px; }
  .aw-hero-art { display:none; }
  .aw-projectbar { padding:10px; }
  .aw-projectbar>label { flex:1 1 100%; max-width:none; }
  .aw-project-actions { margin:0; gap:5px; }
  .aw-project-actions button, .aw-project-actions .aw-file { padding:7px 9px; font-size:10px; min-height:33px; }
  .aw-workspace { height:min(900px,calc(100dvh - 20px)); min-height:640px; }
  .aw-layout { grid-template-columns:minmax(0,1fr); }
  .aw-nav { display:none; position:absolute; z-index:32; top:0; left:0; bottom:0; width:220px; box-shadow:20px 0 45px #0a041177; }
  .aw-nav-open .aw-nav { display:block; }
  .aw-layout>.aw-properties { width:min(300px,calc(100% - 24px)); }
  .aw-viewbar { flex-wrap:wrap; padding:7px; gap:6px; }
  .aw-tabs { order:3; width:100%; }
  .aw-tabs button { font-size:11px; padding:8px; }
  .aw-content { padding:14px; }
  .aw-guide { grid-template-columns:1fr; }
  .aw-status label { display:none; }
}
