/* Ask about Mubin: the assistant page, in the portfolio's matte glass. */

.chat-page {
    overflow: hidden;
}

.chat-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100dvh;
    max-width: 880px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 12px);
}

/* ---------- Header ---------- */

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.head-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px 0 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--glass);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-edge), 0 8px 24px -12px rgba(15, 23, 42, 0.25);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.head-btn:hover {
    --fill: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.head-btn .ico {
    width: 18px;
    height: 18px;
}

.chat-id {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.chat-id img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 4px 10px rgba(15, 23, 42, 0.15);
}

.chat-id h1 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.mode {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-2);
    font-size: 13px;
}

.mode-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #aeaeb2;
}

.mode[data-live="true"] .mode-dot {
    background: var(--live-dot);
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18);
}

@media (max-width: 599px) {
    .head-btn span {
        display: none;
    }
    .head-btn {
        width: 40px;
        padding: 0;
        justify-content: center;
    }
    .chat-id h1 {
        font-size: 17px;
    }
}

/* ---------- Conversation ---------- */

.chat-window {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.chat-log {
    flex: 1;
    overflow-y: auto;
    padding: clamp(1rem, 3vw, 1.75rem);
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.msg {
    display: flex;
    gap: 10px;
    max-width: 88%;
    margin-bottom: 14px;
}

.msg-user {
    margin-left: auto;
    justify-content: flex-end;
}

.msg-avatar {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 2px;
}

.bubble {
    padding: 11px 15px;
    border-radius: 20px;
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.msg-bot .bubble {
    border-top-left-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 2px 8px -4px rgba(15, 23, 42, 0.14);
}

.msg-user .bubble {
    border-top-right-radius: 8px;
    background: linear-gradient(180deg, #2b8cff, var(--blue));
    color: #fff;
}

.bubble p + p,
.bubble ul + p,
.bubble p + ul {
    margin-top: 0.55em;
}

.bubble ul {
    padding-left: 1.1em;
    list-style: disc;
}

.bubble li + li {
    margin-top: 0.25em;
}

.bubble a {
    font-weight: 600;
}

.msg-user .bubble a {
    color: #fff;
    text-decoration: underline;
}

.bubble-links {
    margin-top: 8px;
    font-size: 14px;
}

.bubble-note {
    margin-top: 8px;
    color: var(--ink-2);
    font-size: 13px;
}

.thinking {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font-size: 14px;
}

.mini-sphere {
    width: 26px;
    height: 26px;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 18px 40px;
}

.suggestion {
    min-height: 36px;
    padding: 7px 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.08);
    color: var(--link);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion:hover {
    background: rgba(0, 113, 227, 0.15);
}

/* ---------- Composer ---------- */

.composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px) * 0);
    border-top: 1px solid var(--hairline);
}

.composer textarea {
    flex: 1;
    min-height: 40px;
    max-height: 160px;
    padding: 9px 4px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    resize: none;
    caret-color: var(--blue);
}

.composer textarea:focus {
    outline: none;
}

.composer textarea {
    border-radius: 20px;
    padding-inline: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.composer textarea:focus {
    box-shadow: inset 0 0 0 1.5px rgba(0, 113, 227, 0.5);
}

.composer textarea::placeholder {
    color: #8e8e93;
}

.composer-btn {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.composer-btn .ico {
    width: 20px;
    height: 20px;
}

.composer-btn.send {
    background: var(--blue);
    color: #fff;
}

.composer-btn.send:hover {
    background: var(--blue-hover);
}

.composer-btn.send:disabled {
    background: #c7c7cc;
    cursor: default;
}

.composer-btn.mic {
    background: var(--tint);
    color: var(--ink);
}

.composer-btn.mic:hover {
    background: rgba(15, 23, 42, 0.1);
}

.composer-btn.mic[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

.chat-note {
    color: var(--ink-2);
    font-size: 12px;
    text-align: center;
    text-wrap: balance;
}

/* ---------- Voice conversation ---------- */

.voice {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(243, 244, 247, 0.72);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    backdrop-filter: blur(30px) saturate(160%);
}

.voice[hidden] {
    display: none;
}

.voice-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 560px;
    text-align: center;
}

/* The orb: the portfolio's dot sphere at full size, on a pale glass disc. */
.orb {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f1f5fc 62%, #e6edf8 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 -10px 30px rgba(0, 113, 227, 0.08), 0 30px 70px -30px rgba(0, 113, 227, 0.45);
}

.orb canvas {
    display: block;
    width: 240px;
    height: 240px;
}

@media (max-width: 499px) {
    .orb,
    .orb canvas {
        width: 200px;
        height: 200px;
    }
}

.voice-state {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.voice-text {
    min-height: 3em;
    color: var(--ink-2);
    font-size: 17px;
    line-height: 1.5;
}

.voice-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.voice-actions .round-button .ico {
    width: 20px;
    height: 20px;
}

.voice-actions .round-button[aria-pressed="true"] {
    color: #e0342a;
}

.voice-end {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    padding: 0 22px 0 18px;
    border: 0;
    border-radius: 999px;
    background: #ff3b30;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.voice-end:hover {
    background: #e0342a;
}

.voice-end .ico {
    width: 18px;
    height: 18px;
}

/* ---------- Settings sheet ---------- */

.sheet {
    width: min(480px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 1px solid transparent;
    border-radius: 28px;
    background: var(--grain) padding-box, linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)) padding-box, var(--rim) border-box;
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-edge), 0 40px 100px -30px rgba(15, 23, 42, 0.45);
    color: var(--ink);
}

.sheet::backdrop {
    background: rgba(15, 23, 42, 0.2);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.sheet-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sheet-head h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sheet-head .round-button {
    width: 36px;
    height: 36px;
}

.sheet-lede {
    color: var(--ink-2);
    font-size: 15px;
}

.provider {
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 4px;
    border: 0;
    border-radius: 999px;
    background: var(--tint);
}

.provider label {
    flex: 1;
}

.provider input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.provider span {
    display: block;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.provider input:checked + span {
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
    color: var(--ink);
}

.provider input:focus-visible + span {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fields[hidden] {
    display: none;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.field input {
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    caret-color: var(--blue);
}

.field input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1.5px var(--blue);
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.check input {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}

.privacy {
    display: flex;
    gap: 8px;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
}

.privacy .ico {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 2px;
}

.sheet-status {
    min-height: 1.4em;
    color: var(--ink-2);
    font-size: 14px;
}

.sheet-status[data-tone="ok"] {
    color: var(--live);
}

.sheet-status[data-tone="error"] {
    color: #c9302c;
}

.sheet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sheet-actions .pill {
    min-height: 44px;
    padding: 10px 22px;
    font-size: 16px;
}

.sheet-actions button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* =================================================================
   Floating assistant on the portfolio: a window that opens from the
   launcher, and folds back into it as a voice pill during a call.
   ================================================================= */

.assistant-dock {
    position: fixed;
    right: max(20px, env(safe-area-inset-right, 0px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
    z-index: 55;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ask-fab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 6px 6px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--glass);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-edge), 0 14px 34px -14px rgba(15, 23, 42, 0.35);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.35s var(--ease-out);
}

.ask-fab:hover {
    transform: translateY(-2px);
}

.fab-orb {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f1f5fc 70%, #e6edf8 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 -4px 10px rgba(0, 113, 227, 0.08), 0 6px 16px -8px rgba(0, 113, 227, 0.45);
    transition: transform 0.45s var(--ease-out);
}

.fab-orb .dots {
    width: 100%;
    height: 100%;
}

.fab-state {
    display: none;
    min-width: 7.5em;
    color: var(--ink);
}

.fab-end {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    padding: 0 20px 0 16px;
    border: 0;
    border-radius: 999px;
    background: #ff3b30;
    box-shadow: 0 10px 24px -10px rgba(255, 59, 48, 0.7);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.fab-end[hidden] {
    display: none;
}

.fab-end:hover {
    background: #e0342a;
}

.fab-end .ico {
    width: 16px;
    height: 16px;
}

/* Voice pill: the orb grows, the label becomes the live state. */
.assistant[data-state="voice"] .fab-orb {
    transform: scale(1.18);
}

.assistant[data-state="voice"] .fab-label {
    display: none;
}

.assistant[data-state="voice"] .fab-state {
    display: inline;
}

.assistant[data-state="voice"] .ask-fab {
    padding-right: 22px;
}

/* What was heard or said, floating above the pill. */
.voice-caption {
    position: fixed;
    right: max(20px, env(safe-area-inset-right, 0px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 100px);
    z-index: 55;
    max-width: min(340px, calc(100vw - 40px));
    padding: 10px 14px;
    border-radius: 18px 18px 6px 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 10px 30px -14px rgba(15, 23, 42, 0.35);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
}

.assistant[data-state="voice"] .voice-caption:not(:empty) {
    opacity: 1;
    transform: none;
}

/* The window: opens up out of the launcher, folds back into it. */
.assistant-panel {
    position: fixed;
    right: max(20px, env(safe-area-inset-right, 0px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
    z-index: 56;
    display: flex;
    flex-direction: column;
    width: min(400px, calc(100vw - 40px));
    height: min(620px, calc(100dvh - 130px));
    padding: 0;
    overflow: hidden;
    --fill: rgba(255, 255, 255, 0.78);
    transform-origin: calc(100% - 30px) calc(100% + 60px);
    transition: opacity 0.35s ease, transform 0.5s var(--ease-out), visibility 0s linear 0.5s;
}

.assistant[data-state="open"] .assistant-panel {
    transition: opacity 0.25s ease, transform 0.5s var(--ease-out), visibility 0s;
}

.assistant:not([data-state="open"]) .assistant-panel {
    visibility: hidden;
    opacity: 0;
    transform: scale(0.2);
    pointer-events: none;
}

.assistant-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 16px;
    border-bottom: 1px solid var(--hairline);
}

.assistant-head img {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(15, 23, 42, 0.15);
}

.assistant-id {
    flex: 1;
    min-width: 0;
}

.assistant-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.assistant-head .mode {
    font-size: 12px;
}

.tool {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tool:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--ink);
    text-decoration: none;
}

.tool .ico {
    width: 18px;
    height: 18px;
}

.assistant-panel .chat-log {
    padding: 16px;
}

.assistant-panel .msg {
    max-width: 94%;
}

.assistant-panel .bubble {
    font-size: 15px;
}

.assistant-panel .suggestions {
    margin-left: 40px;
}

.assistant-panel .suggestion {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 13px;
}

@media (max-width: 859px) {
    .assistant-dock {
        right: max(14px, env(safe-area-inset-right, 0px));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 86px);
    }
    .voice-caption {
        right: max(14px, env(safe-area-inset-right, 0px));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 160px);
    }
}

@media (max-width: 1239px) {
    .assistant:not([data-state="voice"]) .fab-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .assistant:not([data-state="voice"]) .ask-fab {
        padding: 5px;
    }
}

/* Phones: the window becomes a sheet over the page. */
@media (max-width: 599px) {
    .assistant-panel {
        left: 8px;
        right: 8px;
        top: calc(env(safe-area-inset-top, 0px) + 8px);
        bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
        width: auto;
        height: auto;
        transform-origin: calc(100% - 40px) calc(100% - 110px);
    }
    .assistant[data-state="open"] .assistant-dock {
        opacity: 0;
        pointer-events: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .assistant-panel,
    .assistant[data-state="open"] .assistant-panel,
    .ask-fab,
    .fab-orb,
    .voice-caption {
        transition: none;
    }
    .assistant:not([data-state="open"]) .assistant-panel {
        transform: none;
    }
}

/* Free Gemini key help, and inline link-buttons in notes. */
.free-key {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0, 113, 227, 0.07);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
}

.free-key[hidden] {
    display: none;
}

.free-key a {
    font-weight: 600;
}

.inline-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--link);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.inline-link:hover {
    text-decoration: underline;
}

/* ---------- Buttons: the portfolio's tactile language, in the assistant ---------- */

.composer-btn,
.suggestion,
.head-btn,
.tool,
.fab-end,
.ask-fab,
.voice-end,
.provider span {
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background-color 0.2s ease, color 0.2s ease;
}

.composer-btn:active,
.suggestion:active,
.head-btn:active,
.tool:active,
.fab-end:active,
.voice-end:active,
.ask-fab:active {
    transform: scale(0.94);
    transition-duration: 0.1s;
}

/* Send: the same lit blue lens as the primary button. */
.composer-btn.send {
    background: linear-gradient(180deg, #3a95ff 0%, #0a74e6 55%, #0066d6 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 40, 110, 0.25), 0 6px 14px -6px rgba(0, 113, 227, 0.6);
}

.composer-btn.send:hover:not(:disabled) {
    background: linear-gradient(180deg, #4a9fff 0%, #1479ea 55%, #006ad9 100%);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 40, 110, 0.25), 0 10px 20px -8px rgba(0, 113, 227, 0.65);
}

.composer-btn.send:disabled {
    background: linear-gradient(180deg, #d8d8dd, #c4c4ca);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Mic: a frosted key with a bright rim. */
.composer-btn.mic {
    background: linear-gradient(180deg, #ffffff, #eef1f6);
    box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(15, 23, 42, 0.07), 0 4px 10px -6px rgba(15, 23, 42, 0.3);
}

.composer-btn.mic:hover {
    background: linear-gradient(180deg, #ffffff, #e7ecf5);
    color: var(--blue);
    transform: translateY(-1px);
}

/* Suggestions: soft blue glass capsules. */
.suggestion {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 0 0 1px rgba(0, 113, 227, 0.1);
}

.suggestion:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 0 0 1px rgba(0, 113, 227, 0.2), 0 6px 14px -8px rgba(0, 113, 227, 0.45);
}

.head-btn {
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 20px -10px rgba(15, 23, 42, 0.22);
}

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

.tool:hover {
    background: linear-gradient(180deg, #ffffff, #eef1f6);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06), 0 3px 8px -4px rgba(15, 23, 42, 0.25);
}

/* End: a lit red lens, matching the blue one. */
.fab-end,
.voice-end {
    background: linear-gradient(180deg, #ff6259 0%, #ff3b30 55%, #e5302a 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(120, 10, 10, 0.25), 0 8px 20px -8px rgba(255, 59, 48, 0.65);
}

.fab-end:hover,
.voice-end:hover {
    background: linear-gradient(180deg, #ff6f67 0%, #ff4238 55%, #e8352e 100%);
    transform: translateY(-1px);
}

.ask-fab:hover {
    box-shadow: var(--glass-edge), 0 18px 40px -14px rgba(0, 113, 227, 0.35);
}

/* Settings actions reuse the portfolio pills; the provider switch gets a lit thumb. */
.provider input:checked + span {
    box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15, 23, 42, 0.1), 0 4px 10px -6px rgba(15, 23, 42, 0.25);
}

.field-hint {
    margin-top: -4px;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
}

/* Phones: the assistant button sits beside the tab bar, same height, same baseline. */
@media (max-width: 699px) {
    .assistant-dock {
        right: max(12px, env(safe-area-inset-right, 0px));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    }

    .ask-fab {
        padding: 4px;
    }

    .fab-orb {
        width: 52px;
        height: 52px;
    }

    .voice-caption {
        right: max(12px, env(safe-area-inset-right, 0px));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
    }

    /* During a voice call the pill grows leftward over the tab bar. */
    .assistant[data-state="voice"] .assistant-dock {
        left: max(12px, env(safe-area-inset-left, 0px));
        justify-content: flex-end;
    }
}
