:root {
    color-scheme: light;
    --brand-primary: #5b63f6;
    --brand-secondary: #6b7280;
    --brand-accent: #ffb84d;
    --brand-primary-rgb: 91, 99, 246;
    --brand-secondary-rgb: 107, 114, 128;
    --brand-accent-rgb: 255, 184, 77;
    --bg-0: #f8fafc;
    --bg-1: #eef2ff;
    --bg-2: #e2e8f0;
    --bg-3: #dbe4f0;
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(91, 99, 246, 0.28);
    --text-0: #0f172a;
    --text-1: #334155;
    --text-2: #64748b;
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
    --shadow-md: 0 16px 36px rgba(15, 23, 42, 0.1);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    min-height: 100%;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(var(--brand-primary-rgb), 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(var(--brand-accent-rgb), 0.1), transparent 24%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 48%, #f1f5f9 100%);
    color: var(--text-0);
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#app {
    min-height: 100vh;
    height: 100%;
    display: flex;
    flex-direction: column;
}

a, .btn-link {
    color: inherit;
}

button, input, textarea, select {
    font: inherit;
}

button {
    border: 0;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid rgba(var(--brand-primary-rgb), 0.85);
    outline-offset: 2px;
}

.btn-primary {
    color: #fff;
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #5a49f1;
    border-color: #5a49f1;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.12rem rgba(255, 255, 255, 0.55), 0 0 0 0.25rem rgba(var(--brand-primary-rgb), 0.18);
}

.content {
    padding-top: 0;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #ff9494;
}

.ticket-card {
    width: min(100%, 1080px) !important;
    max-width: 1080px !important;
    margin-inline: auto !important;
    display: grid !important;
    gap: 1rem !important;
    padding: 1.25rem !important;
    border-radius: 1rem !important;
    border: 1px solid var(--line) !important;
    background: #fff !important;
    color: var(--text-0) !important;
    box-shadow: var(--shadow-md) !important;
}

.ticket-card__header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    padding-bottom: 0.9rem !important;
    border-bottom: 1px solid var(--line) !important;
}

.ticket-card__title-block {
    display: flex !important;
    align-items: center !important;
    gap: 0.9rem !important;
    min-width: 0 !important;
}

.ticket-card__icon {
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 0.95rem !important;
    display: inline-grid !important;
    place-items: center !important;
    color: #fff !important;
    flex: 0 0 auto !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12) !important;
}

.ticket-card__title-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: 0 !important;
}

.ticket-card__title-row h2 {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: var(--text-0) !important;
}

.ticket-card__badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 46px !important;
    height: 26px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    color: var(--text-0) !important;
    background: rgba(var(--brand-primary-rgb), 0.12) !important;
    border: 1px solid rgba(var(--brand-primary-rgb), 0.16) !important;
}

.ticket-card__draw {
    margin-top: 0.25rem !important;
    color: var(--text-2) !important;
    font-size: 0.85rem !important;
}

.ticket-card__header-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
}

.ticket-card__back-btn {
    min-height: 2.25rem !important;
    padding: 0 0.85rem !important;
    border-radius: 999px !important;
    color: var(--text-1) !important;
    background: rgba(var(--brand-primary-rgb), 0.06) !important;
    border: 1px solid rgba(var(--brand-primary-rgb), 0.12) !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
}

.ticket-card__frequency {
    display: inline-flex !important;
    gap: 0.4rem !important;
    padding: 0.25rem !important;
    border-radius: 999px !important;
    background: rgba(248, 250, 252, 0.96) !important;
    border: 1px solid var(--line) !important;
}

.ticket-card__frequency-btn {
    min-width: 5.75rem !important;
    min-height: 2.25rem !important;
    padding: 0 0.9rem !important;
    border-radius: 999px !important;
    color: var(--text-1) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease !important;
}

.ticket-card__frequency-btn.is-active {
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(var(--brand-primary-rgb), 0.18) !important;
}

.ticket-card__body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 320px) !important;
    gap: 0.2rem !important;
    align-items: start !important;
}

.ticket-card__panel {
    min-width: 0 !important;
    padding: 0.75rem !important;
    border-radius: 0.95rem !important;
    background: #f8fafc !important;
    border: 1px solid var(--line) !important;
}

