/* Cat Snack Bar - Cute & Cozy Theme */

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

:root {
    /* Warm, cozy colors */
    --bg-lightest: #fff8f0;
    --bg-light: #fff0e0;
    --bg-cream: #ffe8d0;
    --bg-panel: #fff5eb;
    --bg-card: #ffffff;
    --bg-hover: #fff0e5;

    /* Text colors */
    --text-primary: #4a3728;
    --text-secondary: #8b7355;
    --text-muted: #b8a090;

    /* Accent colors */
    --accent-orange: #ff8c42;
    --accent-orange-light: #ffaa66;
    --accent-orange-dark: #e67530;
    --accent-pink: #ff6b9d;
    --accent-green: #5cb85c;
    --accent-yellow: #ffc107;
    --accent-blue: #5bc0de;
    --accent-red: #d9534f;

    /* Special colors */
    --money-gold: #ffd700;
    --tip-green: #85bb65;
    --gem-blue: #4fc3f7;

    /* Borders and shadows */
    --border-color: #e8d5c4;
    --border-dark: #d4c0ad;
    --shadow-soft: 0 2px 10px rgba(74, 55, 40, 0.1);
    --shadow-medium: 0 4px 20px rgba(74, 55, 40, 0.15);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', 'Comic Sans MS', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
}

/* ============================================
   GAME CONTAINER
   ============================================ */

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #87ceeb 0%, #98d8c8 50%, #90ee90 100%);
}

/* ============================================
   RESTAURANT CANVAS
   ============================================ */

#restaurant-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 1;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   TOP HUD - Money Display
   ============================================ */

#top-hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 248, 240, 0.95);
    padding: 6px 10px;
    pointer-events: none;
    border-bottom: 1px solid var(--border-color);
}

#hud-resources {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: center;
    pointer-events: auto;
}

.hud-resource {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: 14px;
    border: 1.5px solid var(--border-color);
    box-shadow: none;
    font-size: 0.8rem;
    font-weight: bold;
}

.hud-resource.money {
    border-color: var(--money-gold);
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
}

.hud-resource.tips {
    border-color: var(--tip-green);
    background: linear-gradient(135deg, #f0fff0 0%, #e6ffe6 100%);
}

.hud-resource.gems {
    border-color: var(--gem-blue);
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f5ff 100%);
}

.hud-icon {
    font-size: 0.9rem;
}

.hud-value {
    font-weight: bold;
    min-width: 30px;
    color: var(--text-primary);
}

.hud-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

#hud-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    pointer-events: auto;
}

#branch-display {
    color: var(--accent-orange);
    font-weight: bold;
}

#chapter-display {
    color: var(--accent-pink);
}

/* ============================================
   CUSTOMER QUEUE DISPLAY
   ============================================ */

#customer-queue-display {
    position: fixed;
    top: 40px;
    right: 10px;
    z-index: 90;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-medium);
    padding: 8px;
    min-width: 100px;
    max-width: 180px;
    transition: all 0.3s ease;
}

/* Collapsed state - compact header only */
#customer-queue-display.collapsed {
    padding: 6px 10px;
}

#customer-queue-display.collapsed #customer-queue {
    display: none;
}

#customer-queue-display.collapsed #queue-header {
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 0;
}

#customer-queue-display.collapsed #queue-toggle {
    transform: rotate(-90deg);
}

#queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
}

#queue-header:hover {
    opacity: 0.8;
}

#queue-toggle {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

#queue-count {
    color: var(--accent-orange);
    font-size: 0.75rem;
}

#customer-queue {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 150px;
    overflow-y: auto;
}

.customer-in-queue {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    background: var(--bg-cream);
    border-radius: 8px;
    font-size: 0.75rem;
}

.customer-icon {
    font-size: 1rem;
}

.customer-order {
    font-size: 0.9rem;
}

/* Sprite image icons */
.sprite-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    image-rendering: pixelated;
}

.sprite-customer {
    width: 20px;
    height: 20px;
}

.sprite-order {
    width: 18px;
    height: 18px;
}

.customer-patience {
    margin-left: auto;
    width: 25px;
    height: 5px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.customer-patience-fill {
    height: 100%;
    background: var(--accent-green);
    transition: width 0.3s, background-color 0.3s;
}

.customer-patience-fill.warning {
    background: var(--accent-yellow);
}

.customer-patience-fill.critical {
    background: var(--accent-red);
}

/* ============================================
   SAVE INDICATOR
   ============================================ */

#save-indicator {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
}

#save-indicator.visible {
    opacity: 1;
}

/* ============================================
   ACTION BAR (inside panel, replaces floating bottom-hud)
   ============================================ */

#action-bar {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-cream);
    flex-shrink: 0;
}

