/* ═══════════════════════════════════════════════
   BROADWATER CENTER — Warm Architectural Minimalism
   Target: Samsung Frame TV 1920×1080, 6-10ft viewing
   ═══════════════════════════════════════════════ */

:root {
    --bg: #171613;
    --surface: #1e1d19;
    --card-bg: rgba(30, 29, 25, 0.92);
    --card-border: rgba(255, 250, 235, 0.05);
    --card-border-hi: rgba(201, 169, 110, 0.18);
    --brass: #c4a265;
    --brass-subtle: rgba(196, 162, 101, 0.10);
    --brass-muted: #8b7a55;
    --available: #5ec4a0;
    --available-bg: rgba(94, 196, 160, 0.07);
    --occupied: #a0a9b8;
    --occupied-bg: rgba(160, 169, 184, 0.05);
    --text-primary: #eae7e0;
    --text-secondary: #bcb8ac;   /* lightened for legibility on the Frame TV (#6) */
    --text-tertiary: #918c80;    /* lightened for legibility on the Frame TV (#6) */
    --text-muted: #4a473f;
    --divider: rgba(255, 250, 235, 0.04);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-ui: 'Outfit', -apple-system, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Self-update banner — shown by version-check.js when a new deploy is detected */
#version-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--brass);
    color: var(--bg);
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
    padding: 12px 16px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
#version-banner.hidden {
    display: none;
}

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Warm ambient gradients */
body::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 50% 40% at 25% 30%, rgba(196, 162, 101, 0.018) 0%, transparent 100%),
        radial-gradient(ellipse 50% 40% at 75% 70%, rgba(196, 162, 101, 0.012) 0%, transparent 100%);
}

/* ── HEADER ────────────────────────────── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 18px 32px 14px;
    border-bottom: 1px solid var(--divider);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    animation: fadeSlideIn 0.6s var(--ease-out) 0s both;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.header h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.01em;
}

.header-subtitle {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding-bottom: 2px;
}

/* Legend — centered in header */
.header-legend {
    display: flex;
    gap: 24px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-dot.available {
    background: var(--available);
    box-shadow: 0 0 6px rgba(94, 196, 160, 0.3);
}

.legend-dot.occupied {
    background: var(--occupied);
    box-shadow: 0 0 6px rgba(160, 169, 184, 0.2);
}

.legend-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Clock */
.header-time {
    text-align: right;
}

#clock-time {
    font-family: var(--font-ui);
    font-size: 26px;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: 0.02em;
}

#clock-date {
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-top: 3px;
    text-transform: uppercase;
}

/* ── BODY: 3-Column Grid ──────────────── */
.body-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 256px 1fr 256px;
    gap: 16px;
    padding: 14px 24px;
    min-height: 0;
    z-index: 1;
}

/* Side Panels (left & right columns) */
.side-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
}

/* Group Card */
.group-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 14px 6px 10px 6px;
    transition: border-color 0.6s ease;
}

.group-card.has-active {
    border-color: var(--card-border-hi);
}

.group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    margin-bottom: 8px;
}

.group-label-line {
    width: 16px;
    height: 1px;
    background: linear-gradient(90deg, var(--brass), transparent);
}

.group-label-text {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brass);
}

.suite-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Suite Row */
.suite-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.6s var(--ease-out);
}

.suite-row.active.available {
    background: var(--available-bg);
    transform: translateX(2px);
}

.suite-row.active.occupied {
    background: var(--occupied-bg);
    transform: translateX(2px);
}

.suite-row.active.amenity {
    background: var(--brass-subtle);
    transform: translateX(2px);
}

.suite-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: box-shadow 0.6s ease;
}

.suite-dot.available { background: var(--available); }
.suite-dot.occupied { background: var(--occupied); }
.suite-dot.amenity { background: var(--brass); }

.suite-row.active .suite-dot {
    box-shadow: 0 0 8px currentColor;
}

.suite-row.active .suite-dot.available {
    box-shadow: 0 0 8px rgba(94, 196, 160, 0.6);
}

.suite-row.active .suite-dot.occupied {
    box-shadow: 0 0 8px rgba(160, 169, 184, 0.4);
}

