:root {
    --color-primary: #c9b24f;
    --color-primary-dark: #b39b37;
    --color-accent: #e8894f;
    --color-accent-dark: #d87437;
    --color-bg: #f5f5f3;
    --color-surface: #ffffff;
    --color-border: #e7e2d6;
    --color-text: #5f6368;
    --color-text-strong: #2f3438;
    --color-bot: #f2ede3;
    --color-user: #c9b24f;
    --home-panel: rgba(9, 20, 37, 0.74);
    --home-line: rgba(255, 255, 255, 0.16);
    --home-text: #f4f7fb;
    --home-muted: rgba(244, 247, 251, 0.76);
    --home-accent: #79c9ff;
    --theme2-line: rgba(112, 186, 255, 0.26);
    --theme2-glow: rgba(97, 188, 255, 0.42);
    --theme2-gold: #f1c063;
    --premium-bg: #04070d;
    --premium-panel: rgba(8, 12, 18, 0.72);
    --premium-panel-strong: rgba(8, 12, 18, 0.9);
    --premium-line: rgba(255, 255, 255, 0.12);
    --premium-text: #f5f1e8;
    --premium-muted: rgba(223, 227, 235, 0.72);
    --premium-cyan: #64d4ff;
    --premium-orange: #ff8248;
    --premium-gold: #d4b378;
    --assistant-accent: #c91c68;
    --assistant-accent-dark: #a81352;
    --assistant-accent-soft: rgba(201, 28, 104, 0.14);
}

* {
    box-sizing: border-box;
}

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

body {
    color: var(--color-text);
    font-family: "Helvetica Neue", Arial, sans-serif;
}

body.page-home,
body.page-chat {
    min-height: 100vh;
}

body.page-home {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(5, 16, 29, 0.45), rgba(5, 12, 24, 0.85)),
        url('/img/soccerBall/stadium-background.png') center center / cover no-repeat fixed;
}

body.page-home {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

body.page-chat {
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(232, 137, 79, 0.12), rgba(232, 137, 79, 0.05)),
        var(--color-bg);
}

.stadium-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(3, 11, 22, 0.16), rgba(3, 11, 22, 0.62));
}

.site-header,
.hero-shell,
.chat-page,
.home-atmosphere {
    position: relative;
    z-index: 1;
}

.home-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.atmosphere-ring,
.atmosphere-particle {
    position: absolute;
    display: block;
}

.atmosphere-ring {
    border-radius: 50%;
    border: 1px solid rgba(121, 201, 255, 0.14);
    box-shadow: 0 0 40px rgba(121, 201, 255, 0.08);
}

.atmosphere-ring--one {
    right: 14%;
    top: 16%;
    width: 420px;
    height: 420px;
    transform: rotate(-12deg);
}

.atmosphere-ring--two {
    right: 11%;
    top: 22%;
    width: 500px;
    height: 500px;
    transform: rotate(22deg);
}

.atmosphere-particle {
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.85), transparent 70%);
    opacity: 0.55;
}

.atmosphere-particle--one {
    right: 22%;
    top: 20%;
    width: 14px;
    height: 14px;
}

.atmosphere-particle--two {
    right: 31%;
    bottom: 18%;
    width: 22px;
    height: 22px;
}

.atmosphere-particle--three {
    left: 36%;
    bottom: 24%;
    width: 10px;
    height: 10px;
}

.site-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem 0;
}

.brand-mark {
    width: clamp(180px, 22vw, 320px);
    filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.35));
}

.secondary-link-inline {
    align-self: flex-start;
}

.hero-shell {
    min-height: calc(100vh - 84px);
}

.hero-copy,
.modal-panel {
    background: linear-gradient(180deg, rgba(8, 19, 35, 0.74), rgba(8, 19, 35, 0.88));
    border: 1px solid var(--home-line);
    backdrop-filter: blur(14px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.hero-copy {
    position: absolute;
    top: 9.5rem;
    left: 1.5rem;
    width: min(620px, calc(100vw - 3rem));
    padding: 1.35rem 1.45rem 1.5rem;
    border-radius: 26px;
    color: var(--home-text);
}

.eyebrow,
.modal-kicker {
    margin: 0 0 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--home-accent);
    font-size: 0.75rem;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero-copy h1 {
    font-size: clamp(2.1rem, 4vw, 3.8rem);
    line-height: 0.95;
    margin-bottom: 0.9rem;
    max-width: none;
}

.lead,
.modal-subtitle {
    color: var(--home-muted);
    line-height: 1.62;
    font-size: 1.08rem;
    max-width: 52ch;
}

.ball-button {
    position: fixed;
    top: 0;
    left: 0;
    width: clamp(272px, 35.7vw, 544px);
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    will-change: transform;
    z-index: 2;
}

.ball-orbit,
.ball-halo {
    position: absolute;
    pointer-events: none;
    opacity: 0;
}

.ball-orbit {
    inset: -8%;
    border-radius: 50%;
}

.ball-halo {
    inset: 7%;
    border-radius: 50%;
}

.chat-fab {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    padding: 0.9rem 1rem 0.9rem 0.9rem;
    border-radius: 24px;
    text-decoration: none;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
        linear-gradient(135deg, rgba(232, 137, 79, 0.96), rgba(201, 178, 79, 0.92));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
}

.chat-fab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: rgba(17, 32, 54, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.chat-fab__icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.chat-fab__content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.chat-fab__eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.chat-fab__label {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body.theme-option-2.page-home {
    background:
        radial-gradient(circle at 70% 32%, rgba(118, 196, 255, 0.26), transparent 20%),
        radial-gradient(circle at 58% 82%, rgba(255, 210, 120, 0.16), transparent 16%),
        linear-gradient(180deg, rgba(4, 14, 32, 0.48), rgba(3, 8, 18, 0.72)),
        url('/img/soccerBall/background_2.png') center center / cover no-repeat fixed;
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body.theme-option-2 .stadium-overlay {
    background:
        radial-gradient(circle at 68% 33%, rgba(131, 204, 255, 0.1), transparent 18%),
        radial-gradient(circle at 62% 65%, rgba(255, 199, 105, 0.08), transparent 16%),
        linear-gradient(180deg, rgba(4, 11, 23, 0.02), rgba(3, 8, 18, 0.34));
}

body.theme-option-2 .brand-mark {
    width: clamp(190px, 24vw, 340px);
    filter:
        drop-shadow(0 0 14px rgba(255, 214, 138, 0.22))
        drop-shadow(0 20px 32px rgba(0, 0, 0, 0.34));
}

body.theme-option-2 .hero-copy {
    top: 10.5rem;
    left: 2rem;
    width: min(540px, calc(100vw - 4rem));
    padding: 1.6rem 1.75rem 1.8rem;
    border-radius: 24px;
    border: 1px solid rgba(104, 188, 255, 0.34);
    background:
        radial-gradient(circle at 10% 22%, rgba(241, 192, 99, 0.18), transparent 24%),
        linear-gradient(135deg, rgba(7, 34, 68, 0.64), rgba(6, 63, 122, 0.34)),
        linear-gradient(180deg, rgba(10, 28, 54, 0.18), rgba(8, 22, 44, 0.12));
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.32),
        0 0 24px rgba(96, 191, 255, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(22px) saturate(1.22);
    overflow: hidden;
}

body.theme-option-2 .hero-copy::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(118, 196, 255, 0.16), transparent 24%);
    pointer-events: none;
}

body.theme-option-2 .hero-copy::after {
    content: '';
    position: absolute;
    left: 1.75rem;
    right: 1.75rem;
    top: 4.9rem;
    height: 1px;
    background:
        linear-gradient(90deg, rgba(255, 214, 138, 0.9), rgba(118, 196, 255, 0.18), transparent 82%);
    opacity: 0.9;
}

body.theme-option-2 .hero-copy h1 {
    font-size: clamp(2.4rem, 4.4vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-bottom: 1.4rem;
    font-weight: 600;
    text-shadow: 0 0 18px rgba(132, 204, 255, 0.08);
    max-width: 100%;
}

body.theme-option-2 .lead {
    font-size: 1.04rem;
    line-height: 1.75;
    max-width: 100%;
    color: rgba(238, 245, 252, 0.9);
    font-weight: 400;
    font-family: "Avenir Next Condensed", "Arial Narrow", "Avenir Next", "Segoe UI", sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.93rem;
}

body.theme-option-2 .ball-button {
    top: 17%;
    left: auto;
    right: 12%;
    width: clamp(350px, 37vw, 580px);
    transform: none !important;
}

body.theme-option-2 .ball-image {
    filter:
        drop-shadow(0 28px 32px rgba(0, 0, 0, 0.5))
        drop-shadow(0 0 32px rgba(111, 191, 255, 0.3))
        drop-shadow(0 0 56px rgba(255, 199, 105, 0.15))
        drop-shadow(0 0 90px rgba(124, 214, 255, 0.14));
    animation: spin-ball 7.8s linear infinite;
}

body.theme-option-2 .ball-orbit,
body.theme-option-2 .ball-halo {
    opacity: 1;
}

body.theme-option-2 .ball-halo {
    inset: -14%;
    background:
        radial-gradient(circle at 48% 48%, rgba(255, 215, 131, 0.24), rgba(120, 208, 255, 0.18) 38%, rgba(7, 18, 32, 0.08) 60%, transparent 78%);
    filter: blur(34px);
    animation: aura-breathe 4.8s ease-in-out infinite;
}

body.theme-option-2 .ball-orbit--gold {
    inset: -9%;
    border: none;
    background:
        radial-gradient(circle at 50% 50%, transparent 42%, rgba(244, 192, 89, 0.22) 54%, rgba(244, 192, 89, 0.1) 66%, transparent 80%);
    filter: blur(14px);
    animation: aura-gold 5.8s ease-in-out infinite;
}

body.theme-option-2 .ball-orbit--blue {
    inset: -11%;
    border: none;
    background:
        radial-gradient(circle at 50% 50%, transparent 44%, rgba(125, 213, 255, 0.2) 56%, rgba(125, 213, 255, 0.08) 68%, transparent 82%);
    filter: blur(18px);
    animation: aura-blue 6.6s ease-in-out infinite;
}

body.theme-option-2 .ball-glow {
    inset: 8%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.62), rgba(121, 201, 255, 0.18) 36%, rgba(255, 192, 93, 0.14) 54%, transparent 74%);
    filter: blur(24px);
}

body.theme-option-2 .ball-shadow {
    inset: auto 8% 4%;
    height: 15%;
    background:
        radial-gradient(circle, rgba(11, 24, 42, 0.82), rgba(17, 48, 84, 0.28) 58%, transparent 78%);
    filter: blur(18px);
}

body.theme-option-2 .chat-fab {
    right: 1.8rem;
    bottom: 1.7rem;
    gap: 0.8rem;
    padding: 0.8rem 1rem 0.8rem 0.8rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at 10% 50%, rgba(241, 192, 99, 0.35), transparent 28%),
        linear-gradient(135deg, rgba(7, 34, 68, 0.86), rgba(6, 63, 122, 0.88));
    border: 1px solid rgba(104, 188, 255, 0.34);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.36),
        0 0 24px rgba(96, 191, 255, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.theme-option-2 .chat-fab__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 226, 158, 0.72), rgba(236, 166, 67, 0.92));
    color: #fff;
    box-shadow:
        0 0 18px rgba(241, 192, 99, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

body.theme-option-2 .chat-fab__eyebrow {
    color: rgba(173, 209, 240, 0.78);
}

body.theme-option-2 .chat-fab__label {
    font-size: 1rem;
}

body.theme-option-3.page-home {
    overflow: hidden;
    color: var(--premium-text);
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 18% 16%, rgba(100, 212, 255, 0.09), transparent 24%),
        radial-gradient(circle at 82% 22%, rgba(255, 130, 72, 0.08), transparent 21%),
        radial-gradient(circle at 50% 75%, rgba(212, 179, 120, 0.08), transparent 26%),
        linear-gradient(180deg, #05080d 0%, #03050a 48%, #020409 100%);
}

body.theme-option-3 .site-header,
body.theme-option-3 .premium-home,
body.theme-option-3 .premium-backdrop,
body.theme-option-3 .premium-noise {
    position: relative;
    z-index: 1;
}

body.theme-option-3 .stadium-overlay--premium {
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(4, 8, 14, 0.06), rgba(2, 3, 7, 0.46));
}

