/*
 * YouCast365 app shell CSS.
 * Includes the original template variables and behavior, implemented without Tailwind.
 */

:root {
    --yc-sidebar-expanded: 260px;
    --yc-sidebar-collapsed: 72px;
    --yc-header-height: 64px;
    --yc-mobile-header: 64px;
    --yc-player-height: 84px;
    --yc-mobile-footer: 68px;
    --yc-admin-bar-height: 0px;
    --yc-player-desktop-width: 320px;
    --yc-player-desktop-height: 356px;
    --yc-player-mobile-width: 480px;
    --yc-player-mobile-height: 224px;

    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --surface-2-color: #e8eaed;
    --surface-3-color: #dadce0;
    --surface-container-low: #ffffff;
    --surface-container-high: #dadce0;
    --border-color: #dadce0;
    --text-color: #202124;
    --text-muted: #5f6368;
    --primary-color: #0b57d0;
    --primary-container: #d3e3fd;
    --on-primary-container: #041e49;
    --secondary-container: #e8eaed;
    --on-secondary-container: #202124;
    --outline-color: #747775;
    --danger-color: #ff2b4f;
}

:root.dark,
body.yc-theme-dark {
    --bg-color: #050505;
    --surface-color: #181818;
    --surface-2-color: #242424;
    --surface-3-color: #353534;
    --surface-container-low: #1c1b1b;
    --surface-container-high: #2a2a2a;
    --border-color: #2f2f2f;
    --text-color: #e5e2e1;
    --text-muted: #a8a8a8;
    --primary-color: #abc7ff;
    --primary-container: #0073e6;
    --on-primary-container: #fffeff;
    --secondary-container: #454747;
    --on-secondary-container: #ffffff;
    --outline-color: #8b919f;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3-color) var(--bg-color);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--surface-3-color);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--outline-color);
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: Inter, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow: hidden;
}

body:has(.yc-tv-ui-root) .yc-app-content {
    padding-bottom: 0;
    background: #050505;
}

body:has(.yc-tv-ui-root) .yc-player,
body:has(.yc-tv-ui-root) .yc-player-tab {
    display: none !important;
}

body.yc365-soft-loading {
    cursor: progress;
}

body.yc365-soft-loading::before {
    content: "";
    position: fixed;
    top: calc(var(--yc-admin-bar-height) + var(--yc-header-height));
    left: 0;
    right: 0;
    z-index: 220;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), #8b5cf6, var(--primary-color), transparent);
    background-size: 220% 100%;
    box-shadow: 0 0 18px color-mix(in srgb, var(--primary-color) 55%, transparent);
    animation: yc365RouteLoading 0.9s linear infinite;
    pointer-events: none;
}

body.yc365-soft-loading .yc-sidebar-link,
body.yc365-soft-loading .yc-footer-link,
body.yc365-soft-loading .yc-login-pill {
    cursor: progress;
}

#yc-app-content[aria-busy="true"] {
    opacity: 0.78;
    transition: opacity 0.16s ease;
}