.ticket-card__section-head,
.ticket-card__lines-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    margin-bottom: 0.45rem !important;
    color: var(--text-1) !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
}

.ticket-card__lines-head {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
}

.ticket-card__number-grid,
.ticket-card__star-grid,
.ticket-card__reintegro-grid,
.ticket-card__key-grid {
    display: grid !important;
    gap: 0.45rem !important;
}

.ticket-ball,
.ticket-chip,
.ticket-chip-list .badge {
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
}

.ticket-ball {
    aspect-ratio: 1 !important;
    padding: 0 !important;
    border: 1px solid var(--line) !important;
    background: #f8fafc !important;
    color: var(--text-0) !important;
    font-size: 0.72rem !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04) !important;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease !important;
}

.ticket-ball:hover {
    transform: translateY(-1px) !important;
}

.ticket-ball--selected {
    color: #fff !important;
    box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.12), 0 12px 22px rgba(var(--brand-primary-rgb), 0.18) !important;
}

.ticket-ball--star.ticket-ball--selected,
.ticket-ball--key.ticket-ball--selected,
.ticket-ball--reintegro.ticket-ball--selected {
    color: #111827 !important;
}

.ticket-chip {
    min-height: 1.6rem !important;
    padding: 0 0.55rem !important;
    font-size: 0.7rem !important;
}

.ticket-card__line-nav {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 0.5rem !important;
    align-items: center !important;
    margin-top: 0.55rem !important;
}

.ticket-card__line-main {
    min-width: 0 !important;
    display: grid !important;
    gap: 0.25rem !important;
}

.ticket-card__line-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    min-width: 0 !important;
}

.ticket-card__line-title {
    min-width: 0 !important;
    color: var(--text-0) !important;
    font-size: 0.84rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
}

.ticket-card__line-state {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 1.35rem !important;
    padding: 0 0.5rem !important;
    border-radius: 999px !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--brand-primary) !important;
    background: rgba(var(--brand-primary-rgb), 0.08) !important;
    border: 1px solid rgba(var(--brand-primary-rgb), 0.14) !important;
}

.ticket-card__line-summary {
    min-width: 0 !important;
    color: var(--text-1) !important;
    font-size: 0.74rem !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
}

.ticket-card__line-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
}

.ticket-card__line-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
}

.ticket-card__line-nav-btn,
.ticket-card__line-add,
.ticket-card__add-line,
.ticket-action,
.ticket-card__footer .btn,
.ticket-card__footer button {
    border-radius: 999px !important;
    font-weight: 800 !important;
}

.ticket-card__line-nav-btn,
.ticket-card__line-add,
.ticket-card__add-line {
    min-height: 1.95rem !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    color: var(--text-1) !important;
}

.ticket-card__add-line {
    min-height: 2rem !important;
    padding: 0 0.7rem !important;
    font-size: 0.72rem !important;
    width: 100% !important;
    justify-content: flex-start !important;
}

.ticket-card__line-add {
    width: auto !important;
    min-width: 2rem !important;
    padding: 0 0.6rem !important;
}

.ticket-card__lines-list {
    display: grid !important;
    gap: 0.45rem !important;
    max-height: 22rem !important;
    overflow: auto !important;
    padding-right: 0.2rem !important;
}

.ticket-card__line {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 0.5rem !important;
    align-items: start !important;
    padding: 0.6rem 0.7rem !important;
    border-radius: 0.9rem !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
}

.ticket-card__line.is-active {
    border-color: rgba(var(--brand-primary-rgb), 0.2) !important;
    box-shadow: 0 0 0 1px rgba(var(--brand-primary-rgb), 0.08) inset, 0 10px 18px rgba(15, 23, 42, 0.04) !important;
}

