/* ============================================================
   Exhibition Floor Plan — Luxury UI
   Deep navy + warm gold on soft paper, serif display headings.
   ============================================================ */

:root {
    --navy: #1d2338;
    --navy-2: #2a3354;
    --navy-3: #3a4568;
    --gold: #c8a45c;
    --gold-deep: #ab8a43;
    --gold-soft: #e9d9b4;
    --coral: #e8625a;
    --coral-2: #ff8a5c;
    --teal: #0d9488;
    --teal-2: #2dd4bf;
    --amber: #ea8f1e;
    --amber-2: #fbbf24;
    --indigo: #4f46e5;
    --indigo-2: #818cf8;
    --rose: #db2777;
    --rose-2: #f472b6;
    --sky: #38bdf8;
    --ink: #232838;
    --ink-soft: #5b6172;
    --ink-faint: #8a8f9e;
    --paper: #ffffff;
    --paper-soft: #f6f3ec;
    --paper-warm: #faf8f3;
    --line: #e6e1d6;
    --line-soft: #efece3;
    --shadow-sm: 0 2px 10px rgba(29, 35, 56, 0.08);
    --shadow-md: 0 14px 34px rgba(29, 35, 56, 0.14);
    --shadow-lg: 0 30px 70px rgba(20, 24, 42, 0.3);
    --radius: 14px;
    --radius-lg: 18px;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: linear-gradient(160deg, #f4f1ea 0%, #ede8de 100%);
    overflow: hidden;
}

/* App Container */
.app-container {
    display: block;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Canvas Container */
.canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, #f0ede5 0%, #e7e2d6 100%);
    overflow: hidden;
}

#floorPlanCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#floorPlanCanvas:active {
    cursor: grabbing;
}

#floorPlanCanvas.clickable {
    cursor: pointer;
}

/* ---------------- Search Overlay ---------------- */
.search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    pointer-events: none;
}

/* Minimal Search Box — premium pill: icon + field + / shortcut badge */
.search-box-minimal {
    position: absolute;
    top: 20px;
    left: 20px;
    pointer-events: all;
    transition: all 0.3s ease;
}

.search-minimal-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 320px;
    max-width: calc(100vw - 40px);
    padding: 9px 12px 9px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background:
        linear-gradient(rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.96)) padding-box,
        linear-gradient(135deg, rgba(200, 164, 92, 0.85), rgba(200, 164, 92, 0.3) 45%, rgba(99, 102, 241, 0.55)) border-box;
    box-shadow: 0 12px 34px rgba(20, 24, 42, 0.22), 0 0 0 1px rgba(200, 164, 92, 0.1);
    backdrop-filter: blur(14px);
    transition: all 0.3s ease;
}

.search-minimal-icon {
    font-size: 15px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(200, 164, 92, 0.55));
    flex-shrink: 0;
}

.search-input-minimal {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    padding: 5px 0;
    font-size: 14px;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-overflow: ellipsis;
}

.search-input-minimal::placeholder {
    color: var(--ink-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-minimal-kbd {
    flex-shrink: 0;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: var(--gold-deep);
    background: linear-gradient(180deg, #fdf4df, #f1e3bf);
    border: 1px solid rgba(200, 164, 92, 0.5);
    border-radius: 7px;
    padding: 4px 8px;
    box-shadow: inset 0 -2px 0 rgba(200, 164, 92, 0.3), 0 1px 2px rgba(29, 35, 56, 0.15);
}

.search-minimal-wrap:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(20, 24, 42, 0.28), 0 0 0 1px rgba(200, 164, 92, 0.18);
}

.search-minimal-wrap:focus-within {
    border-color: transparent;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, var(--gold), rgba(200, 164, 92, 0.4) 45%, rgba(99, 102, 241, 0.65)) border-box;
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.22), 0 14px 38px rgba(20, 24, 42, 0.3);
}

/* Expanded Search Panel */
.search-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 420px;
    height: 100vh;
    background: var(--paper-warm);
    box-shadow: 6px 0 40px rgba(20, 24, 42, 0.22);
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    display: flex;
    flex-direction: column;
}

.search-panel.expanded {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.search-header {
    position: relative;
    padding: 30px 24px 22px;
    border-bottom: none;
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 55%, #38436b 100%);
    color: #f6f3ec;
    text-align: center;
}

.search-header::after {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.search-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    min-width: 0;
}

.search-title h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin: 0;
    text-align: center;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.close-search {
    flex-shrink: 0;
}

.close-search {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
    transition: all 0.2s ease;
    line-height: 1;
}

.close-search:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: rotate(90deg);
}

.search-subtitle {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.75;
    font-weight: 500;
    margin: 0;
    text-align: center;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

/* Search Mode Content */
.search-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.search-box-expanded {
    padding: 20px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--paper-soft);
    text-align: center;
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.search-menu-wrapper {
    position: relative;
    flex-shrink: 0;
}

.search-input-expanded {
    flex: 1;
    padding: 14px 18px;
    font-size: 15px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--paper);
    color: var(--ink);
}

.search-input-expanded:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.2);
}

.search-menu-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.search-menu-btn span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--navy-3);
    display: block;
    transition: background 0.2s ease;
}

.search-menu-btn:hover {
    border-color: var(--gold);
    box-shadow: 0 6px 16px rgba(200, 164, 92, 0.25);
}

.search-menu-btn:hover span {
    background: var(--gold-deep);
}

.search-menu-btn:focus-visible {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.25);
}

.search-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    max-width: 76vw;
    max-height: 58vh;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(200, 164, 92, 0.5);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #fdfaf2);
    box-shadow: 0 24px 60px rgba(20, 24, 42, 0.35), 0 0 0 1px rgba(200, 164, 92, 0.15);
    display: none;
    text-align: left;
    z-index: 30;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(200, 164, 92, 0.15);
}

.search-menu-dropdown::-webkit-scrollbar {
    width: 7px;
}

.search-menu-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold), var(--gold-deep));
    border-radius: 999px;
}

