:root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-raised: #f1f5f9;
    --surface-active: #e0f2f1;
    --surface-soft: #f8fafc;
    --ink: #1e293b;
    --ink-strong: #0f172a;
    --muted: #475569;
    --subtle: #94a3b8;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --primary: #0f766e;
    --primary-soft: #e0f2f1;
    --primary-strong: #0f766e;
    --danger: #b91c1c;
    --danger-soft: #fee2e2;
    --success: #166534;
    --success-soft: #dcfce7;
    --shadow: none;
    --radius-panel: 16px;
    --radius-card: 16px;
    --radius-pill: 999px;
    --mobile-nav-reserved: calc(80px + env(safe-area-inset-bottom));
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
}

body {
    min-height: 100vh;
    font-weight: 400;
}

body.overlay-active {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

button,
a,
input,
label {
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 56px;
    padding: 40px 24px;
    border-right: 1px solid var(--line);
    background: var(--surface);
}

.sidebar-brand {
    display: grid;
}

.sidebar-title {
    margin: 0;
    padding-left: 8px;
    font-size: 28px;
    line-height: 42px;
    letter-spacing: -0.03em;
    font-weight: 400;
    color: var(--ink-strong);
}

.sidebar-nav {
    display: grid;
    gap: 24px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 40px;
    padding: 0 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    line-height: 22px;
    font-weight: 400;
    touch-action: manipulation;
    user-select: none;
}

.nav-item:disabled,
.nav-item.nav-item-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.nav-item-active {
    color: var(--ink-strong);
}

.nav-item:hover:not(:disabled):not(.nav-item-disabled) {
    color: var(--ink-strong);
}

.nav-pill {
    width: 56px;
    height: 40px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background-color 140ms ease;
}

.nav-item-active .nav-pill {
    background: var(--primary-soft);
}

.nav-item:hover:not(:disabled):not(.nav-item-disabled) .nav-pill {
    background: var(--surface-raised);
}

.nav-item:active:not(:disabled):not(.nav-item-disabled) .nav-pill,
.nav-item.is-pressed:not(:disabled):not(.nav-item-disabled) .nav-pill {
    background: #e7edf5;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    color: currentColor;
}

.workspace {
    flex: 1;
    min-width: 0;
    padding: 36px 42px;
}

.workspace-scroll {
    width: min(920px, 100%);
    min-height: calc(100vh - 72px);
    margin: 0 auto;
}

.page {
    min-height: 100%;
}

.stage {
    min-height: calc(100vh - 72px);
}

.receive-home-stage,
.receive-home {
    min-height: calc(100vh - 120px);
}

#receiveHomeStage {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 14px;
}

.receive-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    transform: translateY(-42px);
}

.qr-shell {
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

#qrImage {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
}

.qr-overlay {
    position: absolute;
    inset: 0;
    display: none;
    pointer-events: none;
}

.qr-overlay-visible {
    display: block;
}

.qr-overlay-image {
    width: 100%;
    height: 100%;
    display: block;
}

.qr-shell-expired {
    opacity: 0.8;
}

.qr-image-expired {
    filter: grayscale(1);
    opacity: 0.34;
}

.receive-home-title,
.prompt-title,
.stage-title,
.flow-title {
    margin: 0;
    letter-spacing: -0.04em;
    color: var(--ink-strong);
}

.receive-home-title {
    font-size: 36px;
    line-height: 44px;
    font-weight: 400;
}

.receive-home-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 22px;
    line-height: 28px;
    font-weight: 400;
    text-align: center;
}