.ticket-card__line.is-active .ticket-card__line-state {
    color: #fff !important;
    background: linear-gradient(135deg, var(--brand-primary), #6f77f7) !important;
    border-color: transparent !important;
}

.ticket-card__line.is-active .ticket-card__line-title {
    color: var(--brand-primary) !important;
}

.ticket-card__footer {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.6rem !important;
}

.ticket-action--ghost {
    background: #fff !important;
    border: 1px solid var(--line) !important;
    color: var(--text-1) !important;
}

.ticket-action--primary {
    color: #fff !important;
    border: 1px solid transparent !important;
    box-shadow: 0 12px 24px rgba(var(--brand-primary-rgb), 0.18) !important;
}

.ticket-card__empty-state {
    color: var(--text-2) !important;
}

.ticket-card--euromillones {
    --ticket-accent: #2563eb;
    --ticket-accent-rgb: 37, 99, 235;
    --ticket-accent-soft: rgba(37, 99, 235, 0.12);
    --ticket-secondary: #f59e0b;
    --ticket-secondary-rgb: 245, 158, 11;
}

.ticket-card--bonoloto {
    --ticket-accent: #3b82f6;
    --ticket-accent-rgb: 59, 130, 246;
    --ticket-accent-soft: rgba(59, 130, 246, 0.12);
    --ticket-secondary: #22c55e;
    --ticket-secondary-rgb: 34, 197, 94;
}

.ticket-card--primitiva {
    --ticket-accent: #22c55e;
    --ticket-accent-rgb: 34, 197, 94;
    --ticket-accent-soft: rgba(34, 197, 94, 0.12);
    --ticket-secondary: #10b981;
    --ticket-secondary-rgb: 16, 185, 129;
}

.ticket-card--gordo {
    --ticket-accent: #ef4444;
    --ticket-accent-rgb: 239, 68, 68;
    --ticket-accent-soft: rgba(239, 68, 68, 0.12);
    --ticket-secondary: #f59e0b;
    --ticket-secondary-rgb: 245, 158, 11;
}

.ticket-card--euromillones .ticket-card__icon,
.ticket-card--euromillones .ticket-card__frequency-btn.is-active,
.ticket-card--euromillones .ticket-ball--selected,
.ticket-card--euromillones .ticket-action--primary {
    background: linear-gradient(135deg, var(--ticket-accent), var(--ticket-secondary)) !important;
}

.ticket-card--bonoloto .ticket-card__icon,
.ticket-card--bonoloto .ticket-card__frequency-btn.is-active,
.ticket-card--bonoloto .ticket-ball--selected,
.ticket-card--bonoloto .ticket-action--primary {
    background: linear-gradient(135deg, var(--ticket-accent), var(--ticket-secondary)) !important;
}

.ticket-card--primitiva .ticket-card__icon,
.ticket-card--primitiva .ticket-card__frequency-btn.is-active,
.ticket-card--primitiva .ticket-ball--selected,
.ticket-card--primitiva .ticket-action--primary {
    background: linear-gradient(135deg, var(--ticket-accent), var(--ticket-secondary)) !important;
}

.ticket-card--gordo .ticket-card__icon,
.ticket-card--gordo .ticket-card__frequency-btn.is-active,
.ticket-card--gordo .ticket-ball--selected,
.ticket-card--gordo .ticket-action--primary {
    background: linear-gradient(135deg, var(--ticket-accent), var(--ticket-secondary)) !important;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.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;
}

.bot-avatar {
    --avatar-size: 52px;
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    position: relative;
    background: radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.22), transparent 28%), linear-gradient(145deg, rgba(var(--brand-primary-rgb), 0.95), rgba(16, 185, 129, 0.46));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 1) inset,
        0 0 8px rgba(15, 23, 42, .4);
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-avatar-fallback {
    color: white;
    font-weight: 800;
    letter-spacing: 0.06em;
    font-size: 0.95rem;
}

.bot-avatar--xs {
    --avatar-size: 32px;
}

.bot-avatar--sm {
    --avatar-size: 40px;
}

.app-chat-fab__circle .bot-avatar {
    width: 100%;
    height: 100%;
}
.app-bottom-nav__chat-circle .bot-avatar {
    width: 100%;
    height: 100%;
    transform: scale(1.4);
}

.bot-avatar--md {
    --avatar-size: 52px;
}

.bot-avatar--lg {
    --avatar-size: 72px;
}

.bot-avatar--xl {
    --avatar-size: 112px;
}

