body { background:#fafafa; color:#242526; }
.auth-card { max-width:420px; margin:clamp(56px,18vh,160px) auto; padding:28px; }
.auth-card .brand { padding:0; margin-bottom:44px; }
.auth-card h1,.panel h1 { font-size:clamp(28px,3vw,40px); font-weight:550; letter-spacing:-.05em; }
.auth-card label,dialog label,.panel>label { display:block; font-size:13px; font-weight:550; }
.auth-card input,dialog input,dialog textarea,#queue-filter { border-radius:9px; }
.auth-card button,dialog button,.panel>button { margin-top:16px; }
.workspace-switcher { position:relative; min-width:0; margin:26px 0 8px; }
.sidebar-caption { display:block; margin:0 0 4px; padding:0 8px; color:var(--muted); font-size:12px; line-height:1.5; font-weight:500; }
#workspace { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:44px; padding:6px 8px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--ink); text-align:left; font-size:15px; font-weight:600; line-height:1.35; }
#workspace:hover,#workspace[aria-expanded="true"] { background:var(--pale); }
#workspace-current,.workspace-menu button { overflow-wrap:anywhere; }
.workspace-chevron { flex:none; width:8px; height:8px; margin:0 4px 4px; border:solid var(--muted); border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
#workspace[aria-expanded="true"] .workspace-chevron { margin:4px 4px 0; transform:rotate(225deg); }
.workspace-menu { position:absolute; z-index:10; top:100%; inset-inline:0; padding:4px; background:#fff; border:1px solid var(--line-strong); border-radius:10px; box-shadow:0 6px 22px #0002; }
#workspace-choices { max-height:min(38vh,300px); overflow:auto; }
.workspace-menu button { display:flex; gap:6px; align-items:center; justify-content:space-between; width:100%; min-height:44px; padding:8px; border:0; border-radius:6px; background:transparent; color:var(--ink); font-size:13px; line-height:1.35; text-align:left; }
.workspace-menu button:hover,.workspace-menu button:focus-visible { background:var(--pale); }
.workspace-menu button:focus-visible { outline-offset:-2px; }
.workspace-menu [aria-current="true"] { font-weight:600; }
.workspace-menu [aria-current="true"]::after { content:''; flex:none; width:5px; height:10px; margin:0 5px 3px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
#add-workspace { margin-top:4px; border-top:1px solid var(--line); border-radius:0 0 6px 6px; font-weight:550; }
body #studio .sidebar .new-job { justify-content:center; min-height:44px; margin:8px 0 12px; padding:8px 10px; border:0; border-radius:9px; background:#262626; color:white; font-size:13px; font-weight:550; text-align:center; }
body #studio .sidebar .new-job:hover { background:#101010; }
#jobs-label { margin-top:16px; }
.user-nav { display:flex; flex-wrap:wrap; gap:8px; align-items:center; border-top:1px solid #ddd; padding:14px 0; margin-top:auto; }
.account-info { flex:1 1 100%; min-width:0; font-size:12px; line-height:1.4; }
.account-info span { display:block; overflow-wrap:anywhere; color:#595959; }
.link { background:none; border:0; color:inherit; text-decoration:underline; padding:10px 5px; }
.panel { max-width:960px; margin:auto; padding:clamp(32px,8vw,88px) clamp(20px,6vw,64px); overflow-wrap:anywhere; }
.panel p,.panel li,.auth-card p { line-height:1.6; }
.panel h2 { margin:32px 0 12px; font-size:19px; }
.panel h1 { margin:14px 0; }
.panel .instructions { white-space:pre-wrap; }
.panel ol { padding-left:20px; }
.panel li { margin:5px 0; }
.panel a { text-decoration:underline; }
.render { width:100%; max-height:420px; object-fit:contain; background:#eee; border-radius:12px; }
.record { display:block; width:100%; padding:16px 0; text-align:left; background:none; color:inherit; border:0; border-bottom:1px solid #ddd; overflow-wrap:anywhere; }
.record small { display:block; margin-top:5px; color:#595959; }
.badge { display:inline-block; white-space:normal; }
.badge.delivered { background:#e9f5ed; color:#175433; }
#queue-filter { max-width:285px; }
#decision-error { color:#a22; }
#details time { color:#666; font-size:12px; }
#details button:disabled { cursor:default; }
dialog { max-width:min(430px,92vw); }
@media (max-width:720px) {
  #studio .sidebar { position:static; display:flex; flex-flow:row wrap; width:auto; gap:8px; align-items:center; padding:12px 16px; }
  #studio .sidebar .brand { margin-right:auto; }
  #studio .sidebar .workspace-switcher { width:100%; margin:0; }
  #studio .sidebar #jobs-label { display:none; }
  #studio .user-nav { width:100%; min-width:0; border:0; margin:0; padding:0; }
  #studio .account-info { flex:1 1 120px; }
  #studio .sidebar .projects-toggle,#studio .sidebar .new-job { display:block; min-height:44px; margin:0; font-size:13px; }
  #studio .sidebar .projects-toggle { border:1px solid #ccc; border-radius:9px; background:#fff; }
  #studio .sidebar #jobs { display:none; }
  #studio .sidebar .projects-toggle[aria-expanded="true"] ~ #jobs { display:block; width:100%; flex:none; max-height:35vh; padding:0; margin:0; overflow:auto; }
  #studio main { margin-left:0; }
}

.auth-card .google-signin { display:block; padding:12px 16px; margin-bottom:26px; text-align:center; border:1px solid #333; background:#252525; color:white; border-radius:9px; font-weight:550; text-decoration:none; }
.auth-card .google-signin[hidden] { display:none; }
.auth-card .google-signin:focus-visible { outline:2px solid #4274b9; outline-offset:3px; }
