/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bg: #f0f2f8;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-hover: rgba(255, 255, 255, 0.92);
    --bg-tab: rgba(255, 255, 255, 0.82);
    --text: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #6a6a8a;
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.25);
    --accent-secondary: #1e40af;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 40px rgba(37, 99, 235, 0.12);
    --radius: 20px;
    --radius-sm: 14px;
    --border: rgba(0, 0, 0, 0.06);
    --tab-height: 72px;
    --transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    --max-width: 480px;
}

[data-theme="dark"] {
    --bg: #07070f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-tab: rgba(10, 10, 26, 0.85);
    --text: #f0f0ff;
    --text-secondary: #b0b0d0;
    --text-muted: #9090b0;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --accent-secondary: #2563eb;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 12px 40px rgba(59, 130, 246, 0.2);
    --border: rgba(255, 255, 255, 0.07);
}

html {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(var(--tab-height) + 20px);
    display: flex;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}

.app {
    width: 100%;
    max-width: var(--max-width);
    padding: 12px 16px 0;
    position: relative;
}

/* ===== UTILITIES ===== */
.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;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    font-size: inherit;
}
.link-btn:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0 10px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}
.logo span {
    font-weight: 400;
    font-size: 15px;
    -webkit-text-fill-color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions button {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 18px;
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.header-actions button:active { transform: scale(0.92); }
.header-actions button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 14px 0 18px;
}

.hero-title {
    font-size: clamp(24px, 6vw, 36px);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: var(--font);
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-primary:active { transform: scale(0.96); }
.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-secondary:active { transform: scale(0.96); }

/* ===== SECTIONS ===== */
.section {
    display: none;
    animation: fadeSlide 0.4s ease forwards;
}
.section.active { display: block; }
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: clamp(20px, 4.5vw, 28px);
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}
.section-title .badge {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 30px;
    box-shadow: 0 0 16px var(--accent-glow);
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 18px 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-hover);
    background: var(--bg-card-hover);
}
.card-title {
    font-size: clamp(15px, 3.5vw, 17px);
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title .icon { font-size: 20px; }

/* ===== SCHEDULE ===== */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.schedule-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 11px 0;
    font-size: clamp(14px, 3.2vw, 16px);
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.schedule-row:last-child { border-bottom: none; }
.schedule-row.header {
    font-weight: 600;
    font-size: clamp(10px, 2.2vw, 12px);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    padding-bottom: 6px;
}
.schedule-row .value.highlight {
    color: var(--accent);
    font-weight: 600;
}
.schedule-note {
    margin-top: 14px;
    font-size: clamp(14px, 3.2vw, 16px);
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    padding-top: 14px;
    line-height: 1.6;
}

.tips-list {
    list-style: none;
    padding: 0;
}
.tips-list li {
    padding-left: 22px;
    position: relative;
    font-size: clamp(14px, 3.2vw, 16px);
    margin-bottom: 10px;
    color: var(--text-secondary);
    line-height: 1.55;
}
.tips-list li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--accent);
    font-weight: 700;
}

/* ===== TARIFF ACCORDION ===== */
.tariff-accordion {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tariff-group {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.3s;
}
.tariff-group:hover { border-color: var(--accent); }

.tariff-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(14px, 3.2vw, 16px);
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text);
    font-family: var(--font);
    transition: background 0.2s;
}
.tariff-group-header:hover { background: var(--bg-card-hover); }
.tariff-group-header:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.tariff-group-header .chevron {
    transition: transform 0.3s;
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 10px;
}
.tariff-group.open .tariff-group-header .chevron {
    transform: rotate(180deg);
}

.tariff-group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.tariff-group.open .tariff-group-body {
    max-height: 2000px;
}