.home-screen {
    min-height: 100vh;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.home-screen__backdrop,
.home-screen__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-screen__backdrop {
    background:
        radial-gradient(circle at 20% 15%, rgba(var(--brand-primary-rgb), 0.08), transparent 24%),
        radial-gradient(circle at 85% 25%, rgba(var(--brand-accent-rgb), 0.08), transparent 22%),
        radial-gradient(circle at 50% 100%, rgba(41, 163, 255, 0.06), transparent 36%);
}

.home-screen__glow {
    filter: blur(24px);
    opacity: 0.65;
}

.home-screen__glow--one {
    top: 8%;
    left: 8%;
    width: 320px;
    height: 320px;
    background: rgba(var(--brand-primary-rgb), 0.14);
}

.home-screen__glow--two {
    right: 5%;
    bottom: 10%;
    width: 360px;
    height: 360px;
    background: rgba(var(--brand-accent-rgb), 0.08);
}

.home-shell {
    position: relative;
    z-index: 1;
    width: min(1580px, calc(100vw - 32px));
    height: min(960px, calc(100vh - 32px));
    margin: 0 auto;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    overflow: hidden;
}

.home-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.8), transparent 18%, transparent 78%, rgba(255, 255, 255, 0.3)),
        radial-gradient(circle at top, rgba(var(--brand-primary-rgb), 0.1), transparent 28%);
    opacity: 0.7;
    mix-blend-mode: screen;
}

.home-shell::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius-xl) - 1px);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.home-shell__overlay {
    display: none;
}

.home-shell__sidebar {
    position: relative;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 246, 252, 0.98)),
        radial-gradient(circle at top, rgba(var(--brand-primary-rgb), 0.08), transparent 32%);
    min-width: 0;
}

.home-shell__sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent 18%, transparent 70%, rgba(255, 255, 255, 0.45));
    pointer-events: none;
}

.home-sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 28px 22px 22px;
    gap: 18px;
}

.home-sidebar__brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 6px 0 12px;
}

.home-sidebar__logo-shell {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(var(--brand-primary-rgb), 0.1), rgba(var(--brand-primary-rgb), 0.03));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    overflow: hidden;
}

.home-sidebar__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 12px;
}

.home-sidebar__logo--fallback {
    display: grid;
    place-items: center;
    color: var(--text-0);
    font-weight: 900;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.48), rgba(var(--brand-accent-rgb), 0.16));
}

.home-sidebar__brand-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.home-header__eyebrow,
.home-section-heading__kicker,
.home-welcome-panel__kicker {
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.68rem;
    font-weight: 700;
}

.home-sidebar__title {
    font-size: 1.22rem;
    font-weight: 900;
    color: var(--text-0);
    line-height: 1;
}

.home-sidebar__subtitle {
    color: var(--text-2);
    font-size: 0.82rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-sidebar__new-chat,
.home-sidebar__link {
    width: 100%;
    min-height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-sidebar__new-chat {
    margin-top: 4px;
    background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.98), rgba(124, 131, 255, 0.95));
    color: white;
    font-weight: 700;
    box-shadow:
        0 18px 40px rgba(109, 94, 252, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.home-sidebar__new-chat:hover,
.home-sidebar__link:hover,
.home-quick-action:hover,
.home-composer__send:hover,
.home-composer__icon:hover,
.home-header__menu:hover {
    transform: translateY(-1px);
}

.home-sidebar__new-chat-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1rem;
}

.home-sidebar__nav {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.home-sidebar__link {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--text-1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.home-sidebar__link:hover {
    border-color: rgba(var(--brand-primary-rgb), 0.22);
    background: rgba(var(--brand-primary-rgb), 0.06);
    color: #0f172a;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.home-sidebar__link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(var(--brand-primary-rgb), 0.08), transparent);
    transform: translateX(-120%);
    transition: transform 260ms ease;
}

.home-sidebar__link:hover::after {
    transform: translateX(120%);
}

.home-sidebar__link-icon {
    width: 28px;
    display: inline-grid;
    place-items: center;
    font-size: 1rem;
    opacity: 0.95;
}

.home-sidebar__link--muted {
    background: transparent;
    color: var(--text-2);
}

.home-sidebar__footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
    padding-top: 8px;
}

.home-shell__panel {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(var(--brand-primary-rgb), 0.06), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.96));
}