@keyframes yc365RouteLoading {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.ambient-bg {
    position: fixed;
    inset: 0 0 auto 0;
    width: 100%;
    height: 50vh;
    background: radial-gradient(circle at 50% 0%, rgba(0, 115, 230, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scroll::-webkit-scrollbar {
    display: none;
}

/* Utility classes kept for compatibility with the attached template fragment. */
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-3 { gap: 0.75rem; }
.text-body-sm { font-size: 14px; line-height: 1.4; }
.text-muted { color: var(--text-muted); }
.copyright a,
.info a { color: var(--primary-color); }

.yc-top-header {
    position: fixed;
    top: var(--yc-admin-bar-height);
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--yc-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    background: color-mix(in srgb, var(--surface-color) 88%, transparent);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(18px);
}

.yc-header-brand,
.yc-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.yc-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.yc-logo img {
    width: var(--yc-logo-w);
    height: var(--yc-logo-h);
    object-fit: contain;
}

.yc-logo-mark {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-container);
    color: var(--on-primary-container);
}

.yc-icon-button {
    position: relative;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    background: transparent;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.yc-icon-button:hover,
.yc-icon-button:focus-visible {
    background: var(--surface-2-color);
    outline: none;
}

.yc-live-state .fa-coins {
    color: #4b86ff;
}

.yc-count-dot {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger-color);
    color: #fff;
    font-size: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.yc-count-dot.is-visible {
    display: flex;
}

.yc-desktop-search {
    max-width: 640px;
    flex: 1;
    min-width: 240px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-2-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    cursor: text;
}

.yc-login-pill,
.yc-account-pill,
.yc-primary-button,
.yc-outline-button {
    min-height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.yc-login-pill,
.yc-primary-button {
    background: var(--primary-container);
    color: var(--on-primary-container);
}

.yc-outline-button {
    background: transparent;
    border-color: var(--outline-color);
    color: var(--primary-color);
}

.yc-account-pill {
    background: var(--surface-2-color);
    color: var(--text-color);
}

.yc-account-pill img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.yc-secondary-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 18px;
    width: min(360px, calc(100vw - 32px));
    padding: 10px;
    display: none;
    flex-direction: column;
    background: var(--surface-2-color);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.yc-secondary-menu.is-open {
    display: flex;
}

.yc-menu-row {
    width: 100%;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
}

.yc-menu-row:hover {
    background: var(--surface-3-color);
}

.yc-menu-row i {
    width: 22px;
    text-align: center;
}

.yc-menu-row b {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

.yc-app-frame {
    display: flex;
    height: calc(100vh - var(--yc-admin-bar-height));
    padding-top: var(--yc-header-height);
    padding-bottom: 0;
    overflow: hidden;
}

.yc-sidebar {
    width: var(--yc-sidebar-expanded);
    flex: 0 0 auto;
    height: calc(100vh - var(--yc-header-height) - var(--yc-admin-bar-height));
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: width 0.2s ease, transform 0.2s ease;
}

.yc-sidebar-nav {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 20px;
}

.yc-sidebar-link,
.yc-footer-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    border-radius: 14px;
    transition: background 0.18s ease, color 0.18s ease;
}

.yc-sidebar-link {
    min-height: 54px;
    padding: 0 16px;
    font-size: 17px;
    font-weight: 700;
}

.yc-sidebar-link:hover,
.yc-sidebar-link:focus-visible {
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    outline: none;
}

.yc-sidebar-link.is-active,
.yc-sidebar-link.current-menu-item,
.yc-sidebar-link[aria-current="page"] {
    background: var(--secondary-container);
    color: var(--on-secondary-container);
}

.yc-sidebar-link i {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.yc-sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 18px 8px;
}

body.yc-sidebar-collapsed .yc-sidebar {
    width: var(--yc-sidebar-collapsed);
}

body.yc-sidebar-collapsed .yc-sidebar-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.yc-sidebar-collapsed .sidebar-text,
body.yc-sidebar-collapsed .sidebar-promo {
    display: none;
}

.yc-app-content {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 28px 40px 48px;
    background: var(--bg-color);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.yc-home-hero,
.yc-page,
.yc-row-section {
    max-width: 1280px;
    margin: 0 auto 42px;
}

.yc-home-hero {
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    padding: 34px;
    border-radius: 24px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.25)),
        radial-gradient(circle at 80% 20%, rgba(0, 115, 230, 0.35), transparent 36%),
        var(--surface-2-color);
    overflow: hidden;
}

.yc-home-hero h1 {
    max-width: 780px;
    margin: 6px 0 10px;
    font-size: clamp(32px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: 0;
}

.yc-page-header h1,
.yc-page .entry-title,
.yc-page .page-title,
.yc-woo-page .page-title,
.yc-woo-page .woocommerce-products-header__title {
    max-width: 760px;
    margin: 0 0 14px;
    font-size: clamp(21px, 1.8vw, 24px);
    line-height: 1.2;
    letter-spacing: 0;
    font-weight: 700;
}

.yc-woo-page .woocommerce-breadcrumb,
.yc-page .woocommerce-breadcrumb {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}

.yc-woo-page .woocommerce-breadcrumb a,
.yc-page .woocommerce-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.yc-woo-page .woocommerce-breadcrumb a:hover,
.yc-page .woocommerce-breadcrumb a:hover {
    color: var(--text-color);
}

.yc-home-hero p,
.yc-page p {
    max-width: 720px;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.55;
}

.yc-eyebrow {
    margin: 0;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.yc-hero-actions,
.yc-card-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.yc-section-heading {
    margin-bottom: 18px;
}

.yc-section-heading h2 {
    margin: 4px 0 0;
    font-size: 32px;
    line-height: 1.15;
}

.yc-card-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
}

.yc-tool-card {
    min-width: 250px;
    max-width: 300px;
    border-radius: 18px;
    padding: 22px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.yc-tool-card > span {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-container);
    color: var(--on-primary-container);
    margin-bottom: 18px;
}

.yc-tool-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.yc-tool-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.yc-page {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.yc-page-content {
    color: var(--text-color);
}

.yc-search-list {
    display: grid;
    gap: 10px;
}

.yc-search-groups,
.yc-search-group {
    display: grid;
    gap: 18px;
}

.yc-search-group {
    margin-bottom: 22px;
}

.yc-search-group-head,
.yc-search-page .yc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.yc-search-group-head h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.yc-search-group-head span,
.yc-search-count {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface-3-color);
    color: var(--text-color);
    font-size: 12px;
    font-weight: 800;
}

.yc-search-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface-2-color);
}

.yc-search-card img,
.yc-search-fallback {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
}

.yc-search-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3-color);
}

.yc-search-card em {
    display: block;
    color: var(--text-muted);
    font-style: normal;
    margin-top: 4px;
}

.yc-search-card small {
    display: block;
    color: var(--text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yc-search-page-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(780px, 100%);
    margin-top: 18px;
    padding: 8px 8px 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-2-color);
}

.yc-search-page-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text-color);
}