.receive-home-caption {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

.receive-home-caption-expired {
    display: block;
}

.text-link-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font-size: inherit;
    line-height: inherit;
    font-weight: 400;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-link-button:hover,
.text-link-button.is-pressed {
    color: var(--primary-strong);
}

.text-link-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.text-link-icon svg {
    width: 100%;
    height: 100%;
}

.prompt-layout {
    width: min(760px, calc(100vw - 64px));
    min-height: calc(100vh - 64px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 0 28px;
}

.prompt-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.scene-icon {
    width: 72px;
    height: 72px;
    color: #64748b;
}

.scene-icon svg {
    width: 100%;
    height: 100%;
}

.scene-icon-handheld {
    width: 88px;
    height: 88px;
}

.prompt-title {
    font-size: 45px;
    line-height: 52px;
    font-weight: 400;
}

.prompt-subtitle {
    margin: 0;
    color: var(--ink-strong);
    font-size: 22px;
    line-height: 28px;
    font-weight: 400;
    text-align: center;
}

#promptMetaBadges {
    justify-content: center;
    gap: 8px;
}

#promptMetaBadges .status-badge {
    min-height: 20px;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
}

.surface-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow);
}

.panel-copy,
.summary-detail,
.footer-detail,
.stage-subtitle,
.content-subtitle,
.summary-subtitle,
.progress-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.footer-detail:empty,
.file-row-detail:empty {
    display: none;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-row-center {
    justify-content: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    white-space: nowrap;
}

.status-neutral {
    background: rgba(226, 232, 240, 0.8);
    color: var(--muted);
}

.status-active {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.status-success {
    background: var(--success-soft);
    color: var(--success);
}

.status-error {
    background: var(--danger-soft);
    color: var(--danger);
}

.item-list,
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-row,
.file-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 6px 0;
}

.item-row-icon,
.file-row-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--surface-raised);
    color: var(--primary);
}

.item-row-icon svg,
.file-row-icon svg {
    width: 22px;
    height: 22px;
}

.item-row-copy,
.file-row-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.item-row-title,
.file-row-title,
.summary-title,
.content-title,
.footer-title,
.settings-section-title {
    margin: 0;
    font-weight: 400;
}

.item-row-title,
.file-row-title {
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-strong);
    word-break: break-word;
}

.item-row-meta,
.file-row-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    transition: opacity 120ms ease, transform 120ms ease;
    touch-action: manipulation;
    user-select: none;
}

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

.button:active:not(:disabled),
.button.is-pressed:not(:disabled) {
    transform: translateY(0);
    opacity: 0.92;
}

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

.button-primary {
    background: var(--primary);
    color: #ffffff;
}

.button-secondary {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.button-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

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

.button-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.button-icon svg {
    width: 100%;
    height: 100%;
}

.button-label {
    line-height: 1;
}

.footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-actions-center {
    justify-content: center;
}

.prompt-actions {
    gap: 16px;
    margin-top: 32px;
}

.prompt-actions .button {
    min-width: 108px;
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
    gap: 6px;
}

.prompt-actions .button-icon {
    width: 16px;
    height: 16px;
}

.footer-actions-inline {
    justify-content: flex-start;
}

.file-stage,
.text-stage {
    min-height: calc(100vh - 120px);
    padding: 16px 0;
}

.stage-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    min-height: 100vh;
    padding: 24px 32px;
    overflow-x: hidden;
    overflow-y: auto;
}

.stage-overlay-base {
    background: var(--bg);
}

.stage-overlay-text {
    background: var(--surface-active);
}