#collect-tips-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--tip-green) 0%, #6bc96b 100%);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

#collect-tips-btn:hover {
    transform: scale(1.05);
}

#collect-tips-btn:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 1rem;
}

.hud-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hud-btn:hover {
    background: var(--bg-hover);
    transform: scale(1.1);
}

/* ============================================
   BOTTOM PANEL
   ============================================ */

#bottom-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    z-index: 200;
    background: var(--bg-panel);
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(74, 55, 40, 0.1);
    display: flex;
    flex-direction: column;
}

/* ============================================
   PANEL TABS
   ============================================ */

#panel-tabs {
    display: flex;
    gap: 0;
    padding: 0 10px;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

#panel-tabs::-webkit-scrollbar {
    display: none;
}

.panel-tab {
    flex: 1;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.panel-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.panel-tab.active {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
}

.tab-icon {
    font-size: 1.3rem;
}

.tab-label {
    font-size: 0.7rem;
    font-weight: 600;
}

/* ============================================
   SUB-TABS (within panel sections)
   ============================================ */

.sub-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin: 0 -10px;
    padding: 0 10px;
    flex-shrink: 0;
}

.sub-tab {
    flex: 1;
    padding: 8px 6px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.sub-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.sub-tab.active {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

/* ============================================
   UPGRADE GRID (2-column cards with big sprites)
   ============================================ */

.upgrade-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 0;
}

.upgrade-card {
    background: var(--bg-card);
    border-radius: 14px;
    border: 2px solid var(--border-color);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
    gap: 4px;
}

.upgrade-card:hover {
    border-color: var(--accent-orange-light);
    box-shadow: var(--shadow-soft);
}

.upgrade-card .upgrade-sprite {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upgrade-card .upgrade-sprite img.sprite-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.upgrade-card .upgrade-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.upgrade-card .upgrade-level {
    font-size: 0.7rem;
    color: var(--accent-orange);
    font-weight: 600;
}

.upgrade-card .upgrade-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.upgrade-card .upgrade-btn {
    margin-top: auto;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--accent-blue);
    color: white;
    transition: all 0.15s;
    width: 100%;
}

.upgrade-card .upgrade-btn:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: scale(1.03);
}

.upgrade-card .upgrade-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.upgrade-card .upgrade-btn.maxed {
    background: var(--border-color);
    color: var(--text-muted);
}

/* ============================================
   PANEL CONTENT
   ============================================ */

#panel-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.panel-section {
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 10px;
    overflow-y: auto;
}

.panel-section.active {
    display: flex;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.section-header h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.scrollable-content h4 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 15px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

/* ============================================
   CARDS - Workstations, Menu Items, etc.
   ============================================ */

.card {
    background: var(--bg-card);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.card:hover {
    border-color: var(--accent-orange-light);
    box-shadow: var(--shadow-soft);
}

.card-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.card-info {
    flex: 1;
}

.card-name {
    font-weight: bold;
    font-size: 1rem;
    color: var(--text-primary);
}

.card-level {
    font-size: 0.8rem;
    color: var(--accent-orange);
    margin-left: 8px;
}

/* Workstation Tier Badge */
.tier-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    margin-left: 6px;
    text-transform: uppercase;
}

.tier-progress {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Workstation Requirement on Menu Items */
.ws-requirement {
    font-size: 0.75rem;
    margin-left: 6px;
}

.ws-requirement.unavailable {
    opacity: 0.5;
}

.ws-warning {
    font-size: 0.7rem;
    color: var(--accent-red);
    margin-top: 2px;
}

.card.ws-missing {
    opacity: 0.7;
    border-color: var(--accent-red);
}

/* Workstation Group with Nested Menu Items */
.workstation-group {
    margin-bottom: 12px;
}

.nested-menu-items {
    margin-left: 20px;
    padding-left: 12px;
    border-left: 2px solid var(--border-color);
}

.nested-menu-item {
    margin: 8px 0;
    padding: 10px !important;
    background: var(--bg-darker) !important;
    border-radius: 10px !important;
}

.nested-menu-item .card-icon {
    font-size: 1.2rem !important;
    min-width: 30px !important;
}

/* Location Upgrade Card in Progress Tab */
.location-upgrade-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--accent-green);
    padding: 12px;
    margin-top: 10px;
}

.location-upgrade-card .upgrade-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.location-upgrade-card .upgrade-icon {
    font-size: 2rem;
}

.location-upgrade-card .upgrade-name {
    font-weight: bold;
    font-size: 1rem;
}

.location-upgrade-card .upgrade-benefits {
    color: var(--accent-green);
    font-size: 0.85rem;
}