.yc-search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: var(--brand-color);
    color: #fff;
    font-weight: 800;
}

.yc-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    flex-direction: column;
    background: var(--bg-color);
}

.yc-search-overlay.is-open {
    display: flex;
}

.yc-search-bar {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.yc-search-bar input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: var(--surface-2-color);
    color: var(--text-color);
    outline: none;
}

.yc-search-results {
    padding: 18px;
    overflow-y: auto;
}

#yc-search-voice.is-listening {
    color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(77, 124, 255, .25);
}

.yc-muted {
    color: var(--text-muted);
}

.yc-toast-modal {
    position: fixed;
    top: 78px;
    right: 18px;
    z-index: 120;
    width: min(390px, calc(100vw - 32px));
    min-height: 130px;
    display: none;
    padding: 18px;
    background: var(--surface-2-color);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.yc-toast-modal.is-open {
    display: block;
}

.yc-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
}

.yc-toast-content h3 {
    margin: 0 28px 12px 0;
}

.yc-toast-list {
    display: grid;
    gap: 10px;
}

.yc-hangout-avatar-composite,
.yc-hangout-avatar-img {
    height: 130px;
    width: 130px;
    border-radius: 18px;
    object-fit: contain;
    background: var(--surface-3-color);
}

.yc-hangout-avatar-composite {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.yc-hangout-avatar-composite img {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.yc-avatar-body { bottom: 0; }
.yc-avatar-head { top: 0; }

.yc-player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    height: var(--yc-player-height);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: var(--surface-container-low);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28);
}

.yc-player.is-minimized {
    display: none;
}

.yc-minimized-player-tab {
    position: fixed;
    right: 18px;
    bottom: 0;
    z-index: 59;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
}

.yc-minimized-player-tab.is-visible {
    display: flex;
}

.yc-player-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    flex: 0 0 auto;
}

.yc-player-close:hover {
    background: var(--surface-2-color);
    color: var(--text-color);
}

.yc-player-media {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    flex: 0 0 auto;
}

.yc-player-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.yc-player-play-large {
    display: none;
}

.yc-player-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--surface-3-color);
}

.yc-player-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--primary-container);
}

.yc-player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.yc-player-play {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--text-color);
    color: var(--bg-color);
    cursor: pointer;
}

.yc-player-title-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.yc-player-title-wrap strong,
.yc-player-title-wrap span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yc-player-title-wrap span {
    color: var(--text-muted);
}