.suite-row.active .suite-dot.amenity {
    box-shadow: 0 0 8px rgba(196, 162, 101, 0.5);
}

.suite-id {
    font-weight: 600;
    font-size: 13px;
    min-width: 38px;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    transition: color 0.6s ease;
}

.suite-row.active .suite-id {
    color: var(--text-primary);
}

.suite-divider {
    width: 1px;
    height: 12px;
    background: var(--divider);
    flex-shrink: 0;
}

.suite-name {
    font-weight: 400;
    font-size: 11.5px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
    transition: color 0.6s ease;
}

.suite-row.active .suite-name {
    color: var(--text-secondary);
}

.suite-row.active.available .suite-name {
    color: var(--available);
}

/* ── MAP AREA (center column) ─────────── */
.map-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    /* Let this grid cell shrink to its track instead of growing to the
       canvas's intrinsic pixel size — otherwise the map balloons and (in
       portrait) pushes the bottom panel off-screen. The ResizeObserver in
       main.js then re-fits the renderer to whatever space remains. */
    min-width: 0;
    min-height: 0;
    animation: fadeSlideIn 0.8s var(--ease-out) 0.2s both;
}

.map-frame {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

/* Faint grid overlay on map */
.map-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image:
        linear-gradient(var(--brass) 1px, transparent 1px),
        linear-gradient(90deg, var(--brass) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

/* Corner accents */
.corner-accent {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 2;
    pointer-events: none;
}
.corner-accent.tl { top: 8px; left: 8px; border-top: 1px solid rgba(196,162,101,0.18); border-left: 1px solid rgba(196,162,101,0.18); }
.corner-accent.tr { top: 8px; right: 8px; border-top: 1px solid rgba(196,162,101,0.18); border-right: 1px solid rgba(196,162,101,0.18); }
.corner-accent.bl { bottom: 8px; left: 8px; border-bottom: 1px solid rgba(196,162,101,0.18); border-left: 1px solid rgba(196,162,101,0.18); }
.corner-accent.br { bottom: 8px; right: 8px; border-bottom: 1px solid rgba(196,162,101,0.18); border-right: 1px solid rgba(196,162,101,0.18); }

#canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 0;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-tertiary);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.05em;
    z-index: 5;
}

/* ── FOOTER ───────────────────────────── */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 32px 14px;
    border-top: 1px solid var(--divider);
    flex-shrink: 0;
    z-index: 10;
    animation: fadeSlideIn 0.6s var(--ease-out) 0.5s both;
}

.footer-address {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.amenity-pills {
    display: flex;
    gap: 8px;
}

.amenity-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--brass-subtle);
    border: 1px solid rgba(196, 162, 101, 0.06);
}

.amenity-pill-icon {
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    color: var(--brass);   /* the injected SVG uses currentColor → brass, matching the map */
}

.amenity-pill-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--brass-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Permanent QR codes — stacked between the bottom portrait groups. */
.qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    align-self: center;
    flex: 0 0 auto;
}
.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 10px 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border-hi);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.qr-card-img {
    width: 77px;
    height: 77px;
    display: block;
    background: #fff;          /* light quiet-zone so the code scans on the dark UI */
    border-radius: 5px;
    padding: 5px;
    box-sizing: border-box;
}
.qr-card-label {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--brass);
    text-align: center;
    max-width: 140px;
    line-height: 1.25;
}

.floor-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floor-bars {
    display: flex;
    gap: 4px;
    align-items: center;
}

.floor-bar {
    height: 4px;
    border-radius: 2px;
}

.floor-bar.inactive { width: 8px; background: var(--text-muted); }
.floor-bar.active { width: 18px; background: var(--brass); }

.floor-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── PORTRAIT MODE (1080×1920) ──────────── */
/* Activated by ?portrait=1 URL param        */

html.portrait body {
    /* Stack everything vertically */
}

html.portrait .body-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    padding: 10px 16px;
}

/* Hide landscape side panels, show portrait row panels */
html.portrait .side-panel { display: none !important; }
html.portrait .portrait-panel { display: flex !important; }

.portrait-panel {
    display: none;
    gap: 10px;
    flex-shrink: 0;
}