.search-menu-dropdown.open {
    display: block;
    animation: modalPop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.search-stats {
    font-size: 12px;
    color: var(--ink-faint);
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Company Details */
.company-details {
    flex: 1;
    padding: 26px 24px;
    overflow-y: auto;
    text-align: center;
}

.company-info {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.company-header {
    text-align: center;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line-soft);
    position: relative;
}

.company-header::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -1px;
    width: 56px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.company-name {
    font-size: 19px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 12px;
    line-height: 1.35;
    letter-spacing: 0.01em;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.booth-id-large {
    font-size: 15px;
    font-weight: 600;
    color: var(--gold-deep);
    background: linear-gradient(135deg, rgba(200, 164, 92, 0.14), rgba(200, 164, 92, 0.05));
    border: 1px solid rgba(200, 164, 92, 0.35);
    padding: 8px 18px;
    border-radius: 999px;
    display: inline-block;
    letter-spacing: 0.04em;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.company-data {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hashtag {
    background: var(--paper-soft);
    border: 1px solid var(--line-soft);
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 5px 12px;
    margin: 3px;
    font-size: 12px;
    display: inline-block;
    letter-spacing: 0.01em;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    border-left: 3px solid var(--gold);
    box-shadow: var(--shadow-sm);
}

.data-item .data-label {
    flex-shrink: 0;
}

.data-label {
    font-weight: 600;
    color: var(--ink-faint);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-value {
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
}

.company-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.action-btn {
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.02em;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: var(--gold-soft);
    box-shadow: 0 6px 18px rgba(29, 35, 56, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(29, 35, 56, 0.38);
}

.action-btn.secondary {
    background: var(--paper);
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.action-btn.secondary:hover {
    background: var(--paper-soft);
    color: var(--navy);
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* Exhibitor List */
.exhibitor-list {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    min-height: 200px;
}

.exhibitor-item {
    padding: 18px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--paper);
    position: relative;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.exhibitor-item:hover {
    background: #fffdf8;
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(29, 35, 56, 0.14);
}

.exhibitor-item.selected {
    background: linear-gradient(160deg, #fbf7ec, #f7f0df);
    border-color: var(--gold);
    box-shadow: 0 8px 22px rgba(200, 164, 92, 0.28);
}

.exhibitor-item.selected::before {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 14px;
    color: var(--gold-deep);
    font-weight: bold;
    font-size: 15px;
}

.booth-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--gold-deep);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
}

.booth-name::before {
    content: "🏛";
    margin-right: 6px;
    font-size: 13px;
}

.exhibitor-item .company-name {
    font-size: 14px;
    color: var(--navy);
    line-height: 1.45;
    margin-bottom: 8px;
    font-weight: 500;
    text-align: center;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.hall {
    font-size: 11px;
    color: var(--ink-soft);
    background: var(--paper-soft);
    padding: 4px 12px;
    border-radius: 999px;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.hall.H1 {
    background: #e8eef9;
    color: #33507a;
}

.hall.H2 {
    background: #e6f2e8;
    color: #3c6b47;
}

.hall.H3 {
    background: #f8ecd9;
    color: #96661f;
}

.hall.H3A {
    background: #f5e4e8;
    color: #8d4a5c;
}

.hall.HALL_5,
.hall.H5 {
    background: #e8eef9;
    color: #33507a;
}

.hall.HALL_6,
.hall.H6 {
    background: #e6f2e8;
    color: #3c6b47;
}

.hall.HALL_7,
.hall.H7 {
    background: #f8ecd9;
    color: #96661f;
}

.hall.HALL_8,
.hall.H8 {
    background: #f3e6f2;
    color: #754a7a;
}

.hall.HALL_9,
.hall.H9 {
    background: #e7edf5;
    color: #3f5879;
}

.hall.HALL_10,
.hall.H10 {
    background: #fdeee0;
    color: #a0591f;
}

.hall.FOOD {
    background: #fbf3d9;
    color: #8a6a1a;
}

.hall.ENTRANCE {
    background: #efe7f7;
    color: #6b4a9a;
}

/* Action Buttons */
.action-buttons {
    padding: 16px 20px;
    padding-bottom: 70px;
    border-top: 1px solid var(--line-soft);
    background: var(--paper-soft);
    display: flex;
    gap: 10px;
}

.waypoint-btn,
.clear-btn {
    flex: 1;
    padding: 13px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.02em;
}

.waypoint-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #2b2416;
    box-shadow: 0 6px 18px rgba(200, 164, 92, 0.4);
}

.waypoint-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(200, 164, 92, 0.5);
}

.clear-btn {
    background: var(--navy-3);
    color: #f1efe8;
}

.clear-btn:hover {
    background: var(--navy-2);
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 15px;
}

/* Loading */
.loading,
.canvas-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--ink-faint);
    font-size: 14px;
    letter-spacing: 0.04em;
}

.canvas-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, rgba(246, 243, 236, 0.97), rgba(237, 232, 222, 0.97));
    z-index: 5;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(200, 164, 92, 0.25);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ---------------- Canvas Controls ---------------- */
.canvas-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(200, 164, 92, 0.4);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

/* Stand-alone navigation buttons (zoom / home / account) — no row card,
   no glass, no shadows: solid, realistic UI controls */
.nav-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.nav-group .control-btn {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #d8d1bf;
    color: var(--navy-3);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.nav-group .control-btn:hover {
    color: #fff;
    transform: none;
    box-shadow: none;
}

.nav-group .control-btn:active {
    transform: translateY(1px);
    filter: brightness(0.93);
}

.nav-sep {
    display: none;
}

.account-btn {
    position: relative;
}

.account-avatar {
    font-size: 16px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(29, 35, 56, 0.25));
}

.account-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    background: linear-gradient(135deg, #d8d3c5, #b9b3a4);
    box-shadow: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.account-dot[data-state="admin"] {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
}

.account-dot[data-state="user"] {
    background: linear-gradient(135deg, var(--teal-2), var(--teal));
}

.account-dot[data-state="guest"] {
    background: linear-gradient(135deg, #e3ded2, #c2bcae);
}

.account-btn:hover .account-dot {
    transform: scale(1.2);
}

/* ---------------- Circular Tools Menu ----------------
   All map/editor tools live in one radial menu that pops up from a
   central FAB (adapted from the classic CSS circular-menu pattern:
   hidden checkbox as the state machine, items placed on a circle via
   transforms). The fan opens up-left so it never overflows the
   bottom-right corner where the FAB sits. */
.radial-menu {
    --radius: 5.5rem;
    --item-size: 2.25rem;
    --toggle-size: 3rem;
    --count: 6;
    position: relative;
    width: var(--toggle-size);
    height: var(--toggle-size);
    z-index: 12;
}

.radial-menu .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.radial-menu label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    border: 1.5px solid var(--gold);
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(29, 35, 56, 0.45);
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.radial-menu label:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 24px rgba(200, 164, 92, 0.5);
}

.radial-menu label:active {
    transform: scale(0.94);
}

.burger {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.burger span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: var(--gold-soft);
    transition: all 0.25s ease;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: calc(var(--toggle-size) / 2);
    bottom: calc(var(--toggle-size) / 2);
    width: 0;
    height: 0;
}

.menu-list li {
    position: absolute;
    left: 0;
    bottom: 0;
    width: var(--item-size);
    height: var(--item-size);
    transform: translate(-50%, 50%) rotate(var(--ang)) translate(0) rotate(calc(-1 * var(--ang)));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    transition-delay: calc((var(--count) - var(--i)) * 30ms);
}

.menu-list li button {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 17px;
    background: #fff;
    border: 1px solid rgba(200, 164, 92, 0.5);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(29, 35, 56, 0.25);
    cursor: pointer;
    color: var(--navy-3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.menu-list li button:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 20px rgba(200, 164, 92, 0.5);
}

.menu-list li button.active {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    border-color: var(--gold);
    color: var(--gold-soft);
}

#circToggle:checked ~ .menu-list li {
    transform: translate(-50%, 50%) rotate(var(--ang)) translate(var(--radius)) rotate(calc(-1 * var(--ang)));
    opacity: 1;
    pointer-events: auto;
    transition-delay: calc(var(--i) * 45ms);
}

/* Burger morphs into an X while the menu is open */
#circToggle:checked + label .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#circToggle:checked + label .burger span:nth-child(2) {
    opacity: 0;
}

#circToggle:checked + label .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
    .menu-list li,
    .burger span {
        transition: none !important;
    }
}

.control-btn {
    width: 46px;
    height: 46px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: var(--navy-3);
}

.control-btn:hover {
    background: var(--paper-soft);
    border-color: rgba(200, 164, 92, 0.4);
    color: var(--gold-deep);
    transform: translateY(-1px);
}

.control-btn.active {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    border-color: var(--gold);
    color: var(--gold-soft);
    box-shadow: 0 6px 16px rgba(29, 35, 56, 0.35);
}

.control-btn.active:hover {
    background: var(--navy-2);
    color: var(--gold-soft);
    transform: none;
}

/* ---------------- Edit Toolbar ---------------- */
.edit-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(150deg, rgba(29, 35, 56, 0.96), rgba(42, 51, 84, 0.96));
    border: 1px solid rgba(200, 164, 92, 0.55);
    border-radius: 16px;
    padding: 10px 18px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    max-width: min(860px, calc(100vw - 220px));
}

.edit-toolbar-text {
    font-size: 12px;
    color: rgba(246, 243, 236, 0.82);
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

.edit-toolbar-text strong {
    color: var(--gold-soft);
    font-weight: 700;
}

.edit-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.edit-btn {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #f1efe8;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.02em;
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.edit-btn.danger {
    background: rgba(190, 60, 60, 0.85);
    border-color: rgba(255, 160, 160, 0.3);
}

.edit-btn.danger:hover {
    background: #b03a3a;
}

.edit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------------- Edit Properties Panel ---------------- */
.edit-props {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 260px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(200, 164, 92, 0.45);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    z-index: 10;
    text-align: center;
}

.edit-props-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 8px;
}

.edit-props-header strong {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.02em;
    min-width: 0;
    overflow-wrap: anywhere;
}

.edit-props-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.edit-props-chip {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8eef9, #dce6f5);
    color: #33507a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.edit-props-chip.group {
    background: linear-gradient(135deg, #e7f2e2, #d8e9d0);
    color: #3c6b47;
}

.edit-props-index {
    font-size: 11px;
    color: var(--ink-faint);
    font-weight: 600;
}

.edit-props-group {
    margin-bottom: 10px;
}

.edit-props-group-text {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.55;
    margin-bottom: 10px;
    text-align: center;
    overflow-wrap: anywhere;
}

.edit-btn.join {
    width: 100%;
    background: linear-gradient(135deg, #5d8a5a, #4a7448);
    border: none;
    padding: 9px 12px;
    font-size: 13px;
}

.edit-btn.join:hover {
    background: #41683f;
}

.edit-props-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.edit-props-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-faint);
    min-width: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.edit-props-grid label.full {
    grid-column: 1 / -1;
}

.edit-props-grid input,
.edit-props-grid select {
    width: 100%;
    padding: 7px 9px;
    font-size: 13px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: none;
    color: var(--ink);
    background: var(--paper);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-props-grid input:focus,
.edit-props-grid select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.18);
}

.edit-props-grid input[readonly] {
    background: var(--paper-soft);
    color: var(--ink-faint);
}

.edit-props-rotate-quick {
    display: flex;
    gap: 6px;
}

.edit-props-rotate-quick .edit-btn {
    flex: 1;
    padding: 6px 4px;
    font-size: 11px;
    background: rgba(29, 35, 56, 0.85);
    border: none;
}

.edit-props-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.edit-props-actions .edit-btn,
.edit-props-actions2 .edit-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
}

.edit-props-actions .edit-btn {
    background: rgba(29, 35, 56, 0.85);
    border: none;
}

.edit-props-actions2 {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.edit-btn.dup {
    background: linear-gradient(135deg, #4a6a8a, #3d5a77);
    border: none;
}

.edit-btn.dup:hover {
    background: #34506b;
}

.edit-props-hint {
    margin-top: 10px;
    font-size: 11px;
    color: var(--ink-faint);
    line-height: 1.5;
    text-align: center;
}

/* ---------------- App Info ---------------- */
.app-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(200, 164, 92, 0.4);
    padding: 11px 18px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    font-size: 12px;
    display: flex;
    gap: 18px;
    z-index: 10;
    text-align: center;
    max-width: calc(100vw - 40px);
    flex-wrap: wrap;
    justify-content: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.info-item .label {
    color: var(--ink-faint);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 10px;
}

.info-item span:not(.label) {
    color: var(--navy);
    font-weight: 700;
}

/* Touch Instructions */
.touch-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(29, 35, 56, 0.88);
    border: 1px solid rgba(200, 164, 92, 0.5);
    color: #f6f3ec;
    padding: 18px 28px;
    border-radius: 16px;
    font-size: 14px;
    z-index: 8;
    opacity: 0;
    animation: fadeInOut 5s ease-in-out;
    text-align: center;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    max-width: min(88vw, 640px);
    overflow-wrap: anywhere;
    line-height: 1.6;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
    }

    20%,
    80% {
        opacity: 1;
    }
}

/* Message Box */
.message-box {
    position: fixed;
    bottom: 24px;
    right: 110px;
    max-width: min(74vw, 620px);
    padding: 14px 26px;
    background: linear-gradient(150deg, var(--navy), var(--navy-2));
    border: 1px solid rgba(200, 164, 92, 0.6);
    color: var(--gold-soft);
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.show-fade {
    animation: fadeInOut 5s ease-in-out;
}

/* ---------------- Modals ---------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 24, 42, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    background: var(--paper-warm);
    border: 1px solid rgba(200, 164, 92, 0.4);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    position: relative;
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.02em;
}

.modal-close {
    background: var(--paper-soft);
    border: 1px solid var(--line);
    font-size: 14px;
    cursor: pointer;
    color: var(--ink-soft);
    padding: 5px 9px;
    border-radius: 999px;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--navy);
    color: var(--gold-soft);
    border-color: var(--navy);
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.modal-body strong {
    color: var(--navy);
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    padding: 11px 22px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: var(--gold-soft);
    box-shadow: 0 6px 16px rgba(29, 35, 56, 0.3);
}

.btn-primary:hover {
    background: var(--navy-2);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--paper);
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.btn-secondary:hover {
    background: var(--paper-soft);
    color: var(--navy);
    border-color: var(--gold);
}

/* Change Background modal */
.bg-note {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.6;
}

.bg-dropzone {
    border: 2px dashed rgba(200, 164, 92, 0.6);
    border-radius: 14px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--paper-soft);
    color: var(--ink-soft);
    font-size: 14px;
}

.bg-dropzone:hover,
.bg-dropzone.drag {
    border-color: var(--gold);
    background: #fdf8ec;
    box-shadow: 0 0 0 4px rgba(200, 164, 92, 0.15);
}

.bg-dropzone p {
    margin: 0;
    line-height: 1.6;
}

.bg-drop-icon {
    font-size: 30px;
    margin-bottom: 8px;
}

.bg-drop-hint {
    font-size: 12px;
    color: var(--ink-faint);
}

.bg-status {
    margin-top: 12px;
    font-size: 13px;
    color: var(--navy);
    font-weight: 600;
    min-height: 20px;
    text-align: center;
}

.bg-cdr-note {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f8ecd9;
    border: 1px solid #e8c88a;
    border-radius: 10px;
    color: #7a5518;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

.bg-cdr-note code {
    background: rgba(122, 85, 24, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
}

.bg-warn {
    margin-top: 14px;
    font-size: 11px;
    color: var(--ink-faint);
    line-height: 1.55;
    text-align: center;
}

/* New booth name modal */
.modal.modal-sm {
    width: 340px;
    max-width: calc(100vw - 48px);
}

.booth-name-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
}

.booth-name-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    color: var(--ink);
    transition: border-color 0.2s ease;
}

.booth-name-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.18);
}

.booth-name-size {
    margin-top: 10px;
    font-size: 12px;
    color: var(--ink-faint);
    text-align: center;
}

/* ---------------- Admin Panel ---------------- */
.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 22, 40, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal {
    background: var(--paper-warm);
    border: 1px solid rgba(200, 164, 92, 0.5);
    border-radius: var(--radius-lg);
    width: min(1120px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 26px;
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 60%, #38436b 100%);
    position: relative;
}

.admin-header::after {
    content: '';
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.admin-header h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    color: #f6f3ec;
    letter-spacing: 0.03em;
    text-align: center;
}

.admin-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.admin-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: rotate(90deg);
}

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 26px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--paper-soft);
}

