.on-voice-page { background: var(--canvas-background); }
.on-voice-page .app-shell { display: flex; flex-direction: column; height: var(--chat-viewport-height, 100dvh); min-height: 0; overflow: hidden; }
.on-voice-page .app-header { position: relative; flex-shrink: 0; min-height: calc(56px + var(--safe-area-top)); padding: var(--safe-area-top) 12px 0; background: var(--navigation-background); }
.voice-page-heading { display: grid; grid-template-columns: var(--capsule-width) minmax(0, 1fr) var(--capsule-width); grid-template-rows: minmax(56px, auto); align-items: center; width: 100%; }
.voice-back { grid-column: 1; grid-row: 1; }
.voice-page-title { grid-column: 2; grid-row: 1; text-align: center; min-width: 0; }
.voice-page-title h1 { font-size: 1.375rem; font-weight: 600; line-height: 1.45; text-wrap: balance; }
.voice-back { display: flex; align-items: center; justify-content: center; width: 56px; min-height: 56px; border-radius: var(--radius-control); background: transparent; color: var(--text); }
.on-voice-page main { padding: 0; display: flex; flex: 1; min-height: 0; }
.on-voice-page #voice-page { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; width: 100%; background: var(--background); overflow-y: auto; }
.chat-conversation { flex: 1; min-height: min(160px, 30dvh); overflow-y: auto; overscroll-behavior: contain; padding: 12px var(--page-gutter) 16px; scroll-padding-block: 12px; }
.chat-date { text-align: center; color: var(--text-secondary); font-size: var(--font-supporting); line-height: 1.5; margin: 0 0 12px; }
.chat-message { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; }
.chat-message:last-child { margin-bottom: 0; }
.chat-avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; background: var(--surface-tint); border: 1px solid var(--border); color: var(--primary-text); border-radius: var(--radius-control); margin-top: calc(1.125rem * 1.5 + 4px); }
.chat-avatar .icon { width: 24px; height: 24px; }
.chat-message-content { min-width: 0; flex: 1; }
.chat-author { display: block; color: var(--text-secondary); font-size: var(--font-supporting); line-height: 1.5; margin: 0 0 4px 2px; }
.chat-bubble { background: var(--surface); padding: var(--space-content); border: 1px solid var(--border); border-radius: 4px var(--radius-card) var(--radius-card); overflow-wrap: anywhere; }
.chat-bubble > p { font-size: var(--font-body); line-height: 1.65; white-space: pre-wrap; }
.chat-message-user { margin-left: 46px; flex-direction: row-reverse; }
.chat-message-user .chat-avatar { display: none; }
.chat-message-user .chat-author { text-align: right; }
.chat-message-user .chat-bubble { background: var(--surface-tint); border-color: var(--border-accent); border-radius: var(--radius-card) 4px var(--radius-card) var(--radius-card); width: fit-content; margin-left: auto; }
.chat-task:empty { display: none; }
.chat-task > .primary-button, .chat-task > .secondary-button { width: 100%; margin-top: 12px; padding-inline: 12px; font-size: var(--font-body); }
.chat-task .primary-button { box-shadow: none; }
.chat-inline-action { display: inline-flex; align-items: center; justify-content: flex-start; min-height: 56px; padding: 8px 4px; margin-top: 4px; border-radius: 8px; background: transparent; color: var(--primary-text); font-size: var(--font-supporting); text-align: left; text-decoration: underline; text-underline-offset: 4px; }
.chat-suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.chat-suggestions button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; min-width: 0; padding: 10px 8px; background: var(--surface); color: var(--primary-text); border: 1px solid var(--border); border-radius: var(--radius-control); font-size: var(--font-supporting); line-height: 1.5; }
.chat-suggestions .icon { width: 22px; height: 22px; }
.chat-meal-options { display: grid; gap: 12px; margin-top: 12px; }
.chat-meal-options > button { display: flex; align-items: center; gap: 12px; min-height: 88px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); text-align: left; }
.chat-meal-options img { flex-shrink: 0; width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-control); }
.chat-meal-options button > span { flex: 1; min-width: 0; }
.chat-meal-options strong { display: block; font-size: var(--font-body); line-height: 1.45; }
.chat-meal-options span > span { display: block; color: var(--primary-text); font-size: var(--font-supporting); margin-top: 6px; }
.chat-meal-options .icon { width: 18px; height: 18px; }
.chat-task .voice-order-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--space-content); margin: 12px 0 0; overflow-wrap: anywhere; }
.voice-order-card h3 { font-size: var(--font-body); line-height: 1.45; margin-bottom: 8px; }
.voice-order-card p { font-size: var(--font-supporting); line-height: 1.6; margin-top: 8px; }
.voice-order-card .secondary-button { width: 100%; min-height: 56px; margin-top: 12px; font-size: var(--font-body); }
.voice-food { display: flex; align-items: center; gap: 12px; }
.voice-food img { flex-shrink: 0; width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-control); }
.voice-food > div { min-width: 0; }
.voice-food h3 { margin: 0; }
.voice-arrangement { color: var(--primary-text); font-weight: 500; }
.voice-fees { margin: 12px 0 0; }
.voice-fees > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; padding: 8px 0; font-size: var(--font-supporting); }
.voice-fees dt { color: var(--text-secondary); }
.voice-fees dd { min-width: 0; margin: 0 0 0 auto; text-align: right; overflow-wrap: anywhere; }
.voice-fees > div:last-child { font-weight: 600; border-top: 1px solid var(--border); color: var(--primary-text); margin-top: 8px; padding-top: 12px; font-size: 1.375rem; }
.voice-coupon { display: flex; align-items: flex-start; gap: 8px; min-height: 56px; padding-block: 12px; font-size: var(--font-supporting); }
.voice-coupon input { width: 24px; height: 24px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--primary-text); }
.voice-muted { font-size: var(--font-supporting); line-height: 1.6; color: var(--text-secondary); margin-top: 12px; }
.voice-field { display: flex; flex-direction: column; gap: 8px; font-size: var(--font-supporting); font-weight: 500; margin: 16px 0; }
.voice-field input, .voice-field select { width: 100%; min-width: 0; min-height: 64px; padding: 12px; background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius-control); font: inherit; font-size: var(--font-body); color: var(--text); font-weight: 400; }
.voice-edit-form > button { width: 100%; margin-top: 12px; font-size: var(--font-body); }
.voice-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.voice-suggestions button { min-height: 56px; min-width: 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-control); color: var(--primary-text); font-size: var(--font-supporting); line-height: 1.5; }
.voice-suggestions button[aria-pressed="true"] { border-color: var(--primary-text); background: var(--surface-tint); font-weight: 600; }
.chat-thinking { color: var(--text-secondary); padding-left: 46px; font-size: var(--font-supporting); }
.chat-success { text-align: center; }
.chat-success > span { display: inline-flex; color: var(--green); margin: 8px 0; }
.chat-success > span .icon { width: 36px; height: 36px; }
.chat-composer { flex-shrink: 0; border-top: 1px solid var(--border); padding: 8px var(--page-gutter) max(8px, var(--safe-area-bottom)); background: var(--surface-tint); }
.chat-composer .voice-status:not(.sr-only) { margin: 4px 0 12px; font-size: var(--font-supporting); color: var(--rose); line-height: 1.5; overflow-wrap: anywhere; }
.chat-compose-row { display: flex; align-items: stretch; gap: 8px; }
.chat-input-mode { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 56px; min-height: 64px; flex-shrink: 0; padding: 4px 0; background: var(--background); color: var(--text-secondary); border-radius: var(--radius-control); font-size: var(--font-supporting); line-height: 1.5; overflow-wrap: anywhere; }
.chat-input-mode .icon { width: 24px; height: 24px; }
.chat-mic { display: flex; align-items: center; justify-content: center; gap: 10px; flex: 1; min-width: 0; min-height: 64px; padding: 12px; background: var(--primary-action); border: 1px solid transparent; color: var(--on-primary); border-radius: var(--radius-control); font-size: var(--font-body); line-height: 1.5; font-weight: 600; }
.chat-mic[data-state="listening"] { background: var(--primary-pressed); border-color: var(--primary-text); }
.chat-mic[data-state="starting"] { border-color: var(--primary-text); }
.chat-mic > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.chat-text-form { display: flex; align-items: center; flex: 1; min-width: 0; min-height: 64px; padding: 3px; background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius-control); }
.chat-text-form input { width: 100%; min-width: 0; min-height: 56px; padding: 10px 8px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: var(--font-body); color: var(--text); }
.chat-text-form input::placeholder { color: var(--text-secondary); opacity: 1; }
.chat-text-form > button { display: flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 56px; min-height: 56px; padding: 8px; border-radius: 8px; color: var(--on-primary); background: var(--primary-action); font-size: var(--font-supporting); font-weight: 600; line-height: 1.5; }
.chat-live { display: flex; align-items: flex-start; gap: 10px; max-height: 28dvh; overflow-y: auto; margin: 4px 0 8px; padding: 12px; border-radius: var(--radius-control); background: var(--surface-tint); }
.chat-live p { font-size: var(--font-body); line-height: 1.6; overflow-wrap: anywhere; }
.chat-live-dot { flex-shrink: 0; width: 8px; height: 8px; background: var(--primary-text); border-radius: 50%; margin-top: 12px; }
.chat-wave { display: inline-flex; align-items: center; justify-content: center; height: 28px; gap: 3px; width: 28px; flex-shrink: 0; }
.chat-wave i { width: 3px; height: 12px; border-radius: 2px; background: currentColor; animation: chat-wave .9s ease-in-out infinite alternate; }
.chat-wave i:nth-child(2), .chat-wave i:nth-child(4) { animation-delay: .15s; height: 20px; }
.chat-wave i:nth-child(3) { animation-delay: .3s; height: 26px; }
.chat-order-address { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.chat-order-address > strong { font-size: var(--font-supporting); }
body.large-text .chat-avatar { display: none; }
body.large-text .chat-message-user { margin-left: 20px; }
body.large-text .chat-suggestions { grid-template-columns: minmax(0, 1fr); }
body.large-text .chat-meal-options > button { flex-wrap: wrap; }
body.large-text .chat-meal-options button > span { flex-basis: calc(100% - 94px); }
body.extra-large-text .chat-meal-options img, body.extra-large-text .voice-food img { width: 56px; height: 56px; }
body.extra-large-text .voice-food { flex-direction: column; align-items: flex-start; }
body.extra-large-text .chat-input-mode { width: 72px; }
@keyframes chat-wave { to { transform: scaleY(.4); } }
@media (max-width: 360px) {
  .chat-conversation { padding-inline: 16px; }
  .chat-suggestions { grid-template-columns: minmax(0, 1fr); }
  .chat-meal-options > button { flex-wrap: wrap; }
  .chat-meal-options button > span { flex-basis: calc(100% - 94px); }
  .chat-composer { padding-inline: 16px; }
  .voice-food { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .chat-wave i { animation: none; } }

.chat-suggestions button:active, .chat-meal-options > button:active, .voice-suggestions button:active { background: var(--surface-tint); border-color: var(--primary-text); }
.chat-mic:active:not(:disabled), .chat-text-form > button:active:not(:disabled) { background: var(--primary-pressed); }
.chat-text-form > button:disabled { background: var(--disabled-surface); color: var(--text-secondary); cursor: wait; }
