:root {
    --header-avatar-size: 56px;
    --header-avatar-radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
}

.chat-container {
    position: relative;
    width: min(1400px, 100%);
    height: min(92vh, 860px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    background: var(--surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
}

.chat-content-wrapper {
    position: relative;
    display: flex;
    flex: 1;
    overflow: hidden;
}

.main-chat-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.send-button,
.icon-button {
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.chat-header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.icon-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
}

.icon-button:hover {
    transform: translateY(-1px);
    background: var(--surface-3);
}

.header-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo-frame {
    box-sizing: border-box;
    width: var(--header-avatar-size);
    height: var(--header-avatar-size);
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--header-avatar-radius);
    background: radial-gradient(circle at 35% 30%, var(--honey-bright), var(--honey) 70%);
    box-shadow: 0 10px 22px rgba(16, 24, 34, 0.16);
    padding: 6px;
}

.header-logo {
    width: 100%;
    height: 100%;
    display: block;
}

.header-copy {
    min-width: 0;
}

.header-eyebrow {
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
}

.chat-header h1 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1.08;
    color: var(--text);
}

.presence-line {
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.show-both-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    cursor: pointer;
}

.show-both-toggle .toggle-text {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--surface-3);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: background-color 0.2s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface);
    transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

.status-dot--offline {
    background: var(--danger);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.45;
    }
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px;
    background: var(--bg);
    scroll-behavior: smooth;
}

.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--line);
}

.welcome-message {
    max-width: 560px;
    margin: 20px auto 0;
    padding: 28px 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    color: var(--muted);
    text-align: center;
    line-height: 1.65;
    box-shadow: var(--shadow-sm);
}

.welcome-message p + p {
    margin-top: 8px;
}

.welcome-message p:first-child {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.message {
    display: flex;
    margin-bottom: 16px;
    animation: slideIn 0.24s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.message.assistant {
    justify-content: flex-start;
    align-items: flex-end;
    gap: 10px;
}

.message-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    background: radial-gradient(circle, rgba(223, 138, 33, 0.22), rgba(223, 138, 33, 0) 70%);
    box-shadow: var(--shadow-sm);
}

.message-bubble {
    max-width: min(72%, 760px);
    padding: 13px 18px;
    border-radius: 20px;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-word;
}

.message.user .message-bubble,
.message.assistant .message-bubble {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.message.assistant .message-bubble {
    cursor: pointer;
}

.message.assistant .message-bubble:focus-visible {
    outline: 2px solid var(--peri);
    outline-offset: 2px;
}

.message.user .message-bubble {
    border-bottom-right-radius: 6px;
}

.message.assistant .message-bubble {
    border-bottom-left-radius: 6px;
}

.paired-bubble {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-copy {
    position: relative;
    padding: 12px 14px;
    border-radius: 16px;
}

.message-copy::before {
    content: attr(data-lang);
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--muted);
    opacity: 0.62;
}

.message-copy.primary {
    background: var(--surface-2);
}

.message-copy.secondary {
    background: var(--surface-3);
    color: var(--muted);
}

.message-copy-body {
    min-height: 1.2em;
}

.message-pending {
    font-style: italic;
    opacity: 0.78;
}

.message-time {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
    text-align: right;
}

.message.assistant .message-time {
    text-align: left;
}

.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
.message-bubble h4,
.message-bubble h5,
.message-bubble h6,
.message-copy-body h1,
.message-copy-body h2,
.message-copy-body h3,
.message-copy-body h4,
.message-copy-body h5,
.message-copy-body h6 {
    margin: 12px 0 8px;
    font-weight: 700;
}

.message-bubble h1,
.message-copy-body h1 {
    font-size: 1.35rem;
}

.message-bubble h2,
.message-copy-body h2 {
    font-size: 1.2rem;
}

.message-bubble h3,
.message-copy-body h3 {
    font-size: 1.08rem;
}

.message-bubble strong,
.message-copy-body strong {
    font-weight: 800;
}

.message-bubble code,
.message-copy-body code {
    padding: 2px 6px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--text) 8%, transparent);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
}

.message-bubble pre,
.message-copy-body pre {
    margin: 8px 0;
    padding: 12px;
    overflow-x: auto;
    border-radius: 12px;
    background: color-mix(in srgb, var(--text) 8%, transparent);
}

.message-bubble pre code,
.message-copy-body pre code {
    padding: 0;
    background: transparent;
}

.message-bubble ul,
.message-bubble ol,
.message-copy-body ul,
.message-copy-body ol {
    padding-left: 22px;
    margin: 8px 0;
}