.admin-search {
    flex: 1;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
    outline: none;
    min-width: 0;
    background: var(--paper);
    color: var(--ink);
    transition: all 0.2s ease;
}

.admin-search:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.18);
}

.admin-stats {
    font-size: 12px;
    color: var(--ink-faint);
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
}

.admin-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    background: var(--navy-3);
    color: #f1efe8;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-align: center;
    letter-spacing: 0.02em;
}

.admin-btn:hover {
    background: var(--navy-2);
    transform: translateY(-1px);
}

.admin-btn.primary {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: var(--gold-soft);
    box-shadow: 0 5px 14px rgba(29, 35, 56, 0.3);
}

.admin-btn.primary:hover {
    background: var(--navy-2);
}

.admin-btn.danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.admin-btn.danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
}

.admin-fac-actions {
    padding: 0 0 10px;
}

.admin-bulk {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--paper);
    justify-content: center;
}

.admin-bulk-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-bulk-input {
    width: 180px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 13px;
    text-align: center;
    outline: none;
    background: var(--paper);
    color: var(--ink);
}

.admin-bulk-input:focus {
    border-color: var(--gold);
}

/* Facilities label/icon editor */
.admin-facilities {
    margin: 0 16px 10px;
    padding: 12px 14px;
    border: 1px solid rgba(200, 164, 92, 0.4);
    border-radius: 14px;
    background: linear-gradient(180deg, #fdfbf6, #f8f4ea);
}

.admin-fac-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 10px;
}