.location-upgrade-card .upgrade-cost-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.location-upgrade-card .cost-breakdown {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.location-upgrade-card .trade-in {
    color: var(--accent-green);
}

.location-upgrade-card .net-cost {
    font-weight: bold;
}

.location-upgrade-card.maxed {
    border-color: var(--accent-orange);
    text-align: center;
}

/* Shop Location Card - Compact version */
.shop-location-card.compact {
    padding: 10px;
}

.shop-location-card.compact .location-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upgrade-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

.max-tier-badge {
    font-size: 0.8rem;
    color: var(--accent-orange);
    margin-left: auto;
}

.shop-btn.upgrade-available {
    background: var(--accent-green);
    color: white;
    animation: pulse 2s infinite;
    margin-left: auto;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.card-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-stats {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.card-stats span {
    margin-right: 10px;
}

.card-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */

.action-btn {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-dark) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.action-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.action-btn.danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #c0392b 100%);
}

.action-btn.prestige-btn {
    background: linear-gradient(135deg, var(--accent-pink) 0%, #e74c8a 100%);
    font-size: 1.1rem;
    padding: 15px 30px;
    width: 100%;
    margin-top: 10px;
}

.upgrade-btn {
    background: linear-gradient(135deg, var(--accent-green) 0%, #4a9c4a 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.upgrade-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.upgrade-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ============================================
   PROGRESS BARS
   ============================================ */

.progress-bar {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar.large {
    height: 20px;
    border-radius: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-orange) 0%, var(--accent-orange-light) 100%);
    border-radius: inherit;
    transition: width 0.3s ease;
}

/* ============================================
   STAFF SECTION
   ============================================ */

#staff-overview {
    background: var(--bg-card);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    padding: 15px;
    margin-bottom: 15px;
}

.staff-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

#hire-worker-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* ============================================
   PRESTIGE SECTION
   ============================================ */

#prestige-section {
    background: linear-gradient(135deg, #fff0f5 0%, #ffe6ee 100%);
    border-radius: 15px;
    border: 2px solid var(--accent-pink);
    padding: 20px;
    margin: 15px 0;
    text-align: center;
}

#prestige-preview {
    margin: 15px 0;
    font-size: 0.95rem;
}

#prestige-preview p {
    margin: 5px 0;
}

/* ============================================
   SETTINGS
   ============================================ */

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.setting-row input[type="range"] {
    flex: 1;
    max-width: 150px;
}

.settings-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.settings-buttons .action-btn {
    flex: 1;
    min-width: 100px;
}

#last-save {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ============================================
   FLOATING TIPS
   ============================================ */

#floating-tips {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

.floating-tip {
    position: absolute;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--tip-green);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: floatUp 1.5s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.2);
    }
}

/* ============================================
   WELCOME BACK MODAL
   ============================================ */

.wb-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.wb-modal-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 2px solid var(--accent-green);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    padding: 24px;
    width: min(85vw, 320px);
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.wb-modal-header {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.wb-modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.wb-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    font-size: 0.95rem;
}

.wb-modal-row .wb-label {
    color: var(--text-secondary);
}

.wb-modal-row .wb-value {
    font-weight: bold;
    color: var(--accent-green);
}

.wb-modal-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.wb-modal-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--accent-green);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

.wb-modal-btn:active {
    transform: scale(0.97);
}

/* ============================================
   FLOATING DAILY REWARD BUTTON
   ============================================ */

.daily-float-btn {
    position: fixed;
    top: 70px;
    right: 12px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg-card);
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dailyPulse 2s ease-in-out infinite;
    transition: transform 0.2s;
}

.daily-float-btn:active {
    transform: scale(0.9);
}

.daily-float-btn.claimed {
    animation: none;
    opacity: 0.5;
    border-color: var(--border-color);
}

.daily-float-icon {
    font-size: 24px;
}

