.panel[data-panel=automation]{width:620px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 166px)}
.automation-center{color:var(--text);font-size:.88rem;line-height:1.55;overflow-wrap:anywhere}
.automation-center h3{margin:0 0 12px;color:var(--text);font-size:1rem;font-weight:600}
.automation-center h4{margin:0 0 8px;font-size:.95rem;font-weight:600}
.automation-center p{margin:8px 0}
.automation-center button,.automation-center input,.automation-center select,.automation-center summary{min-height:44px}
.automation-center button{font-size:.82rem;white-space:normal}
.automation-center :focus-visible,.automation-hud :focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.automation-hero{padding:16px;border:1px solid rgba(79,224,176,.3);border-radius:18px;background:radial-gradient(500px 200px at 0 0,rgba(79,224,176,.18),transparent 70%),radial-gradient(500px 200px at 100% 100%,rgba(94,231,255,.12),transparent 70%),var(--surface)}
.automation-status{font-size:1.1rem;font-weight:600;color:var(--mint)}
.automation-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.automation-actions button{flex:1 1 110px}
.automation-hero .automation-actions{margin:12px 0}
.automation-hero #automation-start{background:linear-gradient(135deg,#3ee08f,#5ee7ff);color:#062016;border-color:transparent;font-weight:600}
.automation-hero #automation-recommended{background:var(--grad);color:#0b0d24;border-color:transparent;font-weight:600}
.automation-hero #automation-stop{background:rgba(255,122,122,.14);border-color:rgba(255,122,122,.45);color:#ffb3b3}
.automation-metrics{font-weight:600;color:var(--muted)}
.automation-runtime-queue{max-height:90px;overflow:auto}
.automation-note{font-size:.78rem;color:var(--muted)}
.automation-settings,.automation-queue,.automation-browser{margin-top:16px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.automation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.automation-field{display:flex;flex-direction:column;gap:5px;min-width:0;margin:0 0 10px;font-size:.8rem;color:var(--muted)}
.automation-field input,.automation-field select{width:100%;min-width:0}
.automation-field:has(input[type=checkbox]){flex-direction:row;align-items:center;justify-content:space-between;background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:8px 12px;color:var(--text)}
.automation-field input[type=checkbox],.automation-skill input{width:22px;height:22px;min-height:22px;flex-shrink:0;accent-color:var(--mint)}
.automation-skill{display:flex;align-items:center;gap:10px;min-height:44px;margin:6px 0}
.automation-details{margin-top:12px;border:1px solid var(--line);border-radius:14px;padding:0 12px;background:rgba(255,255,255,.03)}
.automation-details summary{cursor:pointer;align-content:center;font-size:.84rem;color:var(--muted);font-weight:600}
.automation-details[open]{padding-bottom:10px}
.automation-queue-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 0;border-bottom:1px solid var(--line)}
.automation-queue-row>span{flex:1 1 180px}
.automation-queue-row button{padding:5px 10px}
.automation-quest{margin-top:12px;border:1px solid var(--line);border-left:3px solid var(--mint);border-radius:14px;padding:12px 14px;background:rgba(255,255,255,.035)}
.automation-badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:.74rem;background:rgba(79,224,176,.14);color:var(--mint)}
.automation-quest[data-status=locked]{border-left-color:var(--gold)}
.automation-quest[data-status=locked] .automation-badge{background:rgba(255,207,110,.14);color:var(--gold)}
.automation-quest[data-status=unsupported]{border-left-color:var(--dim);opacity:.85}
.automation-quest[data-status=unsupported] .automation-badge{background:rgba(255,255,255,.08);color:var(--muted)}
.automation-quest[data-status=completed]{border-left-color:var(--cyan)}
.automation-quest[data-status=completed] .automation-badge{background:rgba(94,231,255,.14);color:var(--cyan)}
.automation-reason{color:#ffc4bd;font-size:.8rem}
.automation-requirements{padding-left:22px}

.automation-hud{position:fixed;z-index:26;left:max(12px,env(safe-area-inset-left));top:151px;width:310px;max-width:calc(100vw - 24px);display:flex;align-items:center;gap:6px;padding:6px;border-radius:16px}
.automation-hud button{min-height:42px;padding:5px 12px;font-size:.76rem;flex-shrink:0;border-radius:12px}
.automation-hud #automation-hud-open{flex:1;min-width:0;text-align:left;background:transparent;border-color:transparent;padding:4px 6px;color:var(--muted)}
.automation-hud-status{overflow-wrap:anywhere}
#automation-hud-status{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35}
.automation-hud[data-status=running]{border-color:rgba(79,224,176,.5);box-shadow:var(--shadow),0 0 24px -6px rgba(79,224,176,.5)}
.automation-hud[data-status=running] #automation-hud-open{color:var(--mint)}
#automation-hud-stop{background:rgba(255,122,122,.14);border-color:rgba(255,122,122,.4);color:#ffb3b3}

@media(max-width:750px){.automation-hud{top:196px;left:8px;width:300px}
.panel[data-panel=automation]{top:255px;right:8px;max-height:calc(100dvh - 267px);max-width:calc(100vw - 16px)}
}
@media(max-width:480px){.panel[data-panel=automation]{width:calc(100vw - 16px)}
.automation-grid{grid-template-columns:1fr 1fr;gap:8px}
.automation-settings,.automation-queue,.automation-browser{padding:10px}
.automation-hero{padding:10px}
.automation-actions{gap:6px}
.automation-center button{font-size:.76rem}
.automation-field{font-size:.75rem}
.automation-hud{width:calc(100vw - 16px);max-width:none}
.automation-queue-row>span{flex-basis:100%}
}
@media(max-height:520px) and (orientation:landscape){.panel[data-panel=automation]{top:64px;right:8px;width:calc(100vw - 244px);max-height:calc(100dvh - 76px)}
.automation-hud{top:190px;left:8px;width:218px;flex-wrap:wrap;gap:4px}
.automation-hud #automation-hud-open{flex-basis:100%;min-height:36px}
.automation-hud>button:not(#automation-hud-open){flex:1;min-height:38px}
.automation-hero{padding:10px}
.automation-grid{gap:8px}
.automation-actions button{flex-basis:110px}
}