.admin-fac-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-fac-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-fac-icon {
    flex-shrink: 0;
    width: 42px;
    padding: 6px 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.admin-fac-icon:focus,
.admin-fac-label:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.18);
}

.admin-fac-label {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease;
}

.admin-fac-key {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--ink-faint);
    background: var(--paper-soft);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 3px 10px;
}

.admin-fac-count {
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-deep);
    background: linear-gradient(135deg, rgba(200, 164, 92, 0.18), rgba(200, 164, 92, 0.06));
    border: 1px solid rgba(200, 164, 92, 0.35);
    border-radius: 999px;
    padding: 3px 8px;
}

.admin-table-wrap {
    flex: 1;
    overflow: auto;
    min-height: 200px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(150deg, var(--navy), var(--navy-2));
    color: var(--gold-soft);
    text-align: center;
    padding: 12px 16px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-bottom: 2px solid var(--gold);
    z-index: 1;
}

.admin-table td {
    padding: 7px 14px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    text-align: center;
}

.admin-table tbody tr:nth-child(even) td {
    background: #fbf9f3;
}

.admin-table tr:hover td {
    background: #f6f1e4;
}

.admin-table tr.dirty td {
    background: linear-gradient(160deg, #f2f7ec, #e9f2e0);
}

.admin-table tr.dirty:hover td {
    background: #e0ecd2;
}

.admin-table .admin-booths {
    font-weight: 700;
    color: var(--gold-deep);
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.admin-table .admin-input {
    text-align: center;
}

.admin-table td:first-child,
.admin-table th:first-child {
    text-align: center;
}

.admin-input {
    width: 100%;
    min-width: 150px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 13px;
    outline: none;
    background: var(--paper);
    color: var(--ink);
    transition: all 0.2s ease;
}

.admin-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.16);
}