.yc-mobile-footer,
.yc-mobile-only {
    display: none;
}

.yc-footer-link {
    min-width: 56px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 800;
}

.yc-footer-link i {
    font-size: 20px;
}

.yc-footer-link.is-active,
.yc-footer-link.current-menu-item,
.yc-footer-link[aria-current="page"] {
    color: var(--on-primary-container);
}

.yc-footer-link.is-active i,
.yc-footer-link.current-menu-item i,
.yc-footer-link[aria-current="page"] i {
    color: var(--primary-container);
    font-size: 26px;
}

.yc-mobile-overlay {
    position: fixed;
    inset: var(--yc-mobile-header) 0 0 0;
    z-index: 35;
    display: none;
    background: rgba(0, 0, 0, 0.62);
}

body.mobile-sidebar-open .yc-mobile-overlay {
    display: block;
}

.yc-woo-page .woocommerce {
    color: var(--text-color);
}

.yc-woo-page input,
.yc-woo-page select,
.yc-woo-page textarea {
    background: var(--surface-2-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

@media (max-width: 767px) {
    body {
        overflow: hidden;
    }

    .yc-top-header {
        height: var(--yc-mobile-header);
        justify-content: flex-start;
        padding: 0 6px;
        gap: 4px;
        overflow: visible;
    }

    .yc-header-brand {
        flex: 0 0 auto;
        gap: 4px;
        min-width: 0;
    }

    .yc-header-brand .yc-icon-button {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }

    .yc-logo {
        flex: 0 0 auto;
        max-width: 46px;
        overflow: visible;
    }

    .yc-logo img {
        width: min(var(--yc-mobile-logo-w), 44px);
        height: min(var(--yc-mobile-logo-h), 40px);
        max-width: 44px;
        max-height: 40px;
        object-fit: contain;
    }

    .yc-logo-text {
        font-size: 18px;
    }

    .yc-header-actions {
        position: relative;
        margin-left: auto;
        flex: 0 1 auto;
        min-width: 0;
        gap: 1px;
        overflow: visible;
    }

    .yc-header-actions .yc-icon-button {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    .yc-desktop-search,
    .yc-account-pill span {
        display: none;
    }

    .yc-mobile-only {
        display: inline-flex;
    }

    .yc-header-actions [data-yc-toast="notifications"],
    .yc-header-actions [data-yc-toast="credits"],
    .yc-header-actions [data-yc-toast="cart"],
    #yc-secondary-menu-button {
        display: inline-flex;
    }

    #yc-secondary-menu-button {
        order: 20;
    }

    .yc-account-pill {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        flex: 0 0 34px;
        padding: 0;
        overflow: visible;
        justify-content: center;
    }

    .yc-account-pill img,
    .yc-account-pill .avatar {
        width: 30px;
        height: 30px;
        min-width: 30px;
        border-radius: 50%;
    }

    .yc-login-pill {
        max-width: 86px;
        padding: 0 12px;
        min-height: 34px;
        font-size: 12px;
        white-space: nowrap;
    }

    .yc-app-frame {
        padding-bottom: calc(var(--yc-mobile-footer) + env(safe-area-inset-bottom));
    }

    .yc-sidebar {
        position: fixed;
        top: var(--yc-mobile-header);
        left: 0;
        z-index: 40;
        height: calc(100vh - var(--yc-mobile-header) - var(--yc-mobile-footer));
        bottom: var(--yc-mobile-footer);
        width: min(330px, 78vw);
        transform: translateX(-105%);
        box-shadow: 12px 0 28px rgba(0, 0, 0, 0.45);
    }

    body.mobile-sidebar-open .yc-sidebar {
        transform: translateX(0);
    }

    .yc-app-content {
        padding: 20px 16px 40px;
    }

    .yc-home-hero {
        min-height: 290px;
        margin: -20px -16px 34px;
        border-radius: 0 0 28px 28px;
        padding: 92px 22px 26px;
    }

    .yc-home-hero h1,
    .yc-page-header h1 {
        font-size: 34px;
    }

    .yc-card-row {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .yc-tool-card {
        min-width: 78vw;
    }

    .yc-player {
        bottom: var(--yc-mobile-footer);
        height: var(--yc-player-height);
        padding: 8px 12px;
    }

    .yc-player-info {
        gap: 8px;
    }

    .yc-player-info #yc-player-prev,
    .yc-player-info #yc-player-next,
    .yc-player-info #yc-player-expand {
        display: none;
    }

    .yc-mobile-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 70;
        height: var(--yc-mobile-footer);
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px env(safe-area-inset-bottom);
        background: color-mix(in srgb, var(--surface-container-low) 96%, transparent);
        border-top: 1px solid var(--border-color);
        backdrop-filter: blur(14px);
    }

    .yc-toast-modal {
        top: 74px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}

/* PLAYER TEMPLATE OVERRIDES START
   Matches the attached template: floating mini MP3/MP4 player, close button, and restore tab. */
.hidden {
    display: none !important;
}

.flex {
    display: flex !important;
}

.yc-minimized-player-tab {
    position: fixed;
    right: 16px;
    bottom: 64px;
    z-index: 60;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: var(--surface-color);
    color: var(--text-color);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: background 0.2s ease;
}

.yc-minimized-player-tab:hover {
    background: var(--surface-2-color);
}

.yc-player {
    position: fixed;
    right: 16px;
    bottom: 80px;
    left: auto;
    width: min(var(--yc-player-mobile-width), calc(100vw - 32px));
    max-width: none;
    height: min(var(--yc-player-mobile-height), calc(100vh - 120px));
    max-height: min(var(--yc-player-mobile-height), calc(100vh - 120px));
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-color);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.yc-player-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease;
}

