/* Production adapters for the After Hours components. Business-action selectors
   and customer media/canvas rendering remain owned by their existing modules. */
/* Error pages share the production card, brand and button components. */
.ah-theme.ah-error-page { min-height:100svh; display:grid; align-items:center; padding:var(--ah-space-6) var(--ah-space-4); }
.ah-error-shell { width:min(100%,42rem); margin:0 auto; display:grid; gap:var(--ah-space-6); }
.ah-theme .ah-error-card { display:grid; gap:var(--ah-space-4); padding:var(--ah-space-7); }
.ah-theme .ah-error-card :is(h1,p) { margin:0; }
.ah-error-number { color:var(--ah-accent); font:400 clamp(5rem,14vw,8rem)/1 var(--ah-display); letter-spacing:-.04em; }
.ah-theme .ah-error-description { color:var(--ah-muted); max-width:34rem; }
.ah-error-actions { display:flex; flex-wrap:wrap; gap:var(--ah-space-3); padding-top:var(--ah-space-2); }
.ah-error-footer { color:var(--ah-muted); font-size:12px; }
@media(max-width:600px) {
  .ah-theme .ah-error-card { padding:var(--ah-space-4); }
  .ah-error-actions { display:grid; grid-template-columns:1fr; }
}
html:has(.ah-theme) { background:#121412; }
.ah-theme {
  --ink:var(--ah-text); --muted:var(--ah-muted); --paper:var(--ah-bg);
  --line:var(--ah-border); --border:var(--ah-border); --green:var(--ah-accent);
  --gold:var(--ah-accent); --dark:var(--ah-bg); --white:var(--ah-surface);
  min-width:0; font-family:var(--ah-font); overflow-wrap:anywhere;
}
.ah-theme :is(main,section,header,footer,nav,form,fieldset,article,aside,details,dialog) { min-width:0; }
.ah-theme :is(h1,h2,h3,h4) { color:var(--ah-text); font-family:var(--ah-font); line-height:1.2; }
.ah-theme h1 { font-size:clamp(28px,3vw,38px); font-weight:600; letter-spacing:-1px; }
.ah-theme h2 { font-size:20px; font-weight:600; }
.ah-theme h3 { font-size:16px; }
.ah-theme p { line-height:1.7; }
.ah-theme label { color:var(--ah-text); font-size:13px; }
.ah-theme :is(p + p,h2 + p,h3 + p) { margin-top:12px; }
.ah-theme :is(.helper,.muted,.note,.layout-note,.thumb-meta,.metric-caption,.metric-top,
  .metric-value small,.screen-footer,.preview-controls>span,.activity-item small,
  .page-heading p,.playlist-row p,.device-body p,.device-body strong,.bottom-note,
  .intro p,.section-head p,.music-note,.saved-badge,.hosting-usage,.tv-info small,
  .hosting-card .helper,.admin-table small,.browser-intro,.remember-card p,
  .remember-card .helper,.remote-surface p,.account-note,.account-privacy,.account-intro,
  .account-field small,.auth-description,.auth-security-note,.auth-return) { color:var(--ah-muted); }
.ah-theme :is(.helper,.layout-note,.thumb-meta,.metric-caption,.activity-item small,
  .card-head p,.screen-footer,.preview-controls>span,.note,.bottom-note,.section-head p,
  .account-note,.account-privacy,.account-field small,.auth-security-note) { font-size:12px; }
.ah-theme :is(.eyebrow,.account-story .eyebrow,.music-card .eyebrow,.browser-home .eyebrow) {
  color:var(--ah-accent); font:600 10px/1.5 var(--ah-font); letter-spacing:2px;
}
.ah-theme :is(.label,.form-field label,legend,.hosting-form label,.remote-main label,
  .account-field,.browser-home label) { color:var(--ah-text); font-size:13px; }
.ah-theme :is(.page-heading,.intro) { gap:24px; margin-bottom:32px; }
.ah-theme :is(.page-heading h1,.intro h1) { font:600 clamp(28px,3vw,38px)/1.15 var(--ah-font); margin:10px 0 12px; }
.ah-theme :is(.page-heading p,.intro p) { font-size:14px; max-width:650px; }
.ah-theme :is(.heading-actions,.intro-actions,.topbar-actions,.header-actions,.device-buttons,
  .modal-actions,.dialog-actions,.row-actions,.publication-actions,.admin-detail-actions) { flex-wrap:wrap; gap:10px; }

/* Shared controls and all server-rendered / dynamically inserted forms. */
.ah-theme :is(.button,.account-dashboard,.account-logout,.account-submit,.icon-button,
  .preset-row button,.segmented button,.play-controls button,.row-buttons button,
  .browser-shortcuts button,.text-button,.text-link,.quiet-link) {
  min-height:44px; max-width:100%; font:600 12px/1.5 var(--ah-font);
  border-radius:6px; text-decoration:none; white-space:normal; text-align:center;
}
.ah-theme :is(.button,.account-dashboard,.account-logout,.icon-button,.preset-row button,
  .play-controls button,.row-buttons button,.browser-shortcuts button) {
  background:transparent; color:var(--ah-text); border:1px solid var(--ah-control); padding:10px 16px;
}
.ah-theme :is(.button,.account-dashboard,.account-logout,.icon-button,.preset-row button,
  .play-controls button,.row-buttons button,.browser-shortcuts button):hover:enabled,
.ah-theme a:is(.button,.account-dashboard):hover { background:var(--ah-raised); border-color:var(--ah-accent); }
.ah-theme :is(.button.primary,.hosting-card .button.primary,.auth-card .button.primary,
  .music-card .button.primary,.browser-home .button.primary,.account-submit,.button.gold) {
  background:var(--ah-accent); border:1px solid var(--ah-accent); color:var(--ah-on-accent);
}
.ah-theme :is(.button.primary,.hosting-card .button.primary,.auth-card .button.primary,
  .music-card .button.primary,.browser-home .button.primary,.account-submit,.button.gold):hover:enabled,
.ah-theme a.button.primary:hover { background:var(--ah-accent-hover); border-color:var(--ah-accent-hover); color:var(--ah-on-accent); }
.ah-theme :is(.button.primary,.account-submit):active:enabled { background:var(--ah-accent-pressed); }
.ah-theme :is(.button.danger,.row-buttons .remove) { color:var(--ah-danger); border-color:#965e5b; background:transparent; }
.ah-theme :is(.button.danger,.row-buttons .remove):hover:enabled { background:var(--ah-danger-bg); border-color:var(--ah-danger); }
.ah-theme :is(.button.ghost,.button.subtle,.text-button,.text-link,.quiet-link) { background:transparent; color:var(--ah-accent); border-color:transparent; padding:10px 8px; }
.ah-theme :is(.button.ghost,.button.subtle,.text-button,.text-link,.quiet-link):hover { background:var(--ah-selected); }
.ah-theme :is(.icon-button,.play-controls button,.row-buttons button) { min-width:44px; padding:8px; }
.ah-theme :is(.button-small,.hosting-actions .button,.tv-actions .button,.asset-actions button) { font-size:12px; border-radius:6px; }
.ah-theme :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]) {
  background:var(--ah-bg); color:var(--ah-text); border:1px solid var(--ah-control);
  border-radius:6px; min-height:48px; padding:11px 12px; font:16px/1.5 var(--ah-font); max-width:100%; min-width:0;
}
.ah-theme :is(input,select,textarea):focus-visible { outline:2px solid var(--ah-accent); outline-offset:3px; }
.ah-theme :is(input,textarea)::placeholder { color:var(--ah-muted); opacity:.8; }
.ah-theme :is(input[type=checkbox],input[type=radio]) { accent-color:var(--ah-accent); width:18px; height:18px; flex:none; }
.ah-theme :is(.admin-check,.hosting-check) { min-height:44px; }
.ah-theme input[type=range] { accent-color:var(--ah-accent); background:transparent; min-height:44px; }
.ah-theme input[type=color] { width:100%; min-height:48px; padding:4px; }
.ah-theme input[type=file] { max-width:100%; font-size:12px; }
.ah-theme input[type=file]::file-selector-button { min-height:44px; padding:10px 14px; border:1px solid var(--ah-control); border-radius:6px; background:var(--ah-raised); color:var(--ah-text); margin-right:12px; }
.ah-theme :is(.password-toggle,.password-toggle[aria-pressed=true]) { width:44px; height:44px; color:var(--ah-muted); background:transparent; }
.ah-theme .password-toggle:hover { background:var(--ah-raised); color:var(--ah-accent); }
.ah-theme :is(.account-field,.auth-card .form-field) .password-control input { padding-right:56px; }
.ah-theme :is(.form-error,.account-error,.browser-error,.account-logout-error) { color:var(--ah-danger); font-size:12px; }
.ah-theme :is(.form-error,.account-error):not(:empty) { padding:12px; border:1px solid #965e5b; border-radius:6px; background:var(--ah-danger-bg); }
.ah-theme :is([aria-invalid=true],input:user-invalid) { border-color:var(--ah-danger); }

/* Logo lockups: the supplied root PNG is copied unchanged into public assets. */
.ah-theme :is(.brand,.logo,.account-brand,.ah-product-brand) { color:var(--ah-text); font:700 27px/1 var(--ah-font); letter-spacing:-1px; display:flex; align-items:center; gap:12px; text-decoration:none; }
.ah-theme :is(.brand,.logo,.account-brand,.ah-product-brand) img { width:52px; height:52px; object-fit:contain; flex:none; }
.ah-theme :is(.brand,.logo,.account-brand,.ah-product-brand) small { display:block; color:var(--ah-muted); font:400 8px/1.5 var(--ah-font); letter-spacing:2.5px; margin-top:7px; }
.ah-theme .ah-product-brand { font-size:25px; }
.ah-theme .ah-product-brand img { width:48px; height:48px; }

/* Authenticated workspace shell. The same nav moves into a native phone drawer. */
.ah-theme .sidebar { position:fixed; inset:0 auto 0 0; display:flex; flex-direction:column; width:240px; height:100dvh; max-height:100dvh; padding:28px 16px 20px; overflow:auto; background:var(--ah-surface); color:var(--ah-muted); border-right:1px solid var(--ah-border); }
.ah-theme .sidebar .brand { padding:0 8px; }
.ah-theme .sidebar nav { display:block; overflow:visible; margin:0; }
.ah-theme .sidebar { overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.ah-theme .sidebar>* { flex-shrink:0; }
.ah-theme .ah-panel { padding:var(--ah-space-5); display:grid; gap:var(--ah-space-4); margin-bottom:var(--ah-space-4); }
.ah-theme .ah-form-stack { display:grid; gap:var(--ah-space-4); min-width:0; }
.ah-theme .ah-content-stack { display:grid; gap:var(--ah-space-4); min-width:0; }
.ah-theme .ah-content-stack > :is(.ah-panel,.hosting-section) { margin-block:0; }
.ah-i-users{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='7' r='3'/%3E%3Cpath d='M3 21v-3a6 6 0 0 1 12 0v3M16 4a3 3 0 0 1 0 6M21 21v-3a6 6 0 0 0-3-5'/%3E%3C/svg%3E")}
.ah-theme .ah-field-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:var(--ah-space-4); }
.ah-theme .ah-record-list { display:grid; gap:var(--ah-space-4); padding:0; margin:0; list-style:none; }
.ah-theme .ah-record { background:var(--ah-raised); color:var(--ah-text); border:1px solid var(--ah-border); border-radius:var(--ah-radius); padding:var(--ah-space-4); min-width:0; overflow-wrap:anywhere; }
@media(max-width:600px){.ah-theme .ah-panel,.ah-theme .ah-record{padding:var(--ah-space-3);}}
.ah-theme .venue-switch { display:flex; border-color:var(--ah-border); margin-top:28px; padding:18px 8px; }
.ah-theme .venue-switch strong { color:var(--ah-text); font-size:12px; max-width:142px; white-space:normal; }
.ah-theme :is(.venue-switch small,.nav-label,.pilot-tag,.pilot-tag span,.profile small,.sidebar-bottom p) { color:var(--ah-muted); }
.ah-theme :is(.venue-monogram,.avatar) { background:var(--ah-selected); color:var(--ah-accent); border-color:#655237; font-family:var(--ah-font); font-weight:700; }
.ah-theme .nav-label { display:block; margin:24px 12px 12px; font-size:10px; }
.ah-theme .nav-item { width:100%; min-width:0; min-height:46px; gap:12px; margin:0 0 4px; padding:12px; background:transparent; color:var(--ah-muted); text-decoration:none; font:500 12px/1.5 var(--ah-font); }
.ah-theme .nav-item:hover { background:var(--ah-raised); color:var(--ah-text); }
.ah-theme .nav-item.active { background:var(--ah-selected); color:var(--ah-accent); box-shadow:inset 2px 0 var(--ah-accent); }
.ah-theme .nav-item .ah-i { width:20px; height:20px; }
.ah-theme .sidebar-bottom { display:block; margin-top:auto; padding:28px 8px 0; }
.ah-theme .sidebar-bottom p { font:italic 17px/1.7 var(--ah-display); margin:18px 0; }
.ah-theme .profile { color:var(--ah-text); border-color:var(--ah-border); padding-top:18px; min-height:64px; }
.ah-theme .workspace { margin-left:240px; }
.ah-theme .workspace>main { max-width:1320px; padding:36px; }
.ah-theme .topbar { background:var(--ah-bg); min-height:76px; height:auto; padding:16px 36px; gap:16px; border-color:var(--ah-border); }
.ah-theme :is(.breadcrumb,.slash,.connection) { color:var(--ah-muted); }
.ah-theme .topbar-actions { gap:10px; }
.ah-theme .connection { font-size:11px; }
.ah-theme :is(.connection i,.tiny-dot,.pilot-tag i,.status-dot) { background:var(--ah-success); }
.ah-theme .workspace>footer { border-top:1px solid var(--ah-border); color:var(--ah-muted); padding:24px 36px; font-size:11px; flex-wrap:wrap; gap:12px; }
.ah-theme .workspace>footer a { color:var(--ah-muted); font-size:11px; }
.ah-theme .ah-mobile-toggle,.ah-theme .ah-mobile-close { display:none; }
.ah-theme .ah-mobile-navigation { width:min(320px,calc(100% - 32px)); max-width:none; height:100dvh; max-height:100dvh; margin:0 auto 0 0; border-radius:0 16px 16px 0; padding:0; }
.ah-theme .ah-mobile-navigation .sidebar { position:static; width:100%; height:100dvh; border:0; padding:20px 16px; }
.ah-theme .ah-mobile-close { align-self:flex-end; margin-bottom:12px; }
html:has(.ah-mobile-navigation[open]) { overflow:hidden; }

/* Opt-in select treatment; the native control keeps keyboard and phone pickers. */
.ah-theme .ah-qr-video { display:block; width:100%; max-height:20rem; object-fit:contain; background:var(--ah-bg); border-radius:var(--ah-radius-sm); }
.ah-theme .ah-qr-video[hidden] { display:none; }
.ah-theme .ah-select-control { position:relative; display:grid; min-width:0; }
.ah-theme .ah-select-control > select { appearance:none; -webkit-appearance:none; width:100%; min-width:0; min-height:48px; padding:var(--ah-space-3) var(--ah-space-8) var(--ah-space-3) var(--ah-space-4); border:1px solid var(--ah-border); border-radius:var(--ah-radius); background:var(--ah-raised); color:var(--ah-text); font-size:16px; font-weight:500; line-height:1.5; cursor:pointer; text-overflow:ellipsis; transition:border-color var(--ah-duration),background var(--ah-duration); }
/* User decision (26 Oct 2026): keep the chevron area transparent; do not restore the selected background here. */
.ah-theme .ah-select-control::before { content:""; position:absolute; pointer-events:none; inset:1px 1px 1px auto; width:var(--ah-space-7); border-left:1px solid var(--ah-border); border-radius:0 var(--ah-radius) var(--ah-radius) 0; }
.ah-theme .ah-select-control::after { content:""; position:absolute; pointer-events:none; right:var(--ah-space-4); top:50%; transform:translateY(-50%); width:var(--ah-space-4); height:var(--ah-space-4); background:var(--ah-accent); mask:center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ah-theme .ah-select-control > select:hover:not(:disabled),.ah-theme .ah-select-control > select:focus-visible { border-color:var(--ah-accent); background:var(--ah-surface); }
.ah-theme .ah-select-control:focus-within::before { border-left-color:var(--ah-accent); }
.ah-theme .ah-select-control > select:disabled { color:var(--ah-muted); cursor:not-allowed; }
.ah-theme .ah-select-control:has(> select:disabled)::after { background:var(--ah-muted); }
.ah-theme .ah-select-control option { background:var(--ah-surface); color:var(--ah-text); }
@media(forced-colors:active){.ah-theme .ah-select-control > select{appearance:auto;padding-right:var(--ah-space-4);}.ah-theme .ah-select-control::before,.ah-theme .ah-select-control::after{display:none;}}
@supports (appearance:base-select) {
  @media(forced-colors:none) {
    .ah-theme .ah-select-control > select,.ah-theme .ah-select-control > select::picker(select) { appearance:base-select; }
    .ah-theme .ah-select-control > select::picker-icon { display:none; }
    .ah-theme .ah-select-control > select:open { border-color:var(--ah-accent); background:var(--ah-surface); }
    .ah-theme .ah-select-control:has(> select:open)::after { transform:translateY(-50%) rotate(180deg); }
    .ah-theme .ah-select-control > select::picker(select) { margin-block-start:var(--ah-space-2); padding:var(--ah-space-2); border:1px solid var(--ah-control); border-radius:var(--ah-radius); background:var(--ah-surface); color:var(--ah-text); box-shadow:var(--ah-shadow); min-inline-size:anchor-size(width); max-inline-size:calc(100vw - var(--ah-space-6)); max-block-size:min(20rem,50svh); overflow:auto; scrollbar-width:thin; scrollbar-color:var(--ah-control) var(--ah-surface); }
    .ah-theme .ah-select-control > select option { display:flex; align-items:center; gap:var(--ah-space-3); min-height:48px; padding:var(--ah-space-3) var(--ah-space-4); border:1px solid transparent; border-radius:var(--ah-radius-sm); background:var(--ah-surface); color:var(--ah-text); font:400 16px/1.5 var(--ah-font); cursor:pointer; }
    .ah-theme .ah-select-control > select option + option { margin-top:var(--ah-space-1); }
    .ah-theme .ah-select-control > select option:checked { background:var(--ah-selected); color:var(--ah-accent); font-weight:600; }
    .ah-theme .ah-select-control > select option:hover:not(:disabled) { background:var(--ah-raised); }
    .ah-theme .ah-select-control > select option:focus-visible { outline:2px solid var(--ah-accent); outline-offset:-2px; }
    .ah-theme .ah-select-control > select option::checkmark { order:2; margin-inline-start:auto; color:var(--ah-accent); }
    .ah-theme .ah-select-control > select option:disabled { color:var(--ah-muted); cursor:not-allowed; }
  }
}

/* Shared cards, real data, media and playlists. */
.ah-theme :is(.card,.metric,.stage-card,.library-card,.music-card,.hosting-music-panel,
  .tv-music-desk,.music-website-form,.remember-card,.admin-empty,.admin-users-wrap) { background:var(--ah-surface); color:var(--ah-text); border:1px solid var(--ah-border); border-radius:16px; box-shadow:none; }
.ah-theme :is(.card-head,.preview-controls,.stage-top,.stage-footer,.section-head,.playlist-row,.hosting-track,.venue-ad-library,.media-row,.playlist-options,.popup-options,.account-navigation,.auth-security-note) { border-color:var(--ah-border); }
.ah-theme :is(.card-head,.preview-area,.stage-top,.stage-footer) { background:transparent; }
.ah-theme .card-head { padding:20px 24px; flex-wrap:wrap; }
.ah-theme :is(.card-head h2,.section-head h2) { font-size:15px; }
.ah-theme :is(.metrics,.devices-grid,.library-grid,.admin-plan-grid,.admin-form-grid,.form-grid,.manage-grid,.tv-music-desk) { gap:20px; }
.ah-theme .metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.ah-theme .metric { padding:20px; }
.ah-theme .metric-value { color:var(--ah-text); font-size:32px; }
.ah-theme .metric-icon { color:var(--ah-accent); }
.ah-theme :is(.studio-grid,.bottom-grid) { grid-template-columns:minmax(0,1fr) 300px; gap:24px; }
.ah-theme :is(.screen,.display-stage,.remote-surface,.template-preview) { background:#0c0e0c; border-color:var(--ah-border); }
.ah-theme :is(.quiet-card,.layout-summary,.display-mode-bar,.manage-banner,.preview-banner,.pair-confirm,.hosting-otp,.service-message) { background:var(--ah-selected); color:var(--ah-text); border:1px solid #655237; border-radius:10px; }
.ah-theme :is(.quiet-card p,.preview-banner strong,.pair-confirm small,.layout-summary,.display-mode-bar p,.tv-music-desk p,.tv-music-desk li) { color:var(--ah-muted); }
.ah-theme .quiet-card h3 { color:var(--ah-text); font:italic 22px var(--ah-display); }
.ah-theme :is(.quiet-card a,.text-link,.inline-status) { color:var(--ah-accent); }
.ah-theme :is(.upload-drop,.add-tile) { background:var(--ah-bg); border:1px dashed var(--ah-control); color:var(--ah-muted); border-radius:16px; }
.ah-theme :is(.upload-drop.dragging,.display-stage.dragging) { background:var(--ah-selected); border-color:var(--ah-accent); }
.ah-theme :is(.upload-drop h2,.empty strong,.empty-state h2) { color:var(--ah-text); font-family:var(--ah-font); font-weight:600; }
.ah-theme :is(.upload-drop p,.empty,.empty-state p,.list-empty,.media-row p,.play-controls span,.browser-placeholder small) { color:var(--ah-muted); }
.ah-theme :is(.mini-thumb,.media-row>img,.media-row>video,.admin-content-grid img,.admin-content-grid video,.venue-ad-grid img,.venue-ad-grid video) { background:var(--ah-bg); }
.ah-theme :is(.segmented,.day-pills label) { background:var(--ah-bg); border-color:var(--ah-border); color:var(--ah-muted); }
.ah-theme .segmented button { background:transparent; color:var(--ah-muted); }
.ah-theme :is(.segmented button.selected,.preset-row button.selected,.day-pills label:has(input:checked)) { background:var(--ah-selected); color:var(--ah-accent); border-color:var(--ah-accent); box-shadow:none; }
.ah-theme :is(.playlist-row h3,.thumb-label,.activity-item p,.device-body strong) { color:var(--ah-text); font-size:13px; }
.ah-theme .activity-dot { background:var(--ah-accent); }
.ah-theme :is(.badge,.admin-status,.saved-badge) { color:var(--ah-info); background:var(--ah-info-bg); border:1px solid #567496; border-radius:30px; font-size:10px; letter-spacing:.3px; padding:4px 9px; white-space:normal; }
.ah-theme .badge.draft { background:var(--ah-warning-bg); color:var(--ah-warning); border-color:#886c3b; }
.ah-theme .danger-zone { border-color:#965e5b; }
.ah-theme .danger-zone .card-head h2 { color:var(--ah-danger); }

/* Signup, signin, verification, invitation and recovery. */
.ah-theme .account-shell { grid-template-columns:minmax(340px,44%) minmax(0,1fr); max-width:none; padding:0; }
.ah-theme .account-story { background:radial-gradient(ellipse at 15% 80%,#e6b66d13,transparent 65%),var(--ah-bg); border-right:1px solid var(--ah-border); color:var(--ah-text); padding:44px 12%; }
.ah-theme .story-copy { padding:48px 0 32px; max-width:420px; }
.ah-theme .story-copy h1 { font:600 clamp(42px,4.6vw,68px)/1.04 var(--ah-font); letter-spacing:-2.5px; margin:24px 0; }
.ah-theme .story-copy h1 em { font-family:var(--ah-display); font-weight:400; color:var(--ah-accent); }
.ah-theme .story-copy>p:not(.eyebrow) { color:var(--ah-muted); font-size:14px; }
.ah-theme .story-screen { border:1px solid #655237; border-radius:24px; background:radial-gradient(circle at 80% 20%,#e6b66d18,transparent 65%),var(--ah-surface); box-shadow:var(--ah-shadow); transform:none; }
.ah-theme .story-screen>span { color:var(--ah-accent); }
.ah-theme .story-screen>strong { color:var(--ah-text); font:italic 30px/1.2 var(--ah-display); }
.ah-theme .story-music { background:var(--ah-bg); color:var(--ah-muted); border-top:1px solid var(--ah-border); border-radius:0 0 23px 23px; font-size:12px; }
.ah-theme .story-footer { color:var(--ah-muted); }
.ah-theme .account-panel { background:var(--ah-bg); padding:28px 8%; }
.ah-theme :is(.account-content,.auth-card) { background:var(--ah-surface); color:var(--ah-text); border:1px solid var(--ah-border); border-radius:16px; box-shadow:var(--ah-shadow); padding:32px; }
.ah-theme .account-content { max-width:600px; container:ah-account / inline-size; }
.ah-theme .account-content .flow-steps { margin-bottom:20px; }
.ah-theme #account-types { margin-bottom:16px; }
.ah-theme #account-types legend { margin-bottom:8px; }
.ah-theme .account-content .account-choice { padding:12px; }
.ah-theme #account-form>.account-field { margin:16px 0; }
.ah-theme .account-field-row { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; align-items:start; margin:16px 0; }
.ah-theme .account-field-row .account-field { margin:0; min-width:0; }
.ah-theme .account-content :is(#admin-setup-message,#account-error,#google-status):empty { margin:0; }
.ah-theme .account-content.account-admin { padding:24px; }
.ah-theme .account-content.account-admin h2 { font-size:28px; margin:12px 0 8px; }
.ah-theme .account-admin .account-intro { font-size:13px; margin-bottom:16px; }
.ah-theme .account-admin .account-field-row { gap:12px; margin:12px 0; }
.ah-theme .account-admin .account-access-actions .account-submit { min-height:48px; margin:4px 0 8px; padding:12px 16px; }
.ah-theme .account-admin .account-note { margin:12px 0; }
.ah-theme .account-admin .account-privacy { margin-top:16px; }
@container ah-account (min-width:420px) {
  .ah-theme .account-field-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ah-theme .account-admin .account-access-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; }
  .ah-theme .account-admin .account-access-actions .account-submit { margin:0; }
  .ah-theme .account-admin #google-signin { grid-area:1 / 1; }
  .ah-theme .account-admin #account-submit { grid-area:1 / 2; }
  .ah-theme .account-admin #google-status { grid-area:2 / 1 / 3 / -1; margin:0; }
  .ah-theme .account-admin #account-error { grid-area:3 / 1 / 4 / -1; margin:0; }
  .ah-theme .account-admin #forgot-password { grid-area:4 / 1 / 5 / -1; justify-self:end; }
}
.ah-theme .account-content h2 { font:600 32px/1.15 var(--ah-font); letter-spacing:-1px; margin:16px 0 12px; }
.ah-theme .account-intro { margin-bottom:24px; }
.ah-theme .account-tabs a { color:var(--ah-muted); min-height:44px; }
.ah-theme .account-tabs a[aria-current=page] { color:var(--ah-accent); border-color:var(--ah-accent); }
.ah-theme .account-choice { background:var(--ah-bg); border-color:var(--ah-control); border-radius:8px; padding:16px 12px; }
.ah-theme .account-choice:has(input:checked) { background:var(--ah-selected); border-color:var(--ah-accent); box-shadow:none; }
.ah-theme .account-choice small { color:var(--ah-muted); font-size:11px; }
.ah-theme .flow-steps { color:var(--ah-muted); gap:10px; font-size:12px; }
.ah-theme .flow-steps b { font-size:11px; }
.ah-theme .flow-steps b { border-color:var(--ah-control); }
.ah-theme .flow-steps .active { color:var(--ah-accent); }
.ah-theme .flow-steps .active b { background:var(--ah-accent); color:var(--ah-on-accent); border-color:var(--ah-accent); }
.ah-theme .flow-steps i { background:var(--ah-border); }
.ah-theme .verification-icon { background:var(--ah-selected); color:var(--ah-accent); border-color:#655237; }
.ah-theme .verification-recipient { color:var(--ah-muted); }
.ah-theme .verification-recipient strong { color:var(--ah-text); }
.ah-theme .otp-field input#email-code { font:28px/1.5 Consolas,monospace; letter-spacing:.35em; text-align:center; padding-left:22px; }
.ah-theme #password-confirm-help[data-status=error] { color:var(--ah-danger); }
.ah-theme #password-confirm-help[data-status=success] { color:var(--ah-success); }
.ah-theme .email-verification-panel { max-width:420px; margin:24px auto 0; padding:24px; border:1px solid var(--ah-border); border-radius:16px; background:var(--ah-bg); }
.ah-theme .email-verification-panel:not([hidden]) { animation:email-verification-reveal .2s ease-out; }
.ah-theme .email-verification-panel .verification-icon { margin:0 auto 16px; }
.ah-theme .verification-icon svg { width:26px; height:26px; }
.ah-theme .email-verification-panel .verification-recipient { margin:0; }
.ah-theme #signup-code-position { grid-column:1 / -1; min-width:0; }
.ah-theme #signup-code-position:empty { display:none; }
.ah-theme #signup-code-position:has(>[hidden]) { display:none; }
.ah-theme #signup-code-position .email-verification-panel { margin:0; width:100%; max-width:none; padding:20px; box-sizing:border-box; }
.ah-theme #signup-code-position .verification-icon { display:none; }
.ah-theme #signup-email-status[data-status="success"] { color:var(--ah-accent); }
.ah-theme .account-field input:disabled { opacity:.45; cursor:not-allowed; }
.ah-theme .email-verification-panel .otp-field { gap:12px; width:100%; margin:24px 0 16px; text-align:center; }
.ah-theme .otp-control { position:relative; display:block; width:100%; }
.ah-theme .otp-control input#email-code { position:absolute; inset:0; width:100%; height:100%; max-width:none; margin:0; padding:0; border:0; background:transparent; color:transparent; -webkit-text-fill-color:transparent; caret-color:transparent; cursor:text; }
.ah-theme .otp-control input#email-code:focus-visible { outline:none; }
.ah-theme .otp-control:focus-within { outline:2px solid var(--ah-accent); outline-offset:4px; border-radius:8px; }
.ah-theme .otp-slots { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; pointer-events:none; }
.ah-theme .otp-slots>span { display:grid; place-items:center; height:56px; min-width:0; border:1px solid var(--ah-control); border-radius:8px; background:var(--ah-surface); color:var(--ah-text); font:600 26px/1 Consolas,monospace; transition:background .15s,border-color .15s; }
.ah-theme .otp-slots>span:empty::before { content:'·'; color:var(--ah-muted); }
.ah-theme .otp-slots>[data-filled=true] { background:var(--ah-raised); }
.ah-theme .otp-control:focus-within [data-active=true] { border-color:var(--ah-accent); background:var(--ah-selected); box-shadow:0 0 0 2px #e6b66d26; }
.ah-theme #email-code-entry[data-invalid=true] .otp-slots>span { border-color:var(--ah-danger); background:var(--ah-danger-bg); }
.ah-theme .otp-field #email-code-help { font-size:12px; line-height:1.6; }
.ah-theme .otp-progress { color:var(--ah-muted); font-size:12px; letter-spacing:.5px; }
.ah-theme #email-code-form .account-submit[aria-busy=true]::after { content:''; display:inline-block; width:14px; height:14px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; margin-left:10px; vertical-align:middle; animation:ah-code-spin .7s linear infinite; }
@keyframes email-verification-reveal { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes ah-code-spin { to { transform:rotate(360deg); } }
@media(max-width:680px) {
  .ah-theme .email-verification-panel { padding:18px 14px; }
  .ah-theme .otp-slots { gap:6px; }
  .ah-theme .otp-slots>span { height:52px; font-size:24px; }
}
@media(forced-colors:active) {
  .ah-theme .otp-control input#email-code { position:static; caret-color:auto; border:1px solid ButtonText; background:Canvas; color:CanvasText; -webkit-text-fill-color:CanvasText; min-height:56px; padding:8px; }
  .ah-theme .otp-slots { display:none; }
}
.ah-theme.auth-page { background:radial-gradient(ellipse at 50% 0,#e6b66d0d,transparent 60%),var(--ah-bg); }
.ah-theme .auth-card .account-brand { color:var(--ah-text); font:700 25px var(--ah-font); letter-spacing:-1px; }
.ah-theme .auth-card h1 { font:600 30px/1.2 var(--ah-font); }
.ah-theme .auth-card [role=status] { color:var(--ah-info); }
.ah-theme #google-signin { background:var(--ah-bg); color:var(--ah-text); border-color:var(--ah-control); }
.ah-theme #google-signin:hover:enabled { background:var(--ah-raised); border-color:var(--ah-accent); }
.ah-theme #google-signin::before { content:'G'; margin-right:12px; font-size:16px; font-weight:700; }

/* Admin, business settings, venue hosting and uploaded music share the studio's
   sidebar, top bar and page heading (partials/workspace-*.blade.php). */
.ah-theme.ah-workspace-page { margin:0; padding:0; max-width:none; background:var(--ah-bg); color:var(--ah-text); }
.ah-theme .workspace-body { max-width:1320px; padding:36px; }
.ah-theme .workspace-body>.page-heading { display:flex; justify-content:space-between; align-items:flex-end; }
.ah-theme .workspace-body>.page-heading p { color:var(--ah-muted); }
.ah-theme :is(#admin-main,#manage-main,.hosting-main,.remote-main) { max-width:1320px; padding:0; margin:0; }
.ah-theme .admin-tabs { display:flex; flex-wrap:wrap; gap:4px; padding:0; margin-bottom:24px; border-bottom:1px solid var(--ah-border); }
.ah-theme .admin-tabs .ah-tab { flex:0 0 auto; margin-bottom:-1px; font-size:13px; }
.ah-theme .admin-tabs .ah-tab:focus-visible { outline-offset:-2px; }
.ah-theme #manage-panel:focus-visible { outline-offset:6px; }
.ah-theme .admin-toolbar { gap:20px; margin-bottom:20px; flex-wrap:wrap; }
.ah-theme .admin-toolbar form { min-width:0; }
.ah-theme .admin-users-wrap { overflow:visible; }
.ah-theme .admin-table { min-width:0; width:100%; font-size:13px; }
.ah-theme .admin-table th { background:var(--ah-raised); color:var(--ah-muted); font-size:10px; text-transform:uppercase; letter-spacing:1px; }
.ah-theme .admin-table :is(th,td) { border-color:var(--ah-border); overflow-wrap:anywhere; padding:16px; }
.ah-theme .admin-table tbody tr:hover { background:var(--ah-raised); }
.ah-theme :is(.admin-table small,.admin-table strong) { font-size:12px; }
.ah-theme .admin-empty { padding:24px; color:var(--ah-muted); }
.ah-theme .hosting-hero { background:radial-gradient(circle at 90% 0,#e6b66d15,transparent 55%),var(--ah-surface); color:var(--ah-text); border:1px solid var(--ah-border); border-radius:24px; box-shadow:none; padding:32px; }
.ah-theme :is(.hosting-hero h2,.hosting-hero .hosting-price,.hosting-price,.tv-info strong) { color:var(--ah-text); }
.ah-theme :is(.hosting-hero p,.hosting-hero .hosting-price small,.hosting-price small,.hosting-card>p) { color:var(--ah-muted); }
.ah-theme .hosting-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:24px; }
.ah-theme .hosting-card { padding:24px; border-radius:16px; border-color:var(--ah-border); }
.ah-theme .hosting-card h2 { font-size:22px; }
.ah-theme .venue-card>.eyebrow:first-child { color:var(--ah-accent); background:var(--ah-selected); border:1px solid #655237; }
.ah-theme .hosting-actions .button:hover { transform:none; box-shadow:none; }
/* Device rows (Studio overview, Venues, Package): structure lives here so every page that lists devices matches. */
.ah-theme .tv-list { list-style:none; display:grid; gap:10px; margin:0 0 4px; padding:0; }
.ah-theme .tv-row { display:flex; align-items:center; gap:14px; margin:0; background:var(--ah-bg); border:1px solid var(--ah-border); border-radius:10px; padding:14px 16px; }
.ah-theme .tv-dot { flex:none; width:10px; height:10px; border-radius:50%; background:var(--ah-muted); }
.ah-theme .tv-dot.is-connected { background:var(--ah-success); box-shadow:0 0 0 4px var(--ah-success-bg); }
.ah-theme .tv-dot.is-waiting { background:var(--ah-warning); box-shadow:0 0 0 4px var(--ah-warning-bg); }
.ah-theme .tv-info { flex:1 1 auto; min-width:0; }
.ah-theme .tv-info strong { display:block; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
.ah-theme .tv-info small { display:block; margin-top:2px; color:var(--ah-muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.ah-theme .tv-actions { display:flex; flex:none; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.ah-theme .overview-tv-pick { margin:0; padding:16px 24px 0; }
.ah-theme .tv-empty { background:var(--ah-bg); border-color:var(--ah-control); color:var(--ah-muted); border-radius:10px; }
.ah-theme :is(.hosting-message,#hosting-message,#manage-message,#admin-message) { color:var(--ah-info); font-size:13px; }
.ah-theme :is(.hosting-message,#hosting-message):not(:empty) { background:var(--ah-raised); border:1px solid var(--ah-control); border-radius:10px; padding:12px 16px; margin:20px 0; box-shadow:var(--ah-shadow); }
.ah-theme #manage-panel .card { padding:24px; }
.ah-theme .manage-banner { border-left:3px solid var(--ah-accent); padding:16px; }
.ah-theme .manage-qr { background:white; padding:8px; } /* QR quiet zone must remain white. */
.ah-theme :is(.publication-card small,.publication-preview li) { color:var(--ah-muted); }
.ah-theme :is(.hosting-track audio,audio) { color-scheme:dark; }

/* PC playback tools and in-app browser chrome; customer content stays untouched. */
.ah-theme .display-header { background:var(--ah-bg); border-color:var(--ah-border); padding:20px 4%; gap:20px; }
.ah-theme.ah-page-pc>main { max-width:1440px; padding:32px 4%; }
.ah-theme .music-card { background:var(--ah-surface); }
.ah-theme :is(.music-card>p:not(.helper),.music-card .music-note,.browser-home .browser-intro) { color:var(--ah-muted); font-size:13px; }
.ah-theme .music-title h2 { color:var(--ah-text); font:600 24px var(--ah-font); }
.ah-theme .stage-label { color:var(--ah-muted); }
.ah-theme :is(.stage-top strong,#current-name) { color:var(--ah-text); }
.ah-theme .empty-symbol { color:var(--ah-accent); }
.ah-theme .empty-state { background:radial-gradient(ellipse at bottom,#e6b66d0c,transparent),var(--ah-bg); }
.ah-theme .display-standby { background:radial-gradient(ellipse at bottom,#e6b66d0c,transparent),var(--ah-bg); color:var(--ah-text); }
.ah-theme .display-standby p { color:var(--ah-muted); }
.ah-theme .notice,.ah-theme #toast { background:var(--ah-raised); color:var(--ah-text); border:1px solid var(--ah-control); border-left:3px solid var(--ah-accent); border-radius:10px; box-shadow:var(--ah-shadow); font-size:13px; }
.ah-theme.browser-home { background:var(--ah-bg); color:var(--ah-text); }
.ah-theme .browser-home h1,.ah-theme.browser-home h1 { font-family:var(--ah-font); }
.ah-theme .browser-brand a { color:var(--ah-text); }
.ah-theme .remember-card { padding:24px; }
.ah-theme .remember-card h2 { font-size:20px; }
.ah-theme :is(.browser-shortcuts button,.remember-card .button) { border-color:var(--ah-control); }
.ah-theme :is(.floating-browser,.floating-home,.floating-browser-body,.browser-blocked) { background:var(--ah-surface); color:var(--ah-text); border-color:var(--ah-control); }
.ah-theme :is(.browser-drag,.floating-address-form,.floating-size-control,.floating-browser-footer) { background:var(--ah-raised); color:var(--ah-text); border-color:var(--ah-border); }
.ah-theme :is(.browser-drag,.floating-address-form,.floating-size-control) { height:auto; min-height:54px; }
.ah-theme .floating-browser-footer { height:auto; min-height:44px; }
.ah-theme .floating-address-form button { min-width:44px; min-height:44px; background:transparent; color:var(--ah-accent); }
.ah-theme .floating-size-control select { max-width:100%; }
/* This is a scaled display preview, with its own saved pixel bounds. Keep its
   compact chrome so full-page form sizing cannot consume the website viewport.
   Full-size browser, provider and size controls remain in the surrounding desk. */
.ah-theme #floating-browser .browser-drag { height:37px; min-height:37px; }
.ah-theme #floating-browser .floating-address-form { height:37px; min-height:37px; }
.ah-theme #floating-browser .floating-size-control { height:29px; min-height:29px; }
.ah-theme #floating-browser .floating-browser-footer { height:25px; min-height:25px; }
.ah-theme #floating-browser :is(input,select) { min-height:0; font:11px/1.4 var(--ah-font); padding:3px 5px; }
.ah-theme #floating-browser input[type=range] { padding:0; height:16px; }
.ah-theme #floating-browser .floating-size-control select { height:24px; width:100px; }
.ah-theme #floating-browser .browser-drag button { width:28px; height:28px; min-width:28px; min-height:28px; padding:0; }
.ah-theme #floating-browser .floating-address-form button { width:26px; min-width:26px; height:27px; min-height:27px; padding:0; }
.ah-theme :is(.browser-drag button,.floating-home button,.popup-restore) { background:var(--ah-bg); color:var(--ah-text); border:1px solid var(--ah-control); min-width:44px; min-height:44px; }
.ah-theme :is(.floating-home p,.floating-home small,.floating-browser-footer,.floating-size-control label,.browser-blocked p) { color:var(--ah-muted); }
.ah-theme :is(#browser-layout-status,.drag-dots) { color:var(--ah-muted); }
.ah-theme #browser-resize { color:var(--ah-accent); }
.ah-theme .floating-ghost { border-color:var(--ah-accent); background:#e6b66d14; box-shadow:0 12px 38px #0006; }
.ah-theme .floating-ghost span { background:var(--ah-selected); color:var(--ah-accent); }
.ah-theme .music-card .music-note { color:var(--ah-muted)!important; font-size:12px!important; }
.ah-theme .popup-content-setting { color:var(--ah-muted); }
.ah-theme.presenting { background:#000; }
.ah-theme.presenting>main { padding:0; max-width:none; }
.ah-theme.presenting .stage-card { border:0; border-radius:0; background:#000; }
.ah-theme.full-preview .workspace { margin:0; }
.ah-theme.full-preview .workspace>main { max-width:none; padding:0; }
.ah-theme.full-preview .sidebar { display:none; }

/* Real application dialogs and feedback are themed alongside the pages. */
.ah-theme dialog { background:var(--ah-surface); color:var(--ah-text); border:1px solid var(--ah-control); border-radius:16px; max-width:calc(100% - 32px); max-height:calc(100dvh - 32px); overflow:auto; box-shadow:var(--ah-shadow); }
.ah-theme dialog::backdrop { background:#080a08bb; backdrop-filter:blur(4px); }
.ah-theme dialog.ah-dialog { width:min(560px,calc(100% - var(--ah-space-6))); padding:var(--ah-space-5); }
.ah-theme .ah-dialog-content { display:grid; gap:var(--ah-space-4); }
@media(max-width:600px){.ah-theme dialog.ah-dialog{padding:var(--ah-space-3);}}
.ah-theme :is(#admin-dialog,#manage-dialog,.legacy-import,.browser-help) { border:1px solid var(--ah-control); background:var(--ah-surface); color:var(--ah-text); padding:24px; }
.ah-theme #admin-dialog { padding:0; }
.ah-theme :is(.modal-head h2,dialog h2) { color:var(--ah-text); font:600 25px/1.25 var(--ah-font); }
.ah-theme :is(.modal-body>p:first-child,dialog>p) { color:var(--ah-muted); font-size:13px; }
.ah-theme :is(.modal-actions,.dialog-actions) { display:flex; flex-wrap:wrap; }
.ah-theme.privacy main { max-width:820px; padding:48px 24px; }
.ah-theme.privacy :is(h1,h2) { font-family:var(--ah-font); font-weight:600; margin:32px 0 16px; }
.ah-theme.privacy h2 { font-size:21px; }
.ah-theme.privacy p { color:var(--ah-muted); font-size:14px; line-height:1.9; }
.ah-theme.privacy .ah-product-brand { margin-bottom:28px; }

@media(max-width:1200px) {
  .ah-theme :is(.studio-grid,.bottom-grid) { grid-template-columns:minmax(0,1fr); }
  .ah-theme .right-stack { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ah-theme .topbar { flex-wrap:wrap; }
  .ah-theme .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:1000px) {
  .ah-theme .workspace { margin-left:0; }
  .ah-theme :is(#studio-content,.ah-workspace-page)>.sidebar { position:static; width:100%; height:auto; max-height:none; }
  .ah-theme.ah-nav-ready :is(#studio-content,.ah-workspace-page)>.sidebar { display:none; }
  .ah-theme .ah-mobile-toggle,.ah-theme .ah-mobile-close { display:inline-flex; }
  .ah-theme .topbar { padding:16px 24px; }
  .ah-theme .workspace>main { padding:28px 24px; }
  .ah-theme .account-shell { grid-template-columns:minmax(250px,36%) minmax(0,1fr); }
  .ah-theme .account-story { padding:32px 24px; }
  .ah-theme .account-panel { padding:24px; }
  .ah-theme .story-copy h1 { font-size:42px; }
}
@media(max-width:680px) {
  .ah-theme :is(.page-heading,.intro) { flex-direction:column; align-items:stretch; gap:18px; margin-bottom:24px; }
  .ah-theme .page-heading .heading-actions { display:flex; flex-direction:row; }
  .ah-theme :is(.heading-actions,.intro-actions,.device-buttons)>.button { flex:1 1 auto; }
  .ah-theme :is(.studio-grid,.bottom-grid,.right-stack,.form-grid,.manage-grid,.admin-plan-grid,.admin-form-grid,.tv-music-desk,.devices-grid) { grid-template-columns:minmax(0,1fr); }
  .ah-theme .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ah-theme .metric { padding:16px; }
  .ah-theme .metric-value { font-size:28px; }
  .ah-theme .card-head { padding:18px; align-items:flex-start; }
  .ah-theme .card-head .heading-actions { width:100%; }
  .ah-theme .quiet-card { display:block; }
  .ah-theme .playlist-row { grid-template-columns:24px 58px minmax(0,1fr); padding:16px; gap:10px; }
  .ah-theme .playlist-row :is(img,video) { width:58px; }
  .ah-theme .playlist-row .row-actions { grid-column:2/-1; }
  .ah-theme .playlist-settings { flex-direction:column; align-items:stretch; }
  .ah-theme .preview-controls { padding:12px 16px; flex-wrap:wrap; gap:12px; }
  .ah-theme .workspace>main { padding:24px 18px; }
  .ah-theme .topbar { min-height:68px; padding:12px 18px; gap:12px; }
  .ah-theme .topbar>div:first-of-type { flex:1; font-size:11px; }
  .ah-theme .topbar-actions { width:100%; }
  .ah-theme .topbar-actions>.button { flex:1; }
  .ah-theme .topbar .account-navigation { width:100%; order:3; }
  .ah-theme .workspace>footer { padding:24px 18px; }
  .ah-theme #toast { left:50%; width:calc(100% - 32px); }
  .ah-theme .account-shell { display:block; }
  .ah-theme .account-story { padding:20px 18px; border-right:0; border-bottom:1px solid var(--ah-border); }
  .ah-theme .account-story :is(.story-copy,.story-footer) { display:none; }
  .ah-theme .account-panel { padding:18px; }
  .ah-theme .account-tabs { justify-content:flex-end; gap:24px; margin-bottom:4px; }
  .ah-theme .account-content { margin:16px auto; padding:24px 20px; }
  .ah-theme .account-content h2 { font-size:28px; }
  .ah-theme .flow-steps { gap:8px; flex-wrap:wrap; margin-bottom:24px; }
  .ah-theme .flow-steps span { white-space:normal; }
  .ah-theme .account-choices { gap:10px; }
  .ah-theme .account-content .account-choice { padding:12px 10px; }
  .ah-theme .account-choice { padding:14px 10px; gap:8px; }
  .ah-theme.auth-page { padding:24px 18px; }
  .ah-theme .auth-card { padding:28px 22px; }
  .ah-theme .workspace-body { padding:24px 18px; }
  .ah-theme .admin-tabs { gap:0; }
  .ah-theme .admin-tabs .ah-tab { padding:12px; }
  .ah-theme .admin-toolbar { flex-direction:column; align-items:stretch; }
  .ah-theme .admin-toolbar form { width:100%; }
  .ah-theme .admin-users-wrap { border-radius:10px; }
  .ah-theme .admin-table,.ah-theme .admin-table :is(tbody,tr,td) { display:block; width:100%; min-width:0; }
  .ah-theme .admin-table thead { display:none; }
  .ah-theme .admin-table tr { padding:12px 16px; border-bottom:1px solid var(--ah-border); }
  .ah-theme .admin-table td { display:grid; grid-template-columns:88px minmax(0,1fr); gap:8px; padding:8px 0; border:0; }
  .ah-theme .admin-table td::before { content:attr(data-label); color:var(--ah-muted); font-size:10px; text-transform:uppercase; letter-spacing:.5px; }
  .ah-theme .admin-table td>* { grid-column:2; }
  .ah-theme .admin-table td>small { margin:0; }
  .ah-theme .admin-table td[colspan] { display:block; }
  .ah-theme .admin-table td[colspan]::before { display:none; }
  .ah-theme .admin-paging { gap:12px; flex-wrap:wrap; }
  .ah-theme .hosting-hero { display:block; padding:24px; }
  .ah-theme .hosting-hero h2 { font-size:26px; }
  .ah-theme .hosting-card { padding:20px; }
  .ah-theme .hosting-track { align-items:stretch; flex-direction:column; }
  .ah-theme :is(.hosting-actions,.tv-actions) .button { flex:1 1 auto; }
  .ah-theme :is(.remote-input-row,.address-row) { flex-wrap:wrap; }
  .ah-theme :is(.remote-input-row,.address-row) input { flex-basis:100%; width:100%; }
  .ah-theme :is(.remote-setup,.remote-controls) { padding:18px; }
  .ah-theme .display-header { padding:18px; gap:16px; }
  .ah-theme .display-header .header-actions { width:100%; }
  .ah-theme.ah-page-pc>main { padding:24px 18px; }
  .ah-theme .display-mode-bar label { min-width:0; }
  .ah-theme .display-mode-bar { display:block; padding:18px; }
  .ah-theme .music-website-form { padding:18px; }
  .ah-theme .music-website-form label { min-width:0; flex-basis:100%; }
  .ah-theme .tv-music-desk { padding:20px; }
  .ah-theme .stage-footer { flex-wrap:wrap; gap:12px; }
  .ah-theme .floating-size-control { flex-wrap:wrap; }
  .ah-theme .browser-home main,.ah-theme.browser-home main { padding:28px 18px; }
  .ah-theme :is(.modal-actions,.dialog-actions)>.button { flex:1; }
  .ah-theme :is(#admin-dialog,#manage-dialog,.browser-help) { padding:20px; }
  .ah-theme #admin-dialog { padding:0; }
  .ah-theme #admin-dialog-content { padding:20px; }
  .ah-theme .day-pills { flex-wrap:wrap; }
  .ah-theme .day-pills label { flex:1 0 20%; min-height:44px; }
  .ah-theme .device-body p { gap:12px; flex-wrap:wrap; }
  .ah-theme .publication-card { display:block; }
}
@media(prefers-reduced-motion:reduce) {
  .ah-theme *,.ah-theme *::before,.ah-theme *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

/* Line icons: 24px grid, 1.7px round strokes, drawn in the current text colour.
   Use <i class="ah-i ah-i-name" aria-hidden="true"></i>, or add "ah-ib ah-i-name"
   to a button or link to draw the icon before its label ("ah-ib-end": after).
   Icon-only controls keep their existing aria-label. */
.ah-i { display:inline-block; width:18px; height:18px; flex:none; vertical-align:-4px; }
.ah-i,.ah-ib::before { background:currentColor; -webkit-mask:var(--ah-i) center/contain no-repeat; mask:var(--ah-i) center/contain no-repeat; }
.ah-ib { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.ah-ib::before { content:''; width:18px; height:18px; flex:none; }
.ah-ib.ah-ib-end::before { order:1; }
.ah-theme :is(h2,h3)>.ah-i { width:20px; height:20px; color:var(--ah-accent); }
@media(forced-colors:active) { .ah-i,.ah-ib::before { forced-color-adjust:none; background:CanvasText; } }
.ah-i-pc-display{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cpath d='m10 7 5 3-5 3zM8 21h8M12 17v4'/%3E%3C/svg%3E")}
.ah-i-music{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13M9 9l12-2'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E")}
.ah-i-venues{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14M9 21v-6h6v6M9 10h1M14 10h1'/%3E%3C/svg%3E")}
.ah-i-security{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 8 3v6c0 5-8 9-8 9s-8-4-8-9V6zM9 12l2 2 4-4'/%3E%3C/svg%3E")}
.ah-i-overview{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E")}
.ah-i-library{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m3 17 5-5 4 4 3-3 6 6'/%3E%3C/svg%3E")}
.ah-i-playlist{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h12M9 12h12M9 18h12M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E")}
.ah-i-displays{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E")}
.ah-i-settings{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h2M10 17h10'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='8' cy='17' r='2'/%3E%3C/svg%3E")}
.ah-i-subscription{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20M6 15h4'/%3E%3C/svg%3E")}
.ah-i-admin{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='m11 12 9-9M17 6l3 3M14 9l2 2'/%3E%3C/svg%3E")}
.ah-i-upload{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3M7 8l5-5 5 5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E")}
.ah-i-download{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E")}
.ah-i-plus{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
.ah-i-minus{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E")}
.ah-i-restore{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='14' rx='2'/%3E%3C/svg%3E")}
.ah-i-expand{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E")}
.ah-i-collapse{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5'/%3E%3C/svg%3E")}
.ah-i-globe{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 3.8 5.5 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.5-3.8-9S9.5 5.5 12 3'/%3E%3C/svg%3E")}
.ah-i-external{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E")}
.ah-i-home{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 9-8 9 8M5 9.5V20h5v-6h4v6h5V9.5'/%3E%3C/svg%3E")}
.ah-i-enter{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 4v7a3 3 0 0 1-3 3H5M9 10l-4 4 4 4'/%3E%3C/svg%3E")}
.ah-i-resize{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10v10H10M20 15l-5 5'/%3E%3C/svg%3E")}
.ah-i-grip{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01'/%3E%3C/svg%3E")}
.ah-i-sparkle{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M3 12h18M5.6 5.6l12.8 12.8M18.4 5.6 5.6 18.4'/%3E%3C/svg%3E")}
.ah-i-clock{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E")}
.ah-i-publish{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12a7 7 0 0 1 14 0M8.5 12a3.5 3.5 0 0 1 7 0M12 12v9M9 21h6'/%3E%3C/svg%3E")}
.ah-i-play{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 5 11 7-11 7z'/%3E%3C/svg%3E")}
.ah-i-pause{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5v14M15 5v14'/%3E%3C/svg%3E")}
.ah-i-previous{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E")}
.ah-i-next{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}
.ah-i-layout{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18M9 9v11'/%3E%3C/svg%3E")}
.ah-i-side-by-side{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M14 4v16'/%3E%3C/svg%3E")}
.ah-i-picture-in-picture{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Crect x='12' y='11' width='6' height='6' rx='1'/%3E%3C/svg%3E")}
.ah-i-arrow-up{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M6 11l6-6 6 6'/%3E%3C/svg%3E")}
.ah-i-arrow-down{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E")}
.ah-i-arrow-left{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E")}
.ah-i-chevron-down{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
.ah-i-menu{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E")}
.ah-i-close{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E")}
.ah-i-activity{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l3-8 4 16 3-8h4'/%3E%3C/svg%3E")}
.ah-i-tv-pair{--ah-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4M12 8v5M9.5 10.5h5'/%3E%3C/svg%3E")}

/* Text sizes follow the reference: 12px help/meta text, smaller only for short
   uppercase labels the kit also sets small (eyebrows, nav labels, table heads). */
.ah-theme :is(.metric-top,.layout-summary span,.layout-summary strong,.quiet-card p,.quiet-card a,
  .inline-status,.upload-drop p,.stage-footer,.stage-footer span,#slide-counter,.stage-top strong,#current-name,
  .window-dimensions,.layout-state) { font-size:12px; }
.ah-theme .metric-top { color:var(--ah-muted); align-items:center; }
.ah-theme .metric-icon { width:20px; height:20px; color:var(--ah-accent); }
.ah-theme :is(.venue-switch small,.profile small) { font-size:11px; }
.ah-theme .profile { display:flex; align-items:center; gap:12px; width:100%; border-top:1px solid var(--ah-border); }
.ah-theme .profile>span:last-child { min-width:0; overflow-wrap:anywhere; font-size:12px; }
.ah-theme .profile small { display:block; }
.ah-theme .avatar { display:inline-grid; place-items:center; width:38px; height:38px; flex:none; border:1px solid #655237; border-radius:50%; font:700 13px var(--ah-font); }

/* Loading states use the reference skeleton instead of plain text. */
.ah-theme :is(.workspace-loading,.ah-loading) { display:grid; gap:12px; padding:24px; border:1px solid var(--ah-border); border-radius:16px; background:var(--ah-surface); color:var(--ah-muted); font-size:13px; }
.ah-theme :is(.workspace-loading,.ah-loading) .ah-skeleton:last-child { width:60%; }

/* Inputs: legacy ID rules (#manage-panel input) and default range/file styles. */
.ah-theme :is(#manage-panel,#manage-dialog) :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]) { background:var(--ah-bg); color:var(--ah-text); border:1px solid var(--ah-control); }
.ah-theme input[type=range] { border:0; padding:0; box-shadow:none; }
.ah-theme input[type=file] { width:100%; background:var(--ah-bg); color:var(--ah-muted); border:1px dashed var(--ah-control); border-radius:6px; padding:8px; }

/* PC display tools and the popup browser start page. */
.ah-theme .list-empty { background:var(--ah-bg); border:1px dashed var(--ah-control); border-radius:10px; color:var(--ah-muted); font-size:13px; }
.ah-theme .browser-size-setting { background:var(--ah-bg); border:1px solid var(--ah-border); border-radius:10px; }
.ah-theme .browser-size-setting label { color:var(--ah-text); }
.ah-theme .browser-size-setting output { color:var(--ah-accent); font-weight:600; }
.ah-theme .popup-options summary { display:flex; justify-content:space-between; list-style:none; cursor:pointer; align-items:center; gap:8px; min-height:44px; color:var(--ah-text); font-size:13px; }
.ah-theme .popup-options summary::-webkit-details-marker { display:none; }
.ah-theme .popup-options[open] summary::before { transform:rotate(180deg); }
.ah-theme .layout-state { color:var(--ah-muted); }
.ah-theme .stage-footer { color:var(--ah-muted); }
.ah-theme .youtube-mark { display:inline-grid; place-items:center; width:40px; height:40px; padding:0; background:var(--ah-selected); color:var(--ah-accent); border:1px solid #655237; border-radius:10px; }
.ah-theme .youtube-mark .ah-i { width:20px; height:20px; }
.ah-theme .empty-symbol { width:36px; height:36px; }
.ah-theme .drag-dots { width:16px; height:16px; }
.ah-theme #floating-browser .ah-ib::before { width:14px; height:14px; }
.ah-theme .browser-brand { color:var(--ah-text); }
.ah-theme .browser-brand small { color:var(--ah-muted); font-size:8px; letter-spacing:2.5px; }
.ah-theme :is(.browser-footnote,.window-dimensions) { color:var(--ah-muted); font-size:12px; line-height:1.7; }
.ah-theme .remember-card p { font-size:13px; }
/* Typed text stays at 16px on touch screens so focusing it never zooms the page. */
@media(pointer:coarse),(max-width:680px) {
  .ah-theme #floating-browser :is(input,select) { font-size:16px; line-height:1.2; padding:2px 5px; }
}
@media(max-width:1000px) {
  .ah-theme .workspace-body { padding:28px 24px; }
}
@media(max-width:680px) {
  .ah-theme .workspace-body { padding:24px 18px; }
  .ah-theme .workspace-body>.page-heading { margin-bottom:24px; }
}

/* PRD 2.2 account tools: packages, support visits, suspension and legal pages. Phone first. */
.ah-theme .package-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); }
.ah-theme .package-card { display:flex; flex-direction:column; gap:12px; }
.ah-theme .package-card.is-current { border-color:var(--ah-accent); background:var(--ah-selected); }
.ah-theme .package-card .button { margin-top:auto; min-height:44px; }
.ah-theme .package-price { display:grid; gap:4px; }
.ah-theme .package-price strong { color:var(--ah-accent); font-size:20px; font-family:var(--ah-display); font-weight:400; }
.ah-theme .package-price small { color:var(--ah-muted); font-size:12px; line-height:1.6; }
.ah-theme .package-includes { margin:0; padding-left:18px; color:var(--ah-muted); line-height:1.8; }
.ah-theme .package-tv-row .tv-actions { flex-wrap:wrap; }
.ah-theme .package-tv-row .button,.ah-theme .tv-allowance .button { min-height:44px; }
.ah-theme .tv-allowance { margin-bottom:24px; }
.ah-theme .support-banner { position:fixed; inset:auto 16px 16px 16px; z-index:50; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; background:var(--ah-info-bg); color:var(--ah-text); border:1px solid var(--ah-info); border-radius:var(--ah-radius); box-shadow:var(--ah-shadow); }
.ah-theme .support-banner-text { font-size:13px; line-height:1.5; min-width:0; flex:1 1 220px; }
.ah-theme .support-banner .button { min-height:44px; }
.ah-theme:has(.support-banner) { padding-bottom:96px; }
.ah-theme .footer-legal { display:flex; flex-wrap:wrap; gap:6px 16px; }
.ah-theme .account-legal { display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:10px; font-size:12px; }
.ah-theme .account-legal a { color:var(--ah-muted); padding:6px 0; }
.ah-theme .account-suspended { width:min(440px,calc(100% - 32px)); padding:24px; }
.ah-theme .account-suspended h2 { font-family:var(--ah-display); font-weight:400; font-size:24px; margin-bottom:12px; }
.ah-theme .account-suspended p { color:var(--ah-text); line-height:1.7; margin-bottom:20px; overflow-wrap:anywhere; }
.ah-theme .admin-actions-row { display:flex; flex-wrap:wrap; gap:8px; }
.ah-theme .admin-flags { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.ah-theme .admin-flag { display:inline-block; padding:2px 8px; border-radius:999px; border:1px solid var(--ah-border); font-size:11px; color:var(--ah-muted); }
.ah-theme .admin-flag.is-danger { color:var(--ah-danger); background:var(--ah-danger-bg); border-color:#7a4442; }
.ah-theme .admin-flag.is-good { color:var(--ah-success); background:var(--ah-success-bg); border-color:#3f6844; }
.ah-theme .tv-music-row { display:grid; gap:10px; padding:14px 0; border-top:1px solid var(--ah-border); }
.ah-theme .tv-music-row:first-of-type { border-top:0; }
.ah-theme .tv-music-row select,.ah-theme .tv-music-row input { min-height:44px; width:100%; }
.ah-theme.ah-legal main { max-width:820px; padding:40px 20px 64px; margin:0 auto; }
.ah-theme.ah-legal .legal-nav { display:flex; flex-wrap:wrap; gap:6px 18px; margin:0 0 28px; }
.ah-theme.ah-legal .legal-nav a { color:var(--ah-muted); padding:8px 0; text-decoration:none; border-bottom:2px solid transparent; }
.ah-theme.ah-legal .legal-nav a[aria-current="page"] { color:var(--ah-accent); border-bottom-color:var(--ah-accent); }
.ah-theme.ah-legal .legal-lead { color:var(--ah-text); font-size:16px; }
.ah-theme.ah-legal :is(ul) { color:var(--ah-muted); font-size:14px; line-height:1.9; padding-left:20px; }
.ah-theme.ah-legal li { margin-bottom:6px; }
.ah-theme.ah-legal li strong { color:var(--ah-text); }
.ah-theme.ah-legal .legal-table-wrap { overflow-x:auto; margin:20px 0; border:1px solid var(--ah-border); border-radius:var(--ah-radius); }
.ah-theme.ah-legal .legal-table { width:100%; border-collapse:collapse; font-size:13px; line-height:1.6; }
.ah-theme.ah-legal .legal-table :is(th,td) { text-align:left; vertical-align:top; padding:12px 14px; border-top:1px solid var(--ah-border); }
.ah-theme.ah-legal .legal-table thead th { border-top:0; color:var(--ah-muted); font-size:11px; letter-spacing:1px; text-transform:uppercase; }
.ah-theme.ah-legal .legal-table tbody th { color:var(--ah-text); font-weight:600; width:38%; }
.ah-theme.ah-legal .legal-table td { color:var(--ah-muted); }
@media(max-width:680px) {
  .ah-theme.ah-legal .legal-table,.ah-theme.ah-legal .legal-table tbody,.ah-theme.ah-legal .legal-table tr,.ah-theme.ah-legal .legal-table :is(th,td) { display:block; width:auto; }
  .ah-theme.ah-legal .legal-table thead { display:none; }
  .ah-theme.ah-legal .legal-table td { border-top:0; padding-top:0; }
  .ah-theme .support-banner { inset:auto 8px 8px 8px; }
}

/* What a TV shows (tv-screen.mjs): adverts fill the 16:9 screen; the music browser floats over them. */
.ah-theme .tv-screen { position:relative; overflow:hidden; aspect-ratio:16/9; width:100%; }
.ah-theme .tv-screen .tv-screen-media { position:absolute; inset:0; }
.ah-theme .tv-screen-browser { position:absolute; z-index:3; display:grid; place-content:center; justify-items:center; gap:4px; text-align:center; padding:6px; background:var(--ah-raised); color:var(--ah-text); border:2px solid var(--ah-accent); border-radius:6px; box-shadow:0 6px 24px #0008; font-size:12px; overflow:hidden; }
.ah-theme .tv-screen-browser small { color:var(--ah-muted); font-size:10px; }
.ah-theme .tv-screen-browser .yt-mark { width:28px; height:28px; }
.ah-theme .overview-tv select,.ah-theme #tv-playlist { width:100%; min-height:44px; margin-bottom:12px; }
.ah-theme .tv-anchors { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 12px; }
.ah-theme .tv-anchors .button { min-height:44px; }
.ah-theme .tv-detail input[type=range] { width:100%; min-height:44px; accent-color:var(--ah-accent); }
.ah-theme .tv-detail .preview-controls .admin-check { display:flex; gap:8px; align-items:center; min-height:44px; }
.ah-theme .pc-tvs { margin:0 0 24px; }
.ah-theme .pc-tvs label { display:grid; gap:6px; margin-bottom:12px; }
.ah-theme .pc-tvs select { min-height:44px; }
.ah-theme .pc-tvs .screen-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; margin:10px 0; color:var(--ah-muted); font-size:12px; }

/* Per-device reported adverts use the same full-width stage on phones. */
.ah-theme .venue-device-screens{display:grid;gap:20px;margin-top:24px;min-width:0}.ah-theme .venue-device-screen{min-width:0}.ah-theme .venue-device-screen h3{margin-bottom:10px;overflow-wrap:anywhere}.ah-theme .venue-device-screen .tv-screen{width:100%;aspect-ratio:16/9;min-height:0}.ah-theme .venue-device-screen .helper{overflow-wrap:anywhere}
@media(max-width:680px) { .ah-theme .overview-tv-pick { padding:14px 18px 0; } }
/* Spacing system (AGENTS.md): one scale, --ah-space-1..8 (4-64px). Content sits at least 16px inside a
   card or panel (12px on phones) and stacked controls keep at least 8px from the text around them.
   scripts/check-after-hours-ui.mjs measures both rules on every page. */
.ah-theme :where(.card,.library-card,.music-card,.settings-form,.account-content,#email-code-panel,.remote-setup,.form-field,#admin-dialog-content,#dialog-content .modal-body,.hosting-card,.popup-options,.preview-banner,form)>:is(.button,button,select,input,textarea,.heading-actions,.hosting-actions,.admin-actions-row):not([type=checkbox]):not([type=radio])+:is(p,.helper,small,.form-error,.account-note,h3,ul,ol) { margin-top:var(--ah-space-3); }
.ah-theme :where(.card,.library-card,.music-card,.settings-form,.account-content,#email-code-panel,.remote-setup,.form-field,#admin-dialog-content,#dialog-content .modal-body,.hosting-card,.popup-options,.preview-banner,form)>:is(p,.helper,small,label,.form-field,h2,h3,.account-note)+:is(.button,button,.heading-actions,.hosting-actions,form) { margin-top:var(--ah-space-3); }
.ah-theme :where(.card,.library-card,.music-card,.account-content,#email-code-panel,.remote-setup,#admin-dialog-content,.hosting-card,.preview-banner)>:is(.button,button)+:is(.button,button) { margin-top:var(--ah-space-2); }
.ah-theme :is(.admin-detail-head,.admin-actions-row)+h3 { margin-top:var(--ah-space-5); }
.ah-theme #admin-dialog-content :is(form,p)+.admin-dialog-close,.ah-theme #admin-dialog-content form+p { margin-top:var(--ah-space-3); }
.ah-theme :is(.asset-actions,.account-access-actions,.heading-actions,.hosting-actions,.admin-actions-row) { gap:var(--ah-space-2); }
.ah-theme .pc-tvs { padding:var(--ah-space-5); margin:var(--ah-space-5) 0; }
.ah-theme .pc-tvs>h2 { margin:0 0 var(--ah-space-2); }
.ah-theme .pc-tvs>.helper { margin:var(--ah-space-3) 0; }
.ah-theme :is(.tv-allowance,.tv-detail>.card) { padding-bottom:var(--ah-space-4); }
.ah-theme :is(.tv-allowance>.helper,#tv-note) { padding:0 var(--ah-space-5); }
.ah-theme .tv-row { flex-wrap:wrap; }
.ah-theme .tv-info { flex:1 1 160px; }
.ah-theme .tv-actions { margin-left:auto; max-width:100%; }
/* Agent ad lock: title, explanation, send-code button, code field and unlock button as one stack. */
.ah-theme .preview-banner.venue-lock { display:block; padding:var(--ah-space-5); }
.ah-theme .venue-lock>div { display:grid; justify-items:start; gap:var(--ah-space-3); }
.ah-theme .venue-lock>div>* { margin:0; }
.ah-theme .venue-lock form { display:grid; justify-items:start; gap:var(--ah-space-3); width:min(100%,420px); }
.ah-theme .venue-lock .form-field { display:grid; gap:var(--ah-space-2); width:100%; margin:0; }
.ah-theme .venue-lock strong { color:var(--ah-text); font-size:14px; }
.ah-theme .venue-lock p { color:var(--ah-muted); }
/* Helper text belongs to the field above it: always 8px below the control. */
.ah-theme :is(.form-field,.popup-options,.account-field)>:is(.helper,.account-note,small.helper):not(:first-child) { margin-top:var(--ah-space-2); }
.ah-theme .account-content .account-access-actions { row-gap:var(--ah-space-3); }
.ah-theme .account-access-actions+:is(p,.account-note) { margin-top:var(--ah-space-3); }
.ah-theme .account-content .account-access-actions>:is(p,.form-error):not(:empty) { margin-top:var(--ah-space-3); margin-bottom:var(--ah-space-3); }
.ah-theme .account-content #invitation-note { margin-top:var(--ah-space-4); }
.ah-theme .form-field .password-control+:is(.account-note,.helper,small) { display:block; margin-top:var(--ah-space-2); }
@media(max-width:680px) {
  .ah-theme .pc-tvs { padding:var(--ah-space-3); }
  .ah-theme :is(.tv-allowance>.helper,#tv-note) { padding:0 var(--ah-space-3); }
  .ah-theme .preview-banner.venue-lock { padding:var(--ah-space-4); }
  .ah-theme .tv-actions { width:100%; margin-left:0; }
}

/* Role dashboards: the approved v2.7 composition, using the shared theme. */
.ah-theme .ah-panel { display:grid; align-content:start; gap:var(--ah-space-4); padding:var(--ah-space-5); }
.ah-theme .ah-panel > :is(h2,h3,p,form,dl) { margin:0; }
.ah-theme .ah-panel h2 { font-size:18px; }
.ah-theme .ah-panel p { color:var(--ah-muted); }
.ah-theme .ah-panel form { display:grid; gap:var(--ah-space-4); }
.ah-theme .ah-actions { display:flex; align-items:center; flex-wrap:wrap; gap:var(--ah-space-3); }
.ah-theme .ah-note { display:grid; gap:var(--ah-space-2); padding:var(--ah-space-4); background:var(--ah-selected); border-left:3px solid var(--ah-accent); margin-bottom:var(--ah-space-5); }
.ah-theme .ah-note p { margin:0; color:var(--ah-muted); font-size:12px; }
.ah-theme .ah-workspace-context { display:grid; gap:var(--ah-space-2); padding:var(--ah-space-4); border-block:1px solid var(--ah-border); }
.ah-theme .ah-workspace-context strong { font-size:14px; }
.ah-theme .ah-workspace-context span { font-size:12px; color:var(--ah-muted); }
.ah-theme .ah-workspace-context .ah-role-label { color:var(--ah-accent); }
.ah-theme .ah-nav-group { display:grid; gap:var(--ah-space-2); }
.ah-theme .ah-nav-group .nav-label { margin:0; padding:0 var(--ah-space-3); text-transform:none; font-size:12px; letter-spacing:0; }
.ah-theme .sidebar { width:248px; padding:var(--ah-space-5) var(--ah-space-4); gap:var(--ah-space-5); overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-gutter:stable; }
.ah-theme .sidebar > * { flex-shrink:0; }
.ah-theme .sidebar .ah-product-brand { padding:var(--ah-space-2); }
.ah-theme .sidebar .nav-item { min-height:48px; margin:0 0 var(--ah-space-1); padding:var(--ah-space-3); gap:var(--ah-space-3); border-radius:var(--ah-radius-sm); font-size:13px; }
.ah-theme .sidebar .nav-item.active { border:1px solid var(--ah-accent); box-shadow:none; }
.ah-theme .sidebar-bottom { display:grid; gap:var(--ah-space-3); padding:var(--ah-space-4) var(--ah-space-2); border-top:1px solid var(--ah-border); }
.ah-theme .sidebar-bottom p { margin:0; font:12px/1.7 var(--ah-font); }
.ah-theme .sidebar .profile { min-width:0; padding:var(--ah-space-3) 0 0; gap:var(--ah-space-3); }
.ah-theme .profile > span:last-child { min-width:0; overflow-wrap:anywhere; }
.ah-theme .workspace { margin-left:248px; }
.ah-theme .topbar { min-height:80px; padding:var(--ah-space-4) var(--ah-space-6); gap:var(--ah-space-4); }
.ah-theme :is(.workspace>main,.workspace-body) { width:100%; max-width:1320px; margin-inline:auto; padding:var(--ah-space-6); }
.ah-theme .page-heading { gap:var(--ah-space-4); margin-bottom:var(--ah-space-5); }
.ah-theme .page-heading h1 { margin:var(--ah-space-3) 0; font-size:clamp(28px,3vw,38px); font-weight:500; }
.ah-theme :is(.heading-actions,.topbar-actions) { gap:var(--ah-space-3); }
.ah-theme :is(.metrics,.devices-grid,.library-grid,.manage-grid) { gap:var(--ah-space-4); }
.ah-theme .metric { padding:var(--ah-space-5); }
.ah-theme .metric-value { font-size:36px; font-weight:500; }
.ah-theme :is(.studio-grid,.bottom-grid) { grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr); gap:var(--ah-space-5); }
.ah-theme .ah-dashboard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ah-space-5); margin-block:var(--ah-space-5); }
.ah-theme .ah-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ah-space-4); }
.ah-theme .ah-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ah-space-4); margin:0; }
.ah-theme .ah-facts > div { display:grid; gap:var(--ah-space-2); padding-bottom:var(--ah-space-4); border-bottom:1px solid var(--ah-border); }
.ah-theme .ah-facts dt { font-size:12px; color:var(--ah-muted); }
.ah-theme .ah-facts dd { margin:0; }
.ah-theme .ah-steps { display:grid; gap:var(--ah-space-4); padding-left:var(--ah-space-5); margin:0; color:var(--ah-muted); }
.ah-theme .ah-empty { display:grid; place-items:center; gap:var(--ah-space-4); text-align:center; padding:var(--ah-space-6) var(--ah-space-4); }
.ah-theme .ah-empty > .ah-i { width:48px; height:48px; color:var(--ah-accent); }
.ah-theme .ah-status-label { color:var(--ah-accent); font-size:12px; }
.ah-theme .ah-status-label.is-warning { color:var(--ah-warning); }
.ah-theme .ah-status-label.is-danger { color:var(--ah-danger); }
.ah-theme .ah-venue-list { display:grid; gap:var(--ah-space-4); }
.ah-theme .ah-venue-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:var(--ah-space-4); align-items:center; }
.ah-theme .ah-venue-row h3 { margin:0; }
.ah-theme .ah-venue-row p { margin:var(--ah-space-2) 0 0; }
.ah-theme .ah-location-review { padding:var(--ah-space-4); background:var(--ah-selected); border-left:3px solid var(--ah-accent); display:grid; gap:var(--ah-space-2); }
.ah-theme .ah-location-review :is(p,h3) { margin:0; }
.ah-theme .ah-stack { display:grid; gap:var(--ah-space-4); }
.ah-theme .ah-remote-placeholder { display:flex; align-items:center; justify-content:center; gap:var(--ah-space-4); padding:var(--ah-space-5); }
.ah-theme .ah-remote-placeholder .ah-i { width:48px; height:48px; flex:0 0 48px; color:var(--ah-accent); }
.ah-theme .ah-remote-placeholder p { margin:0; text-align:left; }
.ah-theme .ah-secondary-controls { border-top:1px solid var(--ah-border); padding-top:var(--ah-space-4); }
.ah-theme .ah-secondary-controls summary { cursor:pointer; min-height:44px; display:flex; align-items:center; color:var(--ah-accent); }
.ah-theme .ah-secondary-controls[open] { display:grid; gap:var(--ah-space-4); }
.ah-theme .remote-main { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr); gap:var(--ah-space-5); }
.ah-theme .remote-setup { grid-column:1; }
.ah-theme .remote-controls { grid-column:2; }
.ah-theme .remote-surface { border:1px solid var(--ah-border); border-radius:var(--ah-radius-sm); }
.ah-theme .remote-surface:has(#remote-frame[hidden]) { min-height:240px; display:grid; place-items:center; }
.ah-theme .remote-setup .form-field { width:100%; }
.ah-theme .ah-venue-filter { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,.4fr); gap:var(--ah-space-4); }
@media(max-width:1100px) {
  .ah-theme :is(.studio-grid,.bottom-grid,.remote-main) { grid-template-columns:1fr; }
  .ah-theme :is(.remote-setup,.remote-controls) { grid-column:auto; }
}
@media(max-width:1000px) {
  .ah-theme .workspace { margin-left:0; }
  .ah-theme .topbar { padding:var(--ah-space-4); }
  .ah-theme :is(.workspace>main,.workspace-body) { padding:var(--ah-space-5); }
}
@media(max-width:680px) {
  .ah-theme :is(.workspace>main,.workspace-body) { padding:var(--ah-space-4); }
  .ah-theme .ah-panel { padding:var(--ah-space-4); }
  .ah-theme :is(.ah-dashboard-grid,.ah-fields,.ah-facts,.ah-venue-row,.ah-venue-filter) { grid-template-columns:1fr; }
  .ah-theme .ah-venue-row .ah-actions { width:100%; }
  .ah-theme .metric { padding:var(--ah-space-4); }
  .ah-theme .metric-value { font-size:28px; }
  .ah-theme .metric-top { flex-direction:column-reverse; align-items:start; gap:var(--ah-space-3); }
}
.ah-theme .ah-panel .form-field { display:grid; align-content:start; gap:var(--ah-space-2); padding:var(--ah-space-3); margin:0; border:1px solid var(--ah-border); border-radius:var(--ah-radius-sm); }
.ah-theme .ah-panel .form-field > :is(input,select,textarea) { width:100%; }
.ah-theme .ah-panel .form-field > :is(small,p,.helper) { display:block; margin:0; }
.ah-theme .modal-body > .ah-actions { margin-top:var(--ah-space-4); }
.ah-theme .ah-secondary-controls:not([open]) > :not(summary) { display:none; }
.ah-theme .sidebar .profile { text-decoration:none; }

/* Account dashboard v2.7: public access uses the same cards, fields and rhythm. */
.ah-theme .ah-public-topbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:var(--ah-space-4); padding:var(--ah-space-4) var(--ah-space-6); border-bottom:1px solid var(--ah-border); }
.ah-theme .ah-public-footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:var(--ah-space-4); padding:var(--ah-space-5) var(--ah-space-6); border-top:1px solid var(--ah-border); color:var(--ah-muted); font-size:12px; }
.ah-theme .ah-access-main { width:min(100%,824px); margin-inline:auto; padding:var(--ah-space-6); display:grid; gap:var(--ah-space-5); }
.ah-theme.ah-access { min-height:100svh; display:flex; flex-direction:column; }
.ah-theme.ah-access .account-content { width:100%; max-width:none; margin:0; padding:0; display:grid; gap:var(--ah-space-5); }
.ah-theme.ah-access .account-tabs { gap:var(--ah-space-4); font-size:14px; }
.ah-theme.ah-access .account-tabs a { min-height:44px; display:inline-flex; align-items:center; padding:var(--ah-space-2); }
.ah-theme.ah-access .account-content :is(h2,p),.ah-theme.ah-access .page-heading :is(h1,p) { margin:0; }
.ah-theme.ah-access .page-heading { margin:0; }
.ah-theme.ah-access .page-heading>div { display:grid; gap:var(--ah-space-3); }
.ah-theme.ah-access .account-content h2 { font:500 18px/1.3 var(--ah-font); letter-spacing:0; }
.ah-theme.ah-access .account-field-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ah-space-4); }
.ah-theme.ah-access .account-field { display:grid; gap:var(--ah-space-2); margin:0; padding:var(--ah-space-3); }
.ah-theme.ah-access .account-field :is(input,select) { margin:0; width:100%; min-width:0; }
.ah-theme.ah-access .account-field small { margin:0; }
.ah-theme.ah-access :is(#account-town-label,#signup-code-position) { grid-column:1/-1; }
.ah-theme.ah-access #signup-code-position:empty { display:none; }
.ah-theme.ah-access #account-name-label { grid-column:1; grid-row:1; }
.ah-theme.ah-access .account-field:has(#account-email) { grid-column:2; grid-row:1; }
.ah-theme.ah-access[data-access-mode=login] .account-field-row { grid-template-columns:1fr; }
.ah-theme.ah-access[data-access-mode=login] .account-field:has(#account-email) { grid-column:auto; grid-row:auto; }
.ah-theme.ah-access .account-access-actions { display:grid; gap:var(--ah-space-3); margin:0; }
.ah-theme.ah-access .account-access-actions .account-submit { margin:0; }
.ah-theme.ah-access .account-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ah-space-4); }
.ah-theme.ah-access .account-choice { padding:var(--ah-space-4); margin:0; display:flex; gap:var(--ah-space-3); background:var(--ah-surface); border:1px solid var(--ah-border); }
.ah-theme.ah-access .account-choice:has(input:checked) { border-color:var(--ah-accent); background:var(--ah-selected); box-shadow:none; }
.ah-theme.ah-access .account-choice input { flex:0 0 auto; }
.ah-theme.ah-access :is(#account-types,#account-types .account-note) { margin:0; }
.ah-theme.ah-access #account-types { display:grid; gap:var(--ah-space-4); }
.ah-theme.ah-access .account-note { color:var(--ah-muted); }
.ah-theme.ah-access :is(#mfa-form,#recovery-form) { display:grid; gap:var(--ah-space-4); padding:var(--ah-space-5); border:1px solid var(--ah-border); border-radius:var(--ah-radius-lg); background:var(--ah-surface); }
.ah-theme.ah-access .auth-card { margin:var(--ah-space-6) auto; width:min(760px,calc(100% - var(--ah-space-6))); max-width:none; }
.ah-theme.ah-access.auth-page { display:flex; padding:0; }
.ah-theme.ah-access .auth-card>.account-brand { display:none; }
.ah-theme.ah-access #email-code-panel { max-width:100%; margin:0; }
.ah-theme .ah-panel > label:has(input,select,textarea),.ah-theme .form-field > label:has(input,select,textarea) { display:grid; gap:var(--ah-space-2); }
.ah-theme .ah-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ah-space-5); align-items:start; }
.ah-theme .ah-columns-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ah-theme .ah-panel-title { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:var(--ah-space-3); }
.ah-theme .ah-panel-title :is(h2,p) { margin:0; }
.ah-theme .ah-table-wrap { overflow-x:auto; border:1px solid var(--ah-border); border-radius:var(--ah-radius); }
.ah-theme .ah-data-table { border-collapse:collapse; width:100%; text-align:left; font-size:12px; }
.ah-theme .ah-data-table :is(th,td) { padding:var(--ah-space-4); border-bottom:1px solid var(--ah-border); vertical-align:top; }
.ah-theme .ah-data-table th { color:var(--ah-muted); font-weight:500; }
.ah-theme .ah-data-table tr:last-child :is(th,td) { border-bottom:0; }
.ah-theme .ah-data-table td .ah-actions { min-width:max-content; }
@media(max-width:850px) { .ah-theme .ah-columns,.ah-theme .ah-columns-three { grid-template-columns:1fr; } }
@media(max-width:600px) {
  .ah-theme .ah-public-topbar,.ah-theme .ah-public-footer,.ah-theme .ah-access-main { padding:var(--ah-space-4); }
  .ah-theme.ah-access :is(.account-field-row,.account-choices) { grid-template-columns:1fr; }
  .ah-theme.ah-access :is(#account-name-label,.account-field:has(#account-email)) { grid-column:auto; grid-row:auto; }
  .ah-theme.ah-access :is(#mfa-form,#recovery-form) { padding:var(--ah-space-4); }
}
.ah-theme.ah-access .account-content { background:transparent; border:0; border-radius:0; box-shadow:none; }
.ah-theme [data-layout=billing] > div > .card { margin:0; }
.ah-theme [data-layout=billing] .package-price { display:grid; gap:var(--ah-space-3); }
.ah-theme [data-layout=billing] .package-price strong { font-size:32px; font-weight:500; font-family:var(--ah-font); }
.ah-theme .ah-panel .ah-note { margin:0; }
/* Support uses the shared record and panel components in every workspace. */
.ah-theme .ah-support-timeline { margin: 0; padding-left: var(--ah-space-6); display: grid; gap: var(--ah-space-4); }
.ah-theme .ah-support-timeline li { padding-left: var(--ah-space-2); }
.ah-theme .ah-support-timeline span { display: block; color: var(--ah-muted); margin-top: var(--ah-space-2); overflow-wrap: anywhere; }
.ah-theme [data-support-filters] { margin-bottom: var(--ah-space-4); }
.ah-theme .ah-security-section + .ah-security-section { border-top: 1px solid var(--ah-border); padding-top: var(--ah-space-4); margin-top: var(--ah-space-4); }
.ah-theme [data-layout="support-history"] .ah-records { display: grid; gap: var(--ah-space-4); }
.ah-theme [data-layout="support-history"] .ah-record { display: flex; align-items: center; justify-content: space-between; gap: var(--ah-space-4); border: 1px solid var(--ah-border); border-radius: var(--ah-space-3); padding: var(--ah-space-4); min-width: 0; }
.ah-theme [data-layout="support-history"] .ah-record > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .ah-theme [data-layout="support-history"] .ah-record { align-items: flex-start; flex-direction: column; padding: var(--ah-space-3); } }
.ah-theme .ah-security-section { display: grid; gap: var(--ah-space-3); }
.ah-theme .ah-security-section > :is(p,h3,button) { margin: 0; }
.ah-theme .ah-security-section > :is(button,a) { justify-self: start; }

/* Role compositions from the production role preview. */
.ah-theme .remote-main { grid-template-columns: minmax(0,1fr); }
.ah-theme :is(.remote-setup,.remote-controls) { grid-column: 1; margin: 0; }
.ah-theme .ah-overview-displays > .right-stack { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--ah-space-4); }
.ah-theme .ads-workspace { margin-bottom: var(--ah-space-4); }
.ah-theme .ads-workspace .ads-tabs { margin-bottom: 0; }
.ah-theme [data-layout="device-directory"] form { margin-bottom: var(--ah-space-4); }
@media(max-width:850px) { .ah-theme .ah-overview-displays > .right-stack { grid-template-columns: 1fr; } }
.ah-theme .ads-workspace .ads-tabs { gap: var(--ah-space-2); }
.ah-theme .ads-workspace .ads-tabs > .ah-tab { margin: 0; }

.ah-theme .ah-panel-inset { padding: var(--ah-space-4); }
@media(max-width:600px) { .ah-theme .ah-panel-inset { padding: var(--ah-space-3); } }
.ah-theme.ah-access .account-choice { display: grid; grid-template-columns: var(--ah-space-4) minmax(0,1fr); gap: var(--ah-space-3); align-items: start; }
.ah-theme.ah-access .account-choice input[type=radio] { width: var(--ah-space-4); height: var(--ah-space-4); min-width: 0; flex: none; margin: 0; padding: 0; align-self: start; }
.ah-theme.ah-access .account-choice > span { width: auto; min-width: 0; }
.ah-theme .ah-panel { grid-template-columns: minmax(0,1fr); min-width: 0; }
.ah-theme .ah-panel > * { min-width: 0; }