.admin-input.admin-num {
    min-width: 70px;
    width: 70px;
}

.admin-state {
    text-align: center;
    color: #4a7448;
    font-weight: 700;
    font-size: 14px;
}

/* Hashtag manual input + dropdown picker */
.admin-hashtag {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.admin-hashtag .admin-input {
    min-width: 180px;
}

.admin-tag-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: all 0.2s ease;
}

.admin-tag-btn:hover {
    border-color: var(--gold);
    color: var(--gold-deep);
    background: #fdfaf3;
}

.admin-tag-dropdown {
    position: fixed;
    z-index: 2100;
    min-width: 230px;
    max-width: 290px;
    background: var(--paper);
    border: 1px solid rgba(200, 164, 92, 0.5);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    padding: 6px;
}

.admin-tag-option {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: none;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s ease;
}

.admin-tag-option:hover {
    background: var(--navy);
    color: var(--gold-soft);
}

.admin-tag-empty {
    padding: 10px 12px;
    font-size: 12px;
    color: var(--ink-faint);
    text-align: center;
}

.admin-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 26px;
    border-top: 1px solid var(--line-soft);
    background: var(--paper-soft);
}

.admin-note {
    font-size: 12px;
    color: var(--ink-faint);
    line-height: 1.55;
    text-align: center;
    flex: 1;
}

.admin-footer-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Autosave indicator + background scale checkbox */
.autosave-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #3c6b47;
    font-weight: 600;
    background: #e9f2e0;
    border: 1px solid #d3e4c4;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.bg-scale {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
}

.bg-scale input {
    accent-color: var(--gold);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.admin-note code {
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--gold-deep);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 11px;
}

/* ============================================================
   Colour & Motion — playful accents that match the circular
   menu, layered over the luxury base. Every accent respects
   prefers-reduced-motion.
   ============================================================ */

/* Circular menu items — each tool gets its own vivid identity */
.menu-list li button {
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 18px rgba(29, 35, 56, 0.28);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.menu-list li:nth-child(1) button {
    background: linear-gradient(135deg, var(--coral-2), var(--coral));
}

.menu-list li:nth-child(2) button {
    background: linear-gradient(135deg, var(--teal-2), var(--teal));
}

.menu-list li:nth-child(3) button {
    background: linear-gradient(135deg, var(--amber-2), var(--amber));
}

.menu-list li:nth-child(4) button {
    background: linear-gradient(135deg, var(--indigo-2), var(--indigo));
}

.menu-list li:nth-child(5) button {
    background: linear-gradient(135deg, var(--rose-2), var(--rose));
}

.menu-list li:nth-child(6) button {
    background: linear-gradient(135deg, var(--sky), #0284c7);
}

.menu-list li button:hover {
    transform: scale(1.18) rotate(6deg);
    box-shadow: 0 12px 28px rgba(29, 35, 56, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.menu-list li button.active {
    background: #fff;
    border-color: var(--coral);
    color: var(--coral);
    text-shadow: none;
    box-shadow: 0 0 0 4px rgba(232, 98, 90, 0.3), 0 8px 22px rgba(29, 35, 56, 0.3);
}

/* FAB — rotating rainbow ring + breathing glow */
.radial-menu label {
    z-index: 2;
    animation: fabPulse 2.6s ease-in-out infinite;
}

.radial-menu label::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--gold), var(--coral), var(--teal-2), var(--indigo-2), var(--rose-2), var(--amber-2), var(--gold));
    z-index: -1;
    filter: blur(3px);
    opacity: 0.8;
    animation: fabSpin 9s linear infinite;
}

.radial-menu label:active::before {
    animation-duration: 1.4s;
}

/* Zoom / home card — colourful hover identities */
.control-btn:hover {
    transform: translateY(-2px) scale(1.07);
    color: #fff;
}

#zoomInBtn:hover {
    background: var(--teal);
    border-color: var(--teal-2);
}

#zoomOutBtn:hover {
    background: var(--amber);
    border-color: var(--amber-2);
}

#resetViewBtn:hover {
    background: var(--coral);
    border-color: var(--coral-2);
}

.control-btn.active {
    background: linear-gradient(135deg, var(--indigo-2), var(--indigo));
    border-color: var(--indigo-2);
    color: #fff;
}

/* Status pill — colourful values + entrance */
.app-info {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.94), rgba(250, 248, 243, 0.94));
    border: 1px solid rgba(200, 164, 92, 0.45);
    animation: slideUp 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.info-item:nth-child(1) span:not(.label) {
    color: var(--teal);
}

.info-item:nth-child(2) span:not(.label) {
    color: var(--indigo);
}

.info-item:nth-child(3) span:not(.label) {
    color: var(--rose);
}

/* Search bar — golden glow pulse on focus */
.search-minimal-wrap:focus-within {
    animation: glowPulse 2s ease-in-out infinite;
}

.search-input-expanded:focus {
    border-color: var(--gold);
    animation: glowPulse 2s ease-in-out infinite;
}

/* Panel headers — slowly shifting colour gradients */
.search-header,
.admin-header {
    background: linear-gradient(120deg, #2a3354 0%, #3d3a6b 30%, #7c3a6d 60%, #2a3354 100%);
    background-size: 300% 300%;
    animation: headerShift 14s ease infinite;
}

/* Primary buttons — animated gradient + shimmer sweep */
.btn-primary,
.action-btn.primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, #2a3354, #3d3a6b, #4f46e5, #7c3a6d, #2a3354);
    background-size: 300% 300%;
    animation: headerShift 8s ease infinite;
}

.btn-primary::after,
.action-btn.primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3.6s ease infinite;
    pointer-events: none;
}

.btn-primary:hover,
.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.45);
}

/* Waypoint button — glowing gold pulse */
.waypoint-btn {
    position: relative;
    overflow: hidden;
    animation: goldGlow 2.8s ease-in-out infinite;
}

.waypoint-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3s ease infinite;
}

.btn-secondary:hover {
    border-color: var(--indigo-2);
    color: var(--indigo);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.22);
}