.file-stage {
    width: min(980px, calc(100vw - 64px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stage-title,
.flow-title {
    font-size: 22px;
    line-height: 1.3;
    font-weight: 400;
}

.footer-card,
.summary-card,
.content-card {
    padding: 20px;
}

.footer-card {
    display: grid;
    gap: 12px;
}

.footer-copy {
    display: grid;
    gap: 6px;
}

.footer-copy > [hidden] {
    display: none !important;
}

.text-stage {
    display: grid;
    grid-template-rows: auto auto minmax(260px, 1fr) auto;
    gap: 12px;
}

.text-stage-native {
    width: min(100%, 100vw);
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 32px 24px;
    background: var(--surface-active);
}

.text-stage-spacer {
    min-height: 24px;
}

.text-stage-spacer-top {
    flex: 0.5 1 0;
}

.text-stage-spacer-bottom {
    flex: 0.74 1 0;
}

.text-stage-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-overlay-title {
    margin: 0;
    color: var(--ink-strong);
    font-size: 32px;
    line-height: 40px;
    font-weight: 400;
    text-align: center;
}

.text-overlay-subtitle {
    margin: 34px 0 12px;
    color: var(--muted);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    text-align: center;
}

.text-message-shell {
    width: min(74%, 960px);
    max-width: 100%;
    min-height: clamp(180px, 30vh, 280px);
    max-height: min(42vh, 420px);
    overflow: auto;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--surface);
}

.text-message-body {
    min-height: clamp(148px, 24vh, 248px);
    color: var(--ink-strong);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 22px;
    font-size: 15px;
}

.text-primary-actions {
    padding-top: 20px;
}

.text-primary-actions .button {
    min-width: 120px;
    padding: 0 18px;
    min-height: 38px;
    font-size: 14px;
}

.text-secondary-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 4px;
}

.text-close-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    touch-action: manipulation;
    user-select: none;
}

.text-close-button:hover:not(:disabled) {
    color: var(--ink-strong);
    background: var(--surface-raised);
}

.text-close-button:active:not(:disabled),
.text-close-button.is-pressed:not(:disabled) {
    background: #e7edf5;
    opacity: 0.82;
}

.text-close-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
    font-weight: 400;
    transform: translateY(-1px);
}

.flow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.progress-heading {
    display: grid;
    gap: 6px;
}

.summary-card,
.content-card {
    display: grid;
    gap: 12px;
}

.summary-card {
    background: var(--surface-active);
    border-color: transparent;
}

.content-card,
.footer-card {
    background: var(--surface-raised);
    border-color: transparent;
}

.file-stage-desktop .footer-card {
    background: var(--surface-raised);
    border-color: transparent;
}

.file-list-plain {
    flex: 1 1 auto;
    min-height: 260px;
    gap: 0;
}

.summary-title {
    font-size: 16px;
    line-height: 1.35;
}

.summary-subtitle,
.content-subtitle {
    font-size: 14px;
}

.content-head {
    display: grid;
    gap: 6px;
}

.content-title,
.footer-title {
    font-size: 16px;
    line-height: 1.35;
}

.file-stage-desktop .flow-title {
    font-size: 22px;
    line-height: 28px;
    font-weight: 400;
}

.file-stage-desktop .stage-subtitle {
    font-size: 14px;
    line-height: 1.5;
}

.file-stage-desktop .footer-card {
    background: var(--surface-raised);
    border-color: transparent;
    gap: 12px;
}

.file-stage-desktop .footer-title {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 400;
}

.file-stage-desktop .footer-detail {
    min-height: 0;
    font-size: 14px;
    line-height: 1.55;
}

.footer-title-neutral {
    color: var(--ink-strong);
}

.footer-title-active {
    color: var(--primary-strong);
}

.footer-title-success {
    color: var(--success);
}

.footer-title-error {
    color: var(--danger);
}

.text-content-body {
    min-height: 220px;
    max-height: 48vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--ink);
    line-height: 1.75;
}

.progress-shell {
    width: 100%;
    height: 4px;
    border-radius: var(--radius-pill);
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 160ms linear;
}

.file-row {
    gap: 12px;
    min-height: 56px;
    padding: 6px 0;
}

.file-row-action {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 18px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease;
    touch-action: manipulation;
}

.file-row-action:hover:not(:disabled) {
    background: var(--surface-active);
    border-color: #99f6e4;
    transform: none;
}

.file-row-action:hover:not(:disabled) .file-row-icon {
    color: var(--primary);
}

.file-row-action:hover:not(:disabled) .file-row-title,
.file-row-action:hover:not(:disabled) .file-row-detail,
.file-row-action:hover:not(:disabled) .file-row-detail-neutral {
    color: var(--primary);
}