.daily-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--danger, #e74c3c);
    color: white;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daily-float-btn.claimed .daily-float-badge {
    background: var(--success, #27ae60);
    content: '✓';
}

@keyframes dailyPulse {
    0%, 100% { box-shadow: var(--shadow-medium); }
    50% { box-shadow: 0 0 12px rgba(255, 193, 7, 0.5); }
}

/* Daily Reward Popup */
.daily-popup-card {
    max-width: 320px;
}

.daily-popup-divider {
    height: 1px;
    background: var(--border-color, #ddd);
    margin: 12px 0;
}

.daily-suitcase-count {
    font-size: 0.9em;
    color: var(--text-secondary, #888);
}

.wb-modal-btn.secondary {
    background: var(--accent-secondary, #8B5CF6);
    margin-top: 8px;
}

.wb-modal-btn.secondary:disabled {
    background: var(--text-secondary, #888);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Manage Grid (2-column layout) */
.manage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 8px 0;
}

.manage-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.manage-card h4 {
    margin: 0 0 8px;
    font-size: 0.95em;
}

.manage-card .staff-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85em;
}

.manage-card .action-btn {
    width: 100%;
    font-size: 0.85em;
}

/* Promotions */
.promo-card {
    text-align: center;
}

.promo-card.promo-active {
    border-color: var(--accent, #FF9800);
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08), transparent);
}

.promo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}

.promo-icon {
    font-size: 22px;
}

.promo-timer {
    font-size: 0.8em;
    color: var(--accent, #FF9800);
    font-weight: bold;
    margin: 4px 0;
}

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

/* Location upgrade progress text */
.upgrade-progress-text {
    font-size: 0.85em;
    color: var(--text-secondary, #888);
    margin-bottom: 8px;
}

/* Active Promotions Banner */
#active-promos-banner {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 4px 8px;
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.15), rgba(255, 193, 7, 0.15));
    flex-wrap: wrap;
}

.promo-badge {
    font-size: 0.8em;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent, #FF9800);
    animation: promoPulse 2s ease-in-out infinite;
}

@keyframes promoPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.daily-popup-body {
    text-align: center;
    padding: 16px 0;
}

.daily-popup-streak {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 12px;
}

.daily-popup-reward {
    font-size: 1.1em;
    color: var(--text-primary);
}

.daily-popup-claimed {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

#notifications {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification {
    background: var(--bg-card);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    padding: 12px 20px;
    box-shadow: var(--shadow-medium);
    animation: slideIn 0.3s ease-out;
    font-size: 0.95rem;
}

.notification.success {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, #f0fff0 0%, #e6ffe6 100%);
}

.notification.warning {
    border-color: var(--accent-yellow);
    background: linear-gradient(135deg, #fffbf0 0%, #fff5e0 100%);
}

.notification.error {
    border-color: var(--accent-red);
    background: linear-gradient(135deg, #fff0f0 0%, #ffe6e6 100%);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   TUTORIAL OVERLAY
   ============================================ */

.tutorial-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.tutorial-overlay.active {
    display: flex;
}

.tutorial-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 3px solid var(--accent-yellow);
    padding: 24px;
    max-width: 320px;
    width: 85%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: tutorialPop 0.3s ease-out;
}

.tutorial-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.tutorial-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.tutorial-card p {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tutorial-btn {
    background: var(--accent-yellow);
    border: none;
    border-radius: 10px;
    padding: 10px 32px;
    font-size: 1rem;
    font-weight: bold;
    color: #5a3e00;
    cursor: pointer;
}

@keyframes tutorialPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================
   COOKING PROGRESS INDICATOR
   ============================================ */

.cooking-indicator {
    position: relative;
    width: 40px;
    height: 40px;
}

.cooking-progress-ring {
    transform: rotate(-90deg);
}

.cooking-progress-ring circle {
    fill: none;
    stroke-width: 4;
}

.cooking-progress-ring .bg {
    stroke: #eee;
}

.cooking-progress-ring .progress {
    stroke: var(--accent-orange);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 600px) {
    .hud-resource {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .tab-label {
        display: none;
    }

    .panel-tab {
        min-width: 50px;
        padding: 8px;
    }

    .card {
        padding: 10px;
        gap: 8px;
    }

    .card-icon {
        font-size: 1.5rem;
        min-width: 40px;
    }
}

/* ============================================
   WORKSTATION STATES
   ============================================ */

.card.cooking {
    border-color: var(--accent-orange);
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e6 100%);
}

.card.ready {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, #f0fff0 0%, #e8ffe8 100%);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(92, 184, 92, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(92, 184, 92, 0);
    }
}

.card.locked {
    opacity: 0.5;
    filter: grayscale(0.5);
}

/* ============================================
   WORKER CAT INDICATOR
   ============================================ */

.worker-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.worker-indicator .cat-icon {
    font-size: 1rem;
}

/* ============================================
   SUB-TABS (within a parent tab)
   ============================================ */

.sub-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-panel);
    padding: 0 8px;
    flex-shrink: 0;
}

.sub-tab {
    flex: 1;
    padding: 8px 4px;
    border: none;
    background: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.sub-tab.active {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
}

.sub-tab:hover:not(.active) {
    color: var(--text-primary);
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

/* ============================================
   MERCHANDISE 2-COLUMN GRID
   ============================================ */

.merch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 8px 0;
}

.merch-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
}

.merch-card:hover {
    border-color: var(--accent-orange-light);
    box-shadow: var(--shadow-soft);
}

.merch-card-img {
    width: 72px;
    height: 72px;
    margin-bottom: 6px;
}

.merch-sprite {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.merch-card-name {
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.merch-card-level {
    font-size: 0.75rem;
    color: var(--accent-orange);
    font-weight: 600;
}

.merch-card-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 2px 0 6px;
}

.merch-card-btn {
    width: 100%;
    padding: 6px 0;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-orange-light), var(--accent-orange));
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.merch-card-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.merch-card-btn:not(:disabled):hover {
    opacity: 0.85;
}

/* ============================================
   SUITCASE / GACHA STYLES
   ============================================ */

.suitcase-card {
    background: linear-gradient(135deg, #fff8f0 0%, #ffe8d0 100%);
}

.gacha-btn {
    background: linear-gradient(135deg, var(--gem-blue) 0%, #2196f3 100%) !important;
    min-width: 120px;
}

.gacha-btn:hover:not(:disabled) {
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

/* ============================================
   COSTUME PIECE STYLES
   ============================================ */

.costume-slot-section {
    margin: 10px 0 5px;
    padding: 5px 0;
    color: var(--text-secondary);
}

.costume-piece-card {
    border-width: 3px !important;
}

.rarity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    color: white;
    margin-left: 5px;
    font-weight: bold;
}

.merge-btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%) !important;
    margin-top: 5px;
}

.merge-btn:hover:not(:disabled) {
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-style: italic;
}

/* ============================================
   DAILY REWARD STYLES
   ============================================ */

.daily-reward-card {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.daily-reward-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}

#login-streak {
    color: var(--accent-orange);
    font-size: 1.1rem;
}