.premium-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.14;
    mix-blend-mode: soft-light;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7) 0 0.7px, transparent 1px),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.5) 0 0.6px, transparent 0.9px),
        radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.35) 0 0.8px, transparent 1px);
    background-size: 20px 20px, 27px 27px, 32px 32px;
}

.premium-backdrop {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.premium-backdrop__glow,
.premium-backdrop__grid {
    position: absolute;
}

.premium-backdrop__glow {
    border-radius: 50%;
    filter: blur(52px);
}

.premium-backdrop__glow--one {
    left: 12%;
    top: 12%;
    width: 28rem;
    height: 28rem;
    background: radial-gradient(circle, rgba(100, 212, 255, 0.2), transparent 70%);
}

.premium-backdrop__glow--two {
    right: 8%;
    bottom: 6%;
    width: 34rem;
    height: 34rem;
    background: radial-gradient(circle, rgba(255, 130, 72, 0.14), transparent 68%);
}

.premium-backdrop__grid {
    inset: auto 4% 6% auto;
    width: min(42vw, 32rem);
    height: min(42vw, 32rem);
    border-radius: 2rem;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 2rem 2rem;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
    transform: perspective(900px) rotateX(74deg);
    opacity: 0.32;
}

.site-header--premium {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.1rem clamp(1rem, 3vw, 2rem) 0;
    pointer-events: auto;
}

.brand-mark--premium {
    width: clamp(120px, 13vw, 180px);
    opacity: 0.72;
}

.premium-home {
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.product-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding-top: 0;
}

.viewer-card {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 0;
}

.viewer-card__hud,
.viewer-card__hint {
    position: relative;
    z-index: 3;
}

.viewer-card__brand-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.viewer-card__brand,
.viewer-card__watermark {
    position: absolute;
    display: block;
    user-select: none;
}

.viewer-card__brand {
    width: clamp(84px, 10vw, 132px);
    opacity: 0.22;
    filter:
        drop-shadow(0 18px 28px rgba(0, 0, 0, 0.34))
        saturate(0.95);
}

.viewer-card__brand--left {
    left: clamp(1rem, 3vw, 2rem);
    top: 50%;
    transform: translateY(-42%) rotate(-12deg);
}

.viewer-card__brand--right {
    right: clamp(1rem, 3vw, 2rem);
    top: 50%;
    transform: translateY(-42%) rotate(12deg);
}

.viewer-card__watermark {
    left: 50%;
    bottom: 8%;
    width: clamp(190px, 26vw, 320px);
    transform: translateX(-50%);
    opacity: 0.055;
    filter: blur(0.4px) saturate(0.9);
}

.viewer-card__hud {
    position: fixed;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    pointer-events: none;
}

.viewer-card__status {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.viewer-card__status {
    color: var(--premium-cyan);
    background: rgba(10, 18, 28, 0.68);
    border: 1px solid rgba(100, 212, 255, 0.18);
    backdrop-filter: blur(14px);
    text-align: right;
}

.ball-viewer {
    position: relative;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.2), transparent 22%),
        radial-gradient(circle at 46% 58%, rgba(100, 212, 255, 0.12), transparent 34%),
        radial-gradient(circle at 72% 42%, rgba(255, 130, 72, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(7, 10, 15, 0.78), rgba(3, 4, 8, 0.98));
}

.ball-viewer__canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.viewer-card__hint {
    position: fixed;
    left: 50%;
    bottom: 1.1rem;
    z-index: 3;
    width: min(92vw, 38rem);
    margin: 0;
    padding: 0.8rem 1rem;
    transform: translateX(-50%);
    text-align: center;
    color: var(--premium-muted);
    line-height: 1.45;
    font-size: 0.92rem;
    border-radius: 999px;
    background: rgba(8, 12, 18, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.panel-topic-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 20;
}

.panel-topic-modal.is-open {
    display: flex;
}

.panel-topic-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 5, 11, 0.78);
    backdrop-filter: blur(10px);
}

.panel-topic-modal__dialog {
    position: relative;
    width: min(34rem, 100%);
    padding: 1.5rem;
    border-radius: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at top left, rgba(100, 212, 255, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(14, 20, 30, 0.96), rgba(8, 12, 18, 0.98));
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--premium-text);
    z-index: 1;
}

.panel-topic-modal__close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--premium-text);
    cursor: pointer;
}

.panel-topic-modal__eyebrow {
    margin: 0 0 0.7rem;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--premium-cyan);
}

.panel-topic-modal__title {
    margin: 0 0 0.8rem;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1;
}

.panel-topic-modal__description {
    margin: 0;
    color: var(--premium-muted);
    line-height: 1.65;
}

.panel-topic-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.3rem;
}

.panel-topic-modal__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 9rem;
    min-height: 3rem;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--premium-text);
    text-decoration: none;
    cursor: pointer;
}

.panel-topic-modal__button--primary {
    color: #06101a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(100, 212, 255, 0.9));
    border-color: transparent;
}

body.theme-option-4.page-home {
    overflow: hidden;
    color: #e7f6ff;
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 50% 14%, rgba(90, 198, 255, 0.14), transparent 20%),
        radial-gradient(circle at 22% 52%, rgba(0, 124, 255, 0.12), transparent 24%),
        radial-gradient(circle at 78% 48%, rgba(255, 68, 220, 0.12), transparent 26%),
        linear-gradient(180deg, #030814 0%, #02050c 52%, #020308 100%);
}

body.theme-option-4 .stadium-overlay--futura {
    background:
        radial-gradient(circle at 50% 12%, rgba(144, 223, 255, 0.08), transparent 20%),
        linear-gradient(180deg, rgba(2, 8, 18, 0.1), rgba(1, 3, 8, 0.48));
}

.premium-backdrop--futura .premium-backdrop__glow--one {
    left: 20%;
    top: 18%;
    background: radial-gradient(circle, rgba(58, 196, 255, 0.16), transparent 70%);
}

.premium-backdrop--futura .premium-backdrop__glow--two {
    right: 10%;
    bottom: 12%;
    background: radial-gradient(circle, rgba(255, 61, 215, 0.12), transparent 66%);
}

.site-header--futura {
    padding-top: 1.35rem;
}

.brand-mark--futura {
    width: clamp(132px, 14vw, 190px);
    opacity: 0.86;
    filter:
        drop-shadow(0 0 22px rgba(88, 210, 255, 0.18))
        drop-shadow(0 18px 38px rgba(0, 0, 0, 0.34));
}

.premium-home--futura,
.product-shell--futura,
.product-stage--futura,
.viewer-card--futura {
    min-height: 100vh;
}

.viewer-card--futura {
    isolation: isolate;
}

.viewer-card__hud--futura {
    justify-content: space-between;
    align-items: flex-start;
    top: 1.15rem;
}

.viewer-card__status-shell {
    display: flex;
    width: 100%;
    justify-content: flex-end;
}

body.theme-option-4 .viewer-card__status {
    color: #96e8ff;
    border-color: rgba(88, 210, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(6, 18, 38, 0.82), rgba(4, 11, 24, 0.7));
    box-shadow:
        0 0 28px rgba(47, 174, 255, 0.16),
        inset 0 0 0 1px rgba(144, 232, 255, 0.04);
}

.ball-viewer--futura {
    background:
        radial-gradient(circle at 50% 58%, rgba(71, 214, 255, 0.12), transparent 22%),
        radial-gradient(circle at 50% 84%, rgba(71, 214, 255, 0.18), transparent 14%),
        radial-gradient(circle at 71% 42%, rgba(255, 74, 228, 0.12), transparent 19%),
        radial-gradient(circle at 28% 42%, rgba(0, 124, 255, 0.12), transparent 19%),
        linear-gradient(180deg, rgba(5, 10, 20, 0.82), rgba(2, 5, 10, 0.98));
}

.ball-viewer--futura::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 7%;
    width: min(44vw, 34rem);
    aspect-ratio: 1;
    transform: translateX(-50%);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(88, 210, 255, 0.26), rgba(88, 210, 255, 0.08) 34%, rgba(88, 210, 255, 0.02) 56%, transparent 72%);
    filter: blur(8px);
    pointer-events: none;
}

.ball-viewer--futura::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 9.5%;
    width: min(34vw, 28rem);
    height: min(34vw, 28rem);
    transform: translateX(-50%) perspective(900px) rotateX(77deg);
    border-radius: 50%;
    border: 1px solid rgba(88, 210, 255, 0.24);
    box-shadow:
        0 0 18px rgba(88, 210, 255, 0.16),
        inset 0 0 22px rgba(88, 210, 255, 0.08);
    pointer-events: none;
}

.panel-topic-dock {
    position: fixed;
    left: 50%;
    top: auto;
    bottom: 5.8rem;
    z-index: 4;
    width: min(26rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    transform: translate3d(-50%, 1rem, 0);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 180ms ease,
        transform 220ms ease;
}

.panel-topic-dock.is-open {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
}

.panel-topic-dock.is-pinned {
    pointer-events: auto;
}

.panel-topic-dock__frame {
    position: relative;
    padding: 0.95rem 1rem 0.95rem;
    clip-path: polygon(0 0, calc(100% - 1.8rem) 0, 100% 1.8rem, 100% 100%, 0 100%, 0 1rem);
    border: 1px solid rgba(88, 210, 255, 0.28);
    background:
        linear-gradient(180deg, rgba(5, 16, 35, 0.92), rgba(3, 10, 22, 0.94)),
        linear-gradient(135deg, rgba(88, 210, 255, 0.08), transparent 34%);
    box-shadow:
        0 0 42px rgba(34, 156, 255, 0.2),
        0 26px 60px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(145, 238, 255, 0.05);
    backdrop-filter: blur(14px);
}

.panel-topic-dock__frame::before,
.panel-topic-dock__frame::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.panel-topic-dock__frame::before {
    left: 1rem;
    right: 1rem;
    top: 3.8rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(88, 210, 255, 0.82), rgba(255, 74, 228, 0.36), transparent 90%);
}

.panel-topic-dock__frame::after {
    inset: 0;
    border: 1px solid rgba(146, 238, 255, 0.06);
    clip-path: inherit;
}

.panel-topic-dock__connector {
    display: none;
}

.panel-topic-dock__connector::after {
    display: none;
}

.panel-topic-dock__header {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.panel-topic-dock__logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    padding: 0.32rem;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 30%, rgba(161, 241, 255, 0.24), rgba(16, 55, 96, 0.6));
    border: 1px solid rgba(88, 210, 255, 0.22);
    box-shadow: 0 0 22px rgba(88, 210, 255, 0.16);
}