html.portrait .portrait-panel.top { grid-row: 1; }
html.portrait .map-column { grid-row: 2; }
html.portrait .portrait-panel.bottom { grid-row: 3; }

/* Horizontal group cards for portrait */
html.portrait .group-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 10px 8px;
}

html.portrait .group-label {
    margin-bottom: 5px;
    padding: 0 6px;
}

html.portrait .group-label-text {
    font-size: 10px;
    letter-spacing: 0.14em;
}

html.portrait .group-label-line {
    width: 12px;
}

/* Suite rows become compact chip-grid */
html.portrait .suite-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px 6px;
}

html.portrait .suite-row {
    gap: 6px;
    padding: 3px 6px;
}

html.portrait .suite-id {
    font-size: 11.5px;
    min-width: 32px;
}

html.portrait .suite-divider {
    height: 10px;
}

html.portrait .suite-name {
    font-size: 10px;
}

html.portrait .suite-dot {
    width: 4px;
    height: 4px;
}

/* Compressed header for portrait */
html.portrait .header {
    padding: 14px 20px 10px;
}

html.portrait .header h1 {
    font-size: 26px;
}

html.portrait .header-subtitle {
    font-size: 10px;
}

html.portrait #clock-time {
    font-size: 22px;
}

html.portrait #clock-date {
    font-size: 9px;
}

html.portrait .header-legend {
    bottom: 10px;
}

html.portrait .legend-label {
    font-size: 10px;
}

/* Compressed footer for portrait */
html.portrait .footer {
    padding: 8px 20px 12px;
}

html.portrait .footer-address {
    font-size: 9px;
}

html.portrait .amenity-pill {
    padding: 4px 8px;
}

html.portrait .amenity-pill-icon {
    font-size: 11px;
}

html.portrait .amenity-pill-label {
    font-size: 9px;
}

html.portrait .floor-label {
    font-size: 9px;
}

/* Suite info card repositioned for portrait */
html.portrait #suite-info-card {
    bottom: 14px;
    right: 14px;
    width: 240px;
    padding: 14px;
}

/* ── ANIMATIONS ───────────────────────── */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Staggered card animations */
.group-card {
    opacity: 0;
    animation: fadeSlideIn 0.8s var(--ease-out) both;
}
.side-panel.left .group-card:nth-child(1) { animation-delay: 0.10s; }
.side-panel.left .group-card:nth-child(2) { animation-delay: 0.25s; }
.side-panel.right .group-card:nth-child(1) { animation-delay: 0.15s; }
.side-panel.right .group-card:nth-child(2) { animation-delay: 0.30s; }

/* Portrait panel card animations */
.portrait-panel.top .group-card:nth-child(1) { animation-delay: 0.10s; }
.portrait-panel.top .group-card:nth-child(2) { animation-delay: 0.15s; }
.portrait-panel.bottom .group-card:nth-child(1) { animation-delay: 0.30s; }
.portrait-panel.bottom .group-card:nth-child(2) { animation-delay: 0.35s; }

/* Suite info card overlay (on map) */
#suite-info-card {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 280px;
    padding: 18px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid var(--card-border-hi);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 100;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
#suite-info-card.hidden {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}
#suite-info-card .card-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
}
/* Real logos share the gold hairline border + rounded box with the initials
   badge, but fill edge-to-edge (no padding) over a per-logo fill color set
   inline from data.json's logo_fill — so the artwork reaches the border and any
   letterbox gap is painted to match, leaving no visible seam. The radial
   gradient is only a fallback for a logo with no fill. Scoped :not(.logo-badge)
   so the badge keeps its own dark monogram treatment. */
#suite-info-card .card-logo:not(.logo-badge) {
    box-sizing: border-box;
    padding: 0;
    background: radial-gradient(circle at 32% 26%, #302d24, #1a1914);
    border: 1px solid rgba(196, 162, 101, 0.30);
    overflow: hidden;
}

/* Initials fallback badge — rendered in place of a logo for occupied
   tenants that have no logo_url, so every tenant card looks intentional.
   Shares size/radius with .card-logo / .card-logo-sm; these rules add the
   monogram treatment (high specificity so they win over the base rules). */
.logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--brass);
    background: radial-gradient(circle at 32% 26%, #302d24, #1a1914);
    border: 1px solid rgba(196, 162, 101, 0.30);
}
/* Initials font scales to the number of letters (set via data-len in JS) and
   carries horizontal padding, so the monogram always fits and never touches the
   gold border, whether it's 2 letters ("BC") or 4 ("LZPM"). */
#suite-info-card .card-logo.logo-badge {
    font-size: 40px;
    padding: 0 10px;
}
#suite-info-card .card-logo.logo-badge[data-len="3"] { font-size: 32px; }
#suite-info-card .card-logo.logo-badge[data-len="4"] { font-size: 24px; }

.suite-label--card .card-logo-sm.logo-badge {
    font-size: 20px;
    padding: 0 5px;
}
.suite-label--card .card-logo-sm.logo-badge[data-len="3"] { font-size: 17px; }
.suite-label--card .card-logo-sm.logo-badge[data-len="4"] { font-size: 13px; }

html.portrait .suite-label--card .card-logo-sm.logo-badge {
    font-size: 16px;
}
html.portrait .suite-label--card .card-logo-sm.logo-badge[data-len="3"] { font-size: 13px; }
html.portrait .suite-label--card .card-logo-sm.logo-badge[data-len="4"] { font-size: 11px; }
#suite-info-card .card-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
#suite-info-card .card-suite-id {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}
#suite-info-card .card-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}
#suite-info-card .card-qr {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: block;
    border-radius: 4px;
}

