/* Digiti · Sistema de temas tonales y diseño de pantalla completa (100dvh) */

:root,
body[data-theme="lima"] {
  --bg: #E4E7EA;
  --key: #EFF1F3;
  --key-op: #D6DBE0;
  --accent: #5E7A92;
  --text: #2C333A;
  --text-muted: #58636E;
  --shadow: 0 2px 5px rgba(44, 51, 58, 0.08);
  --text-on-accent: #FFFFFF;
}

body[data-theme="salvia"] {
  --bg: #E3E8E1;
  --key: #EEF2EC;
  --key-op: #D5DED2;
  --accent: #6E8F6A;
  --text: #2F3A2E;
  --text-muted: #566654;
  --shadow: 0 2px 5px rgba(47, 58, 46, 0.08);
  --text-on-accent: #1E261D;
}

body[data-theme="arena"] {
  --bg: #EFE8DD;
  --key: #F7F2EA;
  --key-op: #E6DCCD;
  --accent: #B07D3F;
  --text: #3B3127;
  --text-muted: #6B5B49;
  --shadow: 0 2px 5px rgba(59, 49, 39, 0.08);
  --text-on-accent: #241C14;
}

body[data-theme="michi"] {
  --bg: #F4E8E6;
  --key: #FBF4F2;
  --key-op: #EBD8D4;
  --accent: #C98585;
  --text: #4A3A3A;
  --text-muted: #7A6060;
  --shadow: 0 2px 5px rgba(74, 58, 58, 0.08);
  --text-on-accent: #2E1F1F;
}

body[data-theme="noche"] {
  --bg: #1F2128;
  --key: #282B33;
  --key-op: #31353F;
  --accent: #C9A66B;
  --text: #E6E2DA;
  --text-muted: #9E9B95;
  --shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  --text-on-accent: #1F2128;
}

/* Formas y escala del teclado */
body {
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --radius-key: 0.85rem;
  --key-font-size: 1.3rem;
}

body[data-key-shape="rounded"] {
  --radius-key: 0.85rem;
}
body[data-key-shape="pill"] {
  --radius-key: 999px;
}
body[data-key-shape="square"] {
  --radius-key: 0.35rem;
}

body[data-keypad-scale="large"] {
  --key-font-size: 1.55rem;
}

/* Reset estricto contra desbordamiento horizontal */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  transition: background-color 0.18s ease, color 0.18s ease;
}

button, input, select {
  font: inherit;
  color: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Contenedor principal de pantalla completa sin scroll */
.app-shell {
  width: 100%;
  max-width: 480px;
  height: 100%;
  margin: 0 auto;
  padding: 0.45rem 0.65rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  min-height: 0;
}

@media (min-width: 800px) {
  .app-shell {
    max-width: 520px;
    padding: 0.85rem 1rem;
    gap: 0.6rem;
  }
  .app-shell:has(.workspace.with-side-panel) {
    max-width: 960px;
  }
}

/* Cabecera compacta */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.brand-logo {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  background: var(--key-op);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.brand-text-wrap {
  min-width: 0;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.save-indicator {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.top-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 0.65rem;
  background: var(--key);
  color: var(--text);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.14s ease;
}

.top-icon-btn:hover {
  background: var(--key-op);
}

/* Área de trabajo */
.workspace {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0.75rem;
}

@media (min-width: 800px) {
  .workspace.with-side-panel {
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  }
}

/* Columna principal de calculadora */
.calc-card {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

/* Mascota Michi (exclusiva del tema Michi Pastel) */
.michi-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
  margin-bottom: -0.25rem;
  z-index: 2;
}

.michi-stage[hidden] {
  display: none;
}

.michi-avatar-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.michi-svg {
  width: 86px;
  height: 46px;
  overflow: visible;
}

.michi-eyes-happy,
.michi-eyes-surprised {
  display: none;
}

.michi-stage[data-mood="happy"] .michi-eyes-normal,
.michi-stage[data-mood="love"] .michi-eyes-normal {
  display: none;
}
.michi-stage[data-mood="happy"] .michi-eyes-happy,
.michi-stage[data-mood="love"] .michi-eyes-happy {
  display: block;
}

.michi-stage[data-mood="surprised"] .michi-eyes-normal {
  display: none;
}
.michi-stage[data-mood="surprised"] .michi-eyes-surprised {
  display: block;
}

.michi-stage[data-mood="listening"] .michi-ear-left {
  transform: rotate(-8deg);
  transform-origin: 55px 40px;
}
.michi-stage[data-mood="listening"] .michi-ear-right {
  transform: rotate(8deg);
  transform-origin: 125px 40px;
}

.michi-bubble {
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--key);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pantalla de resultado tonal */
.display-panel {
  background: var(--key);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.mini-tape {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-height: 2.5rem;
  overflow-y: auto;
  min-width: 0;
}

.mini-tape:empty {
  display: none;
}

.mini-tape-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.1rem 0.2rem;
  border-radius: 0.3rem;
  font-variant-numeric: tabular-nums;
  width: 100%;
  min-width: 0;
}

.mini-tape-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.mini-tape-item strong {
  flex-shrink: 0;
}

.mini-tape-item:hover {
  background: var(--key-op);
  color: var(--text);
}

.voice-status-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
  background: var(--key-op);
  padding: 0.25rem 0.55rem;
  border-radius: 0.45rem;
  min-width: 0;
}

.voice-status-bar[hidden] {
  display: none;
}

#voice-transcript-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.voice-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulseDot 1.1s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.45; }
}

.expression-row {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.expression-input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  padding: 0.1rem 0;
}

.expression-input:focus {
  outline: none;
  color: var(--text);
}

/* Fila principal del resultado con el micrófono circular al lado */
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}