.panel-topic-dock__intro {
    min-width: 0;
}

.panel-topic-dock__eyebrow {
    margin: 0 0 0.2rem;
    color: #7fe3ff;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.panel-topic-dock__title {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 1.95rem);
    line-height: 0.96;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(88, 210, 255, 0.18);
}

.panel-topic-dock__description {
    margin: 0 0 0.75rem;
    color: rgba(222, 242, 255, 0.82);
    line-height: 1.45;
    font-size: 0.84rem;
    max-width: 34ch;
}

.panel-topic-dock__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
}

.panel-topic-dock__tag {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.24rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(88, 210, 255, 0.18);
    background: rgba(10, 22, 38, 0.72);
    color: #95e8ff;
    font-size: 0.62rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.panel-topic-dock__highlights {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.panel-topic-dock__highlights li {
    position: relative;
    padding-left: 0.9rem;
    color: rgba(233, 245, 255, 0.88);
    line-height: 1.35;
    font-size: 0.8rem;
}

.panel-topic-dock__highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: radial-gradient(circle, #93eaff, rgba(88, 210, 255, 0.2));
    box-shadow: 0 0 12px rgba(88, 210, 255, 0.28);
}

.panel-topic-dock__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.panel-topic-dock__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7.2rem;
    min-height: 2.2rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(88, 210, 255, 0.22);
    background: rgba(10, 22, 38, 0.82);
    color: #dff7ff;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.78rem;
}

.panel-topic-dock__button--primary {
    color: #04111f;
    background: linear-gradient(135deg, #91efff, #50c9ff);
    border-color: transparent;
    box-shadow: 0 0 22px rgba(88, 210, 255, 0.22);
}

.viewer-card__hint--futura {
    width: min(92vw, 36rem);
    color: rgba(224, 245, 255, 0.78);
    border-color: rgba(88, 210, 255, 0.18);
    background:
        linear-gradient(135deg, rgba(5, 14, 28, 0.8), rgba(4, 10, 22, 0.7));
}

.ball-button:focus-visible {
    outline: 3px solid rgba(121, 201, 255, 0.7);
    outline-offset: 8px;
    border-radius: 50%;
}

.ball-image,
.ball-glow,
.ball-shadow {
    position: absolute;
    inset: 0;
}

.ball-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 24px 26px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 28px rgba(121, 201, 255, 0.24));
    animation: spin-ball 3.6s linear infinite;
}

.ball-glow {
    inset: 12%;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(121, 201, 255, 0.18) 42%, transparent 68%);
    filter: blur(18px);
}

.ball-shadow {
    inset: auto 12% 6%;
    height: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(3, 11, 22, 0.78), transparent 72%);
    filter: blur(12px);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    z-index: 10;
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 12, 24, 0.72);
}

.modal-panel {
    position: relative;
    width: min(1040px, 100%);
    max-height: min(84vh, 920px);
    overflow: auto;
    padding: 1.5rem;
    border-radius: 28px;
    color: var(--home-text);
}

.modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--home-line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--home-text);
    cursor: pointer;
    font-size: 1.4rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.item-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid var(--home-line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(7, 18, 32, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.item-badge {
    align-self: flex-start;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(121, 201, 255, 0.12);
    border: 1px solid rgba(121, 201, 255, 0.18);
    color: var(--home-accent);
    font-size: 0.8rem;
}

.item-card h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
    color: var(--home-text);
}

.item-card p {
    margin-bottom: 0;
    color: var(--home-muted);
    line-height: 1.55;
}

.item-action {
    margin-top: auto;
    border: 0;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    cursor: pointer;
    font-weight: 700;
}

.chat-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.chat-shell {
    width: 100%;
    max-width: 760px;
    height: 85vh;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
}

.chat-toolbar {
    padding: 16px 18px 0;
}

.chat-toolbar .secondary-link {
    color: var(--color-text-strong);
    background: rgba(201, 178, 79, 0.18);
    border-color: rgba(95, 99, 104, 0.16);
    border: 1px solid rgba(95, 99, 104, 0.16);
    border-radius: 999px;
    padding: 0.8rem 1.15rem;
    text-decoration: none;
}

.chat-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 18px 22px;
}

.chat-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-brand__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 6px rgba(201, 178, 79, 0.16);
}

.chat-brand__texts h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-strong);
    letter-spacing: 0.2px;
}

.chat-brand__texts p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--color-text);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    background:
        linear-gradient(180deg, rgba(232, 137, 79, 0.05), rgba(255, 255, 255, 0.2));
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.message {
    display: flex;
}

.message--bot {
    justify-content: flex-start;
}

.message--user {
    justify-content: flex-end;
}

.message__bubble {
    max-width: 78%;
    padding: 14px 16px;
    border-radius: 16px;
    line-height: 1.45;
    font-size: 15px;
    border: 1px solid var(--color-border);
    word-break: break-word;
}

.message--bot .message__bubble {
    background: var(--color-bot);
    color: var(--color-text-strong);
    border-top-left-radius: 6px;
}

.message--user .message__bubble {
    background: var(--color-user);
    color: #2f2a14;
    border-color: rgba(0, 0, 0, 0.04);
    border-top-right-radius: 6px;
    font-weight: 600;
}

.message--status .message__bubble {
    background: #f7f2e6;
    color: #75663a;
    border-style: dashed;
    font-style: italic;
}

.chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    border-top: 1px solid var(--color-border);
    background: #fbfaf7;
}

.chat-input input {
    flex: 1;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--color-text-strong);
    background: white;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(201, 178, 79, 0.15);
}

.chat-input input::placeholder {
    color: #9aa0a6;
}

.chat-input button {
    min-width: 120px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: var(--color-primary);
    color: #2f2a14;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.chat-input button:hover {
    background: var(--color-primary-dark);
}

.chat-input button:active {
    transform: translateY(1px);
}

.chat-input button:disabled {
    cursor: wait;
    opacity: 0.7;
}

@keyframes spin-ball {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes orbit-gold {
    from {
        transform: rotate(-8deg);
    }

    to {
        transform: rotate(352deg);
    }
}

@keyframes orbit-blue {
    from {
        transform: rotate(18deg);
    }

    to {
        transform: rotate(378deg);
    }
}

@keyframes aura-breathe {
    0%,
    100% {
        transform: scale(0.98);
        opacity: 0.92;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

@keyframes aura-gold {
    0%,
    100% {
        transform: scale(0.97);
        opacity: 0.72;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.94;
    }
}

@keyframes aura-blue {
    0%,
    100% {
        transform: scale(1.01);
        opacity: 0.7;
    }

    50% {
        transform: scale(0.96);
        opacity: 0.92;
    }
}

@media (max-width: 768px) {
    body.theme-option-3.page-home {
        overflow-y: auto;
    }

    .premium-home {
        padding-top: 0;
        padding-bottom: 0;
        display: block;
    }

    .product-shell {
        min-height: auto;
    }

    .product-stage {
        min-height: 100vh;
        padding-top: 0;
    }

    .viewer-card {
        width: 100%;
        min-height: 100vh;
    }

    .viewer-card__hud {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }

    .ball-viewer {
        min-height: 100vh;
    }

    .viewer-card__brand {
        width: 84px;
        opacity: 0.16;
    }

    .viewer-card__brand--left {
        left: 0.45rem;
        top: 54%;
    }

    .viewer-card__brand--right {
        right: 0.45rem;
        top: 54%;
    }

    .viewer-card__watermark {
        width: min(58vw, 210px);
        bottom: 7%;
    }

    .panel-topic-modal__dialog {
        padding: 1.25rem;
    }

    .viewer-card__hint {
        bottom: 0.75rem;
        width: calc(100vw - 1.5rem);
        font-size: 0.86rem;
    }

    .premium-backdrop__grid {
        width: 68vw;
        height: 68vw;
        right: -8%;
    }

    .site-header {
        padding-top: 0.9rem;
    }

    .brand-mark {
        width: 140px;
    }

    .hero-copy {
        top: auto;
        bottom: 1rem;
        left: 1rem;
        width: calc(100vw - 2rem);
        padding: 1rem 1rem 1.1rem;
    }

    .hero-copy h1 {
        font-size: 1.55rem;
        max-width: none;
        line-height: 1.04;
    }

    .ball-button {
        width: clamp(170px, 42vw, 230px);
    }

    .chat-fab {
        right: 1rem;
        bottom: 1rem;
        padding: 0.8rem 0.9rem 0.8rem 0.8rem;
    }

    .chat-fab__icon {
        width: 42px;
        height: 42px;
        border-radius: 15px;
    }

    .chat-fab__eyebrow {
        font-size: 0.62rem;
    }

    .chat-fab__label {
        font-size: 0.9rem;
    }

    body.theme-option-2 .hero-copy {
        left: 1rem;
        width: calc(100vw - 2rem);
        padding: 1.15rem 1.1rem 1.2rem;
    }

    body.theme-option-2 .hero-copy::after {
        left: 1.1rem;
        right: 1.1rem;
        top: 4.15rem;
    }

    body.theme-option-2 .hero-copy h1 {
        font-size: 1.9rem;
        margin-bottom: 1.1rem;
    }

    body.theme-option-2 .lead {
        max-width: none;
        font-size: 0.96rem;
    }

    body.theme-option-2 .ball-button {
        top: 16%;
        right: 50%;
        width: clamp(245px, 63vw, 335px);
        margin-right: -31vw;
    }

    body.theme-option-2 .chat-fab {
        right: 1rem;
        bottom: 1rem;
        max-width: calc(100vw - 2rem);
    }

    body.theme-option-4.page-home {
        overflow-y: auto;
    }

    .viewer-card__hud--futura {
        top: 0.85rem;
        left: 0.85rem;
        right: 0.85rem;
    }

    .panel-topic-dock {
        top: auto;
        left: 1rem;
        right: 1rem;
        bottom: 5.4rem;
        width: auto;
        transform: translate3d(0, 1rem, 0);
    }

    .panel-topic-dock.is-open {
        transform: translate3d(0, 0, 0);
    }

    .panel-topic-dock__frame {
        padding: 1rem 1rem 1.05rem;
    }

    .panel-topic-dock__connector {
        display: none;
    }

    .panel-topic-dock__title {
        font-size: 1.5rem;
    }

    .panel-topic-dock__description {
        font-size: 0.92rem;
    }

    .panel-topic-dock__actions {
        margin-top: 1rem;
    }

    .panel-topic-dock__button {
        flex: 1 1 10rem;
    }

    .ball-viewer--futura::before {
        width: 78vw;
    }

    .ball-viewer--futura::after {
        width: 62vw;
        height: 62vw;
    }

    .viewer-card__hint--futura {
        bottom: 0.75rem;
        width: calc(100vw - 1.5rem);
        font-size: 0.8rem;
    }

    .chat-page {
        padding: 0;
    }

    .chat-shell {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
        border: none;
    }

    .message__bubble {
        max-width: 88%;
    }

    .chat-input {
        padding: 14px;
        gap: 10px;
    }

    .chat-input button {
        min-width: 92px;
    }
}
.records-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 7.5rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    padding: 0.9rem 1rem 0.9rem 0.9rem;
    border-radius: 24px;
    text-decoration: none;
    color: #f4f7fb;
    background: rgba(10, 18, 33, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.records-fab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.records-fab__icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.records-fab__content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.records-fab__eyebrow {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.72);
}

.records-fab__label {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.page-records {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", sans-serif;
    color: #112033;
    background:
        radial-gradient(circle at top left, rgba(255, 214, 102, 0.28), transparent 24rem),
        radial-gradient(circle at bottom right, rgba(38, 110, 255, 0.18), transparent 28rem),
        linear-gradient(135deg, #f4f8fc 0%, #e6edf7 100%);
}

.page-chat {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(26, 115, 232, 0.16), transparent 24rem),
        radial-gradient(circle at bottom right, rgba(82, 196, 26, 0.12), transparent 28rem),
        linear-gradient(135deg, #eff4fa 0%, #e1eaf4 100%);
}

.chat-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
}

.chat-shell {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 1.5rem;
    min-height: calc(100vh - 4rem);
}

.chat-sidebar,
.chat-main {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(17, 32, 51, 0.1);
    box-shadow: 0 20px 50px rgba(16, 24, 40, 0.08);
    backdrop-filter: blur(14px);
    border-radius: 1.75rem;
}

.chat-sidebar {
    padding: 1.5rem;
    display: grid;
    gap: 1.25rem;
    align-content: start;
}

.chat-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chat-main {
    display: grid;
    grid-template-rows: 1fr auto;
    overflow: hidden;
}

.chat-brand h1,
.chat-brand p,
.chat-selector__label,
.chat-context h2,
.chat-context__title,
.chat-context__hint,
.chat-context__disease,
.chat-selector__summary {
    margin: 0;
}

.chat-selector,
.chat-context {
    display: grid;
    gap: 0.6rem;
}

.chat-selector__label,
.chat-context h2 {
    font-size: 0.9rem;
    color: #29405f;
}

.chat-selector select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c7d4e4;
    border-radius: 0.95rem;
    padding: 0.9rem 1rem;
    font: inherit;
    background: rgba(255, 255, 255, 0.92);
    color: #10233c;
}

.chat-selector__summary,
.chat-context__hint,
.chat-context__disease {
    color: #53657c;
    line-height: 1.55;
}

.chat-context__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #112033;
}

.chat-messages {
    padding: 1.5rem;
    overflow-y: auto;
    display: grid;
    gap: 1rem;
    min-height: 0;
    overscroll-behavior: contain;
}

.chat-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.9rem;
    padding: 1.25rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(17, 32, 51, 0.08);
}

.chat-input input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c7d4e4;
    border-radius: 999px;
    padding: 0.95rem 1rem;
    font: inherit;
}

