/* Product layout layer. Color semantics live in ui-modern.css; this file owns
   the shared workspace rhythm, navigation, and account plan collection. */

.app-layout { background:var(--pw-canvas); }
.app-layout :is(.sidebar-command-button,.topbar-search) kbd { color:var(--pw-muted); opacity:1; }
:root .app-layout :is(.calendar-day,.data-row,.action-task-row,.dashboard-library-items button,.feed-row):hover { background:var(--pw-surface-soft); }
.app-layout .view-surface { max-width:1440px; }
:root[data-theme] .app-layout .view-surface .page-header {
  min-height:0; padding:0 0 1.25rem; margin:0 0 1.25rem;
  border:0; border-bottom:1px solid var(--pw-line); border-radius:0;
  background:transparent!important; box-shadow:none; align-items:center;
}
.app-layout .view-surface .page-title { font-size:clamp(1.5rem,2.3vw,2rem); line-height:1.2; letter-spacing:-.035em; font-weight:750; }
.app-layout .view-surface .page-subtitle,.app-layout .view-surface .page-header p { font-size:.9rem!important; line-height:1.6; max-width:72ch; }
.app-layout .view-surface .eyebrow { font-size:.7rem; letter-spacing:.09em; }
.app-layout .view-surface .card { border:1px solid var(--pw-line); border-radius:14px; background:var(--pw-surface); box-shadow:0 1px 2px rgba(15,23,42,.025); }
.app-layout .view-surface .card:hover { transform:none; box-shadow:0 1px 2px rgba(15,23,42,.025); border-color:var(--pw-line); }
.app-layout .view-surface .section-heading { margin-bottom:1rem; }
.app-layout .live-command-header .eyebrow { color:#fff; }
/* The desktop 260px flex basis becomes HEIGHT when the heading stacks.
   Let mobile headers size to their text instead of reserving an empty column. */
@media (max-width:768px) {
  .app-layout .view-surface .section-heading > :first-child,
  .app-layout .view-surface .section-heading > :last-child:not(:first-child),
  .app-layout .view-surface .section-heading > :last-child:not(:first-child).btn { flex:0 1 auto; }
}
.app-layout .view-surface .section-heading h2 { font-size:1.12rem; font-weight:730; line-height:1.35; }
.app-layout .view-surface .section-heading p { font-size:.85rem; line-height:1.5; }
.app-layout .view-surface :is(.metric-value,.trip-stat-value) { font-variant-numeric:tabular-nums; letter-spacing:-.025em; }
.app-layout .view-surface :is(.metric-card,.trip-stat-card) { min-height:112px; padding:1.1rem; }
.app-layout .view-surface .metric-card::after { display:none; }
.app-layout .view-surface .metric-label { padding-right:1.65rem; font-size:.72rem; letter-spacing:.065em; line-height:1.5; }
.app-layout .view-surface .metric-sub { font-size:.75rem; line-height:1.5; }
.app-layout .view-surface .metric-card-icon { background:transparent; color:var(--pw-brand); }
.app-layout .view-surface .metric-alert { border-left:3px solid var(--pw-red); }
.app-layout .btn { min-height:44px; border-radius:9px; line-height:1.3; font-size:.85rem; font-weight:650; gap:.45rem; }
.app-layout .btn-sm { min-height:36px; font-size:.78rem; }
.app-layout .btn-primary { background:var(--pw-action)!important; color:#fff!important; box-shadow:none!important; }
.app-layout .btn-primary:hover { background:var(--pw-action-deep)!important; }
.app-layout .btn-outline { background:var(--pw-surface)!important; color:var(--pw-ink)!important; border-color:var(--pw-control-line)!important; }
.app-layout .btn-outline:hover { background:var(--pw-surface-soft)!important; }
.app-layout .form-control { border-radius:9px; font-size:.9rem; line-height:1.5; }
.app-layout .form-control:hover { border-color:var(--pw-control-line); }
.app-layout .form-label { font-size:.8rem; font-weight:650; }
.app-layout :is(.data-row,.travel-row,.reservation-card,.operational-task) { border-radius:12px; }
.app-layout :is(.field-help,.provider-note,.task-metadata,.task-counts,.data-row small) { font-size:.78rem; line-height:1.5; }
.app-layout .tag { font-size:.7rem; line-height:1.4; letter-spacing:.02em; }
.app-layout .card-title-icon { background:transparent; border-radius:0; width:1.6rem; height:1.6rem; }
.app-layout .card-title-icon .material-icon { font-size:1.25rem; }
.app-layout :is(.forecast-row,.deadline-list>div) { padding:1rem; }
.app-layout :is(.statement-grid,.finance-overview-grid) { align-items:start; }
.app-layout :is(.statement-grid>.card,.subscription-card) p { margin:.5rem 0 1rem; }
.app-layout .statement-grid .form-control { margin-bottom:.75rem; }
.app-layout .planning-countdown { display:flex; align-items:center; gap:.75rem; padding:1rem 1.2rem; margin-bottom:1.25rem; border:1px solid var(--pw-line); border-radius:12px; background:var(--pw-brand-soft); color:var(--pw-brand); }
.planning-countdown .countdown-icon { width:24px; height:24px; margin:0; }
.planning-countdown strong { font-size:1rem; }
.planning-countdown span { margin-left:auto; font-size:.85rem; }
.app-layout .studio-hero { padding:1.3rem 1.4rem; border:1px solid var(--pw-line); border-radius:14px; color:var(--pw-ink); background:var(--pw-surface)!important; box-shadow:none; }
.app-layout .studio-hero::before,.app-layout .studio-hero::after { display:none; }
.app-layout .studio-hero h1 { color:var(--pw-ink); font-size:2rem; letter-spacing:-.035em; }
.app-layout .studio-hero p { color:var(--pw-muted); font-size:.9rem; }
.app-layout .studio-hero .eyebrow { color:var(--pw-brand); }
.app-layout .studio-health { background:var(--pw-brand-soft); border-color:var(--pw-line); color:var(--pw-brand); }
.app-layout .studio-health :is(span,strong,small) { color:var(--pw-brand); }
.app-layout .studio-metric { min-height:130px; border-radius:12px; background:var(--pw-surface)!important; }

/* Restrained navigation in both themes; an active item is a location, not a CTA. */
@media (min-width:769px) {
  .app-layout > .sidebar { width:248px; background:var(--pw-surface); color:var(--pw-ink); border-right:1px solid var(--pw-line); box-shadow:none; padding:1.1rem .7rem; }
  .app-layout > .sidebar .sidebar-brand { border-color:var(--pw-line); padding:.15rem .45rem 1.1rem; gap:.65rem; }
  .app-layout > .sidebar .sidebar-brand h1 { color:var(--pw-ink); font-size:1.25rem; }
  .app-layout > .sidebar .sidebar-brand p { color:var(--pw-muted); font-size:.68rem; line-height:1.5; }
  .app-layout > .sidebar .brand-mark { width:34px; height:34px; border-radius:9px; box-shadow:none; }
  .app-layout > .sidebar .nav-item { min-height:44px; color:var(--pw-muted); background:transparent; font-size:.83rem; font-weight:550; border:0; padding:.6rem .75rem; gap:.65rem; border-radius:8px; box-shadow:none; }
  .app-layout > .sidebar .nav-item:hover { background:var(--pw-surface-soft); color:var(--pw-ink); }
  .app-layout > .sidebar .nav-item.active { color:var(--pw-brand); background:var(--pw-brand-soft); font-weight:700; box-shadow:inset 3px 0 var(--pw-brand); }
  .app-layout > .sidebar .nav-item > .material-icon { width:22px; height:22px; flex:0 0 22px; padding:1px; background:transparent; color:inherit; border-radius:0; }
  .app-layout > .sidebar.collapsed .nav-item > .material-icon { width:28px; height:28px; flex-basis:28px; padding:1px; }
  .app-layout > .sidebar .nav-section-label { color:var(--pw-muted); font-size:.64rem; letter-spacing:.08em; padding:.9rem .75rem .35rem; }
  .app-layout > .sidebar .event-switcher { background:var(--pw-surface-soft); border:1px solid var(--pw-line); border-radius:11px; padding:.75rem; }
  .app-layout > .sidebar .event-switcher label { color:var(--pw-muted); font-size:.65rem; letter-spacing:.06em; }
  .app-layout > .sidebar .event-switcher .form-control { color:var(--pw-ink); background:var(--pw-surface); border-color:var(--pw-control-line); font-size:.8rem; }
  .app-layout > .sidebar .event-switcher .form-control option { color:var(--pw-ink); background:var(--pw-surface); }
  .app-layout > .sidebar .sidebar-account { border-color:var(--pw-line); }
  .app-layout > .sidebar .sidebar-account :is(small,strong) { color:var(--pw-muted); }
  .app-layout > .sidebar .sidebar-account>div>span { color:var(--pw-brand); background:var(--pw-brand-soft); }
  .app-layout > .sidebar :is(.sidebar-command-button,.theme-toggle,.sidebar-collapse-toggle) { color:var(--pw-muted); background:var(--pw-surface-soft); border-color:var(--pw-control-line); }
  .app-layout > .sidebar :is(.sidebar-command-button,.theme-toggle,.sidebar-collapse-toggle):hover { color:var(--pw-ink); background:var(--pw-surface-soft); }
  .app-layout > .sidebar .sidebar-logout { background:transparent!important; border-color:transparent!important; color:var(--pw-muted)!important; }
  .app-layout > .main-content { padding:0 2rem 3rem; }
  .app-layout .workspace-topbar { margin:0 -2rem 1.75rem; padding:0 2rem; min-height:64px; background:var(--pw-surface); box-shadow:none; border-bottom:1px solid var(--pw-line); }
  .app-layout .workspace-topbar button { min-height:38px; gap:.4rem; font-size:.78rem; }
  .app-layout .workspace-topbar .workspace-actions { gap:.5rem; }
  .app-layout .workspace-topbar .workspace-context strong { max-width:290px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .app-layout .workspace-topbar .topbar-search { background:var(--pw-surface-soft); border-color:var(--pw-control-line); }
}

/* Consistent, legible secondary navigation. Horizontal scrolling retains all
   destinations on small screens without creating a wall of tab buttons. */
.app-layout :is(.trip-tabs,.platform-tabs,.finance-tabs,.communication-nav,.live-section-tabs,.library-type-tabs,.action-filter-tabs,.studio-tabs,.trip-hub-nav) {
  border:1px solid var(--pw-line); border-radius:10px; background:var(--pw-surface)!important; box-shadow:none; padding:.3rem; gap:.25rem;
}
.app-layout :is(.trip-tab,.platform-tabs button,.finance-tabs button,.communication-nav button,.live-section-tabs button,.library-type-tabs button,.action-filter-tabs button,.studio-tabs button,.trip-hub-nav button) {
  min-height:42px; color:var(--pw-muted); font-size:.8rem; font-weight:600; line-height:1.3; border-radius:7px; padding:.65rem .8rem;
}
.app-layout :is(.trip-tab.active,.platform-tabs button.active,.finance-tabs button.active,.communication-nav button.active,.live-section-tabs button.active,.library-type-tabs button.active,.action-filter-tabs button.active,.studio-tabs button.active,.trip-hub-nav button.active) {
  color:var(--pw-brand)!important; background:var(--pw-brand-soft)!important; border-color:transparent!important; box-shadow:inset 0 -2px var(--pw-brand)!important;
}

/* Account home puts finding a plan and taking action above decorative content. */
.app-layout .account-hero { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; padding:0; margin:0 0 1.5rem; border:0; border-radius:0; color:var(--pw-ink); background:transparent!important; box-shadow:none; }
.app-layout .account-hero h1 { font-size:clamp(1.8rem,3vw,2.6rem); line-height:1.15; letter-spacing:-.04em; margin:.4rem 0 .6rem; }
.app-layout .account-hero p { color:var(--pw-muted); font-size:.95rem; line-height:1.55; }
.app-layout .account-hero .eyebrow { color:var(--pw-brand); }
.app-layout .account-hero-actions { flex-wrap:wrap; gap:.6rem; }
.app-layout .account-metrics { margin-bottom:1rem; gap:.75rem; }
.app-layout .account-section { margin:1.75rem 0; }
.planning-shortcuts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.planning-shortcuts>button { display:flex; align-items:center; gap:.75rem; padding:.9rem 1rem; border:1px solid var(--pw-line); border-radius:11px; background:var(--pw-surface); color:var(--pw-ink); font:inherit; text-align:left; cursor:pointer; }
.planning-shortcuts>button:hover { border-color:var(--pw-brand); }
.planning-shortcuts>button>.material-icon { color:var(--pw-brand); width:22px; height:22px; }
.planning-shortcuts>button>.material-icon:last-child { margin-left:auto; width:18px; height:18px; }
.planning-shortcuts span { min-width:0; }
.planning-shortcuts strong,.planning-shortcuts small { display:block; }
.planning-shortcuts strong { font-size:.86rem; font-weight:650; }
.planning-shortcuts small { color:var(--pw-muted); font-size:.77rem; margin-top:.2rem; }
#account-action-centre { scroll-margin-top:85px; }
.collection-count { color:var(--pw-muted); font-size:.8rem; white-space:nowrap; }
.collection-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:.8rem; margin-bottom:1rem; }
.collection-types { display:flex; gap:.25rem; flex-wrap:wrap; }
.collection-types button { display:inline-flex; align-items:center; gap:.4rem; min-height:40px; padding:.5rem .65rem; border:1px solid transparent; border-radius:8px; color:var(--pw-muted); background:transparent; font:inherit; font-size:.8rem; font-weight:600; cursor:pointer; }
.collection-types button .material-icon { width:18px; height:18px; }
.collection-types button span { font-size:.72rem; }
.collection-types button[aria-pressed="true"] { color:var(--pw-brand); background:var(--pw-brand-soft); border-color:var(--pw-brand); }
.collection-search-row { display:flex; gap:.5rem; margin-left:auto; flex:1 1 290px; max-width:440px; }
.collection-search { display:flex; align-items:center; gap:.4rem; padding:0 .65rem; min-width:0; flex:1; border:1px solid var(--pw-control-line); border-radius:8px; color:var(--pw-muted); background:var(--pw-surface); }
.collection-search input { width:100%; min-width:0; min-height:44px; border:0; outline:0; color:var(--pw-ink); background:transparent; font:inherit; font-size:.85rem; }
.collection-search:focus-within { outline:3px solid var(--pw-focus); outline-offset:2px; }
.collection-search input::placeholder { color:var(--pw-muted); opacity:1; }
.collection-search-row .collection-sort { width:150px; min-height:44px; font-size:.8rem; padding:.5rem; }
.app-layout .event-portfolio-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.app-layout .view-surface .event-portfolio-card { position:relative; display:flex; flex-direction:column; gap:0; padding:1.15rem; min-height:250px; text-align:left; overflow:hidden; cursor:pointer; transition:border-color .15s ease,box-shadow .15s ease; }
.app-layout .view-surface .event-portfolio-card:hover { border-color:var(--pw-brand); box-shadow:0 4px 16px rgba(15,23,42,.06); }
.event-portfolio-card .event-card-top { display:flex; align-items:center; gap:.5rem; margin-bottom:1rem; }
.event-portfolio-card .event-card-top .tag { margin-left:auto; }
.event-portfolio-card .event-type-icon { width:32px; height:32px; border-radius:9px; background:var(--pw-brand-soft); color:var(--pw-brand); display:grid; place-items:center; }
.event-portfolio-card .event-type-icon .material-icon { font-size:1.2rem; }
.event-portfolio-card .plan-type-label { color:var(--pw-muted); font-size:.74rem; }
.event-portfolio-card h3 { font-size:1.12rem; font-weight:720; letter-spacing:-.02em; line-height:1.35; margin:0 0 .55rem; overflow-wrap:anywhere; }
.event-portfolio-card .event-card-meta { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:.4rem; color:var(--pw-muted); font-size:.77rem; }
.event-portfolio-card .event-card-meta .material-icon { width:16px; height:16px; }
.event-portfolio-card .plan-past-label { padding-left:.4rem; border-left:1px solid var(--pw-control-line); }
.event-portfolio-card .next-item { display:grid; gap:.35rem; padding:.8rem 0; margin:.65rem 0 .5rem; border:0; border-top:1px solid var(--pw-line); border-radius:0; background:transparent; }
.event-portfolio-card .next-item small { font-size:.7rem; color:var(--pw-muted); }
.event-portfolio-card .next-item strong { font-size:.8rem; line-height:1.5; font-weight:550; color:var(--pw-ink); }
.event-portfolio-card .event-open-link { display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-top:auto; font-size:.8rem; color:var(--pw-brand); }
.event-portfolio-card .event-open-link .material-icon { width:19px; height:19px; }
.collection-empty { text-align:center; padding:2rem!important; }
.collection-empty p { color:var(--pw-muted); margin:.6rem auto 1rem; }

@media (min-width:769px) and (max-width:1200px) {
  .app-layout .event-portfolio-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .app-layout .account-hero { align-items:flex-start; flex-direction:column; }
  .app-layout .account-hero-actions { width:auto; }
  .app-layout .workspace-topbar .workspace-actions button:not(.topbar-search) { font-size:0; padding:.55rem; }
  .app-layout .workspace-topbar .workspace-actions button .material-icon { width:20px; height:20px; }
}
@media (max-width:768px) {
  .app-layout .view-surface .page-header { padding:.35rem 0 1rem; margin-bottom:1rem; gap:.75rem; }
  .app-layout .view-surface .page-title { font-size:1.6rem; }
  .app-layout .view-surface .page-header p { font-size:.85rem!important; }
  .app-layout .view-surface :is(.metric-card,.trip-stat-card) { min-height:100px; padding:.9rem; }
  .app-layout .view-surface .metric-label { font-size:.67rem; letter-spacing:.04em; }
  .app-layout .view-surface .metric-sub { font-size:.72rem; }
  .app-layout .view-surface .card { border-radius:12px; }
  .app-layout .form-control,.app-layout input[type="search"],.app-layout textarea { font-size:16px; }
  .app-layout .btn-sm { min-height:40px; }
  .app-layout .mobile-header { background:var(--pw-surface); box-shadow:none; border-color:var(--pw-line); }
  .app-layout .mobile-header-actions button { border-color:transparent!important; background:transparent!important; color:var(--pw-ink)!important; border-radius:8px; }
  .app-layout .mobile-header-actions button:hover { background:var(--pw-surface-soft)!important; }
  .app-layout .mobile-header-actions .material-icon { width:22px; height:22px; }
  .app-layout .mobile-workspace-select { background:var(--pw-surface-soft); color:var(--pw-ink); }
  .app-layout .mobile-nav { background:var(--pw-surface); border-color:var(--pw-line); box-shadow:0 -3px 16px rgba(15,23,42,.035); }
  .app-layout .mobile-nav button { color:var(--pw-muted); font-size:.64rem; }
  .app-layout .mobile-nav button.active { color:var(--pw-brand); background:var(--pw-brand-soft); }
  .app-layout .mobile-nav .material-icon { width:22px; height:22px; }
  .app-layout .account-hero { gap:1rem; margin-bottom:1.2rem; align-items:stretch; }
  .app-layout .account-hero h1 { font-size:1.85rem; }
  .app-layout .account-hero p { font-size:.85rem; }
  .app-layout .account-hero-actions { display:grid; grid-template-columns:1fr 1fr; width:100%; gap:.55rem; }
  .app-layout .account-hero-actions .btn { width:100%; padding:.65rem .5rem; font-size:.77rem; }
  .app-layout .account-metrics { gap:.5rem; margin-bottom:.8rem; }
  .app-layout .account-metrics .metric-card { padding:.8rem; min-height:0; }
  .app-layout .account-metrics .metric-label { padding-right:1.3rem; }
  .app-layout .account-metrics .metric-value { font-size:1.45rem; margin:.2rem 0; }
  .app-layout .account-metrics .metric-sub { margin-top:.25rem; line-height:1.35; }
  .app-layout .account-metrics .metric-card-icon { top:.65rem; right:.65rem; padding:0; width:17px; height:17px; }
  .app-layout .action-summary-grid { gap:.5rem; margin-block:1rem; }
  .app-layout .action-summary-grid>article { min-height:82px; padding:.75rem; border-radius:10px; }
  .app-layout .action-summary-grid>article>.material-icon { padding:0; background:transparent; }
  .planning-shortcuts { grid-template-columns:1fr; gap:.5rem; }
  .planning-shortcuts>button { padding:.75rem .8rem; }
  .app-layout .account-section { margin:1.4rem 0; }
  .collection-toolbar { gap:.65rem; }
  .collection-types { width:100%; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
  .collection-types button { justify-content:center; padding:.5rem .2rem; font-size:.72rem; gap:.25rem; }
  .collection-types button .material-icon { display:none; }
  .collection-types button span { font-size:.68rem; }
  .collection-search-row { max-width:none; flex-basis:100%; }
  .collection-search-row .collection-sort { width:138px; font-size:.8rem; }
  .app-layout .event-portfolio-grid { grid-template-columns:1fr; gap:.75rem; }
  .app-layout .view-surface .event-portfolio-card { min-height:0; padding:1rem; }
  .event-portfolio-card .event-card-top { margin-bottom:.7rem; }
  .planning-countdown { flex-wrap:wrap; }
  .planning-countdown span { margin:0 0 0 2.25rem; flex-basis:100%; }
  .app-layout :is(.trip-tabs,.platform-tabs,.finance-tabs,.communication-nav,.live-section-tabs,.library-type-tabs,.action-filter-tabs,.trip-hub-nav) { touch-action:pan-x pan-y; scrollbar-width:thin; scroll-padding:6px; padding-bottom:.4rem; }
  .app-layout .note-format-toolbar { flex-wrap:wrap; gap:.25rem; }
  .app-layout .note-format-toolbar button { width:40px; height:40px; }
  .app-layout .note-color-picker button,.app-layout .pen-colors button { width:28px; height:28px; }
  .app-layout .docs-type-filters button { min-height:44px; }
}
@media (prefers-reduced-motion:reduce) {
  .app-layout .event-portfolio-card { transition:none; }
}

/* Explicit theme tokens prevent OS dark-mode styles leaking into light itineraries. */
.app-layout .itinerary-day-header {
  background:var(--pw-surface-soft);
  color:var(--pw-ink);
  padding:.75rem 1rem;
  margin-bottom:0;
  border-bottom:1px solid var(--pw-line);
}
.app-layout .itinerary-item { padding:.85rem 1rem; }
.app-layout .task-centre-toolbar { background:var(--pw-surface-soft); }

/* Screenshot review: give dense operational controls a consistent inner rhythm. */
.app-layout .task-centre-toolbar { gap:.75rem; padding:.6rem; }
.app-layout .task-centre-toolbar > .btn { flex:0 0 auto; white-space:nowrap; }
.app-layout .task-centre-toolbar .action-filter-tabs { flex:1 1 auto; min-width:0; }
.app-layout .trip-detail-header .page-title { display:flex; align-items:center; gap:.6rem; min-width:0; }
.app-layout .trip-detail-header .page-title > .material-icon { width:28px; height:28px; flex:0 0 28px; }
.app-layout .library-workspace .resource-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); gap:1rem; }
.app-layout .resource-card { padding:1.15rem; gap:.75rem; }
.app-layout .resource-card h3 { font-size:1.05rem; line-height:1.4; overflow-wrap:anywhere; }
.app-layout .resource-card p { font-size:.9rem; line-height:1.6; margin:0; min-height:0; }
.app-layout .resource-actions { gap:.6rem; padding-top:1rem; border-top:1px solid var(--pw-line); }
.app-layout .resource-apply { flex-basis:100%; min-width:0; }
.app-layout .resource-apply label { display:block; font-size:.75rem; color:var(--pw-muted); margin:0 0 .4rem; }
.app-layout .resource-apply-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.5rem; }
.app-layout .resource-apply-controls .form-control { width:100%; min-width:0; min-height:40px; }
.app-layout .live-person { padding:1rem; margin-top:.65rem; gap:.75rem; }
.app-layout .live-person > :first-child { min-width:0; flex:1; overflow-wrap:anywhere; }
.app-layout .live-person .tag,.app-layout .live-person-actions { flex-shrink:0; }
.app-layout .qr-manual { display:grid; gap:.65rem; }
.app-layout .live-pulse { display:block; flex:0 0 9px; border-radius:50%; }
.app-layout .live-command-header p { color:#fff; margin-top:.45rem; }
.app-layout .live-headcount { box-shadow:none; }
.app-layout .live-headcount > div { background:var(--pw-surface)!important; color:var(--pw-ink); border:1px solid var(--pw-line); border-radius:14px; box-shadow:none; padding:1rem; }
.app-layout .live-headcount > div span { color:var(--pw-muted); opacity:1; }
.app-layout .live-headcount > div strong { color:var(--pw-ink); font-variant-numeric:tabular-nums; }

/* Participant pages use the same readable spacing without organizer chrome. */
.portal-shell { background:var(--pw-canvas); color:var(--pw-ink); }
.portal-shell .chat-composer { display:grid; gap:.65rem; }
.portal-shell #my-response { scroll-margin-block:1rem; }
.portal-shell :is(button,a,input,select,textarea,summary):focus-visible,
.registry-public-shell :is(button,a):focus-visible,
.public-event-site :is(button,a,input,select,textarea):focus-visible {
  outline:3px solid var(--pw-ink); outline-offset:4px;
  box-shadow:0 0 0 2px var(--pw-surface);
}
/* Organizer accent colors are decorative; they must never set text contrast. */
.public-event-site { background:var(--pw-canvas); color:var(--pw-ink); }
.public-event-site nav { background:var(--pw-surface); border-color:var(--pw-line); }
.public-event-site nav a { color:var(--pw-ink); padding:.65rem .25rem; }
.public-event-site > header {
  background:color-mix(in srgb,var(--site-accent) 20%,#172033);
  color:#fff; min-height:0; padding:4rem 1.25rem;
}
.public-event-site > header :is(h1,h2,p) { color:#fff; }
.public-event-site > header a { color:#172033; background:#fff; min-height:44px; }
.public-event-site .public-section-heading > span,
.public-event-site .public-memory-form button { color:#fff; background:#283858; }
.public-event-site :is(.public-section-heading p,.public-schedule p,.public-schedule small,.public-update-grid small,.public-memory-grid small) { color:var(--pw-muted); }
.public-event-site :is(.public-schedule time,.public-schedule a,.public-memory-grid article > span) { color:var(--pw-ink); }
.public-event-site :is(.public-schedule,.public-update-grid,.public-memory-grid) article { background:var(--pw-surface); border-color:var(--pw-line); overflow-wrap:anywhere; }
.public-event-site .public-memory-form { background:var(--pw-surface); color:var(--pw-ink); border:1px solid var(--pw-line); gap:.75rem; }
.public-event-site .public-memory-form p { color:var(--pw-muted); }
.public-event-site .public-memory-form :is(input,select,textarea) { width:100%; min-width:0; background:var(--pw-canvas); color:var(--pw-ink); border-color:var(--pw-muted); font-size:1rem; min-height:44px; }
.public-event-site .public-memory-form :is(input,textarea)::placeholder { color:var(--pw-muted); opacity:1; }
.public-event-site footer { background:var(--pw-surface); color:var(--pw-muted); }
.public-event-site > section { scroll-margin-top:6rem; }
@media(max-width:768px) {
  .public-event-site nav { height:auto; min-height:64px; flex-wrap:wrap; padding:.75rem 1rem; }
  .public-event-site nav > div { display:flex; gap:.75rem; flex-wrap:wrap; }
  .public-event-site > header h1 { font-size:clamp(2rem,8vw,3.1rem); overflow-wrap:anywhere; }
  .public-event-site > section { padding:2rem 1rem; }
  .portal-shell :is(input,select,textarea) { font-size:1rem; }
}
@media(prefers-reduced-motion:reduce) {
  .public-event-site,.portal-shell { scroll-behavior:auto; }
}
.portal-shell .portal-header { align-items:center; padding:2rem 1.5rem; background:var(--pw-surface-soft); border-bottom:1px solid var(--pw-line); border-radius:0; box-shadow:none; }
.portal-shell .portal-header > div:first-child { min-width:0; }
.portal-shell .portal-header h1 { font-size:clamp(1.65rem,3.5vw,2.5rem); line-height:1.2; margin:.7rem 0; overflow-wrap:anywhere; }
.portal-shell .portal-header .portal-person { flex-shrink:0; }
.portal-shell .portal-tools { max-width:1138px; margin:1.25rem auto; gap:.75rem; }
.portal-shell .portal-tools .btn { min-height:44px; padding:.7rem 1rem; font-size:.85rem; line-height:1.4; }
.portal-shell .portal-summary-card strong { white-space:normal; overflow:visible; line-height:1.4; }
.portal-shell .portal-invitation { padding:1.25rem; }
.portal-shell .portal-invitation h3 { margin:.4rem 0; }
.portal-shell .portal-detail-chips { gap:.65rem; margin:.75rem 0; }
.portal-shell .portal-instructions { margin-top:1rem; padding:1rem; }
@media(max-width:768px) {
  .app-layout .library-workspace .resource-grid { grid-template-columns:minmax(0,1fr); }
  .app-layout .live-person { padding:.9rem; }
  .app-layout .live-command-header { flex-direction:column; align-items:flex-start; }
  .app-layout .live-command-header > div { min-width:0; max-width:100%; }
  .app-layout .live-sync { align-self:flex-start; }
  .portal-shell .portal-header { padding:1.25rem 1rem; align-items:flex-start; }
  .portal-shell .portal-tools { display:grid; grid-template-columns:1fr; padding:0 1rem; }
}

/* Trip day planner: the same controls remain usable with touch and keyboard. */
.trip-day-planner { display:grid; gap:1rem; min-width:0; }
.trip-day-planner .trip-planner-intro { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.trip-planner-intro h3,.trip-planner-form h4,.trip-planner-day h4 { margin:0; }
.trip-planner-intro p { margin:.35rem 0 0; color:var(--pw-muted); }
.trip-planner-count { display:block; margin-top:.5rem; color:var(--pw-muted); }
.trip-planner-feedback { border:1px solid var(--pw-line); border-radius:.75rem; padding:.7rem 1rem; color:var(--pw-ink); background:var(--pw-surface); }
.trip-planner-feedback.error { color:var(--pw-danger,#a32135); border-color:currentColor; }
.trip-planner-form { display:grid; gap:1rem; scroll-margin-top:5.5rem; }
.trip-planner-stop-block > .trip-planner-form { margin:.75rem 1rem 1rem; background:var(--pw-surface-soft); }
.trip-day-planner .trip-itinerary-form { display:grid; grid-template-columns:minmax(75px,.4fr) repeat(3,minmax(130px,1fr)); gap:.8rem; align-items:end; }
.trip-day-planner .trip-itinerary-form > label:nth-child(5) { grid-column:span 2; }
.trip-day-planner label { display:grid; gap:.35rem; min-width:0; font-weight:600; color:var(--pw-ink); }
.trip-day-planner .form-control { width:100%; min-width:0; }
.trip-planner-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.trip-planner-day { margin:0; padding:0; overflow:hidden; }
.trip-planner-day-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.75rem; padding:1rem 1.2rem; background:var(--pw-surface-soft); border-bottom:1px solid var(--pw-line); }
.trip-planner-day-kicker { display:block; margin-bottom:.2rem; font-size:.78rem; font-weight:700; color:var(--pw-muted); text-transform:uppercase; letter-spacing:.06em; }
.trip-planner-day-edit { display:grid; gap:.8rem; padding:1rem 1.2rem; border-bottom:1px solid var(--pw-line); }
.trip-planner-day-notes { white-space:pre-wrap; margin:0; padding:1rem 1.2rem; color:var(--pw-ink); border-bottom:1px solid var(--pw-line); }
.trip-planner-empty { padding:1rem 1.2rem; margin:0; color:var(--pw-muted); }
.trip-planner-stop-block:not(:last-child) { border-bottom:1px solid var(--pw-line); }
.trip-day-planner .trip-planner-stop { display:flex; gap:.75rem; align-items:center; padding:.75rem 1.2rem; border:0; border-radius:0; min-width:0; }
.trip-day-planner .trip-planner-stop:last-child { border-bottom:0; }
.trip-planner-grip { display:grid; place-items:center; flex:none; width:44px; height:44px; border:0; background:transparent; color:var(--pw-muted); cursor:grab; touch-action:none; }
.trip-planner-grip:active { cursor:grabbing; }
.trip-planner-stop .itinerary-item-time { min-width:64px; text-align:left; color:var(--pw-ink); font-weight:600; }
.trip-planner-stop .itinerary-item-content { min-width:0; }
.trip-planner-stop .itinerary-item-title { overflow-wrap:anywhere; }
.trip-planner-stop-meta { display:flex; flex-wrap:wrap; gap:.25rem .8rem; margin-top:.25rem; color:var(--pw-muted); font-size:.86rem; }
.trip-planner-stop-meta span { display:inline-flex; align-items:center; gap:.2rem; }
.trip-planner-stop-meta .material-icon { width:1rem; height:1rem; }
.trip-planner-stop-actions { display:flex; gap:.25rem; flex-wrap:wrap; justify-content:flex-end; }
.trip-planner-stop-actions .btn { width:44px; height:44px; min-height:44px; padding:.35rem; }
.trip-planner-stop-actions .btn:disabled { opacity:.4; }
.trip-planner-add-day { justify-self:start; }
@media(max-width:900px) { .trip-day-planner .trip-itinerary-form { grid-template-columns:repeat(2,minmax(0,1fr)); } .trip-day-planner .trip-itinerary-form > label:nth-child(5) { grid-column:auto; } }
@media(max-width:600px) {
  .trip-day-planner .trip-planner-intro { align-items:flex-start; flex-direction:column; }
  .trip-day-planner .trip-planner-intro > .btn { width:100%; }
  .trip-day-planner .trip-itinerary-form { grid-template-columns:minmax(0,1fr); }
  .trip-day-planner .trip-planner-stop { display:grid; grid-template-columns:44px minmax(0,1fr); gap:.25rem .7rem; }
  .trip-planner-stop .itinerary-item-time { grid-column:2; }
  .trip-planner-stop .itinerary-item-content { grid-column:2; }
  .trip-planner-stop-actions { grid-column:2; justify-content:flex-start; }
  .trip-planner-grip { grid-row:1 / span 3; }
}