/* Botón de micrófono circular con color --accent */
.btn-voice-circle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.btn-voice-circle:active {
  transform: scale(0.95);
}

.btn-voice-circle.is-listening {
  animation: micPulse 1.3s infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.result-value-group {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35rem;
  overflow: hidden;
}

.result-equals-sign {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.result-output {
  min-width: 0;
  text-align: right;
  font-size: clamp(1.6rem, 6.2vw, 2.25rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.result-output::-webkit-scrollbar {
  display: none;
}

.btn-copy-result {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 0.5rem;
  background: var(--key-op);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calc-error-msg {
  font-size: 0.76rem;
  color: var(--text);
  background: var(--key-op);
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-error-msg[hidden] {
  display: none;
}

/* Fila única de atajos con desplazamiento horizontal */
.quick-buttons-strip {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  padding: 0.1rem 0.05rem;
  scrollbar-width: none;
}

.quick-buttons-strip::-webkit-scrollbar {
  display: none;
}

.quick-btn,
.btn-shortcut-add {
  min-height: 40px;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: var(--key-op);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform 0.1s ease, background-color 0.14s ease;
}

.btn-shortcut-add {
  background: var(--key);
  color: var(--text-muted);
}

.quick-btn:hover,
.btn-shortcut-add:hover {
  background: var(--key);
  color: var(--text);
}

.quick-btn:active {
  transform: scale(0.96);
}

/* Panel científico */
.scientific-pad {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.32rem;
  flex-shrink: 0;
  min-width: 0;
  width: 100%;
}

.scientific-pad[hidden] {
  display: none;
}

/* Teclado principal: ocupa el espacio restante en 100dvh */
.main-keypad {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 0.42rem;
}

.calc-key {
  width: 100%;
  height: 100%;
  min-height: 44px;
  min-width: 0;
  border-radius: var(--radius-key);
  font-size: var(--key-font-size);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  user-select: none;
  transition: transform 0.08s ease, filter 0.12s ease;
}

.calc-key:active {
  transform: translateY(1.5px);
}

.key-num {
  background: var(--key);
  color: var(--text);
}

.key-action {
  background: var(--key-op);
  color: var(--text);
  font-size: 1rem;
}

/* Los operadores usan --key-op con el símbolo en --accent */
.key-op {
  background: var(--key-op);
  color: var(--accent);
  font-size: calc(var(--key-font-size) * 1.18);
  font-weight: 800;
}

.key-sci {
  min-height: 38px;
  height: 38px;
  background: var(--key-op);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

/* El acento se usa solo en "=" y en el micrófono */
.key-equal {
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: calc(var(--key-font-size) * 1.22);
  font-weight: 800;
}

/* Panel lateral / Cajón de Tira Viva Editable */
.side-panel {
  background: var(--key);
  border-radius: 1.1rem;
  box-shadow: var(--shadow);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.side-panel[hidden] {
  display: none;
}

@media (max-width: 799px) {
  .side-panel {
    position: fixed;
    inset: 0.5rem;
    z-index: 45;
    height: auto;
  }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.panel-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-close-modal {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 0.6rem;
  background: var(--key-op);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.natural-phrase-form {
  display: flex;
  gap: 0.4rem;
  min-width: 0;
}

.natural-phrase-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 0.65rem;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-size: 0.84rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.history-empty {
  text-align: center;
  padding: 1.5rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.history-card {
  background: var(--bg);
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.history-spoken-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-style: italic;
}

.history-main-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.history-expr-text {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  word-break: break-all;
  min-width: 0;
}

.history-result-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}

.history-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.history-edit-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.25rem;
  min-width: 0;
}

/* Botones de paneles y modales */
.btn-secondary,
.btn-secondary-small,
.btn-secondary-danger,
.btn-primary-small {
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.btn-secondary,
.btn-secondary-small {
  background: var(--key-op);
  color: var(--text);
}

.btn-secondary-danger {
  background: var(--key-op);
  color: var(--text);
}

.btn-primary-small {
  background: var(--accent);
  color: var(--text-on-accent);
  font-weight: 700;
}

.panel-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.35rem;
}

.file-label-btn {
  cursor: pointer;
}

/* Modales */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 30, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  z-index: 60;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  background: var(--key);
  border-radius: 1.15rem;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 580px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.modal-card-narrow {
  max-width: 440px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

/* Lista de opciones en el modal de cabecera */
.options-list {
  gap: 0.65rem;
}

.option-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg);
  padding: 0.65rem 0.8rem;
  border-radius: 0.75rem;
  min-width: 0;
}

.option-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.option-item-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.option-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-option-toggle {
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 0.6rem;
  background: var(--key-op);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.btn-option-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: var(--text-on-accent);
}

/* Secciones de personalización y tarjetas de temas con mini vista previa */
.custom-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.section-heading {
  font-size: 0.9rem;
  font-weight: 700;
}

.section-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.theme-card {
  padding: 0.65rem;
  border-radius: 0.75rem;
  border: 2px solid transparent;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  text-align: left;
  box-shadow: var(--shadow);
  min-width: 0;
}

.theme-card.is-selected {
  border-color: var(--accent);
}

.theme-swatches {
  display: flex;
  width: 100%;
  height: 22px;
  border-radius: 0.4rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.theme-swatches .swatch {
  flex: 1;
  height: 100%;
}

.theme-card-title {
  font-size: 0.84rem;
  font-weight: 700;
}

.theme-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.custom-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.6rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  min-width: 0;
}

.custom-select, .custom-input {
  min-height: 44px;
  padding: 0 0.65rem;
  border-radius: 0.6rem;
  border: none;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  min-width: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  min-height: 44px;
  cursor: pointer;
}

.checkbox-row input {
  width: 1.1rem;
  height: 1.1rem;
}

.helper-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.shortcut-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.4rem;
}

@media (max-width: 520px) {
  .shortcut-form {
    grid-template-columns: 1fr;
  }
}

.custom-shortcuts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.shortcut-manage-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.78rem;
}

.shortcut-delete-btn {
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  color: var(--text);
  font-weight: 700;
}

/* Modal Acerca de */
.about-body {
  font-size: 0.86rem;
  color: var(--text);
}

.about-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--key-op);
  color: var(--text);
  font-weight: 700;
  font-size: 0.76rem;
}

.privacy-box, .voice-tips-box {
  background: var(--bg);
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.box-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.privacy-box h3, .voice-tips-box h3 {
  font-size: 0.86rem;
  color: var(--text);
}

.voice-tips-box ul {
  padding-left: 1.15rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: space-between;
}

/* Avisos flotantes */
.update-banner, .global-toast {
  position: fixed;
  top: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: var(--key);
  border: 2px solid var(--accent);
  color: var(--text);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: calc(100vw - 1.5rem);
}

.update-banner[hidden], .global-toast[hidden] {
  display: none;
}

.btn-small-accent {
  min-height: 36px;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