.chat-input button {
    border: none;
    border-radius: 999px;
    padding: 0.95rem 1.2rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #1148a8, #1f7aef);
}

.records-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
}

.records-sidebar,
.records-card,
.record-item {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(17, 32, 51, 0.1);
    box-shadow: 0 20px 50px rgba(16, 24, 40, 0.08);
    backdrop-filter: blur(14px);
}

.records-sidebar {
    border-radius: 2rem;
    padding: 2rem;
    align-self: start;
    position: sticky;
    top: 2rem;
}

.records-logo {
    width: 88px;
    margin-bottom: 1.25rem;
}

.records-kicker,
.records-eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #3b5d8f;
}

.records-copy {
    line-height: 1.65;
    color: #43566f;
}

.records-link {
    display: inline-flex;
    margin-top: 1rem;
    color: #123f8c;
    text-decoration: none;
    font-weight: 700;
}

.records-main {
    display: grid;
    gap: 1.5rem;
}

.records-card {
    border-radius: 1.75rem;
    padding: 1.5rem;
}

.records-card__head h2,
.records-sidebar h1 {
    margin: 0;
}

.records-form,
.records-list {
    display: grid;
    gap: 1rem;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.records-field {
    display: grid;
    gap: 0.45rem;
}

.records-field span {
    font-weight: 700;
    color: #29405f;
}

.records-field input,
.records-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c7d4e4;
    border-radius: 0.95rem;
    padding: 0.9rem 1rem;
    font: inherit;
    background: rgba(255, 255, 255, 0.92);
    color: #10233c;
}

.records-field textarea {
    resize: vertical;
    min-height: 180px;
}

.records-submit,
.record-action {
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.2rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.records-submit {
    justify-self: start;
    color: #fff;
    background: linear-gradient(135deg, #1148a8, #1f7aef);
}

.records-form.is-submitting {
    cursor: wait;
}

.records-form.is-submitting .records-submit {
    cursor: wait;
    opacity: 0.78;
}

.records-form.is-submitting .records-field input {
    cursor: wait;
}

.swal-record-popup {
    border-radius: 1.25rem;
}

.swal-record-field {
    display: grid;
    gap: 0.45rem;
    margin: 0.9rem 0;
    text-align: left;
}

.swal-record-field span {
    color: #29405f;
    font-size: 0.9rem;
    font-weight: 700;
}

.swal-record-field .swal2-input {
    width: 100%;
    height: auto;
    margin: 0;
    border: 1px solid #c7d4e4;
    border-radius: 0.85rem;
    box-shadow: none;
    color: #10233c;
    font-size: 1rem;
    padding: 0.85rem 1rem;
}

.record-item {
    border-radius: 1.4rem;
    padding: 1.25rem;
}

.record-item__top,
.record-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.record-item__actions {
    display: flex;
    gap: 0.75rem;
}

.record-action {
    background: #dde8f7;
    color: #16345d;
}

.record-action--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.page-chat-dossier {
    --bg: #eef2f7;
    --card: #ffffff;
    --primary: #8f1f49;
    --primary-2: #c15478;
    --secondary: #243f63;
    --success: #c98f29;
    --warning: #e3b04b;
    --danger: #d65b5b;
    --info: #46a9d6;
    --text: #233a59;
    --muted: #6d7f96;
    --border: #d9e2ee;
    --shadow: 0 14px 36px rgba(31, 43, 68, 0.08);
    --radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 18rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)),
        var(--bg);
}

.chat-container {
    width: min(1180px, calc(100vw - 2rem));
    margin: 0 auto;
}