.tariff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(13px, 3vw, 15px);
}
.tariff-table th {
    text-align: left;
    padding: 9px 14px;
    font-weight: 600;
    font-size: clamp(10px, 2.2vw, 12px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.tariff-table th:last-child { text-align: right; }
.tariff-table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    line-height: 1.4;
}
.tariff-table tr:last-child td { border-bottom: none; }
.tariff-table td:last-child {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
    color: var(--accent);
}

.tariff-note {
    margin-top: 14px;
    font-size: clamp(13px, 3vw, 15px);
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    padding-top: 14px;
    line-height: 1.6;
}
.tariff-doc {
    margin-top: 10px;
    font-size: clamp(12px, 2.6vw, 14px);
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
    text-align: center;
    line-height: 1.5;
}
.tariff-doc a { color: var(--accent); text-decoration: none; }
.tariff-doc a:hover { text-decoration: underline; }

/* ===== CAMERAS ===== */
.cameras-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.camera-group-label {
    font-size: clamp(15px, 3.5vw, 18px);
    font-weight: 600;
    margin: 14px 0 10px;
    color: var(--text-secondary);
}

.camera-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.camera-item:active { transform: scale(0.97); }
.camera-item:hover { box-shadow: var(--shadow-hover); }

.video-wrapper {
    position: relative;
    background: #0a0a1a;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}
.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-wrapper .preview-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0a0a1a;
    display: block;
    transition: opacity 0.5s;
}
.video-wrapper .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: clamp(12px, 2.8vw, 14px);
    gap: 6px;
    transition: opacity 0.4s;
    pointer-events: none;
    opacity: 0;
    padding: 10px;
    text-align: center;
}
.video-wrapper .overlay.visible { opacity: 1; pointer-events: auto; }
.video-wrapper .overlay i {
    font-size: clamp(26px, 6vw, 38px);
    opacity: 0.9;
    margin-bottom: 4px;
}
.video-wrapper .overlay .offline-icon { font-size: clamp(22px, 5vw, 30px); opacity: 0.7; }
.video-wrapper .overlay .offline-text {
    font-size: clamp(12px, 2.8vw, 14px);
    font-weight: 500;
    color: #ffb3b3;
}

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a4e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.camera-name {
    padding: 9px 11px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.camera-name .top {
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    line-height: 1.2;
}
.camera-name .bottom {
    font-size: clamp(11px, 2.5vw, 13px);
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.camera-name .bottom .live-indicator {
    color: #ff3b30;
    font-size: 8px;
    animation: live-dot-pulse 1.2s infinite;
}
@keyframes live-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.6); }
}
.camera-name .badge-live {
    background: #ff3b30;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.refresh-btn {
    margin-top: 8px;
    padding: 7px 18px;
    border-radius: 20px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    pointer-events: auto;
    font-family: var(--font);
    transition: transform 0.2s;
}
.refresh-btn:active { transform: scale(0.92); }

/* ===== VIDEO OVERLAY ===== */
.video-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.video-overlay[hidden] { display: none; }

.video-overlay .close-btn,
.video-overlay .fullscreen-btn {
    position: absolute;
    font-size: 22px;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}
.video-overlay .close-btn { top: 16px; right: 16px; }
.video-overlay .fullscreen-btn { top: 16px; right: 72px; }
.video-overlay .close-btn:hover,
.video-overlay .fullscreen-btn:hover { background: rgba(255, 255, 255, 0.2); }
.video-overlay .close-btn:active,
.video-overlay .fullscreen-btn:active { transform: scale(0.9); }
.video-overlay .close-btn:focus-visible,
.video-overlay .fullscreen-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.video-overlay .video-container {
    width: 100%;
    max-width: 92vw;
    max-height: 85vh;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}
.video-overlay .video-container video {
    width: 100%;
    height: auto;
    max-height: 85vh;
    display: block;
    object-fit: contain;
}
.video-overlay .camera-title {
    position: absolute;
    top: 16px;
    left: 16px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.video-overlay .camera-title .top { font-size: clamp(18px, 4vw, 24px); font-weight: 700; }
.video-overlay .camera-title .bottom { font-size: clamp(14px, 3vw, 18px); font-weight: 500; color: rgba(255, 255, 255, 0.8); }

/* ===== INFO & FAQ ===== */
.info-faq-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.info-faq-grid .info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: clamp(14px, 3.2vw, 16px);
    color: var(--text-secondary);
    line-height: 1.55;
}
.info-faq-grid .info-item:last-child { border-bottom: none; }
.info-faq-grid .info-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.info-faq-grid .info-item strong { color: var(--text); }

.faq-list {
    display: flex;
    flex-direction: column;
}
.faq-item {
    border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
    font-weight: 600;
    font-size: clamp(14px, 3.2vw, 16px);
    padding: 14px 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}
