:root {
  --cream: #F0EADD;
  --mint: #B2D9C4;
  --sand: #ECE2CC;
  --white: #FEFEFC;
  --charcoal: #33322D;
  --sage: #58574E;
  --coral: #EFB89C;
  --coral-dark: #D99B7E;
  --aqua: #B7DBD6;
  --aqua-dark: #8CBDB7;
  --danger: #D64F4F;
  --danger-bg: #F6D7D7;
  --line: #D8CCB4;
  --shadow-sm: 0 2px 8px rgba(51, 50, 45, .06);
  --shadow-md: 0 6px 18px rgba(51, 50, 45, .08);
  --shadow-lg: 0 14px 40px rgba(51, 50, 45, .14);
  --shadow: var(--shadow-md);
  --radius: 20px;

  /* legacy aliases kept for compatibility */
  --primary: var(--coral);
  --primary-dark: var(--coral-dark);
  --teal: var(--aqua);
  --ink: var(--charcoal);
  --muted: var(--sage);
  --surface: var(--sand);
  --canvas: var(--cream);
}

* { box-sizing: border-box; }
html { background: var(--cream); color: var(--charcoal); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--cream) 0%, var(--mint) 100%);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--sage); margin: .25rem 0; line-height: 1.55; }
.eyebrow { margin: 0 0 .3rem; color: var(--coral-dark); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow-light { color: rgba(255,255,255,.78); }

.login-view { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, rgba(178,217,196,.55) 0, var(--cream) 52%, var(--sand) 100%); }
.login-card { width: min(100%, 390px); padding: 32px 24px; background: rgba(254,254,252,.96); border: 1px solid var(--white); border-radius: 28px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-size: clamp(1.7rem, 8vw, 2.2rem); line-height: 1.1; }
.brand-mark { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 20px; background: var(--coral); color: var(--charcoal); font-size: 2rem; box-shadow: 0 10px 20px rgba(239,184,156,.34); }
.stack { display: grid; gap: 16px; margin-top: 24px; }

label { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: var(--sage); font-size: .86rem; font-weight: 700; }
.label-text { display: block; }
input, select, textarea { width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; outline: none; color: var(--charcoal); background: var(--white); font-size: 16px; }
textarea { resize: vertical; }
input[type="number"] { font-variant-numeric: tabular-nums; }
input:focus, select:focus, textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(239,184,156,.22); }
.required, .form-error { color: var(--danger); }
.form-error { min-height: 1.2em; margin: 8px 0; font-size: .86rem; }

.primary-button, .secondary-button, .danger-button { min-height: 48px; padding: 11px 18px; border: 0; border-radius: 13px; font-weight: 800; }
.primary-button { width: 100%; color: var(--charcoal); background: var(--coral); box-shadow: 0 8px 18px rgba(239,184,156,.28); }
.primary-button:hover { background: var(--coral-dark); }
.primary-button:active, .secondary-button:active, .danger-button:active { transform: translateY(1px); box-shadow: none; }
.secondary-button { color: var(--charcoal); background: var(--aqua); }
.danger-button { color: var(--danger); background: var(--danger-bg); }
.text-button { min-height: 44px; padding: 6px 0; border: 0; color: var(--coral-dark); background: transparent; font-weight: 800; }
.icon-button { width: 48px; height: 48px; border: 0; border-radius: 16px; display: grid; place-items: center; color: var(--coral-dark); background: var(--white); font-size: 1.8rem; box-shadow: 0 8px 18px rgba(51,50,45,.1); }
.icon-button.dark { color: var(--charcoal); background: var(--sand); box-shadow: none; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 94px; padding: calc(14px + env(safe-area-inset-top)) 20px 14px; color: var(--charcoal); background: var(--mint); box-shadow: 0 5px 18px rgba(51,50,45,.12); }
.topbar h1 { margin: 0; font-size: 1.4rem; }
.content { width: min(100%, 1040px); margin: 0 auto; padding: 20px 16px calc(98px + env(safe-area-inset-bottom)); }
.view { display: none; }
.view.active { display: block; animation: reveal .2s ease-out; }
@keyframes reveal { from { opacity: .5; transform: translateY(4px); } }