.message-bubble li,
.message-copy-body li {
    margin: 4px 0;
}

.message-bubble blockquote,
.message-copy-body blockquote {
    margin: 8px 0;
    padding-left: 12px;
    border-left: 3px solid color-mix(in srgb, var(--text) 20%, transparent);
    color: var(--muted);
}

.message-bubble a,
.message-copy-body a {
    color: inherit;
}

.message-bubble p,
.message-copy-body p {
    margin: 8px 0;
}

.message-bubble p:first-child,
.message-copy-body p:first-child {
    margin-top: 0;
}

.message-bubble p:last-child,
.message-copy-body p:last-child {
    margin-bottom: 0;
}

.input-container {
    position: relative;
    padding: 18px 22px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.lookup-select-chip {
    position: absolute;
    top: -14px;
    left: 22px;
    transform: translateY(-100%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 44px);
    padding: 6px 14px;
    border: 1px solid var(--peri);
    border-radius: 999px;
    background: var(--surface);
    color: var(--peri);
    font: inherit;
    font-size: var(--text-xs);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: opacity 0.15s ease;
    z-index: 5;
}

.lookup-select-chip[hidden] {
    display: none;
}

.lookup-select-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.composer-cue {
    margin: 0 0 8px;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.composer-cue-lookup {
    margin-left: 8px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-family: var(--font-mono);
    text-transform: none;
    letter-spacing: normal;
    color: var(--peri);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.composer-cue-lookup:hover {
    color: var(--peri);
    opacity: 0.8;
}

.composer-cue-lookup:focus-visible {
    outline: 2px solid var(--peri);
    outline-offset: 2px;
    border-radius: 2px;
}

.daily-limit-notice {
    margin: 0 0 8px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    color: var(--text);
    font-size: var(--text-xs);
}

.daily-limit-notice[hidden] {
    display: none;
}

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

.message-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.message-input:focus {
    outline: none;
    border-color: var(--honey);
    box-shadow: 0 0 0 4px rgba(223, 138, 33, 0.15);
    background: var(--surface);
}

.send-button {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--honey-bright), var(--honey));
    color: #fff9f2;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 14px 26px rgba(70, 56, 43, 0.16);
}

.send-button:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
}

.send-button:active:not(:disabled) {
    transform: scale(0.98);
}

.send-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.send-button svg {
    width: 20px;
    height: 20px;
}

.message.assistant.loading .message-bubble {
    padding: 16px 18px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--honey);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

@media (max-width: 1024px) {
    .chat-header {
        flex-wrap: wrap;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

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

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

    .header-brand {
        gap: 10px;
    }

    :root {
        --header-avatar-size: 44px;
    }

    .chat-header h1 {
        font-size: 1.25rem;
    }

    .header-actions {
        gap: 8px;
    }

    .show-both-toggle {
        padding: 6px 10px;
    }

    .messages-container {
        padding: 18px 16px;
    }

    .message-bubble {
        max-width: 88%;
    }

    .message-copy {
        padding: 10px 12px;
    }

    .message-avatar {
        width: 30px;
        height: 30px;
    }

    .input-container {
        padding: 14px 16px;
    }
}

@media (max-width: 560px) {
    .icon-button {
        width: 38px;
        height: 38px;
    }

    .status-indicator {
        display: none;
    }

    .header-actions {
        justify-content: space-between;
    }

    .message-bubble {
        max-width: 100%;
    }
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 12, 0.42);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 20;
}

.nav-backdrop.open {
    opacity: 1;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(320px, 86vw);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 21;
    overflow-y: auto;
}

.nav-drawer.open {
    transform: translateX(0);
}

@media (max-width: 560px) {
    .nav-drawer {
        width: 100%;
    }
}

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text);
}

.nav-drawer-header .icon-button {
    border-color: var(--line);
    background: var(--surface);
    color: var(--text);
}

.nav-drawer-header .icon-button:hover {
    background: var(--surface-2);
}

.nav-drawer h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text);
}

.nav-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--surface-2);
}

.nav-item--danger {
    margin-top: auto;
    color: var(--danger);
}

.nav-drawer-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 8px 0;
    color: var(--text);
}

.nav-drawer-theme .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.nav-drawer-theme .toggle-slider {
    background: rgba(0, 0, 0, 0.14);
}

@media (prefers-reduced-motion: reduce) {
    .nav-backdrop,
    .nav-drawer {
        transition: none;
    }

    .composer-cue-lookup {
        transition: none;
    }
}

.lookup-trigger {
    border-color: var(--line);
    background: var(--surface-2);
    color: var(--text);
}

.lookup-trigger:hover {
    border-color: var(--peri);
    color: var(--peri);
    background: var(--surface-3);
}

