/* Babel-only chrome, independent of the legacy app shell and search canvas. */
.babel-chrome, .babel-invite, .babel-invite-tab, .gallery-card {
    --babel-paper: #f4f1e9;
    --babel-ink: #131518;
    --babel-muted: #a7aaa7;
    --babel-mint: #c5e8d4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--babel-paper);
}
.babel-chrome { position: sticky; top: 0; z-index: 200; background: rgba(16,18,20,.95); border-bottom: 1px solid #30342f; backdrop-filter: blur(18px); }
.babel-chrome__inner { display: flex; align-items: center; gap: 28px; min-height: 78px; max-width: 1420px; margin: 0 auto; padding: 10px 32px; }
.babel-chrome a { text-decoration: none; }
.babel-brand { flex: none; font: 32px/1 Georgia, serif; letter-spacing: -1.6px; color: var(--babel-paper); }
.babel-brand span { color: var(--babel-mint); }
.babel-context { display: flex; align-items: center; gap: 10px; padding-left: 26px; border-left: 1px solid #353b35; color: #d2d7cd; font-size: 13px; }
.babel-context small { display: block; font: 9px/1.7 ui-monospace, monospace; letter-spacing: 1.5px; color: #a7af9e; }
.babel-context__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--babel-mint); }
.babel-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.babel-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 13px; color: #c8cbc4; font-size: 13px; border-radius: 7px; }
.babel-links a:hover, .babel-links a[aria-current] { background: #252a25; color: #fff; }
.babel-build { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 10px 17px; border: 1px solid #d9e7d3; border-radius: 9px; background: var(--babel-mint); color: #142b21; font-size: 13px; font-weight: 650; transition: background .18s, transform .18s; }
.babel-build svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.babel-build:hover { background: #e1f7e9; transform: translateY(-1px); }
.babel-chrome :is(a, summary):focus-visible, .babel-invite :is(a,button):focus-visible { outline: 2px solid #e9ce97; outline-offset: 4px; }
.babel-invite-tab button:focus-visible { outline: 2px solid #183326; outline-offset: -4px; }
.babel-menu { position: relative; flex: none; }
.babel-menu summary { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 44px; min-height: 44px; color: #d2d7cd; cursor: pointer; list-style: none; border-radius: 7px; font-size: 12px; }
.babel-menu summary::-webkit-details-marker { display: none; }
.babel-menu summary:hover, .babel-menu[open] summary { color: #fff; }
.babel-menu__icon { display: grid; gap: 5px; width: 16px; }
.babel-menu__icon i { display: block; height: 1px; width: 16px; background: currentColor; transition: transform .18s; }
.babel-menu[open] .babel-menu__icon i:first-child { transform: translateY(3px) rotate(45deg); }
.babel-menu[open] .babel-menu__icon i:last-child { transform: translateY(-3px) rotate(-45deg); }
.babel-menu__panel { position: absolute; top: calc(100% + 16px); right: 0; width: min(340px, calc(100vw - 28px)); max-height: min(78vh, 720px); overflow: auto; overscroll-behavior: contain; padding: 20px; border: 1px solid #3c433b; border-radius: 15px; color: var(--babel-paper); background: #171c19; box-shadow: 0 20px 60px #0008; }
.babel-menu__eyebrow { display: block; padding: 0 8px 12px; font: 10px/1.5 ui-monospace, monospace; letter-spacing: 1.3px; color: #acb8a5; }
.babel-menu__panel > a { display: block; padding: 10px 9px; min-height: 44px; border-radius: 7px; color: var(--babel-paper); }
.babel-menu__panel > a:hover { background: #2b352d; }
.babel-menu__panel strong { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.babel-menu__panel small { display: block; color: #aeb9ac; font-size: 12px; margin-top: 2px; }
.babel-menu__panel > a > span { float: right; color: #aeb9ac; }
.babel-menu__divider { height: 1px; background: #353e33; margin: 12px 8px; }
.babel-menu__footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #353e33; margin-top: 12px; padding-top: 10px; }
.babel-menu__footer a { display: inline-flex; align-items: center; min-height: 44px; color: #b6c2b2; font-size: 11px; }

.babel-invite { position: fixed; inset: 0; width: min(630px, calc(100% - 32px)); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); margin: auto; padding: 38px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #505b49; border-radius: 24px; background: radial-gradient(ellipse at 5% 0, #27352b 0, transparent 55%), #171d19; box-shadow: 0 30px 100px #0008; }
.babel-invite:not([open]) { display: none; }
.babel-invite[open] { animation: babel-invite-in .3s ease-out both; }
.babel-invite::backdrop { background: #050807a8; backdrop-filter: blur(7px); }
.babel-invite[data-closing]::backdrop { animation: babel-backdrop-out .28s ease-out both; }
.babel-invite[data-closing], .babel-invite[data-closing] * { pointer-events: none; }
html.babel-invite-open { overflow: hidden; scrollbar-gutter: stable; }
.babel-invite__close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #4d5849; border-radius: 50%; background: #ffffff08; color: #d2dccd; font: 26px/1 system-ui,sans-serif; cursor: pointer; }
.babel-invite__close:hover { background: #ffffff16; color: #fff; }
.babel-invite__eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 40px 18px 0; color: #bbd7be; font: 10px/1.5 ui-monospace, monospace; letter-spacing: 1.5px; }
.babel-invite__eyebrow > span { font: 22px/1 Georgia,serif; }
.babel-invite h2 { color: #f3f1e9; font: 400 clamp(30px, 4.6vw, 44px)/1.07 Georgia,serif; letter-spacing: -1.4px; }
.babel-invite h2 em { color: #c9e9cf; font-weight: 400; }
.babel-invite__intro p { max-width: 430px; margin: 16px 0 24px; font-size: 14px; line-height: 1.65; color: #bdc7b9; }
.babel-offer { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; border: 1px solid #43503e; border-radius: 14px; padding: 20px; transition: border-color .18s, background .18s; }
.babel-offer small { font: 9px/1.5 ui-monospace,monospace; letter-spacing: 1.2px; }
.babel-offer strong { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 7px 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.babel-offer strong > span { font-size: 17px; font-weight: 400; }
.babel-offer > span:not(.babel-offer__symbol):not(.babel-offer__body) { color: #bdc7b9; font-size: 12px; line-height: 1.65; }
.babel-offer--primary { flex-direction: row; gap: 18px; padding: 24px; background: #d5ead9; border-color: #d5ead9; color: #183326; }
.babel-offer--primary:hover { background: #e6f5e8; border-color: #f5fff7; }
.babel-offer__symbol { display: grid; place-items: center; flex: none; width: 42px; height: 42px; background: #b9d8be; border: 1px solid #98bba0; border-radius: 50%; font-size: 23px; }
.babel-offer__body { display: block; }
.babel-offer__body > small { color: #42604a; }
.babel-offer__body > strong { font: 400 30px/1.1 Georgia,serif; letter-spacing: -.7px; }
.babel-offer__body > span { display: block; color: #3a5743; font-size: 13px; line-height: 1.6; }
.babel-offer__body b { display: flex; align-items: center; gap: 12px; margin-top: 17px; font-size: 13px; font-weight: 650; }
.babel-offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.babel-offer--lab { background: #282b22; }
.babel-offer--lab small { color: #dfd2a0; }
.babel-offer--consulting { background: #2b2522; }
.babel-offer--consulting small { color: #e0bcaa; }
.babel-offer-grid .babel-offer:hover { border-color: #a2b497; background: #333c2e; }
.babel-invite__continue { display: flex; align-items: center; justify-content: center; gap: 15px; width: 100%; min-height: 44px; padding: 10px; margin-top: 20px; border: 0; border-radius: 7px; background: transparent; color: #ecf0e7; font: 500 13px/1.5 system-ui,sans-serif; cursor: pointer; }
.babel-invite__continue:hover { background: #ffffff08; }
.babel-invite__footnote { color: #a2b09d; text-align: center; font-size: 10px; line-height: 1.5; }
.babel-invite-tab { position: fixed; z-index: 210; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); display: inline-flex; align-items: stretch; max-width: calc(100vw - 24px); overflow: hidden; border: 1px solid #8caf8e; border-radius: 30px; background: #d5ead9; color: #183326; box-shadow: 0 4px 25px #0005; font-size: 12px; font-weight: 600; animation: babel-tab-cue 9s ease-in-out infinite; }
.babel-invite-tab[hidden] { display: none; }
.babel-invite-tab__open { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 9px 14px 9px 10px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.babel-invite-tab__close { display: grid; place-items: center; flex: none; width: 44px; min-height: 44px; padding: 0; border: 0; border-left: 1px solid #8caf8e; border-radius: 0; background: #bdd9c160; color: #183326; font: 24px/1 system-ui,sans-serif; cursor: pointer; }
.babel-invite-tab__spark { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #bdd9c1; font: 22px/1 Georgia,serif; }
.babel-invite-tab__open:hover, .babel-invite-tab__close:hover { background: #e9f8eb; }
.babel-invite-tab[data-arriving] { animation: babel-tab-arrive .5s .13s both; }
/* Discovery card: small, fixed, moves nothing else; chrome.js keeps it off Start and the scores. */
.gallery-card { position: fixed; z-index: 210; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); display: flex; align-items: flex-start; gap: 12px; width: min(370px, calc(100vw - 24px)); padding: 12px 4px 12px 14px; border: 1px solid #4f5d4b; border-radius: 16px; background: #171d19f5; box-shadow: 0 10px 40px #0007; transition: opacity .2s, visibility .2s; }
.gallery-card[hidden] { display: none; }
.gallery-card[data-place="top"] { bottom: auto; top: var(--babel-card-top, 88px); }
.gallery-card[data-tucked] { opacity: 0; visibility: hidden; pointer-events: none; }
.gallery-card[data-folding], .gallery-card[data-folding] * { pointer-events: none; }
.gallery-card[data-arriving] { animation: babel-tab-arrive .45s both; }
.gallery-card__spark { display: grid; place-items: center; flex: none; width: 28px; height: 28px; margin-top: 2px; border-radius: 50%; background: #c5e8d4; color: #183326; font: 20px/1 Georgia,serif; }
.gallery-card__body { flex: 1; min-width: 0; }
.gallery-card__moment { color: #f3f1e9; font-size: 13px; font-weight: 600; line-height: 1.4; }
.gallery-card__line { margin-top: 3px; color: #bdc7b9; font-size: 12px; line-height: 1.5; }
.gallery-card__line a { color: #c5e8d4; font-weight: 600; text-decoration: underline; text-decoration-color: #c5e8d466; text-underline-offset: 3px; white-space: nowrap; }
.gallery-card__line a:hover { color: #e6f7ec; text-decoration-color: currentColor; }
.gallery-card__close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin: -8px 0 -8px -4px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #c9d3c5; font: 24px/1 system-ui,sans-serif; cursor: pointer; }
.gallery-card__close:hover { background: #ffffff10; color: #fff; }
.gallery-card :is(a,button):focus-visible { outline: 2px solid #e9ce97; outline-offset: 2px; }
@keyframes babel-invite-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes babel-backdrop-out { to { background: transparent; backdrop-filter: blur(0); } }
@keyframes babel-tab-arrive { from { opacity: 0; transform: translateY(12px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes babel-tab-cue { 0%, 78%, 100% { box-shadow: 0 4px 25px #0005; } 86% { box-shadow: 0 0 0 5px #c5e8d41c, 0 4px 25px #0005; } }
@media (max-width: 1100px) { .babel-chrome__inner { gap: 18px; } .babel-context { padding-left: 18px; } .babel-links a { padding-inline: 9px; } .babel-menu__label { display: none; } }
@media (max-width: 900px) { .babel-links { display: none; } .babel-build { margin-left: auto; } }
@media (max-width: 600px) {
    /* One floating invitation on phones, not two competing corner widgets. */
    body:has(.babel-invite-tab:not([hidden])) .drift-beacon { display: none; }
    .babel-chrome__inner { min-height: 66px; padding: 9px 14px; gap: 12px; }
    .babel-brand { font-size: 28px; }
    .babel-context { display: none; }
    .babel-build { gap: 8px; min-height: 44px; padding: 9px 12px; font-size: 12px; }
    .babel-build svg { display: none; }
    .babel-menu__panel { top: calc(100% + 12px); }
    .babel-invite { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 29px 22px 22px; border-radius: 20px; }
    .babel-invite h2 { font-size: 33px; letter-spacing: -1px; }
    .babel-invite__eyebrow { font-size: 9px; gap: 8px; }
    .babel-invite__intro p { font-size: 13px; margin: 15px 0 20px; }
    .babel-offer--primary { padding: 20px; gap: 13px; }
    .babel-offer__symbol { width: 32px; height: 32px; font-size: 19px; }
    .babel-offer__body > strong { font-size: 27px; }
    .babel-offer__body > span { font-size: 12px; }
    .babel-offer-grid { gap: 9px; }
    .babel-offer-grid .babel-offer { padding: 16px 13px; }
    .babel-offer-grid .babel-offer strong { font-size: 14px; }
    .babel-offer small { font-size: 8px; letter-spacing: .7px; }
    .babel-offer-grid .babel-offer > span { font-size: 11px; }
    .babel-invite-tab { right: 12px; bottom: max(14px, env(safe-area-inset-bottom)); font-size: 11px; }
    .babel-invite-tab__open { padding: 8px 10px 8px 8px; }
    .gallery-card { left: 12px; right: 12px; width: auto; bottom: max(14px, env(safe-area-inset-bottom)); gap: 10px; padding: 10px 2px 10px 12px; border-radius: 14px; }
    .gallery-card__spark { width: 24px; height: 24px; font-size: 18px; }
    .gallery-card__moment { font-size: 12px; }
    .gallery-card__line { font-size: 11.5px; line-height: 1.45; }
}
@media (max-width: 350px) { .babel-chrome__inner { gap: 8px; padding-inline: 10px; } .babel-brand { font-size: 24px; } .babel-build { padding-inline: 8px; } .babel-build > span[aria-hidden] { display: none; } .babel-invite { padding-inline: 18px; } .babel-invite h2 { font-size: 29px; } .babel-offer--primary { padding: 16px; } .babel-offer__symbol { display: none; } .babel-offer-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
    .babel-chrome *, .babel-invite, .babel-invite *, .babel-invite::backdrop, .babel-invite-tab, .gallery-card { animation: none !important; transition: none !important; }
}