.welcome-row, .section-heading, .dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.welcome-row h2, .section-heading h2, .settings-card h3 { margin: 0; }
.date-chip, .badge { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: var(--charcoal); background: var(--coral); font-size: .78rem; font-weight: 800; }
.badge { color: var(--charcoal); background: var(--aqua); }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.stat-card { min-height: 105px; padding: 17px; border: 1px solid rgba(254,254,252,.7); border-radius: 18px; background: var(--sand); box-shadow: 0 6px 18px rgba(51,50,45,.06); }
.stat-card strong { display: block; margin-top: 9px; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.stat-card span { color: var(--sage); font-size: .84rem; }
.stat-ico { display: inline-flex; width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; color: var(--coral-dark); }
.stat-ico svg { width: 18px; height: 18px; }
.panel { margin: 16px 0; padding: 17px; border-radius: var(--radius); background: var(--sand); box-shadow: 0 6px 18px rgba(51,50,45,.05); }

.item-list, .item-grid { display: grid; gap: 12px; margin-top: 14px; }
.item-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.item-card { min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 16px 11px 12px; border: 1px solid var(--line); border-radius: 17px; color: inherit; background: var(--cream); box-shadow: var(--shadow-sm); text-align: left; }
.item-card { animation: cardIn .28s ease-out both; will-change: transform; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.item-card:hover { border-color: var(--coral); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.item-card:active { transform: translateY(0); }
.item-card.is-low { border-left: 4px solid var(--danger); }
/* 左滑出编辑/删除操作 */
.item-card-wrap { position: relative; overflow: hidden; border-radius: 17px; }
.card-actions { position: absolute; top: 0; right: 0; bottom: 0; display: flex; }
.card-action { width: 56px; border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; }
.card-action svg { width: 22px; height: 22px; }
.card-action.edit { background: var(--aqua); }
.card-action.delete { background: var(--danger); }
.item-card { position: relative; z-index: 1; transition: transform .22s cubic-bezier(.2, .8, .2, 1); touch-action: pan-y; will-change: transform; }
@media (hover: hover) and (pointer: fine) {
  .item-card-wrap:hover .item-card { transform: translateX(-112px); border-color: var(--coral); box-shadow: var(--shadow-md); }
}
.item-thumb { width: 76px; height: 76px; object-fit: cover; border-radius: 13px; background: var(--sand); }
.item-thumb.placeholder { display: grid; place-items: center; color: var(--sage); font-size: 1.6rem; }
.item-thumb.placeholder svg { width: 34px; height: 34px; }
.item-card h3 { overflow: hidden; margin: 0 0 5px; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { margin: 2px 0; color: var(--sage); font-size: .8rem; }
.item-body { min-width: 0; }
.item-meta.item-stock { font-weight: 800; color: var(--charcoal); font-variant-numeric: tabular-nums; }
.item-sub { display: block; margin-top: 3px; color: var(--sage); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-indicators { display: flex; align-items: center; gap: 8px; }
.stock-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(0,0,0,.04); }
.stock-dot.lvl-red { background: #D64F4F; }
.stock-dot.lvl-yellow { background: #DDA63E; }
.stock-dot.lvl-green { background: #4A9B6E; }
.expiry-badge { font-size: .72rem; font-weight: 800; color: var(--danger); border: 1.5px solid var(--danger); border-radius: 999px; padding: 2px 8px; line-height: 1; white-space: nowrap; }
.status-expiring { color: #8a5a16; background: var(--coral); }
.empty-state { display: grid; gap: 10px; justify-items: center; padding: 38px 14px; border: 1px dashed var(--line); border-radius: 18px; color: var(--sage); text-align: center; }
.empty-ico { width: 46px; height: 46px; color: var(--coral-dark); opacity: .9; }
.empty-ico svg { width: 46px; height: 46px; }
.empty-text { margin: 0; font-size: .9rem; line-height: 1.5; }

.search-box { display: flex; align-items: center; gap: 9px; margin: 14px 0; padding: 0 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.search-box input { border: 0; box-shadow: none; padding-left: 0; }
.filter-grid, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.filter-grid { margin-bottom: 16px; }
.item-form { margin-top: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.photo-picker { width: 100%; min-height: 210px; margin-bottom: 16px; overflow: hidden; border: 2px dashed var(--line); border-radius: 22px; color: var(--sage); background: var(--white); }
.photo-picker span { display: grid; gap: 7px; }
.photo-picker small { font-weight: 400; }
.photo-picker img { width: 100%; height: 240px; object-fit: cover; }

.settings-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 0; padding: 18px; border-radius: var(--radius); background: var(--white); box-shadow: 0 6px 18px rgba(51,50,45,.05); }
.settings-card > div { min-width: 0; }

.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 6px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(254,254,252,.96); backdrop-filter: blur(12px); }
.nav-button { min-width: 0; min-height: 54px; border: 0; display: grid; place-items: center; gap: 2px; color: var(--sage); background: transparent; font-size: .73rem; font-weight: 700; }
.nav-button span { font-size: 1.35rem; line-height: 1; }
.nav-button.active { color: var(--coral-dark); background: rgba(239,184,156,.22); border-radius: 14px; }
.nav-ico { width: 22px; height: 22px; }
.search-ico { width: 18px; height: 18px; color: var(--sage); flex: 0 0 auto; }
.icon-button svg { width: 24px; height: 24px; }
.brand-mark svg { width: 34px; height: 34px; }

.item-dialog { width: min(calc(100% - 28px), 620px); max-height: calc(100dvh - 28px); padding: 20px; overflow: auto; border: 0; border-radius: 24px; box-shadow: 0 24px 80px rgba(51,50,45,.3); background: var(--sand); }
.item-dialog::backdrop { background: rgba(51,50,45,.48); backdrop-filter: blur(3px); }
.detail-image { width: 100%; max-height: 360px; margin: 14px 0; object-fit: cover; border-radius: 18px; background: var(--sand); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.detail-field { min-width: 0; padding: 12px; border-radius: 13px; background: var(--white); }
.detail-field b { display: block; margin-bottom: 4px; color: var(--sage); font-size: .73rem; }
.detail-field span { overflow-wrap: anywhere; }
.detail-field.full { grid-column: 1 / -1; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

.toast { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; z-index: 100; max-width: calc(100% - 28px); padding: 11px 16px; border-radius: 999px; color: var(--white); background: var(--charcoal); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, -15px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.tabs { display: flex; gap: 8px; margin: 14px 0; }
.tab { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--sage); font-weight: 800; font-size: .86rem; }
.tab.active { color: var(--charcoal); background: var(--coral); border-color: var(--coral); }
.batch-grid { display: grid; gap: 12px; margin: 14px 0; }
.batch-row { display: grid; grid-template-columns: 2fr 1.2fr 1.2fr auto 1fr 1.2fr 1.2fr auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.batch-row input, .batch-row select { min-height: 42px; padding: 8px 10px; font-size: 14px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--white); }
.stepper button { width: 38px; min-height: 42px; border: 0; background: var(--sand); color: var(--coral-dark); font-size: 1.25rem; font-weight: 800; line-height: 1; }
.stepper button:active { background: var(--line); }
.stepper input { width: 54px; text-align: center; border: 0; box-shadow: none; min-height: 42px; padding: 0; }
.stepper input:focus { box-shadow: none; }
.batch-remove { width: 40px; min-height: 42px; border: 0; border-radius: 10px; color: var(--danger); background: var(--danger-bg); font-size: 1.2rem; }
.batch-remove:hover { background: #EBC5C5; }
.reveal-wrap { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .25s ease, opacity .25s ease; }
.reveal-wrap.open { max-height: 90px; opacity: 1; }

@media (max-width: 480px) {
  .content { padding-right: 14px; padding-left: 14px; }
  .filter-grid, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .item-grid { grid-template-columns: 1fr; }
  .item-card { grid-template-columns: 68px minmax(0, 1fr) auto; }
  .item-thumb { width: 68px; height: 68px; }
  .settings-card { align-items: stretch; flex-direction: column; }
  .settings-card button { width: 100%; }
  .photo-picker img { height: 210px; }
  .batch-row { grid-template-columns: 1fr 1fr; padding: 14px; border-radius: 18px; box-shadow: var(--shadow-sm); gap: 10px; }
  .batch-row .batch-name, .batch-row .batch-unit, .batch-row .stepper, .batch-row .batch-remove { grid-column: 1 / -1; }
  .stepper { width: 100%; justify-content: space-between; }
  .stepper input { flex: 1; width: auto; }
}

@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .topbar { padding-right: max(24px, calc((100% - 1040px) / 2)); padding-left: max(24px, calc((100% - 1040px) / 2)); }
  .bottom-nav { right: 50%; left: auto; width: 520px; transform: translateX(50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

/* ===== 扫码自动填写 ===== */
.scan-trigger { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin: 4px 0 16px; border: 1.5px solid var(--coral-dark); border-radius: 16px; background: var(--white); color: var(--coral-dark); font-weight: 800; font-size: .98rem; }
.scan-trigger svg { width: 20px; height: 20px; }
.scan-trigger:active { background: rgba(239,184,156,.18); }

.scan-dialog { width: min(calc(100% - 24px), 560px); max-height: calc(100dvh - 24px); padding: 18px; overflow: auto; border: 0; border-radius: 24px; box-shadow: var(--shadow-lg); background: var(--sand); }
.scan-dialog::backdrop { background: rgba(51,50,45,.5); backdrop-filter: blur(3px); }
.scan-dialog .dialog-header { display: flex; align-items: center; gap: 8px; }
.scan-dialog .dialog-header h2 { flex: 1; margin: 0; }

.scan-stage { position: relative; margin: 12px 0; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; border-radius: 18px; background: var(--charcoal); }
.scan-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }

.scan-reticle { position: absolute; inset: 20% 16%; border: 3px solid var(--coral); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(51,50,45,.42); pointer-events: none; }
.scan-reticle::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 2px; background: rgba(255,255,255,.55); animation: scan-beam 1.8s ease-in-out infinite; }
.scan-reticle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; border: 2px solid var(--coral); border-radius: 50%; transform: translate(-50%, -50%); opacity: .6; }

@keyframes scan-beam {
  0% { top: 5%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 95%; opacity: 0; }
}

#scan-status { min-height: 1.6em; text-align: center; color: var(--sage); transition: color .2s; }
#scan-status.scanning { color: var(--coral-dark); }

.torch-button svg { width: 20px; height: 20px; }
.torch-button.active { color: var(--coral); }

.scan-manual { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.scan-manual summary { cursor: pointer; font-weight: 700; color: var(--sage); }
.scan-manual-row { display: flex; gap: 8px; margin-top: 10px; }
.scan-manual-row input { flex: 1; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }

/* 扫码诊断区 */
.scan-diag { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.scan-diag summary { cursor: pointer; font-weight: 700; color: var(--sage); }
.scan-diag-log { width: 100%; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--sand); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.5; color: var(--charcoal); resize: vertical; }
.scan-diag .secondary-button { margin-top: 8px; width: 100%; }

/* 录入表单内的可见条形码栏 */
.barcode-row { display: flex; gap: 8px; align-items: stretch; }
.barcode-input { flex: 1; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-size: 1rem; letter-spacing: .05em; }
.barcode-input:focus { outline: none; border-color: var(--coral-dark); box-shadow: 0 0 0 3px rgba(239,184,156,.25); }
.scan-inline { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border: 1.5px solid var(--coral-dark); border-radius: 12px; background: var(--white); color: var(--coral-dark); font-weight: 800; font-size: .95rem; }
.scan-inline svg { width: 20px; height: 20px; }
.scan-inline:active { background: rgba(239,184,156,.18); }

/* 批量连扫弹层内的操作条 */
.scan-batch-bar { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; flex-wrap: wrap; }
.scan-batch-bar.hidden { display: none; }
.scan-batch-count { flex: 1 1 auto; font-weight: 700; font-size: .98rem; }
.scan-batch-bar .secondary-button,
.scan-batch-bar .primary-button { flex: 0 0 auto; padding: 10px 14px; }

/* AI 拍照识别 */
.ai-button { width: 100%; min-height: 52px; margin: 4px 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; font-weight: 800; font-size: 1.02rem; color: var(--white); background: linear-gradient(135deg, #7c5cff 0%, #b066ff 100%); box-shadow: 0 6px 16px rgba(124,92,255,.28); }
.ai-button:active { transform: translateY(1px); box-shadow: none; }
.ai-button:disabled { opacity: .6; }
.ai-spark { font-size: 1.15rem; }
.ai-hint { margin: 0 0 14px; padding: 10px 12px; border: 1px dashed var(--coral-dark); border-radius: 12px; background: rgba(239,184,156,.12); color: var(--charcoal); font-size: .85rem; line-height: 1.5; }

/* 语音输入（合并到录入页名称字段） */
.input-with-voice { position: relative; display: flex; align-items: center; }
.input-with-voice input { padding-right: 46px; }
.voice-mic { position: absolute; right: 6px; width: 34px; height: 34px; border: none; border-radius: 50%; background: var(--aqua); color: #fff; display: grid; place-items: center; cursor: pointer; }
.voice-mic svg { width: 18px; height: 18px; }
.voice-mic:active, .voice-mic.recording { background: var(--coral-dark); }
.voice-mic.recording { animation: voice-pulse 1.1s infinite; }
.voice-mic.hidden { display: none; }
@keyframes voice-pulse {
  0% { box-shadow: 0 0 0 0 rgba(217,155,126,.45); }
  70% { box-shadow: 0 0 0 10px rgba(217,155,126,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,155,126,0); }
}
.voice-sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-radius: 22px 22px 0 0; padding: 10px 22px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 34px rgba(51,50,45,.16); z-index: 60; transform: translateY(110%); transition: transform .28s cubic-bezier(.22,.61,.36,1); }
.voice-sheet.open { transform: translateY(0); }
.voice-sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 14px; }
.voice-status { margin: 0 0 6px; text-align: center; font-weight: 700; color: var(--charcoal); font-size: .95rem; }
.voice-status.recording { color: var(--coral-dark); }
.voice-text { margin: 0 0 14px; min-height: 1.5em; text-align: center; color: var(--sage); font-size: .95rem; line-height: 1.5; word-break: break-word; }
.voice-wave { display: flex; justify-content: center; align-items: center; gap: 5px; height: 34px; margin-bottom: 16px; }
.voice-wave span { width: 5px; height: 10px; border-radius: 3px; background: var(--coral); opacity: .35; }
.voice-wave.active span { animation: voice-bounce 1s infinite ease-in-out; }
.voice-wave.active span:nth-child(2) { animation-delay: .12s; }
.voice-wave.active span:nth-child(3) { animation-delay: .24s; }
.voice-wave.active span:nth-child(4) { animation-delay: .36s; }
.voice-wave.active span:nth-child(5) { animation-delay: .48s; }
@keyframes voice-bounce {
  0%, 100% { height: 10px; opacity: .35; }
  50% { height: 30px; opacity: 1; }
}
.voice-actions { display: flex; gap: 12px; align-items: center; }
.voice-actions .primary-button { flex: 1; min-height: 50px; }
.voice-actions .text-button { flex: 0 0 auto; padding: 0 8px; }