.file-row-action:active:not(:disabled),
.file-row-action.is-pressed:not(:disabled) {
    transform: none;
    background: var(--surface-active);
    opacity: 0.9;
}

.file-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.file-row-copy {
    gap: 2px;
}

.file-row-title {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

.file-row-detail {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
}

.file-row-action .file-row-detail:empty,
.file-row-action .file-row-copy {
    gap: 0;
}

.file-row-detail-neutral {
    color: var(--muted);
}

.file-row-detail-active {
    color: var(--primary);
}

.file-row-detail-success {
    color: var(--success);
}

.file-stage-desktop .footer-actions {
    margin-top: 8px;
}

.file-stage-desktop .footer-actions .button {
    min-width: 96px;
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.file-row-detail-error {
    color: var(--danger);
}

.settings-layout {
    width: min(720px, 100%);
    display: grid;
    gap: 20px;
    padding: 16px 0;
}

.guide-layout {
    width: min(720px, 100%);
    display: grid;
    gap: 20px;
    padding: 16px 0;
}

.settings-layout > .stage-title,
.guide-layout > .stage-title {
    font-size: 24px;
    line-height: 32px;
}

.settings-section {
    padding: 20px;
    display: grid;
    gap: 16px;
    background: var(--surface-raised);
    border-color: transparent;
}

.guide-section {
    padding: 20px;
    display: grid;
    gap: 18px;
    background: var(--surface-raised);
    border-color: transparent;
}

.settings-section-title {
    font-size: 15px;
    line-height: 1.35;
    color: var(--muted);
}

.settings-list {
    display: grid;
    gap: 22px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    text-align: left;
    width: 100%;
    transition: background-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.settings-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 8px;
}

.settings-label {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--ink-strong);
}

.settings-value {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.guide-steps {
    display: grid;
    gap: 18px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.guide-step-index {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 14px;
    line-height: 1;
}

.guide-step-copy {
    display: grid;
    gap: 6px;
}

.settings-row-button {
    cursor: pointer;
    border-radius: 14px;
}

.settings-row-button:hover:not(:disabled) {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
}

.settings-row-button:hover:not(:disabled) .settings-label,
.settings-row-button:hover:not(:disabled) .settings-value {
    color: var(--ink-strong);
}

.settings-row-button:active:not(:disabled),
.settings-row-button.is-pressed:not(:disabled) {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-strong);
    opacity: 0.94;
    transform: translateY(1px);
}

.text-input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    outline: none;
}

.text-input:focus {
    border-color: rgba(32, 91, 89, 0.38);
    box-shadow: 0 0 0 4px rgba(32, 91, 89, 0.08);
}

.text-input:disabled {
    opacity: 0.55;
}

.language-toggle {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    padding: 4px;
    gap: 4px;
}

.language-option {
    min-width: 80px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 400;
    touch-action: manipulation;
    user-select: none;
}

.language-option-active {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.language-option:active:not(:disabled),
.language-option.is-pressed:not(:disabled) {
    background: rgba(24, 36, 42, 0.08);
}

.dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 24px;
}

.dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
}