.home-header {
    height: 74px;
    flex: 0 0 auto;
    padding: 0 22px;
    display: grid;
    grid-template-columns: 64px 1fr 108px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent);
}

.home-shell__topbar {
    position: sticky;
    top: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 12px;
    padding-right: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.home-top-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    align-self: center;
}

.home-shell__topbar .home-header {
    background: transparent;
    border-bottom: 0;
}

.home-login-fab {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    margin-right: 8px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.98), rgba(var(--brand-accent-rgb), 0.88));
    font-size: 0.8rem;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(var(--brand-primary-rgb), 0.22);
}

.home-login-fab--secondary {
    background: rgba(248, 250, 252, 0.96);
    box-shadow: none;
    color: #0f172a;
}

.home-login-fab--ghost {
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: none;
    color: #0f172a;
}

.home-login-fab--ghost:hover,
.home-login-fab--ghost:focus,
.home-login-fab--secondary:hover,
.home-login-fab--secondary:focus {
    background: rgba(var(--brand-primary-rgb), 0.06);
}

.home-header__menu {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.16);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
}

.home-header__menu span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f172a, rgba(15, 23, 42, 0.45));
}

.home-header__center {
    text-align: center;
    min-width: 0;
}

.home-header__title {
    color: var(--text-0);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.home-header__subtitle {
    color: var(--text-2);
    font-size: 0.82rem;
    line-height: 1.3;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-header__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.home-header__control {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    opacity: 0.95;
}

.home-header__control--minimize {
    background: #f6c152;
}

.home-header__control--close {
    background: #ef5c6d;
}

.home-shell__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding: 28px 28px 14px;
    display: grid;
    gap: 24px;
}

.home-conversation__stream {
    scroll-margin-bottom: 140px;
}

.home-shell__scroll--active .home-welcome-panel {
    opacity: 0.58;
    transform: scale(0.9);
    padding: 14px 16px 12px;
    margin-bottom: -6px;
}

.home-shell__scroll--ticket-open .home-welcome-panel {
    opacity: 1;
    transform: none;
    padding: 18px 18px 14px;
}

.home-shell__scroll--ticket-open .home-welcome-panel .bot-avatar {
    --avatar-size: 96px;
}

.home-shell__scroll--ticket-open .home-welcome-panel__copy h1 {
    font-size: clamp(1.1rem, 1.5vw, 1.6rem);
}

.home-shell__scroll--ticket-open .home-welcome-panel__copy p {
    max-width: 360px;
    font-size: 0.92rem;
}

.home-ticket-chatbot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.home-ticket-chatbot .bot-avatar {
    --avatar-size: 92px;
    flex: 0 0 auto;
}

.home-ticket-chatbot__copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.home-ticket-chatbot__kicker {
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
    font-weight: 800;
}

.home-ticket-chatbot__title {
    color: var(--text-0);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.home-ticket-chatbot__text {
    color: var(--text-1);
    font-size: 0.92rem;
}

.home-shell__scroll--ticket-open {
    gap: 16px;
    align-content: start;
    justify-items: stretch;
}

.home-game-selector {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    flex-wrap: wrap;
}

.home-game-selector__btn,
.home-game-selector__back {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.home-game-selector__btn {
    color: var(--text-1);
    background: rgba(248, 250, 252, 0.98);
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
}

.home-game-selector__icon {
    font-size: 0.82rem;
    line-height: 1;
    margin-top: 1px;
}

.home-game-selector__btn.is-active {
    color: white;
    background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.96), rgba(var(--brand-accent-rgb), 0.82));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 22px rgba(var(--brand-primary-rgb), 0.14);
}

.home-game-selector__back {
    color: #166534;
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.18);
}

.home-shell__scroll--active .home-welcome-panel__copy h1 {
    font-size: clamp(1.15rem, 1.4vw, 1.55rem);
}

.home-shell__scroll--active .home-welcome-panel__copy p {
    max-width: 340px;
}

.home-shell__scroll--active .home-welcome-panel .bot-avatar {
    --avatar-size: 104px;
}

.home-shell__scroll::-webkit-scrollbar {
    width: 10px;
}

.home-shell__scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    border: 2px solid rgba(8, 12, 22, 0.9);
}