.yc-player-close:hover {
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
}

.yc-player-video {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.yc-player-thumb,
.yc-player-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
    transition: opacity 0.2s ease;
}

.yc-player-video:hover .yc-player-thumb,
.yc-player-video:hover video {
    opacity: 1;
}

.yc-player-video-hover {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 34px;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.yc-player-video:hover .yc-player-video-hover {
    opacity: 1;
}

.progress-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--surface-2-color);
    cursor: pointer;
    touch-action: none;
    user-select: none;
    transition: height 0.1s linear;
}

.progress-container:hover {
    height: 6px;
}

.progress-bar-bg {
    position: absolute;
    inset: 0;
    background: var(--surface-3-color);
}

.progress-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: var(--primary-color);
    transition: width 0.1s linear;
}

.yc-player-info-row {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    background: var(--surface-color);
}

.yc-player-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.yc-player-play {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--text-color);
    color: var(--surface-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.yc-player-play:hover {
    transform: scale(1.05);
}

.yc-player-title-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.yc-player-title-wrap span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#yc-player-title {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 700;
}

#yc-player-subtitle {
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 2px;
}

.yc-player-expand {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.yc-player-expand:hover {
    color: var(--text-color);
    background: var(--surface-2-color);
}

.yc-player-hidden-control,
.yc-player-info-row #yc-player-next {
    display: none;
}

@media (min-width: 768px) {
    .yc-minimized-player-tab {
        right: 32px;
        bottom: 0;
    }

    .yc-player {
        right: 32px;
        bottom: 24px;
        width: var(--yc-player-desktop-width);
        height: min(var(--yc-player-desktop-height), calc(100vh - 96px));
        max-height: min(var(--yc-player-desktop-height), calc(100vh - 96px));
    }
}
/* PLAYER TEMPLATE OVERRIDES END */

/* WORDPRESS ADMIN BAR COMPATIBILITY START */
body.admin-bar {
    --yc-admin-bar-height: 32px;
}

body.admin-bar .yc-search-overlay {
    top: var(--yc-admin-bar-height);
    height: calc(100vh - var(--yc-admin-bar-height));
}

body.admin-bar .yc-toast-modal {
    top: calc(var(--yc-header-height) + var(--yc-admin-bar-height));
}

body.admin-bar .yc-mobile-overlay {
    top: calc(var(--yc-mobile-header) + var(--yc-admin-bar-height));
}