/* ============================================
   DECORATION STYLES
   ============================================ */

.card.owned {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: var(--accent-green);
}

.owned-badge {
    color: var(--accent-green);
    font-weight: bold;
    font-size: 0.9rem;
}

/* ============================================
   ACHIEVEMENT NOTIFICATION STYLES
   ============================================ */

.notification.achievement {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
}

/* ============================================
   PARTICLE EFFECTS
   ============================================ */

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    pointer-events: none;
    animation: sparkle 0.6s ease-out forwards;
}

/* ============================================
   PANEL TAB ADJUSTMENTS FOR MORE TABS
   ============================================ */

@media (max-width: 600px) {
    .panel-tab {
        min-width: 45px;
        padding: 6px 4px;
    }

    .tab-icon {
        font-size: 1.1rem;
    }
}

/* ============================================
   ENHANCED ANIMATION EFFECTS
   ============================================ */

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.card:hover .card-icon {
    animation: bounce 0.5s ease;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 140, 66, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 140, 66, 0.6); }
}

.card.ready {
    animation: pulse 1s infinite, glow 2s infinite;
}

/* Steam/smoke animation for workstations */
@keyframes steam {
    0% { opacity: 0.8; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) scale(1.5); }
}

.steam-particle {
    position: absolute;
    font-size: 0.8rem;
    pointer-events: none;
    animation: steam 1.5s ease-out infinite;
}

/* ============================================
   2X BOOST BUTTON STYLES
   ============================================ */

#boost-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border: 1.5px solid #e65100;
    border-radius: 16px;
    padding: 6px 14px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

#boost-btn:hover {
    transform: scale(1.05);
}

#boost-btn.boost-active {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    border-color: #2e7d32;
    animation: pulse-boost 1s infinite;
}

@keyframes pulse-boost {
    0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
}

/* ============================================
   EQUIPPED OUTFIT STYLES
   ============================================ */

.equipped-outfit-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

.equipped-slot {
    background: var(--bg-secondary);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.equipped-slot.filled {
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
}

.equipped-slot.empty {
    opacity: 0.6;
}

.slot-icon {
    font-size: 1.8rem;
}

.slot-name {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-primary);
}

.slot-rarity {
    font-size: 0.65rem;
    font-weight: bold;
}

.slot-effect {
    font-size: 0.65rem;
    color: var(--accent-green);
}

.slot-hint {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-style: italic;
}

.total-bonuses {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.hint-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 5px 0 10px;
}

/* ============================================
   SHOP UI STYLES
   ============================================ */

.shop-location-card {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-light) 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
}

.location-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.location-icon {
    font-size: 2.5rem;
}

.location-details {
    flex: 1;
}

.location-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.location-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.location-capacity {
    display: flex;
    gap: 20px;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 10px;
}

.capacity-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.capacity-icon {
    font-size: 1rem;
}

/* Shop Workstation List */
.shop-ws-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.shop-ws-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
}

.shop-ws-card.installed {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, #e8f5e9 0%, #fff 100%);
}

.shop-ws-card.not-built {
    opacity: 0.6;
    background: var(--bg-light);
}

.shop-ws-card.locked {
    opacity: 0.5;
    background: #f5f5f5;
}

.ws-icon {
    font-size: 1.5rem;
}