.home-welcome-panel {
    position: relative;
    border-radius: 30px;
    padding: 22px 22px 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        radial-gradient(circle at top, rgba(109, 94, 252, 0.2), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255, 184, 77, 0.06), transparent 26%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.home-welcome-panel__hero {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.home-welcome-panel .bot-avatar {
    --avatar-size: 176px;
    justify-self: center;
}

.home-welcome-panel__copy {
    text-align: left;
    max-width: 780px;
    margin: 0;
}

.home-welcome-panel__kicker {
    margin-bottom: 8px;
}

.home-welcome-panel__copy h1 {
    margin: 0 0 8px;
    font-size: clamp(1.65rem, 2.1vw, 2.7rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: var(--text-0);
}

.home-welcome-panel__copy p {
    margin: 0;
    max-width: 520px;
    color: var(--text-1);
    font-size: 1rem;
    line-height: 1.6;
}

.home-welcome-panel__copy p br {
    display: none;
}

.home-section-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-section-heading h2 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-0);
    letter-spacing: -0.02em;
}

.home-quick-actions {
    display: grid;
    gap: 14px;
}

.home-quick-actions__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-quick-action {
    min-height: 146px;
    padding: 20px 20px 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(14, 22, 39, 0.96), rgba(10, 16, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: var(--text-0);
    display: grid;
    gap: 8px;
    text-align: left;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.home-quick-action--active {
    border-color: rgba(var(--brand-accent-rgb), 0.48);
    box-shadow:
        0 22px 42px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(var(--brand-accent-rgb), 0.18) inset;
    background:
        linear-gradient(180deg, rgba(var(--brand-primary-rgb), 0.16), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(14, 22, 39, 0.96), rgba(10, 16, 28, 0.98));
}

.home-quick-action:hover {
    border-color: rgba(109, 94, 252, 0.4);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.28);
    background:
        linear-gradient(180deg, rgba(109, 94, 252, 0.12), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(14, 22, 39, 0.96), rgba(10, 16, 28, 0.98));
}

.home-quick-action__icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(109, 94, 252, 0.22), rgba(255, 184, 77, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.1rem;
}

.home-quick-action__text {
    font-size: 1rem;
    font-weight: 700;
}

.home-quick-action__meta {
    color: var(--text-2);
    font-size: 0.9rem;
    line-height: 1.4;
}

.home-conversation {
    display: grid;
    gap: 14px;
}

.home-conversation__stream {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.home-conversation__empty {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 6px 10px;
}

.home-conversation__empty-title {
    color: var(--text-0);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 4px;
}

.home-conversation__empty-text {
    color: var(--text-2);
    line-height: 1.5;
}

.home-message--typing .home-message__bubble--typing {
    min-width: 92px;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 18px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    animation: typingPulse 1.1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

.home-message {
    display: flex;
    gap: 14px;
    align-items: flex-end;
}

.home-message--user {
    justify-content: flex-end;
}

.home-message--user .home-message__bubble {
    background: linear-gradient(135deg, rgba(109, 94, 252, 1), rgba(69, 155, 255, 0.88));
    color: white;
    border-bottom-right-radius: 6px;
}

.home-message--bot .home-message__bubble {
    background: linear-gradient(180deg, rgba(14, 20, 35, 0.94), rgba(10, 15, 28, 0.96));
    color: var(--text-1);
    border-bottom-left-radius: 6px;
}

.home-message__body {
    max-width: min(760px, 100%);
    display: grid;
    gap: 6px;
}

.home-message__meta {
    color: var(--text-2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-message__bubble {
    padding: 17px 18px;
    border-radius: 24px;
    line-height: 1.65;
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 760px;
}

.home-message--user .home-message__bubble {
    max-width: 560px;
}

.home-message--bot .bot-avatar {
    --avatar-size: 42px;
}

.home-composer {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 20px 22px 26px;
    display: grid;
    gap: 12px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 26%),
        linear-gradient(180deg, rgba(9, 14, 26, 0.78), rgba(8, 12, 22, 0.96));
    box-shadow: 0 -16px 36px rgba(0, 0, 0, 0.24);
}

.home-composer__lead {
    display: grid;
    gap: 6px;
    text-align: center;
    padding: 0 8px 4px;
}

.home-composer__title {
    color: var(--text-0);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.home-composer__subtitle {
    color: var(--text-2);
    font-size: 0.92rem;
    line-height: 1.4;
}

.home-composer__surface {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 54px 140px;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
        rgba(4, 8, 20, 0.96);
    box-shadow:
        0 22px 42px rgba(0, 0, 0, 0.24),
        0 0 0 1px rgba(var(--brand-primary-rgb), 0.16) inset,
        0 0 0 1px rgba(255, 255, 255, 0.03);
}

.home-composer__icon,
.home-composer__send {
    height: 58px;
    border-radius: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-composer__icon {
    width: 52px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-1);
}

.home-composer__icon--voice {
    background: rgba(var(--brand-primary-rgb), 0.08);
    border-color: rgba(var(--brand-primary-rgb), 0.16);
}

.home-composer__input {
    height: 60px;
    width: 100%;
    border-radius: 21px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.02);
    color: var(--text-0);
    padding: 0 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 24px rgba(0, 0, 0, 0.08);
}

.home-composer__input:focus {
    border-color: rgba(var(--brand-primary-rgb), 0.35);
    box-shadow:
        0 0 0 0.18rem rgba(var(--brand-primary-rgb), 0.12),
        0 18px 32px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-composer__input::placeholder {
    color: rgba(199, 210, 228, 0.7);
}

.home-composer__send {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-primary), #8b7cff);
    color: white;
    font-weight: 800;
    box-shadow:
        0 18px 32px rgba(109, 94, 252, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.home-composer__send:hover {
    box-shadow:
        0 20px 36px rgba(var(--brand-primary-rgb), 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

@keyframes typingPulse {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.55;
    }

    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

@media (max-width: 1280px) {
    .home-shell {
        grid-template-columns: 286px minmax(0, 1fr);
    }

    .home-quick-actions__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    body {
        overflow: auto;
    }

    .home-screen {
        padding: 0;
    }

    .home-shell {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        grid-template-columns: 1fr;
    }

    .home-shell__sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(84vw, 330px);
        transform: translateX(-102%);
        transition: transform 220ms ease;
        z-index: 3;
        box-shadow: 24px 0 50px rgba(0, 0, 0, 0.34);
    }

    .home-shell--sidebar-open .home-shell__sidebar {
        transform: translateX(0);
    }

    .home-shell--sidebar-open .home-shell__overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 16, 0.58);
        backdrop-filter: blur(3px);
        z-index: 2;
    }

    .home-header {
        grid-template-columns: 56px 1fr 92px;
        padding: 0 16px;
    }

    .home-header__menu {
        display: inline-flex;
    }

    .home-header__controls {
        gap: 8px;
    }

    .home-shell__scroll {
        padding: 18px 16px 14px;
    }

    .home-welcome-panel {
        padding: 22px 16px 24px;
    }

    .home-welcome-panel__brand-row {
        flex-direction: column;
        align-items: stretch;
    }

    .home-welcome-panel__brand-copy {
        justify-content: flex-start;
    }

    .home-welcome-panel .bot-avatar {
        --avatar-size: 98px;
        align-self: center;
    }

    .home-quick-actions__grid {
        grid-template-columns: 1fr;
    }

    .home-composer {
        padding: 14px 16px 18px;
    }

    .home-composer__surface {
        grid-template-columns: 52px minmax(0, 1fr) 52px;
        padding: 14px;
    }

    .home-composer__send {
        grid-column: 1 / -1;
    }

    .home-composer__send {
        height: 54px;
    }

    .home-message__bubble,
    .home-message--user .home-message__bubble {
        max-width: 100%;
    }

    .home-shell__scroll--active .home-welcome-panel {
        opacity: 0.82;
    }
}

@media (max-width: 640px) {
    .home-welcome-panel__copy h1 {
        font-size: 1.85rem;
    }

    .home-sidebar {
        padding: 22px 16px 16px;
    }

    .home-sidebar__logo-shell {
        width: 82px;
        height: 82px;
    }

    .home-composer__title {
        font-size: 0.98rem;
    }

    .home-composer__subtitle {
        font-size: 0.85rem;
    }
}
