﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.app-navbar {
    min-height: 64px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0;
}

.app-logo {
    display: block;
    width: 78px;
    height: auto;
    object-fit: contain;
}

.app-menu {
    align-items: center;
    gap: 2px;
}

.app-menu .nav-link,
.app-menu .btn.nav-link {
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 650;
}

.app-menu .nav-link:hover,
.app-menu .nav-link:focus {
    background: rgba(15, 23, 42, 0.06);
}

.app-nav-link-with-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.app-nav-badge {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    padding: 0 6px;
    background: #10b981;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.26);
}

.app-menu .app-menu-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #14532d !important;
    background: rgba(25, 135, 84, 0.10);
    border: 1px solid rgba(25, 135, 84, 0.22);
}

.app-menu .app-menu-back-link::before {
    content: "";
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 7px 12px;
    background: #111827;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
}

.impersonation-banner small {
    color: #cbd5e1;
    font-weight: 600;
    margin-left: 6px;
}

.impersonation-banner form {
    margin: 0;
}

.impersonation-banner button {
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    color: #fff;
    padding: 4px 10px;
    font-weight: 750;
}

.app-notification {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 3000;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px 16px;
    background: rgba(17, 24, 39, 0.96);
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
    font-size: 14px;
    font-weight: 750;
    transform: translateY(-110%);
    transition: transform 0.22s ease;
}

.app-notification.is-visible {
    transform: translateY(0);
}

.app-notification[hidden] {
    display: none !important;
}

.app-notification-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-notification button {
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.app-notification #appNotificationUndo {
    background: #fff;
    color: #111827;
}

.app-notification-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1;
}

.offline-status-banner {
    position: sticky;
    top: 0;
    z-index: 2950;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px max(14px, calc((100vw - 1140px) / 2));
    border-block: 1px solid rgba(91, 63, 16, 0.20);
    background: #fff7dc;
    color: #493511;
    box-shadow: 0 8px 24px rgba(83, 60, 20, 0.12);
    font-size: 0.86rem;
    line-height: 1.35;
}

.offline-status-banner[hidden] {
    display: none !important;
}

.offline-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #c27803;
    box-shadow: 0 0 0 4px rgba(194, 120, 3, 0.14);
}

.offline-status-message strong {
    color: #332309;
}