.ws-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ws-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.ws-level {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ws-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* Shop Buttons */
.shop-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-btn.install {
    background: var(--accent-green);
    color: white;
}

.shop-btn.install:hover {
    background: #4cae4c;
}

.shop-btn.uninstall {
    background: var(--accent-orange);
    color: white;
}

.shop-btn.uninstall:hover {
    background: var(--accent-orange-dark);
}

.shop-btn.activate {
    background: var(--accent-blue);
    color: white;
}

.shop-btn.activate:hover {
    background: #46b8da;
}

.shop-btn.activate:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Shop Workstation Groups */
.shop-ws-group {
    margin-bottom: 15px;
}

.ws-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-cream);
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.shop-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-light);
    padding: 8px;
    border-radius: 0 0 8px 8px;
    border: 1px solid var(--border-color);
    border-top: none;
}

.shop-menu-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 8px 12px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.shop-menu-card.active {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, #e8f5e9 0%, #fff 100%);
}

.shop-menu-card.locked {
    opacity: 0.5;
    background: #f5f5f5;
}

.menu-icon {
    font-size: 1.3rem;
}

.menu-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.menu-stats {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.menu-unlock {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.shop-empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Slot Info Bar */
.slot-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-light) 100%);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.slot-location {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.slot-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Installed/Active Badges */
.installed-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--accent-green);
    color: white;
    font-weight: bold;
    margin-left: 6px;
}

.not-installed-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--text-muted);
    color: white;
    font-weight: bold;
    margin-left: 6px;
}

.active-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--accent-blue);
    color: white;
    font-weight: bold;
    margin-left: 6px;
}

.card.ws-installed {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, #e8f5e9 0%, var(--bg-card) 100%);
}

.card.menu-active {
    border-color: var(--accent-blue);
    background: linear-gradient(135deg, #e3f2fd 0%, var(--bg-card) 100%);
}

/* Location Upgrade Section */
.location-value {
    font-size: 0.8rem;
    color: var(--accent-green);
    font-weight: 600;
    padding: 4px 8px;
    background: #e8f5e9;
    border-radius: 6px;
}

.location-upgrade {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.location-upgrade.maxed {
    text-align: center;
    padding: 12px;
}

.max-badge {
    font-size: 1rem;
    color: var(--accent-orange);
}

.upgrade-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.upgrade-icon {
    font-size: 1.8rem;
}

.upgrade-details {
    flex: 1;
}

.upgrade-name {
    font-weight: 600;
    color: var(--text-primary);
}

.upgrade-benefits {
    font-size: 0.8rem;
    color: var(--accent-green);
}

.upgrade-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 10px;
}

.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
}

.cost-breakdown .trade-in {
    color: var(--accent-green);
}

.cost-breakdown .net-cost {
    font-weight: 600;
    color: var(--text-primary);
}

.shop-btn.upgrade-location {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-btn.upgrade-location:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.shop-btn.upgrade-location:disabled,
.shop-btn.upgrade-location.disabled {
    background: #ccc;
    cursor: not-allowed;
    font-size: 0.75rem;
}

/* Workstation Actions */
.ws-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ws-sell-value {
    font-size: 0.7rem;
    color: var(--accent-green);
}

.shop-btn.sell {
    background: #ff7043;
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px;
}

.shop-btn.sell:hover {
    background: #f4511e;
}

/* ============================================
   BRANCH SWITCHER
   ============================================ */

#branch-switcher {
    position: fixed;
    bottom: 52%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    width: calc(100% - 20px);
    max-width: 400px;
    transition: all 0.3s ease;
}

/* Minimized state - house icon at top left */
#branch-switcher.minimized {
    top: 10px;
    left: 10px;
    bottom: auto;
    transform: none;
    width: auto;
    max-width: none;
}

.branch-switcher-icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-card) 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}

.branch-switcher-icon-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-orange);
}

.branch-switcher-icon-btn .location-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent-orange);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-switcher-container {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-card) 100%);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid var(--border-color);
}

.branch-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.branch-switcher-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.branch-switcher-minimize {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--bg-cream);
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.branch-switcher-minimize:hover {
    background: var(--accent-orange);
    color: white;
}

.branch-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.branch-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
    position: relative;
}

.branch-tab:hover:not(:disabled) {
    border-color: var(--accent-orange);
    transform: translateY(-2px);
}

.branch-tab.active {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, #e8f5e9 0%, var(--bg-card) 100%);
    cursor: default;
}

.branch-tab-icon {
    font-size: 1.5rem;
}

.branch-tab-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.branch-tab-tier {
    font-size: 0.9rem;
}

.manager-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.8rem;
    background: var(--accent-green);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-manager-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.8rem;
    background: var(--accent-orange);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.passive-income-badge {
    display: block;
    font-size: 0.6rem;
    color: var(--accent-green);
    font-weight: bold;
    margin-top: 1px;
}