/* Modals — pop in */
.modal {
    animation: modalPop 0.4s cubic-bezier(0.34, 1.5, 0.64, 1) both;
}

/* Message toast — lively slide-up */
.message-box {
    background: linear-gradient(120deg, #2a3354, #4f46e5);
    border: 1px solid var(--gold);
    color: #fff;
    box-shadow: 0 12px 34px rgba(29, 35, 56, 0.45);
    border-radius: 18px;
}

.message-box.show-fade {
    animation: msgPop 5s ease-in-out;
}

/* Company detail cards — colour-coded accents */
.data-item:nth-child(1) {
    border-left-color: var(--teal-2);
}

.data-item:nth-child(2) {
    border-left-color: var(--indigo-2);
}

.data-item:nth-child(3) {
    border-left-color: var(--coral);
}

/* Hashtag chips — pastel rainbow cycling */
.hashtag:nth-child(6n + 1) {
    background: linear-gradient(135deg, #e0f2f1, #ccfbf1);
    border-color: rgba(13, 148, 136, 0.3);
    color: #0f766e;
}

.hashtag:nth-child(6n + 2) {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-color: rgba(79, 70, 229, 0.3);
    color: #4338ca;
}

.hashtag:nth-child(6n + 3) {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: rgba(234, 143, 30, 0.35);
    color: #92400e;
}

.hashtag:nth-child(6n + 4) {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    border-color: rgba(219, 39, 119, 0.3);
    color: #9d174d;
}

.hashtag:nth-child(6n + 5) {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: rgba(56, 189, 248, 0.35);
    color: #1d4ed8;
}

.hashtag:nth-child(6n) {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    border-color: rgba(232, 98, 90, 0.35);
    color: #9a3412;
}

/* Keyframes */
@keyframes fabSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes fabPulse {
    0%,
    100% {
        box-shadow: 0 6px 18px rgba(29, 35, 56, 0.45);
    }
    50% {
        box-shadow: 0 6px 28px rgba(200, 164, 92, 0.75);
    }
}

@keyframes headerShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        left: -70%;
    }
    60%,
    100% {
        left: 120%;
    }
}

@keyframes glowPulse {
    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.28), 0 10px 30px rgba(29, 35, 56, 0.18);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35), 0 10px 34px rgba(56, 189, 248, 0.3);
    }
}

@keyframes goldGlow {
    0%,
    100% {
        box-shadow: 0 6px 18px rgba(200, 164, 92, 0.4);
    }
    50% {
        box-shadow: 0 6px 30px rgba(200, 164, 92, 0.8);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.86) translateY(14px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes msgPop {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.92);
    }
    10% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    85% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .radial-menu label,
    .radial-menu label::before,
    .control-btn,
    .app-info,
    .search-input-minimal,
    .search-minimal-wrap,
    .search-header,
    .admin-header,
    .btn-primary,
    .action-btn.primary,
    .waypoint-btn,
    .btn-primary::after,
    .action-btn.primary::after,
    .waypoint-btn::after,
    .modal,
    .message-box {
        animation: none !important;
    }
}

/* ============================================================
   Premium Sidebar — realistic, layered event-app styling.
   ============================================================ */

.search-header {
    padding: 26px 24px 24px;
    background:
        radial-gradient(120% 90% at 12% 0%, rgba(200, 164, 92, 0.28), transparent 55%),
        radial-gradient(130% 110% at 100% 110%, rgba(99, 102, 241, 0.4), transparent 60%),
        linear-gradient(120deg, #2a3354 0%, #3d3a6b 30%, #7c3a6d 60%, #2a3354 100%);
    background-size: 100% 100%, 100% 100%, 300% 300%;
    animation: headerShift 14s ease infinite;
}

.search-header-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 30px 34px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 72px 88px, rgba(255, 255, 255, 0.28), transparent),
        radial-gradient(2px 2px at 130px 46px, rgba(255, 255, 255, 0.22), transparent),
        radial-gradient(1.5px 1.5px at 205px 92px, rgba(255, 255, 255, 0.34), transparent),
        radial-gradient(1px 1px at 262px 30px, rgba(255, 255, 255, 0.22), transparent),
        radial-gradient(2px 2px at 330px 76px, rgba(255, 255, 255, 0.28), transparent),
        radial-gradient(1.5px 1.5px at 380px 30px, rgba(255, 255, 255, 0.34), transparent);
    opacity: 0.55;
}

.search-monogram {
    position: relative;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
    border: 1.5px solid rgba(200, 164, 92, 0.7);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.search-monogram::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(200, 164, 92, 0.45);
    animation: fabSpin 14s linear infinite;
}

.search-monogram span {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-soft);
    letter-spacing: 0.08em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* The uploaded mascot replaces the monogram in the sidebar header too */
.search-monogram img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: none;
}

.search-monogram.has-mascot img {
    display: block;
}

.search-monogram.has-mascot span {
    display: none;
}

/* Sidebar mascot variants */
.search-monogram.variant-banner {
    width: min(210px, 78%);
    height: 46px;
    margin-bottom: 14px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.search-monogram.variant-banner img {
    border-radius: 14px;
}

.search-monogram.variant-monogram.has-mascot img {
    display: none;
}

.search-monogram.variant-monogram.has-mascot span {
    display: block;
}

/* Browse menu (facilities / halls / countries / hashtags) — built into the
   hamburger menu next to the search box, styled as a gold card */

/* Optional hall selector — chips at the top of the browse menu */
.hall-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 4px 10px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(200, 164, 92, 0.22);
}

.hall-chip {
    font-family: inherit;
    padding: 5px 13px;
    border-radius: 8px;
    border: 1px solid #d8d1bf;
    background: #fff;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hall-chip:hover {
    border-color: var(--gold);
    color: var(--gold-deep);
}

.hall-chip.active {
    background: linear-gradient(135deg, var(--indigo-2), var(--indigo));
    border-color: var(--indigo-2);
    color: #fff;
}

/* Active hall indicator in the search panel (click to remove) */
.hall-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 3px 11px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.05));
    color: var(--indigo);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.hall-active-chip:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.26), rgba(99, 102, 241, 0.1));
    border-color: var(--indigo);
}

.cat-section {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin: 12px 6px 6px;
}

.cat-section:first-child {
    margin-top: 2px;
}

.cat-sec-icon {
    font-size: 12px;
}

.cat-sec-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(200, 164, 92, 0.5), transparent);
}