@media (max-width: 782px) {
    body.admin-bar {
        --yc-admin-bar-height: 46px;
    }

    body.admin-bar .yc-sidebar {
        top: calc(var(--yc-mobile-header) + var(--yc-admin-bar-height));
        height: calc(100vh - var(--yc-mobile-header) - var(--yc-mobile-footer) - var(--yc-admin-bar-height));
        bottom: var(--yc-mobile-footer);
    }
}
/* WORDPRESS ADMIN BAR COMPATIBILITY END */

/* PAGE TITLE AND BREADCRUMB SCALE SAFETY START */
.yc-page-header h1,
.yc-page .entry-title,
.yc-page .page-title,
.yc-page-content h1,
.yc-page-content .wp-block-heading,
.yc-woo-page .page-title,
.yc-woo-page .woocommerce-products-header__title {
    font-size: clamp(21px, 1.8vw, 24px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
}

.yc-page-content h2,
.yc-woo-page h2,
.yc-page h2 {
    font-size: clamp(18px, 1.7vw, 24px);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
}

.yc-woo-page .woocommerce-breadcrumb,
.yc-page .woocommerce-breadcrumb,
.yc-woo-page nav.woocommerce-breadcrumb {
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 767px) {
    .yc-page-header h1,
    .yc-page .entry-title,
    .yc-page .page-title,
    .yc-page-content h1,
    .yc-page-content .wp-block-heading,
    .yc-woo-page .page-title,
    .yc-woo-page .woocommerce-products-header__title {
        font-size: 24px;
    }
}
/* PAGE TITLE AND BREADCRUMB SCALE SAFETY END */

/* PLAIN PAGE SURFACE START */
article.yc-page,
.yc-app-content > .yc-page {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.yc-page-header {
    margin: 0 0 22px;
    padding: 0;
}

.yc-page-header h1,
.yc-page-content h1,
.yc-page-content .wp-block-heading {
    font-size: clamp(22px, 1.9vw, 26px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
}
/* PLAIN PAGE SURFACE END */

/* SERVICE TEMPLATE SHELL START */
.yc-app-content > .yc-service-shell,
.yc-service-shell[data-yc-service-template] {
    display: block;
    min-height: 100%;
    min-width: 0;
    width: 100%;
    color: var(--text-color);
    background: var(--bg-color);
    font-family: Inter, Arial, sans-serif;
    --yc-page-bg: var(--bg-color);
    --yc-card-bg: var(--surface-color);
    --yc-card: var(--surface-color);
    --yc-text: var(--text-color);
    --yc-muted: var(--text-muted);
    --content-bg: var(--surface-color);
    --secondary-text-color: var(--text-muted);
    --border-subtle: var(--border-color);
}

.yc-service-shell[data-yc-service-template],
.yc-service-shell[data-yc-service-template] * {
    box-sizing: border-box;
}

.yc-service-shell[data-yc-service-template] img,
.yc-service-shell[data-yc-service-template] video,
.yc-service-shell[data-yc-service-template] canvas,
.yc-service-shell[data-yc-service-template] audio {
    max-width: 100%;
}

.yc-service-shell[data-yc-service-template] a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.yc-service-shell[data-yc-service-template] input,
.yc-service-shell[data-yc-service-template] select,
.yc-service-shell[data-yc-service-template] textarea,
.yc-service-shell[data-yc-service-template] button {
    font-family: inherit;
}

.yc-service-shell[data-yc-service-template] table {
    max-width: 100%;
}

@media (max-width: 782px) {
    .yc-app-content > .yc-service-shell,
    .yc-service-shell[data-yc-service-template] {
        min-height: calc(100vh - var(--yc-mobile-header));
        padding-bottom: calc(var(--yc-mobile-footer) + env(safe-area-inset-bottom));
    }
}
/* SERVICE TEMPLATE SHELL END */

/* AIMTV HLS PLAYER START */
.yc-aimtv-player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-color);
}

.yc-aimtv-player-frame.is-rounded-top {
    border-radius: 12px 12px 0 0;
}

.yc-aimtv-player-frame.is-rounded {
    border-radius: 8px;
}

.yc-aimtv-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.yc-aimtv-muted-badge,
.yc-aimtv-now-overlay,
.yc-aimtv-viewers-badge {
    position: absolute;
    z-index: 3;
    background: rgba(0, 0, 0, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    backdrop-filter: blur(8px);
}

.yc-aimtv-muted-badge {
    left: 12px;
    bottom: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
}

.yc-aimtv-mute-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    font: inherit;
}

.yc-aimtv-mute-toggle:hover,
.yc-aimtv-mute-toggle:focus-visible {
    background: rgba(0, 0, 0, 0.82);
    border-color: rgba(171, 199, 255, 0.7);
    outline: none;
}

.yc-aimtv-mute-toggle.is-muted {
    color: #fff;
}

.yc-aimtv-mute-toggle.is-top-right {
    left: auto;
    right: 16px;
    top: 16px;
    bottom: auto;
}

.yc-aimtv-now-overlay {
    left: 16px;
    bottom: 16px;
    max-width: min(70%, 420px);
    padding: 8px 10px;
    border-radius: 8px;
}

.yc-aimtv-now-title,
.yc-aimtv-now-artist {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    letter-spacing: 0;
}

.yc-aimtv-now-title {
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
}

.yc-aimtv-now-artist {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.2;
}

.yc-aimtv-viewers-badge {
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.2;
}

.yc-aimtv-welcome-overlay {
    left: auto;
    right: 12px;
    bottom: 12px;
    max-width: 62%;
    padding: 6px 8px;
    text-align: right;
}

.yc-aimtv-welcome-overlay .yc-aimtv-now-title {
    font-size: 11px;
}

.yc-aimtv-welcome-overlay .yc-aimtv-now-artist {
    font-size: 10px;
}

@media (max-width: 640px) {
    .yc-aimtv-now-overlay {
        left: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
    }

    .yc-aimtv-viewers-badge {
        right: 10px;
        bottom: 10px;
        font-size: 12px;
    }

    .yc-aimtv-welcome-overlay {
        display: none;
    }
}
/* AIMTV HLS PLAYER END */

/* AIMTV /TV CLASSIC ROUTE LAYOUT START */
.yc-tv-ui-root {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100dvh - var(--yc-admin-bar-height, 0px) - var(--yc-header-height, 64px));
    overflow: hidden;
    color: #e5e2e1;
    background: #050505;
    font-family: Inter, Arial, sans-serif;
}