.chat-hero {
    padding: 1.4rem 0 2.3rem;
    background:
        radial-gradient(circle at 92% 18%, rgba(255, 214, 228, 0.26), transparent 8rem),
        radial-gradient(circle at 8% 86%, rgba(255, 255, 255, 0.12), transparent 10rem),
        linear-gradient(135deg, var(--primary) 0%, #a52958 45%, var(--primary-2) 100%);
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    box-shadow: 0 18px 48px rgba(64, 15, 35, 0.12);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
    gap: 1rem;
    align-items: center;
}

.chat-hero__copy,
.hero-panel,
.card,
.source-box {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.chat-hero__copy {
    position: static;
    grid-column: 1 / -1;
    width: auto;
    padding: 0.4rem 0;
    border-radius: var(--radius);
    color: #fff;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.chat-hero__copy .eyebrow {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    width: fit-content;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    letter-spacing: 0;
    text-transform: none;
    position: relative;
    z-index: 1;
    font-size: 0.78rem;
    font-weight: 700;
}

.chat-hero__copy h1 {
    margin: 0 0 0.45rem;
    max-width: none;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 0.98;
}

.chat-hero__copy p {
    margin: 0;
    color: rgba(238, 250, 255, 0.9);
    max-width: none;
    line-height: 1.45;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 14px 28px rgba(64, 15, 35, 0.12);
}

.btn-soft {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-panel {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.panel-title {
    margin-bottom: 1rem;
    color: #fff;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.stat {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 232, 239, 0.12);
}

.stat strong,
.stat span {
    display: block;
}

.stat strong {
    margin-bottom: 0.35rem;
    color: #fff;
}

.stat span {
    color: rgba(255, 243, 246, 0.92);
}

.quick-nav {
    padding: 0 0 1rem;
    margin-top: -1.45rem;
    position: relative;
    z-index: 2;
}

.quick-nav-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.5rem;
    border: 1px solid rgba(217, 226, 238, 0.9);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(31, 43, 68, 0.1);
}

.quick-menu-toggle,
.quick-menu-close,
.quick-nav-drawer__head,
.quick-nav-backdrop {
    display: none;
}

.quick-nav-drawer {
    display: contents;
}

.quick-link {
    appearance: none;
    padding: 0.62rem 1rem;
    border-radius: 0.85rem;
    text-decoration: none;
    color: var(--secondary);
    background: transparent;
    border: 1px solid transparent;
    font-weight: 700;
    flex: 1 1 140px;
    text-align: center;
    font: inherit;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.quick-link:hover,
.quick-link.is-active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 10px 22px rgba(173, 39, 91, 0.2);
}

.quick-link--general {
    position: relative;
    margin-left: auto;
    padding-inline: 1.15rem 1.25rem;
    gap: 0.55rem;
    color: #07152a;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, #5bd8ff, #a1f4d8 45%, #ffd36e) border-box;
    border: 1px solid transparent;
    box-shadow:
        0 12px 26px rgba(24, 154, 191, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    font-weight: 800;
    overflow: hidden;
}

.quick-link--general::before {
    content: '';
    display: inline-block;
    flex: 0 0 auto;
    width: 0.58rem;
    height: 0.58rem;
    min-width: 0.58rem;
    border-radius: 999px;
    background: #19d37f;
    box-shadow:
        0 0 0 4px rgba(25, 211, 127, 0.14),
        0 0 16px rgba(25, 211, 127, 0.65);
}

.quick-link--general::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.55) 46%, transparent 56% 100%);
    transform: translateX(-125%);
    transition: transform 0.42s ease;
    pointer-events: none;
}

.quick-link--general:hover {
    color: #061426;
    background:
        linear-gradient(135deg, #dff9ff, #f7fff9) padding-box,
        linear-gradient(135deg, #5bd8ff, #a1f4d8 45%, #ffd36e) border-box;
    box-shadow:
        0 16px 30px rgba(24, 154, 191, 0.26),
        0 0 0 3px rgba(91, 216, 255, 0.16);
}

.quick-link--general:hover::after {
    transform: translateX(125%);
}

.quick-link:focus-visible {
    outline: 3px solid rgba(29, 164, 201, 0.35);
    outline-offset: 3px;
}

.quick-link.is-active {
    transform: translateY(-1px);
}

.page-chat-dossier {
    color: #17233a;
    background:
        radial-gradient(circle at 84% 0%, rgba(201, 28, 104, 0.1), transparent 28rem),
        radial-gradient(circle at 8% 12%, rgba(160, 31, 82, 0.14), transparent 24rem),
        linear-gradient(180deg, #f7f9fb 0%, #eef3f6 46%, #f7f4ef 100%);
}

.page-chat-dossier .chat-container {
    width: calc(100% - clamp(2rem, 8vw, 8.5rem));
    margin-inline: auto;
}

.page-chat-dossier i[class*="fa-"] {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    color: currentColor;
    font-family: inherit !important;
    font-style: normal;
    line-height: 1;
    background-color: currentColor;
    -webkit-mask: var(--fa-fallback-icon) center / contain no-repeat;
    mask: var(--fa-fallback-icon) center / contain no-repeat;
}

.page-chat-dossier i[class*="fa-"]::before {
    content: none !important;
}

.page-chat-dossier .fa-comment {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M21 11.5a8.4 8.4 0 0 1-9 8.3 8.7 8.7 0 0 1-4.1-1L3 20l1.3-4.4A8.2 8.2 0 0 1 3 11.5a8.5 8.5 0 0 1 18 0Z'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-file-lines,
.page-chat-dossier .fa-file-pdf {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z M14 2v6h6 M8 13h8 M8 17h6'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-square-plus {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z M12 8v8 M8 12h8'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-folder-open {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v1 M3 7v11a2 2 0 0 0 2 2h13a2 2 0 0 0 1.9-1.4L22 11H7.3a2 2 0 0 0-1.9 1.4L3 20'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-briefcase-medical {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M10 6V5a2 2 0 0 1 2-2h0a2 2 0 0 1 2 2v1 M4 7h16a2 2 0 0 1 2 2v9a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V9a2 2 0 0 1 2-2Z M12 11v6 M9 14h6'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-robot {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M11 2h2v3h3.5A4.5 4.5 0 0 1 21 9.5V16a5 5 0 0 1-5 5H8a5 5 0 0 1-5-5V9.5A4.5 4.5 0 0 1 7.5 5H11V2ZM6 12H4v4h2v-4Zm14 0h-2v4h2v-4ZM9 11.5a1.7 1.7 0 1 0 0-3.4 1.7 1.7 0 0 0 0 3.4Zm6 0a1.7 1.7 0 1 0 0-3.4 1.7 1.7 0 0 0 0 3.4ZM8 15v2h8v-2H8Z'/%3E%3C/svg%3E");
}

.page-chat-dossier .message__avatar .fa-robot {
    width: 1.42rem;
    height: 1.42rem;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v3 M8 6h8a4 4 0 0 1 4 4v6a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4v-6a4 4 0 0 1 4-4Z M4 13H2 M22 13h-2 M9 11h.01 M15 11h.01 M9 16h6'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    -webkit-mask: none;
    mask: none;
}

.page-chat-dossier .fa-paper-plane {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M21.7 3.3a1 1 0 0 0-1-.2l-18 7.5a1 1 0 0 0 .1 1.9l7.1 2.1 2.1 7.1a1 1 0 0 0 .9.7h.1a1 1 0 0 0 .9-.6l7.9-17.5a1 1 0 0 0-.1-1ZM13.3 18.5l-1.4-4.8 4.4-4.4-5.1 3.7-4.8-1.4 12.4-5.2-5.5 12.1Z'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-chevron-down {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-circle-info {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20Z M12 10v7 M12 7h.01'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-pen {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m16.5 3.5 4 4L8 20H4v-4Z M14 6l4 4'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-arrow-left {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M19 12H5 M12 5l-7 7 7 7'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-bars {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' d='M4 7h16 M4 12h16 M4 17h16'/%3E%3C/svg%3E");
}

.page-chat-dossier .fa-xmark {
    --fa-fallback-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' d='M6 6l12 12 M18 6 6 18'/%3E%3C/svg%3E");
}

.page-chat-dossier .chat-hero {
    padding: 0.95rem 0 2.45rem;
    margin: 0.35rem 0.65rem 0;
    border-bottom: 1px solid rgba(108, 126, 150, 0.12);
    border-radius: 1.35rem;
    background: var(--chat-accent, #c91c68);
    box-shadow: 0 22px 52px rgba(91, 37, 68, 0.18);
}

.page-chat-dossier .hero-grid {
    display: block;
}

.page-chat-dossier .chat-hero__copy {
    display: grid;
    gap: 0.72rem;
    padding: 0;
}

.page-chat-dossier .chat-hero__topline,
.page-chat-dossier .chat-hero__content,
.page-chat-dossier .chat-card__head,
.page-chat-dossier .context-actions,
.page-chat-dossier .chat-card__status {
    display: flex;
    align-items: center;
}

.page-chat-dossier .chat-hero__topline {
    justify-content: space-between;
    gap: 1rem;
}

.page-chat-dossier .chat-hero__content {
    justify-content: space-between;
    gap: 1.5rem;
}

.page-chat-dossier .chat-hero__copy .eyebrow {
    margin: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.page-chat-dossier .chat-hero__copy .user-welcome-badge {
    margin: 0;
    color: #173657;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(201, 28, 104, 0.16);
    box-shadow:
        0 10px 24px rgba(76, 27, 52, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.page-chat-dossier .chat-hero__copy .user-welcome-badge__dot {
    background: #d21b6b;
    box-shadow:
        0 0 0 4px rgba(210, 27, 107, 0.11),
        0 0 12px rgba(210, 27, 107, 0.36);
}

.page-chat-dossier .chat-hero__copy h1 {
    max-width: min(100%, 34ch);
    margin-bottom: 0.38rem;
    font-size: clamp(1.85rem, 2.65vw, 2.9rem);
    line-height: 1;
    white-space: nowrap;
}

.page-chat-dossier .hero-actions {
    margin-top: 0;
    flex: 0 0 auto;
}

.page-chat-dossier .quick-nav {
    margin-top: -1.72rem;
    padding-bottom: 1rem;
}

.page-chat-dossier .quick-nav-wrap {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.45rem 0.75rem 0;
    border-color: rgba(132, 152, 174, 0.18);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 32px rgba(32, 45, 67, 0.1);
    backdrop-filter: blur(18px);
}

.page-chat-dossier .quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 3rem;
    padding: 0.58rem 0.8rem;
    border-radius: 0.62rem 0.62rem 0 0;
    color: #314660;
    font-weight: 800;
}

.page-chat-dossier .quick-link i {
    color: currentColor;
    font-size: 1.05rem;
}

.page-chat-dossier .quick-link:hover,
.page-chat-dossier .quick-link.is-active {
    color: #c91c68;
    background: transparent;
    box-shadow: inset 0 -3px 0 #c91c68;
}

.page-chat-dossier .quick-link--general {
    margin-left: 0;
    align-self: center;
    min-height: 2.35rem;
    justify-content: center;
    gap: 0.45rem;
    color: #173657;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, rgba(148, 164, 184, 0.28), rgba(201, 28, 104, 0.22)) border-box;
    border-radius: 0.72rem;
    box-shadow: none;
    white-space: nowrap;
}

.page-chat-dossier .quick-link--general::before,
.page-chat-dossier .quick-link--general::after {
    content: none;
}

.page-chat-dossier .quick-link__dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 999px;
    background: #d21b6b;
    box-shadow:
        0 0 0 4px rgba(210, 27, 107, 0.12),
        0 0 16px rgba(210, 27, 107, 0.45);
}

.page-chat-dossier .quick-link--general i {
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

.page-chat-dossier .quick-link--specific {
    color: #7d1746;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, rgba(201, 28, 104, 0.3), rgba(151, 24, 79, 0.16)) border-box;
    border-radius: 0.72rem;
    box-shadow: none;
}

.page-chat-dossier .quick-link--home {
    color: #7d1746;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, rgba(201, 28, 104, 0.24), rgba(151, 24, 79, 0.14)) border-box;
    border-radius: 0.72rem;
    box-shadow: none;
}

.page-chat-dossier .quick-link--specific:hover {
    color: #c91c68;
    box-shadow: inset 0 -3px 0 #c91c68;
}

.page-chat-dossier .chat-sections {
    padding-bottom: 1.5rem;
}

.page-chat-dossier .section {
    margin-bottom: 1rem;
}

.page-chat-dossier .section-title {
    margin-bottom: 0.75rem;
}

.page-chat-dossier .section-title h2 {
    margin: 0 0 0.25rem;
    color: #173657;
    font-size: 1.42rem;
}

.page-chat-dossier .context-card .section-title h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.page-chat-dossier .context-card .section-title h2 i {
    color: #c91c68;
    font-size: 1.05rem;
}

.page-chat-dossier .section-title p {
    color: #687589;
}

.page-chat-dossier .chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(19rem, 25vw, 24rem);
    gap: clamp(1.4rem, 2.4vw, 2.25rem);
    align-items: stretch;
}

.page-chat-dossier .card,
.page-chat-dossier .source-box,
.page-chat-dossier .pdf-viewer-card {
    border: 1px solid rgba(142, 161, 184, 0.14);
    border-radius: 1.05rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 58px rgba(28, 41, 61, 0.075);
}

.page-chat-dossier .chat-card {
    grid-template-rows: 1fr auto;
    padding: 0;
    height: var(--chat-card-height, 720px);
    background: rgba(255, 255, 255, 0.97);
}

.page-chat-dossier .chat-card__head {
    justify-content: space-between;
    gap: 1rem;
    padding: 1.65rem 1.55rem 1rem;
    border-bottom: 0;
}

.page-chat-dossier .chat-card__identity {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: 1.05rem;
}

.page-chat-dossier .chat-card__avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 3.55rem;
    height: 3.55rem;
    color: #fff;
    background: #c91c68;
    border: 0.85rem solid rgba(201, 28, 104, 0.13);
    border-radius: 50%;
    background-clip: padding-box;
}

.page-chat-dossier .chat-card__head h2 {
    margin: 0.08rem 0 0.42rem;
    color: #162f4d;
    font-size: 1.45rem;
    line-height: 1.15;
}

.page-chat-dossier .chat-card__head p {
    margin: 0;
    color: #6c7787;
    font-size: 0.98rem;
    line-height: 1.35;
}

.page-chat-dossier .chat-card__status {
    flex: 0 0 auto;
    gap: 0.45rem;
    color: #7d1746;
    font-size: 0.78rem;
    font-weight: 800;
}

.page-chat-dossier .chat-card__status span:last-child {
    display: none;
}

.page-chat-dossier .chat-card__status-dot {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 999px;
    background: #d21b6b;
    box-shadow: 0 0 0 4px rgba(210, 27, 107, 0.13);
}

.page-chat-dossier .prompt-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.05rem;
    overflow-x: auto;
    border-bottom: 1px solid rgba(135, 154, 180, 0.14);
    background: rgba(247, 250, 252, 0.58);
}

.page-chat-dossier .prompt-chip,
.page-chat-dossier .context-action {
    appearance: none;
    border: 1px solid rgba(201, 28, 104, 0.24);
    color: #7d1746;
    background: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.page-chat-dossier .prompt-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2.05rem;
    height: 2.05rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
}

.page-chat-dossier .prompt-chip:hover,
.page-chat-dossier .context-action:hover {
    transform: translateY(-1px);
    border-color: rgba(154, 27, 79, 0.38);
    box-shadow: 0 10px 22px rgba(154, 27, 79, 0.11);
}

.page-chat-dossier .chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.65rem 1.55rem 1.35rem;
    background: transparent;
}

.page-chat-dossier .message {
    align-items: flex-end;
    gap: 0.95rem;
}

.page-chat-dossier .message--user {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.36rem;
}

.page-chat-dossier .message__bubble {
    position: relative;
    max-width: min(54%, 34rem);
    padding: 0.9rem 1.05rem 0.58rem;
    border-radius: 0.72rem;
    box-shadow: 0 12px 28px rgba(27, 45, 68, 0.055);
    font-size: 0.98rem;
    line-height: 1.5;
}

.page-chat-dossier .message--bot .message__bubble {
    background: linear-gradient(180deg, #ffffff, #fbfbfc);
    border: 1px solid rgba(143, 162, 184, 0.28);
    color: #223247;
    border-radius: 0.72rem 0.72rem 0.72rem 0.22rem;
}

.page-chat-dossier .message--user .message__bubble {
    background: linear-gradient(180deg, #fbf2ff, #f5ecff);
    color: #173657;
    border: 1px solid rgba(176, 132, 245, 0.24);
    border-radius: 0.72rem 0.72rem 0.22rem 0.72rem;
    box-shadow: 0 12px 24px rgba(154, 105, 215, 0.1);
}

.page-chat-dossier .message--status .message__bubble {
    color: #7d1746;
    background: rgba(201, 28, 104, 0.1);
    border: 1px dashed rgba(201, 28, 104, 0.24);
}

.page-chat-dossier .message__avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.95rem;
    height: 2.95rem;
    color: #fff;
    margin-bottom: 0.18rem;
    background: #c91c68;
    border-radius: 50%;
    box-shadow: 0 10px 22px rgba(201, 28, 104, 0.24);
}

.page-chat-dossier .message__time {
    display: block;
    margin-top: 0.45rem;
    color: rgba(69, 83, 105, 0.72);
    font-size: 0.73rem;
    line-height: 1;
    text-align: right;
}

.page-chat-dossier .message--user .message__time::after {
    content: none;
}

.page-chat-dossier .message--user .message__actions {
    display: flex;
    justify-content: flex-end;
    width: auto;
    height: auto;
    margin: -0.18rem 0.42rem 0 0;
    overflow: visible;
    opacity: 1;
}

.page-chat-dossier .message__edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(201, 28, 104, 0.18);
    border-radius: 999px;
    color: #7d1746;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 6px 14px rgba(28, 41, 61, 0.07);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: width 0.18s ease, transform 0.18s ease, gap 0.18s ease, border-color 0.18s ease;
}

.page-chat-dossier .message__edit span {
    width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.18s ease, opacity 0.18s ease;
}

.page-chat-dossier .message__edit:hover,
.page-chat-dossier .message__edit:focus-visible {
    width: 5.05rem;
    gap: 0.38rem;
    transform: scale(1.06);
    border-color: rgba(201, 28, 104, 0.38);
}

.page-chat-dossier .message__edit:hover span,
.page-chat-dossier .message__edit:focus-visible span {
    width: 2.6rem;
    opacity: 1;
}

.page-chat-dossier .message__actions--editing .message__edit {
    width: auto;
    min-width: 5rem;
    height: 2.15rem;
    gap: 0.4rem;
    padding: 0 0.85rem;
}

.page-chat-dossier .message__bubble .message__actions--editing {
    width: 100%;
    margin: 0.5rem 0 0;
}

.page-chat-dossier .message__actions--editing .message__edit span {
    width: auto;
    opacity: 1;
}

.page-chat-dossier .chat-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.05rem;
    gap: 0.72rem;
    padding: 1rem 1.55rem 1.2rem;
    border-top: 0;
    background: transparent;
}

.page-chat-dossier .chat-input input {
    height: 3rem;
    padding-inline: 1.15rem;
    border-color: rgba(151, 165, 184, 0.3);
    border-radius: 999px;
    background: #fff;
    box-shadow:
        inset 0 1px 0 rgba(17, 32, 51, 0.03),
        0 8px 20px rgba(28, 41, 61, 0.045);
}

.page-chat-dossier .chat-input input:focus {
    border-color: rgba(201, 28, 104, 0.42);
    box-shadow: 0 0 0 4px rgba(201, 28, 104, 0.11);
}

.page-chat-dossier .chat-input button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 3rem;
    min-width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #db2b7a, #bf155f);
    box-shadow: 0 12px 24px rgba(201, 28, 104, 0.24);
}

.page-chat-dossier .chat-input button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-chat-dossier .chat-input button:hover {
    background: linear-gradient(135deg, #c91c68, #a81352);
}

.page-chat-dossier .context-card {
    display: grid;
    grid-template-rows: auto auto auto;
    align-self: stretch;
    align-content: start;
    height: var(--chat-card-height, auto);
    overflow: auto;
    padding: 1.65rem 1.55rem;
}

.page-chat-dossier .mini-list {
    gap: 0.78rem;
    margin-top: 0;
}

.page-chat-dossier .mini-item {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: start;
    gap: 0.72rem;
    border: 1px solid rgba(137, 156, 180, 0.2);
    border-radius: 0.75rem;
    background: #f7fafc;
    padding: 1rem 0.95rem;
}

.page-chat-dossier .mini-item > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-top: 0.12rem;
    color: #c91c68;
    font-size: 1.18rem;
}

.page-chat-dossier .mini-item strong {
    color: #173657;
    font-size: 0.82rem;
    line-height: 1.25;
}

.page-chat-dossier .mini-item span {
    color: #667386;
    display: block;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.page-chat-dossier .context-actions {
    gap: 0.85rem;
    margin: 1.05rem 0 0.95rem;
}

.page-chat-dossier .context-action {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.75rem;
    background: #fff;
}

.page-chat-dossier .context-action i,
.page-chat-dossier .context-action:first-child i,
.page-chat-dossier .context-action:last-child i {
    color: #c91c68;
}

.page-chat-dossier .context-note {
    margin: 0;
    color: #687589;
    font-size: 0.9rem;
    line-height: 1.5;
}

.page-chat-dossier .disease-description-card {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
    margin-top: -0.1rem;
    margin-bottom: 1.2rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(142, 161, 184, 0.14);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(28, 41, 61, 0.06);
}

.page-chat-dossier .disease-description-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 100%;
    color: #6b7a90;
    font-size: 2.55rem;
    border: 0;
    border-radius: 0;
}

.page-chat-dossier .disease-description-card h3 {
    margin: 0 0 0.5rem;
    color: #173657;
    font-size: 1.12rem;
    line-height: 1.2;
}

.page-chat-dossier .disease-description-card p {
    margin: 0;
    max-width: 92ch;
    color: #566b8a;
    font-size: 0.95rem;
    line-height: 1.55;
}

.page-chat-dossier .chat-context-preview {
    min-height: 11rem;
    resize: none;
    border-color: rgba(137, 156, 180, 0.22);
    border-radius: 0.85rem;
    background: #fbfcfd;
    color: #526174;
    line-height: 1.55;
}

.panel-color-editor {
    position: fixed;
    z-index: 8;
    left: 1rem;
    top: 6.25rem;
    width: min(21rem, calc(100vw - 2rem));
    max-height: calc(100vh - 7.25rem);
    display: none;
    flex-direction: column;
    overflow: hidden;
    color: rgba(237, 248, 255, 0.94);
    background: rgba(7, 13, 22, 0.78);
    border: 1px solid rgba(105, 214, 255, 0.18);
    border-radius: 0.9rem;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
}

.panel-color-editor::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: calc(min(21rem, calc(100vw - 2rem)) + 2rem);
    height: 100vh;
    z-index: -1;
    pointer-events: auto;
    cursor: default;
}

.panel-color-editor.is-ready {
    display: flex;
}

.panel-color-editor__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.85rem 0.9rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(105, 214, 255, 0.14);
}

.panel-color-editor:not(.is-open) .panel-color-editor__head {
    border-bottom-color: transparent;
}

.panel-color-editor__actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.panel-color-editor__eyebrow,
.panel-color-editor__title,
.panel-color-editor__item-title {
    margin: 0;
}

.panel-color-editor__eyebrow {
    color: rgba(128, 226, 255, 0.86);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.panel-color-editor__title {
    font-size: 1.12rem;
    line-height: 1.1;
}

.panel-color-editor__toggle,
.panel-color-editor__reset {
    min-height: 2.15rem;
    padding: 0 0.8rem;
    color: rgba(237, 248, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.panel-color-editor__toggle {
    background: rgba(105, 214, 255, 0.16);
    border-color: rgba(105, 214, 255, 0.34);
}

.panel-color-editor:not(.is-open) .panel-color-editor__reset {
    display: none;
}

.panel-color-editor__list {
    display: none;
    gap: 0.65rem;
    overflow-y: auto;
    flex: 1 1 auto;
    padding: 0.8rem 0.9rem 0.95rem;
}

.panel-color-editor.is-open .panel-color-editor__list {
    display: grid;
}

.panel-color-editor__item {
    display: grid;
    gap: 0.55rem;
    padding: 0.68rem;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0.55rem;
}

.panel-color-editor__item--all {
    background: rgba(105, 214, 255, 0.12);
    border-color: rgba(105, 214, 255, 0.28);
}

.panel-color-editor__item-title {
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.9rem;
    line-height: 1.2;
}

.panel-color-editor__field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    color: rgba(222, 242, 255, 0.78);
    font-size: 0.74rem;
    font-weight: 800;
}

.panel-color-editor__field input {
    width: 4.25rem;
    height: 2.2rem;
    flex: 0 0 auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.45rem;
    background: transparent;
    cursor: pointer;
}

.section {
    margin-bottom: 1.5rem;
}

.chat-sections {
    min-height: 0;
}

.section[hidden] {
    display: none;
}

.section-title {
    margin-bottom: 1rem;
}

.section-title--compact {
    margin-bottom: 1rem;
}

.section-title h2 {
    margin-bottom: 0.35rem;
    color: var(--text);
}

.section-title p {
    margin-bottom: 0;
}

.chat-layout {
    /*display: grid;*/
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.8fr);
    gap: 1.25rem;
}

.card {
    border-radius: var(--radius);
    padding: 1.25rem;
}

.chat-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: var(--chat-card-height, 640px);
    min-height: 0;
    max-width: 100%;
    overflow: hidden;
}


.chat-card__head h3 {
    margin: 0.65rem 0 0.35rem;
    color: var(--text);
}

.chat-context-preview {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    font: inherit;
    resize: vertical;
    background: #f7f9fc;
    color: var(--text);
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.diagnosis-card {
    min-height: 220px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.36rem 0.72rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge.warning {
    color: #a36a00;
    background: rgba(227, 176, 75, 0.16);
}

.badge.success {
    color: var(--success);
    background: rgba(45, 139, 87, 0.14);
}

.badge.info {
    color: var(--info);
    background: rgba(29, 164, 201, 0.14);
}

.mini-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mini-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: #f7f9fc;
}

.source-box {
    padding: 1.1rem 1.2rem;
    border-radius: 22px;
}

.pdf-viewer-card {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f7f9fc;
}

.pdf-viewer {
    display: block;
    width: 100%;
    height: min(76vh, 820px);
    min-height: 720px;
    border: 0;
    background: #fff;
}

.pdf-viewer-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    color: var(--muted);
    text-align: center;
    background: #f7f9fc;
}

.pdf-viewer-empty[hidden] {
    display: none;
}

.footer-note {
    margin-top: 1rem;
    color: var(--muted);
}

.message--status .message__bubble {
    background: rgba(29, 164, 201, 0.12);
    color: var(--text);
}

.message__content {
    display: grid;
    gap: 0.7rem;
}

.message__content p,
.message__content ol,
.message__content ul {
    margin: 0;
}

.message__content p,
.message__content li {
    line-height: 1.68;
    padding-block: 0.08em;
}

.message__content ol,
.message__content ul {
    padding-left: 1.35rem;
    display: grid;
    gap: 0.45rem;
}

.message__content li {
    line-height: 1.68;
}

.message,
.message__bubble,
.message__content,
.chat-card,
.chat-messages,
.chat-input {
    min-width: 0;
}

.message__bubble {
    max-width: min(78%, 46rem);
    overflow-wrap: anywhere;
    width: fit-content;
}

.message--bot .message__bubble {
    background: #f4f7fb;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 1rem 1rem 1rem 0.35rem;
}

.message--user .message__bubble {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: 0;
    border-radius: 1rem 1rem 0.35rem 1rem;
    box-shadow: 0 10px 24px rgba(176, 49, 101, 0.18);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: min(72%, 34rem);
    padding: 0.85rem 1rem 0.65rem;
}

.message--user .message__content {
    width: 100%;
}

.message__bubble--editing {
    align-items: stretch;
    min-width: min(32rem, 72%);
}

.message__edit-input {
    width: 100%;
    min-height: 5.25rem;
    resize: vertical;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    font: inherit;
    line-height: 1.55;
    outline: none;
    padding: 0.75rem 0.85rem;
}

.message__edit-input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.24);
}

.message__actions {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.message__actions--editing {
    gap: 0.5rem;
}

.message__edit {
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.32rem 0.62rem;
}

.message__edit:hover {
    background: rgba(255, 255, 255, 0.28);
}

.message__edit--secondary {
    background: rgba(255, 255, 255, 0.08);
}

.message__edit:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (max-width: 720px) {
    .message--user .message__bubble,
    .message__bubble--editing {
        max-width: 96%;
    }

    .message__bubble--editing {
        min-width: 0;
        width: 96%;
    }
}

.record-action--danger {
    background: #ffe0de;
    color: #952f27;
}

.record-item__title {
    margin: 0;
}

.record-item__disease,
.record-item__link-wrap,
.records-message,
.records-empty {
    margin: 0;
    color: #53657c;
}

.record-meta {
    margin: 1rem 0;
    padding: 0;
    flex-wrap: wrap;
}

.record-meta div {
    min-width: 160px;
}

.record-meta dt {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #58708f;
}

.record-meta dd {
    margin: 0.35rem 0 0;
}

.record-item__link {
    color: #1148a8;
    font-weight: 700;
    text-decoration: none;
}

.records-message[data-state='error'] {
    color: #a1261c;
}

@media (max-width: 960px) {
    .hero-grid,
    .chat-layout,
    .chat-shell,
    .records-shell {
        grid-template-columns: 1fr;
    }

    .chat-page {
        padding: 1rem;
    }

    .chat-card {
        height: min(var(--chat-card-height, 580px), calc(100dvh - 1.5rem));
        min-height: 440px;
    }

    .records-sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    .page-chat-dossier {
        overflow-x: hidden;
    }

    .chat-container {
        width: 100%;
        padding-inline: 0.75rem;
    }

    .hero-stats,
    .criteria-grid,
    .records-grid,
    .record-item__top,
    .record-meta {
        grid-template-columns: 1fr;
        display: grid;
    }

    .chat-hero {
        padding: 1rem 0 2rem;
    }

    .chat-hero__copy h1 {
        font-size: clamp(1.8rem, 9vw, 2.55rem);
        line-height: 1.04;
    }

    .chat-hero__copy p,
    .section-title p,
    .chat-card__head p {
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .quick-nav {
        margin-top: -1.2rem;
    }

    .quick-nav-wrap {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.4rem;
        padding: 0.4rem;
        overflow: hidden;
    }

    .quick-link {
        min-width: 0;
        padding: 0.58rem 0.75rem;
        font-size: 0.92rem;
        white-space: nowrap;
    }

    .quick-link--general {
        grid-column: 1 / -1;
        margin-left: 0;
    }

    .chat-sections {
        padding-bottom: 0.75rem;
    }

    .section-title h2 {
        font-size: 1.35rem;
        line-height: 1.15;
    }

    .card {
        padding: 0.9rem;
        border-radius: 1rem;
    }

    .chat-card {
        height: min(var(--chat-card-height, 540px), calc(100dvh - 1rem));
        min-height: 420px;
    }

    .chat-card__head {
        margin-bottom: 0.7rem;
    }

    .chat-card__head h3 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .chat-messages {
        gap: 0.75rem;
        padding: 0.85rem;
    }

    .message__bubble {
        max-width: 92%;
        padding: 0.8rem 0.9rem;
        border-radius: 0.9rem;
        font-size: 0.94rem;
    }

    .message__content p,
    .message__content li {
        line-height: 1.55;
    }

    .chat-input {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.55rem;
        padding: 0.75rem;
    }

    .chat-input input {
        min-width: 0;
        height: 2.85rem;
        padding-inline: 0.9rem;
        font-size: 1rem;
    }

    .chat-input button {
        min-width: 5.8rem;
        height: 2.85rem;
        padding-inline: 0.95rem;
        font-size: 0.95rem;
    }

    .pdf-viewer-card,
    .pdf-viewer {
        min-height: 70dvh;
    }

    .record-item__actions {
        flex-wrap: wrap;
    }

    .records-fab {
        left: 1rem;
        right: 1rem;
        bottom: 6.75rem;
    }

    .panel-color-editor {
        left: 0.75rem;
        right: 0.75rem;
        top: 5.6rem;
        width: auto;
        max-height: 36vh;
    }

    .panel-color-editor__list {
        max-height: calc(36vh - 5rem);
    }
}

@media (max-width: 420px) {
    .chat-container {
        padding-inline: 0.5rem;
    }

    .chat-hero__copy .eyebrow {
        font-size: 0.72rem;
    }

    .quick-link {
        padding-inline: 0.45rem;
        font-size: 0.86rem;
    }

    .quick-link--general {
        padding-inline: 0.8rem;
    }

    .chat-card {
        min-height: 390px;
    }

    .message__bubble {
        max-width: 96%;
        font-size: 0.9rem;
    }

    .chat-input {
        grid-template-columns: 1fr;
    }

    .chat-input button {
        width: 100%;
    }
}

/* Custom User Welcome Badge Styling */
.user-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.4rem;
    border-radius: 999px;
    padding: 0.45rem 1.15rem;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: #ffffff;
    background: rgba(10, 22, 38, 0.72);
    border: 1px solid rgba(88, 210, 255, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    transition: all 0.25s ease;
    user-select: none;
}

.user-welcome-badge:hover {
    background: rgba(15, 32, 54, 0.82);
    border-color: rgba(88, 210, 255, 0.38);
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(88, 210, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.user-welcome-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00ff66;
    box-shadow: 0 0 8px #00ff66;
    animation: welcome-pulse 2s infinite ease-in-out;
}

@media (max-width: 960px) {
    .page-chat-dossier {
        display: flex;
        flex-direction: column;
    }

    .page-chat-dossier .chat-hero {
        order: 0;
    }

    .page-chat-dossier .quick-nav {
        order: 1;
    }

    .page-chat-dossier .chat-sections {
        order: 2;
    }

    .page-chat-dossier .disease-description-card {
        order: 3;
        width: min(42rem, calc(100% - 2rem));
        margin-inline: auto;
    }

    .page-chat-dossier,
    .page-chat-dossier .chat-page,
    .page-chat-dossier .chat-container,
    .page-chat-dossier .chat-hero,
    .page-chat-dossier .chat-sections,
    .page-chat-dossier .chat-layout,
    .page-chat-dossier .card {
        max-width: 100%;
        min-width: 0;
    }

    .page-chat-dossier {
        overflow-x: hidden;
    }

    .page-chat-dossier .chat-container {
        width: 100%;
        padding-inline: 0.75rem;
    }

    .page-chat-dossier .chat-hero__copy .user-welcome-badge {
        max-width: 100%;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #173657;
        background: rgba(255, 255, 255, 0.94);
        border-color: rgba(201, 28, 104, 0.16);
        box-shadow:
            0 10px 22px rgba(76, 27, 52, 0.11),
            inset 0 1px 0 rgba(255, 255, 255, 0.82);
    }

    .page-chat-dossier .chat-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .page-chat-dossier .chat-card {
        height: var(--chat-card-height, calc(100dvh - 2rem));
        min-height: 460px;
    }

    .page-chat-dossier .context-card {
        display: none;
    }

    .page-chat-dossier .disease-description-card {
        display: none;
    }

    .page-chat-dossier .message__bubble {
        max-width: min(80%, 42rem);
    }

    .page-chat-dossier .quick-nav {
        margin-top: -1.45rem;
        padding-bottom: 0.6rem;
    }

    .page-chat-dossier .quick-nav-wrap {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 0;
        width: max-content;
        margin-left: auto;
        overflow: visible;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .page-chat-dossier .quick-menu-toggle {
        appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.9rem;
        height: 2.9rem;
        min-height: 2.9rem;
        padding: 0;
        border: 1px solid rgba(201, 28, 104, 0.12);
        border-radius: 0.85rem;
        color: #b5165a;
        background: rgba(255, 246, 250, 0.94);
        box-shadow:
            0 12px 24px rgba(201, 28, 104, 0.14),
            inset 0 1px 0 rgba(255, 255, 255, 0.78);
        font: inherit;
        font-size: 0.9rem;
        font-weight: 800;
        cursor: pointer;
    }

    .page-chat-dossier .quick-menu-toggle span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .page-chat-dossier .quick-menu-toggle i {
        width: 1.05rem;
        height: 1.05rem;
    }

    .page-chat-dossier .quick-nav-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 31;
        display: flex;
        width: min(18rem, 84vw);
        flex-direction: column;
        gap: 0.55rem;
        padding: 1rem;
        color: #173657;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 252, 0.97));
        border-left: 1px solid rgba(201, 28, 104, 0.12);
        box-shadow: -18px 0 44px rgba(34, 20, 32, 0.16);
        transform: translateX(105%);
        transition: transform 0.22s ease;
    }

    .page-chat-dossier.is-quick-menu-open .quick-nav-drawer {
        transform: translateX(0);
    }

    .page-chat-dossier .quick-nav-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 2.75rem;
        margin-bottom: 0.35rem;
        color: #173657;
        font-size: 1rem;
        font-weight: 900;
    }

    .page-chat-dossier .quick-menu-close {
        appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.45rem;
        height: 2.45rem;
        border: 1px solid rgba(201, 28, 104, 0.12);
        border-radius: 0.8rem;
        color: #b5165a;
        background: #fff;
        font: inherit;
        cursor: pointer;
    }

    .page-chat-dossier .quick-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: block;
        pointer-events: none;
        background: rgba(23, 35, 58, 0);
        opacity: 0;
        transition: opacity 0.22s ease, background 0.22s ease;
    }

    .page-chat-dossier.is-quick-menu-open .quick-nav-backdrop {
        pointer-events: auto;
        background: rgba(23, 35, 58, 0.24);
        opacity: 1;
    }

    .page-chat-dossier .quick-link {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        min-height: 3rem;
        padding: 0.72rem 0.85rem;
        border: 1px solid rgba(201, 28, 104, 0.09);
        border-radius: 0.85rem;
        white-space: nowrap;
        text-align: left;
        line-height: 1;
        font-size: 0.94rem;
        color: #40526c;
        background: rgba(255, 255, 255, 0.62);
        box-shadow: none;
        justify-content: flex-start;
    }

    .page-chat-dossier .quick-link span:not(.quick-link__dot) {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
        border: 0;
    }

    .page-chat-dossier .quick-link:hover,
    .page-chat-dossier .quick-link.is-active {
        color: #b5165a;
        background: rgba(255, 246, 250, 0.94);
        border-color: rgba(201, 28, 104, 0.2);
        box-shadow: 0 7px 16px rgba(201, 28, 104, 0.09);
    }

    .page-chat-dossier .quick-link--general,
    .page-chat-dossier .quick-link--specific {
        min-width: 0;
        padding-inline: 0.85rem;
        color: #40526c;
        background: rgba(255, 255, 255, 0.66);
        border-color: rgba(201, 28, 104, 0.1);
        box-shadow: none;
    }

    .page-chat-dossier .quick-link--general {
        gap: 0.7rem;
    }

    .page-chat-dossier .quick-link--general i {
        display: inline-block;
        margin-left: 0;
        font-size: 1.05rem;
    }
}

@media (max-width: 720px) {
    .page-chat-dossier .chat-hero {
        margin: 0.55rem 0.55rem 0;
        padding: 1.05rem 0 1.85rem;
        border-radius: 1.2rem;
    }

    .page-chat-dossier .chat-hero__topline,
    .page-chat-dossier .chat-hero__content {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .page-chat-dossier .chat-hero__topline > * {
        min-width: 0;
    }

    .page-chat-dossier .chat-hero__content > div {
        min-width: 0;
        width: 100%;
    }

    .page-chat-dossier .chat-hero__copy h1 {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.08;
        margin-bottom: 0;
    }

    .page-chat-dossier .hero-actions {
        width: 100%;
    }

    .page-chat-dossier .quick-nav {
        margin-top: -1.45rem;
        padding-bottom: 0.6rem;
    }

    .page-chat-dossier .quick-nav-wrap {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 0;
        width: max-content;
        margin-left: auto;
        overflow: visible;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .page-chat-dossier .quick-menu-toggle {
        appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.9rem;
        height: 2.9rem;
        min-height: 2.9rem;
        padding: 0;
        border: 1px solid rgba(201, 28, 104, 0.12);
        border-radius: 0.85rem;
        color: #b5165a;
        background: rgba(255, 246, 250, 0.94);
        box-shadow:
            0 12px 24px rgba(201, 28, 104, 0.14),
            inset 0 1px 0 rgba(255, 255, 255, 0.78);
        font: inherit;
        font-size: 0.9rem;
        font-weight: 800;
        cursor: pointer;
    }

    .page-chat-dossier .quick-menu-toggle span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .page-chat-dossier .quick-menu-toggle i {
        width: 1.05rem;
        height: 1.05rem;
    }

    .page-chat-dossier .quick-nav-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 31;
        display: flex;
        width: min(18rem, 84vw);
        flex-direction: column;
        gap: 0.55rem;
        padding: 1rem;
        color: #173657;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 252, 0.97));
        border-left: 1px solid rgba(201, 28, 104, 0.12);
        box-shadow: -18px 0 44px rgba(34, 20, 32, 0.16);
        transform: translateX(105%);
        transition: transform 0.22s ease;
    }

    .page-chat-dossier.is-quick-menu-open .quick-nav-drawer {
        transform: translateX(0);
    }

    .page-chat-dossier .quick-nav-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 2.75rem;
        margin-bottom: 0.35rem;
        color: #173657;
        font-size: 1rem;
        font-weight: 900;
    }

    .page-chat-dossier .quick-menu-close {
        appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.45rem;
        height: 2.45rem;
        border: 1px solid rgba(201, 28, 104, 0.12);
        border-radius: 0.8rem;
        color: #b5165a;
        background: #fff;
        font: inherit;
        cursor: pointer;
    }

    .page-chat-dossier .quick-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: block;
        pointer-events: none;
        background: rgba(23, 35, 58, 0);
        opacity: 0;
        transition: opacity 0.22s ease, background 0.22s ease;
    }

    .page-chat-dossier.is-quick-menu-open .quick-nav-backdrop {
        pointer-events: auto;
        background: rgba(23, 35, 58, 0.24);
        opacity: 1;
    }

    .page-chat-dossier .quick-link {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        min-height: 3rem;
        padding: 0.72rem 0.85rem;
        border: 1px solid rgba(201, 28, 104, 0.09);
        border-radius: 0.85rem;
        white-space: nowrap;
        text-align: left;
        line-height: 1;
        font-size: 0.94rem;
        color: #40526c;
        background: rgba(255, 255, 255, 0.62);
        box-shadow: none;
        justify-content: flex-start;
    }

    .page-chat-dossier .quick-link span:not(.quick-link__dot) {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
        border: 0;
    }

    .page-chat-dossier .quick-link:hover,
    .page-chat-dossier .quick-link.is-active {
        color: #b5165a;
        background: rgba(255, 246, 250, 0.94);
        border-color: rgba(201, 28, 104, 0.2);
        box-shadow: 0 7px 16px rgba(201, 28, 104, 0.09);
    }

    .page-chat-dossier .quick-link--general,
    .page-chat-dossier .quick-link--specific {
        min-width: 0;
        padding-inline: 0.85rem;
        color: #40526c;
        background: rgba(255, 255, 255, 0.66);
        border-color: rgba(201, 28, 104, 0.1);
        box-shadow: none;
    }

    .page-chat-dossier .quick-link--general {
        gap: 0.7rem;
    }

    .page-chat-dossier .quick-link--general i {
        display: inline-block;
        margin-left: 0;
        font-size: 1.05rem;
    }

    .page-chat-dossier .chat-card {
        height: var(--chat-card-height, clamp(22rem, 58dvh, 31rem));
        min-height: 22rem;
        border-radius: 0.95rem;
    }

    .page-chat-dossier .chat-messages {
        padding: 0.95rem 0.85rem;
        gap: 0.72rem;
    }

    .page-chat-dossier .message {
        gap: 0.5rem;
        align-items: flex-end;
    }

    .page-chat-dossier .message__avatar {
        width: 2.05rem;
        height: 2.05rem;
        margin-bottom: 0.1rem;
    }

    .page-chat-dossier .message__bubble {
        max-width: calc(100% - 2.55rem);
        width: auto;
        padding: 0.78rem 0.85rem 0.52rem;
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .page-chat-dossier .chat-input {
        gap: 0.55rem;
        padding: 0.7rem 0.85rem 0.85rem;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), #fff);
    }

    .page-chat-dossier .chat-input input,
    .page-chat-dossier .chat-input button {
        min-height: 2.75rem;
    }

    .page-chat-dossier .disease-description-card {
        grid-template-columns: 2.25rem minmax(0, 1fr);
        gap: 0.72rem;
        width: min(40rem, calc(100% - 1.5rem));
        margin-top: 0.85rem;
        margin-bottom: 0.95rem;
        padding: 0.85rem 0.95rem;
        border-radius: 0.9rem;
        box-shadow: 0 12px 28px rgba(28, 41, 61, 0.055);
    }

    .page-chat-dossier .disease-description-card__icon {
        width: 2.25rem;
        height: 2.25rem;
        justify-content: center;
        font-size: 1.72rem;
    }

    .page-chat-dossier .disease-description-card h3 {
        margin-bottom: 0.24rem;
        font-size: 0.98rem;
    }

    .page-chat-dossier .disease-description-card p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .viewer-card__status {
        max-width: min(86vw, 28rem);
        text-align: center;
        justify-content: center;
    }

    .viewer-card__hint,
    .viewer-card__hint--futura {
        width: calc(100vw - 1rem);
        left: 0.5rem;
        transform: none;
    }

    .panel-topic-dock {
        bottom: 4.9rem;
        max-height: min(54vh, 30rem);
    }

    .panel-topic-dock__frame {
        overflow: auto;
    }
}

@media (max-width: 480px) {
    .page-chat-dossier .chat-hero {
        margin-inline: 0.35rem;
        padding-bottom: 1.75rem;
    }

    .page-chat-dossier .chat-hero__copy h1 {
        font-size: clamp(1.65rem, 7.8vw, 2.15rem);
    }

    .page-chat-dossier .chat-container {
        padding-inline: 0.5rem;
    }

    .page-chat-dossier .chat-hero__copy .user-welcome-badge {
        font-size: 0.74rem;
        padding-inline: 0.78rem;
        min-height: 2.1rem;
    }

    .page-chat-dossier .chat-hero__copy .eyebrow {
        padding: 0.26rem 0.58rem;
        font-size: 0.72rem;
    }

    .page-chat-dossier .quick-link {
        width: 100%;
        min-width: 0;
        min-height: 2.6rem;
        font-size: 0.92rem;
    }

    .page-chat-dossier .quick-link--general,
    .page-chat-dossier .quick-link--specific {
        min-width: 0;
        padding-inline: 0.85rem;
    }

    .page-chat-dossier .chat-card {
        min-height: 21rem;
    }

    .page-chat-dossier .disease-description-card {
        width: calc(100% - 1.25rem);
    }

    .page-chat-dossier .message__bubble {
        max-width: calc(100% - 2.3rem);
        font-size: 0.89rem;
    }

    .site-header {
        padding: 0.75rem 0.75rem 0;
    }

    .brand-mark {
        width: 120px;
    }

    .hero-copy {
        left: 0.75rem;
        width: calc(100vw - 1.5rem);
        bottom: 0.75rem;
        padding: 0.9rem;
        border-radius: 18px;
    }

    .hero-copy h1 {
        font-size: 1.35rem;
    }

    .ball-button {
        width: clamp(150px, 46vw, 210px);
    }

    body.theme-option-2 .ball-button {
        width: clamp(210px, 66vw, 280px);
    }

    .chat-fab {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        justify-content: center;
        max-width: none;
    }

    .page-chat-dossier .chat-input {
        grid-template-columns: minmax(0, 1fr) 2.75rem;
    }

    .page-chat-dossier .chat-input button {
        width: 2.75rem;
        min-width: 2.75rem;
    }
}

/* Dynamic assistant color driven by selected panel (gajo) */
.page-chat-dossier .chat-hero {
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--assistant-accent) 82%, #140916 18%),
            var(--assistant-accent) 56%,
            color-mix(in srgb, var(--assistant-accent) 64%, #ffffff 36%)
        );
}

.page-chat-dossier .chat-hero__copy .user-welcome-badge__dot,
.page-chat-dossier .quick-link__dot,
.page-chat-dossier .chat-card__avatar,
.page-chat-dossier .message__avatar {
    background: var(--assistant-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--assistant-accent) 14%, transparent);
}