.cat-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.cat-option:hover {
    background: linear-gradient(135deg, #fffaf0, #f8f0dc);
    border-color: rgba(200, 164, 92, 0.4);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(200, 164, 92, 0.2);
}

.cat-ico {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.18), 0 3px 8px rgba(29, 35, 56, 0.18);
}

.cat-ico.facility {
    background: linear-gradient(135deg, var(--teal-2), var(--teal));
}

.cat-ico.hall {
    background: linear-gradient(135deg, var(--indigo-2), var(--indigo));
}

.cat-ico.country {
    background: linear-gradient(135deg, var(--coral-2), var(--coral));
}

.cat-ico.hashtag {
    background: linear-gradient(135deg, var(--rose-2), var(--rose));
}

.cat-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.cat-count {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gold-deep);
    background: linear-gradient(135deg, rgba(200, 164, 92, 0.18), rgba(200, 164, 92, 0.06));
    border: 1px solid rgba(200, 164, 92, 0.35);
    min-width: 22px;
    padding: 1px 6px;
    border-radius: 999px;
    text-align: center;
}

.cat-empty {
    padding: 6px 12px;
    color: var(--ink-faint);
    font-size: 12px;
}

/* ============================================================
   Login & roles — administrator gets all menus, users view only.
   ============================================================ */

.login-modal {
    position: relative;
    max-width: 380px;
    overflow: hidden;
}

.login-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(200, 164, 92, 0.55);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    color: var(--gold-soft);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.25s ease;
}

.login-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--gold);
    transform: rotate(90deg) scale(1.05);
}

.login-guest {
    margin: 12px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--ink-faint);
}

.login-guest button {
    border: none;
    background: none;
    padding: 2px 4px;
    color: var(--indigo);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.login-guest button:hover {
    color: var(--coral);
}

.login-brand {
    position: relative;
    padding: 30px 24px 24px;
    background:
        radial-gradient(120% 90% at 12% 0%, rgba(200, 164, 92, 0.28), transparent 55%),
        radial-gradient(130% 110% at 100% 110%, rgba(99, 102, 241, 0.4), transparent 60%),
        linear-gradient(120deg, #2a3354 0%, #3d3a6b 30%, #7c3a6d 60%, #2a3354 100%);
    background-size: 100% 100%, 100% 100%, 300% 300%;
    animation: headerShift 14s ease infinite;
    text-align: center;
    color: #f6f3ec;
}

.login-monogram {
    position: relative;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    color: var(--gold-soft);
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
    border: 1.5px solid rgba(200, 164, 92, 0.7);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-monogram::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(200, 164, 92, 0.45);
    animation: fabSpin 14s linear infinite;
}

.login-brand h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px;
}

.login-brand p {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.75;
    margin: 0;
}

.login-body {
    padding: 22px 26px 26px;
}

.login-btn {
    width: 100%;
    margin-top: 6px;
}

.login-error {
    min-height: 18px;
    font-size: 12px;
    color: var(--coral);
    font-weight: 600;
    margin: 6px 0 2px;
}

.login-hint {
    margin-top: 14px;
    font-size: 11px;
    color: var(--ink-faint);
    text-align: center;
    line-height: 1.6;
}

/* Account button + popup in the nav card */
.account-wrap {
    position: relative;
}

.account-pop {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 190px;
    padding: 12px;
    border: 1px solid rgba(200, 164, 92, 0.5);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
    z-index: 40;
    animation: modalPop 0.22s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.account-role {
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
    padding: 6px 8px 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
    letter-spacing: 0.04em;
}

.account-signout {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--coral);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-signout:hover {
    background: linear-gradient(135deg, #fff1ee, #ffe4df);
    border-color: var(--coral);
}

/* Regular users get a read-only app: hide the admin tools menu */
body.role-user .radial-menu {
    display: none;
}

/* Mascot modal — sidebar branding fields */
.brand-section {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: linear-gradient(180deg, #fdfbf6, #f8f4ea);
    text-align: left;
}

.brand-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.02em;
}

.brand-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 12px 0 6px;
}

.variant-row {
    display: flex;
    gap: 8px;
}

.variant-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-opt:has(input:checked) {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(200, 164, 92, 0.18), rgba(200, 164, 92, 0.06));
    color: var(--gold-deep);
    box-shadow: 0 4px 12px rgba(200, 164, 92, 0.25);
}

.variant-opt input {
    accent-color: var(--gold-deep);
}

.brand-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    outline: none;
    background: var(--paper);
    color: var(--ink);
    transition: all 0.25s ease;
}

.brand-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.2);
}

.search-title h2 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}



.search-box-expanded {
    padding: 18px 20px 16px;
    background: linear-gradient(180deg, #fbf9f3, #f5f1e7);
}

.search-field {
    position: relative;
    flex: 1;
}

.search-field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
    pointer-events: none;
}

.search-input-expanded {
    padding: 14px 16px 14px 42px;
    border-radius: 13px;
    box-shadow: 0 2px 8px rgba(29, 35, 56, 0.06);
}

.search-stats {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    padding: 5px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(200, 164, 92, 0.16), rgba(200, 164, 92, 0.06));
    border: 1px solid rgba(200, 164, 92, 0.4);
    color: var(--ink-soft);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.search-stats span {
    color: var(--gold-deep);
    font-weight: 800;
}

/* Exhibitor cards — avatar, chips, hall badge, staggered entrance */
.exhibitor-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    margin-bottom: 11px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(180deg, #ffffff, #fdfdf9);
    position: relative;
    text-align: left;
    box-shadow: 0 2px 10px rgba(29, 35, 56, 0.06);
    overflow: hidden;
    animation: cardIn 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.exhibitor-item:nth-child(1) { animation-delay: 0.02s; }
.exhibitor-item:nth-child(2) { animation-delay: 0.06s; }
.exhibitor-item:nth-child(3) { animation-delay: 0.1s; }
.exhibitor-item:nth-child(4) { animation-delay: 0.14s; }
.exhibitor-item:nth-child(5) { animation-delay: 0.18s; }
.exhibitor-item:nth-child(6) { animation-delay: 0.22s; }
.exhibitor-item:nth-child(7) { animation-delay: 0.26s; }
.exhibitor-item:nth-child(8) { animation-delay: 0.3s; }

.exhibitor-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold), var(--coral));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exhibitor-item:hover::before,
.exhibitor-item.selected::before {
    opacity: 1;
}

