@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600&family=IBM+Plex+Mono:wght@400;500;600&family=Manrope:wght@400;500;700;800&family=Plus+Jakarta+Sans:wght@400;500;700;800&family=Space+Grotesk:wght@400;500;700&display=swap');
@import url('https://fonts.cdnfonts.com/css/geist-sans');

/* =========================================================================
   MOBILE VERIFICATION CHECKLIST (viewport 375x812 / real device)
   After every Phase step, re-walk the pages below and tick off anything
   visibly regressed. Keep this list in sync when new flows are added.

   Pages to verify:
     1. /research-hub          Research hub (list + calendar views)
     2. /labs/<id>             Lab detail (hero + PI note + members)
     3. /reserve               Instrument reservation flow
     4. /experiment-data/<id>  Experiment data upload/view
     5. Onboarding overlay     (triggered on first visit / via /onboarding)
     6. /profile               User profile / account
     7. /admin                 Admin dashboard + wide tables
     8. Any page with the shared calendar component

   What to look at on each page:
     - Header height + sticky behaviour, nav horizontal-scroll affordance
     - h1/h2 scale, eyebrow legibility
     - Card padding, section-head layout, primary vs ghost button hierarchy
     - Tables: horizontal scroll vs card-mode readability
     - Filter bars, date/select inputs (no iOS zoom, no clipped text)
     - Calendar: list/week mode, event pill legibility
     - Chips / breadcrumbs / file rows: no mid-word breaks
     - Safe-area: sticky/fixed elements not hidden by notch or home indicator
   ========================================================================= */

:root {
  /* Dark mode uses an IBM Carbon Gray 100 inspired palette with blue accents. */
  --bg: #161616;
  --bg-soft: #161616;
  --surface: #262626;
  --surface-hover: #393939;
  --surface-active: #393939;
  --panel: #262626;
  --panel-2: #161616;
  --line: #393939;
  --line-muted: #262626;
  --line-subtle: #1f1f1f;
  --line-strong: #525252;
  --text: #f4f4f4;
  --text-heading: #f4f4f4;
  --text-secondary: #c6c6c6;
  --text-muted: #8d8d8d;
  --text-disabled: #525252;
  --muted: #8d8d8d;
  --accent: #78a9ff;
  --accent-2: #a6c8ff;
  --accent-soft: rgba(69,137,255,0.16);
  --accent-border: rgba(69,137,255,0.45);
  --button-primary: #0f62fe;
  --button-primary-hover: #0353e9;
  --button-primary-active: #002d9c;
  --success: #42be65;
  --success-soft: rgba(66,190,101,0.14);
  --success-border: rgba(66,190,101,0.38);
  --warning: #f1c21b;
  --warning-soft: rgba(241,194,27,0.14);
  --warning-border: rgba(241,194,27,0.38);
  --danger: #ff8389;
  --danger-soft: rgba(255,131,137,0.14);
  --danger-border: rgba(255,131,137,0.40);
  --done: #42be65;
  --done-soft: rgba(66,190,101,0.14);
  --done-border: rgba(66,190,101,0.38);
  --shadow: none;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
/* Make body a flex column with min-height = viewport, and let <main> flex-grow
   to fill any leftover space. This removes the empty area below short pages
   that iOS Chrome was bouncing into, and stays correct when the URL bar
   collapses (100dvh recomputes dynamically). */
html{min-height:100vh}
body{
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}
main.page-shell{flex:1 1 auto}
body{
  font-family: "Geist Sans",Inter,"Noto Sans TC",system-ui,sans-serif;
  color:var(--text);
  background:var(--bg);
}
.shell-bg{position:fixed;inset:0;pointer-events:none;background:transparent}
a{color:inherit}
.container{width:min(1320px,calc(100% - 40px));margin:0 auto}
.page-shell{padding:28px 0 48px}
main.page-shell:has(> [data-fusion-hero]){padding-bottom:0}
.site-header{position:sticky;top:0;z-index:40;background:rgba(10,10,10,.7);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.08)}
/* Step 1.3 ??Hamburger trigger hidden on desktop by default; mobile media query will show it. */
.mobile-nav-toggle{display:none}
.nav-shell{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 0}
.brand-wrap{text-decoration:none;display:flex;align-items:center;gap:14px}
.brand-wrap strong{display:block;font-size:1.25rem;letter-spacing:.03em}
.brand-mark{width:88px;height:88px;border-radius:16px;object-fit:contain;flex-shrink:0;margin:-22px 0}
.brand-name{display:block;font-size:1.25rem;letter-spacing:.03em}
.main-nav{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center}
.main-nav a,.account-pill a{text-decoration:none;color:#e5e5e5;padding:10px 12px;border-radius:999px;transition:.2s background,.2s transform}
.main-nav a:hover,.account-pill a:hover{background:rgba(255,255,255,.08);transform:translateY(-1px)}
.nav-menu{position:relative}
.nav-menu-trigger{display:inline-flex;align-items:center;gap:7px}
.nav-menu-trigger::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);opacity:.72}
.nav-dropdown{position:absolute;left:0;top:calc(100% + 10px);min-width:190px;padding:8px;border:1px solid var(--line);border-radius:8px;background:rgba(15,15,15,.96);box-shadow:var(--shadow);display:grid;gap:4px;opacity:0;visibility:hidden;transform:translateY(-4px);transition:.18s opacity,.18s transform,.18s visibility;z-index:50}
.nav-menu:hover .nav-dropdown,.nav-menu:focus-within .nav-dropdown{opacity:1;visibility:visible;transform:translateY(0)}
.main-nav .nav-dropdown a,.compact-nav .nav-dropdown a{display:block;text-decoration:none;color:#e5e5e5;background:transparent;border:0;border-radius:8px;padding:10px 12px;white-space:nowrap;transform:none}
.main-nav .nav-dropdown a:hover,.compact-nav .nav-dropdown a:hover{background:rgba(255,255,255,.09);transform:none}
.locale-dropdown{position:relative;margin:0 0 0 auto;display:flex;align-items:center}
.locale-toggle-btn{border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.06);color:#e5e5e5;font:inherit;font-size:.92rem;padding:5px 10px;border-radius:999px;cursor:pointer;white-space:nowrap;transition:.2s background,.2s border-color;line-height:1}
.locale-toggle-btn:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.25)}
html[data-resolved-theme="light"] .locale-toggle-btn{color:var(--text);border-color:rgba(0,0,0,.13);background:rgba(0,0,0,.04)}
html[data-resolved-theme="light"] .locale-toggle-btn:hover{background:rgba(0,0,0,.08);border-color:rgba(0,0,0,.2)}
.locale-dropdown-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:150px;max-height:360px;max-height:min(56vh,360px);overflow-y:scroll;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:rgba(88,166,255,.55) transparent;z-index:200;background:var(--panel,rgba(20,25,36,.98));border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.28);padding:4px;animation:compactFilterIn .18s ease-out}
.locale-dropdown-menu::-webkit-scrollbar{width:8px}
.locale-dropdown-menu::-webkit-scrollbar-track{background:transparent}
.locale-dropdown-menu::-webkit-scrollbar-thumb{background:rgba(88,166,255,.55);border-radius:999px}
html[data-resolved-theme="light"] .locale-dropdown-menu{background:rgba(255,255,255,.98);box-shadow:0 12px 32px rgba(15,23,42,.14)}
.locale-dropdown-form{margin:0}
.locale-dropdown-item{display:block;width:100%;padding:8px 14px;border:0;border-radius:8px;background:transparent;color:var(--text);font:inherit;font-size:.85rem;text-align:left;cursor:pointer;transition:background .15s}
.locale-dropdown-item:hover{background:rgba(110,231,255,.10)}
html[data-resolved-theme="light"] .locale-dropdown-item:hover{background:rgba(14,165,233,.08)}
.locale-dropdown-item.active{font-weight:700;color:var(--accent,#6ee7ff)}
.mobile-drawer-locale{margin:0;padding:0 16px;max-height:34vh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;display:grid;gap:8px}
.locale-drawer-btn{width:100%;border:1px solid var(--line);background:var(--panel);color:var(--text);font:inherit;font-size:.92rem;font-weight:600;padding:10px 16px;border-radius:12px;cursor:pointer;text-align:center;transition:.2s background}
.locale-drawer-btn:hover{background:rgba(255,255,255,.08)}
html[data-resolved-theme="light"] .locale-drawer-btn:hover{background:rgba(0,0,0,.05)}
.account-pill{display:flex;align-items:center;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:999px;padding:4px 8px}
.account-menu{position:relative}
.account-menu-trigger{display:flex;align-items:center;gap:10px;border:0;background:transparent;color:#e5e5e5;padding:4px 8px 4px 4px;border-radius:999px;font:inherit;font-weight:800;cursor:pointer}
.account-menu-trigger img{width:38px;height:38px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.24);background:rgba(255,255,255,.12)}
.account-dropdown{position:absolute;right:0;top:calc(100% + 10px);min-width:180px;padding:8px;border:1px solid var(--line);border-radius:8px;background:rgba(8,17,30,.96);box-shadow:var(--shadow);display:grid;gap:4px;opacity:0;visibility:hidden;transform:translateY(-4px);transition:.18s opacity,.18s transform,.18s visibility;z-index:50}
.account-menu:hover .account-dropdown,.account-menu:focus-within .account-dropdown{opacity:1;visibility:visible;transform:translateY(0)}
.account-dropdown a,.account-dropdown button{display:block;width:100%;text-align:left;text-decoration:none;color:#e5e5e5;background:transparent;border:0;border-radius:8px;padding:10px 12px;font:inherit;cursor:pointer}
.account-dropdown a:hover,.account-dropdown button:hover{background:rgba(255,255,255,.09);transform:none}
.profile-photo-editor{display:flex;align-items:center;gap:18px;padding:16px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.045)}
.profile-photo-editor img{width:92px;height:92px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.2);background:rgba(255,255,255,.1);flex:0 0 auto}
.profile-photo-editor label{display:grid;gap:8px;margin:0}
.profile-photo-editor input{padding:10px;border-radius:8px}
.dot{width:4px;height:4px;background:rgba(255,255,255,.4);border-radius:50%}
/* Phase D.3-D.6 ??Lab directory card layout.
   Three-tier left column (lab name biggest, PI medium, affiliation small);
   right side shows the "lab files" label with the count right-aligned on the
   same horizontal line. */
.lab-card-row{
  display:flex;
  align-items:flex-start;
  gap:16px;
  padding:16px 18px;
}
.lab-card-main{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.lab-card-name{
  font-size:1.15rem;
  font-weight:800;
  color:var(--text);
  line-height:1.3;
}
.lab-card-pi{
  font-size:1rem;
  font-weight:600;
  color:var(--text);
  line-height:1.35;
}
.lab-card-affiliation{
  font-size:.82rem;
  color:var(--text-muted,rgba(255,255,255,.6));
  line-height:1.4;
}
.lab-card-pi-box{
  flex:0 0 auto;
  display:flex;
  flex-direction:row;
  align-items:baseline;
  justify-content:flex-end;
  gap:6px;
  min-width:140px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel,rgba(255,255,255,.03));
  white-space:nowrap;
}
.lab-card-pi-name{
  font-size:1.05rem;
  font-weight:700;
  color:var(--text);
  line-height:1.3;
}
.lab-card-pi-title{
  font-size:.78rem;
  font-weight:500;
  color:var(--muted,#a3a3a3);
  line-height:1.3;
}
@media (max-width:760px){
  .lab-card-row{flex-direction:column;align-items:stretch}
  .lab-card-pi-box{
    width:100%;
    min-width:0;
    justify-content:flex-start;
  }
}

/* Phase reserve refresh ??date range, preferred period, mode toggle,
   avoid period all live on one horizontal row. Each cell stacks a small
   label above its control; the toggle has no label, so the row uses
   align-items:flex-end to keep all controls bottom-aligned. */
.reserve-form{display:flex;flex-direction:column;gap:18px}
.reserve-form .reserve-adv-field{display:none!important}
.reserve-form.show-advanced .reserve-adv-field{display:unset!important}
.reserve-form.show-advanced .reserve-adv-panel{display:flex!important;flex-direction:column;gap:14px;padding:18px;border-radius:18px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08)}
.reserve-adv-toggle{white-space:nowrap}
.reserve-form .reserve-basics{margin-bottom:6px}
.reserve-basics-simple{grid-template-columns:1fr!important}
.reserve-controls-row{
  display:flex;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:14px;
}
/* Stretch every cell except the toggle so the row spans the same width as
   the basics grid above. The toggle keeps its content-sized width and its
   14px gap to the preferred-period cell on its left. */
.reserve-cell{
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1 1 0;
  min-width:0;
}
.reserve-cell-toggle{flex:0 0 auto}
.reserve-controls-row .date-range-trigger{width:100%}
.reserve-controls-row .time-range-wrap{width:100%}
.reserve-controls-row .time-range-wrap input{flex:1 1 0;min-width:0;width:auto}
.reserve-cell-label{
  font-size:.78rem;
  font-weight:700;
  color:var(--text);
  letter-spacing:.04em;
}
/* Common 40px control height for input groups + toggle so the row reads
   as one strip. */
.reserve-controls-row .range-wrap input,
.reserve-controls-row .date-range-trigger,
.reserve-controls-row .mode-toggle{
  height:40px;
  box-sizing:border-box;
}
.range-wrap{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}
.range-wrap input{
  padding:0 12px;
}
.time-range-wrap input{width:124px}
.range-sep{
  color:var(--muted,#a3a3a3);
  font-weight:700;
  font-size:1rem;
  user-select:none;
}
/* Segmented mode toggle. Hidden radios + checked-state labels = clean
   pill switch, no extra "?��?模�?" caption. */
.mode-toggle{
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  background:var(--panel,rgba(255,255,255,.03));
  position:relative;
}
.mode-toggle input[type="radio"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.mode-toggle label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  cursor:pointer;
  font-size:.9rem;
  font-weight:600;
  color:var(--muted,#a3a3a3);
  transition:background .15s,color .15s;
  user-select:none;
  height:100%;
}
.mode-toggle input[type="radio"]:checked + label{
  background:var(--accent,#ededed);
  color:var(--bg,#0a0a0a);
  font-weight:800;
}
.reserve-tab-toggle{margin-bottom:16px}
.mode-toggle a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 18px;
  color:var(--muted,#a3a3a3);
  text-decoration:none;
  font-weight:700;
}
.mode-toggle a.active{
  background:var(--accent,#ededed);
  color:var(--bg,#0a0a0a);
  font-weight:900;
}

/* Inline date-range picker. Trigger is a styled button that mimics an
   input field; the popover floats below it and is closed on outside-click
   or once both ends of the range are picked. */
.date-range-picker{position:relative}
.date-range-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  width:240px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel,rgba(255,255,255,.04));
  color:var(--text);
  font:inherit;
  font-size:.92rem;
  cursor:pointer;
  white-space:nowrap;
  text-align:left;
}
.date-range-trigger:hover{border-color:rgba(255,255,255,.25)}
.date-range-popover{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  z-index:60;
  width:280px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--bg-soft,#161616);
  box-shadow:var(--shadow,0 20px 60px rgba(0,0,0,.45));
}
.date-range-popover[hidden]{display:none}
.date-range-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.date-range-header strong{font-weight:700;font-size:.95rem;color:var(--text)}
.date-range-nav{
  width:30px;height:30px;
  border:0;background:transparent;
  color:var(--text);
  font-size:1.1rem;
  cursor:pointer;
  border-radius:8px;
}
.date-range-nav:hover{background:rgba(255,255,255,.08)}
.date-range-weekdays,
.date-range-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:2px;
}
.date-range-weekdays span{
  text-align:center;
  font-size:.7rem;
  color:var(--muted,#a3a3a3);
  padding:4px 0;
}
.date-cell{
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  background:transparent;
  color:var(--text);
  font-size:.85rem;
  border-radius:8px;
  cursor:pointer;
  padding:0;
}
.date-cell.empty{visibility:hidden;cursor:default}
.date-cell:hover:not(.disabled):not(.empty){background:rgba(255,255,255,.08)}
.date-cell.disabled{color:rgba(255,255,255,.25);cursor:not-allowed}
.date-cell.inrange{background:rgba(255,255,255,.08);border-radius:0}
.date-cell.selected{
  background:var(--accent,#ededed);
  color:var(--bg,#0a0a0a);
  font-weight:800;
}
.date-cell.selected.start{border-radius:8px 0 0 8px}
.date-cell.selected.end{border-radius:0 8px 8px 0}
.date-cell.selected.start.end{border-radius:8px}

@media (max-width:760px){
  .reserve-controls-row{align-items:stretch}
  .reserve-cell{flex:1 1 100%}
  .reserve-controls-row .date-range-trigger{width:100%}
  .reserve-controls-row .mode-toggle{align-self:flex-start}
  .time-range-wrap input{flex:1 1 0;width:auto;min-width:0}
}

/* Process-template instrument picker — pairs a small search input with the
   instrument <select>, hides non-matching <option>s as the user types so
   the long instrument list stays usable on narrow phones. */
.instrument-picker{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
.instrument-picker-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}
.instrument-picker-search{
  height:36px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
  color:var(--text);
  font-size:.9rem;
}
.instrument-picker select{width:100%}
.template-instrument-filter-panel{
  display:grid;
  grid-template-columns:repeat(5,minmax(110px,1fr)) auto;
  gap:8px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.035);
}
.template-instrument-filter-panel[hidden]{display:none}
.template-instrument-filter-panel select,
.template-instrument-filter-panel button{min-height:38px}
@media (max-width:760px){
  .template-instrument-filter-panel{grid-template-columns:1fr}
}

/* People-management page — visual divider between role groups. Subtle
   so the cards still dominate; semantic <hr> for screen readers. */
.people-group-divider{
  border:0;
  border-top:1px solid var(--line);
  margin:22px 0 4px;
  opacity:.7;
}
.people-board-shell{padding:22px}
.people-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:0;
}

/* Phase E ??Equipment card layout. Mirrors lab-card structure:
   left = name + location + optional approval chip; right = price box with
   one or two lines (rental, then operator/�?. */
.equipment-card-row{
  display:flex;
  align-items:flex-start;
  gap:16px;
  padding:16px 18px;
}
.equipment-card-main{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.equipment-card-name{
  font-size:1.15rem;
  font-weight:800;
  color:var(--text);
  line-height:1.3;
}
.equipment-card-location{
  font-size:.82rem;
  color:var(--text-muted,rgba(255,255,255,.6));
  line-height:1.4;
}
.equipment-card-approval{
  align-self:flex-start;
  margin-top:4px;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.04em;
  padding:3px 10px;
  border-radius:999px;
  border:1px solid var(--warning,#f59e0b);
  color:var(--warning,#f59e0b);
}
.equipment-card-price-box{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:4px;
  min-width:140px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel,rgba(255,255,255,.03));
}
.equipment-price-line{
  display:flex;
  align-items:baseline;
  gap:4px;
  white-space:nowrap;
}
.equipment-price-line strong{
  font-size:1.25rem;
  font-weight:800;
  color:var(--text);
  font-variant-numeric:tabular-nums;
  line-height:1.1;
}
.equipment-price-line span{
  font-size:.82rem;
  color:var(--muted,#a3a3a3);
}
.equipment-price-empty span{font-size:1.1rem;color:var(--muted,#a3a3a3)}
.equipment-price-op{align-items:center}
.equipment-op-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:50%;
  border:1.5px solid var(--accent,#ededed);
  color:var(--accent,#ededed);
  font-size:.7rem;
  font-weight:700;
  flex:0 0 auto;
  margin-right:2px;
}
@media (max-width:760px){
  .equipment-card-row{flex-direction:column;align-items:stretch}
  .equipment-card-price-box{
    width:100%;
    min-width:0;
    align-items:flex-start;
  }
}

/* Phase D revised ??Page title above the compact search needs explicit
   bottom margin; otherwise the form sits flush against the heading and
   the (large) h1 visually overlaps the search bar on wide screens. */
.page-title{margin:0 0 18px}
.compact-search-wrap{margin-top:0}

/* Phase D revised ??Search-toolbar card (e.g. /directory) anchors its
   result-count pill in the top-right corner of the card on mobile, so the
   header row doesn't stack and waste vertical space. The card needs to be
   a positioning context for the absolutely-placed pill. */
.search-toolbar-card{position:relative;overflow:visible}
@media (max-width:760px){
  .search-toolbar-card .search-toolbar-count{
    position:absolute;
    top:14px;
    right:14px;
    margin:0;
  }
  /* Keep search input + filter button + submit button on one row on mobile;
     give the input flex-grow but cap buttons to compact widths so a 360px
     phone fits all three side-by-side. !important is used to defeat the
     blanket `.button{width:100%}` mobile rule that targets the submit. */
  .search-toolbar-card .compact-search{
    flex-wrap:nowrap !important;
    gap:6px;
  }
  /* Match heights across all three elements so the row reads as one toolbar.
     44px matches the `.button` mobile baseline (Phase 1) and !important
     beats the conflicting `.button{min-height:44px;width:100%}` rule that
     applies to the submit button via its .button class. */
  .search-toolbar-card .compact-search-input,
  .search-toolbar-card .compact-search-filter-btn,
  .search-toolbar-card .compact-search-submit-btn{
    box-sizing:border-box !important;
    height:44px !important;
    min-height:44px !important;
    line-height:1 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
  .search-toolbar-card .compact-search-input{
    flex:1 1 0;
    min-width:0;
    padding:0 12px;
    font-size:.92rem;
  }
  .search-toolbar-card .compact-search-filter-btn,
  .search-toolbar-card .compact-search-submit-btn{
    flex:0 0 64px !important;
    width:64px !important;
    min-width:0 !important;
    max-width:64px !important;
    padding:0 !important;
    font-size:.85rem !important;
    white-space:nowrap;
  }
}

/* Phase D revised ??Primary submit button inside the search row.
   Matches the legacy equipment-page gradient look the user wants kept. */
.compact-search-submit-btn{
  flex:0 0 auto;
  padding:10px 18px;
  border-radius:10px;
  border:0;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}

/* Phase C.2 ??Reusable compact search bar.
   Single horizontal row: leading magnifier, flex-grow input, trailing
   "篩選" button. Designed to span the page width on both mobile and
   desktop so search is always the topmost row of any list page. */
.compact-search-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0 0 16px;
}
.compact-search{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.compact-search-input{
  flex:1 1 240px;
  min-width:180px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel,rgba(255,255,255,.04));
  color:var(--text);
  font-size:1rem;
  padding:11px 14px;
  outline:none;
}
.compact-search-input::placeholder{color:var(--text-subtle,rgba(255,255,255,.45))}
.compact-search-input:focus{border-color:rgba(110,231,255,.5)}
.compact-search-filter-btn{
  flex:0 0 auto;
  padding:10px 16px;
  border-radius:12px;
  border:1px solid var(--line);
  background:transparent;
  color:var(--text);
  font:inherit;
  cursor:pointer;
  white-space:nowrap;
  transition:background .15s ease,border-color .15s ease;
}
.compact-search-filter-btn:hover,
.compact-search-filter-btn[aria-expanded="true"]{
  background:rgba(110,231,255,.12);
  border-color:rgba(110,231,255,.4);
}

/* Phase C.3 ??Collapsible filter panel.
   The [hidden] attribute removes it from layout (no animation) when closed;
   when [hidden] is removed by the JS toggle, it fades + slides into view. */
.compact-filter-panel{
  position:relative;
  z-index:20;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel,rgba(255,255,255,.03));
  padding:0;
  overflow:visible;
  animation:compactFilterIn .22s ease-out;
}
/* Force-hide when collapsed; the [hidden] HTML attribute is sometimes
   beaten by other display rules during CSS load, leaving the dark panel
   peeking out below the search row. */
.compact-filter-panel[hidden]{display:none !important}
.compact-filter-panel[aria-hidden="true"]{display:none !important}
.compact-filter-panel-inner{
  position:relative;
  z-index:21;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px 16px;
}
@keyframes compactFilterIn{
  from{opacity:0;transform:translateY(-4px)}
  to{opacity:1;transform:translateY(0)}
}

/* Phase B.3 ??Minimal landing hero. Centered single column, no card chrome,
   relies on the global .shell-bg for the background. Animated visual is
   deferred to Phase B.4. */
.landing-hero{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:calc(100vh - 220px);
  padding:48px 16px;
  text-align:center;
}
.landing-hero-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
  max-width:680px;
  width:100%;
}
.landing-title{
  margin:0;
  font-size:clamp(2.4rem,7vw,4rem);
  font-weight:800;
  letter-spacing:-.01em;
  line-height:1.05;
  color:var(--text);
}
.landing-slogan{
  margin:0;
  font-size:clamp(1rem,2.4vw,1.25rem);
  color:var(--text-muted,rgba(255,255,255,.72));
  line-height:1.55;
}
.landing-actions{
  display:flex;
  flex-direction:row;
  gap:12px;
  margin-top:14px;
  flex-wrap:wrap;
  justify-content:center;
}
.landing-btn{
  min-width:140px;
}

[data-fusion-hero]{
  --fusion-bg:#f7f9fc;
  --fusion-bg2:#eef3fa;
  --fusion-grid:rgba(30,58,138,.08);
  --fusion-grid-major:rgba(30,58,138,.16);
  --fusion-fg:#0f172a;
  --fusion-sub:rgba(15,23,42,.55);
  --fusion-sub-dim:rgba(15,23,42,.35);
  --fusion-accent:#3b82f6;
  --fusion-accent-2:#7c3aed;
  --fusion-glow:rgba(99,102,241,.16);
  --fusion-card:rgba(255,255,255,.7);
  --fusion-card-border:rgba(30,58,138,.1);
  position:relative;
  min-height:calc(100dvh - 96px);
  overflow:hidden;
  display:grid;
  place-items:center;
  margin:-34px calc(50% - 50vw) -48px;
  padding:72px 24px;
  background:radial-gradient(120% 90% at 50% 40%,var(--fusion-bg) 0%,var(--fusion-bg2) 100%);
  color:var(--fusion-fg);
  cursor:default;
  isolation:isolate;
}
.fusion-grid,.fusion-canvas,.fusion-crosshair,.fusion-halo{position:absolute;inset:0;width:100%;height:100%;min-height:100%;display:block;pointer-events:none}
.fusion-grid{z-index:0;opacity:.9}
.fusion-canvas{z-index:1;opacity:.98}
.fusion-grid path{fill:none;stroke:var(--fusion-grid);stroke-width:1}
.fusion-crosshair{background:var(--fusion-accent);opacity:0;transition:opacity .4s;z-index:2}
.fusion-crosshair.horizontal{height:1px}.fusion-crosshair.vertical{width:1px}
.fusion-halo{width:280px;height:280px;margin:-140px 0 0 -140px;border-radius:50%;background:radial-gradient(circle,var(--fusion-glow) 0%,transparent 70%);filter:blur(2px);opacity:0;transition:opacity .5s;z-index:1}
.fusion-corner{position:absolute;width:12px;height:12px;border-color:var(--fusion-sub-dim);z-index:3}
.fusion-corner.top-left{top:14px;left:14px;border-top:1px solid;border-left:1px solid}
.fusion-corner.top-right{top:14px;right:14px;border-top:1px solid;border-right:1px solid}
.fusion-corner.bottom-left{bottom:14px;left:14px;border-bottom:1px solid;border-left:1px solid}
.fusion-corner.bottom-right{bottom:14px;right:14px;border-bottom:1px solid;border-right:1px solid}
.fusion-hud{position:absolute;z-index:4;font-family:"SFMono-Regular","Cascadia Mono","Liberation Mono",monospace;font-size:10px;letter-spacing:.16em;color:var(--fusion-sub);display:flex;flex-direction:column;gap:3px}
.fusion-hud-left{top:18px;left:22px}.fusion-hud-right{top:18px;right:22px;text-align:right}.fusion-hud-bottom-left{bottom:18px;left:22px}.fusion-hud-bottom-right{bottom:18px;right:22px}
.fusion-hud-brand{display:flex;align-items:center;gap:8px}.fusion-hud-brand strong{color:var(--fusion-fg);letter-spacing:.2em}
.fusion-logo-mark{width:14px;height:14px;display:inline-block;background:linear-gradient(var(--fusion-accent),var(--fusion-accent)) 0 100%/6px 6px no-repeat,linear-gradient(rgba(59,130,246,.45),rgba(59,130,246,.45)) 100% 0/6px 6px no-repeat;border:1px solid var(--fusion-accent)}
.fusion-live-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--fusion-accent);margin-right:6px;box-shadow:0 0 8px var(--fusion-accent);animation:fu-pulse 2.4s ease-in-out infinite}
.fusion-center{position:relative;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;text-align:center}
.fusion-tag{padding:6px 14px;border-radius:999px;border:1px solid var(--fusion-card-border);background:var(--fusion-card);backdrop-filter:blur(10px);font-family:"SFMono-Regular","Cascadia Mono","Liberation Mono",monospace;font-size:10px;letter-spacing:.28em;color:var(--fusion-sub)}
.fusion-center h1{margin:0;font-family:"Trebuchet MS","Aptos Display",var(--font-display);font-weight:700;font-size:clamp(4.4rem,12vw,7.4rem);letter-spacing:-.055em;line-height:.9;background:linear-gradient(135deg,var(--fusion-accent) 0%,var(--fusion-accent-2) 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.fusion-subtitle{margin:0;display:flex;align-items:center;gap:12px;font-family:"SFMono-Regular","Cascadia Mono","Liberation Mono",monospace;font-size:11px;letter-spacing:.22em;color:var(--fusion-sub)}
.fusion-subtitle span{width:22px;height:1px;background:var(--fusion-sub-dim)}
.fusion-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin-top:8px}
.fusion-btn{position:relative;overflow:hidden;padding:12px 32px;white-space:nowrap;font-size:14px;font-weight:600;letter-spacing:.04em;border-radius:8px;text-decoration:none;transition:transform .25s cubic-bezier(.2,.7,.3,1),box-shadow .25s,background .2s}
.fusion-btn:hover{transform:translateY(-1px)}
.fusion-btn-solid{color:#fff;border:1px solid transparent;background:linear-gradient(135deg,#3b82f6 0%,#6366f1 50%,#7c3aed 100%);box-shadow:0 4px 14px rgba(59,130,246,.2)}
.fusion-btn-solid:hover{box-shadow:0 8px 24px rgba(59,130,246,.34),0 2px 6px rgba(59,130,246,.2)}
.fusion-btn-ghost{color:#1e3a8a;border:1px solid rgba(30,58,138,.25);background:transparent}
.fusion-btn-ghost:hover{background:rgba(59,130,246,.08)}
@keyframes fu-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.6)}}

.glass-card,.glass-lite{background:var(--panel);border:1px solid var(--line);border-radius:28px;box-shadow:0 14px 34px rgba(15,23,42,.08);backdrop-filter:blur(14px)}
.glass-card{padding:28px;margin-bottom:22px;overflow:hidden}
.glass-card.search-toolbar-card,.glass-card:has(.taxonomy-combobox-wrap){overflow:visible;z-index:30}
.glass-card:has(.taxonomy-combobox-input:focus){z-index:100}
.glass-lite{background:rgba(255,255,255,.03);padding:22px;border-radius:24px}
.hero-panel{display:grid;grid-template-columns:1.4fr .92fr;gap:24px;align-items:stretch;padding:36px}
.eyebrow{display:inline-block;font-size:.78rem;letter-spacing:.18em;color:var(--accent);margin-bottom:14px}
h1,h2,h3,p{margin-top:0} h1{font-size:clamp(2rem,4vw,3.4rem);line-height:1.05;margin-bottom:14px} h2{font-size:1.4rem;margin-bottom:10px}
.lead{font-size:1.02rem;line-height:1.7;color:#d4deeb;max-width:70ch}
.hero-actions,.inline-actions,.section-head,.toolbar-bar,.calendar-toolbar,.hero-side{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.hero-actions{margin:22px 0}
.mini-identity{display:flex;flex-wrap:wrap;gap:10px}.mini-identity span,.mini-identity a,.pill{padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.08);font-size:.85rem;color:#dbeafe}
.mini-identity a{text-decoration:none;display:inline-flex;align-items:center;transition:.2s transform,.2s box-shadow,.2s background,.2s border-color}
.mini-identity a:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(15,23,42,.1);background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.18)}
.metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}
.metric-card,.spotlight-card{padding:20px;border-radius:22px;background:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.05));border:1px solid rgba(255,255,255,.08)}
.metric-card span{display:block;font-size:2rem;font-weight:800;margin-bottom:6px}
.spotlight-card strong{display:block;font-size:1.1rem;margin:8px 0}.spotlight-card small{color:var(--muted)}
.feature-strip,.card-grid{display:grid;gap:18px}.feature-strip{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:22px}.card-grid.two-up{grid-template-columns:repeat(2,minmax(0,1fr))}.card-grid.three-up{grid-template-columns:repeat(3,minmax(0,1fr))}
.feature-tile{text-decoration:none;padding:24px;transition:.2s transform,.2s border-color}.feature-tile:hover{transform:translateY(-3px);border-color:rgba(110,231,255,.35)}
.grid-two{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-bottom:22px}
.section-head{justify-content:space-between;margin-bottom:16px}.section-head.tight{margin-bottom:10px}.align-right{text-align:right}
.management-review-disclosure summary{list-style:none;cursor:pointer}
.management-review-disclosure summary::-webkit-details-marker{display:none}
.management-review-summary{display:flex;align-items:center;justify-content:space-between;gap:16px}
.management-review-summary h2{margin:4px 0 0}
.management-review-body{margin-top:18px;padding-top:18px;border-top:1px solid rgba(255,255,255,.08)}
.review-alert-icon{min-width:32px;height:32px;padding:0 10px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:rgba(245,158,11,.18);border:1px solid rgba(245,158,11,.36);color:#fbbf24;font-weight:900;box-shadow:0 0 0 4px rgba(245,158,11,.08)}
.review-toggle-label::after{content:"展開"}
.management-review-disclosure[open] .review-toggle-label::after{content:"收合"}
.equipment-admin-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
.equipment-admin-metric{display:flex;align-items:center;gap:14px;margin-bottom:0;padding:18px;text-decoration:none;color:inherit}
.equipment-admin-metric small{display:block;color:var(--muted);font-weight:700}
.equipment-admin-metric strong{font-size:1.7rem;margin-left:auto}
.metric-icon{width:42px;height:42px;border-radius:16px;display:grid;place-items:center;background:rgba(59,130,246,.14);border:1px solid rgba(59,130,246,.18);color:#93c5fd;font-weight:900}
.equipment-admin-list{display:grid;gap:14px}
.equipment-admin-card{display:grid;grid-template-columns:96px minmax(0,1fr) auto;gap:16px;align-items:center;padding:16px;border-radius:24px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.08)}
.equipment-admin-card.active{border-color:rgba(110,231,255,.45);box-shadow:0 14px 30px rgba(14,165,233,.10)}
.equipment-admin-photo{width:96px;height:78px;border-radius:18px;overflow:hidden;background:rgba(255,255,255,.06);display:grid;place-items:center;font-weight:900;color:var(--muted)}
.equipment-admin-photo img{width:100%;height:100%;object-fit:cover}
.equipment-admin-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.equipment-admin-title-row h3{margin:0 0 4px}
.equipment-admin-title-row p{margin:0;color:var(--muted)}
.equipment-admin-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.equipment-admin-meta span{padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.07);font-size:.82rem;color:var(--muted)}
.equipment-admin-actions{display:grid;grid-template-columns:repeat(2,minmax(74px,1fr));gap:8px;min-width:170px}
.icon-action{display:grid;gap:5px;place-items:center;padding:10px 8px;border-radius:16px;text-decoration:none;color:var(--text);background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);font-size:.8rem;font-weight:800}
.icon-action span{width:28px;height:28px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.08);color:#93c5fd}
.icon-action.primary{background:rgba(59,130,246,.14);border-color:rgba(59,130,246,.24)}
.equipment-admin-panel summary{list-style:none;cursor:pointer}
.equipment-admin-panel summary::-webkit-details-marker{display:none}
.equipment-panel-summary{display:flex;align-items:center;justify-content:space-between;gap:14px}
.equipment-panel-summary h2{margin:0}
.equipment-admin-panel>form,.equipment-admin-panel>.grid-two,.equipment-admin-panel>.list-stack{margin-top:18px}
.equipment-admin-panel[open]>.equipment-panel-summary{padding-bottom:14px;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:18px}
.panel-toggle-label::after{content:"展開"}
.equipment-admin-panel[open] .panel-toggle-label::after{content:"收合"}
.text-link{color:var(--accent);text-decoration:none;font-weight:600}
.button{border:0;border-radius:16px;padding:12px 16px;font:inherit;text-decoration:none;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;transition:.2s transform,.2s box-shadow,.2s background,.2s border-color}
.button:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.12)}
.button.primary{background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#04111e;font-weight:700;box-shadow:0 12px 28px rgba(110,231,255,.18)}
.button.ghost{background:rgba(255,255,255,.06);color:var(--text);border:1px solid rgba(255,255,255,.08)}
.button.danger{background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.3);color:#ffd8d8}
.button.small{padding:9px 12px;font-size:.92rem}
.button:disabled{cursor:wait;opacity:.82;transform:none;box-shadow:none}
.form-grid{display:grid;gap:16px}.compact-grid{gap:12px}.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.three-col{grid-template-columns:repeat(3,minmax(0,1fr))}.full{grid-column:1/-1}.grow{flex:1}
.checkbox-card{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;min-height:54px}.checkbox-card input[type="checkbox"]{width:20px;height:20px;min-height:auto;accent-color:#38bdf8}
label{display:grid;gap:8px;font-size:.94rem;color:#dce7f8}input,select,textarea,button{font:inherit}
input,select,textarea{width:100%;padding:13px 14px;border-radius:16px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:var(--text);outline:none}
input:focus,select:focus,textarea:focus{border-color:rgba(110,231,255,.5);box-shadow:0 0 0 4px rgba(110,231,255,.1)}

select{appearance:none;background-image:linear-gradient(45deg,transparent 50%, #cfe7ff 50%),linear-gradient(135deg,#cfe7ff 50%,transparent 50%);background-position:calc(100% - 22px) calc(50% - 3px),calc(100% - 16px) calc(50% - 3px);background-size:6px 6px,6px 6px;background-repeat:no-repeat;padding-right:42px}
select option{background:var(--bg-soft);color:var(--text)}
select:disabled{opacity:.6;cursor:not-allowed}
input::placeholder,textarea::placeholder{color:#90a7c4}

.flash-stack{display:grid;gap:10px;margin-bottom:18px}.flash{padding:14px 16px;border-radius:18px;border:1px solid rgba(255,255,255,.08)}.flash.success{background:rgba(34,197,94,.12)}.flash.warning{background:rgba(245,158,11,.14)}.flash.danger{background:rgba(239,68,68,.13)}.flash.info{background:rgba(59,130,246,.13)}
.list-stack{display:grid;gap:12px}.compact-list{gap:10px}.list-row,.booking-card,.workflow-tile,.suggestion-card,.instrument-tile{padding:18px;border-radius:22px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.list-row{text-decoration:none;display:flex;justify-content:space-between;align-items:center;gap:16px}.list-row.no-link{cursor:default}
.list-row small,.muted, .meta-list span, .workflow-tile p, .instrument-tile p{color:var(--muted)}
.status-chip{padding:7px 10px;border-radius:999px;font-size:.82rem;border:1px solid rgba(255,255,255,.12);text-transform:lowercase}
.status-chip.confirmed,.status-chip.auto{background:rgba(34,197,94,.12);color:#bef264}.status-chip.pending_approval,.status-chip.approval{background:rgba(245,158,11,.14);color:#fde68a}.status-chip.rejected{background:rgba(239,68,68,.12);color:#fecaca}
.meta-list{display:grid;gap:6px}.meta-list.rich span{padding:10px 12px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);border-radius:14px}
.premium-calendar{overflow:auto}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(160px,1fr));gap:12px}.calendar-grid.weekdays{margin-bottom:12px}.calendar-grid.weekdays div{padding:8px 12px;color:#d6e4f7;font-weight:700}
.day-cell{min-height:200px;padding:14px;border-radius:22px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.07)}.today-cell{outline:1px solid rgba(110,231,255,.45);box-shadow:0 0 0 3px rgba(110,231,255,.08)}.muted-cell{opacity:.42}
.day-number{font-size:.95rem;font-weight:700;margin-bottom:12px}.event-stack{display:grid;gap:8px}.event-pill{text-decoration:none;padding:10px;border-radius:16px;background:linear-gradient(180deg,rgba(110,231,255,.18),rgba(139,92,246,.12));border:1px solid rgba(255,255,255,.12)}.event-pill strong,.event-pill span,.event-pill small{display:block}
[hidden]{display:none!important}.top-gap{margin-top:16px}.subpanel.hidden-panel{display:none}.subpanel{margin-top:20px;padding-top:18px;border-top:1px solid rgba(255,255,255,.08)}
.step-stack{display:grid;gap:12px}.step-card{display:grid;grid-template-columns:120px 1.4fr 1fr 1fr;gap:12px;align-items:center;padding:14px;border-radius:20px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.reserve-step-row{grid-template-columns:90px minmax(130px,.7fr) minmax(220px,1.5fr) minmax(120px,.7fr)}
.show-advanced .reserve-step-row{grid-template-columns:90px minmax(130px,.7fr) minmax(220px,1.5fr) minmax(120px,.7fr) minmax(150px,.8fr)}
.reserve-location-filters{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.08)}
.reserve-location-filters[hidden]{display:none}
.directory-filter-grid{position:relative;z-index:22;grid-template-columns:repeat(5,minmax(0,1fr));align-items:end}
.taxonomy-combobox-wrap{position:relative;display:block}
.taxonomy-combobox-list{
  position:absolute;
  z-index:240;
  left:0;
  right:0;
  max-height:min(420px, 55vh);
  overflow:auto;
  overscroll-behavior:contain;
  padding:6px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel,rgba(20,25,36,.98));
  box-shadow:0 18px 45px rgba(0,0,0,.28);
}
.taxonomy-combobox-option{
  display:block;
  width:100%;
  padding:10px 12px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:var(--text);
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.taxonomy-combobox-option:hover,
.taxonomy-combobox-option:focus,
.taxonomy-combobox-option.taxonomy-combobox-active{background:rgba(110,231,255,.12);outline:0}
html[data-resolved-theme="light"] .taxonomy-combobox-list{
  background:rgba(255,255,255,.98);
  box-shadow:0 18px 45px rgba(15,23,42,.16);
}
html[data-resolved-theme="light"] .taxonomy-combobox-option:hover,
html[data-resolved-theme="light"] .taxonomy-combobox-option:focus,
html[data-resolved-theme="light"] .taxonomy-combobox-option.taxonomy-combobox-active{background:rgba(14,165,233,.10)}
.chemical-usage-row{grid-template-columns:120px 1.5fr .8fr .7fr 1.4fr}
.calendar-bundle{margin-top:18px;padding-top:18px;border-top:1px solid rgba(255,255,255,.08)}
.inset-panel{min-height:100%}.empty-state{display:grid;place-items:center;min-height:260px;text-align:center}.auth-wrap,.narrow-card{max-width:560px;margin:0 auto}.toolbar-bar{justify-content:space-between}.inline-form{display:flex;gap:10px;align-items:center;margin-top:10px}.inline-form.reject{margin-top:8px}
@media (max-width: 1080px){
  .hero-panel,.grid-two,.labs-layout,.admin-layout{grid-template-columns:1fr}
  .equipment-admin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .equipment-admin-card{grid-template-columns:82px minmax(0,1fr)}
  .equipment-admin-actions{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));min-width:0}
  .equipment-admin-photo{width:82px;height:70px}
  .feature-strip,.card-grid.two-up,.card-grid.three-up,.three-col,.two-col,.directory-filter-grid{grid-template-columns:1fr}
  .step-card{grid-template-columns:1fr}
  .reserve-step-row{grid-template-columns:1fr}
  .reserve-location-filters{grid-template-columns:1fr}
  .chemical-usage-row{grid-template-columns:1fr}
}
@media (max-width: 760px){
  .container{width:min(100% - 24px,1320px)}
  .equipment-admin-metrics{grid-template-columns:1fr 1fr;gap:10px}
  .equipment-admin-metric{padding:14px;gap:10px}
  .equipment-admin-metric strong{font-size:1.3rem}
  .metric-icon{width:34px;height:34px;border-radius:12px}
  .equipment-admin-card{grid-template-columns:1fr;gap:12px}
  .equipment-admin-photo{width:100%;height:120px}
  .equipment-admin-title-row{align-items:flex-start}
  .equipment-admin-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .equipment-panel-summary,.management-review-summary{align-items:flex-start}
  .nav-shell{flex-direction:column;align-items:flex-start}
  .main-nav{width:100%}
  .calendar-grid{grid-template-columns:repeat(7,minmax(140px,1fr))}
}

/* premium v2 additions */
.premium-header{box-shadow:0 10px 30px rgba(0,0,0,.18)}
.nav-advanced{display:grid;grid-template-columns:auto minmax(260px,1fr) auto auto;align-items:center;gap:16px}
.brand-xl strong{font-size:1.02rem}
.nav-search input{height:46px;border-radius:999px;background:rgba(255,255,255,.06)}
.nav-search{min-width:280px}
.nav-pill{gap:4px}
.page-title{font-size:clamp(1.8rem,3vw,2.6rem);margin:0}
.lab-editor-stack{display:grid;gap:18px}
.lab-editor-disclosure,
.nested-editor-disclosure{overflow:hidden}
.lab-editor-disclosure summary,
.nested-editor-disclosure summary{list-style:none;cursor:pointer}
.lab-editor-disclosure summary::-webkit-details-marker,
.nested-editor-disclosure summary::-webkit-details-marker{display:none}
.lab-editor-summary,
.nested-editor-summary{display:flex;align-items:center;justify-content:space-between;gap:18px}
.lab-editor-summary{padding:2px 0}
.nested-editor-summary{padding:4px 0}
.lab-editor-summary h2,.nested-editor-summary strong{margin:0}
.lab-editor-summary p{margin:6px 0 0}
.lab-editor-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:8px 14px;border-radius:999px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);color:var(--text);font-size:.9rem}
.lab-editor-toggle::after{content:"展開"}
.lab-editor-disclosure[open] .lab-editor-toggle::after{content:"收合"}
.lab-editor-disclosure[open] .lab-editor-toggle{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.12)}
.lab-editor-panel{margin-top:18px}
.editor-image-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.editor-image-card{display:grid;gap:10px}
.editor-image-preview{min-height:220px;border-radius:18px;overflow:hidden;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03)}
.editor-image-preview img{display:block;width:100%;height:100%;object-fit:cover}
.editor-image-placeholder{min-height:220px;display:grid;place-items:center;color:var(--muted);text-align:center;padding:20px}
.hero-settings-grid{display:grid;grid-template-columns:minmax(0,170px) minmax(0,170px) minmax(0,1fr);gap:14px;align-items:stretch}
.hero-setting-field{min-width:0}
.hero-preview-card{display:grid;gap:10px;padding:14px 16px;border-radius:18px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04)}
.hero-preview-surface{display:grid;gap:10px;min-height:120px;padding:18px;border-radius:16px;background:linear-gradient(135deg,rgba(15,23,42,.58),rgba(30,41,59,.28));border:1px solid rgba(255,255,255,.08);align-content:end}
.hero-preview-breadcrumb{font-size:.88rem;color:rgba(255,255,255,.72)}
.hero-preview-title{font-size:clamp(1.7rem,3vw,2.5rem);font-weight:800;line-height:1.05;color:#fff}
.pi-preview{max-width:260px}
.member-photo-preview{max-width:220px}
.member-summary-row{align-items:center}
.member-summary-card{display:flex;align-items:center;gap:12px;min-width:0}
.member-summary-avatar{width:44px;height:44px;border-radius:999px;object-fit:cover;flex:0 0 auto;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05)}
.member-summary-main{display:grid;gap:4px;min-width:0}
.member-summary-main strong,.member-summary-main span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.member-item-disclosure{background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.06)}
.member-create-disclosure{padding:18px 20px;border-radius:22px;border:1px dashed rgba(110,231,255,.28);background:rgba(110,231,255,.05)}
.member-create-summary{justify-content:flex-start;gap:14px}
.member-create-badge{width:42px;height:42px;border-radius:999px;display:grid;place-items:center;font-size:1.45rem;font-weight:700;background:rgba(110,231,255,.14);border:1px solid rgba(110,231,255,.24);color:#baf6ff}
.hero-product{background:linear-gradient(180deg,rgba(8,20,36,.86),rgba(11,24,42,.72));}
.premium-stack{display:grid;gap:14px}
.accent-panel{background:linear-gradient(135deg,rgba(110,231,255,.15),rgba(139,92,246,.16));}
.data-table-wrap{overflow:auto;border:1px solid rgba(255,255,255,.08);border-radius:22px;background:rgba(255,255,255,.03)}
.data-table{width:100%;border-collapse:collapse;min-width:720px}
.data-table th,.data-table td{padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.06);text-align:left;vertical-align:top}
.data-table th{font-size:.82rem;letter-spacing:.06em;text-transform:uppercase;color:#b9cae4;background:rgba(255,255,255,.03)}
.data-table tr:hover td{background:rgba(255,255,255,.02)}
.mini-list{display:grid;gap:12px}
.metric-line{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06)}
.metric-line strong{white-space:nowrap}
@media (max-width: 1180px){.nav-advanced{grid-template-columns:1fr;align-items:flex-start}.nav-search{width:100%}}