.faq-q::before { content: '❓'; flex-shrink: 0; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
    content: '▸';
    margin-left: auto;
    transition: transform 0.3s;
    color: var(--text-muted);
    flex-shrink: 0;
}
.faq-item[open] .faq-q::after { transform: rotate(90deg); }
.faq-a {
    font-size: clamp(14px, 3vw, 15px);
    color: var(--text-secondary);
    padding: 0 0 14px 30px;
    line-height: 1.55;
}

.source-link {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: clamp(12px, 2.6vw, 14px);
    color: var(--text-muted);
    text-align: center;
}
.source-link a { color: var(--accent); text-decoration: none; font-weight: 500; }
.source-link a:hover { text-decoration: underline; }

/* ===== TAB BAR ===== */
.tab-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-tab);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--tab-height);
    padding: 6px 4px env(safe-area-inset-bottom);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.06);
    z-index: 100;
    transition: background var(--transition), border-color var(--transition);
}
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    padding: 6px 8px;
    border-radius: 12px;
    position: relative;
    flex: 1;
    text-align: center;
    min-width: 0;
    font-family: var(--font);
}
.tab-item i { font-size: 22px; transition: transform 0.3s; }
.tab-item span {
    font-size: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.tab-item.active { color: var(--accent); }
.tab-item.active i { transform: translateY(-2px); }
.tab-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: all 0.3s;
    transform: translateX(-50%);
}
.tab-item.active::after { width: 60%; box-shadow: 0 0 16px var(--accent-glow); }
.tab-item:active { transform: scale(0.92); }
.tab-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    font-size: clamp(12px, 2.6vw, 14px);
    color: var(--text-muted);
    padding: 16px 0 8px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}
.footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
.footer a:hover { text-decoration: underline; }
.footer-contacts {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: clamp(12px, 2.6vw, 14px);
}
.footer-contacts a {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}
.footer-contacts a:hover { color: var(--accent); }

/* ===== ABOUT BLOCK ===== */
#aboutBlock { padding: 20px 0; }
#aboutBlock[hidden] { display: none; }
#aboutBlock h3 { font-size: clamp(22px, 5vw, 28px); margin-bottom: 12px; }
#aboutBlock p { font-size: clamp(14px, 3.2vw, 17px); color: var(--text-secondary); line-height: 1.6; }
#aboutBlock a { color: var(--accent); }
#aboutBlock .back-btn {
    margin-top: 16px;
    padding: 11px 26px;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-family: var(--font);
    font-size: 15px;
}
#aboutBlock .back-btn:active { transform: scale(0.95); }

/* ===== RESPONSIVE ===== */

/* Mobile small */
@media (max-width: 380px) {
    .app { padding: 10px 10px 0; }
    .hero-title { font-size: 22px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn-primary, .btn-secondary { justify-content: center; font-size: 14px; padding: 12px 20px; }
    .cameras-grid { gap: 10px; }
    .camera-name { padding: 7px 9px; }
    .card { padding: 14px 12px; }
    .tab-item i { font-size: 20px; }
    .tab-item span { font-size: 9px; }
}

/* Mobile default: 2 cameras in row */
@media (max-width: 767px) {
    .cameras-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .app { max-width: 90%; padding: 20px 24px 0; }
    .cameras-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .hero { padding: 20px 0 24px; }
    .hero-title { font-size: 32px; }
    .card { padding: 22px 20px; border-radius: 22px; }
    .tab-item i { font-size: 24px; }
    .tab-item span { font-size: 11px; }
}

/* Desktop */
@media (min-width: 1024px) {
    .app { max-width: 1100px; }
    .cameras-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; }
    .hero-title { font-size: 38px; }
    .card { padding: 26px 24px; }
    .section-title { font-size: 28px; }
    .tab-item i { font-size: 26px; }
    .tab-item span { font-size: 12px; }
}

/* Tab bar centering on wider screens */
@media (min-width: 600px) {
    .tab-bar {
        max-width: 460px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
        width: auto;
        justify-content: center;
        padding: 6px 16px;
        gap: 4px;
    }
    .tab-item { flex: 0 1 auto; padding: 6px 16px; }
}
@media (min-width: 1024px) {
    .tab-bar { max-width: 520px; padding: 8px 24px; gap: 8px; border-radius: 24px 24px 0 0; }
    .tab-item { padding: 6px 20px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}