/* ── CONTACT CARD LABEL (highlighted state) ── */
.suite-label--card {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    padding: 8px 14px 8px 8px !important;
    border-radius: 12px !important;
    background: rgba(30, 29, 25, 0.94) !important;
    border: 1px solid rgba(196, 162, 101, 0.25) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(196, 162, 101, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    opacity: 1 !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100 !important;
    pointer-events: none;
}

.suite-label--card .card-logo-sm {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    /* No background here: real logos get a fill from the :not(.logo-badge) rule
       below (or inline logo_fill), and initials badges get the gradient from
       .logo-badge. A base background would out-specify .logo-badge. */
}
/* Logos fill the gold box edge-to-edge over their per-logo fill (inline from
   logo_fill); the gradient is only a fallback when no fill is set. */
.suite-label--card .card-logo-sm:not(.logo-badge) {
    box-sizing: border-box;
    padding: 0;
    background: radial-gradient(circle at 32% 26%, #302d24, #1a1914);
    border: 1px solid rgba(196, 162, 101, 0.30);
    overflow: hidden;
}

.suite-label--card .card-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    white-space: nowrap;
}

.suite-label--card .card-company {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 14px;
    font-weight: 600;
    color: #eae7e0;
    line-height: 1.2;
}

.suite-label--card .card-suite {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #9e9a90;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── YOU ARE HERE MARKER ──────────────── */
.you-are-here {
    position: relative;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #c4a265;
    box-shadow: 0 0 12px rgba(196, 162, 101, 0.9);
    pointer-events: none;
    z-index: 200;
}

.you-are-here::before,
.you-are-here::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #c4a265;
    animation: yah-ring 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    pointer-events: none;
}

.you-are-here::after {
    animation-delay: 1.2s;
}

@keyframes yah-ring {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

/* Portrait adjustments for contact card */
html.portrait .suite-label--card {
    min-width: 150px;
    padding: 6px 10px 6px 6px !important;
}

html.portrait .suite-label--card .card-logo-sm {
    width: 40px;
    height: 40px;
}

html.portrait .suite-label--card .card-company {
    font-size: 12px;
}

html.portrait .suite-label--card .card-suite {
    font-size: 9px;
}

html.portrait .you-are-here {
    width: 12px;
    height: 12px;
}

/* ── DEBUG TOOLBAR (localhost only) ──── */
.debug-toolbar {
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 9999;
    background: rgba(20, 18, 14, 0.92);
    border: 1px solid rgba(196, 162, 101, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    color: #c4a265;
    min-width: 220px;
    backdrop-filter: blur(8px);
    pointer-events: auto;
    user-select: none;
}

.debug-toolbar .dbg-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    flex-wrap: wrap;
}

.debug-toolbar .dbg-title {
    border-bottom: 1px solid rgba(196, 162, 101, 0.25);
    margin-bottom: 4px;
    padding-bottom: 4px;
    font-weight: 700;
    letter-spacing: 0.12em;
    justify-content: space-between;
}

.debug-toolbar .dbg-label {
    flex: 0 0 44px;
    color: rgba(196, 162, 101, 0.65);
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.1em;
}

.debug-toolbar button {
    background: rgba(196, 162, 101, 0.08);
    border: 1px solid rgba(196, 162, 101, 0.25);
    color: #c4a265;
    padding: 3px 8px;
    border-radius: 4px;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.debug-toolbar button:hover {
    background: rgba(196, 162, 101, 0.18);
    border-color: rgba(196, 162, 101, 0.5);
}

.debug-toolbar button.dbg-on {
    background: rgba(196, 162, 101, 0.25);
    border-color: #c4a265;
    color: #fff;
}

.debug-toolbar .dbg-close {
    padding: 0 6px;
    font-size: 14px;
    line-height: 1;
}

.debug-toolbar .dbg-state {
    margin-left: auto;
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
}

.debug-toolbar .dbg-state.dbg-state-paused {
    color: #ffb84d;
}

.debug-toolbar .dbg-jump {
    flex: 1;
    background: rgba(196, 162, 101, 0.08);
    border: 1px solid rgba(196, 162, 101, 0.25);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    min-width: 0;
}

.debug-toolbar .dbg-jump:hover {
    background: rgba(196, 162, 101, 0.15);
    border-color: rgba(196, 162, 101, 0.5);
}

.debug-toolbar .dbg-jump option {
    background: #14120e;
    color: #fff;
}

.debug-toolbar .dbg-reset,
.debug-toolbar .dbg-reload {
    flex: 1;
    margin-top: 2px;
}

.debug-toolbar .dbg-suite-input {
    flex: 1;
    background: rgba(196, 162, 101, 0.08);
    border: 1px solid rgba(196, 162, 101, 0.25);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font: inherit;
    font-size: 11px;
    min-width: 0;
}

.debug-toolbar .dbg-suite-input:focus {
    outline: none;
    border-color: rgba(196, 162, 101, 0.6);
    background: rgba(196, 162, 101, 0.15);
}

.debug-toolbar .dbg-suite-input::placeholder {
    color: rgba(196, 162, 101, 0.5);
}

/* ── ERROR TOAST (transient top notification) ──── */
.error-toast-stack {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
    pointer-events: none;
}

.error-toast {
    background: rgba(20, 18, 14, 0.96);
    color: #fff;
    border-left: 3px solid #d44c4c;
    border-top: 1px solid rgba(196, 162, 101, 0.35);
    border-right: 1px solid rgba(196, 162, 101, 0.35);
    border-bottom: 1px solid rgba(196, 162, 101, 0.35);
    border-radius: 4px;
    padding: 10px 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    letter-spacing: 0.02em;
    max-width: 520px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
}

.error-toast.error-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.error-toast.error-toast--dismissing {
    opacity: 0;
    transform: translateY(-8px);
}

/* ── SAFE MODE (Samsung Frame TV emergency fallback) ──── */
/* Activated by ?safe-mode=1. The Tizen GPU on Frame TVs has crashed   */
/* on full-quality render — likely from compositing many backdrop-blur */
/* layers on top of a 4K-pixel-ratio WebGL canvas, plus the YAH pulse  */
/* animation. This rule set strips the GPU-heavy effects so the kiosk  */
/* still renders. main.js also caps setPixelRatio at 1 in safe mode.   */
html.safe-mode .group-card,
html.safe-mode .suite-label,
html.safe-mode .suite-label--card,
html.safe-mode #suite-info-card,
html.safe-mode .debug-toolbar,
html.safe-mode .error-toast {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.safe-mode .you-are-here::before,
html.safe-mode .you-are-here::after {
    display: none;
}

html.safe-mode .you-are-here {
    box-shadow: 0 0 6px rgba(196, 162, 101, 0.6);
}