/* IA refactor */
.simplified-header{position:sticky;top:0;z-index:40;background:rgba(7,15,29,.82);backdrop-filter:blur(20px);border-bottom:1px solid rgba(255,255,255,.06)}
.nav-refined{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 0}
.compact-nav{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.compact-nav a{padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06)}
.hero-quiet{grid-template-columns:1.15fr .85fr}
.role-split{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:22px 0}
.role-card{display:flex;gap:18px;align-items:flex-start;padding:28px;text-decoration:none;color:inherit}
.role-card h2{margin:0 0 8px 0}
.role-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;font-weight:800;font-size:1.2rem;background:linear-gradient(135deg,#5cc8ff,#7c5cff);color:#09121f;box-shadow:0 16px 36px rgba(92,200,255,.22)}
.role-icon.admin{background:linear-gradient(135deg,#7c5cff,#b58cff);color:#fff}
.clean-list{list-style:none;padding:0;margin:12px 0 0 0;display:grid;gap:8px;color:rgba(236,242,255,.74)}
.clean-list li::before{content:"??";color:rgba(134,184,255,.95)}
.folder-grid{display:grid;gap:18px;margin:20px 0}
.folder-grid.compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.folder-grid.three-up{grid-template-columns:repeat(3,minmax(0,1fr))}
.folder-grid.two-up{grid-template-columns:repeat(2,minmax(0,1fr))}
.folder-card,.folder-panel{padding:22px;border-radius:22px;text-decoration:none;color:inherit}
.folder-card{display:flex;flex-direction:column;gap:6px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06)}
.folder-card strong{font-size:1rem}
.folder-card span{color:rgba(236,242,255,.62)}
.folder-panel{min-height:180px;display:flex;flex-direction:column;justify-content:space-between}
.folder-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.folder-label{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:12px;background:rgba(112,144,255,.15);color:#b8c8ff;font-weight:700}
.inner-panel{min-height:unset}
.section-hero{padding:28px 30px;margin-bottom:12px}
.breadcrumb-row{display:flex;align-items:center;gap:8px;color:rgba(236,242,255,.55);font-size:.94rem;margin-bottom:8px}
.breadcrumb-row a{color:rgba(236,242,255,.72);text-decoration:none}
.section-hero h1{margin:0 0 8px 0}
.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width: 960px){
  .role-split,.folder-grid.three-up,.folder-grid.two-up,.folder-grid.compact-grid,.hero-quiet{grid-template-columns:1fr}
  .nav-refined{flex-direction:column;align-items:stretch}
  .compact-nav{justify-content:flex-start}
}

/* lab profile refinement */
.lab-hero-panel{display:grid;grid-template-columns:1.18fr .95fr;gap:24px;align-items:start;padding:34px}
.lab-hero-customizable{
  --lab-hero-text-color:#FFFFFF;
  --lab-hero-font-family:"Geist Sans",Inter,"Noto Sans TC",system-ui,sans-serif;
  color:var(--lab-hero-text-color);
  font-family:var(--lab-hero-font-family);
}
.lab-hero-customizable .lab-hero-copy{
  font-family:var(--lab-hero-font-family);
}
.lab-hero-customizable .lab-overview-box,
.lab-hero-customizable .metric-card,
.lab-hero-customizable .hero-actions .button,
.lab-hero-customizable .lab-affiliation-row a{
  font-family:var(--lab-hero-font-family);
}
.lab-hero-customizable .breadcrumb-row,
.lab-hero-customizable .breadcrumb-row a,
.lab-hero-customizable .eyebrow,
.lab-hero-customizable .lab-hero-copy h1,
.lab-hero-customizable .lab-affiliation-row span,
.lab-hero-customizable .lab-affiliation-row a{
  color:var(--lab-hero-text-color);
  text-shadow:0 1px 3px rgba(0,0,0,.24);
}
.lab-hero-customizable .lab-overview-box,
.lab-hero-customizable .lab-overview-box p,
.lab-hero-customizable .metric-card,
.lab-hero-customizable .metric-card span,
.lab-hero-customizable .hero-actions .button{
  color:var(--lab-hero-text-color);
  text-shadow:none;
}
.lab-hero-customizable .lab-affiliation-row span,
.lab-hero-customizable .lab-affiliation-row a{
  border-color:rgba(255,255,255,.22);
  background:rgba(255,255,255,.12);
}
.lab-hero-customizable .lab-overview-box,
.lab-hero-customizable .metric-card{
  border-color:rgba(255,255,255,.16);
  background:rgba(255,255,255,.12);
}
.lab-hero-customizable .hero-actions .button{
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.12);
}
.lab-hero-customizable .hero-actions .button.primary{
  background:rgba(255,255,255,.18);
}
.lab-hero-copy h1{margin-bottom:12px}
.big-copy-box{padding:22px 24px;border-radius:22px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.1);color:#e7eef9;line-height:1.8;font-size:1rem;box-shadow:none;word-break:break-word;overflow-wrap:break-word;min-width:0}
.lab-hero-visual{display:grid;gap:16px}
.lab-template-shell{display:grid;gap:22px}
.lab-template-shell .glass-card,
.lab-template-shell .glass-lite,
.lab-template-shell .member-card,
.lab-template-shell .member-group-section,
.lab-template-shell .portrait-block,
.lab-template-shell .lab-image-frame,
.lab-template-shell .gallery-card,
.lab-template-shell .metric-card{
  box-shadow:0 10px 28px rgba(15,23,42,.06);
}
.lab-template-shell .lab-hero-panel{
  gap:20px;
}
.lab-template-shell .hero-actions{
  gap:10px;
  margin:18px 0 0;
}
.lab-template-shell .hero-actions .button{
  box-shadow:0 12px 26px rgba(15,23,42,.08);
  backdrop-filter:blur(12px);
}
.lab-template-shell .hero-actions .button:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 34px rgba(15,23,42,.12);
}
.lab-template-shell .hero-actions .button.primary{
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.22);
  color:var(--lab-hero-text-color);
}
.lab-template-shell .metric-card{
  padding:18px;
  border-radius:20px;
  background:rgba(255,255,255,.14);
  backdrop-filter:blur(14px);
}
.lab-template-shell .metric-card span{
  margin-bottom:4px;
  font-size:1.8rem;
}
.lab-template-shell .lab-image-frame,
.lab-template-shell .gallery-card{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
}
.lab-template-shell .member-card,
.lab-template-shell .profile-note,
.lab-template-shell .gallery-card{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
}
.template-preview-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 20px}
.template-preview-banner strong{font-size:1rem}
.template-preview-banner span{color:var(--muted)}
.lab-facts-stack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.lab-fact-card{padding:16px 18px;border-radius:20px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.lab-fact-card small{display:block;color:var(--muted);margin-bottom:8px;text-transform:uppercase;letter-spacing:.08em}
.lab-fact-card strong{display:block;font-size:1.45rem;line-height:1.1}
.editorial-hero,.atlas-hero,.portfolio-hero{display:grid;gap:22px}
.editorial-hero{grid-template-columns:1.05fr .95fr;align-items:start;padding:30px}
.editorial-copy{display:grid;gap:18px}
.editorial-lead{margin:0;color:#dbe7f6;line-height:1.85;font-size:1.02rem}
.editorial-visual{display:grid;gap:16px}
.editorial-image{min-height:360px}
.editorial-secondary-grid{align-items:start}
.atlas-hero{grid-template-columns:1.08fr .92fr;align-items:stretch;padding:22px}
.atlas-media{position:relative;min-height:420px;border-radius:28px;overflow:hidden;border:1px solid rgba(255,255,255,.08)}
.atlas-media img{width:100%;height:100%;object-fit:cover;display:block}
.atlas-media-overlay{position:absolute;inset:auto 0 0 0;padding:24px;background:linear-gradient(180deg,rgba(7,17,31,0),rgba(7,17,31,.9))}
.atlas-summary{display:grid;gap:16px;align-content:start}
.atlas-overview{height:100%}
.atlas-metrics{margin-top:0}
.atlas-pair-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.portfolio-hero{grid-template-columns:minmax(360px,.92fr) minmax(0,1.08fr);align-items:start}
.portfolio-copy{display:grid;gap:18px;padding:28px}
.portfolio-media{display:grid;gap:16px;padding:20px}
.portfolio-image{min-height:520px}
.portfolio-caption{display:flex;justify-content:space-between;gap:12px;color:var(--muted)}
.portfolio-caption strong{color:var(--text)}
.portfolio-stream{display:grid;gap:22px}
.portfolio-bottom-grid{align-items:start}
.template-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.template-choice-card{display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.035)}
.template-choice-card.selected{border-color:rgba(110,231,255,.42);box-shadow:0 0 0 1px rgba(110,231,255,.15)}
.template-choice-card input{width:auto}
.template-choice-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.template-choice-copy{display:grid;gap:4px}
.template-choice-copy strong{font-size:1rem}
.template-choice-copy span,.template-choice-copy p{margin:0;color:var(--muted)}
.template-preview-thumb{display:grid;gap:10px;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02))}
.thumb-row{display:grid;gap:8px}
.thumb-row.two{grid-template-columns:1.1fr .9fr}
.thumb-block{min-height:18px;border-radius:10px;background:rgba(255,255,255,.08)}
.thumb-block.tall{min-height:78px}
.thumb-block.hero{min-height:120px}
.thumb-block.metric{min-height:54px}
.thumb-block.short{min-height:12px;width:72%}
.template-choice-actions{display:flex;justify-content:space-between;gap:10px;align-items:center}
.template-choice-actions .button{width:auto}
.lab-image-frame,.gallery-card{overflow:hidden;border-radius:24px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04)}
.lab-image-frame img,.gallery-card img{display:block;width:100%;height:100%;object-fit:cover}
.lab-image-frame{min-height:320px}
.gallery-card img{height:240px}
.gallery-card p{padding:16px 18px 0;color:#d5deeb;line-height:1.7;margin:0;word-break:break-word}
.space-desc{padding:0 18px;color:#d5deeb;line-height:1.7;margin:0 0 14px;word-break:break-word}
.space-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:0 18px 18px}
.space-photo{overflow:hidden;border-radius:18px;aspect-ratio:4/3;max-height:280px}
.space-photo img{display:block;width:100%;height:100%;object-fit:cover}
.space-map{display:grid;gap:10px;text-decoration:none;color:inherit;align-content:start}
.space-map iframe{width:100%;aspect-ratio:4/3;max-height:280px;border:0;border-radius:18px;background:rgba(255,255,255,.06)}
.space-map span{display:inline-flex;align-items:center;justify-content:center;width:max-content;padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.1);box-shadow:0 10px 24px rgba(15,23,42,.08)}
.space-card-body{display:grid;gap:14px;padding:0 18px 18px}
.space-map-preview{display:grid;gap:10px;text-decoration:none;color:inherit}
.space-map-preview iframe{width:100%;height:160px;border:0;border-radius:18px;background:rgba(255,255,255,.06)}
.space-map-preview span{display:inline-flex;align-items:center;justify-content:center;width:max-content;padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.1);box-shadow:0 10px 24px rgba(15,23,42,.08)}
.tight-grid{margin-top:0}
.profile-showcase{padding:30px}
.pi-header{display:flex;align-items:center;gap:18px;margin-bottom:20px}
.pi-avatar{width:90px;height:90px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.12);flex-shrink:0}
.pi-header-info{display:grid;gap:4px}.pi-header-info strong{font-size:1.15rem}.pi-header-info span{color:var(--muted)}
.pi-stack{display:grid;gap:14px}
.pi-card{min-width:0;overflow:hidden}
.pi-card h3{margin-bottom:10px}
.pi-card p{margin:0;line-height:1.8;color:#dbe7f6;word-break:break-word}
.pi-layout{display:grid;grid-template-columns:320px 1fr;gap:22px;align-items:start}
.portrait-block{position:sticky;top:100px;padding:18px;border-radius:26px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.portrait-image{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:22px;display:block}
.portrait-meta{padding-top:14px;display:grid;gap:4px}.portrait-meta strong{font-size:1.12rem}.portrait-meta span{color:var(--muted)}
.pi-content-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.profile-note{height:100%}.profile-note.wide{grid-column:1/-1}.profile-note h3{margin-bottom:10px}.profile-note p{margin:0;line-height:1.8;color:#dbe7f6;word-break:break-word}
.member-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.member-card{overflow:hidden;border-radius:24px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);box-shadow:var(--shadow)}
.member-photo{display:block;width:100%;aspect-ratio:1/1;object-fit:cover}
.member-body{padding:18px;min-width:0}.member-body h3{margin-bottom:4px}.member-role{color:#91caff;font-weight:600;margin-bottom:10px}.member-summary{color:#d6dfed;line-height:1.75;word-break:break-word}.contact-stack{display:grid;gap:6px;color:var(--muted);font-size:.93rem}
.member-group-stack{display:grid;gap:22px}
.member-group-section{padding:18px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.035)}
.member-group-intro{max-width:78ch;margin-bottom:16px}
.member-group-intro h3{margin-bottom:6px}
.member-group-intro p{margin:0;color:var(--muted);line-height:1.75;word-break:break-word}
.member-compact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.compact-member-card{display:grid;grid-template-columns:88px 1fr;align-items:start;column-gap:24px}
.compact-member-card .member-photo{width:88px;height:88px;aspect-ratio:auto;border-radius:8px;margin:16px 0 16px 16px}
.compact-member-card .member-body{padding:16px 18px 16px 0}
.compact-member-card .member-summary{min-height:0}
.order-line{align-items:center}.order-line small{display:block;color:var(--muted);margin-top:4px}

/* subtle polish */
.folder-panel{background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.028));border:1px solid rgba(255,255,255,.08);transition:.22s transform,.22s border-color,.22s box-shadow}
.folder-panel:hover{transform:translateY(-4px);border-color:rgba(110,231,255,.28);box-shadow:0 24px 54px rgba(0,0,0,.26)}
.section-hero{background:linear-gradient(180deg,rgba(11,24,42,.84),rgba(11,24,42,.62))}
.data-table td .button.small{white-space:nowrap}

@media (max-width: 1100px){
  .lab-hero-panel,.pi-layout,.member-grid,.member-compact-grid{grid-template-columns:1fr}
  .pi-content-grid{grid-template-columns:1fr}
  .portrait-block{position:static}
}

html[data-resolved-theme="light"] {
  --bg: #eef4fb;
  --bg-soft: #f8fbff;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-2: rgba(21, 33, 56, 0.06);
  --line: rgba(21, 33, 56, 0.12);
  --text: #10203b;
  --text-muted: #8b949e;
  --muted: #556987;
  --accent: #0ea5e9;
  --accent-2: #7c3aed;
  --shadow: 0 20px 50px rgba(38, 55, 90, 0.12);
}