.lookup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 12, 0.42);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 30;
}

.lookup-backdrop.open {
    opacity: 1;
}

.lookup-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 55%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 22px 24px;
    background: var(--surface);
    border-top: 2px solid var(--peri);
    border-radius: 24px 24px 0 0;
    box-shadow: var(--shadow-md);
    transform: translateY(100%);
    transition: transform 0.25s ease;
    z-index: 31;
    overflow-y: auto;
}

.lookup-sheet.open {
    transform: translateY(0);
}

.lookup-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lookup-sheet-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lookup-sheet-title h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text);
}

.lookup-notice {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--peri);
    border: 1px solid var(--peri);
    border-radius: 999px;
    padding: 3px 10px;
}

.lookup-direction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.lookup-direction-lang {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.lookup-swap {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--peri);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.lookup-swap:hover {
    border-color: var(--peri);
    background: var(--surface-3);
}

.lookup-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.lookup-input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lookup-input:focus {
    outline: none;
    border-color: var(--peri);
    box-shadow: 0 0 0 4px rgba(87, 99, 203, 0.15);
    background: var(--surface);
}

.lookup-submit {
    flex-shrink: 0;
    padding: 14px 20px;
    border: 1px solid var(--peri);
    border-radius: 999px;
    background: var(--peri);
    color: var(--surface);
    font: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.lookup-submit:hover {
    opacity: 0.9;
}

.lookup-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(87, 99, 203, 0.15);
}

.lookup-hint {
    margin: 0;
    min-height: 1.1rem;
    color: var(--danger);
    font-size: var(--text-xs);
}

.lookup-results {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lookup-entry {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lookup-entry--primary {
    border-left: 3px solid var(--peri);
    background: var(--surface-3);
}

.lookup-entry-translation {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text);
}

.lookup-entry--primary .lookup-entry-translation {
    font-weight: 700;
}

.lookup-entry-meta {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.lookup-entry-grammar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    margin: 4px 0 0;
}

.lookup-entry-grammar dt {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.lookup-entry-grammar dd {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text);
}

.lookup-entry-insert {
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 14px;
    border: 1px solid var(--peri);
    border-radius: 999px;
    background: transparent;
    color: var(--peri);
    font: inherit;
    font-size: var(--text-xs);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lookup-entry-insert:hover {
    background: var(--peri);
    color: var(--surface);
}

.lookup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.lookup-loading .typing-indicator span {
    background: var(--peri);
}

.lookup-error {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--danger);
    border-radius: 14px;
    background: var(--surface-2);
}

.lookup-error-text {
    color: var(--danger);
    font-size: 0.88rem;
    margin: 0;
}

.lookup-retry {
    padding: 6px 14px;
    border: 1px solid var(--danger);
    border-radius: 999px;
    background: transparent;
    color: var(--danger);
    font: inherit;
    font-size: var(--text-xs);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lookup-retry:hover {
    background: var(--danger);
    color: var(--surface);
}

.lookup-empty {
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

.lookup-limit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.lookup-limit-text {
    color: var(--text);
    font-size: 0.88rem;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .lookup-backdrop,
    .lookup-sheet {
        transition: none;
    }

    .lookup-select-chip {
        transition: none;
    }

    .lookup-loading .typing-indicator span {
        animation: none;
    }
}

.first-run-setup {
    position: absolute;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(36, 29, 43, 0.26);
    backdrop-filter: blur(4px);
}

.first-run-setup[hidden] {
    display: none;
}

.first-run-card {
    width: min(92%, 440px);
    max-height: 90%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 28px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.first-run-mascot {
    width: 72px;
    height: 72px;
}

.first-run-card h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text);
}

.first-run-intro {
    color: var(--muted);
    line-height: 1.55;
}

.first-run-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.first-run-form label {
    margin-top: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.first-run-form select,
.first-run-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text);
    font: inherit;
}

.first-run-form select:focus,
.first-run-form input:focus {
    outline: none;
    border-color: var(--peri);
    box-shadow: 0 0 0 3px rgba(87, 99, 203, 0.15);
}

.first-run-error {
    margin-top: 8px;
    color: var(--danger);
    font-size: 0.88rem;
}

.first-run-error[hidden] {
    display: none;
}

.first-run-submit {
    margin-top: 16px;
    width: 100%;
    padding: 14px 22px;
    border: none;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    color: #f9f4ee;
    background: linear-gradient(135deg, var(--honey-bright), var(--honey));
    box-shadow: 0 16px 34px rgba(183, 107, 19, 0.22);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.first-run-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.first-run-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
