@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700&display=swap');

:root {
    --forest: #175a83;
    --forest-2: #0796a5;
    --mint: #d9f0f2;
    --mint-soft: #edf8fa;
    --cream: #f3f7f9;
    --paper: #fbfdfe;
    --ink: #576b7a;
    --muted: #617782;
    --line: #d9e6eb;
    --shadow: 0 18px 50px rgba(13, 73, 102, .10);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
html { font-size: 80%; background: var(--cream); }
body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 1.15rem;
}
button, textarea, select { font: inherit; }
button { color: inherit; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.language-switcher {
    position: static;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border: 1px solid rgba(20,98,119,.22);
    border-radius: 9px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 4px 16px rgba(13,73,102,.08);
}
.language-switcher img { width: 23px; height: 17px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.10); }
.language-switcher select { width: 92px; min-width: 0; padding: 2px 18px 2px 2px; border: 0; outline: 0; color: #174b63; background: transparent; font-size: .9rem; cursor: pointer; }
.app-shell { width: 100%; max-width: 1100px; min-height: 100vh; margin: 0 auto; background: var(--paper); box-shadow: 0 0 0 1px rgba(217,230,235,.65); }
.is-framed .app-shell { max-width: none; box-shadow: none; }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 22px 22px;
    overflow: hidden;
    color: #173e52;
    background: #fff;
}
.sidebar::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 232px;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        radial-gradient(circle at 8% 90%, rgba(55, 198, 204, .17), transparent 40%),
        linear-gradient(180deg, #effbfc 0%, #ddf5f6 48%, #c7ecef 100%);
}
.sidebar > * {
    position: relative;
    z-index: 1;
}
.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.brand-image {
    display: block;
    width: auto;
    height: 58px;
    max-width: 210px;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(13, 77, 104, .10));
}
.brand-title { display: none; }
.brand-mark, .clara-avatar, .avatar-small {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    font: 700 1.7rem "Manrope", sans-serif;
    color: var(--forest);
    background: linear-gradient(145deg, #f9feff, #ccecf0);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.brand-mark { width: 44px; height: 44px; }
.brand strong, .brand small { display: block; }
.brand strong { color: #123c5a; font: 700 1.7rem "Manrope", sans-serif; }
.brand small { margin-top: 2px; color: #52798a; font-size: .95rem; }
.new-chat {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid rgba(20, 98, 119, .23);
    border-radius: 10px;
    color: #174b63;
    background: rgba(255,255,195,.8);
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    font-size: 1.2rem;
    line-height: 1.15;
    margin-right: 0;
}
.new-chat:hover { border-color: rgba(8, 127, 140, .42); background: rgba(255,255,255,.9); }
.new-chat span { display: inline-block; margin-right: 5px; font-size: 1.1rem; line-height: 1; }
.topics { min-height: 0; overflow-y: auto; }
.topics p { margin: 0 10px 9px; color: #598494; font-size: .85rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.topics button {
    display: block;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 9px;
    color: #214e61;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.topics button:hover { background: rgba(255,255,255,.68); color: #087582; }
.status-card {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    padding: 13px;
    border: 1px solid rgba(22, 112, 130, .18);
    border-radius: 12px;
    background: rgba(255,255,255,.5);
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #d9a94b; box-shadow: 0 0 0 4px rgba(217,169,75,.12); }
.status-dot.online { background: #75d5a4; box-shadow: 0 0 0 4px rgba(117,213,164,.12); }
.status-dot.offline { background: #e47d6e; }
.status-card strong, .status-card small { display: block; }
.status-card strong { font-size: .95rem; }
.status-card small { margin-top: 2px; color: #668895; font-size: .8rem; }
.materials-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #285b6d;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
}
.materials-link:hover { color: #087582; background: rgba(255,255,255,.65); }
.chat { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.topbar {
    min-height: 54px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    padding: 8px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,254,250,.94);
    backdrop-filter: blur(12px);
}
.topbar strong, .topbar span { display: block; }
.topbar strong { font: 700 1.15rem "Manrope", sans-serif; }
.topbar div span { margin-top: 2px; color: var(--muted); font-size: .95rem; }
.privacy { padding: 7px 11px; border-radius: 999px; color: var(--forest); background: var(--mint-soft); font-size: .85rem; font-weight: 600; }
.conversation { width: 100%; max-width: 1020px; flex: 0 1 auto; margin: 0 auto; padding: 16px 34px 0; }
.conversation-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px 0; }
.conversation-language-area { display:flex; align-items:center; gap:10px; min-width:0; }
.conversation-action-links { display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:5px; }
.conversation-action-buttons { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.tips-toggle { display:inline-flex; align-items:center; gap:5px; color:#5b747c; font-size:.76rem; cursor:pointer; }
.tips-toggle input { width:14px; height:14px; margin:0; accent-color:var(--forest-2); }
.biom-language-logo { display:block; width:auto; height:24px; flex:0 0 auto; object-fit:contain; }
.biom-language-logo[hidden] { display:none; }
.app-rating-link { width:auto; display:inline-flex; align-items:center; gap:4px; margin:0; margin-right:0; padding:8px 11px; border:1px solid rgba(20,98,119,.23); border-radius:10px; color:#174b63; background:#eeffdd; text-align:left; cursor:pointer; white-space:nowrap; font:400 1rem/1.15 "Manrope",sans-serif; letter-spacing:0; }
.app-rating-link > span[aria-hidden="true"] { display:inline-block; margin-right:5px; color:#175a83; font-size:1.1rem; line-height:1; }
.app-rating-link:hover { border-color:rgba(8,127,140,.42); color:#174b63; background:#e5f8d2; }
.satisfaction-dialog { position:relative; }
.satisfaction-close { position:absolute; top:10px; right:12px; }
.welcome { max-width: 760px; margin: 0 auto; text-align: center; }
.clara-avatar {
    width: 180px;
    height: auto;
    margin: -26px auto 4px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
}
.membership-locked { max-width:760px; margin:0 auto; text-align:center; }
.membership-block, .membership-warning { margin:12px auto 24px; padding:16px 19px; border-radius:12px; text-align:left; line-height:1.55; }
.membership-block { max-width:680px; border:1px solid #e4cd7d; color:#5c4a18; background:#fff7ce; }
.membership-block p { margin:0 0 13px; }
.membership-block p:last-child { margin-bottom:0; }
.membership-warning { max-width:720px; border:1px solid #ead17d; color:#66501a; background:#fff9db; text-align:center; }
.membership-block a, .membership-warning a { color:#195f79; font-weight:700; }
.kicker { width: 100%; margin: 0 0 6px; color: var(--forest-2); font-size: 1rem; font-weight: 700; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.welcome h1 { margin: 0; font: 700 2rem "Manrope", sans-serif; letter-spacing: -.035em; color:#777;}
.welcome > p:last-of-type { margin: 15px auto; color: var(--muted); line-height: 1.65; }
.suggestions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom:2rem;}
.suggestions button {
    min-height: 60px;
    padding: 10px;
    font-size: 1.0rem;
    line-height: 1.15;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: 0 4px 18px rgba(23,63,58,.04);
    text-align: left;
    cursor: pointer;
}
.suggestions button:hover { border-color: #91cbd2; transform: translateY(-1px); box-shadow: var(--shadow); }
.suggestions span { display: block; margin-bottom: 5px; color: var(--forest-2); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.message { display: flex; gap: 12px; margin-bottom: 28px; }
.message-label { margin-bottom: 7px; color: var(--muted); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.message-label span { margin-left: 7px; font-weight: 400; }
.user-message { justify-content: flex-end; }
.share-question { position:relative; align-self:flex-end; width:28px; height:28px; margin:0 -5px 2px -6px; padding:5px; border:0; border-radius:50%; color:#72909b; background:transparent; cursor:pointer; transition:color .18s,background .18s,transform .18s; }
.share-question:hover { color:var(--forest-2); background:var(--mint-soft); }
.share-question.copied { color:#fff; background:#31835b; animation:share-confirm .42s ease-out; }
.share-question.copied svg { visibility:hidden; }
.share-question.copied::before { content:'✓'; position:absolute; inset:0; display:grid; place-items:center; color:#fff; font-size:17px; font-weight:800; }
.share-question.copied::after { content:attr(data-confirmation); position:absolute; right:0; bottom:35px; width:max-content; max-width:180px; padding:7px 10px; border-radius:8px; color:#fff; background:#245f47; box-shadow:0 5px 16px rgba(20,65,48,.22); font-size:.76rem; font-weight:700; white-space:nowrap; pointer-events:none; animation:share-label 1.8s ease both; }
.share-question svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
html.is-framed .share-question { display:none; }
@keyframes share-confirm { 0%{transform:scale(.75)} 55%{transform:scale(1.2)} 100%{transform:scale(1)} }
@keyframes share-label { 0%{opacity:0;transform:translateY(5px)} 12%,72%{opacity:1;transform:none} 100%{opacity:0;transform:translateY(-3px)} }
.shared-consultation { width:min(100%,960px); min-height:100vh; margin:0 auto; padding:22px 28px 50px; }
.shared-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:28px; padding-bottom:15px; border-bottom:1px solid var(--line); }
.shared-header a { color:var(--forest); font-weight:700; text-decoration:none; }
.shared-header div { display:flex; align-items:baseline; gap:9px; }.shared-header strong { color:var(--forest); font-size:1.4rem; }.shared-header span { color:var(--muted); }
.shared-thread>h1 { margin:0 0 28px; color:#123c5a; font-size:1.45rem; }.shared-error { padding:35px; border-radius:15px; background:#fff; }
@media(max-width:760px){.shared-consultation{padding:14px 12px 35px}.shared-thread>h1{font-size:1.2rem}.shared-header{margin-bottom:20px}}
.user-message .message-label { text-align: right; float:right; display:none;}
.user-message .bubble { max-width: max('80px', 72%); padding: 13px 17px; border-radius: 18px 18px 4px 18px; color: white; background: var(--forest-2); line-height: 1.5; }
.avatar-small {
    width: 38px;
    height: 38px;
    margin-top: 20px;
    border: 2px solid white;
    object-fit: cover;
    box-shadow: 0 3px 12px rgba(13,73,102,.13);
}
.message-body { min-width: 0; max-width: calc(100% - 48px); }
.clara-message .bubble { padding: 20px 23px; border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; background: white; box-shadow: 0 7px 30px rgba(13,73,102,.06); }
.response-time { display: block; margin: 8px 4px; color: #9aa5a1; }
.answer-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
}
.rating { display: inline-flex; gap: 1px; margin-left: auto; }
.rating-star {
    padding: 2px;
    border: 0;
    color: #c8d4d8;
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}
.rating:hover .rating-star,
.rating-star.active { color: #efa92e; }
.rating .rating-star:hover ~ .rating-star { color: #c8d4d8; }
.creator-contact { margin:0; color:#17647a; font-size:1rem; font-weight:600; }
.rating-star:focus-visible { outline: 2px solid var(--forest-2); border-radius: 3px; }
.copy-answer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #71838a;
    background: transparent;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.copy-answer:hover {
    border-color: var(--line);
    color: var(--forest-2);
    background: var(--mint-soft);
}
.copy-answer.copied { color: #087582; }
.copy-answer svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.improve-form { margin-top: 10px; }
.improve-check { display: inline-flex; align-items: center; gap: 7px; padding:7px 10px; border:1px solid #a9d5d8; border-radius:9px; color:#176673; background:#edf9fa; font-size:1.05rem; font-weight:700; cursor:pointer; transition:border-color .18s,background .18s,color .18s; }
.improve-check:hover { border-color:#5baeb7; color:#075d6d; background:#e0f5f6; }
.improve-check input { accent-color: var(--forest-2); }
.improve-box { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--mint-soft); }
.improve-box textarea { min-height: 74px; padding: 9px 10px; border: 1px solid #c8dce3; border-radius: 10px; background: #fff; }
.improve-box button { margin-top: 8px; padding: 8px 12px; border: 0; border-radius: 9px; color: #fff; background: var(--forest); cursor: pointer; }
.improve-box button:disabled { opacity: .55; cursor: default; }
.improve-status { display: block; margin-top: 7px; color: #53757f; }
.improve-form.sent .improve-check { color: #087582; }
.feedback-confirm { position:relative; display:inline-grid; width:28px; height:28px; place-items:center; margin-top:10px; border-radius:50%; color:#fff; background:#31835b; font-size:17px; font-weight:800; animation:share-confirm .42s ease-out; }
.feedback-confirm::before { content:'✓'; }
.feedback-confirm::after { content:attr(data-confirmation); position:absolute; left:0; bottom:35px; width:max-content; max-width:230px; padding:7px 10px; border-radius:8px; color:#fff; background:#245f47; box-shadow:0 5px 16px rgba(20,65,48,.22); font-size:.76rem; font-weight:700; white-space:nowrap; pointer-events:none; animation:share-label 1.8s ease both; }
.answer-content { line-height: 1.65; overflow-wrap: anywhere; }
.answer-content section + section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.answer-content h2 { margin: 0 0 10px; font: 700 1.4rem "Manrope", sans-serif; }
.answer-content h3 { margin: 18px 0 8px; font: 700 1.15rem "Manrope", sans-serif; }
.answer-content h4 { margin: 14px 0 7px; font: 700 1rem "Manrope", sans-serif; }
.answer-content p { margin: 8px 0; }
.answer-content ul, .answer-content ol { padding-left: 22px; }
.answer-content li { margin: 5px 0; }
.answer-content .entity-trigger { display:inline; margin:0; padding:0; border:0; color:inherit; background:transparent; font:inherit; font-weight:inherit; text-decoration: underline dotted var(--entity-color, #4e97a8); text-decoration-thickness:2px; text-underline-offset:3px; cursor:pointer; }
.answer-content .entity-trigger:hover, .answer-content .entity-trigger:focus-visible { color:var(--entity-color, #087582); text-decoration-style:solid; outline:none; }
.answer-content .program-trigger, .answer-content .set-trigger { text-decoration: underline dotted #4e97a8; text-underline-offset: 3px; cursor: pointer; }
.answer-content .program-trigger:hover,
.answer-content .program-trigger:focus-visible,
.answer-content .set-trigger:hover, .answer-content .set-trigger:focus-visible { color: #087582; text-decoration-style: solid; outline: none; }
.answer-content .program-lookup { margin: 8px 0 12px; padding: 9px 11px; border-left: 3px solid #66b8c3; border-radius: 6px; color: #365b68; background: #f2fafb; font-size: .92rem; }
.answer-content .program-lookup table { margin: 0; background: white; }
.answer-content .entity-image-source { display:block; margin-top:4px; color:#61747b; }
.answer-content table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 1rem; }
.answer-content th, .answer-content td { padding: 9px; border: 1px solid var(--line); text-align: left; vertical-align: top; word-break: normal; overflow-wrap: normal; }
.answer-content th { background: var(--mint-soft); white-space: nowrap; }
.answer-content td.set-cell {
    font-weight:600;
    text-align:center;
    vertical-align:middle;
    background-image:linear-gradient(rgb(255 255 255 / 40%), rgb(255 255 255 / 20%));
}
.answer-content td.set-neutral { color:#000; background:#fff; }
.answer-content td.set-fire { color:#000; background:#ff5f3f; }
.answer-content td.set-earth { color:#000; background:#ffff00; }
.answer-content td.set-water { color:#000; background:#0090f0; }
.answer-content td.set-wood { color:#000; background:#61cd7c; }
.answer-content td.set-burden { color:#000; background:#ff339a; }
.answer-content td.set-gray-blue { color:#1f4772; background:#bfbfbf; }
.answer-content td.set-blue-black { color:#111; background:#3b9bc3; }
.answer-content td.set-violet-black { color:#111; background:#7537a4; }
.answer-content aside, .answer-content footer { margin-top: 16px; padding: 13px 15px; border-radius: 10px; color: #53635f; background: var(--mint-soft); font-size: 1rem; }
.answer-content .context-topics { margin-top: 22px; border: 1px solid #cce3e5; color: #47636b; background: #f4fbfb; font-size: .9rem; }
.answer-content .context-topics strong { display: block; color: #174b63; }
.answer-content .context-topics ul { margin: 7px 0 0; padding-left: 18px; }
.answer-content .context-topics li { margin: 2px 0; }
.answer-content .context-topics span { color: #63838d; }
.answer-content .sources {
    margin-top: 22px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #667980;
    background: #f7fbfc;
    font-size: .95rem;
    line-height: 1.45;
    overflow: hidden;
}
.answer-content .sources summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.answer-content .sources summary::-webkit-details-marker { display: none; }
.answer-content .sources summary::after {
    content: "▾";
    flex: 0 0 auto;
    color: #6f858c;
    font-size: 2rem;
    line-height: 1;
    transition: transform .15s ease;
}
.answer-content .sources[open] summary::after { transform: rotate(180deg); }
.answer-content .sources summary span { font-weight: 700; color: #174b63; }
.answer-content .sources h2 { margin: 0 0 7px; font-size: .95rem; }
.answer-content .sources p,
.answer-content .sources ul,
.answer-content .sources ol { padding-right: 14px; padding-left: 32px; }
.answer-content .sources p,
.answer-content .sources ul,
.answer-content .sources ol,
.answer-content .sources li { margin-top: 4px; margin-bottom: 4px; font-size: .95rem; }
.answer-content .sources ul,
.answer-content .sources ol { padding-left: 18px; }
.answer-content a { color: var(--forest-2); }
.answer-content .knowledge-image {
    display: block;
    width: auto;
    max-width: min(100%, 760px);
    max-height: 70vh;
    margin: 14px auto 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
}
.answer-content .knowledge-image-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 14px auto 7px;
    cursor: zoom-in;
}
.answer-content .knowledge-image-link .knowledge-image { margin: 0; }
.answer-content .product-thumb {
    height: 65px;
    max-height: 65px;
    width: 80px;
    max-width: 80px;
    object-fit: cover;
    flex: 0 0 80px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 5px;
    vertical-align: middle;
    background: #fff;
}
.answer-content .product-thumb-empty {
    display: block;
}
.answer-content .product-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #667980;
    background: transparent;
    font-size: .95rem;
    line-height: 1.45;
}
.answer-content .product-links h2 { flex: 0 0 100%; margin: 0 0 2px; color: #174b63; font-size: .95rem; }
.answer-content .product-links p { display: contents; margin: 0; }
.answer-content .product-links ul,
.answer-content .product-links ol { display: contents; margin: 0; padding: 0; list-style: none; }
.answer-content .product-links li { display: contents; margin: 0; }
.product-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.answer-content a.product-card,
.answer-content a.product-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc((100% - 20px) / 3);
    min-width: 0;
    min-height: 82px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #174b63;
    background: #f7fbfc;
    box-shadow: 0 4px 18px rgba(13,73,102,.04);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.18;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.answer-content .product-title {
    display: -webkit-box;
    min-width: 0;
    max-height: 65px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}
.answer-content a.product-card:hover,
.answer-content a.product-link:hover { border-color: #8fcbd2; color: #087582; background: var(--mint-soft); }
.composer-wrap {
    position: static;
    z-index: 3;
    padding: 4px 34px 17px;
    background: linear-gradient(transparent, var(--paper) 25%);
}
.identity-form { width:100%; max-width:850px; display:grid; grid-template-columns:1fr 18em 22em auto; gap:10px; align-items:end; margin:0 auto; padding:14px; border:1px solid #c8dce3; border-radius:16px; background:#fff; box-shadow:0 12px 40px rgba(13,73,102,.13); }
.identity-form div span { display:block; margin-top:3px; color:var(--muted); font-size:.85rem; }.identity-form input { min-width:0; padding:10px 12px; border:1px solid #c8dce3; border-radius:10px; }.identity-form button { padding:10px 15px; border:0; border-radius:10px; color:#fff; background:var(--forest); font-weight:700; cursor:pointer; }
.identity-form div strong { line-height:35px; }
@media(max-width:850px) { .identity-form { grid-template-columns:1fr 1fr; }.identity-form div { grid-column:1/-1; } 
.new-chat {
    margin-right:0px;
}


}
@media(max-width:520px) { .identity-form { grid-template-columns:1fr; }.identity-form div { grid-column:auto; } }
.answer-settings {
    width: 100%;
    max-width: 950px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 auto 8px;
    color: var(--muted);
    font-size: .95rem;
}
.setting-select { display:flex; align-items:center; gap:5px; }
.answer-settings select {
    width: 120px;
    min-width: 0;
    max-width: 120px;
    padding: 6px 28px 6px 9px;
    border: 1px solid #c8dce3;
    border-radius: 9px;
    color: var(--ink);
    background: white;
}
.repeat-question {
    padding: 6px 10px;
    border: 1px solid #8fcbd2;
    border-radius: 9px;
    color: #087582;
    background: #f4fcfd;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
}
.repeat-question:hover { background: #e6f7f9; border-color: #50b4bd; }
.source-setting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 1.05rem;
    cursor: pointer;
}
.source-setting input,.meal-plan-setting input,.veterinary-setting input { accent-color: var(--forest-2); }
.meal-plan-setting,.veterinary-setting { display:inline-flex; align-items:center; gap:6px; font-size:1.05rem; cursor:pointer; }
.composer {
    width: 100%;
    max-width: 950px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 0 auto;
    padding: 9px 9px 9px 18px;
    border: 1px solid #c8dce3;
    border-radius: 18px;
    background: white;
    box-shadow: 0 12px 40px rgba(13,73,102,.13);
}
.composer:focus-within { border-color: #38aeb8; box-shadow: 0 12px 40px rgba(13,73,102,.15), 0 0 0 3px rgba(35,174,184,.14); }
.question-field { min-width:0; flex:1 1 auto; }
.attachment-button { display:grid; width:38px; height:38px; flex:0 0 38px; place-items:center; margin:0 1px 2px 0; border:1px solid #b8d9df; border-radius:11px; color:var(--forest); background:#eef9fa; font-size:1.55rem; font-weight:500; line-height:1; cursor:pointer; }
.attachment-button:hover { color:#fff; background:var(--forest-2); }
.attachment-button input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }
.attachment-list { width:min(950px,100%); margin:4px auto 0; padding:0 12px; color:#53717d; font-size:.82rem; overflow-wrap:anywhere; }
.message-attachments { margin-top:7px; padding-top:6px; border-top:1px solid rgba(23,90,131,.18); color:#426978; font-size:.82rem; }
textarea { width: 100%; max-height: 180px; resize: none; overflow-y:hidden; border: 0; outline: 0; padding: 10px 0; color: var(--ink); background: transparent; line-height: 1.45; }
textarea::placeholder { color: #98a39f; }
.send-actions { display:flex; flex:0 0 auto; gap:7px; align-items:stretch; }
.send { position:relative; width:auto; min-width:116px; height:43px; display:flex; align-items:center; justify-content:center; gap:7px; flex:0 0 auto; padding:0 10px; border:0; border-radius:13px; color:white; background:var(--forest); font-size:.78rem; font-weight:700; cursor:pointer; }
.send[hidden] { display:none; }
.send span { font-size:1rem; }
.send svg { width:22px; height:22px; flex:0 0 22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.send svg circle { fill:#fff; stroke:none; }
.send svg path { stroke:#175a83; }
.send-new { color:#175a83; background:#dff4f5; border:1px solid #9bcfd4; }
.help-tooltip { position:fixed; z-index:100; box-sizing:border-box; display:none; width:300px; max-width:calc(100vw - 28px); padding:9px 11px; border:1px solid rgba(136,216,222,.6); border-radius:9px; color:#fff; background:#153e55; box-shadow:0 6px 24px rgba(9,48,67,.22); font-size:.95rem; font-weight:500; line-height:1.38; text-align:left; overflow-wrap:anywhere; pointer-events:none; }
.help-tooltip.is-visible { display:block; }
.send:hover { background: var(--forest-2); }
.send-new:hover { color:#fff; }
.send:disabled { opacity: .55; cursor: wait; }
.consultations-dialog { width:min(920px,calc(100% - 28px)); max-height:86vh; padding:0; border:0; border-radius:18px; color:var(--ink); background:#f7fbfc; box-shadow:0 24px 80px rgba(8,48,65,.32); }
.consultations-dialog::backdrop { background:rgba(8,35,50,.48); backdrop-filter:blur(2px); }
.consultations-head small { display:block; margin-top:3px; color:#64808b; }
.consultation-thread-actions { display:flex; justify-content:flex-end; gap:8px; padding:0 14px 14px; }
.delete-consultation { position:absolute; top:9px; right:10px; z-index:1; display:flex; width:30px; min-width:30px; height:30px; align-items:center; justify-content:center; padding:0; color:#a52f2f; border:1px solid #dfa2a2; border-radius:50%; background:#fdeaea; font-size:1.25rem; line-height:1; cursor:pointer; }
.delete-consultation:hover { color:#fff; border-color:#a52f2f; background:#b53d3d; }
.satisfaction-dialog { width:min(560px,calc(100% - 28px)); padding:26px; border:0; border-radius:18px; color:var(--ink); background:#fff; box-shadow:0 24px 80px rgba(8,48,65,.32); }
.satisfaction-dialog::backdrop { background:rgba(8,35,50,.55); backdrop-filter:blur(2px); }
.satisfaction-dialog h2 { margin:0 0 10px; }
.satisfaction-scale { display:flex; flex-wrap:wrap; justify-content:space-between; gap:7px 16px; margin:16px 0 0; padding:11px 13px; border:1px solid #9bcfd4; border-radius:10px; color:#174f62; background:#e9f7f8; }
.satisfaction-scale strong { width:100%; }
.satisfaction-scale span { font-weight:800; }
.satisfaction-stars { display:flex; gap:7px; margin:14px 0 20px; padding:0; border:0; }
.satisfaction-stars legend { margin-bottom:8px; font-weight:700; }
.satisfaction-stars input { position:absolute; opacity:0; }
.satisfaction-stars span { display:block; padding:9px 12px; border:1px solid #cadde2; border-radius:9px; cursor:pointer; }
.satisfaction-stars input:checked + span { color:#6d4a00; border-color:#efa92e; background:#fff2c8; }
.satisfaction-comment textarea { width:100%; margin:7px 0 16px; padding:11px; border:1px solid #cadde2; border-radius:10px; font:inherit; resize:vertical; }
.satisfaction-comment textarea.invalid { border:2px solid #b53d3d; outline:3px solid rgba(181,61,61,.14); }
.satisfaction-guidance { display:block; margin:-9px 0 15px; color:#6d7f86; line-height:1.35; }
.satisfaction-guidance:empty { display:none; }
.satisfaction-actions { display:flex; align-items:center; gap:12px; margin-top:2px; }
.satisfaction-submit { display:block; min-height:43px; margin-left:auto; padding:0 14px; color:#175a83; border:1px solid #9bcfd4; border-radius:13px; background:#dff4f5; font:inherit; font-weight:700; cursor:pointer; }
.satisfaction-submit:hover { color:#fff; background:var(--forest-2); }
.satisfaction-error { color:#a23838; }
.consultations-head { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; padding:15px 18px; border-bottom:1px solid #c8dce3; background:#fff; }
.consultations-head h2 { margin:0; font-size:1.2rem; }
.dialog-close { width:34px; height:34px; border:0; border-radius:9px; color:#315c6d; background:#eaf4f6; font-size:1.5rem; cursor:pointer; }
.consultations-list { padding:12px; }
.consultation-tile { position:relative; margin-bottom:9px; }
.consultation-thread { border:1px solid #c8dce3; border-radius:12px; background:#fff; overflow:hidden; }
.consultation-thread summary { padding:12px 50px 12px 14px; cursor:pointer; }
.consultation-thread summary span { display:inline-flex; width:calc(100% - 24px); flex-direction:column; gap:3px; vertical-align:top; }
.consultation-thread summary strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.consultation-thread summary small { color:var(--muted); }
.consultation-thread-body { max-height:52vh; padding:0 14px; overflow:auto; background:#f8fbfc; }
.consultation-entry { padding:13px 0; border-top:1px solid #dcebed; }
.consultation-entry p { margin:4px 0; }
.consultation-answer { margin-top:9px; padding:10px 12px; border-radius:10px; background:#fff; }
.open-consultation { margin:10px 14px 14px; padding:8px 12px; border:0; border-radius:9px; color:#fff; background:var(--forest); cursor:pointer; }
.consultations-loading,.consultations-empty { padding:24px; color:var(--muted); text-align:center; }
.topic-separator { display:flex; align-items:center; gap:10px; margin:18px 0 12px; color:#668894; font-size:.76rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; }
.topic-separator::before,.topic-separator::after { content:""; height:1px; flex:1; background:#c9dfe4; }
.disclaimer { max-width:950px; margin: 9px auto 0; color: #555555; font-size: .9rem; text-align: center; }
html:lang(cs) .disclaimer,
html:lang(sk) .disclaimer { font-size:1rem; }
.error-banner { max-width: 850px; margin: 0 auto 9px; padding: 10px 14px; border: 1px solid #e3aaa1; border-radius: 10px; color: #8d3126; background: #fff1ef; font-size: 1rem; }
.typing { display: inline-flex; gap: 5px; padding: 17px 20px !important; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #60aab3; animation: pulse 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 760px) {
    html, body, .app-shell, .chat { background: var(--paper); }
    .app-shell { max-width: none; box-shadow: none; }
    .brand-image { height: 46px; max-width: 150px; }
    .new-chat { padding: 7px 9px; font-size: 72%; }
    .topbar { min-height: 48px; padding: 7px 12px; }
    .conversation { padding: 16px 16px 0; }
    .conversation-actions { margin-bottom: 20px; }
    .biom-language-logo { display:none; }
    .conversation-action-links { gap:4px; }
    .conversation-action-buttons { gap:6px; }
    .app-rating-link { padding:7px 9px; font-size:72%; }
    .language-switcher { position:relative; width:38px; height:32px; box-sizing:border-box; justify-content:center; gap:0; padding:3px; overflow:hidden; }
    .language-switcher img { pointer-events:none; }
    .language-switcher select { position:absolute; inset:0; width:100%; height:100%; padding:0; opacity:0; cursor:pointer; }
    .language-switcher:focus-within { outline:2px solid rgba(23,90,131,.45); outline-offset:2px; }
    .welcome { margin-top: 3vh; }
    .suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .suggestions button { min-height: 72px; }
    .composer-wrap { right: 0; left: 0; padding: 4px 14px 12px; }
    .composer { flex-wrap:wrap; gap:7px; padding:9px; }
    .question-field { flex:1 0 100%; }
    .composer textarea { padding:7px 5px; }
    .send-actions { width:100%; gap:7px; }
    .send { min-width:0; width:50%; height:38px; flex:1 1 0; padding:0 7px; font-size:.75rem; }
    .help-tooltip { width:280px; max-width:calc(100vw - 28px); font-size:.88rem; }
    .consultations-dialog[open] { inset:0; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; display:flex; flex-direction:column; border-radius:0; }
    .consultations-head { flex:0 0 auto; padding-top:max(15px,env(safe-area-inset-top)); }
    .consultations-list { flex:1 1 auto; min-height:0; padding:7px 7px max(12px,env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
    .consultation-thread-body { max-height:none; padding:0 10px; overflow:visible; }
    .answer-settings {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px 10px;
        align-items: center;
        margin-bottom: 7px;
        font-size: .82rem;
    }
    .setting-select { display:grid; gap:5px; }
    .answer-settings > .setting-select:first-child { grid-column: 1; grid-row: 1 / span 2; }
    .answer-settings > .setting-select:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
    .answer-settings select {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 34px;
        padding-top: 4px;
        padding-bottom: 4px;
    }
    .source-setting { grid-column: 1; grid-row: 3; margin-left: 0; }
    .veterinary-setting { grid-column: 2; grid-row: 3; }
    .meal-plan-setting { grid-column: 1 / -1; grid-row: 4; }
    .repeat-question { grid-column: 1 / -1; grid-row: 5; justify-self: start; }
    .source-setting,.meal-plan-setting,.veterinary-setting {
        min-width: 0;
        gap: 5px;
        font-size: .88rem;
        line-height: 1.15;
    }
    .source-setting input,.meal-plan-setting input,.veterinary-setting input {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        margin: 0;
    }
    .user-message .bubble { max-width: 88%; }
    .clara-message { display: block; width: 100%; }
    .clara-message .avatar-small { display: block; margin: 0 0 8px; }
    .clara-message .message-body { width: 100%; max-width: none; }
    .clara-message .bubble { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .answer-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
    .answer-content .product-links,
    .answer-content .related-products { width: 100%; min-width: 0; max-width: 100%; overflow-x: hidden; }
    .answer-content a.product-card,
    .answer-content a.product-link { box-sizing: border-box; flex: 0 0 100%; width: 100%; max-width: 100%; min-height: 82px; }
    .answer-content .product-thumb { width: 80px; height: 60px; max-width: 80px; max-height: 60px; flex: 0 0 80px; }
    .answer-content .product-title { flex: 1 1 0; min-width: 0; max-height: 60px; overflow-wrap: anywhere; word-break: break-word; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
.identity-trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Chosen attachments (2026-11-14): readable chips with a type icon and a remove button; new selections add to the list. */
.attachment-list { color:var(--ink); font-size:.95rem; display:flex; flex-wrap:wrap; gap:6px 8px; padding-top:4px; }
.attachment-list[hidden] { display:none; }
.attachment-item { display:inline-flex; align-items:center; gap:7px; max-width:100%; padding:5px 6px 5px 10px; border:1px solid color-mix(in srgb, var(--forest) 55%, transparent); border-radius:999px; background:var(--mint-soft); color:var(--ink); font-weight:600; line-height:1.25; }
.attachment-icon { display:inline-flex; flex:0 0 auto; color:var(--forest); }
.attachment-icon svg { width:18px; height:18px; }
.attachment-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:42ch; }
.attachment-size { flex:0 0 auto; color:var(--muted); font-size:.8em; font-weight:400; }
.attachment-remove { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border:0; border-radius:50%; background:transparent; color:var(--muted); font-size:1.1rem; line-height:1; padding:0; cursor:pointer; }
.attachment-remove:hover { background:color-mix(in srgb, var(--forest) 25%, transparent); color:var(--ink); }
/* Clara's root font is smaller than Miriam's: keep the attachment names at ~15px. */
.attachment-list { font-size:1.15rem; }
.attachment-item { color:var(--forest); }

/* All consultations of one user shared from admin (shared.php?u=…, 2026-11-23) */
.shared-user .shared-group { border: 1px solid rgba(18,60,90,.15); border-radius: 12px; margin: 0 0 14px; padding: 0 14px; background: #fff; }
.shared-user .shared-group > summary { cursor: pointer; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.shared-user .shared-group > summary small { color: #5b6b78; }
.shared-user .shared-group[open] > summary { border-bottom: 1px solid rgba(18,60,90,.1); margin-bottom: 12px; }