html[data-resolved-theme="light"] body {
  background:
    radial-gradient(circle at 10% 10%, rgba(14,165,233,.12), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(124,58,237,.10), transparent 22%),
    linear-gradient(180deg,#f7fbff 0%, #eef5fd 52%, #f4f8fd 100%);
}

html[data-resolved-theme="light"] .site-header,
html[data-resolved-theme="light"] .simplified-header {
  background: rgba(255,255,255,.78);
  border-bottom-color: rgba(16,32,59,.08);
}

html[data-resolved-theme="light"] .main-nav a,
html[data-resolved-theme="light"] .account-pill a,
html[data-resolved-theme="light"] .compact-nav a,
html[data-resolved-theme="light"] .lead,
html[data-resolved-theme="light"] .metric-card,
html[data-resolved-theme="light"] .list-row small,
html[data-resolved-theme="light"] .muted,
html[data-resolved-theme="light"] .folder-card span,
html[data-resolved-theme="light"] .gallery-card p,
html[data-resolved-theme="light"] .profile-note p,
html[data-resolved-theme="light"] .pi-card p,
html[data-resolved-theme="light"] .member-summary,
html[data-resolved-theme="light"] .contact-stack,
html[data-resolved-theme="light"] .breadcrumb-row,
html[data-resolved-theme="light"] .brand-wrap small,
html[data-resolved-theme="light"] .clean-list,
html[data-resolved-theme="light"] .section-head small,
html[data-resolved-theme="light"] .hero-actions .button.ghost,
html[data-resolved-theme="light"] input::placeholder,
html[data-resolved-theme="light"] textarea::placeholder {
  color: var(--muted);
}

html[data-resolved-theme="light"] .account-menu-trigger,
html[data-resolved-theme="light"] .nav-menu-trigger,
html[data-resolved-theme="light"] .nav-dropdown a,
html[data-resolved-theme="light"] .account-dropdown a,
html[data-resolved-theme="light"] .account-dropdown button {
  color:#334155;
}

html[data-resolved-theme="light"] .nav-dropdown,
html[data-resolved-theme="light"] .account-dropdown {
  background:rgba(255,255,255,.98);
}

html[data-resolved-theme="light"] .account-pill,
html[data-resolved-theme="light"] .compact-nav a,
html[data-resolved-theme="light"] .glass-lite,
html[data-resolved-theme="light"] .metric-card,
html[data-resolved-theme="light"] .spotlight-card,
html[data-resolved-theme="light"] .folder-card,
html[data-resolved-theme="light"] .day-cell,
html[data-resolved-theme="light"] .event-pill,
html[data-resolved-theme="light"] .list-row,
html[data-resolved-theme="light"] .booking-card,
html[data-resolved-theme="light"] .workflow-tile,
html[data-resolved-theme="light"] .suggestion-card,
html[data-resolved-theme="light"] .instrument-tile,
html[data-resolved-theme="light"] .portrait-block,
html[data-resolved-theme="light"] .pi-card,
html[data-resolved-theme="light"] .big-copy-box,
html[data-resolved-theme="light"] .data-table th,
html[data-resolved-theme="light"] .data-table td,
html[data-resolved-theme="light"] .upload-placeholder {
  border-color: rgba(16,32,59,.1);
}

html[data-resolved-theme="light"] input,
html[data-resolved-theme="light"] select,
html[data-resolved-theme="light"] textarea {
  background-color: #ffffff;
  color: var(--text);
  border-color: rgba(16,32,59,.15);
}

html[data-resolved-theme="light"] .button.ghost {
  background: rgba(16,32,59,.04);
  color: var(--text);
  border: 1px solid rgba(16,32,59,.1);
}

html[data-resolved-theme="light"] .folder-panel,
html[data-resolved-theme="light"] .section-hero,
html[data-resolved-theme="light"] .hero-product,
html[data-resolved-theme="light"] .lab-hero-panel,
html[data-resolved-theme="light"] .glass-card {
  background: var(--panel);
}
html[data-resolved-theme="light"] .reserve-adv-panel{background:rgba(0,0,0,.03)!important;border-color:rgba(0,0,0,.08)!important}
html[data-resolved-theme="light"] .pi-card p{color:#334155}
html[data-resolved-theme="light"] .pi-avatar{border-color:rgba(16,32,59,.1)}

html[data-resolved-theme="light"] .template-choice-card,
html[data-resolved-theme="light"] .template-preview-thumb,
html[data-resolved-theme="light"] .lab-fact-card {
  background: rgba(255,255,255,.72);
  border-color: rgba(16,32,59,.1);
}

html[data-resolved-theme="light"] .big-copy-box {
  background: linear-gradient(180deg,rgba(16,32,59,.035),rgba(16,32,59,.02));
}

html[data-resolved-theme="light"] .member-card,
html[data-resolved-theme="light"] .gallery-card,
html[data-resolved-theme="light"] .lab-image-frame,
html[data-resolved-theme="light"] .data-table-wrap {
  background: rgba(255,255,255,.68);
  border-color: rgba(16,32,59,.1);
}

.single-role {grid-template-columns: minmax(0, 1fr);} 
.single-grid {grid-template-columns: minmax(0, 1fr);} 
.lab-copy-stack {display:grid; gap:18px; align-content:start;}
.hero-chip-row {margin:0;}
.big-copy-box {margin:0;}

.calendar-disclosure,
.management-disclosure {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: rgba(255,255,255,.03);
  overflow: hidden;
}
.calendar-disclosure summary,
.management-disclosure summary {
  list-style: none;
  cursor: pointer;
}
.calendar-disclosure summary::-webkit-details-marker,
.management-disclosure summary::-webkit-details-marker {display:none;}
.disclosure-trigger {margin:0;}
.disclosure-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 22px;
}
.disclosure-body,
.calendar-disclosure-body {
  padding:0 22px 22px;
}

.suggestion-card-actionable {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:18px;
  align-items:start;
}
.suggestion-steps {margin:12px 0 0 20px; color:var(--muted); line-height:1.8;}
.suggestion-cta {display:flex; align-items:center; justify-content:flex-end; min-width:190px;}
.suggestion-headline {align-items:flex-start;}

/* ── Suggestion timetable ───────────────────────────────────────────────── */
.sched-timetable-legend{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.sched-legend-chip{display:inline-flex;align-items:center;padding:6px 14px;border-radius:999px;border:2px solid;font-size:.84rem;font-weight:700;cursor:pointer;transition:box-shadow .15s,transform .15s}
.sched-legend-chip.active{box-shadow:0 0 0 3px rgba(255,255,255,.12);transform:scale(1.06)}
.sched-timetable-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -4px;padding:0 4px 8px}
.sched-timetable{gap:0;min-width:fit-content}
.sched-col-hdr{display:flex;align-items:center;justify-content:center;font-size:.82rem;font-weight:700;color:var(--muted);border-bottom:1px solid var(--line);padding:0 4px;white-space:nowrap}
.sched-inst-hdr{display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:600;color:var(--muted);opacity:.7;border-bottom:2px solid var(--line);padding:0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sched-time-lbl{display:flex;align-items:flex-start;justify-content:flex-end;font-size:.72rem;color:var(--muted);padding-right:8px;line-height:1;margin-top:-4px}
.sched-cell{border-bottom:1px solid rgba(148,163,184,.06);border-right:1px solid rgba(148,163,184,.06)}
.sched-cell-hour{border-bottom:1px solid rgba(148,163,184,.18)}
.sched-block{position:relative;border-radius:6px;margin:1px 3px;z-index:2;overflow:hidden;display:flex;flex-direction:column;justify-content:center;padding:2px 6px;transition:opacity .2s,transform .2s}
.sched-block-text{font-size:.72rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.sched-block-time{font-size:.66rem;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.sched-occupied{opacity:.5}
.sched-timetable-detail{margin-top:14px;padding:16px;border-radius:18px;background:var(--bg);border:1px solid var(--line)}
.sched-detail-inner{display:grid;gap:8px}
.sched-detail-inner strong{font-size:1.05rem}
.sched-detail-inner ul{margin:0;padding-left:20px;color:var(--muted);line-height:1.8;font-size:.9rem}
@media(max-width:760px){
  .sched-timetable-wrap{margin:0 -8px;padding:0 8px 8px}
  .sched-legend-chip{font-size:.78rem;padding:5px 10px}
}

.equipment-preview {
  display:block;
  width:100%;
  max-height:280px;
  object-fit:cover;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}
.equipment-preview-large {max-height:340px;}
.upload-placeholder {
  min-height:220px;
  display:grid;
  place-items:center;
  text-align:center;
  border-radius:22px;
  background:rgba(255,255,255,.04);
}
.static-panel {pointer-events:none;}

.tag {
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  color:var(--muted);
  font-size:.82rem;
}
.wrap-top-gap {flex-wrap:wrap;}

@media (max-width: 960px){
  .suggestion-card-actionable {grid-template-columns:1fr;}
  .suggestion-cta {justify-content:flex-start;}
  .disclosure-row {flex-direction:column; align-items:flex-start;}
}

.lab-affiliation-row{margin:8px 0 18px 0}
.lab-overview-box{margin-top:4px}
.hidden-panel{display:none}
.open-panel{display:block}
.create-toggle-row{justify-content:space-between}
body, .glass-card, .glass-lite, .button, input, select, textarea, .folder-panel, .list-row, .event-pill{transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease}
html[data-resolved-theme="light"] .button.primary{color:#fff;box-shadow:0 12px 28px rgba(14,165,233,.18)}
html[data-resolved-theme="light"] .big-copy-box{background:linear-gradient(180deg,rgba(16,32,59,.04),rgba(16,32,59,.02));color:var(--text);}
html[data-resolved-theme="light"] .metric-card span,
html[data-resolved-theme="light"] h1,
html[data-resolved-theme="light"] h2,
html[data-resolved-theme="light"] h3,
html[data-resolved-theme="light"] strong{color:var(--text)}
html[data-resolved-theme="light"] .section-hero .page-title,
html[data-resolved-theme="light"] .section-hero h1{color:#0f172a}
html[data-resolved-theme="light"] .section-hero .lead{color:#334155}
html[data-resolved-theme="light"] .lab-editor-toggle{background:rgba(16,32,59,.04);border-color:rgba(16,32,59,.10);color:#0f172a}
html[data-resolved-theme="light"] .editor-image-preview{background:rgba(16,32,59,.03);border-color:rgba(16,32,59,.08)}
html[data-resolved-theme="light"] .member-summary-avatar{border-color:rgba(16,32,59,.1);background:rgba(16,32,59,.04)}
html[data-resolved-theme="light"] .member-create-disclosure{background:rgba(59,130,246,.04);border-color:rgba(59,130,246,.16)}
html[data-resolved-theme="light"] .member-create-badge{background:rgba(59,130,246,.10);border-color:rgba(59,130,246,.18);color:#2563eb}
html[data-resolved-theme="light"] .equipment-command-hero,
html[data-resolved-theme="light"] .management-command-hero{
  background:#ffffff;
  border-color:rgba(16,32,59,.10);
  box-shadow:0 18px 44px rgba(15,23,42,.10);
}
html[data-resolved-theme="light"] .equipment-tool-button{
  background:#ffffff;
  border-color:rgba(16,32,59,.14);
  color:#0f172a;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}
html[data-resolved-theme="light"] .equipment-tool-button:hover{
  background:#f8fbff;
  border-color:rgba(37,99,235,.24);
  box-shadow:0 16px 32px rgba(15,23,42,.12);
}
html[data-resolved-theme="light"] .equipment-tool-button.primary-tool{
  background:linear-gradient(135deg,#2563eb,#7c3aed);
  color:#ffffff;
  border-color:transparent;
}
html[data-resolved-theme="light"] .equipment-tool-panel,
html[data-resolved-theme="light"] .equipment-form-section,
html[data-resolved-theme="light"] .review-message-card,
html[data-resolved-theme="light"] .people-manage-card{
  background:#ffffff;
  border-color:rgba(16,32,59,.12);
  box-shadow:0 24px 60px rgba(15,23,42,.14);
}
html[data-resolved-theme="light"] .equipment-form-section>summary,
html[data-resolved-theme="light"] .equipment-dock-panel>summary{
  background:#f8fbff;
}
html[data-resolved-theme="light"] .equipment-form-section[open]>summary,
html[data-resolved-theme="light"] .equipment-dock-panel[open]>summary{
  background:#eef4fb;
  border-color:rgba(16,32,59,.10);
}
html[data-resolved-theme="light"] .hero-preview-card{background:rgba(255,255,255,.66);border-color:rgba(16,32,59,.08)}
html[data-resolved-theme="light"] .hero-preview-surface{background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(241,245,249,.88));border-color:rgba(16,32,59,.08)}
html[data-resolved-theme="light"] .hero-preview-breadcrumb{color:#64748b}
html[data-resolved-theme="light"] .space-map-preview span,
html[data-resolved-theme="light"] .space-map span{background:rgba(255,255,255,.68);border-color:rgba(16,32,59,.08);color:#0f172a}
html[data-resolved-theme="light"] .space-desc{color:#334155}
html[data-resolved-theme="light"] .lab-template-shell .lab-hero-panel,
html[data-resolved-theme="light"] .lab-template-shell .member-card,
html[data-resolved-theme="light"] .lab-template-shell .profile-note,
html[data-resolved-theme="light"] .lab-template-shell .gallery-card,
html[data-resolved-theme="light"] .lab-template-shell .lab-image-frame{background:rgba(255,255,255,.72)}
html[data-resolved-theme="light"] .lab-template-shell .metric-card{background:rgba(255,255,255,.48);border-color:rgba(16,32,59,.08)}
html[data-resolved-theme="light"] .lab-template-shell .big-copy-box{background:rgba(255,255,255,.6);border-color:rgba(16,32,59,.08)}
html[data-resolved-theme="light"] .lab-template-shell .hero-actions .button{background:rgba(255,255,255,.56);border-color:rgba(16,32,59,.08);color:#0f172a}
html[data-resolved-theme="light"] .lab-hero-customizable .breadcrumb-row,
html[data-resolved-theme="light"] .lab-hero-customizable .breadcrumb-row a,
html[data-resolved-theme="light"] .lab-hero-customizable .eyebrow,
html[data-resolved-theme="light"] .lab-hero-customizable .lab-affiliation-row span,
html[data-resolved-theme="light"] .lab-hero-customizable .lab-affiliation-row a,
html[data-resolved-theme="light"] .lab-hero-customizable .lab-overview-box,
html[data-resolved-theme="light"] .lab-hero-customizable .lab-overview-box p,
html[data-resolved-theme="light"] .lab-hero-customizable .metric-card,
html[data-resolved-theme="light"] .lab-hero-customizable .metric-card span{ text-shadow:none; }
html[data-resolved-theme="light"] .lab-hero-customizable .lab-hero-copy h1{color:var(--lab-hero-light-title-color);text-shadow:none;}
html[data-resolved-theme="light"] .lab-template-shell .hero-actions .button:hover{box-shadow:0 14px 28px rgba(15,23,42,.10)}
html[data-resolved-theme="light"] .mini-identity a{background:rgba(255,255,255,.56);border-color:rgba(16,32,59,.08);color:#0f172a}
html[data-resolved-theme="light"] .mini-identity a:hover{background:rgba(255,255,255,.82);box-shadow:0 12px 24px rgba(15,23,42,.08)}
html[data-resolved-theme="light"] .pill,
html[data-resolved-theme="light"] .mini-identity span{background:rgba(16,32,59,.05);border-color:rgba(16,32,59,.08);color:var(--text)}


html[data-resolved-theme="light"] { color-scheme: light; }
html[data-resolved-theme="light"] label,
html[data-resolved-theme="light"] .lead,
html[data-resolved-theme="light"] .muted,
html[data-resolved-theme="light"] .list-row small,
html[data-resolved-theme="light"] .meta-list span,
html[data-resolved-theme="light"] .workflow-tile p,
html[data-resolved-theme="light"] .instrument-tile p,
html[data-resolved-theme="light"] .account-pill a,
html[data-resolved-theme="light"] .main-nav a,
html[data-resolved-theme="light"] .pill,
html[data-resolved-theme="light"] .tag { color:#334155; }
html[data-resolved-theme="light"] .button.ghost,
html[data-resolved-theme="light"] .mini-identity span,
html[data-resolved-theme="light"] .pill,
html[data-resolved-theme="light"] .tag,
html[data-resolved-theme="light"] .status-chip { color:#0f172a; }
html[data-resolved-theme="light"] .breadcrumb-row a { color:#2563eb; }
html[data-resolved-theme="light"] .breadcrumb-row strong,
html[data-resolved-theme="light"] .breadcrumb-row span { color:#0f172a; }
html[data-resolved-theme="light"] .eyebrow,
html[data-resolved-theme="light"] .text-link,
html[data-resolved-theme="light"] .member-role { color:#0369a1; }
html[data-resolved-theme="light"] .folder-label {
  background:rgba(14,165,233,.10);
  color:#075985;
}
html[data-resolved-theme="light"] .calendar-grid.weekdays div,
html[data-resolved-theme="light"] .data-table th { color:#334155; }
html[data-resolved-theme="light"] select { background-image:linear-gradient(45deg,transparent 50%, #334155 50%),linear-gradient(135deg,#334155 50%,transparent 50%); }
html[data-resolved-theme="light"] select option { background:#ffffff; color:#0f172a; }
html[data-resolved-theme="light"] ::placeholder { color:#64748b; }
html[data-resolved-theme="light"] .flash { color:#0f172a; }

/* ?�?� Quick action row (research hub) ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.quick-action-row{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px}
.quick-action-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 18px;border-radius:20px;background:linear-gradient(135deg,rgba(110,231,255,.08),rgba(139,92,246,.08));border:1px solid rgba(110,231,255,.18);text-decoration:none;color:var(--text);font-weight:700;font-size:1.15rem;text-align:center;transition:.22s;backdrop-filter:blur(14px);box-shadow:0 8px 28px rgba(0,0,0,.12)}
.quick-action-btn:hover{background:linear-gradient(135deg,rgba(110,231,255,.16),rgba(139,92,246,.14));border-color:rgba(110,231,255,.4);transform:translateY(-3px);box-shadow:0 14px 36px rgba(110,231,255,.12)}
.qa-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:16px;background:rgba(110,231,255,.12);color:#8feaff;flex-shrink:0}.qa-icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html[data-resolved-theme="light"] .quick-action-btn{background:linear-gradient(135deg,rgba(14,165,233,.06),rgba(124,58,237,.05));border-color:rgba(14,165,233,.15);box-shadow:0 8px 24px rgba(38,55,90,.08)}
html[data-resolved-theme="light"] .quick-action-btn:hover{background:linear-gradient(135deg,rgba(14,165,233,.12),rgba(124,58,237,.1));border-color:rgba(14,165,233,.3);box-shadow:0 14px 32px rgba(14,165,233,.1)}
.action-cell{white-space:nowrap}
.action-cell .button{margin-right:4px}
@media(max-width:600px){.quick-action-row{grid-template-columns:1fr}}

/* ?�?� Tab bar ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.tab-bar{display:flex;gap:4px;background:rgba(255,255,255,.06);border-radius:12px;padding:4px}
.tab-item{text-decoration:none;padding:8px 16px;border-radius:10px;font-size:.88rem;color:var(--muted);transition:.18s}
.tab-item.active{background:var(--accent);color:#04111e;font-weight:600}
.tab-item:hover:not(.active){background:rgba(255,255,255,.08);color:var(--text)}
html[data-resolved-theme="light"] .tab-bar{background:rgba(16,32,59,.04)}
html[data-resolved-theme="light"] .tab-item.active{background:var(--accent);color:#fff}
html[data-resolved-theme="light"] .tab-item:hover:not(.active){background:rgba(16,32,59,.06)}
.research-section-head{align-items:center}
.research-view-actions{justify-content:flex-end}
.research-toolbar-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 0 16px}
.research-filter-bar{display:grid;grid-template-columns:minmax(180px,1fr) minmax(150px,.7fr) minmax(140px,.55fr) minmax(140px,.55fr) auto auto;gap:.5rem;align-items:end;margin-bottom:1.25rem}
.month-picker-form{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.month-picker-form label{min-width:150px}
.month-picker-form label span{font-size:.78rem;color:var(--muted)}
.research-head-month-form{margin:0}
.research-head-month-form label span{display:none}
.research-head-month-form input[type="month"]{min-height:44px}
.research-calendar{margin-top:16px}
.research-event-pill.confirmed{background:linear-gradient(180deg,rgba(34,197,94,.18),rgba(34,197,94,.08))}
.research-event-pill.pending_approval{background:linear-gradient(180deg,rgba(245,158,11,.20),rgba(245,158,11,.08))}
.research-event-pill.rejected,.research-event-pill.cancelled{background:linear-gradient(180deg,rgba(239,68,68,.18),rgba(239,68,68,.08))}
@media(max-width:900px){.research-filter-bar{grid-template-columns:1fr 1fr}.research-filter-bar .button{width:100%}}
@media(max-width:600px){.research-section-head{align-items:flex-start}.research-view-actions{width:100%;justify-content:flex-start}.research-filter-bar{grid-template-columns:1fr}.month-picker-form{width:100%}.month-picker-form label{flex:1 1 160px}}

/* ?�?� Wide data table ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.data-table-wrap{overflow-x:auto;margin-top:16px}
.wide-table{width:100%;min-width:720px}
.data-table{border-collapse:collapse;width:100%}
.data-table th,.data-table td{padding:12px 14px;text-align:left;border-bottom:1px solid var(--line)}
.data-table th{font-size:.82rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:600}
.data-table td{font-size:.92rem}
.data-table tbody tr:hover{background:rgba(255,255,255,.03)}
html[data-resolved-theme="light"] .data-table tbody tr:hover{background:rgba(16,32,59,.02)}
.nowrap{white-space:nowrap}

/* ?�?� Result chips ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.result-chip{display:inline-block;padding:4px 10px;border-radius:8px;font-size:.82rem;font-weight:600}
.result-chip.success{background:rgba(34,197,94,.15);color:#22c55e}
.result-chip.failure{background:rgba(239,68,68,.15);color:#ef4444}
.result-chip.neutral{background:rgba(245,158,11,.15);color:#f59e0b}
html[data-resolved-theme="light"] .result-chip.success{background:rgba(34,197,94,.1);color:#16a34a}
html[data-resolved-theme="light"] .result-chip.failure{background:rgba(239,68,68,.1);color:#dc2626}
html[data-resolved-theme="light"] .result-chip.neutral{background:rgba(245,158,11,.1);color:#d97706}

/* ?�?� Experiment data page ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.exp-layout{display:grid;grid-template-columns:1fr 1fr;gap:22px}
@media(max-width:768px){.exp-layout{grid-template-columns:1fr}}
.radio-group{display:flex;gap:12px;flex-wrap:wrap}
.radio-group label{display:flex;align-items:center;gap:6px;cursor:pointer;padding:8px 14px;border-radius:12px;border:1px solid var(--line);transition:.18s}
.radio-group label:has(input:checked){border-color:var(--accent);background:rgba(110,231,255,.08)}
.radio-group input[type="radio"]{width:auto;margin:0}
.file-drop{border:2px dashed var(--line);border-radius:16px;padding:24px;text-align:center;color:var(--muted);cursor:pointer;transition:.18s}
.file-drop:hover{border-color:var(--accent);background:rgba(110,231,255,.04)}
.file-list{margin-top:12px}
.file-row{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--line)}
.file-row:last-child{border-bottom:none}
.file-meta{display:flex;gap:18px;align-items:center}
.file-meta small{color:var(--muted)}
.announcement-strip{overflow:hidden;margin:0 0 14px;border:1px solid var(--line);border-radius:12px;background:rgba(110,231,255,.08);color:var(--text)}
.announcement-track{display:inline-flex;gap:42px;white-space:nowrap;min-width:100%;padding:8px 14px;font-size:.92rem;animation:announcement-marquee 26s linear infinite}
.announcement-track span{display:inline-block}
.announcement-track.announcement-static{display:flex;animation:none;transform:none;white-space:normal}
@keyframes announcement-marquee{0%{transform:translateX(100%)}100%{transform:translateX(-100%)}}
.pricing-hero-layout{align-items:stretch}
.pricing-hero-copy{max-width:720px}
.pricing-hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.pricing-date-card{display:grid;align-content:center;gap:10px;min-width:min(320px,100%);padding:24px;border:1px solid rgba(110,231,255,.28);border-radius:8px;background:linear-gradient(135deg,rgba(110,231,255,.13),rgba(45,212,191,.08))}
.pricing-date-card span{color:var(--muted);font-size:.82rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.pricing-date-card strong{font-size:clamp(2rem,4vw,3.1rem);line-height:1;color:var(--text)}
.pricing-date-card p{margin:0;color:var(--muted);line-height:1.6}
.pricing-early-bird{margin-bottom:22px}
.early-bird-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.early-bird-step{position:relative;display:grid;gap:8px;min-height:142px;padding:18px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.04);overflow:hidden}
.early-bird-step::before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:rgba(110,231,255,.45)}
.early-bird-step.strongest::before{background:var(--success)}
.early-bird-step.original::before{background:var(--muted)}
.early-bird-step span{color:var(--muted);font-size:.9rem;font-weight:800}
.early-bird-step strong{font-size:clamp(1.7rem,2.4vw,2.35rem);line-height:1;color:var(--text)}
.early-bird-step small{align-self:end;color:var(--muted);font-weight:800}
.pricing-plan-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}
.pricing-plan-card{display:grid;gap:16px;height:100%;position:relative;overflow:hidden}
.pricing-plan-card::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(90deg,var(--accent),var(--success));opacity:.75}
.pricing-plan-card.featured::before{opacity:1}
.pricing-plan-card .button{align-self:end;margin-top:auto}
.pricing-plan-head{display:grid;gap:8px;position:relative;z-index:1}
.pricing-plan-head h2{margin:0}
.pricing-plan-head p{margin:0;color:var(--muted);line-height:1.55}
.billing-kicker{display:inline-flex;width:max-content;max-width:100%;padding:5px 9px;border-radius:999px;background:rgba(110,231,255,.12);color:var(--accent);font-size:.76rem;font-weight:800;letter-spacing:.04em}
.pricing-plan-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;position:relative;z-index:1}
.pricing-plan-controls label{display:grid;gap:7px;margin:0;font-size:.82rem;font-weight:800;color:var(--muted)}
.pricing-plan-controls select{width:100%;min-height:42px;border-radius:8px}
.pricing-plan-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;z-index:1}
.pricing-plan-meta span{display:grid;gap:4px;padding:12px;border-radius:8px;background:rgba(255,255,255,.05);border:1px solid var(--line)}
.pricing-plan-meta small{color:var(--muted);font-size:.76rem;font-weight:800}
.pricing-plan-meta strong{font-size:1.08rem;color:var(--text)}
.pricing-price-box{display:grid;gap:5px;padding:15px;border:1px solid rgba(45,212,191,.24);border-radius:8px;background:linear-gradient(135deg,rgba(45,212,191,.13),rgba(110,231,255,.06));position:relative;z-index:1}
.pricing-price-box small{color:var(--muted);font-weight:800}
.pricing-price-box strong{font-size:clamp(1.35rem,2vw,1.75rem);line-height:1;color:var(--text)}
.pricing-price-box span{color:var(--muted);font-size:.86rem;line-height:1.45}
.pricing-compare,.pricing-faq{margin-bottom:22px}
.pricing-compare-wrap{overflow-x:auto}
.pricing-compare .data-table{min-width:760px}
.pricing-faq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.pricing-faq-grid article{padding:18px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.04)}
.pricing-faq-grid h3{margin:0 0 8px;font-size:1rem}
.pricing-faq-grid p{margin:0;color:var(--muted);line-height:1.65}
.pricing-final-cta{display:flex;justify-content:space-between;gap:18px;align-items:center}
.pricing-final-cta h2{margin:4px 0 8px}
.pricing-final-cta p{max-width:660px}
.platform-metric-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin-bottom:22px}
.platform-metric-grid .metric-card{margin-bottom:0}
.platform-metric-grid .metric-card span{font-size:clamp(1.35rem,2vw,2rem);overflow-wrap:anywhere}
.platform-section-label{padding:20px 24px}
.onboarding-overlay{position:fixed;inset:0;z-index:80;display:grid;place-items:center;background:rgba(3,10,18,.72);backdrop-filter:blur(12px);padding:20px}
.site-header{z-index:90}
.onboarding-overlay[hidden]{display:none}
.onboarding-card{width:min(620px,100%);padding:24px;border-radius:8px;background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow)}
.onboarding-tour-card{width:min(1100px,100%);min-height:min(650px,84vh);max-height:86vh;overflow:hidden;padding:22px;background:linear-gradient(135deg,rgba(255,255,255,.1),rgba(255,255,255,.035)),var(--panel);display:flex;flex-direction:column}
.onboarding-tour-card>.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px;flex-shrink:0}
.onboarding-tour-card>.section-head .eyebrow{font-size:1.05rem;letter-spacing:.08em}
.onboarding-tour-card>.section-head .button{font-size:.9rem;padding:9px 14px}
.onboarding-page{display:none}
.onboarding-page.active{display:grid;grid-template-columns:minmax(0,.82fr) minmax(430px,1.18fr);gap:22px;align-items:center;min-height:0;flex:1;overflow:hidden}
.onboarding-page h2{font-size:clamp(2rem,2.75vw,2.7rem);line-height:1.06;margin:5px 0 8px;white-space:normal;text-wrap:balance}
.onboarding-page .muted{font-size:.98rem;line-height:1.55}
.onboarding-actions{justify-content:space-between;align-items:center;gap:12px;margin-top:8px;flex-shrink:0}
.onboarding-actions .button{min-width:110px;justify-content:center}
.onboarding-actions .pill{font-size:.82rem;padding:8px 14px}
.tour-copy{display:grid;gap:9px;align-content:center;min-width:0}
.tour-copy .eyebrow{font-size:1.08rem;letter-spacing:.08em}
.tour-points{display:grid;gap:7px;margin:2px 0 0;padding:0;list-style:none}
.tour-points li{position:relative;padding:8px 10px 8px 31px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.045);font-weight:700}
.tour-points li::before{content:"";position:absolute;left:13px;top:15px;width:8px;height:8px;border-radius:50%;background:var(--success)}
.tour-visual{align-self:stretch;display:grid;place-items:center;overflow:hidden;min-width:0}
.tour-real-screen{width:100%;max-height:400px;overflow:hidden;transform:scale(.88);transform-origin:center;padding:16px;margin:0}
.tour-real-screen .data-table-wrap,.tour-real-screen .folder-grid{overflow:hidden}
.tour-real-screen .section-head{margin-bottom:10px}
.tour-real-screen h1{font-size:1.55rem}
.tour-real-screen h2{font-size:1.3rem}
.tour-real-screen .step-card{grid-template-columns:auto minmax(120px,1fr) minmax(120px,1fr) minmax(90px,.55fr)}
.tour-real-screen .form-grid,.tour-real-screen .step-stack,.tour-real-screen .list-stack{gap:10px}
.tour-real-screen .lab-hero-visual img{display:none}
.tour-real-screen.lab-hero-panel{grid-template-columns:1.1fr .9fr}
.tour-form-preview label{font-size:.82rem}
.tour-storage-row{display:flex;justify-content:space-between;gap:12px;margin-top:8px;font-size:.9rem}
.tour-storage-bar{height:8px;border-radius:4px;background:var(--border);overflow:hidden;margin:6px 0 12px}
.tour-storage-bar span{display:block;height:100%;width:42%;background:var(--accent);border-radius:4px}
.tour-browser{width:100%;min-height:360px;border:1px solid rgba(255,255,255,.16);border-radius:8px;background:rgba(7,15,26,.74);box-shadow:0 24px 80px rgba(0,0,0,.28);padding:16px;display:grid;gap:14px;align-content:start}
.tour-browser-bar{display:flex;align-items:center;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line);color:var(--muted)}
.tour-browser-bar span{width:10px;height:10px;border-radius:50%;background:#ef4444}
.tour-browser-bar span:nth-child(2){background:#f59e0b}
.tour-browser-bar span:nth-child(3){background:#22c55e}
.tour-browser-bar strong{margin-left:8px;color:var(--text)}
.tour-toolbar,.tour-toggle{display:flex;gap:8px;flex-wrap:wrap}
.tour-toolbar b,.tour-toolbar em,.tour-toggle b,.tour-toggle em,.tour-filter-grid span,.tour-search{padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.055);font-style:normal}
.tour-toolbar b,.tour-toggle b{background:rgba(45,212,191,.16);border-color:rgba(45,212,191,.32)}
.tour-search{color:var(--muted)}
.tour-list-row,.tour-step-card,.tour-announcement{display:grid;gap:6px;padding:14px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.055)}
.tour-list-row{grid-template-columns:auto 1fr auto;align-items:center}
.tour-status{display:inline-flex;width:max-content;padding:5px 9px;border-radius:999px;background:rgba(148,163,184,.14);font-size:.78rem;font-weight:900}
.tour-status.ok{background:rgba(34,197,94,.18);color:#86efac}
.tour-status.warn{background:rgba(245,158,11,.2);color:#fcd34d}
.tour-filter-grid,.tour-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tour-step-card strong{font-size:1.35rem}
.tour-step-card p{margin:0;color:var(--muted)}
.tour-mini-button{border:0;border-radius:8px;padding:12px;background:var(--accent);color:#001018;font-weight:900}
.tour-metric-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tour-metric-row div,.tour-card-grid div{padding:14px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.055)}
.tour-metric-row b{display:block;font-size:1.55rem}
.tour-table{display:grid;gap:8px}
.tour-table div{display:flex;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.04)}
.tour-announcement{background:rgba(45,212,191,.12);border-color:rgba(45,212,191,.28);font-weight:800}
@keyframes tour-pulse{0%,100%{box-shadow:0 0 0 3px rgba(45,212,191,.25)}50%{box-shadow:0 0 0 6px rgba(45,212,191,.12)}}
.tour-role-visual{display:flex;flex-direction:column;align-items:center}
.tour-role-pyramid{display:flex;flex-direction:column;align-items:center;gap:0;width:100%}
.tour-role-tier{display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 14px;border-radius:10px;width:100%;text-align:center}
.tour-role-tier.tour-role-t2{background:rgba(16,185,129,.12);border:1px solid rgba(16,185,129,.28);max-width:60%}
.tour-role-tier.tour-role-t3{background:rgba(14,165,233,.12);border:1px solid rgba(14,165,233,.28);max-width:80%}
.tour-role-tier.tour-role-t1{background:rgba(245,158,11,.1);border:1px solid rgba(245,158,11,.25);max-width:100%}
.tour-role-badge{font-weight:800;font-size:.82rem;white-space:nowrap}
.tour-role-t2 .tour-role-badge{color:#34d399}
.tour-role-t3 .tour-role-badge{color:#38bdf8}
.tour-role-t1 .tour-role-badge{color:#fbbf24}
.tour-role-tags{display:flex;flex-wrap:wrap;justify-content:center;gap:4px}
.tour-role-tags span{font-size:.68rem;padding:3px 7px;border-radius:6px;background:rgba(255,255,255,.07);color:var(--muted);font-weight:600;white-space:nowrap}
.tour-role-arrow{color:var(--muted);font-size:.65rem;line-height:1;padding:3px 0;opacity:.6}
html[data-resolved-theme="light"] .tour-role-tags span{background:rgba(0,0,0,.05)}
html[data-resolved-theme="light"] .tour-role-t2{background:rgba(16,185,129,.07);border-color:rgba(16,185,129,.18)}
html[data-resolved-theme="light"] .tour-role-t3{background:rgba(14,165,233,.07);border-color:rgba(14,165,233,.18)}
html[data-resolved-theme="light"] .tour-role-t1{background:rgba(245,158,11,.07);border-color:rgba(245,158,11,.18)}
html[data-resolved-theme="light"] .tour-role-t2 .tour-role-badge{color:#059669}
html[data-resolved-theme="light"] .tour-role-t3 .tour-role-badge{color:#0284c7}
html[data-resolved-theme="light"] .tour-role-t1 .tour-role-badge{color:#d97706}
.plan-choice-card{width:min(900px,100%);max-height:min(760px,88vh);overflow:auto;padding:22px}
.plan-choice-card h2{margin:4px 0 8px}
.plan-choice-card .muted{margin:0;font-size:.95rem;line-height:1.6}
.plan-choice-form{display:grid;gap:14px}
.plan-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.plan-choice-option{display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:start;padding:12px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.04)}
.plan-choice-option input{margin-top:4px}
.plan-choice-option span{display:grid;gap:4px}
.plan-choice-option strong{line-height:1.15}
.plan-choice-option small{line-height:1.35}
.plan-choice-option select{grid-column:1/-1}
html[data-resolved-theme="light"] .announcement-strip{background:rgba(14,165,233,.08);color:#0f172a}
html[data-resolved-theme="light"] .pricing-plan-meta span,html[data-resolved-theme="light"] .early-bird-step,html[data-resolved-theme="light"] .pricing-faq-grid article{background:rgba(16,32,59,.035)}
html[data-resolved-theme="light"] .pricing-price-box{background:linear-gradient(135deg,rgba(20,184,166,.12),rgba(14,165,233,.06))}
@media (max-width: 1180px){.pricing-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.early-bird-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.platform-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width: 760px){.pricing-hero-layout,.pricing-final-cta{display:grid;grid-template-columns:1fr}.pricing-plan-grid,.pricing-faq-grid{grid-template-columns:1fr}.early-bird-grid{grid-template-columns:1fr 1fr}.pricing-plan-meta,.pricing-plan-controls{grid-template-columns:1fr}.announcement-track{animation-duration:18s}.platform-metric-grid{grid-template-columns:1fr 1fr}.plan-choice-card{max-height:88vh;padding:16px}.plan-choice-grid{grid-template-columns:1fr}.onboarding-overlay{padding:12px}.onboarding-tour-card{width:min(100%,560px);min-height:auto;max-height:94dvh;overflow:auto;padding:14px 14px 12px;border-radius:18px}.onboarding-tour-card>.section-head{position:sticky;top:0;z-index:2;margin:-2px -2px 10px;padding:2px 2px 8px;background:linear-gradient(180deg,var(--panel) 72%,rgba(0,0,0,0));backdrop-filter:blur(6px)}.onboarding-tour-card>.section-head .eyebrow{font-size:.78rem;letter-spacing:.12em}.onboarding-tour-card>.section-head .button{padding:7px 10px;font-size:.74rem}.onboarding-page.active{grid-template-columns:1fr;min-height:0;gap:10px}.onboarding-page h2{font-size:1.42rem;line-height:1.14;margin:0}.onboarding-page .muted{font-size:.92rem;line-height:1.5}.tour-copy{gap:8px}.tour-copy .eyebrow{font-size:.76rem;letter-spacing:.12em}.tour-points{gap:6px}.tour-points li{padding:7px 9px 7px 28px;font-size:.86rem;line-height:1.35}.tour-points li::before{left:12px;top:14px;width:7px;height:7px}.tour-visual{order:-1;margin-bottom:2px}.tour-real-screen{max-height:190px;transform:scale(.68);transform-origin:top center}.tour-real-screen .section-head{margin-bottom:8px}.tour-real-screen h1{font-size:1.1rem}.tour-real-screen h2{font-size:1rem}.tour-real-screen .button.small,.tour-real-screen .pill{font-size:.68rem;padding:6px 9px}.tour-real-screen .step-card{grid-template-columns:1fr}.tour-real-screen.lab-hero-panel{grid-template-columns:1fr}.tour-browser{min-height:180px;padding:10px;gap:10px}.tour-browser-bar{padding-bottom:8px}.tour-browser-bar strong{margin-left:4px;font-size:.78rem}.tour-toolbar b,.tour-toolbar em,.tour-toggle b,.tour-toggle em,.tour-filter-grid span,.tour-search{padding:7px 9px;font-size:.72rem}.tour-list-row{grid-template-columns:1fr}.tour-filter-grid,.tour-card-grid,.tour-metric-row{grid-template-columns:1fr}.onboarding-actions{position:sticky;bottom:0;z-index:2;grid-template-columns:auto 1fr auto;display:grid;margin:12px -2px -2px;padding:10px 2px 2px;background:linear-gradient(0deg,var(--panel) 68%,rgba(0,0,0,0));backdrop-filter:blur(6px)}.onboarding-actions .button{min-width:72px;padding:8px 10px;font-size:.78rem}.onboarding-actions .pill{justify-self:center;font-size:.68rem;padding:6px 10px}}
@media (max-width: 560px){.early-bird-grid{grid-template-columns:1fr}.pricing-hero-actions{width:100%}.pricing-hero-actions .button{width:100%;justify-content:center}}
@media (max-width: 480px){.platform-metric-grid{grid-template-columns:1fr}}

@media (max-width: 760px){
  /* Onboarding header ??lock "?��??�學" + 跳�? on a single horizontal line:
     eyebrow pinned left, button pinned right, no wrap, tight vertical alignment. */
  .onboarding-tour-card>.section-head{
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:space-between;
    gap:8px;
  }
  .onboarding-tour-card>.section-head .eyebrow{
    flex:1 1 auto;
    min-width:0;
    /* Clearly larger than the 跳�? button (0.78rem), bold so it reads as a heading. */
    font-size:1.12rem;
    font-weight:800;
    line-height:1.1;
    letter-spacing:.08em;
    text-align:left;
    /* Override base .eyebrow margin-bottom so the text sits vertically centred with the button. */
    margin:0;
    padding:0;
    /* Ensure it never wraps and never escapes the card if the string is ever translated long. */
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .onboarding-tour-card>.section-head .button{
    flex:0 0 auto;
    min-width:0;
    width:auto;
    padding:6px 10px;
    font-size:.78rem;
    line-height:1.1;
    white-space:nowrap;
  }
  .onboarding-page.active>.muted,
  .tour-copy>.muted{
    display:none;
  }
  .onboarding-page.active{
    gap:8px;
  }
  .tour-copy{
    gap:7px;
  }
  .tour-points{
    margin-top:0;
  }
  /* Page counter pill ("1 / 4"): on mobile the shrunken pill can leave the digit
     visually off-centre because the button/pill siblings dictate row height and
     the pill inherits inline baseline behaviour. Use flex centring + neutralised
     line-height so the digits sit exactly in the middle of the rounded shape. */
  .onboarding-actions .pill[data-onboarding-count]{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    line-height:1;
    min-width:56px;
    min-height:30px;
    padding:0 12px;
    text-align:center;
    font-variant-numeric:tabular-nums;
    box-sizing:border-box;
  }
}

/* Mobile responsive layer */
@media (max-width: 760px){
  /* Step 0.1 ??Safe-area insets (iOS notch / home indicator).
     Declared here as CSS custom properties so later phases can apply them
     consistently without re-deriving env() at every call site. Defined only;
     not yet applied to any element in this step. */
  :root{
    --safe-top:env(safe-area-inset-top,0px);
    --safe-right:env(safe-area-inset-right,0px);
    --safe-bottom:env(safe-area-inset-bottom,0px);
    --safe-left:env(safe-area-inset-left,0px);
    /* Step 0.2 ??Shared mobile spacing/radius tokens. Declared only; later
       phases will replace hard-coded 16/18px values with these. */
    --mobile-card-pad:16px;
    --mobile-gap:12px;
    --mobile-radius:16px;
  }
  /* iOS Chrome two-stage jump fix. Confirmed tradeoff:
     `contain` was not strong enough ??only `none` on both html and body
     fully stops the jump on short pages. Cost: native rubber-band bounce
     is disabled. Without this, scrolling past content edges triggers a
     focus/scroll-restore loop that snaps the page mid-way then to top. */
  html{scroll-padding-top:0;overscroll-behavior-y:none}
  body{overflow-x:hidden;overscroll-behavior-y:none}
  .container{width:min(100% - 20px,1320px)}
  .page-shell{padding:18px 0 34px}

  /* Step 1.1 ??Explicit top:0 (inherited from base rule, re-stated for clarity)
     and safe-area padding so the notch on iPhone does not overlap the header. */
  .site-header{position:sticky;top:0;padding-top:var(--safe-top)}
  .nav-shell,.nav-refined{
    padding:12px 0;
    gap:10px;
    align-items:stretch;
  }
  .brand-wrap{gap:10px;min-width:0}
  .brand-mark{width:56px;height:56px;border-radius:12px;flex:0 0 auto;margin:-10px 0}
  .brand-wrap strong,.brand-wrap small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .main-nav,.compact-nav{
    width:100%;
    flex-wrap:nowrap;
    justify-content:flex-start;
    overflow-x:auto;
    padding:2px 0 8px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .main-nav a,.compact-nav a{
    flex:0 0 auto;
    scroll-snap-align:start;
    padding:9px 12px;
    white-space:nowrap;
  }
  .nav-menu{flex:0 0 auto}
  .nav-dropdown{left:0;right:auto;min-width:190px}
  .main-nav .nav-dropdown a,.compact-nav .nav-dropdown a{padding:10px 12px}
  .account-pill{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
    border-radius:16px;
    padding:6px;
    gap:4px 6px;
  }
  .account-pill a{padding:8px 10px}
  .account-menu{width:100%}
  .account-menu-trigger{width:100%;justify-content:flex-start}
  .account-dropdown{left:0;right:auto;min-width:min(260px,100%)}

  /* Step 1.6 ??Hide the in-header nav + account pill on mobile; the
     hamburger drawer fully replaces them. Existing nav/account rules above
     are kept so the layout still works if someone overrides this hide. */
  .nav-shell .main-nav,
  .nav-shell .compact-nav,
  .nav-shell .account-pill{display:none !important}
  .nav-shell .locale-dropdown{margin-left:auto}

  /* ----- Step 1.5 ??Mobile hamburger button + slide-in drawer ----- */
  .mobile-nav-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    border-radius:12px;
    background:rgba(255,255,255,.06);
    border:1px solid var(--line);
    color:var(--text);
    margin-left:auto;
    flex:0 0 auto;
    cursor:pointer;
    padding:0;
  }
  .mobile-nav-toggle-bars{
    display:inline-flex;
    flex-direction:column;
    gap:4px;
    width:18px;
  }
  .mobile-nav-toggle-bars span{
    display:block;
    height:2px;
    background:currentColor;
    border-radius:2px;
  }

  .mobile-drawer{
    position:fixed;
    inset:0;
    z-index:60;
    display:flex;
    justify-content:flex-end;
  }
  .mobile-drawer[hidden]{display:none}
  .mobile-drawer-backdrop{
    position:absolute;
    inset:0;
    background:rgba(3,10,18,.55);
    -webkit-backdrop-filter:blur(6px);
            backdrop-filter:blur(6px);
    opacity:0;
    transition:opacity .22s ease-out;
  }
  .mobile-drawer-panel{
    position:relative;
    width:min(78vw,320px);
    height:100%;
    background:var(--panel,rgba(13,26,47,.96));
    border-left:1px solid var(--line);
    padding:calc(var(--safe-top) + 16px) 22px calc(var(--safe-bottom) + 22px);
    display:flex;
    flex-direction:column;
    box-shadow:-18px 0 50px rgba(0,0,0,.4);
    transform:translateX(100%);
    transition:transform .26s cubic-bezier(.22,.8,.36,1);
  }
  /* Step 1.7b ??`.is-open` is added one frame after `hidden` is removed,
     and removed before `hidden` is re-applied, so both directions animate. */
  .mobile-drawer.is-open .mobile-drawer-backdrop{opacity:1}
  .mobile-drawer.is-open .mobile-drawer-panel{transform:translateX(0)}
  .mobile-drawer-close{
    align-self:flex-end;
    width:40px;height:40px;
    background:transparent;
    border:none;
    color:var(--text);
    font-size:26px;
    line-height:1;
    cursor:pointer;
    padding:0;
  }
  .mobile-drawer-links{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:14px;
  }
  .mobile-drawer-links a{
    font-size:1.15rem;
    font-weight:700;
    color:var(--text);
    text-decoration:none;
    padding:10px 16px;
    border-radius:12px;
    text-align:center;
  }
  .mobile-drawer-links a:hover,
  .mobile-drawer-links a:focus-visible{
    background:rgba(255,255,255,.08);
  }
  .mobile-nav-group{display:flex;flex-direction:column;align-items:center}
  .mobile-nav-group-trigger{background:none;border:0;font:inherit;font-size:1.15rem;font-weight:700;color:var(--text);padding:10px 16px;border-radius:12px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
  .mobile-nav-group-trigger:hover{background:rgba(255,255,255,.08)}
  .mobile-nav-arrow{font-size:.75em;opacity:.5;transition:transform .15s}
  .mobile-nav-group-items{display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px 0}
  .mobile-nav-group-items a{font-size:.95rem;font-weight:500;opacity:.72}
  .mobile-nav-group-items a:hover{opacity:1}
  .mobile-drawer-account{
    display:flex;
    flex-direction:column;
    gap:6px;
    padding-top:16px;
    border-top:1px solid var(--line);
  }
  .mobile-drawer-account a,
  .mobile-drawer-account button{
    display:flex;
    align-items:center;
    width:100%;
    color:var(--text);
    text-decoration:none;
    padding:10px 16px;
    border-radius:12px;
    font-size:.95rem;
    line-height:1.25;
    text-align:left;
    background:transparent;
    border:0;
    font-weight:600;
    cursor:pointer;
  }
  .mobile-drawer-account a:hover,
  .mobile-drawer-account a:focus-visible,
  .mobile-drawer-account button:hover,
  .mobile-drawer-account button:focus-visible{
    background:rgba(255,255,255,.08);
  }
  .mobile-drawer-account-trigger{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:700;
  }
  .mobile-drawer-account-trigger img{
    width:36px;height:36px;
    border-radius:50%;
    object-fit:cover;
  }

  .glass-card{padding:18px;margin-bottom:16px;border-radius:18px}
  .glass-lite{padding:16px;border-radius:16px}
  .section-hero{padding:20px 18px;border-radius:18px;margin-bottom:12px}
  .folder-panel,.folder-card,.list-row,.booking-card,.workflow-tile,.suggestion-card,.instrument-tile{
    border-radius:16px;
  }
  .folder-panel{min-height:auto;padding:18px}
  .folder-top{margin-bottom:14px}
  .folder-label{width:30px;height:30px;border-radius:10px}

  /* Step 2.1 ??Drop h1 from clamp(1.75rem,9vw,2.35rem) to a calmer scale.
     9vw was overpowering on 360??90px phones and pushed copy off the
     edge or pinned headings against the right gutter. */
  h1,.page-title{font-size:clamp(1.6rem,7vw,2.1rem);line-height:1.12}
  /* Step 2.2 ??h2 picks up clamp() to widen the contrast against the now
     smaller h1 and to scale gracefully across phone widths. */
  h2{font-size:clamp(1.1rem,4.2vw,1.3rem)}
  .lead{font-size:.98rem;line-height:1.62;max-width:100%}
  /* Step 2.3 ??Make eyebrow legible on narrow viewports: lift size to .78rem,
     bump letter-spacing back up so the small caps still feel like a label,
     and use full accent colour (not the dimmed inherit) for clarity. */
  .eyebrow{font-size:.78rem;font-weight:700;letter-spacing:.16em;color:var(--accent);margin-bottom:10px}

  /* Step 2.4 ??Hero text outline on photos: trim shadow to 1px on mobile so
     the smaller h1 set in 2.1 doesn't look chunky / haloed. Same colour,
     just thinner spread. */
  .lab-hero-customizable .breadcrumb-row,
  .lab-hero-customizable .breadcrumb-row a,
  .lab-hero-customizable .eyebrow,
  .lab-hero-customizable .lab-hero-copy h1,
  .lab-hero-customizable .lab-affiliation-row span,
  .lab-hero-customizable .lab-affiliation-row a{
    text-shadow:0 1px 2px rgba(0,0,0,.32);
  }
  .breadcrumb-row{
    flex-wrap:wrap;
    align-items:flex-start;
    overflow-wrap:anywhere;
    line-height:1.45;
  }
  .pill,.tag,.mini-identity span,.status-chip{max-width:100%;overflow-wrap:anywhere}

  .hero-actions,.inline-actions,.section-head,.toolbar-bar,.calendar-toolbar,.hero-side{
    align-items:stretch;
    gap:10px;
  }
  .section-head{flex-direction:column;align-items:flex-start}
  .inline-actions,.hero-actions,.toolbar-bar,.calendar-toolbar{
    flex-direction:column;
    width:100%;
  }
  .inline-actions > *,.hero-actions > *,.toolbar-bar > *,.calendar-toolbar > *{
    max-width:100%;
  }
  .button{
    min-height:44px;
    width:100%;
    border-radius:12px;
    text-align:center;
  }
  .button.small{min-height:40px}
  /* Phase B.5 ??Landing-page buttons stay side-by-side on mobile per spec.
     Each button keeps its natural width inside the centred .landing-actions
     row, so login + register sit on one line at any phone width. */
  .landing-actions .button{width:auto;min-width:128px;flex:0 1 auto}
  .inline-form{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
  .inline-form input,.inline-form button{width:100%}
  .action-cell{white-space:normal}
  .action-cell .button{margin:0 0 6px 0}

  .form-grid,.two-col,.three-col,.step-card,.chemical-usage-row,.exp-layout,.grid-two,.profile-grid,.labs-layout,.admin-layout{
    grid-template-columns:1fr;
  }
  .editor-image-grid{grid-template-columns:1fr}
  .hero-settings-grid{grid-template-columns:1fr}
  .member-summary-row,.member-create-summary{align-items:flex-start}
  .member-summary-card{width:100%}
  .member-summary-main strong,.member-summary-main span{white-space:normal}
  .profile-photo-editor{align-items:flex-start}
  .profile-photo-editor img{width:76px;height:76px}
  label{min-width:0}
  input,select,textarea{
    min-height:44px;
    border-radius:12px;
    padding:12px 13px;
  }
  textarea{min-height:96px}
  input[type="checkbox"],input[type="radio"]{min-height:auto}
  input[type="date"],input[type="time"],input[type="month"],input[type="datetime-local"]{
    line-height:1.25;
  }

  .step-card,.chemical-usage-row{
    padding:14px;
    gap:10px;
    align-items:stretch;
  }
  .step-card strong{overflow-wrap:anywhere}
  .suggestion-card-actionable{grid-template-columns:1fr}
  .suggestion-cta{justify-content:stretch;min-width:0}
  .suggestion-steps{margin-left:18px}

  .data-table-wrap{
    position:relative;
    max-width:100%;
    overflow-x:auto;
    border-radius:16px;
    margin-top:12px;
    -webkit-overflow-scrolling:touch;
    background:
      linear-gradient(90deg,rgba(255,255,255,.08),rgba(255,255,255,0)) 0 0/22px 100% no-repeat,
      linear-gradient(270deg,rgba(255,255,255,.14),rgba(255,255,255,0)) 100% 0/42px 100% no-repeat,
      rgba(255,255,255,.03);
  }
  .data-table-wrap::before{
    content:"??;
    position:sticky;
    left:0;
    top:0;
    display:inline-block;
    padding:6px 10px;
    margin:0 0 -1px 0;
    border-radius:0 0 12px 0;
    background:rgba(110,231,255,.12);
    color:var(--accent);
    font-size:.75rem;
    font-weight:700;
    z-index:1;
  }
  .data-table,.wide-table{min-width:680px}
  .data-table th,.data-table td{
    padding:10px 11px;
    font-size:.86rem;
  }
  .data-table td .button.small{
    width:auto;
    min-height:36px;
    white-space:nowrap;
  }

  .premium-calendar,.calendar-bundle{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .calendar-grid{grid-template-columns:repeat(7,minmax(118px,1fr));gap:8px}
  .calendar-grid.weekdays div{padding:6px 8px;font-size:.78rem}
  .day-cell{min-height:142px;padding:10px;border-radius:16px}
  .event-pill{padding:8px;border-radius:12px;font-size:.82rem}

  .tab-bar{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    justify-content:flex-start;
  }
  .tab-item{flex:0 0 auto;white-space:nowrap}

  .file-row,.file-meta,.metric-line,.list-row,.role-card,.disclosure-row{
    flex-direction:column;
    align-items:flex-start;
  }
  .file-row{gap:8px}
  .file-meta{gap:4px}
  .align-right{text-align:left}
  .quick-action-row{grid-template-columns:1fr}
  .quick-action-btn{padding:22px 16px;border-radius:16px}
  .lab-hero-panel,.pi-layout,.member-grid,.member-compact-grid,.pi-content-grid,.role-split,.folder-grid.three-up,.folder-grid.two-up,.folder-grid.compact-grid,.hero-panel,.hero-quiet{
    grid-template-columns:1fr;
  }
  .pi-avatar{width:64px;height:64px}
  .pi-card p{font-size:.9rem}
  .template-choice-grid,.atlas-pair-grid,.portfolio-hero,.editorial-hero{
    grid-template-columns:1fr;
  }
  .template-preview-banner,.portfolio-caption,.template-choice-actions{
    flex-direction:column;
    align-items:flex-start;
  }
  .lab-facts-stack{grid-template-columns:1fr 1fr}
  .compact-member-card{grid-template-columns:74px 1fr;column-gap:18px}
  .compact-member-card .member-photo{width:74px;height:74px;margin:14px 0 14px 14px}
  .portrait-block{position:static}
}

@media (max-width: 480px){
  .container{width:min(100% - 16px,1320px)}
  .page-shell{padding-top:14px}
  .glass-card{padding:15px;border-radius:16px}
  .section-hero{padding:18px 15px;border-radius:16px}
  .folder-panel,.folder-card{padding:15px}
  .brand-wrap small{display:none}
  .brand-wrap strong{font-size:.94rem}
  .account-pill a,.main-nav a,.compact-nav a{font-size:.9rem}
  h1,.page-title{font-size:clamp(1.55rem,10vw,2.05rem)}
  h2{font-size:1.08rem}
  .lead{font-size:.94rem}
  .button{padding:11px 13px}
  .data-table,.wide-table{min-width:620px}
  .calendar-grid{grid-template-columns:repeat(7,minmax(104px,1fr));gap:7px}
  .day-cell{min-height:126px;padding:8px}
  .event-pill{font-size:.78rem}
  .lab-image-frame{min-height:220px}
  .gallery-card img{height:190px}
  .lab-facts-stack{grid-template-columns:1fr}
}

html[data-resolved-theme="light"] .data-table-wrap::before{
  background:rgba(14,165,233,.10);
  color:#0369a1;
}

.live-preview{
  display:grid;
  gap:.75rem;
  min-height:180px;
  padding:1rem;
  border-radius:1rem;
  color:#fff;
  background:
    linear-gradient(135deg,rgba(9,16,28,.96),rgba(19,45,74,.82)),
    radial-gradient(circle at top right,rgba(125,211,252,.26),transparent 42%);
}
.live-preview.v2{
  background:
    linear-gradient(135deg,rgba(12,20,28,.96),rgba(74,34,34,.78)),
    radial-gradient(circle at top right,rgba(251,191,36,.18),transparent 42%);
}
.live-preview.v3{
  background:
    linear-gradient(135deg,rgba(16,24,39,.98),rgba(23,37,84,.84)),
    radial-gradient(circle at top right,rgba(110,231,255,.18),transparent 42%);
}
.live-preview.v4{
  background:
    linear-gradient(135deg,rgba(18,24,32,.98),rgba(29,78,67,.78)),
    radial-gradient(circle at top right,rgba(167,243,208,.18),transparent 42%);
}
.live-preview-eyebrow{
  font-size:.72rem;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.74;
}
.live-preview h3{
  margin:0;
  font-size:1.15rem;
  line-height:1.1;
}
.live-preview p{
  margin:0;
  color:rgba(255,255,255,.84);
  line-height:1.55;
  font-size:.94rem;
}
.live-preview-meta{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}
.live-preview-meta span{
  padding:.35rem .6rem;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
  font-size:.78rem;
}

@media (max-width: 760px){
html[data-resolved-theme="light"] .data-table-wrap{
    background:
      linear-gradient(90deg,rgba(16,32,59,.06),rgba(16,32,59,0)) 0 0/22px 100% no-repeat,
      linear-gradient(270deg,rgba(16,32,59,.10),rgba(16,32,59,0)) 100% 0/42px 100% no-repeat,
      rgba(255,255,255,.72);
  }
}

/* Lab template redesign */
.lab-template-shell{
  gap:28px;
}
.lab-template-shell > *{
  margin-bottom:0;
}
.lab-template-shell .section-head h2{
  margin-bottom:0;
}
.lab-template-shell .button{
  border-radius:999px;
}
.lab-template-shell .list-row{
  text-decoration:none;
}
.lab-template-shell .empty-state{
  padding:24px;
  border-radius:24px;
}

.lab-template-v1{
  padding:10px 0 28px;
}
.lab-template-v1 .glass-card,
.lab-template-v1 .glass-lite,
.lab-template-v1 .member-card,
.lab-template-v1 .member-group-section,
.lab-template-v1 .portrait-block,
.lab-template-v1 .lab-image-frame,
.lab-template-v1 .gallery-card,
.lab-template-v1 .metric-card,
.lab-template-v1 .lab-fact-card{
  background:#f6efe3;
  color:#1f2a36;
  border:1px solid rgba(41,54,70,.12);
  box-shadow:0 18px 46px rgba(18,31,46,.10);
}
.lab-template-v1{
  color:#223041;
}
.lab-template-v1 .lab-hero-panel{
  grid-template-columns:1.02fr .98fr;
  padding:38px;
  background:linear-gradient(120deg,#f8f1e7 0%,#efe2cf 48%,#e6d4ba 100%);
}
.lab-template-v1 h1,
.lab-template-v1 h2,
.lab-template-v1 h3,
.lab-template-v1 .portrait-meta strong{
  font-family:"Cormorant Garamond","Noto Serif TC",serif;
  letter-spacing:.01em;
}
.lab-template-v1 .lab-hero-copy,
.lab-template-v1 .profile-note p,
.lab-template-v1 .gallery-card p,
.lab-template-v1 .member-summary,
.lab-template-v1 .contact-stack,
.lab-template-v1 .list-row small{
  color:#4e5f6f;
  font-family:"Manrope","Noto Sans TC",sans-serif;
}
.lab-template-v1 .eyebrow,
.lab-template-v1 .section-head .eyebrow{
  color:#8f6b3f;
  letter-spacing:.18em;
}
.lab-template-v1 .button.primary{
  background:#223041;
  color:#f7f2e9;
  box-shadow:none;
}
.lab-template-v1 .button.ghost{
  background:rgba(34,48,65,.04);
  color:#223041;
  border:1px solid rgba(34,48,65,.12);
}
.lab-template-v1 .big-copy-box{
  background:rgba(255,255,255,.52);
  color:#3a4b5c;
  border-radius:30px;
  border:1px solid rgba(41,54,70,.08);
  box-shadow:none;
}
.lab-template-v1 .lab-image-frame{
  border-radius:38px 12px 38px 12px;
}
.lab-template-v1 .metric-card span,
.lab-template-v1 .lab-fact-card strong{
  color:#223041;
  font-family:"Cormorant Garamond","Noto Serif TC",serif;
  font-size:2.3rem;
}
.lab-template-v1 .member-card{
  border-radius:28px;
}
.lab-template-v1 .compact-member-card .member-photo{
  border-radius:18px;
}
.lab-template-v1 .pill,
.lab-template-v1 .mini-identity span{
  background:rgba(255,255,255,.68);
  color:#223041;
  border:1px solid rgba(34,48,65,.10);
}

.lab-template-v2{
  color:#f7efe6;
}
.lab-template-v2 .glass-card,
.lab-template-v2 .glass-lite,
.lab-template-v2 .member-card,
.lab-template-v2 .member-group-section,
.lab-template-v2 .portrait-block,
.lab-template-v2 .lab-image-frame,
.lab-template-v2 .gallery-card,
.lab-template-v2 .metric-card,
.lab-template-v2 .lab-fact-card{
  background:linear-gradient(180deg,rgba(35,20,21,.96),rgba(18,12,14,.96));
  border:1px solid rgba(219,164,105,.18);
  box-shadow:0 24px 60px rgba(0,0,0,.30);
}
.lab-template-v2 .editorial-hero{
  grid-template-columns:.92fr 1.08fr;
  padding:26px;
  background:
    radial-gradient(circle at top left,rgba(224,124,72,.16),transparent 32%),
    linear-gradient(140deg,#1d1215 0%,#2b1a1d 48%,#110d0f 100%);
}
.lab-template-v2 h1,
.lab-template-v2 h2,
.lab-template-v2 h3{
  font-family:"Space Grotesk","Noto Sans TC",sans-serif;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.lab-template-v2 .editorial-lead,
.lab-template-v2 .profile-note p,
.lab-template-v2 .gallery-card p,
.lab-template-v2 .member-summary,
.lab-template-v2 .contact-stack,
.lab-template-v2 .list-row small,
.lab-template-v2 .muted{
  color:#d7bfae;
  font-family:"Plus Jakarta Sans","Noto Sans TC",sans-serif;
}
.lab-template-v2 .eyebrow,
.lab-template-v2 .section-head .eyebrow{
  color:#e4a35e;
}
.lab-template-v2 .button.primary{
  background:linear-gradient(135deg,#e4a35e,#c46e3d);
  color:#1b1113;
  box-shadow:none;
}
.lab-template-v2 .button.ghost{
  background:rgba(255,255,255,.04);
  color:#fff5ed;
  border:1px solid rgba(228,163,94,.24);
}
.lab-template-v2 .lab-image-frame,
.lab-template-v2 .gallery-card{
  border-radius:10px;
}
.lab-template-v2 .metric-card,
.lab-template-v2 .lab-fact-card{
  border-radius:10px;
}
.lab-template-v2 .metric-card span,
.lab-template-v2 .lab-fact-card strong{
  color:#f9d4ac;
  font-family:"Space Grotesk","Noto Sans TC",sans-serif;
}
.lab-template-v2 .member-card,
.lab-template-v2 .compact-member-card{
  border-radius:10px;
}
.lab-template-v2 .member-role{
  color:#f0ba7d;
}
.lab-template-v2 .pill,
.lab-template-v2 .mini-identity span{
  background:rgba(255,255,255,.03);
  color:#f7e2d1;
  border:1px solid rgba(228,163,94,.18);
}
.lab-template-v2 .list-row{
  background:rgba(255,255,255,.02);
}

.lab-template-v3{
  color:#d9e1f2;
}
.lab-template-v3 .glass-card,
.lab-template-v3 .glass-lite,
.lab-template-v3 .member-card,
.lab-template-v3 .member-group-section,
.lab-template-v3 .portrait-block,
.lab-template-v3 .lab-image-frame,
.lab-template-v3 .gallery-card,
.lab-template-v3 .metric-card,
.lab-template-v3 .lab-fact-card{
  background:#10131a;
  border:2px solid #2af598;
  border-radius:8px;
  box-shadow:8px 8px 0 #1e2431;
}
.lab-template-v3 .atlas-hero{
  grid-template-columns:1.18fr .82fr;
  padding:16px;
  background:
    linear-gradient(90deg,rgba(42,245,152,.09),transparent 28%),
    linear-gradient(180deg,#11151d 0%,#0a0d12 100%);
}
.lab-template-v3 h1,
.lab-template-v3 h2,
.lab-template-v3 h3,
.lab-template-v3 .metric-card span,
.lab-template-v3 .lab-fact-card strong{
  font-family:"IBM Plex Mono","Noto Sans Mono CJK TC",monospace;
  letter-spacing:.02em;
}
.lab-template-v3 .atlas-media{
  border-radius:8px;
  border:2px solid #7af2ff;
}
.lab-template-v3 .eyebrow,
.lab-template-v3 .section-head .eyebrow,
.lab-template-v3 .member-role,
.lab-template-v3 .portrait-meta span{
  color:#2af598;
}
.lab-template-v3 .big-copy-box,
.lab-template-v3 .gallery-card p,
.lab-template-v3 .profile-note p,
.lab-template-v3 .member-summary,
.lab-template-v3 .contact-stack,
.lab-template-v3 .list-row small{
  color:#b7c6da;
  font-family:"IBM Plex Mono","Noto Sans Mono CJK TC",monospace;
}
.lab-template-v3 .button{
  border-radius:6px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.lab-template-v3 .button.primary{
  background:#2af598;
  color:#08110e;
  box-shadow:none;
}
.lab-template-v3 .button.ghost{
  background:#10131a;
  color:#d9e1f2;
  border:2px solid #7af2ff;
}
.lab-template-v3 .pill,
.lab-template-v3 .mini-identity span{
  background:#141a24;
  color:#d9e1f2;
  border:2px solid #2af598;
  border-radius:6px;
}
.lab-template-v3 .compact-member-card .member-photo{
  border-radius:6px;
}

.lab-template-v4{
  color:#24332c;
}
.lab-template-v4 .glass-card,
.lab-template-v4 .glass-lite,
.lab-template-v4 .member-card,
.lab-template-v4 .member-group-section,
.lab-template-v4 .portrait-block,
.lab-template-v4 .lab-image-frame,
.lab-template-v4 .gallery-card,
.lab-template-v4 .metric-card,
.lab-template-v4 .lab-fact-card{
  background:#fbf6ec;
  border:1px solid rgba(44,71,58,.12);
  box-shadow:0 20px 44px rgba(60,74,63,.10);
}
.lab-template-v4 .portfolio-hero{
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:26px;
  padding:8px 0;
}
.lab-template-v4 .portfolio-copy{
  background:linear-gradient(180deg,#fffdf7 0%,#f3ecdf 100%);
}
.lab-template-v4 .portfolio-media{
  background:linear-gradient(180deg,#eef3ea 0%,#dde7dc 100%);
}
.lab-template-v4 h1,
.lab-template-v4 h2,
.lab-template-v4 h3,
.lab-template-v4 .metric-card span,
.lab-template-v4 .lab-fact-card strong{
  font-family:"Fraunces","Noto Serif TC",serif;
}
.lab-template-v4 .big-copy-box,
.lab-template-v4 .gallery-card p,
.lab-template-v4 .profile-note p,
.lab-template-v4 .member-summary,
.lab-template-v4 .contact-stack,
.lab-template-v4 .list-row small{
  color:#55685f;
  font-family:"Manrope","Noto Sans TC",sans-serif;
}
.lab-template-v4 .eyebrow,
.lab-template-v4 .section-head .eyebrow,
.lab-template-v4 .member-role{
  color:#5d7e68;
}
.lab-template-v4 .button.primary{
  background:#2f5a43;
  color:#f6f0e6;
  box-shadow:none;
}
.lab-template-v4 .button.ghost{
  background:rgba(47,90,67,.04);
  color:#2f5a43;
  border:1px solid rgba(47,90,67,.18);
}
.lab-template-v4 .lab-image-frame,
.lab-template-v4 .gallery-card{
  border-radius:32px 32px 10px 10px;
}
.lab-template-v4 .pill,
.lab-template-v4 .mini-identity span{
  background:rgba(255,255,255,.72);
  color:#2f5a43;
  border:1px solid rgba(47,90,67,.12);
}

.template-preview-thumb{
  padding:16px;
}
.template-scene{
  min-height:250px;
  padding:16px;
  border-radius:20px;
  display:grid;
  grid-template-rows:auto auto 1fr;
  gap:14px;
  overflow:hidden;
}
.template-scene h3{
  margin:0;
  font-size:1.05rem;
}
.template-scene p{
  margin:0;
  font-size:.84rem;
  line-height:1.5;
}
.template-scene .scene-kicker{
  font-size:.68rem;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.78;
}
.template-scene .scene-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.template-scene .scene-meta span{
  font-size:.7rem;
  padding:6px 8px;
  border-radius:999px;
}
.template-scene .scene-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:10px;
}
.template-scene .scene-block{
  min-height:56px;
}
.template-scene .scene-block.hero{
  min-height:110px;
}
.template-scene .scene-block.note{
  min-height:82px;
}
.template-scene .scene-block.tall{
  min-height:88px;
}

.template-scene-v1{
  background:linear-gradient(135deg,#f8f1e7,#ead8bf);
  color:#223041;
  font-family:"Manrope","Noto Sans TC",sans-serif;
}
.template-scene-v1 h3{
  font-family:"Cormorant Garamond","Noto Serif TC",serif;
  font-size:1.38rem;
}
.template-scene-v1 .scene-meta span,
.template-scene-v1 .scene-block{
  background:rgba(255,255,255,.6);
  border:1px solid rgba(34,48,65,.10);
}
.template-scene-v1 .scene-block{
  border-radius:24px 10px 24px 10px;
}

.template-scene-v2{
  background:linear-gradient(135deg,#1d1215,#402221);
  color:#f7efe6;
  font-family:"Plus Jakarta Sans","Noto Sans TC",sans-serif;
}
.template-scene-v2 h3{
  font-family:"Space Grotesk","Noto Sans TC",sans-serif;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.template-scene-v2 .scene-meta span,
.template-scene-v2 .scene-block{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(228,163,94,.22);
  border-radius:8px;
}

.template-scene-v3{
  background:linear-gradient(180deg,#11151d,#090c11);
  color:#d9e1f2;
  font-family:"IBM Plex Mono","Noto Sans Mono CJK TC",monospace;
}
.template-scene-v3 h3{
  font-family:"IBM Plex Mono","Noto Sans Mono CJK TC",monospace;
  text-transform:uppercase;
}
.template-scene-v3 .scene-meta span,
.template-scene-v3 .scene-block{
  background:#10131a;
  border:2px solid #2af598;
  border-radius:6px;
  box-shadow:4px 4px 0 #1e2431;
}

.template-scene-v4{
  background:linear-gradient(135deg,#fbf6ec,#e4eddf);
  color:#24332c;
  font-family:"Manrope","Noto Sans TC",sans-serif;
}
.template-scene-v4 h3{
  font-family:"Fraunces","Noto Serif TC",serif;
}
.template-scene-v4 .scene-meta span,
.template-scene-v4 .scene-block{
  background:rgba(255,255,255,.74);
  border:1px solid rgba(47,90,67,.16);
}
.template-scene-v4 .scene-block{
  border-radius:28px 28px 10px 10px;
}

html[data-resolved-theme="light"] .lab-template-v1 .glass-card,
html[data-resolved-theme="light"] .lab-template-v1 .glass-lite,
html[data-resolved-theme="light"] .lab-template-v1 .member-card,
html[data-resolved-theme="light"] .lab-template-v1 .gallery-card,
html[data-resolved-theme="light"] .lab-template-v1 .lab-image-frame,
html[data-resolved-theme="light"] .lab-template-v1 .metric-card,
html[data-resolved-theme="light"] .lab-template-v1 .lab-fact-card,
html[data-resolved-theme="light"] .lab-template-v4 .glass-card,
html[data-resolved-theme="light"] .lab-template-v4 .glass-lite,
html[data-resolved-theme="light"] .lab-template-v4 .member-card,
html[data-resolved-theme="light"] .lab-template-v4 .gallery-card,
html[data-resolved-theme="light"] .lab-template-v4 .lab-image-frame,
html[data-resolved-theme="light"] .lab-template-v4 .metric-card,
html[data-resolved-theme="light"] .lab-template-v4 .lab-fact-card{
  background:inherit;
}

@media (max-width: 1100px){
  .lab-template-v1 .lab-hero-panel,
  .lab-template-v2 .editorial-hero,
  .lab-template-v3 .atlas-hero,
  .lab-template-v4 .portfolio-hero{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .template-scene{
    min-height:220px;
  }
  .template-scene .scene-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .onboarding-tour-card{
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
  }
  .onboarding-tour-card>.section-head{
    align-self:start;
    width:100%;
    margin:0;
    padding:0 0 8px;
  }
  .onboarding-tour-card>.section-head .eyebrow{
    flex:1 1 auto;
    text-align:left;
    font-size:1.04rem;
    line-height:1.1;
    letter-spacing:.06em;
  }
  .onboarding-tour-card>.section-head .button{
    flex:0 0 auto;
    width:auto;
    min-width:0;
    margin-left:auto;
    padding:6px 9px;
    border-radius:999px;
    font-size:.78rem;
    line-height:1.1;
  }
  .onboarding-page.active{
    align-self:stretch;
    grid-template-rows:minmax(0,1fr) auto;
    gap:8px;
  }
  .tour-visual{
    width:100%;
    min-height:clamp(230px,46dvh,420px);
    align-self:stretch;
    place-items:stretch;
    margin:0;
  }
  .tour-real-screen{
    width:100%;
    height:100%;
    max-height:none;
    transform:none;
    transform-origin:center;
  }
  .tour-copy{
    align-self:end;
  }

  .nav-shell,
  .nav-refined{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
  }
  .brand-wrap{
    grid-column:1;
    grid-row:1;
    min-width:0;
  }
  .main-nav,
  .compact-nav{
    grid-column:2;
    grid-row:1;
    width:auto;
    min-width:0;
    padding:0;
  }
  .account-pill{
    grid-column:3;
    grid-row:1;
    width:auto;
    min-width:0;
    padding:0;
    border:0;
    background:transparent;
    border-radius:999px;
    flex-wrap:nowrap;
  }
  .account-menu{
    width:auto;
  }
  .account-menu-trigger{
    width:40px;
    height:40px;
    padding:0;
    justify-content:center;
    gap:0;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.10);
  }
  .account-menu-trigger span{
    display:none;
  }
  .account-menu-trigger img{
    width:34px;
    height:34px;
    border-width:1px;
  }
  .account-dropdown{
    left:auto;
    right:0;
    min-width:min(260px,calc(100vw - 24px));
  }
}

html:not([data-resolved-theme="light"]){
  color-scheme:dark;
}
html:not([data-resolved-theme="light"]) body{
  background:#0d1117;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .site-header,
html:not([data-resolved-theme="light"]) .simplified-header{
  background:#010409;
  border-bottom:1px solid #30363d;
}
html:not([data-resolved-theme="light"]) .glass-card,
html:not([data-resolved-theme="light"]) .glass-lite,
html:not([data-resolved-theme="light"]) .section-hero,
html:not([data-resolved-theme="light"]) .hero-panel,
html:not([data-resolved-theme="light"]) .hero-quiet,
html:not([data-resolved-theme="light"]) .workflow-tile,
html:not([data-resolved-theme="light"]) .suggestion-card,
html:not([data-resolved-theme="light"]) .booking-card,
html:not([data-resolved-theme="light"]) .list-row,
html:not([data-resolved-theme="light"]) .folder-card,
html:not([data-resolved-theme="light"]) .folder-panel,
html:not([data-resolved-theme="light"]) .metric-card,
html:not([data-resolved-theme="light"]) .spotlight-card,
html:not([data-resolved-theme="light"]) .feature-tile,
html:not([data-resolved-theme="light"]) .role-card,
html:not([data-resolved-theme="light"]) .template-choice-card,
html:not([data-resolved-theme="light"]) .lab-fact-card,
html:not([data-resolved-theme="light"]) .member-card,
html:not([data-resolved-theme="light"]) .member-group-section,
html:not([data-resolved-theme="light"]) .portrait-block,
html:not([data-resolved-theme="light"]) .profile-note,
html:not([data-resolved-theme="light"]) .data-table-wrap{
  background:#161b22;
  border-color:#30363d;
  box-shadow:0 8px 24px rgba(1,4,9,.35);
}
html:not([data-resolved-theme="light"]) .glass-lite,
html:not([data-resolved-theme="light"]) .subpanel,
html:not([data-resolved-theme="light"]) .meta-list.rich span,
html:not([data-resolved-theme="light"]) .day-cell,
html:not([data-resolved-theme="light"]) .step-card,
html:not([data-resolved-theme="light"]) .metric-line,
html:not([data-resolved-theme="light"]) .profile-photo-editor,
html:not([data-resolved-theme="light"]) .member-item-disclosure,
html:not([data-resolved-theme="light"]) .hero-preview-card{
  background:#010409;
  border-color:#1f242d;
}
html:not([data-resolved-theme="light"]) .main-nav a,
html:not([data-resolved-theme="light"]) .compact-nav a,
html:not([data-resolved-theme="light"]) .account-pill,
html:not([data-resolved-theme="light"]) .account-menu-trigger,
html:not([data-resolved-theme="light"]) .tab-bar,
html:not([data-resolved-theme="light"]) .pill,
html:not([data-resolved-theme="light"]) .mini-identity span,
html:not([data-resolved-theme="light"]) .mini-identity a{
  background:#161b22;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .tab-bar{
  background:transparent;
}
html:not([data-resolved-theme="light"]) .main-nav a:hover,
html:not([data-resolved-theme="light"]) .compact-nav a:hover,
html:not([data-resolved-theme="light"]) .account-pill a:hover,
html:not([data-resolved-theme="light"]) .list-row:hover,
html:not([data-resolved-theme="light"]) .folder-card:hover,
html:not([data-resolved-theme="light"]) .tab-item:hover:not(.active),
html:not([data-resolved-theme="light"]) .mini-identity a:hover{
  background:#1c2128;
  border-color:#30363d;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .nav-dropdown,
html:not([data-resolved-theme="light"]) .account-dropdown{
  background:#161b22;
  border-color:#30363d;
  box-shadow:0 16px 32px rgba(1,4,9,.45);
}
html:not([data-resolved-theme="light"]) .nav-dropdown a:hover,
html:not([data-resolved-theme="light"]) .account-dropdown a:hover,
html:not([data-resolved-theme="light"]) .account-dropdown button:hover{
  background:#1c2128;
}

html:not([data-resolved-theme="light"]) .button.primary,
html:not([data-resolved-theme="light"]) .tab-item.active{
  background:#1f6feb;
  border-color:rgba(88,166,255,.40);
  color:#ffffff;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .button.primary:hover{
  background:#388bfd;
}
html:not([data-resolved-theme="light"]) .button.ghost,
html:not([data-resolved-theme="light"]) input,
html:not([data-resolved-theme="light"]) select,
html:not([data-resolved-theme="light"]) textarea,
html:not([data-resolved-theme="light"]) .quick-action-btn{
  background:#010409;
  border-color:#30363d;
  color:#c9d1d9;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) input:hover,
html:not([data-resolved-theme="light"]) select:hover,
html:not([data-resolved-theme="light"]) textarea:hover{
  background:#0d1117;
}
html:not([data-resolved-theme="light"]) .button.ghost:hover,
html:not([data-resolved-theme="light"]) input:focus,
html:not([data-resolved-theme="light"]) select:focus,
html:not([data-resolved-theme="light"]) textarea:focus,
html:not([data-resolved-theme="light"]) .quick-action-btn:hover{
  background:#010409;
  border-color:#58a6ff;
  box-shadow:0 0 0 4px rgba(88,166,255,.35);
}
html:not([data-resolved-theme="light"]) .button.ghost{
  background:transparent;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .button.ghost:hover{
  background:#21262d;
  border-color:#30363d;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .button.secondary,
html:not([data-resolved-theme="light"]) .button.outline{
  background:#21262d;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .button.secondary:hover,
html:not([data-resolved-theme="light"]) .button.outline:hover{
  background:#30363d;
}
html:not([data-resolved-theme="light"]) .quick-action-btn,
html:not([data-resolved-theme="light"]) .quick-action-btn:hover,
html:not([data-resolved-theme="light"]) .accent-panel,
html:not([data-resolved-theme="light"]) .hero-product,
html:not([data-resolved-theme="light"]) .folder-panel,
html:not([data-resolved-theme="light"]) .section-hero,
html:not([data-resolved-theme="light"]) .metric-card,
html:not([data-resolved-theme="light"]) .spotlight-card,
html:not([data-resolved-theme="light"]) .event-pill,
html:not([data-resolved-theme="light"]) .research-event-pill.confirmed,
html:not([data-resolved-theme="light"]) .research-event-pill.pending_approval,
html:not([data-resolved-theme="light"]) .research-event-pill.rejected,
html:not([data-resolved-theme="light"]) .research-event-pill.cancelled{
  background:#161b22;
}
html:not([data-resolved-theme="light"]) .qa-icon,
html:not([data-resolved-theme="light"]) .member-create-badge,
html:not([data-resolved-theme="light"]) .radio-group label:has(input:checked),
html:not([data-resolved-theme="light"]) .file-drop:hover,
html:not([data-resolved-theme="light"]) .early-bird-step::before,
html:not([data-resolved-theme="light"]) .pricing-plan-card::before{
  background:rgba(56,139,253,.10);
  border-color:rgba(56,139,253,.40);
  color:#58a6ff;
}
html:not([data-resolved-theme="light"]) .button.danger{
  background:rgba(248,81,73,.12);
  border-color:rgba(248,81,73,.40);
  color:#f85149;
}
html:not([data-resolved-theme="light"]) .status-chip.confirmed,
html:not([data-resolved-theme="light"]) .status-chip.auto,
html:not([data-resolved-theme="light"]) .result-chip.success{
  background:rgba(66,190,101,.14);
  border-color:rgba(66,190,101,.38);
  color:#42be65;
}
html:not([data-resolved-theme="light"]) .status-chip.pending_approval,
html:not([data-resolved-theme="light"]) .status-chip.approval,
html:not([data-resolved-theme="light"]) .result-chip.neutral{
  background:rgba(187,128,9,.15);
  border-color:rgba(187,128,9,.40);
  color:#d29922;
}
html:not([data-resolved-theme="light"]) .status-chip.rejected,
html:not([data-resolved-theme="light"]) .status-chip.cancelled,
html:not([data-resolved-theme="light"]) .result-chip.failure{
  background:rgba(248,81,73,.14);
  border-color:rgba(248,81,73,.40);
  color:#f85149;
}
html:not([data-resolved-theme="light"]) .lead,
html:not([data-resolved-theme="light"]) .lab-card-pi,
html:not([data-resolved-theme="light"]) .data-table td,
html:not([data-resolved-theme="light"]) label{
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .muted,
html:not([data-resolved-theme="light"]) .data-table th,
html:not([data-resolved-theme="light"]) .breadcrumb-row,
html:not([data-resolved-theme="light"]) .folder-card span,
html:not([data-resolved-theme="light"]) .lab-card-affiliation,
html:not([data-resolved-theme="light"]) input::placeholder,
html:not([data-resolved-theme="light"]) textarea::placeholder{
  color:#6e7681;
}
html:not([data-resolved-theme="light"]) .text-link,
html:not([data-resolved-theme="light"]) .eyebrow,
html:not([data-resolved-theme="light"]) .member-role,
html:not([data-resolved-theme="light"]) .breadcrumb-row a{
  color:#58a6ff;
}
html:not([data-resolved-theme="light"]) .text-link:hover,
html:not([data-resolved-theme="light"]) .breadcrumb-row a:hover{
  color:#79c0ff;
}
html:not([data-resolved-theme="light"]) .data-table th,
html:not([data-resolved-theme="light"]) .data-table tr:hover td,
html:not([data-resolved-theme="light"]) select option{
  background:#010409;
}
html:not([data-resolved-theme="light"]) .data-table th,
html:not([data-resolved-theme="light"]) .data-table td,
html:not([data-resolved-theme="light"]) .calendar-bundle,
html:not([data-resolved-theme="light"]) .reserve-location-filters{
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) select{
  background-image:
    linear-gradient(45deg,transparent 50%, #58a6ff 50%),
    linear-gradient(135deg,#58a6ff 50%,transparent 50%);
}
html:not([data-resolved-theme="light"]) .feature-tile:hover,
html:not([data-resolved-theme="light"]) .role-card:hover{
  border-color:#58a6ff;
}
html:not([data-resolved-theme="light"]) .role-icon,
html:not([data-resolved-theme="light"]) .role-icon.admin{
  background:#21262d;
  border:1px solid #30363d;
  color:#58a6ff;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .hero-preview-surface,
html:not([data-resolved-theme="light"]) .pricing-date-card,
html:not([data-resolved-theme="light"]) .pricing-price-box,
html:not([data-resolved-theme="light"]) .onboarding-tour-card,
html:not([data-resolved-theme="light"]) .tour-browser,
html:not([data-resolved-theme="light"]) .tour-toolbar b,
html:not([data-resolved-theme="light"]) .tour-toolbar em,
html:not([data-resolved-theme="light"]) .tour-toggle b,
html:not([data-resolved-theme="light"]) .tour-toggle em,
html:not([data-resolved-theme="light"]) .tour-filter-grid span,
html:not([data-resolved-theme="light"]) .tour-search,
html:not([data-resolved-theme="light"]) .tour-list-row,
html:not([data-resolved-theme="light"]) .tour-step-card,
html:not([data-resolved-theme="light"]) .tour-announcement,
html:not([data-resolved-theme="light"]) .tour-metric-row div,
html:not([data-resolved-theme="light"]) .tour-card-grid div,
html:not([data-resolved-theme="light"]) .tour-table div{
  background:#161b22;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .tour-points li{
  background:#010409;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .tour-toolbar b,
html:not([data-resolved-theme="light"]) .tour-toggle b,
html:not([data-resolved-theme="light"]) .tour-announcement{
  background:rgba(56,139,253,.12);
  border-color:rgba(56,139,253,.40);
}
html:not([data-resolved-theme="light"]) .tour-browser-bar span{
  background:#f85149;
}
html:not([data-resolved-theme="light"]) .tour-browser-bar span:nth-child(2){
  background:#d29922;
}
html:not([data-resolved-theme="light"]) .tour-browser-bar span:nth-child(3){
  background:#58a6ff;
}
html:not([data-resolved-theme="light"]) .tour-status{
  background:#21262d;
  color:#8b949e;
}
html:not([data-resolved-theme="light"]) .tour-status.ok{
  color:#010409;
}
html:not([data-resolved-theme="light"]) .tour-status.warn{
  background:rgba(210,153,34,.18);
  color:#d29922;
}
html:not([data-resolved-theme="light"]) .tour-mini-button{
  background:#1f6feb;
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) .tour-mini-button:hover{
  background:#388bfd;
}
html:not([data-resolved-theme="light"]) .atlas-media-overlay{
  background:linear-gradient(180deg,rgba(13,17,23,0),rgba(1,4,9,.9));
}
html:not([data-resolved-theme="light"]) .live-preview,
html:not([data-resolved-theme="light"]) .live-preview.v2,
html:not([data-resolved-theme="light"]) .live-preview.v3,
html:not([data-resolved-theme="light"]) .live-preview.v4,
html:not([data-resolved-theme="light"]) .template-scene,
html:not([data-resolved-theme="light"]) .template-scene-v1,
html:not([data-resolved-theme="light"]) .template-scene-v2,
html:not([data-resolved-theme="light"]) .template-scene-v3,
html:not([data-resolved-theme="light"]) .template-scene-v4{
  background:#161b22;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .live-preview p,
html:not([data-resolved-theme="light"]) .template-scene p{
  color:#8b949e;
}
html:not([data-resolved-theme="light"]) .template-scene .scene-meta span,
html:not([data-resolved-theme="light"]) .template-scene .scene-block{
  background:#010409;
  border:1px solid #30363d;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .lab-template-v1,
html:not([data-resolved-theme="light"]) .lab-template-v2,
html:not([data-resolved-theme="light"]) .lab-template-v3,
html:not([data-resolved-theme="light"]) .lab-template-v4{
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .lab-template-v1 .lab-hero-panel,
html:not([data-resolved-theme="light"]) .lab-template-v2 .editorial-hero,
html:not([data-resolved-theme="light"]) .lab-template-v3 .atlas-hero,
html:not([data-resolved-theme="light"]) .lab-template-v4 .portfolio-copy,
html:not([data-resolved-theme="light"]) .lab-template-v4 .portfolio-media{
  background:#161b22;
}
html:not([data-resolved-theme="light"]) .lab-template-v1 .glass-card,
html:not([data-resolved-theme="light"]) .lab-template-v1 .glass-lite,
html:not([data-resolved-theme="light"]) .lab-template-v2 .glass-card,
html:not([data-resolved-theme="light"]) .lab-template-v2 .glass-lite,
html:not([data-resolved-theme="light"]) .lab-template-v3 .glass-card,
html:not([data-resolved-theme="light"]) .lab-template-v3 .glass-lite,
html:not([data-resolved-theme="light"]) .lab-template-v4 .glass-card,
html:not([data-resolved-theme="light"]) .lab-template-v4 .glass-lite,
html:not([data-resolved-theme="light"]) .lab-template-v1 .member-card,
html:not([data-resolved-theme="light"]) .lab-template-v2 .member-card,
html:not([data-resolved-theme="light"]) .lab-template-v3 .member-card,
html:not([data-resolved-theme="light"]) .lab-template-v4 .member-card,
html:not([data-resolved-theme="light"]) .lab-template-v1 .metric-card,
html:not([data-resolved-theme="light"]) .lab-template-v2 .metric-card,
html:not([data-resolved-theme="light"]) .lab-template-v3 .metric-card,
html:not([data-resolved-theme="light"]) .lab-template-v4 .metric-card,
html:not([data-resolved-theme="light"]) .lab-template-v1 .lab-fact-card,
html:not([data-resolved-theme="light"]) .lab-template-v2 .lab-fact-card,
html:not([data-resolved-theme="light"]) .lab-template-v3 .lab-fact-card,
html:not([data-resolved-theme="light"]) .lab-template-v4 .lab-fact-card{
  background:#161b22;
  border:1px solid #30363d;
  box-shadow:var(--shadow);
}
html:not([data-resolved-theme="light"]) .lab-template-v1 .eyebrow,
html:not([data-resolved-theme="light"]) .lab-template-v2 .eyebrow,
html:not([data-resolved-theme="light"]) .lab-template-v3 .eyebrow,
html:not([data-resolved-theme="light"]) .lab-template-v4 .eyebrow,
html:not([data-resolved-theme="light"]) .lab-template-v1 .section-head .eyebrow,
html:not([data-resolved-theme="light"]) .lab-template-v2 .section-head .eyebrow,
html:not([data-resolved-theme="light"]) .lab-template-v3 .section-head .eyebrow,
html:not([data-resolved-theme="light"]) .lab-template-v4 .section-head .eyebrow,
html:not([data-resolved-theme="light"]) .lab-template-v1 .member-role,
html:not([data-resolved-theme="light"]) .lab-template-v2 .member-role,
html:not([data-resolved-theme="light"]) .lab-template-v3 .member-role,
html:not([data-resolved-theme="light"]) .lab-template-v4 .member-role{
  color:#58a6ff;
}
html:not([data-resolved-theme="light"]) .lab-template-v1 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v2 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v3 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v4 .button.primary{
  background:#1f6feb;
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) .lab-template-v1 .button.ghost,
html:not([data-resolved-theme="light"]) .lab-template-v2 .button.ghost,
html:not([data-resolved-theme="light"]) .lab-template-v3 .button.ghost,
html:not([data-resolved-theme="light"]) .lab-template-v4 .button.ghost,
html:not([data-resolved-theme="light"]) .lab-template-v1 .pill,
html:not([data-resolved-theme="light"]) .lab-template-v2 .pill,
html:not([data-resolved-theme="light"]) .lab-template-v3 .pill,
html:not([data-resolved-theme="light"]) .lab-template-v4 .pill,
html:not([data-resolved-theme="light"]) .lab-template-v1 .mini-identity span,
html:not([data-resolved-theme="light"]) .lab-template-v2 .mini-identity span,
html:not([data-resolved-theme="light"]) .lab-template-v3 .mini-identity span,
html:not([data-resolved-theme="light"]) .lab-template-v4 .mini-identity span{
  background:#010409;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) ::selection{
  background:rgba(56,139,253,.40);
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) h1,
html:not([data-resolved-theme="light"]) h2,
html:not([data-resolved-theme="light"]) h3,
html:not([data-resolved-theme="light"]) h4,
html:not([data-resolved-theme="light"]) .page-title,
html:not([data-resolved-theme="light"]) .landing-title,
html:not([data-resolved-theme="light"]) .brand-wrap strong{
  color:#f0f6fc;
}
html:not([data-resolved-theme="light"]) .site-header .main-nav a.active,
html:not([data-resolved-theme="light"]) .site-header .main-nav a[aria-current="page"],
html:not([data-resolved-theme="light"]) .compact-nav a.active,
html:not([data-resolved-theme="light"]) .compact-nav a[aria-current="page"]{
  color:#f0f6fc;
  border-color:#f78166;
}
html:not([data-resolved-theme="light"]) .tab-item{
  background:transparent;
  color:#8b949e;
}
html:not([data-resolved-theme="light"]) .tab-item.active{
  background:#21262d;
  color:#f0f6fc;
  border-color:#58a6ff;
}
html:not([data-resolved-theme="light"]) .quick-action-btn,
html:not([data-resolved-theme="light"]) .feature-tile{
  background:#161b22;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .quick-action-btn:hover,
html:not([data-resolved-theme="light"]) .feature-tile:hover{
  background:#1c2128;
  border-color:#30363d;
  box-shadow:0 8px 24px rgba(1,4,9,.35);
}
html:not([data-resolved-theme="light"]) .quick-action-btn:active,
html:not([data-resolved-theme="light"]) .feature-tile:active,
html:not([data-resolved-theme="light"]) .folder-card:active,
html:not([data-resolved-theme="light"]) .list-row:active{
  background:#21262d;
}
html:not([data-resolved-theme="light"]) .feature-tile svg,
html:not([data-resolved-theme="light"]) .quick-action-btn svg{
  color:#58a6ff;
}
html:not([data-resolved-theme="light"]) .account-pill,
html:not([data-resolved-theme="light"]) .account-menu-trigger{
  background:#161b22;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .account-pill:hover,
html:not([data-resolved-theme="light"]) .account-menu-trigger:hover{
  background:#21262d;
}
html:not([data-resolved-theme="light"]) .account-menu-trigger img,
html:not([data-resolved-theme="light"]) .member-photo,
html:not([data-resolved-theme="light"]) .profile-avatar{
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .data-table-wrap{
  background:#161b22;
}
html:not([data-resolved-theme="light"]) .data-table{
  background:#0d1117;
}
html:not([data-resolved-theme="light"]) .data-table th{
  background:#161b22;
  color:#8b949e;
}
html:not([data-resolved-theme="light"]) .data-table td{
  background:#0d1117;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .data-table tr:nth-child(even) td{
  background:#161b22;
}
html:not([data-resolved-theme="light"]) .data-table tr:hover td{
  background:#161b22;
}
html:not([data-resolved-theme="light"]) .status-chip,
html:not([data-resolved-theme="light"]) .result-chip{
  background:#21262d;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .status-chip.completed,
html:not([data-resolved-theme="light"]) .status-chip.done,
html:not([data-resolved-theme="light"]) .result-chip.done{
  background:rgba(163,113,247,.12);
  border-color:rgba(163,113,247,.40);
  color:#a371f7;
}
html:not([data-resolved-theme="light"]) .button[disabled],
html:not([data-resolved-theme="light"]) button[disabled],
html:not([data-resolved-theme="light"]) input[disabled],
html:not([data-resolved-theme="light"]) select[disabled],
html:not([data-resolved-theme="light"]) textarea[disabled]{
  color:#484f58;
  border-color:#21262d;
  opacity:1;
}
html:not([data-resolved-theme="light"]) .divider,
html:not([data-resolved-theme="light"]) hr{
  border-color:#21262d;
}

/* Final dark-mode token pass: GitHub dark with blacker data-entry surfaces. */
html:not([data-resolved-theme="light"]) .page-shell,
html:not([data-resolved-theme="light"]) main,
html:not([data-resolved-theme="light"]) .landing-hero{
  background:#0d1117;
}
html:not([data-resolved-theme="light"]) .hero-panel,
html:not([data-resolved-theme="light"]) .hero-quiet,
html:not([data-resolved-theme="light"]) .section-hero,
html:not([data-resolved-theme="light"]) .folder-panel,
html:not([data-resolved-theme="light"]) .accent-panel{
  background:#0d1117;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .glass-card,
html:not([data-resolved-theme="light"]) .workflow-tile,
html:not([data-resolved-theme="light"]) .suggestion-card,
html:not([data-resolved-theme="light"]) .booking-card,
html:not([data-resolved-theme="light"]) .folder-card,
html:not([data-resolved-theme="light"]) .metric-card,
html:not([data-resolved-theme="light"]) .spotlight-card,
html:not([data-resolved-theme="light"]) .feature-tile,
html:not([data-resolved-theme="light"]) .role-card,
html:not([data-resolved-theme="light"]) .template-choice-card,
html:not([data-resolved-theme="light"]) .lab-fact-card,
html:not([data-resolved-theme="light"]) .member-card,
html:not([data-resolved-theme="light"]) .member-group-section,
html:not([data-resolved-theme="light"]) .portrait-block,
html:not([data-resolved-theme="light"]) .profile-note{
  background:#161b22;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .feature-tile:hover,
html:not([data-resolved-theme="light"]) .folder-card:hover,
html:not([data-resolved-theme="light"]) .list-row:hover{
  background:#1c2128;
}
html:not([data-resolved-theme="light"]) .data-table-wrap,
html:not([data-resolved-theme="light"]) .calendar-bundle,
html:not([data-resolved-theme="light"]) .reserve-location-filters{
  background:#010409;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .data-table,
html:not([data-resolved-theme="light"]) .data-table th,
html:not([data-resolved-theme="light"]) .data-table td{
  background:#010409;
  border-color:#21262d;
}
html:not([data-resolved-theme="light"]) .data-table tr:nth-child(even) td{
  background:#0d1117;
}
html:not([data-resolved-theme="light"]) .data-table tr:hover td{
  background:#161b22;
}
html:not([data-resolved-theme="light"]) input,
html:not([data-resolved-theme="light"]) input[type="date"],
html:not([data-resolved-theme="light"]) input[type="datetime-local"],
html:not([data-resolved-theme="light"]) input[type="search"],
html:not([data-resolved-theme="light"]) select,
html:not([data-resolved-theme="light"]) textarea,
html:not([data-resolved-theme="light"]) .compact-search-input,
html:not([data-resolved-theme="light"]) .tour-search{
  background:#010409;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) input:hover,
html:not([data-resolved-theme="light"]) select:hover,
html:not([data-resolved-theme="light"]) textarea:hover{
  background:#010409;
  border-color:#484f58;
}
html:not([data-resolved-theme="light"]) input:focus,
html:not([data-resolved-theme="light"]) select:focus,
html:not([data-resolved-theme="light"]) textarea:focus{
  background:#010409;
  border-color:#58a6ff;
  box-shadow:0 0 0 4px rgba(88,166,255,.35);
}
html:not([data-resolved-theme="light"]) .nav-dropdown,
html:not([data-resolved-theme="light"]) .account-dropdown,
html:not([data-resolved-theme="light"]) select option{
  background:#010409;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .modal,
html:not([data-resolved-theme="light"]) .popover,
html:not([data-resolved-theme="light"]) .tooltip,
html:not([data-resolved-theme="light"]) .onboarding-tour-card,
html:not([data-resolved-theme="light"]) .plan-choice-card{
  background:#161b22;
  border-color:#30363d;
}
html:not([data-resolved-theme="light"]) .button.primary,
html:not([data-resolved-theme="light"]) .tour-mini-button,
html:not([data-resolved-theme="light"]) .lab-template-v1 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v2 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v3 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v4 .button.primary,
html:not([data-resolved-theme="light"]) .filter-button,
html:not([data-resolved-theme="light"]) .filter-toggle.active,
html:not([data-resolved-theme="light"]) .radio-group label:has(input:checked){
  background:#1f6feb;
  border-color:rgba(88,166,255,.40);
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) .button.primary:hover,
html:not([data-resolved-theme="light"]) .tour-mini-button:hover,
html:not([data-resolved-theme="light"]) .filter-button:hover,
html:not([data-resolved-theme="light"]) .filter-toggle.active:hover,
html:not([data-resolved-theme="light"]) .radio-group label:has(input:checked):hover{
  background:#388bfd;
  border-color:rgba(88,166,255,.40);
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) .button.secondary{
  background:#21262d;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .button.secondary:hover{
  background:#30363d;
}
html:not([data-resolved-theme="light"]) .button.outline{
  background:#010409;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .button.outline:hover{
  background:#161b22;
  border-color:#484f58;
}
html:not([data-resolved-theme="light"]) .button.ghost{
  background:transparent;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .button.ghost:hover{
  background:#21262d;
}
html:not([data-resolved-theme="light"]) .tab-item{
  background:transparent;
  border-color:transparent;
  color:#8b949e;
}
html:not([data-resolved-theme="light"]) .tab-item:hover:not(.active){
  background:#161b22;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .tab-item.active{
  background:#21262d;
  border-color:#30363d;
  color:#f0f6fc;
}
html:not([data-resolved-theme="light"]) .pill,
html:not([data-resolved-theme="light"]) .status-chip,
html:not([data-resolved-theme="light"]) .result-chip{
  background:#21262d;
  border-color:#30363d;
  color:#c9d1d9;
}
html:not([data-resolved-theme="light"]) .status-chip.confirmed,
html:not([data-resolved-theme="light"]) .status-chip.auto,
html:not([data-resolved-theme="light"]) .status-chip.completed,
html:not([data-resolved-theme="light"]) .status-chip.done,
html:not([data-resolved-theme="light"]) .result-chip.success,
html:not([data-resolved-theme="light"]) .result-chip.done,
html:not([data-resolved-theme="light"]) .tour-status.ok{
  background:rgba(66,190,101,.14);
  border-color:rgba(66,190,101,.38);
  color:#42be65;
}
html:not([data-resolved-theme="light"]) .status-chip.pending_approval,
html:not([data-resolved-theme="light"]) .status-chip.approval,
html:not([data-resolved-theme="light"]) .result-chip.neutral,
html:not([data-resolved-theme="light"]) .tour-status.warn{
  background:rgba(187,128,9,.15);
  border-color:rgba(187,128,9,.40);
  color:#d29922;
}
html:not([data-resolved-theme="light"]) .status-chip.rejected,
html:not([data-resolved-theme="light"]) .status-chip.cancelled,
html:not([data-resolved-theme="light"]) .result-chip.failure{
  background:rgba(248,81,73,.12);
  border-color:rgba(248,81,73,.40);
  color:#f85149;
}
html:not([data-resolved-theme="light"]) .badge-blue,
html:not([data-resolved-theme="light"]) .qa-icon,
html:not([data-resolved-theme="light"]) .member-create-badge,
html:not([data-resolved-theme="light"]) .file-drop:hover,
html:not([data-resolved-theme="light"]) .pricing-plan-card::before{
  background:rgba(56,139,253,.12);
  border-color:rgba(56,139,253,.40);
  color:#58a6ff;
}
html:not([data-resolved-theme="light"]) ::selection{
  background:rgba(56,139,253,.35);
  color:#ffffff;
}

/* IBM Carbon Gray 100 dark-mode final pass. Keep this last in the dark stack. */
html:not([data-resolved-theme="light"]){
  color-scheme:dark;
}
html:not([data-resolved-theme="light"]) body,
html:not([data-resolved-theme="light"]) .page-shell,
html:not([data-resolved-theme="light"]) main,
html:not([data-resolved-theme="light"]) .landing-hero{
  background:#161616;
  color:#f4f4f4;
}
html:not([data-resolved-theme="light"]) .site-header,
html:not([data-resolved-theme="light"]) .simplified-header{
  background:#161616;
  border-bottom:1px solid #393939;
}
html:not([data-resolved-theme="light"]) .hero-panel,
html:not([data-resolved-theme="light"]) .hero-quiet,
html:not([data-resolved-theme="light"]) .section-hero,
html:not([data-resolved-theme="light"]) .folder-panel,
html:not([data-resolved-theme="light"]) .accent-panel{
  background:#161616;
  border-color:#393939;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .glass-card,
html:not([data-resolved-theme="light"]) .glass-lite,
html:not([data-resolved-theme="light"]) .workflow-tile,
html:not([data-resolved-theme="light"]) .suggestion-card,
html:not([data-resolved-theme="light"]) .booking-card,
html:not([data-resolved-theme="light"]) .folder-card,
html:not([data-resolved-theme="light"]) .metric-card,
html:not([data-resolved-theme="light"]) .spotlight-card,
html:not([data-resolved-theme="light"]) .feature-tile,
html:not([data-resolved-theme="light"]) .role-card,
html:not([data-resolved-theme="light"]) .template-choice-card,
html:not([data-resolved-theme="light"]) .lab-fact-card,
html:not([data-resolved-theme="light"]) .member-card,
html:not([data-resolved-theme="light"]) .member-group-section,
html:not([data-resolved-theme="light"]) .portrait-block,
html:not([data-resolved-theme="light"]) .profile-note,
html:not([data-resolved-theme="light"]) .modal,
html:not([data-resolved-theme="light"]) .popover,
html:not([data-resolved-theme="light"]) .onboarding-tour-card,
html:not([data-resolved-theme="light"]) .plan-choice-card,
html:not([data-resolved-theme="light"]) .hero-preview-surface,
html:not([data-resolved-theme="light"]) .pricing-date-card,
html:not([data-resolved-theme="light"]) .pricing-price-box,
html:not([data-resolved-theme="light"]) .tour-browser,
html:not([data-resolved-theme="light"]) .tour-list-row,
html:not([data-resolved-theme="light"]) .tour-step-card,
html:not([data-resolved-theme="light"]) .tour-announcement,
html:not([data-resolved-theme="light"]) .tour-metric-row div,
html:not([data-resolved-theme="light"]) .tour-card-grid div,
html:not([data-resolved-theme="light"]) .tour-table div{
  background:#262626;
  border-color:#393939;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .tooltip{
  background:#393939;
  border-color:#525252;
  color:#f4f4f4;
}
html:not([data-resolved-theme="light"]) .feature-tile:hover,
html:not([data-resolved-theme="light"]) .folder-card:hover,
html:not([data-resolved-theme="light"]) .list-row:hover,
html:not([data-resolved-theme="light"]) .role-card:hover,
html:not([data-resolved-theme="light"]) .main-nav a:hover,
html:not([data-resolved-theme="light"]) .compact-nav a:hover,
html:not([data-resolved-theme="light"]) .account-pill a:hover,
html:not([data-resolved-theme="light"]) .mini-identity a:hover{
  background:#393939;
  border-color:#393939;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .data-table-wrap,
html:not([data-resolved-theme="light"]) .calendar-bundle,
html:not([data-resolved-theme="light"]) .reserve-location-filters{
  background:#161616;
  border-color:#393939;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .data-table,
html:not([data-resolved-theme="light"]) .data-table td{
  background:#161616;
  border-color:#262626;
  color:#f4f4f4;
}
html:not([data-resolved-theme="light"]) .data-table th{
  background:#262626;
  border-color:#393939;
  color:#c6c6c6;
}
html:not([data-resolved-theme="light"]) .data-table tr:nth-child(even) td{
  background:#1f1f1f;
}
html:not([data-resolved-theme="light"]) .data-table tr:hover td{
  background:#262626;
}
html:not([data-resolved-theme="light"]) input,
html:not([data-resolved-theme="light"]) input[type="date"],
html:not([data-resolved-theme="light"]) input[type="time"],
html:not([data-resolved-theme="light"]) input[type="month"],
html:not([data-resolved-theme="light"]) input[type="datetime-local"],
html:not([data-resolved-theme="light"]) input[type="search"],
html:not([data-resolved-theme="light"]) select,
html:not([data-resolved-theme="light"]) textarea,
html:not([data-resolved-theme="light"]) .compact-search-input,
html:not([data-resolved-theme="light"]) .tour-search{
  background:#161616;
  border-color:#393939;
  color:#f4f4f4;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) input:hover,
html:not([data-resolved-theme="light"]) select:hover,
html:not([data-resolved-theme="light"]) textarea:hover{
  background:#161616;
  border-color:#525252;
}
html:not([data-resolved-theme="light"]) input:focus,
html:not([data-resolved-theme="light"]) select:focus,
html:not([data-resolved-theme="light"]) textarea:focus{
  background:#161616;
  border-color:#6f6f6f;
  box-shadow:0 0 0 4px rgba(111,111,111,.24);
}
html:not([data-resolved-theme="light"]) input::placeholder,
html:not([data-resolved-theme="light"]) textarea::placeholder,
html:not([data-resolved-theme="light"]) .compact-search-input::placeholder{
  color:#6f6f6f;
}
html:not([data-resolved-theme="light"]) .nav-dropdown,
html:not([data-resolved-theme="light"]) .account-dropdown,
html:not([data-resolved-theme="light"]) select option{
  background:#262626;
  border-color:#393939;
  box-shadow:0 16px 32px rgba(0,0,0,.40);
}
html:not([data-resolved-theme="light"]) .nav-dropdown a:hover,
html:not([data-resolved-theme="light"]) .account-dropdown a:hover,
html:not([data-resolved-theme="light"]) .account-dropdown button:hover{
  background:#393939;
}
html:not([data-resolved-theme="light"]) h1,
html:not([data-resolved-theme="light"]) h2,
html:not([data-resolved-theme="light"]) h3,
html:not([data-resolved-theme="light"]) h4,
html:not([data-resolved-theme="light"]) .page-title,
html:not([data-resolved-theme="light"]) .landing-title,
html:not([data-resolved-theme="light"]) .brand-wrap strong{
  color:#f4f4f4;
}
html:not([data-resolved-theme="light"]) .lead,
html:not([data-resolved-theme="light"]) .lab-card-pi,
html:not([data-resolved-theme="light"]) .data-table td,
html:not([data-resolved-theme="light"]) label,
html:not([data-resolved-theme="light"]) .main-nav a,
html:not([data-resolved-theme="light"]) .compact-nav a,
html:not([data-resolved-theme="light"]) .account-pill,
html:not([data-resolved-theme="light"]) .account-menu-trigger,
html:not([data-resolved-theme="light"]) .mini-identity span,
html:not([data-resolved-theme="light"]) .mini-identity a{
  color:#f4f4f4;
}
html:not([data-resolved-theme="light"]) .muted,
html:not([data-resolved-theme="light"]) .breadcrumb-row,
html:not([data-resolved-theme="light"]) .folder-card span,
html:not([data-resolved-theme="light"]) .lab-card-affiliation{
  color:#8d8d8d;
}
html:not([data-resolved-theme="light"]) .text-link,
html:not([data-resolved-theme="light"]) .eyebrow,
html:not([data-resolved-theme="light"]) .member-role,
html:not([data-resolved-theme="light"]) .breadcrumb-row a{
  color:#78a9ff;
}
html:not([data-resolved-theme="light"]) .text-link:hover,
html:not([data-resolved-theme="light"]) .breadcrumb-row a:hover{
  color:#a6c8ff;
}
html:not([data-resolved-theme="light"]) .button.primary,
html:not([data-resolved-theme="light"]) .tour-mini-button,
html:not([data-resolved-theme="light"]) .lab-template-v1 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v2 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v3 .button.primary,
html:not([data-resolved-theme="light"]) .lab-template-v4 .button.primary,
html:not([data-resolved-theme="light"]) .filter-button,
html:not([data-resolved-theme="light"]) .filter-toggle.active,
html:not([data-resolved-theme="light"]) .radio-group label:has(input:checked){
  background:#0f62fe;
  border-color:#0f62fe;
  color:#ffffff;
  box-shadow:none;
}
html:not([data-resolved-theme="light"]) .button.primary:hover,
html:not([data-resolved-theme="light"]) .tour-mini-button:hover,
html:not([data-resolved-theme="light"]) .filter-button:hover,
html:not([data-resolved-theme="light"]) .filter-toggle.active:hover,
html:not([data-resolved-theme="light"]) .radio-group label:has(input:checked):hover{
  background:#0353e9;
  border-color:#0353e9;
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) .button.primary:active,
html:not([data-resolved-theme="light"]) .tour-mini-button:active,
html:not([data-resolved-theme="light"]) .filter-button:active{
  background:#002d9c;
  border-color:#002d9c;
}
html:not([data-resolved-theme="light"]) .button.secondary{
  background:#393939;
  border-color:#6f6f6f;
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) .button.secondary:hover{
  background:#4c4c4c;
}
html:not([data-resolved-theme="light"]) .button.secondary:active{
  background:#6f6f6f;
}
html:not([data-resolved-theme="light"]) .button.outline,
html:not([data-resolved-theme="light"]) .button.ghost,
html:not([data-resolved-theme="light"]) .lab-template-v1 .button.ghost,
html:not([data-resolved-theme="light"]) .lab-template-v2 .button.ghost,
html:not([data-resolved-theme="light"]) .lab-template-v3 .button.ghost,
html:not([data-resolved-theme="light"]) .lab-template-v4 .button.ghost{
  background:transparent;
  border-color:#6f6f6f;
  color:#f4f4f4;
}
html:not([data-resolved-theme="light"]) .button.outline:hover,
html:not([data-resolved-theme="light"]) .button.ghost:hover,
html:not([data-resolved-theme="light"]) .lab-template-v1 .button.ghost:hover,
html:not([data-resolved-theme="light"]) .lab-template-v2 .button.ghost:hover,
html:not([data-resolved-theme="light"]) .lab-template-v3 .button.ghost:hover,
html:not([data-resolved-theme="light"]) .lab-template-v4 .button.ghost:hover{
  background:#262626;
}
html:not([data-resolved-theme="light"]) .button.outline:active,
html:not([data-resolved-theme="light"]) .button.ghost:active{
  background:#393939;
}
html:not([data-resolved-theme="light"]) .tab-item{
  background:transparent;
  border-color:transparent;
  color:#c6c6c6;
}
html:not([data-resolved-theme="light"]) .tab-item:hover:not(.active){
  background:#262626;
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) .tab-item.active{
  background:#393939;
  border-color:#6f6f6f;
  color:#ffffff;
}
html:not([data-resolved-theme="light"]) .pill,
html:not([data-resolved-theme="light"]) .status-chip,
html:not([data-resolved-theme="light"]) .result-chip{
  background:#393939;
  border-color:#525252;
  color:#f4f4f4;
}
html:not([data-resolved-theme="light"]) .status-chip.confirmed,
html:not([data-resolved-theme="light"]) .status-chip.auto,
html:not([data-resolved-theme="light"]) .status-chip.completed,
html:not([data-resolved-theme="light"]) .status-chip.done,
html:not([data-resolved-theme="light"]) .result-chip.success,
html:not([data-resolved-theme="light"]) .result-chip.done,
html:not([data-resolved-theme="light"]) .tour-status.ok{
  background:rgba(66,190,101,.14);
  border-color:rgba(66,190,101,.38);
  color:#42be65;
}
html:not([data-resolved-theme="light"]) .status-chip.pending_approval,
html:not([data-resolved-theme="light"]) .status-chip.approval,
html:not([data-resolved-theme="light"]) .result-chip.neutral,
html:not([data-resolved-theme="light"]) .tour-status.warn{
  background:rgba(241,194,27,.14);
  border-color:rgba(241,194,27,.38);
  color:#f1c21b;
}
html:not([data-resolved-theme="light"]) .status-chip.rejected,
html:not([data-resolved-theme="light"]) .status-chip.cancelled,
html:not([data-resolved-theme="light"]) .result-chip.failure,
html:not([data-resolved-theme="light"]) .button.danger{
  background:rgba(255,131,137,.14);
  border-color:rgba(255,131,137,.40);
  color:#ff8389;
}
html:not([data-resolved-theme="light"]) .badge-blue,
html:not([data-resolved-theme="light"]) .qa-icon,
html:not([data-resolved-theme="light"]) .member-create-badge,
html:not([data-resolved-theme="light"]) .file-drop:hover,
html:not([data-resolved-theme="light"]) .pricing-plan-card::before,
html:not([data-resolved-theme="light"]) .role-icon,
html:not([data-resolved-theme="light"]) .role-icon.admin{
  background:rgba(69,137,255,.16);
  border-color:rgba(69,137,255,.45);
  color:#78a9ff;
}
html:not([data-resolved-theme="light"]) .account-pill,
html:not([data-resolved-theme="light"]) .account-menu-trigger{
  background:#262626;
  border-color:#525252;
}
html:not([data-resolved-theme="light"]) .account-pill:hover,
html:not([data-resolved-theme="light"]) .account-menu-trigger:hover{
  background:#393939;
}
html:not([data-resolved-theme="light"]) .account-menu-trigger img,
html:not([data-resolved-theme="light"]) .member-photo,
html:not([data-resolved-theme="light"]) .profile-avatar{
  border-color:#525252;
}
html:not([data-resolved-theme="light"]) .button[disabled],
html:not([data-resolved-theme="light"]) button[disabled],
html:not([data-resolved-theme="light"]) input[disabled],
html:not([data-resolved-theme="light"]) select[disabled],
html:not([data-resolved-theme="light"]) textarea[disabled]{
  color:#525252;
  border-color:#262626;
  opacity:1;
}
html:not([data-resolved-theme="light"]) .divider,
html:not([data-resolved-theme="light"]) hr{
  border-color:#393939;
}
html:not([data-resolved-theme="light"]) select{
  background-color:#161616;
  background-image:
    linear-gradient(45deg,transparent 50%, #c6c6c6 50%),
    linear-gradient(135deg,#c6c6c6 50%,transparent 50%);
  background-position:calc(100% - 22px) calc(50% - 3px),calc(100% - 16px) calc(50% - 3px);
  background-size:6px 6px,6px 6px;
  background-repeat:no-repeat;
}
html:not([data-resolved-theme="light"]) .tour-browser-bar span{
  background:#ff8389;
}
html:not([data-resolved-theme="light"]) .tour-browser-bar span:nth-child(2){
  background:#f1c21b;
}
html:not([data-resolved-theme="light"]) .tour-browser-bar span:nth-child(3){
  background:#78a9ff;
}
html:not([data-resolved-theme="light"]) ::selection{
  background:rgba(69,137,255,.32);
  color:#ffffff;
}

/* Theme playground ??two-column layout (sticky controls + live preview) ---- */
.theme-playground-layout{
  display:grid;
  grid-template-columns:340px 1fr;
  gap:24px;
  align-items:flex-start;
}
.theme-playground-controls{
  position:sticky;
  top:84px; /* clear sticky site header */
  align-self:start;
  max-height:calc(100vh - 100px);
  overflow:auto;
  padding:18px;
  border:1px solid var(--tp-border,#393939);
  border-radius:18px;
  background:var(--tp-panel,#262626);
}
.theme-controls-inner{display:flex;flex-direction:column;gap:14px}
.theme-controls-title{margin:0;font-size:1.4rem;color:var(--tp-heading,#f4f4f4)}
.theme-playground-controls .theme-preset-row{flex-wrap:wrap;gap:8px}
.theme-playground-controls .theme-preset-row .button{flex:1 1 auto;min-width:0}
.theme-playground-controls .theme-control-group{
  border:1px solid var(--tp-border,#393939);
  border-radius:12px;
  background:var(--tp-bg,#161616);
  padding:0;
  overflow:hidden;
}
.theme-playground-controls .theme-control-group > summary{
  list-style:none;
  cursor:pointer;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  user-select:none;
}
.theme-playground-controls .theme-control-group > summary::-webkit-details-marker{display:none}
.theme-playground-controls .theme-control-group > summary::after{
  content:"??;
  display:inline-block;
  transition:transform .15s;
  color:var(--tp-muted,#8d8d8d);
  font-weight:700;
}
.theme-playground-controls .theme-control-group[open] > summary::after{transform:rotate(90deg)}
.theme-playground-controls .theme-control-group h3{margin:0;font-size:.95rem;color:var(--tp-heading,#f4f4f4)}
.theme-playground-controls .theme-control-group .theme-token-grid{
  grid-template-columns:1fr 1fr;
  padding:0 14px 14px;
}
.theme-playground-controls .theme-token-grid label{font-size:.78rem;gap:6px}
.theme-playground-controls .theme-token-grid input[type="color"]{height:34px}
.theme-playground-preview{display:flex;flex-direction:column;gap:22px}
@media (max-width:1024px){
  .theme-playground-layout{grid-template-columns:1fr}
  .theme-playground-controls{position:static;max-height:none}
  .theme-playground-controls .theme-token-grid{grid-template-columns:repeat(3,1fr)}
}

/* Theme playground -------------------------------------------------------- */
.theme-playground{
  --tp-bg:#161616;
  --tp-panel:#262626;
  --tp-hover:#393939;
  --tp-inset:#161616;
  --tp-border:#393939;
  --tp-heading:#f4f4f4;
  --tp-text:#f4f4f4;
  --tp-muted:#8d8d8d;
  --tp-accent:#0f62fe;
  --tp-link:#78a9ff;
  display:grid;
  gap:22px;
  margin:-8px 0 24px;
  color:var(--tp-text);
}
.theme-playground,
.theme-playground .theme-preview-hero,
.theme-playground .theme-preview-nav{
  background:var(--tp-bg);
}
.theme-preview-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  padding:28px;
  border:1px solid var(--tp-border);
  border-radius:24px;
}
.theme-preview-hero h1,
.theme-playground h2,
.theme-playground h3,
.theme-playground .brand-wrap strong{
  color:var(--tp-heading);
}
.theme-preview-hero .lead,
.theme-playground .muted,
.theme-playground .member-role,
.theme-playground .brand-wrap small{
  color:var(--tp-muted);
}
.theme-preset-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.theme-token-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}
.theme-token-grid label{
  display:grid;
  gap:8px;
  color:var(--tp-muted);
  font-size:.84rem;
  font-weight:800;
}
.theme-token-grid input[type="color"]{
  width:100%;
  height:42px;
  padding:4px;
  background:var(--tp-inset);
  border:1px solid var(--tp-border);
  border-radius:10px;
}
.theme-preview-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px;
  border:1px solid var(--tp-border);
  border-radius:20px;
}
.theme-preview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
}
.theme-playground .glass-card,
.theme-playground .glass-lite,
.theme-playground .feature-tile,
.theme-playground .quick-action-btn,
.theme-playground .booking-card,
.theme-playground .suggestion-card,
.theme-playground .list-row,
.theme-playground .lab-fact-card,
.theme-playground .member-card,
.theme-playground .day-cell{
  background:var(--tp-panel);
  border-color:var(--tp-border);
  color:var(--tp-text);
  box-shadow:none;
}
.theme-playground .quick-action-btn:hover,
.theme-playground .feature-tile:hover,
.theme-playground .list-row:hover,
.theme-playground .day-cell:hover{
  background:var(--tp-hover);
}
.theme-playground input,
.theme-playground select,
.theme-playground textarea,
.theme-playground .data-table-wrap,
.theme-playground .data-table,
.theme-playground .data-table td,
.theme-playground .compact-search{
  background:var(--tp-inset);
  border-color:var(--tp-border);
  color:var(--tp-text);
}
.theme-playground .data-table th{
  background:var(--tp-panel);
  border-color:var(--tp-border);
  color:var(--tp-muted);
}
.theme-playground .data-table tr:nth-child(even) td{
  background:color-mix(in srgb,var(--tp-inset) 86%,var(--tp-panel));
}
.theme-playground .data-table tr:hover td{
  background:var(--tp-panel);
}
.theme-playground input::placeholder,
.theme-playground textarea::placeholder{
  color:var(--tp-muted);
}
.theme-playground input:focus,
.theme-playground select:focus,
.theme-playground textarea:focus{
  border-color:var(--tp-accent);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--tp-accent) 34%,transparent);
}
.theme-playground .button.primary{
  background:var(--tp-accent);
  border-color:var(--tp-accent);
  color:#fff;
  box-shadow:none;
}
.theme-playground .button.secondary{
  background:var(--tp-hover);
  border-color:var(--tp-border);
  color:var(--tp-text);
}
.theme-playground .button.ghost{
  background:transparent;
  border-color:var(--tp-border);
  color:var(--tp-text);
}
.theme-playground .button.ghost:hover,
.theme-playground .button.secondary:hover{
  background:var(--tp-hover);
}
.theme-playground .text-link,
.theme-playground a,
.theme-playground .eyebrow{
  color:var(--tp-link);
}
.theme-playground .tab-bar{
  background:transparent;
  border-color:var(--tp-border);
}
.theme-playground .tab-item{
  background:transparent;
  color:var(--tp-muted);
}
.theme-playground .tab-item.active{
  background:var(--tp-hover);
  border-color:var(--tp-border);
  color:var(--tp-heading);
}
.theme-playground .qa-icon,
.theme-playground .role-icon,
.theme-playground .member-create-badge{
  background:color-mix(in srgb,var(--tp-accent) 18%,transparent);
  border-color:color-mix(in srgb,var(--tp-accent) 45%,transparent);
  color:var(--tp-link);
}
.theme-playground .pill,
.theme-playground .status-chip,
.theme-playground .result-chip{
  background:var(--tp-hover);
  border-color:var(--tp-border);
  color:var(--tp-text);
}
.theme-playground .status-chip.confirmed,
.theme-playground .result-chip.success{
  background:rgba(66,190,101,.14);
  border-color:rgba(66,190,101,.38);
  color:#42be65;
}
.theme-playground .status-chip.pending_approval,
.theme-playground .result-chip.neutral{
  background:rgba(241,194,27,.14);
  border-color:rgba(241,194,27,.38);
  color:#f1c21b;
}
.theme-playground .status-chip.rejected,
.theme-playground .result-chip.failure,
.theme-playground .button.danger{
  background:rgba(255,131,137,.14);
  border-color:rgba(255,131,137,.40);
  color:#ff8389;
}
.theme-playground .nav-dropdown,
.theme-static-menu,
.theme-static-tooltip{
  position:static;
  display:grid;
  min-width:0;
  opacity:1;
  visibility:visible;
  transform:none;
  background:var(--tp-panel);
  border:1px solid var(--tp-border);
  box-shadow:0 16px 32px rgba(0,0,0,.28);
}
.theme-static-menu a{
  padding:10px 12px;
  text-decoration:none;
}
.theme-static-menu a:hover{
  background:var(--tp-hover);
}
.theme-static-tooltip{
  padding:12px;
  border-radius:12px;
  color:var(--tp-text);
}
.theme-overlay-demo{
  display:grid;
  gap:14px;
}
.theme-playground .file-drop{
  margin-top:12px;
  padding:18px;
  border:1px dashed var(--tp-border);
  border-radius:14px;
  background:var(--tp-inset);
  color:var(--tp-muted);
}
.theme-mini-calendar{
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-top:18px;
}
.theme-playground .event-pill{
  background:color-mix(in srgb,var(--tp-accent) 16%,var(--tp-panel));
  border-color:color-mix(in srgb,var(--tp-accent) 40%,var(--tp-border));
  color:var(--tp-text);
}
.theme-token-output{
  margin:0;
  padding:16px;
  border:1px solid var(--tp-border);
  border-radius:14px;
  background:var(--tp-inset);
  color:var(--tp-text);
  overflow:auto;
}
@media(max-width:900px){
  .theme-preview-hero,
  .theme-preview-nav{
    align-items:flex-start;
    flex-direction:column;
  }
  .theme-preview-grid,
  .theme-token-grid{
    grid-template-columns:1fr;
  }
}

/* Expanded theme playground token mapping. Keep after the original playground rules. */
.theme-playground{
  --tp-bg:#161616;
  --tp-section:#161616;
  --tp-panel:#262626;
  --tp-card:#262626;
  --tp-inset:#161616;
  --tp-hover:#393939;
  --tp-selected:#393939;
  --tp-tooltip:#393939;
  --tp-border:#393939;
  --tp-borderMuted:#262626;
  --tp-borderStrong:#525252;
  --tp-heading:#f4f4f4;
  --tp-text:#f4f4f4;
  --tp-secondary:#c6c6c6;
  --tp-muted:#8d8d8d;
  --tp-placeholder:#6f6f6f;
  --tp-primary:#0f62fe;
  --tp-primaryHover:#0353e9;
  --tp-primaryActive:#002d9c;
  --tp-link:#78a9ff;
  --tp-linkHover:#a6c8ff;
  --tp-secondaryBtn:#393939;
  --tp-secondaryHover:#4c4c4c;
  --tp-focus:#4589ff;
  --tp-success:#42be65;
  --tp-warning:#f1c21b;
  --tp-danger:#ff8389;
  --tp-info:#78a9ff;
  background:var(--tp-bg);
}
.theme-playground,
.theme-playground .theme-preview-hero,
.theme-playground .theme-preview-nav{
  background:var(--tp-section);
  color:var(--tp-text);
}
.theme-control-panel{
  background:var(--tp-panel);
  border-color:var(--tp-border);
  box-shadow:none;
}
.theme-control-group{
  display:grid;
  gap:12px;
}
.theme-control-group + .theme-control-group{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--tp-borderMuted);
}
.theme-control-group h3{
  margin:0;
  color:var(--tp-heading);
}
.theme-playground .glass-card,
.theme-playground .glass-lite,
.theme-playground .booking-card,
.theme-playground .suggestion-card,
.theme-playground .list-row,
.theme-playground .member-card,
.theme-playground .member-group-section,
.theme-playground .portrait-block,
.theme-playground .profile-note,
.theme-playground .lab-fact-card{
  background:var(--tp-card);
  border-color:var(--tp-border);
  color:var(--tp-text);
  box-shadow:none;
}
.theme-playground .quick-action-btn,
.theme-playground .feature-tile,
.theme-playground .folder-card,
.theme-playground .metric-card,
.theme-playground .spotlight-card{
  background:var(--tp-card);
  border-color:var(--tp-border);
  color:var(--tp-text);
  box-shadow:none;
}
.theme-playground .quick-action-btn:hover,
.theme-playground .feature-tile:hover,
.theme-playground .folder-card:hover,
.theme-playground .list-row:hover,
.theme-playground .metric-card:hover,
.theme-playground .spotlight-card:hover{
  background:var(--tp-hover);
}
.theme-playground .section-hero,
.theme-playground .hero-panel,
.theme-playground .hero-quiet,
.theme-playground .folder-panel,
.theme-playground .accent-panel{
  background:var(--tp-section);
  border-color:var(--tp-border);
  color:var(--tp-text);
}
.theme-playground h1,
.theme-playground h2,
.theme-playground h3,
.theme-playground h4,
.theme-playground .page-title,
.theme-playground .landing-title,
.theme-playground .brand-wrap strong,
.theme-playground strong{
  color:var(--tp-heading);
}
.theme-playground,
.theme-playground .lead,
.theme-playground label,
.theme-playground .data-table td{
  color:var(--tp-text);
}
.theme-playground .muted,
.theme-playground .breadcrumb-row,
.theme-playground .brand-wrap small,
.theme-playground .folder-card span,
.theme-playground .lab-card-affiliation,
.theme-playground .member-role{
  color:var(--tp-muted);
}
.theme-playground .text-link,
.theme-playground .eyebrow,
.theme-playground a{
  color:var(--tp-link);
}
.theme-playground .text-link:hover,
.theme-playground a:hover{
  color:var(--tp-linkHover);
}
.theme-playground input,
.theme-playground input[type="date"],
.theme-playground input[type="time"],
.theme-playground input[type="month"],
.theme-playground input[type="datetime-local"],
.theme-playground input[type="search"],
.theme-playground select,
.theme-playground textarea,
.theme-playground .compact-search,
.theme-playground .compact-search-input,
.theme-playground .tour-search,
.theme-playground .file-drop,
.theme-playground .theme-token-output{
  background:var(--tp-inset);
  border-color:var(--tp-border);
  color:var(--tp-text);
  box-shadow:none;
}
.theme-playground input:hover,
.theme-playground select:hover,
.theme-playground textarea:hover,
.theme-playground .compact-search:hover{
  border-color:var(--tp-borderStrong);
}
.theme-playground input:focus,
.theme-playground select:focus,
.theme-playground textarea:focus,
.theme-playground .compact-search:focus-within{
  border-color:var(--tp-focus);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--tp-focus) 40%,transparent);
}
.theme-playground input::placeholder,
.theme-playground textarea::placeholder,
.theme-playground .compact-search-input::placeholder{
  color:var(--tp-placeholder);
}
.theme-playground .button.primary,
.theme-playground .filter-button,
.theme-playground .filter-toggle.active,
.theme-playground .radio-group label:has(input:checked),
.theme-playground .tour-mini-button{
  background:var(--tp-primary);
  border-color:var(--tp-primary);
  color:#fff;
  box-shadow:none;
}
.theme-playground .button.primary:hover,
.theme-playground .filter-button:hover,
.theme-playground .filter-toggle.active:hover,
.theme-playground .radio-group label:has(input:checked):hover,
.theme-playground .tour-mini-button:hover{
  background:var(--tp-primaryHover);
  border-color:var(--tp-primaryHover);
  color:#fff;
}
.theme-playground .button.primary:active,
.theme-playground .filter-button:active,
.theme-playground .tour-mini-button:active{
  background:var(--tp-primaryActive);
  border-color:var(--tp-primaryActive);
}
.theme-playground .button.secondary{
  background:var(--tp-secondaryBtn);
  border-color:var(--tp-borderStrong);
  color:var(--tp-heading);
}
.theme-playground .button.secondary:hover{
  background:var(--tp-secondaryHover);
}
.theme-playground .button.outline,
.theme-playground .button.ghost{
  background:transparent;
  border-color:var(--tp-borderStrong);
  color:var(--tp-heading);
}
.theme-playground .button.outline:hover,
.theme-playground .button.ghost:hover{
  background:var(--tp-panel);
}
.theme-playground .button.outline:active,
.theme-playground .button.ghost:active{
  background:var(--tp-selected);
}
.theme-playground .button.danger{
  background:color-mix(in srgb,var(--tp-danger) 16%,transparent);
  border-color:color-mix(in srgb,var(--tp-danger) 46%,transparent);
  color:var(--tp-danger);
}
.theme-playground .tab-bar{
  background:transparent;
  border-color:var(--tp-border);
}
.theme-playground .tab-item{
  background:transparent;
  border-color:transparent;
  color:var(--tp-secondary);
}
.theme-playground .tab-item:hover:not(.active){
  background:var(--tp-panel);
  color:var(--tp-heading);
}
.theme-playground .tab-item.active{
  background:var(--tp-selected);
  border-color:var(--tp-borderStrong);
  color:var(--tp-heading);
}
.theme-playground .data-table-wrap,
.theme-playground .data-table,
.theme-playground .data-table td{
  background:var(--tp-inset);
  border-color:var(--tp-borderMuted);
}
.theme-playground .data-table th{
  background:var(--tp-panel);
  border-color:var(--tp-border);
  color:var(--tp-secondary);
}
.theme-playground .data-table tr:nth-child(even) td{
  background:color-mix(in srgb,var(--tp-inset) 88%,var(--tp-panel));
}
.theme-playground .data-table tr:hover td{
  background:var(--tp-panel);
}
.theme-playground .pill,
.theme-playground .status-chip,
.theme-playground .result-chip{
  background:var(--tp-selected);
  border-color:var(--tp-borderStrong);
  color:var(--tp-heading);
}
.theme-playground .status-chip.confirmed,
.theme-playground .status-chip.auto,
.theme-playground .status-chip.completed,
.theme-playground .status-chip.done,
.theme-playground .result-chip.success,
.theme-playground .result-chip.done{
  background:color-mix(in srgb,var(--tp-success) 16%,transparent);
  border-color:color-mix(in srgb,var(--tp-success) 42%,transparent);
  color:var(--tp-success);
}
.theme-playground .status-chip.pending_approval,
.theme-playground .status-chip.approval,
.theme-playground .result-chip.neutral{
  background:color-mix(in srgb,var(--tp-warning) 16%,transparent);
  border-color:color-mix(in srgb,var(--tp-warning) 42%,transparent);
  color:var(--tp-warning);
}
.theme-playground .status-chip.rejected,
.theme-playground .status-chip.cancelled,
.theme-playground .result-chip.failure{
  background:color-mix(in srgb,var(--tp-danger) 16%,transparent);
  border-color:color-mix(in srgb,var(--tp-danger) 42%,transparent);
  color:var(--tp-danger);
}
.theme-playground .result-chip.info,
.theme-playground .badge-blue,
.theme-playground .qa-icon,
.theme-playground .role-icon,
.theme-playground .member-create-badge,
.theme-playground .pricing-plan-card::before{
  background:color-mix(in srgb,var(--tp-info) 18%,transparent);
  border-color:color-mix(in srgb,var(--tp-info) 46%,transparent);
  color:var(--tp-info);
}
.theme-playground .nav-dropdown,
.theme-playground .account-dropdown,
.theme-static-menu{
  background:var(--tp-panel);
  border-color:var(--tp-border);
  box-shadow:0 16px 32px rgba(0,0,0,.32);
}
.theme-playground .nav-dropdown a:hover,
.theme-playground .account-dropdown a:hover,
.theme-playground .account-dropdown button:hover,
.theme-static-menu a:hover{
  background:var(--tp-hover);
}
.theme-static-tooltip,
.theme-playground .tooltip{
  background:var(--tp-tooltip);
  border-color:var(--tp-borderStrong);
  color:var(--tp-text);
}
.theme-playground .account-pill,
.theme-playground .account-menu-trigger{
  background:var(--tp-panel);
  border-color:var(--tp-borderStrong);
  color:var(--tp-text);
}
.theme-playground .account-pill:hover,
.theme-playground .account-menu-trigger:hover{
  background:var(--tp-hover);
}
.theme-playground .account-menu-trigger img,
.theme-playground .member-photo,
.theme-playground .profile-avatar{
  border-color:var(--tp-borderStrong);
}
.theme-playground .event-pill{
  background:color-mix(in srgb,var(--tp-info) 16%,var(--tp-card));
  border-color:color-mix(in srgb,var(--tp-info) 42%,var(--tp-border));
  color:var(--tp-text);
}
.theme-token-output{
  white-space:pre-wrap;
}

/* Mobile QA fixes: onboarding drawer + Research Hub compact layout -------- */
.mobile-drawer-action{
  width:100%;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  padding:10px 12px;
  border-radius:12px;
  font:inherit;
  font-size:.95rem;
  cursor:pointer;
}
.mobile-drawer-action:hover,
.mobile-drawer-action:focus-visible{
  background:rgba(255,255,255,.08);
  outline:none;
}
.research-status-tabs{
  flex:0 1 auto;
}
.research-search-field{
  min-width:0;
}
.research-desktop-filter-field{
  display:none;
  min-width:0;
}
.research-filter-details{
  position:relative;
}
.research-filter-details summary{
  list-style:none;
}
.research-filter-details summary + summary{
  display:none;
}
.research-filter-details summary::-webkit-details-marker{
  display:none;
}
.research-filter-panel{
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(130px,.72fr) minmax(130px,.72fr);
  gap:.5rem;
}
@media (min-width: 761px){
  .research-section-head{
    display:grid;
    grid-template-columns:max-content max-content minmax(0,1fr) max-content;
    gap:16px;
    align-items:center;
  }
  .research-section-head:has(.research-head-month-form){
    grid-template-columns:max-content max-content minmax(360px,1fr) max-content;
  }
  .research-view-actions{
    justify-content:flex-start;
  }
  .research-head-month-form{
    display:flex;
    flex-wrap:nowrap;
    justify-content:flex-start;
    align-items:center;
    gap:8px;
    min-width:0;
  }
  .research-head-month-form label{
    min-width:150px;
  }
  .research-head-month-form .button{
    width:auto;
    min-width:max-content;
    min-height:44px;
    white-space:nowrap;
  }
  .research-head-month-form input[type="month"]{
    width:150px;
  }
  .research-status-tabs{
    justify-self:end;
  }
  .research-filter-bar{
    grid-template-columns:minmax(260px,1fr) minmax(170px,.48fr) minmax(150px,.38fr) minmax(150px,.38fr) auto auto;
    align-items:end;
  }
  .research-desktop-filter-field{
    display:block;
  }
  .research-filter-details{
    display:none !important;
  }
  .research-search-submit{
    width:auto;
    min-width:140px;
    min-height:44px;
  }
}
.research-col-experiment{width:22%}
.research-col-status{width:12%}
.research-col-actions{width:18%}

@media (max-width: 760px){
  .mobile-drawer-account .mobile-drawer-action{
    color:var(--text);
  }
  .quick-action-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin-bottom:12px;
  }
  .quick-action-btn{
    min-width:0;
    min-height:115px;
    gap:10px;
    padding:18px 5px;
    border-radius:14px;
    font-size:.74rem;
    line-height:1.18;
  }
  .quick-action-btn .qa-icon{
    width:30px;
    height:30px;
    border-radius:10px;
    font-size:.76rem;
  }
  .quick-action-btn .qa-icon svg{
    width:18px;
    height:18px;
  }

  .research-section-head{
    display:grid;
    grid-template-columns:auto minmax(0,auto) minmax(0,1fr);
    align-items:center;
    gap:8px;
  }
  .research-section-head > div:first-child{
    min-width:max-content;
  }
  .research-section-head h2{
    margin:0;
    font-size:1rem;
    white-space:nowrap;
  }
  .research-view-actions{
    width:auto !important;
    display:flex;
    flex-direction:row !important;
    flex-wrap:nowrap;
    justify-content:center;
    gap:4px;
  }
  .research-view-actions .button{
    width:auto !important;
    flex:0 0 auto;
    min-width:0;
    min-height:32px;
    padding:6px 9px;
    font-size:.76rem;
    white-space:nowrap;
  }
  .research-status-tabs{
    justify-self:end;
    display:flex;
    gap:3px;
    padding:2px;
    max-width:100%;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .research-status-tabs::-webkit-scrollbar{
    display:none;
  }
  .research-status-tabs .tab-item{
    width:auto;
    min-width:max-content;
    padding:6px 8px;
    font-size:.72rem;
    white-space:nowrap;
  }
  .research-toolbar-row{
    margin:2px 0 8px;
  }
  .research-filter-bar{
    display:grid;
    grid-template-columns:minmax(0,1fr) 58px 58px;
    gap:6px;
    align-items:stretch;
    margin-bottom:12px;
  }
  .research-filter-bar .research-search-field{
    grid-column:1;
  }
  .research-filter-bar .research-search-field input{
    height:40px;
    min-height:40px;
    padding:0 10px;
  }
  .research-filter-details{
    grid-column:2;
  }
  .research-filter-details summary{
    font-size:0;
  }
  .research-filter-details summary::before{
    content:"篩選";
    font-size:.78rem;
  }
  .research-filter-details summary,
  .research-search-submit{
    width:58px;
    min-width:0;
    height:40px;
    min-height:40px;
    padding:0;
    justify-content:center;
    font-size:.78rem;
  }
  .research-search-submit{
    grid-column:3;
  }
  .research-filter-bar > a.button{
    grid-column:1 / -1;
    width:max-content;
    min-height:32px;
    padding:6px 10px;
    font-size:.76rem;
  }
  .research-filter-panel{
    position:absolute;
    z-index:5;
    top:calc(100% + 8px);
    right:0;
    width:min(calc(100vw - 32px),420px);
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:6px;
    padding:8px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--panel);
    box-shadow:var(--shadow);
  }
  .research-filter-panel label,
  .research-filter-panel select,
  .research-filter-panel input{
    min-width:0;
  }
  .research-filter-panel select,
  .research-filter-panel input{
    height:38px;
    min-height:38px;
    padding:0 8px;
    font-size:.76rem;
  }
  .month-picker-form{
    width:100%;
    display:grid;
    grid-template-columns:auto minmax(120px,1fr) auto auto;
    align-items:end;
    gap:6px;
  }
  .month-picker-form .button{
    width:auto;
    min-height:34px;
    padding:6px 9px;
    font-size:.74rem;
  }
  .month-picker-form label{
    min-width:0;
  }
  .month-picker-form input[type="month"]{
    height:34px;
    min-height:34px;
    padding:0 8px;
  }

  .research-col-experiment{width:24%}
  .research-col-status{width:13%}
  .research-col-instruments{width:17%}
  .data-table .status-chip{
    min-width:max-content;
    white-space:nowrap;
  }
  .data-table td:first-child strong,
  .data-table td:first-child a{
    white-space:nowrap;
  }

  .research-calendar{
    overflow:visible;
    touch-action:pinch-zoom pan-x pan-y;
  }
  .research-calendar .calendar-grid{
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:4px;
    min-width:0;
  }
  .research-calendar .calendar-grid.weekdays{
    margin-bottom:4px;
  }
  .research-calendar .calendar-grid.weekdays div{
    padding:4px 2px;
    text-align:center;
    font-size:.62rem;
  }
  .research-calendar .day-cell{
    position:relative;
    min-height:66px;
    padding:4px;
    border-radius:10px;
  }
  .research-calendar .today-cell{
    border-color:rgba(14,165,233,.55);
    background:linear-gradient(180deg,rgba(14,165,233,.12),rgba(14,165,233,.035));
    outline:0;
    box-shadow:inset 0 0 0 1px rgba(14,165,233,.28);
  }
  .research-calendar .today-cell::after{
    content:"今天";
    position:absolute;
    top:3px;
    right:3px;
    max-width:34px;
    overflow:hidden;
    border-radius:999px;
    padding:1px 4px;
    background:rgba(14,165,233,.16);
    color:#0284c7;
    font-size:.48rem;
    font-weight:800;
    line-height:1.25;
    white-space:nowrap;
  }
  .research-calendar .day-number{
    margin-bottom:4px;
    font-size:.68rem;
  }
  .research-calendar .today-cell .day-number{
    display:inline-grid;
    place-items:center;
    min-width:18px;
    height:18px;
    border-radius:999px;
    background:#0ea5e9;
    color:#fff;
    font-weight:900;
  }
  .research-calendar .event-stack{
    gap:3px;
  }
  .research-calendar .event-pill{
    display:block;
    padding:2px 3px;
    border-radius:6px;
    font-size:.5rem;
    line-height:1.08;
  }
  .research-calendar .event-pill strong,
  .research-calendar .event-pill span,
  .research-calendar .event-pill small{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .research-calendar .event-pill strong,
  .research-calendar .event-pill small{
    display:none;
  }
  .research-calendar .event-pill span{
    display:block;
  }
  .research-calendar .event-pill:focus strong,
  .research-calendar .event-pill:focus small,
  .research-calendar .event-pill:hover strong,
  .research-calendar .event-pill:hover small,
  .research-calendar .event-pill:active strong,
  .research-calendar .event-pill:active small{
    display:block;
  }
}

@media (max-width: 420px){
  .research-section-head{
    grid-template-columns:auto auto minmax(86px,1fr);
    gap:6px;
  }
  .research-section-head h2{
    font-size:.92rem;
  }
  .research-view-actions .button{
    padding:5px 7px;
    font-size:.68rem;
  }
  .research-status-tabs .tab-item{
    padding:5px 6px;
    font-size:.66rem;
  }
  .quick-action-btn{
    min-height:105px;
    font-size:.68rem;
  }
  .research-calendar .today-cell::after{
    content:"";
    top:4px;
    right:4px;
    width:6px;
    height:6px;
    padding:0;
    background:#0ea5e9;
  }
}

.instrument-calendar-search-input{flex:0 1 320px}
.instrument-calendar-select{flex:1 1 360px;min-width:220px;min-height:46px;border-radius:14px}
@media (max-width:760px){
  .search-toolbar-card .instrument-calendar-search{flex-wrap:wrap!important}
  .search-toolbar-card .instrument-calendar-search-input{flex:1 1 calc(50% - 4px);width:auto!important}
  .search-toolbar-card .instrument-calendar-select{flex:1 1 calc(50% - 4px);width:auto;min-width:0;height:44px;min-height:44px}
}

.equipment-result-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
}
.equipment-result-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  min-height:100%;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--panel,rgba(255,255,255,.04));
  color:var(--text);
  text-decoration:none;
  box-shadow:0 16px 36px rgba(15,23,42,.08);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.equipment-result-card:hover{
  transform:translateY(-3px);
  border-color:var(--accent,#38bdf8);
  box-shadow:0 22px 48px rgba(15,23,42,.14);
}
.equipment-result-photo{
  position:relative;
  aspect-ratio:4/3;
  overflow:hidden;
  background:linear-gradient(135deg,rgba(14,165,233,.14),rgba(99,102,241,.12));
}
.equipment-result-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.equipment-result-photo-placeholder{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  color:var(--accent,#38bdf8);
  font-size:1.5rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.equipment-result-body{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  gap:10px;
  padding:14px;
}
.equipment-result-card .equipment-card-name{
  min-height:2.6em;
  display:-webkit-box;
  overflow:hidden;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.equipment-result-card .equipment-card-location{
  min-height:3.9em;
  display:-webkit-box;
  overflow:hidden;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
}
.equipment-card-meta-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:auto;
}
.equipment-result-card .equipment-card-approval{
  margin-top:0;
}
.equipment-result-card .equipment-card-price-box{
  width:100%;
  min-width:0;
  align-items:stretch;
  gap:6px;
  padding:10px 12px;
  border-radius:14px;
}
.equipment-result-card .equipment-price-line{
  justify-content:space-between;
  align-items:center;
}
.equipment-result-card .equipment-price-line strong{
  font-size:1rem;
}
.equipment-result-card .equipment-price-line span{
  font-size:.75rem;
}
@media (max-width:1280px){
  .equipment-result-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:980px){
  .equipment-result-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  .equipment-result-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .equipment-result-body{padding:12px}
}
@media (max-width:480px){
  .equipment-result-grid{grid-template-columns:1fr}
}

/* Instrument management redesign ----------------------------------------- */
.equipment-command-hero{position:relative;overflow:visible;z-index:8}
.equipment-command-bar{display:flex;align-items:center;justify-content:flex-end;gap:10px;position:relative;z-index:12}
.equipment-tool-popover{position:relative;z-index:14}
.equipment-tool-popover[open]{z-index:18}
.equipment-tool-popover>summary{list-style:none}
.equipment-tool-popover>summary::-webkit-details-marker{display:none}
.equipment-tool-button{
  position:relative;
  width:48px;
  height:48px;
  border:1px solid var(--line);
  border-radius:18px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.045);
  color:var(--text);
  cursor:pointer;
  text-decoration:none;
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.equipment-tool-button:hover{transform:translateY(-2px);background:rgba(255,255,255,.08);border-color:rgba(110,231,255,.34);box-shadow:0 16px 34px rgba(15,23,42,.12)}
.equipment-tool-button[data-tooltip]::after,
.equipment-dock-panel>summary[data-tooltip]::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 9px);
  z-index:1000;
  width:max-content;
  max-width:220px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(8,17,30,.96);
  color:#fff;
  box-shadow:0 14px 34px rgba(0,0,0,.24);
  font-size:.78rem;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transform:translate(-50%,4px);
  transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
}
.equipment-tool-button[data-tooltip]::before,
.equipment-dock-panel>summary[data-tooltip]::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:calc(100% + 3px);
  z-index:1000;
  width:10px;
  height:10px;
  background:rgba(8,17,30,.96);
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transform:translate(-50%,4px) rotate(45deg);
  transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
}
.equipment-tool-button:hover::after,
.equipment-tool-button:focus-visible::after,
.equipment-tool-button:hover::before,
.equipment-tool-button:focus-visible::before,
.equipment-dock-panel>summary:hover::after,
.equipment-dock-panel>summary:focus-visible::after,
.equipment-dock-panel>summary:hover::before,
.equipment-dock-panel>summary:focus-visible::before{
  opacity:1;
  visibility:visible;
  transform:translate(-50%,0) rotate(0);
}
.equipment-tool-button:hover::before,
.equipment-tool-button:focus-visible::before,
.equipment-dock-panel>summary:hover::before,
.equipment-dock-panel>summary:focus-visible::before{
  transform:translate(-50%,0) rotate(45deg);
}
.equipment-tool-button b{
  position:absolute;
  right:-5px;
  top:-6px;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#f59e0b;
  color:#111827;
  font-size:.72rem;
  line-height:1;
}
.equipment-tool-button.has-alert{border-color:rgba(245,158,11,.38);box-shadow:0 0 0 5px rgba(245,158,11,.08)}
.equipment-tool-button.primary-tool{background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#04111e;border-color:transparent}
.equipment-tool-button.danger-tool{color:#fecaca;border-color:rgba(239,68,68,.28);background:rgba(239,68,68,.1)}
.equipment-tool-icon{width:28px;height:28px;border-radius:11px;display:grid;place-items:center;background:rgba(255,255,255,.08);font-weight:900;font-size:1rem}
.equipment-tool-panel{
  position:absolute;
  right:0;
  top:calc(100% + 12px);
  z-index:28;
  width:min(520px,calc(100vw - 40px));
  padding:16px;
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--panel);
  box-shadow:0 24px 70px rgba(0,0,0,.24);
}
.compact-tool-panel{width:min(360px,calc(100vw - 40px))}
.create-instrument-panel{width:min(760px,calc(100vw - 40px));max-height:min(760px,82vh);overflow:auto}
.tool-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.review-message-list{display:grid;gap:10px;max-height:min(520px,70vh);overflow:auto;padding-right:2px}
.review-message-card{display:grid;gap:12px;padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.04)}
.review-message-card small{display:block;margin-top:4px;color:var(--muted);line-height:1.45}
.review-message-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.review-message-actions form{margin:0}

.equipment-manage-grid{align-items:stretch}
.equipment-manage-card.active{outline:2px solid rgba(110,231,255,.45);outline-offset:3px}
.equipment-card-floating-status{
  position:absolute;
  left:10px;
  top:10px;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(15,23,42,.62);
  color:#fff;
  font-size:.74rem;
  font-weight:800;
  backdrop-filter:blur(10px);
}
.equipment-card-floating-status.is-inactive{background:rgba(127,29,29,.68)}
.equipment-manage-card .equipment-card-approval{padding:6px 8px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid var(--line);font-size:.74rem}

.equipment-editor-shell{display:grid;gap:16px;margin-top:22px;position:relative;z-index:5}
.equipment-editor-cover{display:grid;grid-template-columns:180px minmax(0,1fr) auto;gap:18px;align-items:center;padding:18px}
.equipment-editor-photo{height:138px;border-radius:24px;overflow:hidden;background:linear-gradient(135deg,rgba(14,165,233,.14),rgba(99,102,241,.12));display:grid;place-items:center}
.equipment-editor-photo img{width:100%;height:100%;object-fit:cover}
.equipment-editor-title h2{margin:4px 0 6px;font-size:clamp(1.7rem,2.6vw,2.4rem)}
.equipment-editor-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.equipment-editor-chips span{padding:8px 10px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid var(--line);color:var(--muted);font-size:.82rem}
.equipment-editor-quick{display:grid;grid-template-columns:repeat(3,48px);gap:8px}
.equipment-editor-quick form{margin:0}
.equipment-editor-accordion{display:grid;gap:12px;max-width:980px}
.equipment-dock-panel{padding:0;overflow:hidden}
.equipment-dock-panel>summary{
  position:relative;
  list-style:none;
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 18px;
  cursor:pointer;
  min-height:64px;
}
.equipment-dock-panel>summary::-webkit-details-marker{display:none}
.equipment-dock-panel>summary strong{font-size:1.05rem}
.equipment-dock-panel>summary .pill{margin-left:auto}
.equipment-dock-panel[open]>summary{border-bottom:1px solid var(--line);background:rgba(255,255,255,.035)}
.equipment-dock-panel>form,
.equipment-dock-panel>.toolbar-bar,
.equipment-dock-panel>.people-chip-list,
.equipment-dock-panel>.list-stack,
.equipment-dock-panel>.equipment-designed-form{margin:16px}
.equipment-designed-form{display:grid;gap:10px}
.equipment-form-section{padding:0;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.035);overflow:hidden}
.equipment-form-section>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;cursor:pointer}
.equipment-form-section>summary::-webkit-details-marker{display:none}
.equipment-form-section>summary::after{content:"+";width:26px;height:26px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.07);color:var(--muted);font-weight:900}
.equipment-form-section[open]>summary{border-bottom:1px solid var(--line);background:rgba(255,255,255,.03)}
.equipment-form-section[open]>summary::after{content:"-"}
.equipment-form-section h3{margin:0;font-size:1rem;color:var(--text)}
.equipment-form-section>.form-grid{padding:15px}
.people-chip-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.person-chip{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.035)}
.person-chip>span{width:38px;height:38px;border-radius:14px;display:grid;place-items:center;background:rgba(110,231,255,.13);color:var(--accent);font-weight:900}
.person-chip strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.person-chip small{color:var(--muted)}
.person-chip form{margin:0}
.compact-create-card{padding:0;overflow:hidden}

/* People management cards ------------------------------------------------ */
.people-management-card{position:relative;overflow:visible}
.people-management-summary{align-items:flex-start}
.people-command-bar{display:flex;align-items:center;justify-content:flex-end;gap:10px;position:relative;z-index:12}
.people-create-panel{width:min(760px,calc(100vw - 40px));max-height:min(760px,82vh);overflow:auto}
.invite-code-display{
  padding:14px 16px;
  border:1px dashed var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.045);
  font-size:1.25rem;
  font-weight:900;
  letter-spacing:.08em;
  text-align:center;
}
.people-board{display:grid;gap:22px}
.people-group-section{padding-top:22px;border-top:1px solid var(--line)}
.people-group-section:first-child{padding-top:0;border-top:0}
.people-group-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.people-group-heading h3{margin:4px 0 4px}
.people-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}
.pi-card-grid{grid-template-columns:minmax(280px,420px)}
.people-manage-card{position:relative;border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.035);overflow:visible}
.people-manage-card[open]{z-index:18}
@media (max-width: 760px){
  .equipment-tool-popover[open]{position:static}
  .equipment-tool-popover[open] .equipment-tool-panel{
    position:fixed;
    left:12px;
    right:12px;
    top:calc(12px + env(safe-area-inset-top,0px));
    bottom:auto;
    z-index:72;
    width:auto;
    max-height:min(78dvh,680px);
    overflow:auto;
    border-radius:26px;
    box-shadow:0 28px 80px rgba(0,0,0,.34);
  }
  .equipment-tool-popover[open]::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:71;
    background:rgba(3,10,18,.42);
    -webkit-backdrop-filter:blur(5px);
    backdrop-filter:blur(5px);
  }
}
.people-manage-card>summary{list-style:none}
.people-manage-card>summary::-webkit-details-marker{display:none}
.people-card-summary{display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px;cursor:pointer}
.people-card-avatar{width:76px;height:76px;border-radius:20px;object-fit:cover;border:1px solid var(--line);background:rgba(255,255,255,.05)}
.people-card-body{display:grid;gap:4px;min-width:0}
.people-card-body strong,.people-card-body span,.people-card-body small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.people-card-body span,.people-card-body small{color:var(--muted)}
.people-card-role{padding:6px 9px;border-radius:999px;background:rgba(110,231,255,.12);border:1px solid rgba(110,231,255,.24);font-size:.76rem;font-weight:900;color:var(--accent)}
.people-card-panel{
  display:none;
  position:absolute;
  left:0;
  top:calc(100% + 10px);
  z-index:18;
  width:min(640px,calc(100vw - 40px));
  padding:14px;
  border:1px solid var(--line);
  border-radius:22px;
  background:var(--panel);
  box-shadow:0 24px 70px rgba(0,0,0,.24);
}
.people-manage-card[open] .people-card-panel{display:grid;gap:12px}
.people-card-actions{display:flex;gap:8px;flex-wrap:wrap}
.people-card-actions form{margin:0}
.compact-empty{min-height:120px}

@media (max-width:980px){
  .equipment-editor-cover{grid-template-columns:140px minmax(0,1fr)}
  .equipment-editor-quick{grid-column:1/-1;grid-template-columns:repeat(3,48px)}
  .people-chip-list{grid-template-columns:1fr}
  .people-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .equipment-command-hero .section-head{align-items:flex-start}
  .equipment-command-bar{width:100%;justify-content:flex-start;flex-wrap:wrap}
  .people-management-summary{display:grid}
  .people-command-bar{width:100%;justify-content:flex-start;flex-wrap:wrap}
  .equipment-tool-panel{left:0;right:auto;width:calc(100vw - 48px)}
  .equipment-editor-cover{grid-template-columns:1fr}
  .equipment-editor-photo{height:190px}
  .equipment-editor-quick{grid-template-columns:repeat(3,48px)}
  .people-card-grid,.pi-card-grid{grid-template-columns:1fr}
  .people-card-summary{grid-template-columns:64px minmax(0,1fr)}
  .people-card-avatar{width:64px;height:64px;border-radius:18px}
  .people-card-panel{position:static;width:auto;margin:0 12px 12px}
  .review-message-actions{display:grid;grid-template-columns:1fr 1fr}
  .review-message-actions .button,.review-message-actions form{width:100%}
}
html:not([data-resolved-theme="light"]) [data-fusion-hero]{
  --fusion-bg:#0d1117;
  --fusion-bg2:#161b22;
  --fusion-grid:rgba(120,160,220,.05);
  --fusion-grid-major:rgba(120,160,220,.12);
  --fusion-fg:#e6edf3;
  --fusion-sub:rgba(230,237,243,.55);
  --fusion-sub-dim:rgba(230,237,243,.32);
  --fusion-accent:#78a9ff;
  --fusion-accent-2:#a78bfa;
  --fusion-glow:rgba(69,137,255,.16);
  --fusion-card:rgba(38,38,38,.72);
  --fusion-card-border:rgba(244,244,244,.1);
}
html:not([data-resolved-theme="light"]) .fusion-btn-solid{
  background:linear-gradient(135deg,#0f62fe 0%,#4589ff 58%,#8a3ffc 100%);
  box-shadow:0 4px 14px rgba(69,137,255,.2);
}
html:not([data-resolved-theme="light"]) .fusion-btn-solid:hover{
  box-shadow:0 8px 24px rgba(69,137,255,.3),0 2px 6px rgba(69,137,255,.18);
}
html:not([data-resolved-theme="light"]) .fusion-btn-ghost{
  color:#f4f4f4;
  border-color:rgba(244,244,244,.2);
}
html:not([data-resolved-theme="light"]) .fusion-btn-ghost:hover{
  background:rgba(69,137,255,.14);
}

@media (max-width: 760px){
  [data-fusion-hero]{
    min-height:calc(100dvh - 72px);
    padding:68px 18px 76px;
    margin:-18px calc(50% - 50vw) -34px;
  }
  .fusion-center{gap:16px}
  .fusion-center h1{font-size:clamp(3.8rem,18vw,5.6rem)}
  .fusion-subtitle{font-size:9px;letter-spacing:.14em;gap:8px}
  .fusion-subtitle span{width:14px}
  .fusion-tag{font-size:8px;letter-spacing:.18em}
  .fusion-hud{font-size:8px;letter-spacing:.12em}
  .fusion-hud-right,.fusion-hud-bottom-left,.fusion-hud-bottom-right{display:none}
  .fusion-actions{width:100%;gap:10px}
  .fusion-btn{flex:1 1 0;min-width:0;padding:11px 16px}
}


/* Mobile reserve redesign: keep desktop layout intact, compress the booking form on phones. */
.reserve-mobile-advanced,.reserve-mobile-template-slot{display:none}
@media (max-width: 760px){
  .reserve-page-head{margin-bottom:10px}
  .reserve-page-head .eyebrow,
  .reserve-page-head .pill{display:none}
  .reserve-page-head h1{font-size:1.55rem;margin:0}
  .reserve-form{gap:10px}
  .reserve-form .reserve-controls-row,
  .reserve-form #reserve-steps{width:calc(100% + 28px);margin-inline:-14px}
  .reserve-form>.top-gap{margin-top:0}
  .reserve-controls-row{
    display:grid;
    grid-template-columns:minmax(142px,156px) minmax(0,1fr) auto;
    gap:8px;
    align-items:end;
  }
  .reserve-controls-row .reserve-cell{min-width:0;flex:initial;gap:4px}
  .reserve-controls-row .reserve-cell-label{display:none}
  .reserve-advanced-slot .reserve-cell-label{display:block;font-size:.82rem;color:var(--muted);margin-bottom:2px}
  .reserve-controls-row .date-range-trigger,
  .reserve-controls-row .time-range-wrap,
  .reserve-controls-row .mode-toggle{height:42px;width:100%}
  .reserve-mobile-template-slot select{height:42px;width:100%}
  .reserve-controls-row .time-range-wrap{padding:0 7px;gap:5px}
  .reserve-controls-row .time-range-wrap input{font-size:.88rem;padding:0 4px;min-height:38px}
  .reserve-time-cell{grid-column:1 / 3}
  .reserve-cell-toggle{grid-column:3;align-self:end}
  .reserve-cell-toggle .mode-toggle{width:100%;white-space:nowrap}
  .reserve-cell-toggle .mode-toggle label{padding:0 10px;font-size:.82rem}
  .reserve-mobile-template-slot{display:block;min-width:0;align-self:end}
  .reserve-mobile-template-slot label{display:block;font-size:0}
  .reserve-mobile-template-slot select{min-height:42px;padding:8px 32px 8px 11px;font-size:.86rem}
  .reserve-mobile-advanced{display:block;position:relative;align-self:end}
  .reserve-advanced-toggle{
    min-width:88px;
    justify-content:center;
    height:42px;
    display:inline-flex;
    align-items:center;
    gap:5px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--panel);
    color:var(--text);
    padding:0 11px;
    font-weight:900;
    box-shadow:0 10px 22px rgba(15,23,42,.08);
  }
  .reserve-advanced-panel{
    position:fixed;
    left:12px;
    right:12px;
    top:auto;
    bottom:calc(12px + env(safe-area-inset-bottom,0px));
    z-index:80;
    width:auto;
    max-height:72dvh;
    overflow:auto;
    display:grid;
    gap:12px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:22px;
    background:var(--bg);
    box-shadow:0 22px 48px rgba(15,23,42,.22);
  }
  .reserve-advanced-panel[hidden]{display:none}
  .reserve-advanced-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
  .reserve-advanced-close{width:32px;height:32px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--text);font-size:1.1rem}
  .reserve-advanced-slot{display:grid;gap:10px}
  .reserve-advanced-slot:empty{display:none}
  .reserve-advanced-slot .reserve-basics,
  .reserve-advanced-slot .reserve-chemical-section{margin:0;padding:0;background:transparent;border:0;box-shadow:none;backdrop-filter:none}
  .reserve-advanced-slot .reserve-basics,
  .reserve-advanced-slot .reserve-chemical-section .form-grid,
  .reserve-advanced-slot .chemical-usage-row{grid-template-columns:1fr}
  .reserve-advanced-slot .reserve-chemical-section .section-head{margin-bottom:8px}
  .reserve-advanced-slot .reserve-chemical-section .section-head .muted{display:none}
  .reserve-avoid-cell{display:flex}
  #reserve-steps{gap:8px}
  .reserve-step-row{
    grid-template-columns:minmax(126px,.95fr) minmax(0,1.25fr) 96px;
    gap:8px;
    padding:10px 16px;
    border-radius:16px;
    align-items:center;
  }
  .reserve-step-row strong{grid-column:1/-1;font-size:.86rem;color:var(--muted);overflow:visible}
  .reserve-step-row .reserve-scope{grid-column:1}
  .reserve-step-row .reserve-instrument{grid-column:2}
  .reserve-step-row input[name="step_duration"]{grid-column:3}
  .reserve-step-row select,
  .reserve-step-row input{min-height:38px;padding:8px 10px;font-size:.86rem}
  .reserve-step-row input[name="step_max_gap"]{display:none}
  .reserve-step-row .reserve-location-filters{grid-column:1/-1;grid-template-columns:1fr;gap:7px;padding-top:8px}
  .reserve-form>.inline-actions:last-of-type .button.primary{width:100%;min-height:50px;font-size:1rem}
  .reserve-form>.inline-actions.top-gap .button{padding:8px 12px;font-size:.86rem}
}

/* Mobile process templates ------------------------------------------------ */
.template-create-summary{display:none}
.template-card-summary{list-style:none;cursor:pointer}
.template-card-summary::-webkit-details-marker,
.template-create-summary::-webkit-details-marker{display:none}
.template-card-meta{display:none}
.template-step-timeline{margin:12px 0 0 1.25rem}
@media (max-width: 760px){
  .template-create-card,.template-card-list+.empty-state{padding:16px}
  .template-page-head{margin-bottom:10px}
  .template-page-head .eyebrow,.template-page-head .pill{display:none}
  .template-page-head h1{font-size:1.55rem;margin:0}
  .template-create-disclosure{border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.035);overflow:hidden}
  .template-create-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 15px;font-weight:900;list-style:none;cursor:pointer}
  .template-summary-icon{width:34px;height:34px;border-radius:13px;display:grid;place-items:center;background:var(--accent);color:var(--bg);font-size:1.2rem;font-weight:900}
  .template-create-form{padding:0 14px 14px;gap:12px}
  .template-create-form>.two-col{grid-template-columns:1fr;gap:10px}
  #template-steps{gap:8px}
  #template-steps .step-card{grid-template-columns:1fr;gap:8px;padding:10px;border-radius:16px}
  #template-steps .step-card strong{font-size:.86rem;color:var(--muted)}
  #template-steps .step-card select,
  #template-steps .step-card input{min-height:38px;padding:8px 10px;font-size:.86rem}
  .template-create-form>.inline-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .template-create-form>.inline-actions .button{width:100%;justify-content:center;padding:10px 12px}
  .template-list-head{margin-bottom:10px}
  .template-list-head h2{font-size:1.15rem;margin:0}
  .template-card-list{gap:10px}
  .template-mobile-card{padding:0;border-radius:20px;overflow:hidden}
  .template-card-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;margin:0;padding:14px}
  .template-card-main{min-width:0;display:grid;gap:5px}
  .template-card-main strong,.template-card-main p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .template-card-main strong{font-size:1rem}
  .template-card-main p{margin:0;font-size:.82rem}
  .template-card-meta{display:flex;flex-wrap:wrap;gap:6px}
  .template-card-meta span{padding:5px 8px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid var(--line);font-size:.74rem;color:var(--muted);font-weight:800}
  .template-card-actions{display:flex;gap:6px;flex-wrap:nowrap}
  .template-card-actions form{margin:0}
  .template-icon-button{width:36px;height:36px;min-width:36px;padding:0;display:grid;place-items:center;border-radius:13px}
  .template-action-label{display:none}
  .template-step-timeline{display:grid;gap:8px;margin:0;padding:0 14px 14px;list-style:none}
  .template-step-timeline li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;align-items:start;padding:9px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.035)}
  .template-step-timeline li>span{width:28px;height:28px;border-radius:10px;display:grid;place-items:center;background:rgba(110,231,255,.12);color:var(--accent);font-weight:900;font-size:.78rem}
  .template-step-timeline strong,.template-step-timeline small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .template-step-timeline small{color:var(--muted);font-size:.78rem;margin-top:2px}
}

.template-step-remove{width:38px;height:38px;border:1px solid rgba(248,113,113,.42);border-radius:14px;background:rgba(248,113,113,.12);color:#f87171;font-size:1.3rem;font-weight:900;line-height:1;display:grid;place-items:center;cursor:pointer}
.template-step-remove:hover{background:rgba(248,113,113,.2);border-color:rgba(248,113,113,.65)}
#template-steps .step-card{grid-template-columns:120px 1.4fr 1fr 1fr auto;align-items:end}
#template-steps .step-card>strong{align-self:center}
#template-steps .step-card>.instrument-picker{align-self:stretch}
@media (max-width: 1080px){
  #template-steps .step-card{grid-template-columns:1fr auto}
  #template-steps .step-card strong,#template-steps .step-card select,#template-steps .step-card input{grid-column:1/-1}
  #template-steps .template-step-remove{grid-column:2;grid-row:1;justify-self:end}
}
@media (max-width: 760px){
  #template-steps .step-card{position:relative;grid-template-columns:1fr;padding-right:56px}
  #template-steps .step-card strong,#template-steps .step-card select,#template-steps .step-card input{grid-column:1}
  #template-steps .template-step-remove{position:absolute;right:10px;top:10px;width:34px;height:34px;border-radius:12px;font-size:1.15rem}
}

/* Mobile management hub --------------------------------------------------- */
@media (max-width: 760px){
  .management-mobile-hero{padding:18px;margin-bottom:10px;border-radius:22px}
  .management-mobile-hero .breadcrumb-row,
  .management-mobile-hero .eyebrow,
  .management-mobile-hero .lead{display:none}
  .management-mobile-hero h1{font-size:1.65rem;margin:0}
  .management-mobile-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:10px 0 0}
  .management-mobile-card{min-height:104px;padding:11px 8px;border-radius:18px;display:grid;align-content:center;justify-items:center;text-align:center;gap:8px}
  .management-mobile-card .folder-top{margin:0;gap:0;align-items:center;justify-content:center}
  .management-mobile-card .tag{display:none}
  .management-mobile-icon{width:40px;height:40px;border-radius:15px;font-size:1rem;background:rgba(110,231,255,.12);color:var(--accent);border:1px solid rgba(110,231,255,.22)}
  .management-mobile-card h2{font-size:.82rem;line-height:1.25;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .management-mobile-card p{display:none}
}

@media (max-width: 760px){
  .folder-grid.three-up.management-mobile-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:9px !important;
    align-items:stretch;
  }
  .folder-grid.three-up.management-mobile-grid .management-mobile-card{
    width:auto;
    min-width:0;
    min-height:104px;
    padding:11px 8px;
  }
}

/* Polished two-column mobile management console. Keep this last to override earlier launcher experiments. */
@media (max-width: 760px){
  .management-mobile-hero{
    padding:4px 2px 8px;
    margin:0 0 12px;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
  .management-mobile-hero h1{
    font-size:1.85rem;
    letter-spacing:-.04em;
  }
  .folder-grid.three-up.management-mobile-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
    margin-top:6px;
  }
  .folder-grid.three-up.management-mobile-grid .management-mobile-card{
    min-height:124px;
    padding:15px;
    border-radius:24px;
    align-content:space-between;
    justify-items:start;
    text-align:left;
    background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.03));
    border-color:rgba(255,255,255,.09);
    box-shadow:0 14px 30px rgba(0,0,0,.16);
  }
  .management-mobile-card .folder-top{
    width:100%;
    justify-content:space-between;
  }
  .management-mobile-card .tag{display:none}
  .management-mobile-icon{
    width:44px;
    height:44px;
    border-radius:17px;
    background:linear-gradient(180deg,rgba(88,166,255,.18),rgba(88,166,255,.08));
    border-color:rgba(88,166,255,.28);
    color:#78a9ff;
  }
  .management-mobile-card h2{
    font-size:1rem;
    line-height:1.2;
    letter-spacing:-.02em;
    margin:8px 0 0;
  }
  .management-mobile-card p{display:none}
}

/* Reusable management entity layout -------------------------------------- */
.management-command-hero{
  border-radius:32px;
  background:
    radial-gradient(circle at 88% 16%,rgba(110,231,255,.14),transparent 30%),
    linear-gradient(135deg,rgba(255,255,255,.88),rgba(255,255,255,.66));
}
html:not([data-resolved-theme="light"]) .management-command-hero{
  background:
    radial-gradient(circle at 88% 16%,rgba(120,169,255,.14),transparent 30%),
    linear-gradient(135deg,var(--panel),rgba(38,38,38,.72));
}
.management-action-bar{align-self:center}
.management-priority-card{
  display:none;
  width:100%;
  margin-top:14px;
  border:1px solid rgba(245,158,11,.28);
  border-radius:20px;
  background:linear-gradient(135deg,rgba(245,158,11,.14),rgba(255,255,255,.05));
  color:var(--text);
  padding:12px 14px;
  text-align:left;
  cursor:pointer;
  box-shadow:0 14px 34px rgba(245,158,11,.08);
}
.management-priority-card span:last-child{display:grid;gap:2px}
.management-priority-card small{color:var(--muted);font-weight:800}
.management-list-panel{overflow:hidden}
.management-card-grid{gap:16px}
.management-entity-card{
  border-radius:26px;
  box-shadow:0 16px 38px rgba(15,23,42,.08);
}
.management-entity-card:hover{transform:translateY(-4px)}
.management-detail-shell{max-width:1180px;margin-inline:auto}

/* ── Instrument edit: cover header ── */
.inst-edit-header{display:flex;gap:20px;align-items:flex-start;padding:24px 0 16px;flex-wrap:wrap}
.inst-edit-photo{width:80px;height:80px;border-radius:16px;overflow:hidden;flex-shrink:0;background:var(--panel)}
.inst-edit-photo img{width:100%;height:100%;object-fit:cover}
.inst-edit-photo .equipment-result-photo-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:1.4rem;font-weight:700;color:var(--muted)}
.inst-edit-title{flex:1 1 0;min-width:180px}
.inst-edit-title h2{margin:0 0 2px;font-size:1.25rem}
.inst-edit-title .muted{margin:0 0 8px;font-size:.86rem}
.inst-edit-chips{display:flex;gap:6px;flex-wrap:wrap}
.inst-edit-actions{display:flex;gap:8px;align-items:center;flex-shrink:0;margin-left:auto}

/* ── Lab top-level tabs ── */
.lab-top-tabs .button{width:auto;flex:0 0 auto}

/* ── Instrument edit: tabs ── */
.inst-edit-tabs{margin-bottom:8px;position:sticky;top:0;z-index:5;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.inst-tab-panel{padding:8px 0 24px}
.inst-tab-panel h3{margin:0 0 12px;font-size:1.05rem}
.section-divider{border:none;border-top:1px solid var(--line);margin:28px 0 20px}

@media(max-width:760px){
  .inst-edit-header{gap:14px;padding:16px 0 12px}
  .inst-edit-photo{width:56px;height:56px;border-radius:12px}
  .inst-edit-actions{width:100%;justify-content:flex-end}
  .inst-edit-tabs{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .inst-edit-tabs .tab-item{flex:0 0 auto;white-space:nowrap}
}
.management-detail-cover{
  border-radius:30px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.82),rgba(255,255,255,.56)),
    radial-gradient(circle at 82% 18%,rgba(14,165,233,.16),transparent 34%);
}
html:not([data-resolved-theme="light"]) .management-detail-cover{
  background:
    linear-gradient(135deg,var(--panel),rgba(38,38,38,.76)),
    radial-gradient(circle at 82% 18%,rgba(120,169,255,.13),transparent 34%);
}
.management-accordion-section{
  border-radius:24px;
  border:1px solid var(--line);
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}

@media (max-width: 760px){
  .management-command-hero{
    padding:20px;
    border-radius:26px;
    margin-bottom:14px;
  }
  .management-command-hero .section-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:14px;
    align-items:start;
  }
  .management-command-hero .breadcrumb-row,
  .management-command-hero .eyebrow,
  .management-command-hero .lead{display:none}
  .management-command-hero h1{
    margin:0;
    font-size:clamp(2rem,10vw,3rem);
    line-height:.98;
    letter-spacing:-.07em;
  }
  .management-action-bar,
  .equipment-command-bar.management-action-bar{
    width:auto;
    justify-content:flex-end;
    flex-wrap:nowrap;
    gap:8px;
  }
  .management-action-bar .equipment-tool-button{
    width:46px;
    height:46px;
    border-radius:18px;
  }
  .management-priority-card{
    display:grid;
    grid-template-columns:40px minmax(0,1fr);
    align-items:center;
    gap:10px;
  }
  .equipment-tool-panel{
    position:fixed;
    left:16px;
    right:16px;
    top:96px;
    width:auto;
    max-height:calc(100dvh - 128px);
    overflow:auto;
    z-index:2100;
    border-radius:24px;
  }
  .create-instrument-panel{max-height:calc(100dvh - 128px)}
  .management-list-panel{
    padding:16px;
    border-radius:26px;
  }
  .management-list-panel>.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:12px;
  }
  .management-list-panel>.section-head h2{font-size:1.25rem;margin:0}
  .management-list-panel>.section-head .muted{display:none}
  .equipment-result-grid.management-card-grid,
  .equipment-manage-grid.management-card-grid{
    grid-template-columns:1fr !important;
    gap:10px;
  }
  .equipment-result-card.management-entity-card{
    display:grid;
    grid-template-columns:92px minmax(0,1fr);
    min-height:0;
    border-radius:22px;
    overflow:hidden;
  }
  .management-entity-card .equipment-result-photo{
    height:100%;
    min-height:112px;
    border-radius:0;
  }
  .management-entity-card .equipment-result-body{
    padding:12px;
    gap:8px;
  }
  .management-entity-card .equipment-card-name{
    font-size:1rem;
    line-height:1.2;
  }
  .management-entity-card .equipment-card-location{
    font-size:.78rem;
    line-height:1.35;
  }
  .management-entity-card .equipment-card-meta-row{
    gap:6px;
  }
  .management-entity-card .equipment-card-approval{
    padding:5px 7px;
    font-size:.68rem;
  }
  .management-entity-card .equipment-card-price-box{display:none}
  .equipment-card-floating-status{
    left:7px;
    top:7px;
    padding:4px 7px;
    font-size:.66rem;
  }
  .management-detail-shell{
    margin-top:14px;
    gap:12px;
  }
  .equipment-editor-cover.management-detail-cover{
    grid-template-columns:82px minmax(0,1fr);
    gap:12px;
    padding:14px;
    border-radius:24px;
  }
  .management-detail-cover .equipment-editor-photo{
    height:82px;
    border-radius:18px;
  }
  .management-detail-cover .equipment-editor-title h2{
    font-size:1.28rem;
    margin:2px 0 4px;
  }
  .management-detail-cover .equipment-editor-title .eyebrow{display:none}
  .management-detail-cover .equipment-editor-title .muted{
    font-size:.78rem;
    line-height:1.35;
  }
  .management-detail-cover .equipment-editor-chips{
    margin-top:8px;
    gap:6px;
  }
  .management-detail-cover .equipment-editor-chips span{
    padding:5px 7px;
    font-size:.68rem;
  }
  .equipment-editor-quick{
    grid-column:1/-1;
    display:flex;
    justify-content:flex-end;
    gap:8px;
  }
  .equipment-editor-quick .equipment-tool-button{
    width:42px;
    height:42px;
    border-radius:16px;
  }
  .equipment-editor-accordion{gap:10px;max-width:none}
  .management-accordion-section{
    border-radius:20px;
    box-shadow:none;
  }
  .equipment-dock-panel>summary{
    min-height:54px;
    padding:13px 14px;
    gap:10px;
  }
  .equipment-dock-panel>summary strong{font-size:.96rem}
  .equipment-dock-panel>form,
  .equipment-dock-panel>.toolbar-bar,
  .equipment-dock-panel>.people-chip-list,
  .equipment-dock-panel>.list-stack,
  .equipment-dock-panel>.equipment-designed-form{margin:12px}
  .equipment-form-section{border-radius:16px}
  .equipment-form-section>summary{padding:12px}
  .equipment-form-section>.form-grid{padding:12px}
}

/* Instrument management mobile alignment pass ---------------------------- */
@media (max-width: 760px){
  .management-list-panel{
    padding:18px 16px 16px;
  }
  .management-list-panel>.section-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    text-align:left;
    margin-bottom:16px;
  }
  .management-list-panel>.section-head>div{
    min-width:0;
  }
  .management-list-panel>.section-head h2{
    font-size:1.35rem;
    letter-spacing:-.04em;
  }
  .management-list-panel>.section-head .pill{
    justify-self:end;
    min-width:0;
    height:34px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    white-space:nowrap;
  }
  .equipment-result-grid.management-card-grid,
  .equipment-manage-grid.management-card-grid{
    gap:12px;
  }
  .equipment-result-card.management-entity-card{
    display:grid !important;
    grid-template-columns:104px minmax(0,1fr);
    height:118px;
    min-height:118px;
    border-radius:22px;
    overflow:hidden;
    align-items:stretch;
    background:rgba(255,255,255,.045);
  }
  html:not([data-resolved-theme="light"]) .equipment-result-card.management-entity-card{
    background:#262626;
  }
  .management-entity-card .equipment-result-photo{
    width:104px;
    height:118px;
    min-height:118px;
    aspect-ratio:auto;
    border-radius:0;
  }
  .management-entity-card .equipment-result-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
  }
  .management-entity-card .equipment-result-photo-placeholder{
    font-size:1.05rem;
  }
  .management-entity-card .equipment-result-body{
    min-width:0;
    height:118px;
    padding:12px 12px 11px;
    display:grid;
    grid-template-rows:auto 1fr auto;
    gap:6px;
    align-content:stretch;
  }
  .equipment-result-card.management-entity-card .equipment-card-name{
    min-height:0;
    font-size:1.08rem;
    line-height:1.18;
    -webkit-line-clamp:1;
    white-space:normal;
  }
  .equipment-result-card.management-entity-card .equipment-card-location{
    min-height:0;
    align-self:center;
    font-size:.78rem;
    line-height:1.3;
    color:var(--muted);
    -webkit-line-clamp:2;
  }
  .management-entity-card .equipment-card-meta-row{
    margin-top:0;
    display:flex;
    flex-wrap:nowrap;
    gap:6px;
    overflow:hidden;
  }
  .management-entity-card .equipment-card-approval{
    flex:0 1 auto;
    max-width:50%;
    padding:4px 7px;
    font-size:.66rem;
    line-height:1.1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .equipment-card-floating-status{
    left:8px;
    top:8px;
    padding:5px 8px;
    font-size:.68rem;
  }
}

/* People management layout aligned with instrument management ------------- */
.people-management-list-panel{
  border-radius:30px;
}
.people-board-head{margin-bottom:18px}
.people-board{gap:18px}
.people-group-section{
  padding:18px;
  border:1px solid var(--line);
  border-radius:24px;
  background:rgba(255,255,255,.035);
}
html:not([data-resolved-theme="light"]) .people-group-section{
  background:#262626;
}
.people-group-divider{display:none}
.people-group-heading{
  align-items:center;
  margin-bottom:14px;
}
.people-group-heading h3{
  font-size:1.2rem;
  letter-spacing:-.03em;
}
.people-card-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.pi-card-grid{
  grid-template-columns:repeat(2,minmax(0,360px));
}
.people-manage-card.management-person-card{
  min-height:118px;
  border-radius:24px;
  background:var(--panel,rgba(255,255,255,.05));
  box-shadow:0 14px 32px rgba(15,23,42,.07);
}
.people-manage-card.management-person-card[open]{z-index:40}
.people-card-summary{
  min-height:118px;
}
.people-card-avatar{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
.people-card-role{
  max-width:92px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width: 760px){
  .people-management-card.management-command-hero h1{
    font-size:clamp(2rem,10vw,3rem);
  }
  .people-command-bar.management-action-bar{
    width:auto;
    justify-content:flex-end;
    flex-wrap:nowrap;
  }
  .people-management-list-panel{
    padding:16px;
    border-radius:26px;
  }
  .people-board-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    margin-bottom:14px;
  }
  .people-board-head h2{
    margin:0;
    font-size:1.35rem;
    letter-spacing:-.04em;
  }
  .people-board-head .muted{display:none}
  .people-board-head .pill{
    justify-self:end;
    height:34px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    white-space:nowrap;
  }
  .people-board{gap:12px}
  .people-group-section{
    padding:14px;
    border-radius:22px;
  }
  .people-group-heading{
    margin-bottom:10px;
    gap:10px;
  }
  .people-group-heading h3{
    margin:2px 0 0;
    font-size:1.02rem;
  }
  .people-group-heading .muted{display:none}
  .people-card-grid,
  .pi-card-grid{
    grid-template-columns:1fr;
    gap:10px;
  }
  .people-manage-card.management-person-card{
    min-height:104px;
    border-radius:22px;
    overflow:visible;
  }
  .people-card-summary{
    grid-template-columns:68px minmax(0,1fr) auto;
    min-height:104px;
    gap:12px;
    padding:12px;
  }
  .people-card-avatar{
    width:68px;
    height:68px;
    border-radius:18px;
  }
  .people-card-body{gap:3px}
  .people-card-body strong{
    font-size:1.02rem;
    line-height:1.2;
  }
  .people-card-body span,
  .people-card-body small{
    font-size:.78rem;
    line-height:1.25;
  }
  .people-card-role{
    max-width:66px;
    padding:5px 7px;
    font-size:.66rem;
  }
  .people-card-panel{
    position:static;
    width:auto;
    margin:0 10px 10px;
    padding:12px;
    border-radius:18px;
    box-shadow:none;
  }
  .people-create-panel{
    position:fixed;
    left:16px;
    right:16px;
    top:96px;
    width:auto;
    max-height:calc(100dvh - 128px);
    overflow:auto;
    z-index:2100;
  }
}

/* Compact lab discovery hero: reduce only the top intro area. */
.directory-compact-hero{
  padding-top:20px;
  padding-bottom:22px;
}
.directory-compact-hero .section-head{
  margin-bottom:14px;
}
.directory-compact-hero .page-title{
  margin-bottom:0;
}
@media (max-width: 760px){
  .directory-compact-hero{
    padding-top:16px;
    padding-bottom:18px;
  }
  .directory-compact-hero .section-head{
    margin-bottom:12px;
  }
}

/* Mobile lab public profile redesign ------------------------------------- */
@media (max-width: 760px){
  .lab-template-shell{
    gap:14px;
  }
  .lab-template-shell .glass-card{
    border-radius:24px;
  }
  .lab-template-shell .lab-hero-panel{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
    padding:18px;
    border-radius:28px;
  }
  .lab-hero-copy.lab-copy-stack{
    gap:10px;
  }
  .lab-hero-customizable .breadcrumb-row,
  .lab-hero-customizable .eyebrow{
    display:none;
  }
  .lab-hero-copy h1,
  .lab-hero-customizable .lab-hero-copy h1{
    margin:0;
    font-size:clamp(2.2rem,12vw,4rem);
    line-height:.96;
    letter-spacing:-.08em;
    color:var(--lab-hero-light-title-color,var(--text));
    text-shadow:none;
  }
  html:not([data-resolved-theme="light"]) .lab-hero-customizable .lab-hero-copy h1{
    color:var(--lab-hero-text-color,#fff);
  }
  .lab-template-shell .lab-affiliation-row{
    display:flex;
    flex-wrap:nowrap;
    gap:7px;
    overflow-x:auto;
    padding:2px 0 4px;
    scrollbar-width:none;
  }
  .lab-template-shell .lab-affiliation-row::-webkit-scrollbar{display:none}
  .lab-template-shell .lab-affiliation-row a,
  .lab-template-shell .lab-affiliation-row span{
    flex:0 0 auto;
    padding:7px 10px;
    font-size:.76rem;
    max-width:170px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .lab-hero-visual{
    order:2;
    gap:10px;
  }
  .lab-copy-stack .lab-overview-box{
    order:3;
  }
  .lab-template-shell .lab-image-frame{
    min-height:0;
    height:210px;
    border-radius:22px;
  }
  .lab-template-shell .lab-image-frame img{
    width:100%;
    height:100%;
    object-fit:cover;
  }
  .lab-template-shell .metric-grid.tight-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
  }
  .lab-template-shell .metric-card{
    min-width:0;
    padding:10px 8px;
    border-radius:16px;
    font-size:.68rem;
    line-height:1.2;
    text-align:center;
  }
  .lab-template-shell .metric-card span{
    margin:0 0 3px;
    font-size:1.05rem;
    line-height:1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .lab-template-shell .big-copy-box{
    padding:13px 14px;
    border-radius:18px;
    font-size:.88rem;
    line-height:1.55;
    overflow:hidden;
    word-break:break-word;
  }
  .lab-template-shell .hero-actions{
    order:4;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
    margin:2px 0 0;
  }
  .lab-template-shell .hero-actions .button{
    width:100%;
    min-height:42px;
    padding:10px 12px;
    justify-content:center;
    font-size:.86rem;
    box-shadow:none;
  }
  .profile-showcase{
    padding:16px;
  }
  .profile-showcase>.section-head,
  #team>.section-head,
  .lab-template-shell .glass-card>.section-head{
    margin-bottom:12px;
  }
  .profile-showcase>.section-head h2,
  #team>.section-head h2,
  .lab-template-shell .glass-card>.section-head h2{
    font-size:1.28rem;
    margin:0;
  }
  .pi-layout{
    grid-template-columns:1fr;
    gap:12px;
  }
  .portrait-block{
    position:static;
    display:grid;
    grid-template-columns:78px minmax(0,1fr);
    gap:12px;
    align-items:center;
    padding:12px;
    border-radius:20px;
  }
  .portrait-image{
    width:78px;
    height:78px;
    aspect-ratio:auto;
    border-radius:18px;
  }
  .portrait-meta{
    padding:0;
  }
  .portrait-meta strong{
    font-size:1.02rem;
  }
  .portrait-meta span{
    font-size:.82rem;
  }
  .pi-content-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }
  .profile-note{
    padding:13px 14px;
    border-radius:18px;
  }
  .profile-note h3{
    margin-bottom:6px;
    font-size:.95rem;
  }
  .profile-note p{
    font-size:.86rem;
    line-height:1.55;
    word-break:break-word;
  }
  #team{
    padding:16px;
  }
  #team>.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }
  #team>.section-head .pill{
    padding:7px 10px;
    font-size:.74rem;
    white-space:nowrap;
  }
  .member-group-stack{
    gap:12px;
  }
  .member-group-section{
    padding:13px;
    border-radius:20px;
  }
  .member-group-intro{
    margin-bottom:10px;
  }
  .member-group-intro h3{
    margin-bottom:2px;
    font-size:1rem;
  }
  .member-group-intro p{
    display:none;
  }
  .member-compact-grid{
    grid-template-columns:1fr;
    gap:9px;
  }
  .compact-member-card{
    grid-template-columns:58px minmax(0,1fr);
    column-gap:10px;
    min-height:82px;
    border-radius:18px;
  }
  .compact-member-card .member-photo{
    width:58px;
    height:58px;
    border-radius:50%;
    margin:12px 0 12px 12px;
  }
  .compact-member-card .member-body{
    min-width:0;
    padding:12px 12px 12px 0;
  }
  .member-body h3{
    margin:0 0 2px;
    font-size:1rem;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .member-role{
    margin:0;
    font-size:.78rem;
  }
  .member-summary,
  .contact-stack{
    display:none;
  }
  .gallery-card{
    border-radius:22px;
  }
  .gallery-card img{
    height:170px;
  }
  .gallery-card p{
    padding:13px 14px 0;
    font-size:.86rem;
    line-height:1.55;
    word-break:break-word;
  }
  .space-card-body{
    padding:0 14px 14px;
    gap:10px;
  }
  .space-map-preview iframe{
    height:128px;
    border-radius:16px;
  }
  .space-map-preview span{
    padding:8px 12px;
    font-size:.82rem;
  }
  .space-row{grid-template-columns:1fr;gap:12px;padding:0 14px 14px}
  .space-photo{aspect-ratio:4/3}
  .space-map iframe{aspect-ratio:4/3}
  .space-map span{padding:8px 12px;font-size:.82rem}
  .space-desc{padding:0 14px;font-size:.86rem}
}

/* Mobile lab hero v2: cover-card composition ----------------------------- */
@media (max-width: 760px){
  .lab-template-shell .lab-hero-panel{
    position:relative;
    padding:0;
    gap:0;
    overflow:hidden;
    border-radius:30px;
    background:var(--panel);
  }
  .lab-template-shell .lab-hero-visual{
    order:1;
    display:grid;
    gap:0;
  }
  .lab-template-shell .lab-image-frame{
    height:255px;
    border:0;
    border-radius:0;
    background:rgba(0,0,0,.08);
  }
  .lab-template-shell .lab-image-frame::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:linear-gradient(180deg,rgba(0,0,0,.05) 0%,rgba(0,0,0,.08) 48%,rgba(0,0,0,.48) 100%);
  }
  .lab-template-shell .lab-hero-copy{
    order:2;
    position:relative;
    z-index:2;
    margin:-38px 12px 12px;
    padding:18px 16px 16px;
    border:1px solid var(--line);
    border-radius:26px;
    background:rgba(255,255,255,.88);
    color:var(--text);
    box-shadow:0 18px 38px rgba(15,23,42,.14);
    backdrop-filter:blur(18px);
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .lab-hero-copy{
    background:rgba(38,38,38,.9);
    box-shadow:0 18px 38px rgba(0,0,0,.28);
  }
  .lab-hero-copy h1,
  .lab-hero-customizable .lab-hero-copy h1{
    font-size:clamp(2rem,11vw,3.45rem);
    color:var(--text);
  }
  html:not([data-resolved-theme="light"]) .lab-hero-customizable .lab-hero-copy h1{
    color:var(--text);
  }
  .lab-template-shell .lab-affiliation-row a,
  .lab-template-shell .lab-affiliation-row span{
    color:var(--text);
    text-shadow:none;
    background:rgba(15,23,42,.055);
    border-color:rgba(15,23,42,.08);
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .lab-affiliation-row a,
  html:not([data-resolved-theme="light"]) .lab-template-shell .lab-affiliation-row span{
    color:var(--text);
    background:rgba(255,255,255,.07);
    border-color:rgba(255,255,255,.1);
  }
  .lab-template-shell .big-copy-box{
    background:rgba(15,23,42,.045);
    border-color:rgba(15,23,42,.08);
    color:var(--muted);
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .big-copy-box{
    background:rgba(255,255,255,.055);
    border-color:rgba(255,255,255,.08);
    color:var(--muted);
  }
  .lab-template-shell .hero-actions{
    grid-template-columns:1fr 1fr;
  }
  .lab-template-shell .hero-actions .button,
  .lab-hero-customizable .hero-actions .button{
    color:var(--text);
    text-shadow:none;
    background:rgba(15,23,42,.055);
    border-color:rgba(15,23,42,.08);
  }
  .lab-template-shell .hero-actions .button.primary:first-child,
  .lab-hero-customizable .hero-actions .button.primary:first-child{
    color:#fff;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    border-color:transparent;
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .hero-actions .button,
  html:not([data-resolved-theme="light"]) .lab-hero-customizable .hero-actions .button{
    color:var(--text);
    background:rgba(255,255,255,.07);
    border-color:rgba(255,255,255,.1);
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .hero-actions .button.primary:first-child,
  html:not([data-resolved-theme="light"]) .lab-hero-customizable .hero-actions .button.primary:first-child{
    color:#fff;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
  }
  .lab-template-shell .metric-grid.tight-grid{
    order:3;
    margin:0 12px 12px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:22px;
    background:rgba(255,255,255,.62);
    backdrop-filter:blur(14px);
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .metric-grid.tight-grid{
    background:rgba(38,38,38,.72);
  }
  .lab-template-shell .metric-card,
  .lab-hero-customizable .metric-card{
    background:transparent;
    border:0;
    box-shadow:none;
    color:var(--text);
    text-shadow:none;
    backdrop-filter:none;
  }
  .lab-template-shell .metric-card span,
  .lab-hero-customizable .metric-card span{
    color:var(--text);
    text-shadow:none;
  }
}

/* Mobile lab hero v3: space showcase, no overlap ------------------------- */
@media (max-width: 760px){
  .lab-template-shell .lab-hero-panel{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
    padding:12px;
    overflow:visible;
    border-radius:30px;
    background:transparent;
    border:0;
    box-shadow:none;
  }
  html[data-resolved-theme="light"] .lab-template-shell .lab-hero-panel,
  html:not([data-resolved-theme="light"]) .lab-template-shell .lab-hero-panel{
    background:transparent;
  }
  .lab-template-shell .lab-hero-visual{
    display:contents;
  }
  .lab-template-shell .lab-image-frame{
    order:1;
    position:relative;
    height:300px;
    min-height:0;
    border:1px solid var(--line);
    border-radius:30px;
    overflow:hidden;
    box-shadow:0 18px 40px rgba(15,23,42,.14);
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .lab-image-frame{
    box-shadow:0 18px 42px rgba(0,0,0,.32);
  }
  .lab-template-shell .lab-image-frame::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:linear-gradient(180deg,rgba(0,0,0,0) 50%,rgba(0,0,0,.24) 100%);
  }
  .lab-template-shell .lab-hero-copy{
    order:2;
    margin:0;
    padding:18px 16px;
    border:1px solid var(--line);
    border-radius:28px;
    background:var(--panel);
    color:var(--text);
    box-shadow:0 12px 28px rgba(15,23,42,.08);
    backdrop-filter:none;
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .lab-hero-copy{
    background:#262626;
    box-shadow:none;
  }
  .lab-hero-copy h1,
  .lab-hero-customizable .lab-hero-copy h1{
    margin:0;
    max-width:10ch;
    font-size:clamp(2.05rem,10vw,3.25rem);
    line-height:1.02;
    letter-spacing:-.07em;
    color:var(--text);
    text-shadow:none;
  }
  .lab-template-shell .lab-affiliation-row{
    margin-top:2px;
    padding:0 0 3px;
  }
  .lab-template-shell .lab-affiliation-row a,
  .lab-template-shell .lab-affiliation-row span{
    padding:7px 10px;
    border-radius:999px;
    background:var(--panel-2,rgba(15,23,42,.055));
    border:1px solid var(--line);
    color:var(--text);
    text-shadow:none;
  }
  .lab-template-shell .big-copy-box{
    margin-top:2px;
    padding:13px 14px;
    border-radius:20px;
    background:var(--panel-2,rgba(15,23,42,.045));
    border:1px solid var(--line);
    color:var(--muted);
    font-size:.88rem;
    line-height:1.6;
    word-break:break-word;
  }
  .lab-template-shell .hero-actions{
    margin-top:2px;
    grid-template-columns:1fr 1fr;
    gap:9px;
  }
  .lab-template-shell .hero-actions .button,
  .lab-hero-customizable .hero-actions .button{
    min-height:42px;
    padding:10px 12px;
    border-radius:16px;
    background:var(--panel-2,rgba(15,23,42,.055));
    border:1px solid var(--line);
    color:var(--text);
    box-shadow:none;
    text-shadow:none;
  }
  .lab-template-shell .hero-actions .button.primary:first-child,
  .lab-hero-customizable .hero-actions .button.primary:first-child{
    background:var(--text);
    border-color:var(--text);
    color:var(--bg);
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .hero-actions .button.primary:first-child,
  html:not([data-resolved-theme="light"]) .lab-hero-customizable .hero-actions .button.primary:first-child{
    background:#f4f4f4;
    border-color:#f4f4f4;
    color:#161616;
  }
  .lab-template-shell .metric-grid.tight-grid{
    order:3;
    margin:0;
    padding:0;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    border:0;
    background:transparent;
    backdrop-filter:none;
  }
  .lab-template-shell .metric-card,
  .lab-hero-customizable .metric-card{
    min-height:66px;
    display:grid;
    place-items:center;
    align-content:center;
    padding:9px 6px;
    border:1px solid var(--line);
    border-radius:18px;
    background:var(--panel);
    color:var(--text);
  }
  html:not([data-resolved-theme="light"]) .lab-template-shell .metric-card,
  html:not([data-resolved-theme="light"]) .lab-hero-customizable .metric-card{
    background:#262626;
  }
  .lab-template-shell .metric-card span,
  .lab-hero-customizable .metric-card span{
    max-width:100%;
    font-size:1.08rem;
    font-weight:900;
    color:var(--text);
  }
}

/* Mobile lab hero v4: text first, no CTA or metrics ---------------------- */
@media (max-width: 760px){
  .lab-template-shell .lab-hero-copy{
    order:1;
    margin:0;
  }
  .lab-template-shell .lab-image-frame{
    order:2;
  }
  .lab-template-shell .metric-grid.tight-grid{
    display:none;
  }
  .lab-template-shell .hero-actions{
    display:none;
  }
}

/* Mobile lab team alignment fixes ---------------------------------------- */
@media (max-width: 760px){
  #team{
    position:relative;
  }
  #team>.section-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    text-align:left;
  }
  #team>.section-head>div{
    min-width:0;
    justify-self:start;
    text-align:left;
  }
  #team>.section-head .eyebrow,
  #team>.section-head h2{
    text-align:left;
  }
  #team>.section-head .pill{
    justify-self:end;
    align-self:start;
    margin-top:0;
  }
  .compact-member-card{
    grid-template-columns:70px minmax(0,1fr);
    column-gap:14px;
  }
  .compact-member-card .member-photo{
    width:58px;
    height:58px;
    margin:12px 0 12px 10px;
    justify-self:start;
  }
  .compact-member-card .member-body{
    padding:12px 12px 12px 0;
  }
}

/* Mobile lab hero title width fix ---------------------------------------- */
@media (max-width: 760px){
  .lab-hero-copy h1,
  .lab-hero-customizable .lab-hero-copy h1{
    max-width:none;
    width:100%;
    font-size:clamp(2.05rem,9.2vw,3.1rem);
    letter-spacing:-.09em;
    word-break:keep-all;
    overflow-wrap:normal;
  }
}

/* Mobile lab hero width alignment ---------------------------------------- */
@media (max-width: 760px){
  .lab-template-shell .lab-hero-panel{
    padding-left:0;
    padding-right:0;
  }
  .lab-template-shell .lab-hero-copy,
  .lab-template-shell .lab-image-frame{
    width:100%;
  }
}

/* Mobile research hub calendar controls pass ----------------------------- */
@media (max-width: 760px){
  .research-section-head{
    grid-template-columns:auto auto minmax(0,1fr);
    column-gap:7px;
    row-gap:10px;
  }
  .research-head-month-form{
    grid-column:1 / -1;
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) 64px;
    gap:10px;
    justify-self:stretch;
    align-items:stretch;
  }
  .research-head-month-form>a.button{
    display:none;
  }
  .research-head-month-form label{
    min-width:0;
  }
  .research-head-month-form input[type="month"]{
    width:100%;
    min-width:0;
    height:42px;
    min-height:42px;
  }
  .research-head-month-form button{
    width:64px;
    min-width:0;
    height:42px;
    min-height:42px;
    padding:0;
    justify-self:end;
  }
  .research-filter-bar{
    grid-template-columns:minmax(0,1fr) 50px 58px;
    gap:6px;
  }
  .research-filter-details summary::before{
    content:"篩選";
    font-size:.72rem;
  }
  .research-filter-details summary{
    width:50px;
  }
  .research-search-submit{
    width:58px;
  }
  .research-calendar .event-pill{
    max-width:calc(100% - 8px);
    padding:2px 4px;
    line-height:1.16;
    white-space:normal;
  }
  .research-calendar .event-pill span{
    display:block;
    max-width:100%;
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    word-break:break-word;
  }
  .research-calendar .event-pill strong,
  .research-calendar .event-pill small{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .research-calendar .event-stack{
    min-width:0;
  }
}
@media (max-width: 420px){
  .research-section-head{
    grid-template-columns:auto auto minmax(0,1fr);
  }
  .research-head-month-form{
    grid-template-columns:minmax(0,1fr) 58px;
  }
  .research-head-month-form button{
    width:58px;
    font-size:.72rem;
  }
}

/* Mobile research hub top row refinement --------------------------------- */
@media (max-width: 760px){
  .research-section-head{
    grid-template-columns:max-content max-content minmax(0,1fr);
    align-items:center;
    column-gap:6px;
    row-gap:8px;
  }
  .research-head-month-form{
    grid-column:3;
    grid-row:1;
    display:grid;
    grid-template-columns:minmax(0,1fr) 54px;
    gap:5px;
    width:100%;
    min-width:0;
    justify-self:stretch;
    justify-content:end;
  }
  .research-head-month-form label{
    min-width:0;
  }
  .research-head-month-form input[type="month"]{
    width:100%;
    min-width:0;
    height:36px;
    min-height:36px;
    padding:0 6px;
    font-size:.78rem;
  }
  .research-head-month-form button{
    width:54px;
    height:36px;
    min-height:36px;
    padding:0;
    font-size:.72rem;
    justify-self:end;
  }
  .research-filter-details summary{
    font-size:.72rem;
  }
  .research-filter-details summary span{
    display:inline;
  }
  .research-filter-details summary::before{
    content:none;
  }
}
@media (max-width: 420px){
  .research-section-head{
    grid-template-columns:max-content max-content minmax(0,1fr);
    column-gap:5px;
  }
  .research-section-head h2{
    font-size:.9rem;
  }
  .research-view-actions .button{
    padding:5px 6px;
    font-size:.66rem;
  }
  .research-head-month-form{
    grid-template-columns:minmax(0,1fr) 50px;
    gap:4px;
  }
  .research-head-month-form input[type="month"]{
    font-size:.7rem;
    padding:0 4px;
  }
  .research-head-month-form button{
    width:50px;
    font-size:.66rem;
  }
}

/* Keep mobile research filter label horizontal --------------------------- */
@media (max-width: 760px){
  .research-filter-details summary,
  .research-filter-details summary span{
    writing-mode:horizontal-tb;
    text-orientation:mixed;
    white-space:nowrap;
    word-break:keep-all;
  }
  .research-filter-details summary{
    width:58px;
  }
}

/* Mobile research list auto-booking row breathing room ------------------- */
@media (max-width: 760px){
  .data-table td:first-child{
    min-width:150px;
  }
  .data-table td:first-child strong,
  .data-table td:first-child a{
    white-space:normal;
    word-break:break-word;
    line-height:1.25;
  }
  .data-table td:first-child .status-chip.auto_pending{
    display:inline-flex;
    width:max-content;
    max-width:100%;
    margin-top:8px;
    white-space:nowrap;
  }
  .data-table tbody tr:has(.status-chip.auto_pending) td{
    padding-top:18px;
    padding-bottom:18px;
    vertical-align:top;
  }
}

/* Research list auto-booking rows need breathing room on all screens ------ */
.data-table tbody tr:has(.status-chip.auto_pending) td{
  padding-top:20px;
  padding-bottom:20px;
  vertical-align:top;
}
.data-table td:first-child .status-chip.auto_pending{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  margin-top:8px;
  white-space:nowrap;
}

/* Give the mobile month picker enough room so the Go button never overlaps. */
@media (max-width: 760px){
  .research-head-month-form{
    grid-template-columns:minmax(112px,1fr) 58px;
    gap:10px;
  }
  .research-head-month-form button{
    width:58px;
    justify-self:end;
  }
  .research-filter-details summary span::before{
    content:"篩選";
  }
}
@media (max-width: 420px){
  .research-head-month-form{
    grid-template-columns:minmax(104px,1fr) 54px;
    gap:8px;
  }
  .research-head-month-form button{
    width:54px;
  }
}

/* Keep the Research Hub mobile filter inside the viewport. */
@media (max-width: 760px){
  .research-filter-details[open] .research-filter-panel{
    position:absolute;
    left:auto;
    right:0;
    top:calc(100% + 8px);
    bottom:auto;
    z-index:72;
    width:min(calc(100vw - 32px),360px);
    max-width:calc(100vw - 32px);
    max-height:min(58dvh,360px);
    overflow:auto;
    box-sizing:border-box;
    grid-template-columns:1fr;
    gap:10px;
    padding:14px;
    border-radius:20px;
    box-shadow:0 24px 64px rgba(0,0,0,.36);
  }
  .research-filter-details summary span{
    font-size:0;
  }
  .research-filter-details summary span::before{
    content:"篩選";
    font-size:.78rem;
  }
  .research-filter-details[open]::before{content:none}
}

/* Final mobile Research Hub header/filter alignment ---------------------- */
@media (max-width: 760px){
  .research-section-head{
    grid-template-columns:max-content max-content minmax(128px,1fr) 58px;
    align-items:center;
    column-gap:6px;
    row-gap:10px;
  }
  .research-section-head > div:first-child{
    grid-column:1;
    grid-row:1;
  }
  .research-view-actions{
    grid-column:2;
    grid-row:1;
    min-width:0;
  }
  .research-head-month-form{
    grid-column:3 / 5;
    grid-row:1;
    display:grid;
    grid-template-columns:minmax(118px,1fr) 58px;
    gap:10px;
    width:100%;
    min-width:0;
    justify-self:stretch;
    align-items:center;
  }
  .research-head-month-form label,
  .research-head-month-form input[type="month"]{
    min-width:0;
    width:100%;
  }
  .research-head-month-form button{
    width:58px;
    justify-self:end;
  }
  .research-status-tabs{
    grid-column:1 / -1;
    grid-row:2;
  }
  .research-filter-details[open] .research-filter-panel{
    width:min(300px,calc(100vw - 64px));
    max-width:calc(100vw - 64px);
    right:0;
  }
  .research-filter-details summary span::before{
    content:"\7BE9\9078";
  }
}
@media (max-width: 420px){
  .research-section-head{
    grid-template-columns:max-content max-content minmax(104px,1fr) 52px;
    column-gap:4px;
  }
  .research-section-head h2{
    font-size:.86rem;
  }
  .research-view-actions .button{
    padding:5px 5px;
    font-size:.62rem;
  }
  .research-head-month-form{
    grid-template-columns:minmax(98px,1fr) 52px;
    gap:7px;
  }
  .research-head-month-form input[type="month"]{
    font-size:.68rem;
    padding:0 4px;
  }
  .research-head-month-form button{
    width:52px;
    font-size:.64rem;
  }
  .research-filter-details[open] .research-filter-panel{
    width:min(280px,calc(100vw - 56px));
    max-width:calc(100vw - 56px);
  }
}

/* Desktop header: keep the dropdown navigation centered on every page. */
@media (min-width: 761px){
  .nav-shell,
  .nav-refined{
    display:flex;
    position:relative;
    align-items:center;
    justify-content:space-between;
    gap:18px;
  }
  .brand-wrap{
    flex:0 0 auto;
  }
  .main-nav,
  .compact-nav{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    width:max-content;
    max-width:calc(100% - 620px);
    justify-content:center;
    z-index:2;
  }
  .locale-dropdown{
    flex:0 0 auto;
    margin-left:auto;
    transform:none;
    z-index:3;
  }
  .account-pill{
    flex:0 0 auto;
    margin-left:12px;
    z-index:3;
  }
}

/* =========================================================================
   Day Schedule Modal  (instruments page – click a calendar day)
   ========================================================================= */
.day-schedule-overlay{
  position:fixed;inset:0;z-index:9000;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.55);backdrop-filter:blur(6px);
  opacity:0;pointer-events:none;transition:opacity .25s ease;
}
.day-schedule-overlay.open{opacity:1;pointer-events:auto}
.day-schedule-modal{
  background:var(--panel);border:1px solid var(--line);
  border-radius:22px;width:min(560px,92vw);max-height:88vh;
  display:flex;flex-direction:column;
  box-shadow:0 24px 64px rgba(0,0,0,.35);
  transform:translateY(20px);transition:transform .25s ease;
}
.day-schedule-overlay.open .day-schedule-modal{transform:translateY(0)}
.day-schedule-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 22px 14px;border-bottom:1px solid var(--line);
  flex-shrink:0;
}
.day-schedule-header h3{margin:0;font-size:1.1rem}
.day-schedule-close{
  background:none;border:none;color:var(--fg);font-size:1.5rem;
  cursor:pointer;padding:4px 8px;border-radius:8px;line-height:1;
}
.day-schedule-close:hover{background:rgba(255,255,255,.08)}
.day-schedule-body{overflow-y:auto;padding:16px 22px 22px;flex:1}

/* Timeline */
.day-timeline{position:relative;min-height:200px}
.day-timeline-hour{
  display:flex;align-items:flex-start;
  border-top:1px solid var(--line);
  min-height:48px;position:relative;
}
.day-timeline-hour-label{
  width:48px;flex-shrink:0;
  font-size:.72rem;color:var(--muted);
  padding:4px 6px 0 0;text-align:right;
  font-variant-numeric:tabular-nums;
}
.day-timeline-hour-track{flex:1;position:relative;min-height:48px}
.day-timeline-block{
  position:absolute;left:4px;right:4px;
  background:rgba(110,231,255,.12);border-left:3px solid var(--accent);
  border-radius:8px;padding:5px 10px;
  font-size:.78rem;overflow:hidden;
  cursor:pointer;transition:background .15s;
  z-index:1;
}
.day-timeline-block:hover{background:rgba(110,231,255,.22)}
.day-timeline-block strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-timeline-block small{color:var(--muted);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-timeline-empty{
  text-align:center;padding:40px 20px;color:var(--muted);
  font-size:.92rem;
}

/* Light mode */
html[data-resolved-theme="light"] .day-schedule-overlay{background:rgba(0,0,0,.3)}
html[data-resolved-theme="light"] .day-schedule-modal{box-shadow:0 16px 48px rgba(0,0,0,.12)}
html[data-resolved-theme="light"] .day-schedule-close:hover{background:rgba(0,0,0,.06)}
html[data-resolved-theme="light"] .day-timeline-block{background:rgba(0,120,200,.08);border-left-color:var(--accent)}
html[data-resolved-theme="light"] .day-timeline-block:hover{background:rgba(0,120,200,.14)}

/* Mobile */
@media(max-width:600px){
  .day-schedule-modal{width:100vw;max-height:100vh;border-radius:0;height:100vh}
  .day-timeline-hour-label{width:36px;font-size:.65rem}
}

/* Make calendar day cells clickable on instruments page */
.calendar-day-clickable .day-cell{cursor:pointer;transition:background .15s}
.calendar-day-clickable .day-cell:hover{background:rgba(110,231,255,.06);border-radius:12px}
html[data-resolved-theme="light"] .calendar-day-clickable .day-cell:hover{background:rgba(0,120,200,.04)}

/* =========================================================================
   BOOK PAGE — simplified booking with day-view grid
   ========================================================================= */
.book-page{max-width:1100px;margin:0 auto}
.book-selector-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:0 0 16px}
.book-steps{display:flex;flex-wrap:wrap;gap:8px;flex:1 1 0}
.book-step-chip{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:4px 6px;background:var(--bg-soft,#1e293b);border:1px solid var(--line);border-radius:10px;padding:6px 10px}
html[data-resolved-theme="light"] .book-step-chip{background:#f8fafc}
.book-step-filters{grid-column:1/-1}
.book-step-label{font-size:.8rem;font-weight:600;white-space:nowrap;color:var(--muted)}
.book-instrument-select{border:1px solid var(--line);border-radius:6px;padding:4px 8px;background:var(--bg-soft,#1e293b);color:var(--text);font-size:.85rem;min-width:140px;outline:none;cursor:pointer;-webkit-appearance:auto;appearance:auto}
html[data-resolved-theme="light"] .book-instrument-select{background:#fff}
.book-remove-step{background:none;border:none;color:var(--muted);font-size:1.1rem;cursor:pointer;padding:0 4px;line-height:1}
.book-remove-step:hover{color:var(--danger,#ef4444)}
.book-step-filter-toggle{background:none;border:none;cursor:pointer;font-size:.85rem;padding:2px 4px;border-radius:6px;opacity:.6;transition:opacity .15s}
.book-step-filter-toggle:hover{opacity:1}
.book-step-filters{display:flex;flex-wrap:wrap;gap:6px;width:100%;margin-top:6px}
.book-step-filters select{border:1px solid var(--line);border-radius:6px;padding:4px 8px;background:var(--bg-soft,#1e293b);color:var(--text);font-size:.78rem;min-width:0;flex:1 1 120px;-webkit-appearance:auto;appearance:auto}
html[data-resolved-theme="light"] .book-step-filters select{background:#fff}
.book-template-pick{position:relative}
.book-tpl-toggle{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:6px 10px;background:var(--bg-soft,#1e293b);color:var(--text);font-size:.85rem;cursor:pointer;min-width:140px;text-align:left}
html[data-resolved-theme="light"] .book-tpl-toggle{background:#fff}
.book-tpl-toggle:hover{border-color:rgba(110,231,255,.4)}
.book-tpl-dropdown{position:absolute;top:calc(100% + 4px);right:0;min-width:220px;max-width:320px;max-height:280px;overflow:auto;z-index:240;background:var(--panel,rgba(20,25,36,.98));border:1px solid var(--line);border-radius:12px;box-shadow:0 14px 36px rgba(0,0,0,.28);padding:4px}
html[data-resolved-theme="light"] .book-tpl-dropdown{background:rgba(255,255,255,.98);box-shadow:0 14px 36px rgba(15,23,42,.14)}
.book-tpl-option-row{display:flex;align-items:center}
.book-tpl-option{flex:1;display:block;width:100%;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--text);font:inherit;font-size:.85rem;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.book-tpl-option:hover,.book-tpl-option:focus{background:rgba(110,231,255,.10);outline:0}
html[data-resolved-theme="light"] .book-tpl-option:hover,html[data-resolved-theme="light"] .book-tpl-option:focus{background:rgba(14,165,233,.08)}
.book-tpl-delete{flex-shrink:0;width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:1rem;cursor:pointer;transition:background .15s,color .15s}
.book-tpl-delete:hover{background:rgba(239,68,68,.15);color:#ef4444}
.button.danger{background:linear-gradient(135deg,#dc2626,#b91c1c);color:#fff;border:0}
.button.danger:hover{background:linear-gradient(135deg,#ef4444,#dc2626)}

/* Monthly calendar */
.book-calendar-wrap{padding:0 0 20px}
.book-cal-nav{display:flex;align-items:center;justify-content:center;gap:16px;margin-bottom:12px}
.book-cal-nav button{background:none;border:none;font-size:1.4rem;cursor:pointer;color:var(--text);padding:4px 10px;border-radius:8px}
.book-cal-nav button:hover{background:var(--glass-bg)}
.book-cal-nav strong{font-size:1rem}
.book-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center;max-width:420px;margin:0 auto}
.book-cal-wday{font-size:.7rem;font-weight:600;color:var(--muted);padding:4px 0}
.book-cal-day{border:none;background:none;border-radius:10px;padding:8px 4px;font-size:.85rem;cursor:pointer;color:var(--text);transition:all .15s}
.book-cal-day:hover:not([disabled]){background:rgba(59,130,246,.15)}
.book-cal-day.today{font-weight:700;box-shadow:inset 0 0 0 2px var(--accent)}
.book-cal-day.selected{background:var(--accent);color:#fff;font-weight:700}
.book-cal-day.past{opacity:.3;cursor:default}

/* Day view modal */
.book-modal-overlay{position:fixed;inset:0;z-index:900;background:rgba(0,0,0,.55);display:flex;align-items:flex-start;justify-content:center;padding:26px 20px 20px}
.book-modal{background:var(--card-bg,#1e293b);border:1px solid var(--line);border-radius:18px;width:min(92vw,720px);max-height:calc(100vh - 56px);box-shadow:0 20px 60px rgba(0,0,0,.4);display:flex;flex-direction:column}
html[data-resolved-theme="light"] .book-modal{background:#fff;box-shadow:0 20px 60px rgba(0,0,0,.12)}
.book-modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 12px;border-bottom:1px solid var(--line);flex-shrink:0}
.book-modal-head h2{font-size:1rem;margin:0;font-weight:700}
.book-modal-close{background:none;border:none;font-size:1.4rem;cursor:pointer;color:var(--muted);width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;transition:background .15s}
.book-modal-close:hover{background:var(--glass-bg);color:var(--text)}
.book-modal-body{overflow:auto;padding:16px 18px 16px;flex:1 1 auto;min-height:0;-webkit-overflow-scrolling:touch}
.book-modal-footer{display:flex;align-items:center;gap:10px;padding:10px 18px 14px;border-top:1px solid var(--line);flex-wrap:wrap;flex-shrink:0}
.book-footer-hidden{display:none}
.book-day-grid-wrap{overflow-x:auto;padding-bottom:24px}
.book-day-grid{display:grid;gap:0;min-width:max-content;-webkit-user-select:none;user-select:none}
.book-grid-corner{position:sticky;left:0;z-index:2;background:var(--card-bg,#1e293b)}
.book-grid-col-hdr{text-align:center;padding:10px 6px 8px;position:sticky;top:0;z-index:1;background:var(--card-bg,#1e293b)}
.book-grid-col-hdr strong{display:block;font-size:.75rem;white-space:nowrap}
.book-grid-col-hdr small{font-size:.6rem;color:var(--muted)}
.book-grid-time{font-size:.6rem;color:var(--muted);text-align:right;padding:0 4px 0 0;position:sticky;left:0;z-index:1;background:var(--card-bg,#1e293b);height:20px;display:flex;align-items:center;justify-content:flex-end}
.book-grid-time.hour{border-top:1px solid var(--line)}
.book-grid-cell{height:20px;border-right:1px solid rgba(148,163,184,.08);transition:background .1s;cursor:pointer;border-left:3px solid transparent;position:relative}
.book-grid-cell.hour{border-top:1px solid var(--line)}
.book-grid-cell.occupied{cursor:not-allowed;background:rgba(239,68,68,.15) !important;border-left:3px solid rgba(239,68,68,.5) !important;position:relative}
.book-grid-cell.closed{cursor:not-allowed;background:rgba(100,116,139,.25) !important;border-left:3px solid rgba(100,116,139,.3) !important}
.book-occ-name{position:absolute;top:0;left:4px;right:4px;font-size:.55rem;color:rgba(239,68,68,.85);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px;pointer-events:none;font-weight:600}
.book-grid-cell:not(.occupied):hover{background:rgba(59,130,246,.1)}
.book-grid-cell.selected-slot{position:relative}
.book-grid-cell.drag-highlight{position:relative}
.book-grid-cell.tap-pending{position:relative;outline:2px solid var(--accent,#3b82f6);outline-offset:-2px;z-index:1}
.book-day-loading{text-align:center;padding:30px;color:var(--muted);font-size:.85rem}

/* Day actions / summary */
.book-day-summary{flex:1 1 auto;display:flex;flex-wrap:wrap;gap:8px}
.book-summary-line{background:var(--glass-bg);border-radius:8px;padding:6px 12px;font-size:.82rem;display:flex;gap:10px;align-items:center}
.book-summary-line strong{font-weight:600}

/* Light theme overrides */
html[data-resolved-theme="light"] .book-grid-corner,
html[data-resolved-theme="light"] .book-grid-col-hdr,
html[data-resolved-theme="light"] .book-grid-time{background:#fff}
html[data-resolved-theme="light"] .book-modal-overlay{background:rgba(0,0,0,.3)}
html[data-resolved-theme="light"] .book-grid-cell.occupied{background:rgba(239,68,68,.1) !important}
html[data-resolved-theme="light"] .book-grid-cell.closed{background:rgba(100,116,139,.12) !important}
html[data-resolved-theme="light"] .book-occ-name{color:rgba(185,28,28,.8)}

/* ── Mobile booking modal: fullscreen + fixed footer ── */
@media(max-width:760px){
  .book-modal-overlay{padding:0;align-items:flex-end;justify-content:center}
  .book-modal{width:100%;height:calc(100dvh - 30px);max-height:none;border-radius:18px 18px 0 0;border:none}
  .book-modal-head{padding:14px 16px 10px;flex-shrink:0}
  .book-modal-body{overflow:auto;padding:12px 6px 16px;-webkit-overflow-scrolling:touch;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
  .book-modal-footer{background:var(--card-bg,#1e293b);padding:10px 12px calc(16px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line)}
  html[data-resolved-theme="light"] .book-modal-footer{background:#fff}
  .book-day-grid-wrap{padding-bottom:8px;overflow-x:visible}
  .book-day-grid{min-width:0 !important;gap:0}
  .book-grid-corner{width:32px;min-width:32px}
  .book-grid-time{font-size:.5rem;padding:0 2px 0 0;width:32px;min-width:32px}
  .book-grid-cell{height:26px}
  .book-grid-time{height:26px}
  .book-occ-name{line-height:26px;font-size:.45rem}
  .book-grid-col-hdr{padding:8px 2px 6px}
  .book-grid-col-hdr strong{font-size:.62rem}
  .book-grid-col-hdr small{font-size:.5rem}
  .book-summary-line{font-size:.78rem;padding:5px 10px}
}

/* Final onboarding layout: keep the language switch usable without letting
   the header cover the tour card, and give mobile a compact single-column flow. */
.onboarding-overlay{
  align-items:center;
  padding:calc(112px + env(safe-area-inset-top,0px)) 20px 18px;
  overflow:auto;
}
.onboarding-tour-card{
  width:min(1100px,calc(100vw - 40px));
  min-height:0;
  height:min(650px,calc(100dvh - 130px));
  max-height:calc(100dvh - 130px);
  padding:18px;
}
.onboarding-page.active{gap:18px}
.onboarding-page h2{font-size:clamp(1.8rem,2.35vw,2.38rem)}
.tour-points li{padding-block:7px}
.tour-real-screen{max-height:360px;padding:12px}
@media(max-width:760px){
  .onboarding-overlay{
    place-items:center;
    padding:calc(96px + env(safe-area-inset-top,0px)) 10px 10px;
  }
  .onboarding-tour-card{
    width:100%;
    height:min(620px,calc(100dvh - 106px));
    max-height:calc(100dvh - 106px);
    min-height:0;
    overflow:auto;
    display:grid;
    grid-template-rows:auto 1fr auto;
    gap:8px;
    padding:12px;
    border-radius:20px;
  }
  .onboarding-tour-card>.section-head{
    position:static;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin:0;
    padding:0 0 8px;
    background:transparent;
    backdrop-filter:none;
  }
  .onboarding-tour-card>.section-head .eyebrow{
    min-width:0;
    margin:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:1.05rem;
    line-height:1.1;
  }
  .onboarding-tour-card>.section-head .button{
    width:auto;
    min-width:0;
    padding:7px 12px;
    border-radius:999px;
    font-size:.8rem;
    line-height:1;
  }
  .onboarding-page.active{
    display:flex;
    flex-direction:column;
    gap:10px;
    overflow:visible;
    min-height:0;
  }
  .tour-visual{
    order:0;
    width:100%;
    min-height:0;
    max-height:30dvh;
    overflow:hidden;
    display:block;
    margin:0;
  }
  .tour-real-screen,
  .tour-real-screen[style]{
    width:100% !important;
    height:auto !important;
    max-height:30dvh !important;
    transform:scale(.7) !important;
    transform-origin:top center !important;
    overflow:hidden !important;
  }
  .tour-copy{
    order:1;
    display:grid;
    gap:7px;
    align-self:stretch;
  }
  .tour-copy .eyebrow{
    font-size:.72rem;
    letter-spacing:.12em;
  }
  .onboarding-page h2{
    font-size:1.22rem;
    line-height:1.14;
    margin:0;
  }
  .tour-points{
    display:grid;
    gap:6px;
    margin:0;
  }
  .tour-points li{
    padding:7px 9px 7px 26px;
    border-radius:12px;
    font-size:.78rem;
    line-height:1.35;
  }
  .tour-points li::before{
    left:11px;
    top:13px;
    width:7px;
    height:7px;
  }
  .onboarding-actions{
    position:static;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:8px;
    margin:0;
    padding:8px 0 0;
    background:transparent;
    backdrop-filter:none;
  }
  .onboarding-actions .button{
    min-width:0;
    width:auto;
    padding:8px 12px;
    border-radius:14px;
    font-size:.82rem;
  }
  .onboarding-actions .pill{
    justify-self:center;
    min-width:52px;
    padding:7px 10px;
    font-size:.72rem;
    line-height:1;
  }
}