.exhibitor-item:hover {
    border-color: rgba(200, 164, 92, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(29, 35, 56, 0.16);
}

.exhibitor-item.selected {
    border-color: var(--gold);
    background: linear-gradient(180deg, #fdf9ee, #faf4e3);
    box-shadow: 0 8px 24px rgba(200, 164, 92, 0.3);
}

.exhibitor-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 -5px 9px rgba(0, 0, 0, 0.2), 0 5px 12px rgba(29, 35, 56, 0.18);
}

.exhibitor-item:nth-child(6n + 1) .exhibitor-avatar { background: linear-gradient(135deg, var(--coral-2), var(--coral)); }
.exhibitor-item:nth-child(6n + 2) .exhibitor-avatar { background: linear-gradient(135deg, var(--teal-2), var(--teal)); }
.exhibitor-item:nth-child(6n + 3) .exhibitor-avatar { background: linear-gradient(135deg, var(--amber-2), var(--amber)); }
.exhibitor-item:nth-child(6n + 4) .exhibitor-avatar { background: linear-gradient(135deg, var(--indigo-2), var(--indigo)); }
.exhibitor-item:nth-child(6n + 5) .exhibitor-avatar { background: linear-gradient(135deg, var(--rose-2), var(--rose)); }
.exhibitor-item:nth-child(6n) .exhibitor-avatar { background: linear-gradient(135deg, var(--sky), #0284c7); }

.exhibitor-main {
    flex: 1;
    min-width: 0;
}

.exhibitor-company {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
    margin-bottom: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.exhibitor-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.exhibitor-booths {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-deep);
    background: linear-gradient(135deg, rgba(200, 164, 92, 0.16), rgba(200, 164, 92, 0.05));
    border: 1px solid rgba(200, 164, 92, 0.35);
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.hall-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    padding: 3px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--indigo-2), var(--indigo));
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.hall-badge.H09,
.hall-badge.H10 {
    background: linear-gradient(135deg, var(--coral-2), var(--coral));
    box-shadow: 0 2px 6px rgba(232, 98, 90, 0.3);
}

.hall-badge.H06,
.hall-badge.H07 {
    background: linear-gradient(135deg, var(--teal-2), var(--teal));
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.exhibitor-arrow {
    color: var(--ink-faint);
    font-size: 16px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.exhibitor-item:hover .exhibitor-arrow {
    transform: translateX(3px);
    color: var(--gold-deep);
}

/* ============================================================
   Floating Mascot — top-right, uploadable, gently bobbing.
   ============================================================ */

.mascot-box {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 86px;
    height: 86px;
    z-index: 9;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
    border: 2px solid rgba(200, 164, 92, 0.75);
    box-shadow: 0 12px 30px rgba(29, 35, 56, 0.28), inset 0 0 0 3px rgba(255, 255, 255, 0.6);
    display: grid;
    place-items: center;
    overflow: hidden;
    animation: mascotFloat 5s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mascot-box:hover {
    transform: scale(1.07);
    box-shadow: 0 16px 40px rgba(200, 164, 92, 0.5), inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}

.mascot-box::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 10px;
    border-radius: 50%;
    background: rgba(29, 35, 56, 0.22);
    filter: blur(4px);
    animation: mascotShadow 5s ease-in-out infinite;
}

.mascot-default {
    font-size: 42px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(29, 35, 56, 0.3));
}

.mascot-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.mascot-box.has-mascot img {
    display: block;
}

.mascot-box.has-mascot .mascot-default {
    display: none;
}

.mascot-hint {
    position: absolute;
    bottom: 2px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #2b2416;
    font-size: 11px;
    font-weight: 800;
    display: grid;
    place-items: center;
    box-shadow: 0 3px 8px rgba(29, 35, 56, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mascot-box:hover .mascot-hint {
    opacity: 1;
}

@keyframes mascotFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-14px) rotate(2deg);
    }
}

@keyframes mascotShadow {
    0%,
    100% {
        transform: translateX(-50%) scaleX(1);
        opacity: 0.7;
    }
    50% {
        transform: translateX(-50%) scaleX(0.6);
        opacity: 0.4;
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mascot-box,
    .mascot-box::after,
    .exhibitor-item {
        animation: none !important;
    }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
    .search-minimal-wrap {
        width: min(240px, calc(100vw - 30px));
    }

    .search-input-minimal {
        font-size: 14px;
    }

    .search-panel {
        width: 100vw;
        height: 100vh;
    }

    .canvas-controls {
        bottom: 70px;
        right: 15px;
    }

    .control-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .edit-toolbar {
        max-width: calc(100vw - 30px);
    }

    .edit-toolbar-text {
        display: none;
    }

    .app-info {
        bottom: 70px;
        left: 15px;
        gap: 8px;
        font-size: 11px;
    }

    .edit-props {
        top: 15px;
        right: 15px;
        width: 230px;
        padding: 14px;
    }

    .admin-bulk-input {
        width: 130px;
    }

    .touch-instructions {
        font-size: 12px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .search-box-minimal {
        top: 15px;
        left: 15px;
    }

    .search-minimal-wrap {
        width: min(200px, calc(100vw - 30px));
        gap: 8px;
        padding-left: 13px;
        padding-right: 10px;
    }

    .search-input-minimal {
        font-size: 14px;
    }

    .touch-instructions {
        display: none;
    }

    .company-actions {
        gap: 8px;
    }

    .action-btn {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .search-minimal-wrap {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .search-input-minimal {
        font-size: 16px;
    }

    .search-input-expanded {
        padding: 16px 18px;
        font-size: 16px;
    }

    .search-menu-btn {
        width: 52px;
        height: 52px;
    }

    .exhibitor-item {
        padding: 20px 16px;
        margin-bottom: 12px;
    }

    .waypoint-btn,
    .clear-btn {
        padding: 14px 18px;
        font-size: 16px;
    }

    .control-btn {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .action-btn {
        padding: 18px 20px;
        font-size: 16px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .search-minimal-wrap {
        background: #fff;
        border: 1px solid #000;
        box-shadow: none;
    }

    .search-panel {
        box-shadow: 0 0 0 2px #000;
    }

    .exhibitor-item {
        border-color: #000;
    }
}

/* Print Styles */
@media print {

    .search-overlay,
    .canvas-controls,
    .app-info,
    .touch-instructions,
    .edit-toolbar,
    .edit-props {
        display: none;
    }

    .canvas-container {
        position: static;
        width: 100%;
        height: 100%;
    }
}