.page-chat-dossier .quick-link:hover,
.page-chat-dossier .quick-link.is-active,
.page-chat-dossier .quick-link--specific:hover {
    color: var(--assistant-accent);
    box-shadow: inset 0 -3px 0 var(--assistant-accent);
}

.page-chat-dossier .context-card .section-title h2 i,
.page-chat-dossier .mini-item > i,
.page-chat-dossier .context-action i,
.page-chat-dossier .context-action:first-child i,
.page-chat-dossier .context-action:last-child i {
    color: var(--assistant-accent);
}

.page-chat-dossier .chat-input button {
    background: linear-gradient(
        135deg,
        var(--assistant-accent),
        var(--assistant-accent-dark)
    );
}

.page-chat-dossier .chat-input button:hover {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--assistant-accent) 92%, #ffffff 8%),
        var(--assistant-accent-dark)
    );
}

.page-chat-dossier .chat-input input:focus {
    border-color: color-mix(in srgb, var(--assistant-accent) 52%, #ffffff 48%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--assistant-accent) 22%, transparent);
}

@keyframes welcome-pulse {
    0% {
        transform: scale(0.85);
        opacity: 0.7;
        box-shadow: 0 0 6px rgba(0, 255, 102, 0.5);
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
        box-shadow: 0 0 12px rgba(0, 255, 102, 0.9);
    }
    100% {
        transform: scale(0.85);
        opacity: 0.7;
        box-shadow: 0 0 6px rgba(0, 255, 102, 0.5);
    }
}

/* Color Picker */
.color-picker {
    width: 100%;
    height: 48px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}