/* ============================================
   MANAGER & NEW BRANCH SECTIONS
   ============================================ */

.manager-hire-section {
    background: linear-gradient(135deg, #fff8e1 0%, var(--bg-card) 100%);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.manager-hire-section.has-manager {
    background: linear-gradient(135deg, #e8f5e9 0%, var(--bg-card) 100%);
    border-color: var(--accent-green);
}

.manager-hire-section h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.manager-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.shop-btn.hire-manager {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
}

.shop-btn.hire-manager:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.new-branch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.new-branch-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
}

.new-branch-card .branch-icon {
    font-size: 1.8rem;
}

.new-branch-card .branch-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.new-branch-card .branch-name {
    font-weight: 600;
    color: var(--text-primary);
}

.new-branch-card .branch-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.shop-btn.buy-branch {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.shop-btn.buy-branch:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.all-branches-owned {
    text-align: center;
    padding: 20px;
    color: var(--accent-orange);
    font-weight: 600;
}

/* Chapter sections for branch purchasing */
.chapters-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chapter-section {
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    overflow: hidden;
}

.chapter-section.locked {
    opacity: 0.7;
    border-color: #999;
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.chapter-section.locked .chapter-header {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
}

.chapter-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.lock-icon, .unlock-icon {
    font-size: 1.2rem;
}

.chapter-unlock-hint {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
    background: #f5f5f5;
}

.chapter-branches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.chapter-branches .new-branch-card {
    border: 1px solid #e0e0e0;
}

.chapter-branches .branch-desc {
    font-size: 0.7rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   ICON GRID - Workstations & Menu Items
   ============================================ */

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
    padding: 4px 0;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-height: 90px;
    justify-content: center;
}

.grid-item:active {
    transform: scale(0.95);
}

.grid-item img,
.grid-item .grid-item-icon,
.grid-item .grid-item-sprite {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

img.grid-item-sprite {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

img.detail-icon,
img.detail-sprite-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.grid-item .grid-item-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-item .item-name {
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 72px;
    color: var(--text-primary);
}

.grid-item .item-level {
    position: absolute;
    top: 2px;
    right: 3px;
    background: var(--accent-orange);
    color: white;
    font-size: 0.55rem;
    padding: 1px 4px;
    border-radius: 6px;
    font-weight: bold;
}

.grid-item .item-price {
    font-size: 0.6rem;
    color: var(--accent-green);
    font-weight: 600;
}

.grid-item.installed {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, #e8f5e9 0%, var(--bg-card) 100%);
}

.grid-item.menu-active {
    border-color: var(--accent-blue);
    background: linear-gradient(135deg, #e3f2fd 0%, var(--bg-card) 100%);
}

.grid-item.locked {
    opacity: 0.45;
    filter: grayscale(0.5);
    cursor: default;
}

.grid-item.selected {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 2px var(--accent-orange-light);
}

.grid-item.promo-active-tile {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, #e8f5e9 0%, var(--bg-card) 100%);
}

.grid-item.not-built {
    opacity: 0.7;
    border-style: dashed;
}

.achievements-summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 4px 0 8px;
}

/* Detail panel shown when grid item is tapped */
.grid-detail {
    background: var(--bg-card);
    border: 2px solid var(--accent-orange);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 6px 0;
    display: flex;
    gap: 10px;
    align-items: center;
    animation: slideIn 0.15s ease-out;
}

.grid-detail .detail-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.grid-detail .detail-icon-emoji {
    font-size: 2rem;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}

.grid-detail .detail-info {
    flex: 1;
    min-width: 0;
}

.grid-detail .detail-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.grid-detail .detail-stats,
.grid-detail .detail-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.grid-detail .detail-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.grid-section-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 8px 0 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

/* Costume grid items */
.costume-grid-item .item-rarity {
    font-size: 0.55rem;
    font-weight: 600;
}

.costume-grid-item .item-level.merge-ready {
    background: var(--accent-purple, #8B5CF6);
    left: 3px;
    right: auto;
}

/* Costume detail panel */
.detail-panel {
    background: var(--bg-card);
    border: 2px solid var(--accent-orange);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 8px 0;
    animation: slideIn 0.15s ease-out;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

img.detail-sprite {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.detail-info {
    flex: 1;
}

.detail-name {
    font-weight: 700;
    font-size: 0.95em;
}

.detail-count {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-left: 6px;
}

.detail-stats {
    font-size: 0.85em;
    color: var(--accent-green);
    margin: 6px 0;
}

.detail-actions {
    display: flex;
    gap: 8px;
}

.detail-actions .upgrade-btn,
.detail-actions .action-btn {
    flex: 1;
}

/* Costume detail bottom-sheet overlay */
.costume-detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.35);
    align-items: flex-end;
    justify-content: center;
}

.costume-detail-sheet {
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    padding: 16px 16px 24px;
    width: 100%;
    max-width: 500px;
    animation: sheetSlideUp 0.2s ease-out;
}

.costume-detail-sheet .detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.costume-detail-sheet .detail-sprite {
    width: 56px;
    height: 56px;
}

.costume-detail-sheet .detail-stats {
    font-size: 0.85em;
    color: var(--accent-green);
    margin: 8px 0;
}

.costume-detail-sheet .detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

@keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ============================================
   WORKSTATION POPUP - Cult-game style bottom sheet
   ============================================ */

.ws-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    align-items: flex-end;
    justify-content: center;
}

.ws-popup.active {
    display: flex;
    animation: wsPopupFadeIn 0.2s ease-out;
}

@keyframes wsPopupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wsSheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ws-popup-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 75vh;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: wsSheetSlideUp 0.25s ease-out;
    position: relative;
}

.ws-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.ws-popup-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Hero area (sprite + name/tier) */
.ws-popup-hero {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 16px 12px;
    background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-card) 100%);
    flex-shrink: 0;
}

.ws-popup-sprite {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-lightest);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.ws-popup-sprite img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.ws-popup-hero-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.ws-popup-hero-info h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.ws-popup-hero-info .tier-badge {
    font-size: 0.7rem;
    margin-right: 6px;
}

#ws-popup-level {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-orange);
}

#ws-popup-effect {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin: 4px 0 0;
    line-height: 1.3;
}