.offline-status-retry {
    min-height: 36px;
    border: 1px solid rgba(73, 53, 17, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #493511;
    padding: 6px 12px;
    font: inherit;
    font-weight: 850;
    white-space: nowrap;
}

.offline-status-retry:hover,
.offline-status-retry:focus-visible {
    background: #fff;
}

body.is-offline .app-notification[data-notification-kind="player-offline"] {
    display: none !important;
}

[data-offline-disabled-by-guard="true"] {
    opacity: 0.48 !important;
    cursor: not-allowed !important;
}

[data-offline-disabled-by-guard="true"]:focus-visible {
    outline: 3px solid #c27803;
    outline-offset: 2px;
}

.legal-consent {
    position: fixed;
    inset: auto 12px calc(12px + env(safe-area-inset-bottom, 0px)) 12px;
    z-index: 2500;
    display: flex;
    justify-content: center;
}

.legal-consent[hidden] {
    display: none !important;
}

.legal-consent-card {
    width: min(680px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
    color: #111827;
}

.legal-consent-card p {
    margin: 4px 0 0;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.35;
}

.legal-consent-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.legal-consent-actions a,
.legal-consent-actions button {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.legal-consent-actions #legalConsentAccept {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

@media (max-width: 640px) {
    body {
        margin-bottom: 36px;
    }

    .app-navbar {
        min-height: 50px;
        margin-bottom: 6px !important;
    }

    .app-navbar .container {
        min-height: 50px;
    }

    .app-logo {
        width: 58px;
    }

    .app-menu {
        align-items: stretch;
        padding: 8px 0;
    }

    .legal-consent-card {
        grid-template-columns: 1fr;
    }

    .legal-consent-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .app-notification {
        justify-content: space-between;
        align-items: flex-start;
        min-height: 58px;
        font-size: 13px;
    }

    .offline-status-banner {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 9px 12px;
        font-size: 0.78rem;
    }

    .offline-status-retry {
        grid-column: 2;
        width: fit-content;
        min-height: 32px;
        padding-block: 4px;
    }

}

.legal-page {
    max-width: 880px;
    margin: 24px auto;
    color: #111827;
}

.legal-page h1 {
    margin-bottom: 10px;
}

.legal-page-intro {
    color: #4b5563;
    font-size: 1.05rem;
}

.legal-page section {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.legal-page h2 {
    margin: 0 0 8px;
    font-size: 1.18rem;
}

.legal-page p:last-child {
    margin-bottom: 0;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.hidden {
display:none;
}
/* LangLangLink */
.scroll-textarea {
    min-height: 120px;
    max-height: 260px;
    overflow-y: auto;
    resize: vertical;
    white-space: pre-wrap;
}

.admin-llm-badge {
    --llm-accent: #667085;
    --llm-bg: #f2f4f7;
    --llm-border: #d0d5dd;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    border: 1px solid var(--llm-border);
    border-radius: 999px;
    background: var(--llm-bg);
    color: var(--llm-accent);
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1.25;
    padding: 3px 8px;
    white-space: nowrap;
}

.admin-llm-badge-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--llm-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1;
}

.llm-kind-text {
    --llm-accent: #067647;
    --llm-bg: #ecfdf3;
    --llm-border: #abefc6;
}

.llm-kind-ruby {
    --llm-accent: #b42318;
    --llm-bg: #fff1f3;
    --llm-border: #fda29b;
}

.llm-kind-voice {
    --llm-accent: #175cd3;
    --llm-bg: #eff8ff;
    --llm-border: #84caff;
}

.llm-kind-other {
    --llm-accent: #475467;
    --llm-bg: #f8fafc;
    --llm-border: #d0d5dd;
}

body:has(.auth-player-page:not(.player-page)) {
    min-height: 100vh;
    margin-bottom: 0;
    background:
        radial-gradient(circle at 50% 0, rgba(25, 135, 84, 0.10), transparent 32rem),
        #f7faf8;
}

body:has(.auth-player-page:not(.player-page)) .app-navbar {
    margin: 14px auto 18px !important;
    width: min(560px, calc(100% - 32px));
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

body:has(.auth-player-page:not(.player-page)) .app-navbar > .container {
    justify-content: center;
}

body:has(.auth-player-page:not(.player-page)) .app-brand {
    margin-right: 0;
}

body:has(.auth-player-page:not(.player-page)) .navbar-toggler,
body:has(.auth-player-page:not(.player-page)) .navbar-collapse,
body:has(.auth-player-page:not(.player-page)) footer {
    display: none !important;
}

body:has(.auth-player-page:not(.player-page)) > .container {
    width: min(560px, 100%);
    max-width: none;
    padding-inline: 16px;
}

.auth-player-page {
    min-height: calc(100vh - 128px);
    display: grid;
    align-items: start;
    padding: 2px 0 32px;
    color: #111827;
}

.auth-player-shell {
    width: 100%;
}

.auth-player-card {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
    padding: 18px;
}

.auth-player-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.auth-player-brand img {
    width: 62px;
    height: auto;
    flex: 0 0 auto;
}

.auth-player-brand p,
.auth-player-brand h1 {
    margin: 0;
}

.auth-player-brand p {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.auth-player-brand h1 {
    color: #0f172a;
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1.05;
}

.auth-google-form,
.auth-email-form {
    margin: 0;
}

.auth-google-button,
.auth-primary-button {
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    font-weight: 850;
}

.auth-google-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #fff;
    color: #111827;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.auth-google-button:hover,
.auth-google-button:focus-visible {
    border-color: rgba(16, 185, 129, 0.45);
    background: #f8fffc;
}

.auth-google-mark {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
}

.auth-google-mark svg {
    width: 22px;
    height: 22px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 0;
    background: rgba(15, 23, 42, 0.10);
}

.auth-divider span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.55);
}

.auth-email-form {
    display: grid;
    gap: 12px;
}

.auth-email-form .form-floating > .form-control {
    min-height: 54px;
    border-color: rgba(15, 23, 42, 0.13);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.78);
    color: #111827;
}

.auth-email-form .form-floating > label {
    color: #64748b;
    font-weight: 700;
}

.auth-validation ul {
    margin-bottom: 0;
    padding-left: 18px;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 750;
}

.auth-primary-button {
    border: 1px solid #129c6f;
    background: #13a87a;
    color: #fff;
    box-shadow: 0 10px 24px rgba(19, 168, 122, 0.24);
}

.auth-primary-button:hover,
.auth-primary-button:focus-visible {
    background: #0f936b;
}

.auth-secondary-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 0.93rem;
    font-weight: 800;
}

.auth-secondary-links a {
    color: #0f766e;
    text-decoration: none;
}

.auth-secondary-links a:hover,
.auth-secondary-links a:focus-visible {
    color: #0f5132;
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    body:has(.auth-player-page:not(.player-page)) {
        background:
            radial-gradient(circle at 50% 0, rgba(16, 185, 129, 0.16), transparent 32rem),
            #020617;
    }

    body:has(.auth-player-page:not(.player-page)) .app-navbar {
        border-color: rgba(148, 163, 184, 0.22) !important;
        background: rgba(2, 6, 23, 0.78) !important;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
    }

    .auth-player-page {
        color: #f8fafc;
    }

    .auth-player-card {
        border-color: rgba(148, 163, 184, 0.20);
        background: rgba(2, 6, 23, 0.82);
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
    }

    .auth-player-brand p {
        color: #94a3b8;
    }

    .auth-player-brand h1 {
        color: #f8fafc;
    }

    .auth-google-button {
        border-color: rgba(148, 163, 184, 0.22);
        background: rgba(15, 23, 42, 0.92);
        color: #f8fafc;
    }

    .auth-google-button:hover,
    .auth-google-button:focus-visible {
        background: rgba(15, 23, 42, 1);
    }

    .auth-divider::before,
    .auth-divider::after {
        background: rgba(148, 163, 184, 0.22);
    }

    .auth-email-form .form-floating > .form-control {
        border-color: rgba(148, 163, 184, 0.22);
        background: rgba(15, 23, 42, 0.74);
        color: #f8fafc;
    }

    .auth-email-form .form-floating > label,
    .auth-remember {
        color: #cbd5e1;
    }

    .auth-secondary-links a {
        color: #5eead4;
    }
}

@media (max-width: 640px) {
    body:has(.auth-player-page:not(.player-page)) .app-navbar {
        width: calc(100% - 32px);
        min-height: 68px;
        margin-top: 12px !important;
    }

    body:has(.auth-player-page:not(.player-page)) .app-logo {
        width: 70px;
    }

    .auth-player-page {
        min-height: calc(100vh - 112px);
    }

    .auth-player-card {
        padding: 16px;
    }

    .auth-player-brand h1 {
        font-size: 1.72rem;
    }
}

