/* Shared client experience. Scoped to avoid changing admin access controls. */
:root{--auto-surface:var(--surface-2);--auto-line:var(--border);--auto-accent:var(--success);--auto-muted:var(--muted)}
.automation-plan-card[hidden],.automation-config-guide[hidden],.automation-account-switch[hidden],.fleet-empty[hidden],#accounts tr[hidden]{display:none!important}
#accounts .section-head h2{font-size:1.35rem}
.fleet-controls{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 6px}
.fleet-controls input{flex:1;min-width:180px;max-width:480px}
.fleet-controls select{min-width:210px}
.fleet-summary{font-size:.9rem;color:var(--muted);margin:8px 0}
.fleet-filter-help{display:block;color:var(--auto-muted);margin:0 0 16px;font-size:.75rem}
.fleet-account-plan{display:block;font-weight:400;font-size:.72rem;line-height:1.5;color:var(--auto-muted);max-width:290px;margin-top:6px;white-space:normal}
.fleet-open,.automation-configure{background:var(--success-soft);border-color:var(--success-line);color:var(--success)}
.batch-open{margin-left:auto;background:var(--surface-2);border-color:var(--success-line)}
.batch-dialog{width:min(940px,calc(100vw - 24px));max-width:940px;max-height:90vh;overflow:auto;padding:24px;background:var(--surface);border:1px solid var(--border);border-radius:14px}
.batch-dialog::backdrop{background:#000b}
.batch-dialog h2{margin:0 0 10px}.batch-dialog h3{font-size:.95rem;margin:22px 0 10px}
.batch-dialog>p{font-size:.82rem;line-height:1.55}.batch-caution{padding:12px;border-left:3px solid var(--warning-line);background:var(--warning-soft);border-radius:6px;color:var(--warning)}
.batch-scope,.batch-help{color:var(--muted)}.batch-source{display:block;width:100%;max-width:560px;margin-top:8px}
.batch-targets,.batch-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:240px;overflow:auto}
.batch-target-actions{display:flex;gap:8px;margin:0 0 10px}.batch-target-actions button{padding:6px 10px;font-size:.74rem}
.batch-check{display:flex;align-items:center;gap:9px;min-width:0;margin:0;padding:10px;border:1px solid var(--border);border-radius:7px;background:var(--surface-2);font-size:.8rem;overflow-wrap:anywhere}
.batch-check input{width:auto;flex:0 0 auto;margin:0}.batch-check:has(input:checked){border-color:var(--success-line);background:var(--success-soft)}
.batch-status{min-height:1.3em;color:var(--success)}.batch-review{display:grid;gap:10px;margin:12px 0}
.batch-result{border:1px solid var(--border);border-radius:8px;padding:12px;background:var(--surface-2)}
.batch-result>summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;cursor:pointer}.batch-result-state{font-size:.75rem;color:var(--success)}
.batch-changes{table-layout:fixed;width:100%;font-size:.78rem}.batch-changes td,.batch-changes th{padding:9px;vertical-align:top;overflow-wrap:anywhere}
.batch-changes td small{display:block;margin-top:4px;color:var(--muted)}.batch-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.batch-apply{background:var(--success-soft);border-color:var(--success-line)}
.nest-batch-mode{width:100%;margin:7px 0 15px}.nest-batch-table td{white-space:normal}.nest-batch-table tr[data-state=blocked] td:last-child>strong,.nest-batch-table tr[data-state=conflict] td:last-child>strong{color:var(--warning)}
@media(max-width:650px){.nest-batch-table thead{display:none}.nest-batch-table,.nest-batch-table tbody,.nest-batch-table tr,.nest-batch-table td{display:block;width:100%}.nest-batch-table tr{border:1px solid var(--border);border-radius:8px;margin:8px 0;padding:8px}.nest-batch-table td{border:0}}
.fleet-empty{padding:16px;border:1px dashed var(--auto-line);border-radius:10px}
#accounts .row-actions{white-space:normal;min-width:220px}
#accounts .row-actions button,#accounts .row-actions select{margin:3px 3px 3px 0}
#account-workspace{max-width:1600px;width:calc(100vw - 32px);padding:16px;border-radius:18px;background:var(--surface)}
#account-workspace .account-layout{grid-template-columns:190px minmax(0,1fr);gap:18px}
#account-workspace .account-main{min-width:0}
#account-workspace .account-toolbar{gap:8px;align-items:center;padding-bottom:12px}
#aw-save{background:var(--success-soft);border-color:var(--success-line);color:var(--success)}
#aw-notice{font-size:.78rem;color:var(--auto-muted)}
#aw-tabs{gap:6px;flex-wrap:wrap;padding:8px 0 12px;background:var(--surface)}
#aw-tabs button{border-radius:9px;padding:9px 11px;min-height:40px;font-size:.78rem;background:var(--surface-2);border-color:var(--border)}
#aw-tabs button[aria-selected=true]{background:var(--success-soft);border-color:var(--success-line);color:var(--success)}
#aw-tabs button[data-nav-group=automate]{font-weight:600}
#aw-tabs button[data-tab=Ficha],#aw-tabs button[data-tab=Chat]{margin-left:10px}
#aw-tabs .game-icon{width:24px;height:24px;flex-basis:24px;transform:scale(.6);transform-origin:left center;margin-right:-14px}
#aw-tabs .icon-label{gap:8px}
#account-workspace .account-routine{margin:12px 0}
#account-workspace:not([data-workspace-pane="Ficha"]) .account-routine{display:none}
#account-workspace .routine-card{border-radius:10px}
#account-workspace .automation-home-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;padding:12px 0;background:none;position:static;margin:0}
.automation-home-heading h2{font-size:1.4rem;margin:6px 0 0}
.automation-home-heading .eyebrow{font-size:.68rem;margin:0;color:var(--auto-accent);letter-spacing:.12em}
.automation-account-switch{max-width:320px;min-width:160px}
.automation-home-help{color:var(--muted);line-height:1.6;margin:8px 0}
.automation-scope{font-size:.8rem;padding:10px 12px;border:1px solid var(--auto-line);border-radius:8px;background:var(--surface-2);color:var(--muted)}
.automation-scope[data-dirty=true],.automation-draft-notice{color:var(--warning);background:var(--warning-soft);border-radius:6px;padding:10px}
.automation-search{width:100%;max-width:480px;margin:4px 0 18px}
.automation-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0}.automation-filters .automation-search{margin:0;flex:1;min-width:180px}.automation-filters select{max-width:100%;min-height:40px}
.automation-runtime-summary{font-size:.8rem;color:var(--auto-muted);margin:12px 0}
.automation-runtime{width:100%;border-left:3px solid var(--border-strong);padding:8px 10px;margin:10px 0 14px;background:var(--surface);border-radius:0 6px 6px 0;box-sizing:border-box;overflow-wrap:anywhere}
.automation-runtime[data-phase=active]{border-color:var(--success-line)}.automation-runtime[data-phase=attention]{border-color:var(--warning-line);background:var(--warning-soft)}.automation-runtime[data-phase=disabled],.automation-runtime[data-phase=offline]{opacity:.8}
.automation-runtime-label{display:block;font-size:.8rem;line-height:1.5}.automation-runtime-detail{font-size:.75rem;line-height:1.5;margin:5px 0;color:var(--muted)}.automation-runtime-next{display:block;font-size:.7rem;line-height:1.5;margin-top:5px;color:var(--muted)}
.automation-config-guide .automation-runtime{margin-bottom:0}.automation-roadmap{border:1px solid var(--auto-line);border-radius:10px;padding:16px;margin-top:24px}.automation-roadmap>summary{font-weight:600;cursor:pointer}.automation-roadmap>p{font-size:.82rem;color:var(--auto-muted)}
.automation-opportunities{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:12px;margin-top:16px}.automation-opportunities article{padding:14px;border:1px solid var(--auto-line);border-radius:8px;background:var(--surface-2)}.automation-opportunities h3{display:flex;gap:10px;align-items:center;font-size:.92rem;margin:0}.automation-opportunities p{font-size:.8rem;line-height:1.6}.automation-opportunities small{color:var(--auto-muted);line-height:1.6}
.event-routine-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.event-routine-actions button{font-size:.76rem;padding:7px 10px}.events-grid article>small{display:block;line-height:1.5;color:var(--auto-muted)}
#account-workspace .events-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:14px}
#account-workspace .events-grid article{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:18px;border-radius:11px}
#account-workspace .events-grid article>strong{font-size:1rem;line-height:1.5}#account-workspace .event-support{align-self:flex-start;margin:0}
#account-workspace .events-grid article>small{font-size:.76rem}#account-workspace .events-grid article p{font-size:.8rem;line-height:1.6}
#account-workspace .event-routine-actions{margin-top:auto;padding-top:4px}
.map-manual-tools{font-size:.8rem;max-width:240px}.map-manual-tools summary{cursor:pointer;color:var(--muted)}.map-manual-tools p{line-height:1.5}
.automation-library{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.automation-plan-card{display:flex;flex-direction:column;align-items:flex-start;min-width:0;background:var(--auto-surface);border:1px solid var(--auto-line);border-radius:12px;padding:17px;box-shadow:0 4px 14px #00000016}
.automation-plan-card[data-mode=enabled]{border-top:3px solid var(--success-line);padding-top:15px}
.automation-plan-card[data-mode=planning]{border-top:3px solid var(--warning-line);padding-top:15px}
.automation-plan-top{display:flex;align-items:center;gap:10px;min-height:40px}
.automation-plan-top h3{font-size:1rem;margin:0}
.automation-plan-top .game-icon{border-radius:7px}
.automation-mode{display:inline-block;font-size:.68rem;line-height:1.5;padding:4px 8px;border-radius:20px;background:var(--surface-2);color:var(--muted);margin:10px 0 0}
[data-mode=enabled]>.automation-mode{background:var(--success-soft);color:var(--success)}
[data-mode=planning]>.automation-mode{background:var(--warning-soft);color:var(--warning)}
.automation-plan-description{font-size:.8rem;line-height:1.55;color:var(--muted);margin:12px 0 8px}
.automation-plan-summary{font-size:.78rem;line-height:1.6;color:var(--text);overflow-wrap:anywhere}
.automation-plan-card .automation-configure{margin-top:auto;font-size:.78rem;padding:8px 12px}
.automation-saved-note{font-size:.76rem;color:var(--auto-muted);line-height:1.6;margin:18px 0}
.automation-pane-guide{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px;margin:12px 0 20px;border:1px solid var(--auto-line);border-left:3px solid var(--success-line);border-radius:10px;background:var(--surface-2)}
.automation-pane-guide strong{font-size:.95rem}
.automation-pane-guide p{margin:6px 0 0;font-size:.8rem;line-height:1.55;color:var(--muted)}
.automation-pane-guide button{flex-shrink:0;font-size:.78rem}
.automation-guide-actions{display:flex;flex-wrap:wrap;gap:8px}
.automation-config-guide{padding:16px 18px;border:1px solid var(--auto-line);border-radius:10px;background:var(--surface-2);margin:14px 0 18px}
.automation-config-heading{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.automation-config-heading h3{font-size:1.1rem;margin:0}
.automation-config-heading .automation-mode{margin:0 0 0 auto}
.automation-config-guide>p{font-size:.8rem;line-height:1.6;margin:10px 0 0}
.automation-manual-tools{border:1px solid var(--auto-line);padding:14px;border-radius:10px;margin:18px 0}
.automation-manual-tools summary{cursor:pointer;color:var(--auto-muted);font-size:.8rem}
.automation-manual-tools>button{margin:12px 8px 12px 0}
#aw-config-nav{gap:7px;flex-wrap:wrap;background:var(--surface-2);border-radius:10px;padding:10px;position:static}
#aw-config-nav button{padding:8px 10px;border-radius:8px;font-size:.76rem}
#account-workspace .settings-panel,#account-workspace .equipment-assignments,#account-workspace .automation-section{border-radius:10px}
#account-workspace .settings-panel legend{font-size:.85rem;font-weight:600;padding:0 6px}
#account-workspace .settings-enable{border-radius:9px;padding:12px 14px}
#account-workspace .setting-grid label{font-size:.8rem;line-height:1.5}
#account-workspace .setting-grid label small{font-size:.72rem;line-height:1.5;color:var(--auto-muted)}
#account-workspace input:not([type=checkbox]),#account-workspace select,#account-workspace textarea{border-radius:7px}
#account-workspace input:focus-visible,#account-workspace select:focus-visible,#account-workspace button:focus-visible,.fleet-controls input:focus-visible{outline:2px solid var(--auto-accent);outline-offset:2px}
#account-workspace table{font-size:.8rem}
#account-workspace th{color:var(--muted);text-transform:none;letter-spacing:0;font-size:.74rem}
#account-workspace td{padding-top:12px;padding-bottom:12px}
#account-workspace [data-pane]>h2{font-size:1.2rem}
@media(min-width:1350px){.automation-library{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1150px){.automation-library{grid-template-columns:repeat(2,minmax(0,1fr))}#account-workspace .account-layout{grid-template-columns:160px minmax(0,1fr)}.automation-pane-guide{align-items:flex-start;flex-direction:column}}
@media(max-width:760px){#account-workspace{width:calc(100vw - 12px);padding:10px;border-radius:12px;max-height:calc(100dvh - 12px)}#account-workspace .account-layout{display:block}#account-workspace .account-summary{display:none}#account-workspace .account-toolbar{flex-wrap:wrap}#aw-notice{flex-basis:100%;order:2}#aw-tabs{position:static}#aw-tabs button{min-height:38px;padding:7px 9px}#aw-config-nav{position:static}.automation-account-switch{width:100%;max-width:none}.automation-home-heading h2{font-size:1.2rem}.automation-pane-guide{gap:12px;margin:10px 0 16px}.automation-config-guide{padding:13px}.automation-config-heading .automation-mode{margin:0}.fleet-controls{flex-direction:column}.fleet-controls input,.fleet-controls select{width:100%;max-width:none}.fleet-account-plan{max-width:200px}}
@media(max-width:520px){.automation-library{grid-template-columns:minmax(0,1fr)}.automation-plan-card{padding:14px}.automation-plan-card[data-mode=enabled],.automation-plan-card[data-mode=planning]{padding-top:12px}#aw-tabs button[data-tab=Ficha],#aw-tabs button[data-tab=Chat]{margin-left:0}.automation-config-heading .game-icon{display:none}}
@media(max-width:650px){.batch-dialog{padding:16px}.batch-targets,.batch-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.batch-changes{font-size:.72rem}.batch-changes td,.batch-changes th{padding:6px}.batch-open{margin:8px 0 0}}

/* Growth plans: a readable ordered list rather than raw protocol IDs. */
.growth-picker{grid-column:1/-1;min-width:0}.growth-picker h4{margin:0 0 8px}.growth-picker>input{width:100%;margin:8px 0}
.growth-scroll{max-height:350px;overflow:auto;border:1px solid var(--border);border-radius:8px}
.growth-table{width:100%;border-collapse:collapse}.growth-table th{position:sticky;top:0;background:var(--surface-2);text-align:left;padding:10px}
.growth-table td{padding:8px;border-bottom:1px solid var(--border)}.growth-table tr.selected{background:var(--success-soft)}
.growth-table td:nth-child(2){white-space:nowrap;min-width:100px}.growth-table button{padding:2px 7px;margin-left:5px}
.growth-table img{width:36px;height:36px;object-fit:contain;vertical-align:middle;margin-right:8px}
.growth-table .game-icon{vertical-align:middle;margin-right:8px}.growth-table td:last-child{white-space:nowrap}
@media(max-width:700px){.growth-table th,.growth-table td{padding:6px}.growth-scroll{max-height:300px}.growth-table td:nth-child(2){min-width:90px}}

#aw-form .automation-section[data-config-group="familiars"] .settings-panels,#aw-form .automation-section[data-config-group="hero_stages"] .settings-panels{grid-template-columns:1fr}
#aw-form .automation-section[data-config-group="hero_stages"] .settings-panel:first-child>.setting-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
#aw-form .automation-section[data-config-group="familiars"] .settings-panel:first-child>.setting-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.growth-picker{padding:0!important;border:0!important;background:transparent!important}
@media(max-width:900px){#aw-form .automation-section[data-config-group="hero_stages"] .settings-panel:first-child>.setting-grid,#aw-form .automation-section[data-config-group="familiars"] .settings-panel:first-child>.setting-grid{grid-template-columns:1fr}}

.medal-goals{margin:18px 0 0;min-width:0}.medal-goals[hidden]{display:none}.medal-goals h4{margin:0 0 8px}
.medal-toolbar{display:flex;gap:8px;margin:14px 0}.medal-toolbar select{flex:1;min-width:0}
.medal-table{min-width:620px}.medal-table input{width:86px;min-height:34px}.medal-table td:nth-child(2){min-width:160px;white-space:normal}
.medal-table td:last-child{white-space:normal;min-width:160px}.medal-table td:last-child span{display:block;margin-bottom:7px;color:var(--muted)}

#aw-form .settings-panel[hidden]{display:none}
#aw-form label:has(#aw-plan-hero_stages-mode){grid-column:1/-1;grid-template-columns:minmax(0,1fr) minmax(200px,33%)}
@media(max-width:600px){#aw-form label:has(#aw-plan-hero_stages-mode){grid-template-columns:1fr}}

#aw-form .automation-section[data-config-group="hero_stages"] .settings-panel:first-child>.setting-grid{column-gap:14px}

.growth-table td small{display:block;color:var(--muted);margin-top:5px;font-size:.74rem;white-space:normal}.growth-table td strong{display:block;font-size:.8rem}

#aw-form .automation-section[data-config-group="familiars"] .settings-panel:first-child>.setting-grid{column-gap:14px}
.nest-tier-group{min-width:0;margin:0;padding:.65rem;border:1px solid var(--border-color,var(--border));border-radius:8px}
.nest-tier-choices{display:flex;flex-wrap:wrap;gap:.5rem}
.nest-tier-choices label{display:flex;align-items:center;gap:.35rem;padding:.4rem .6rem;border:1px solid var(--border-color,var(--border));border-radius:6px}
.nest-formation-presets{display:flex;gap:.4rem;margin-top:.4rem}
.nest-formation-summary{grid-column:1/-1;font-weight:600;overflow-wrap:anywhere}

.shopping-editor input[type=number]{min-width:5rem;width:6rem}.shopping-editor td:nth-child(2){white-space:normal;min-width:10rem}.shopping-editor td .game-icon{margin-right:.6rem;vertical-align:middle}.event-live{display:grid;gap:.45rem}.event-live p{margin:0}.event-stages{display:flex;flex-wrap:wrap;gap:.4rem}.event-stages p{padding:.4rem .6rem;border:1px solid var(--border);border-radius:6px}.event-stages [data-met=true]{color:var(--success,var(--accent));border-color:currentColor}

.event-rewards{border:1px solid var(--border-color,var(--border));border-radius:6px;padding:.5rem .6rem}.event-rewards summary{cursor:pointer;font-size:.78rem}.event-reward-list{display:grid;gap:.5rem;margin-top:.7rem}.event-reward-list .icon-label{white-space:normal;font-size:.75rem;line-height:1.4}

/* Event modes are full-width choices; keep the complete strategy legible. */
#aw-form .event-rule-card .setting-grid label.event-rule-mode{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;align-items:stretch}
#aw-form .event-rule-card .event-rule-mode select{width:100%;max-width:none;min-width:0}

/* Guild admission policy: existing theme controls, bounded scroll, no overlays. */
.gatekeeper-plan .table-scroll{overflow-x:auto;margin-block:1rem;border-radius:var(--radius,10px)}
.gatekeeper-plan table{width:100%;border-collapse:collapse}
.gatekeeper-plan th,.gatekeeper-plan td{padding:.65rem;text-align:left;vertical-align:middle}
.gatekeeper-plan td input:not([type=checkbox]){min-width:8rem;width:100%;box-sizing:border-box}
.gatekeeper-plan td input[type=datetime-local]{min-width:12rem}
.gatekeeper-plan td select{min-width:8rem;width:100%}
.gatekeeper-plan textarea{display:block;width:100%;box-sizing:border-box;margin-top:.5rem}
.gatekeeper-plan>label{display:block;margin-block:1.2rem}