/* Scrollable content area */
.ws-popup-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 20px;
}

/* Level progress */
.ws-popup-progress {
    margin: 8px 0 12px;
}

.ws-popup-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.ws-popup-progress-bar {
    height: 10px;
    background: var(--bg-cream);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.ws-popup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-orange), var(--accent-pink));
    border-radius: 5px;
    transition: width 0.3s ease;
}

.ws-popup-tier-markers {
    position: relative;
    height: 14px;
    margin-top: 2px;
}

.ws-popup-tier-markers .tier-marker {
    position: absolute;
    font-size: 0.6rem;
    color: var(--text-muted);
    transform: translateX(-50%);
}

/* Action buttons */
.ws-popup-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.ws-popup-actions button {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s;
}

.ws-popup-actions button:active:not(:disabled) {
    transform: scale(0.97);
}

.ws-popup-actions button:disabled {
    opacity: 0.5;
    cursor: default;
}

.ws-popup-btn-upgrade {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
    color: #fff;
}

.ws-popup-btn-upgrade:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-orange-light), var(--accent-orange));
}

.ws-popup-btn-install {
    background: var(--accent-green);
    color: #fff;
}

.ws-popup-btn-install:hover:not(:disabled) {
    opacity: 0.9;
}

.ws-popup-btn-remove {
    background: var(--accent-red);
    color: #fff;
}

.ws-popup-btn-sell {
    background: var(--bg-cream);
    color: var(--text-secondary);
    border: 1px solid var(--border-color) !important;
}

/* Recipes section */
.ws-popup-section h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.ws-popup-recipes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ws-popup-recipe {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-lightest);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}

.ws-popup-recipe:hover {
    background: var(--bg-hover);
}

.ws-popup-recipe.locked {
    opacity: 0.5;
}

.ws-popup-recipe.recipe-active {
    border-color: var(--accent-green);
    background: #f0fff0;
}

.ws-popup-recipe-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ws-popup-recipe-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.ws-popup-recipe-info {
    flex: 1;
    min-width: 0;
}

.ws-popup-recipe-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ws-popup-recipe-stats {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.ws-popup-recipe-level {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-orange);
    flex-shrink: 0;
}

.ws-popup-recipe-cost {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--accent-orange);
    color: #fff;
    flex-shrink: 0;
}

.ws-popup-recipe-cost.cost-disabled {
    opacity: 0.5;
}

/* Customer queue adjusted for 50/50 layout */
#customer-queue-display {
    top: 40px;
}

/* ============================================
   DESKTOP: Constrain to phone-like container
   ============================================ */

@media (min-width: 601px) {
    body {
        background: #2c2c2c;
    }

    #game-container {
        left: 50%;
        transform: translateX(-50%);
        width: 768px;
        max-width: 768px;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    }

    #restaurant-container {
        position: absolute;
    }

    #top-hud {
        position: absolute;
        left: 0;
        right: 0;
    }

    #customer-queue-display {
        position: absolute;
    }

    #save-indicator {
        position: absolute;
    }

    #bottom-panel {
        position: absolute;
    }

    #floating-tips {
        position: absolute;
    }

    #notifications {
        position: absolute;
    }

    #branch-switcher {
        position: absolute;
    }

    .ws-popup {
        position: absolute;
    }
}