.dialog-surface {
    position: relative;
    width: min(440px, 100%);
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.dialog-panel {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.dialog-head {
    display: grid;
    gap: 6px;
}

.dialog-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
    color: var(--ink-strong);
}

.dialog-body {
    display: grid;
    gap: 12px;
}

.dialog-text-input {
    min-height: 50px;
}

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

.language-toggle-dialog {
    width: 100%;
    display: grid;
    gap: 8px;
}

.language-toggle-dialog .language-option {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    justify-content: flex-start;
    text-align: left;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.language-toggle-dialog .language-option:hover:not(:disabled) {
    background: var(--surface-raised);
    border-color: var(--line);
    color: var(--ink-strong);
}

.language-toggle-dialog .language-option:active:not(:disabled),
.language-toggle-dialog .language-option.is-pressed:not(:disabled) {
    background: var(--surface-raised);
    border-color: var(--line-strong);
}

.language-toggle-dialog .language-option-active {
    background: var(--primary-soft);
    border-color: transparent;
    color: var(--primary-strong);
}

.language-toggle-dialog .language-option-active:hover:not(:disabled) {
    background: var(--primary-soft);
    border-color: transparent;
    color: var(--primary-strong);
}

@media (max-width: 1120px) {
    .sidebar {
        width: 212px;
        padding: 32px 18px;
    }

    .workspace {
        padding: 28px 28px;
    }
}

@media (max-width: 720px) {
    .app-shell {
        display: block;
        min-height: 100dvh;
    }

    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        width: auto;
        height: auto;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        border-right: 0;
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.96);
        gap: 0;
    }

    .sidebar-brand {
        display: none;
    }

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

    .nav-item {
        min-height: 64px;
        padding: 8px 4px;
        gap: 4px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
    }

    .nav-pill {
        width: 64px;
        height: 32px;
    }

    .nav-item-active .nav-pill {
        background: var(--primary-soft);
    }

    .nav-item-active {
        color: var(--primary);
    }

    .workspace {
        min-height: calc(100dvh - var(--mobile-nav-reserved));
        padding: 16px 16px calc(104px + env(safe-area-inset-bottom));
    }

    .stage-overlay {
        min-height: 100dvh;
        padding: 0;
    }

    .workspace-scroll,
    .stage,
    #receiveHomeStage,
    .receive-home-stage,
    .receive-home {
        min-height: calc(100dvh - var(--mobile-nav-reserved) - 32px);
    }

    #receiveHomeStage {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        padding: 10px 0 8px;
    }

    .receive-home {
        min-height: auto;
        flex: 1 1 auto;
        justify-content: center;
        transform: translateY(-18px);
        padding-top: 0;
    }

    .receive-home-caption {
        flex: 0 0 auto;
        max-width: 100%;
        margin-top: auto;
        margin-bottom: 12px;
    }

    .text-stage-native {
        min-height: 100dvh;
        padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
    }

    .prompt-layout,
    .file-stage {
        width: 100%;
        min-height: 100dvh;
        padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
    }

    .prompt-layout {
        gap: 14px;
    }

    .text-overlay-subtitle {
        margin-top: 40px;
    }

    .text-message-shell {
        width: 100%;
        min-height: clamp(168px, 28vh, 220px);
        max-height: 34vh;
        border-radius: 16px;
    }

    .text-message-body {
        min-height: clamp(136px, 22vh, 188px);
    }

    .text-primary-actions {
        width: auto;
    }

    .text-primary-actions .button {
        width: auto;
        min-width: 156px;
    }

    #promptMetaBadges .status-badge {
        min-height: 20px;
        padding: 2px 10px;
    }

    .prompt-actions {
        width: auto;
        margin-top: 32px;
        justify-content: center;
    }

    .prompt-actions .button {
        flex: 0 0 auto;
        min-width: 112px;
        padding: 0 14px;
    }

    .prompt-actions .button-icon {
        width: 16px;
        height: 16px;
    }

    .qr-shell {
        width: 104px;
        height: 104px;
    }

    .surface-card,
    .footer-card,
    .summary-card,
    .content-card,
    .settings-section {
        border-radius: 22px;
    }

    .footer-card,
    .summary-card,
    .content-card,
    .settings-section {
        padding: 18px;
    }

    .settings-row {
        align-items: stretch;
    }

    .dialog-overlay {
        padding: 16px;
        align-items: end;
    }

    .dialog-surface {
        width: 100%;
        border-radius: 20px 20px 0 0;
    }

    .dialog-actions {
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .dialog-actions .button {
        width: auto;
    }

    .footer-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-actions .button,
    .footer-actions .button-link {
        flex: 0 0 auto;
        min-width: 96px;
    }

    .file-stage-desktop .footer-actions {
        justify-content: flex-end;
    }

    .language-toggle {
        width: 100%;
    }

    .language-option {
        flex: 1 1 0;
    }
}