.yc-tv-ui-root,
.yc-tv-ui-root * {
    box-sizing: border-box;
}

.yc-tv-ui-root > .relative {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1600px;
    min-height: calc(100dvh - var(--yc-admin-bar-height, 0px) - var(--yc-header-height, 64px));
    margin: 0 auto;
    padding: 32px;
}

.yc-tv-ui-root > .relative > .flex-1 {
    display: flex;
    flex: 1 1 auto;
    gap: 24px;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.yc-tv-ui-root .order-top,
.yc-tv-ui-root .order-bottom {
    min-width: 0;
}

.yc-tv-ui-root .order-top {
    display: flex;
    flex: 0 0 58.333%;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.yc-tv-ui-root .order-bottom {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
}

.yc-tv-ui-root .glass-panel {
    background: rgba(24, 24, 24, 0.6);
    border: 1px solid #2f2f2f;
    backdrop-filter: blur(16px);
}

.yc-tv-ui-root .rounded-full {
    border-radius: 9999px;
}

.yc-tv-ui-root .rounded-xl {
    border-radius: 12px;
}

.yc-tv-ui-root .toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 10px 24px;
    color: #a8a8a8;
    background: transparent;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}

.yc-tv-ui-root .toggle-btn.active {
    color: #fff;
    background: #0073e6;
}

.yc-tv-ui-root #panel-tv,
.yc-tv-ui-root #panel-radio {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #131313;
    transition: opacity 0.3s ease;
}

.yc-tv-ui-root #panel-tv {
    z-index: 10;
}

.yc-tv-ui-root #panel-radio {
    z-index: 0;
}

.yc-tv-ui-root .order-top > .relative {
    position: relative;
    flex: 1 1 auto;
    min-height: 680px;
    overflow: hidden;
}

.yc-tv-ui-root #panel-tv > .yc-aimtv-player-frame,
.yc-tv-ui-root #panel-radio > .yc-aimtv-player-frame,
.yc-tv-ui-root #panel-radio > .relative {
    flex: 0 0 auto;
}

.yc-tv-ui-root #panel-tv > .p-4:not(#tv-guide-container),
.yc-tv-ui-root #panel-radio > .p-4 {
    flex: 0 0 auto;
}

.yc-tv-ui-root #tv-guide-container,
.yc-tv-ui-root .chat-area-container {
    min-height: 0;
}

.yc-tv-ui-root #tv-guide-container {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.yc-tv-ui-root #schedule-content {
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
}

.yc-tv-ui-root .chat-area-container {
    min-height: 680px;
    height: auto;
}

.yc-tv-ui-root .chat-area-container > .chat-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.yc-tv-ui-root .chat-scroll {
    scrollbar-width: thin;
    scrollbar-color: #414754 rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
    .yc-tv-ui-root {
        --yc-tv-panel-height: clamp(660px, calc(100dvh - var(--yc-admin-bar-height, 0px) - var(--yc-header-height, 64px) - 88px), 860px);
        height: auto;
        min-height: calc(100dvh - var(--yc-admin-bar-height, 0px) - var(--yc-header-height, 64px));
        overflow: visible;
    }

    .yc-tv-ui-root > .relative {
        height: auto;
        min-height: calc(var(--yc-tv-panel-height) + 64px);
        padding-bottom: 24px;
    }

    .yc-tv-ui-root > .relative > .flex-1 {
        flex-direction: row;
        height: var(--yc-tv-panel-height);
        min-height: var(--yc-tv-panel-height);
        overflow: hidden;
    }

    .yc-tv-ui-root .order-top,
    .yc-tv-ui-root .order-bottom {
        height: var(--yc-tv-panel-height);
        min-height: 0;
        max-height: var(--yc-tv-panel-height);
        overflow: hidden;
    }

    .yc-tv-ui-root .order-top > .relative {
        height: 100%;
        min-height: 0;
        max-height: 100%;
    }

    .yc-tv-ui-root .order-bottom {
        flex-basis: 41.667%;
    }

    .yc-tv-ui-root .chat-area-container {
        min-height: 0;
        height: var(--yc-tv-panel-height);
        max-height: var(--yc-tv-panel-height);
    }

    .yc-tv-ui-root #panel-tv,
    .yc-tv-ui-root #panel-radio {
        height: 100%;
        min-height: 0;
    }

    .yc-tv-ui-root #schedule-content,
    .yc-tv-ui-root .chat-area-container > .chat-scroll {
        flex: 1 1 0;
        min-height: 0;
        max-height: 100%;
        overflow-y: auto;
    }
}

@media (min-width: 1024px) and (max-height: 760px) {
    .yc-tv-ui-root {
        --yc-tv-panel-height: 660px;
    }

    .yc-tv-ui-root #panel-tv {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .yc-tv-ui-root #tv-guide-container {
        flex: 0 0 auto;
        min-height: 220px;
    }

    .yc-tv-ui-root #schedule-content {
        flex: 0 0 auto;
        min-height: 150px;
        max-height: 180px;
    }
}

@media (max-width: 1023px) {
    .yc-tv-ui-root {
        overflow: visible;
    }

    .yc-tv-ui-root > .relative {
        padding: 24px 16px;
    }

    .yc-tv-ui-root > .relative > .flex-1 {
        flex-direction: column;
        overflow: visible;
    }

    .yc-tv-ui-root .order-top,
    .yc-tv-ui-root .order-bottom {
        flex: 0 0 auto;
        width: 100%;
    }

    .yc-tv-ui-root .order-top > .relative {
        min-height: 760px;
    }

    .yc-tv-ui-root .chat-area-container {
        min-height: 620px;
    }
}

@media (max-width: 782px) {
    .yc-tv-ui-root > .relative {
        padding-bottom: calc(var(--yc-mobile-footer, 68px) + var(--yc-player-height, 84px) + env(safe-area-inset-bottom) + 28px);
    }

    .yc-tv-ui-root .order-top > .relative {
        min-height: 700px;
    }

    .yc-tv-ui-root .chat-area-container {
        min-height: 560px;
    }
}
/* AIMTV /TV CLASSIC ROUTE LAYOUT END */
