:root {
  --ui-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.32, 0.64, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --danger: #ff5f57;
  --warn: #ffb84d;
  --ok: #4fd18b;
  --premium: #1ed760;

  /* Valores por defecto (ThemeRuntime los sobrescribe) */
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.5);
  --hairline: rgba(255, 255, 255, 0.12);
  --control: rgba(255, 255, 255, 0.08);
  --control-hover: rgba(255, 255, 255, 0.14);
  --accent: #7cf2c6;
  --accent-contrast: #000;
  --focus: #7cf2c6;
  --glass-fill: rgba(22, 22, 30, 0.26);
  --glass-fill-strong: rgba(24, 24, 32, 0.6);
  --glass-blur: 28px;
  --glass-sat: 1.7;
  --gloss: 0.75;
  --edge: 0.6;
  --shadow: 0.6;
  --r: 30px;

  color-scheme: dark;
  /* Escala tipográfica fluida: teléfono → monitor → TV */
  font-size: clamp(14px, calc(0.5vmin + 10.4px), 26px);
}
[data-tone='light'] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

html, body, #root {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

body {
  font-family: var(--ui-font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
input, textarea, select, .selectable { user-select: text; -webkit-user-select: text; }

button { font-family: inherit; }
a { color: var(--accent); }
code, .mono { font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace; font-size: 0.85em; }
.muted { color: var(--text-3); }
.spacer { flex: 1; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.6rem;
}
[data-contrast='high'] :focus-visible { outline-width: 3px; }

.app { position: fixed; inset: 0; }
.app.hide-cursor, .app.hide-cursor * { cursor: none !important; }

/* Modo noche: atenuación + tono cálido mediante una capa (más barata que filtrar todo). */
.night-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 120, 30, calc(0.1 * var(--night-warm, 0))), rgba(255, 120, 30, calc(0.1 * var(--night-warm, 0)))),
    rgba(0, 0, 0, calc(var(--night-dim, 0) + var(--rest-dim, 0) * (1 - var(--night-dim, 0))));
  mix-blend-mode: normal;
  transition: background 1.6s ease;
}

/* Movimiento reducido: sin animaciones ni transiciones largas. */
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.12s !important;
}

::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 60;
  transform: translateX(-50%);
  padding: 0.7rem 1.2rem;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 550;
  pointer-events: none;
  animation: toast 2.6s var(--ease-out) both;
}
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, 14px) scale(0.94); filter: blur(4px); }
  12%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); filter: none; }
  100% { opacity: 0; transform: translate(-50%, 6px) scale(0.98); }
}
/*
 * Liquid Glass
 * ------------
 * Capas de un panel (de atrás hacia delante):
 *  1. backdrop: desenfoque + saturación + ligero aumento de brillo del fondo (vidrio que concentra luz)
 *  2. relleno: tinte translúcido con degradado vertical (más luz arriba)
 *  3. sombras internas: borde especular superior, lente interior (refracción simulada) y cáustica inferior
 *  4. .glass__rim: borde con iluminación direccional (máscara de 1px)
 *  5. .glass__sheen: reflejo especular que sigue al puntero
 *  6. sombra externa suave para flotar sobre el fondo
 */
.glass {
  position: relative;
  isolation: isolate;
  border-radius: var(--r);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, calc(0.07 * var(--gloss))) 0%, rgba(255, 255, 255, 0) 42%),
    var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(1.04);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(1.04);
  box-shadow:
    /* borde especular superior */
    inset 0 1px 0 0 rgba(255, 255, 255, calc(0.42 * var(--edge))),
    inset 0 -1px 0 0 rgba(255, 255, 255, calc(0.06 * var(--edge))),
    /* lente: luz que se curva en el canto del vidrio */
    inset 1.5px 2px 5px -2px rgba(255, 255, 255, calc(0.38 * var(--gloss))),
    inset -1.5px -2px 6px -2px rgba(255, 255, 255, calc(0.16 * var(--gloss))),
    /* volumen interior */
    inset 0 -14px 28px -22px rgba(0, 0, 0, calc(0.4 * var(--shadow))),
    /* flotación */
    0 1px 2px rgba(0, 0, 0, calc(0.12 * var(--shadow))),
    0 14px 40px -12px rgba(0, 0, 0, calc(0.45 * var(--shadow))),
    0 40px 90px -40px rgba(0, 0, 0, calc(0.5 * var(--shadow)));
  transition:
    transform 0.6s var(--ease-spring),
    box-shadow 0.5s ease,
    background 0.6s ease;
  --mx: 30%;
  --my: 0%;
  --hover: 0;
}

.refraction .glass {
  -webkit-backdrop-filter: url(#lg-refract) blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(1.04);
  backdrop-filter: url(#lg-refract) blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(1.04);
}

.glass--d2 { --shadow-mul: 1.2; }
.glass--d3 { background: linear-gradient(180deg, rgba(255, 255, 255, calc(0.06 * var(--gloss))) 0%, rgba(255, 255, 255, 0) 30%), var(--glass-fill-strong); }

[data-tone='light'] .glass {
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, calc(0.95 * var(--edge))),
    inset 0 -1px 0 0 rgba(255, 255, 255, calc(0.3 * var(--edge))),
    inset 1.5px 2px 5px -2px rgba(255, 255, 255, calc(0.9 * var(--gloss))),
    inset -1.5px -2px 6px -2px rgba(255, 255, 255, calc(0.5 * var(--gloss))),
    0 0 0 0.5px rgba(0, 0, 0, calc(0.08 * var(--edge))),
    0 1px 2px rgba(0, 0, 0, calc(0.06 * var(--shadow))),
    0 14px 40px -14px rgba(20, 20, 40, calc(0.25 * var(--shadow))),
    0 40px 80px -40px rgba(20, 20, 40, calc(0.3 * var(--shadow)));
}

.glass__rim {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background:
    linear-gradient(
      150deg,
      rgba(255, 255, 255, calc(0.55 * var(--edge))) 0%,
      rgba(255, 255, 255, calc(0.12 * var(--edge))) 28%,
      rgba(255, 255, 255, 0) 52%,
      rgba(255, 255, 255, calc(0.08 * var(--edge))) 78%,
      rgba(255, 255, 255, calc(0.3 * var(--edge))) 100%
    );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.glass__sheen {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at var(--mx) var(--my), rgba(255, 255, 255, calc((0.1 + 0.1 * var(--hover)) * var(--gloss))), transparent 60%),
    radial-gradient(120% 60% at 50% 120%, var(--glow, transparent), transparent 70%);
  mix-blend-mode: screen;
  transition: background 0.4s ease;
}
[data-tone='light'] .glass__sheen { mix-blend-mode: soft-light; }

.glass > :not(.glass__rim):not(.glass__sheen) { position: relative; z-index: 3; }

/* Microinteracción: los widgets se elevan levemente al pasar o pulsar. */
.widget { border-radius: var(--r); }
@media (hover: hover) {
  .motion .widget:hover { transform: translateY(-2px) scale(1.006); }
}
.motion .widget:active { transform: scale(0.985); transition-duration: 0.2s; }

/* Sin soporte de backdrop-filter: vidrio más opaco para mantener la legibilidad. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-fill-strong); }
}
/* ---------- Botones de icono ---------- */
.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 0;
  padding: 0;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.35s var(--ease-spring), background 0.25s ease, opacity 0.25s ease, color 0.25s ease;
}
.icon-btn--sm { width: 2.1rem; height: 2.1rem; }
.icon-btn--md { width: 2.6rem; height: 2.6rem; }
.icon-btn--lg { width: 3.1rem; height: 3.1rem; }
.icon-btn--xl { width: 4.2rem; height: 4.2rem; }
.icon-btn--glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, calc(0.4 * var(--edge))), inset 0 0 0 1px var(--hairline), 0 6px 20px -8px rgba(0, 0, 0, calc(0.5 * var(--shadow)));
}
.icon-btn--plain { background: transparent; }
.icon-btn--plain:hover:not(:disabled) { background: var(--control); }
.icon-btn--solid { background: var(--text); color: var(--glass-solid-ink, #0b0b10); }
[data-tone='light'] .icon-btn--solid { color: #fff; }
.icon-btn:hover:not(:disabled) { transform: scale(1.06); }
.icon-btn:active:not(:disabled) { transform: scale(0.9); transition-duration: 0.15s; }
.icon-btn:disabled { opacity: 0.32; cursor: default; }
.icon-btn.is-active { color: var(--accent); }

/* ---------- Botones de texto ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.6rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 99px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-spring), background 0.25s ease, opacity 0.25s ease;
}
.btn--sm { height: 2.2rem; padding: 0 0.9rem; font-size: 0.84rem; }
.btn--primary { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn--secondary { background: var(--control-hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); }
.btn--ghost:hover:not(:disabled) { background: var(--control); }
.btn--danger { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- Secciones y filas ---------- */
.section { display: flex; flex-direction: column; gap: 0.55rem; }
.section__title {
  margin: 0 0 0 0.25rem;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.section__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: calc(var(--r) * 0.6);
  background: var(--control);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.section__footer { margin: 0 0.3rem; font-size: 0.78rem; line-height: 1.45; color: var(--text-3); }
.section__footer code { color: var(--text-2); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.2rem; }
.row.is-disabled { opacity: 0.5; }
.row__text { min-width: 0; display: flex; flex-direction: column; gap: 0.12rem; }
.row__label { font-size: 0.94rem; font-weight: 550; color: var(--text); }
.row__desc { font-size: 0.8rem; line-height: 1.4; color: var(--text-3); }
.field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.field.is-disabled { opacity: 0.5; }
.field__head { display: flex; justify-content: space-between; align-items: baseline; }
.field__value { font-size: 0.82rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.field__desc { margin-top: -0.15rem; }

/* ---------- Interruptor ---------- */
.switch {
  position: relative;
  flex: none;
  width: 3.1rem;
  height: 1.85rem;
  border: 0;
  border-radius: 99px;
  background: var(--track, rgba(120, 120, 128, 0.32));
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.switch[aria-checked='true'] { background: var(--ok); }
.switch__thumb {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transition: transform 0.45s var(--ease-spring), width 0.25s ease;
}
.switch[aria-checked='true'] .switch__thumb { transform: translateX(1.25rem); }
.switch:active .switch__thumb { width: 1.85rem; }
.switch[aria-checked='true']:active .switch__thumb { transform: translateX(0.95rem); }
.switch:disabled { opacity: 0.5; cursor: default; }

/* ---------- Deslizador ---------- */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.6rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --pct: 50%;
}
.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--text) var(--pct), var(--track) var(--pct));
}
.range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--track); }
.range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--text); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: calc(3px - 0.7rem);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s var(--ease-spring);
}
.range::-moz-range-thumb { width: 1.4rem; height: 1.4rem; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--focus); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--focus); }
.range:disabled { cursor: default; opacity: 0.5; }

/* ---------- Control segmentado ---------- */
.segmented {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
  padding: 3px;
  border-radius: 0.85rem;
  background: var(--control);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.segmented__thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / var(--count));
  border-radius: 0.65rem;
  background: var(--control-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, calc(0.3 * var(--edge))), 0 2px 8px -2px rgba(0, 0, 0, 0.3);
  transform: translateX(calc(100% * var(--index)));
  transition: transform 0.5s var(--ease-spring);
}
[data-tone='light'] .segmented__thumb { background: #fff; }
.segmented__opt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0.3rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 550;
  cursor: pointer;
  border-radius: 0.65rem;
  transition: color 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.segmented__opt span { overflow: hidden; text-overflow: ellipsis; }
.segmented__opt.is-on { color: var(--text); font-weight: 650; }

/* ---------- Select ---------- */
.select { position: relative; flex: none; max-width: 60%; }
.select select {
  -webkit-appearance: none;
  appearance: none;
  max-width: 100%;
  height: 2.3rem;
  padding: 0 2rem 0 0.85rem;
  border: 0;
  border-radius: 0.7rem;
  background: var(--control-hover);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 550;
  cursor: pointer;
  text-overflow: ellipsis;
}
.select select option { color: #000; background: #fff; }
.select svg { position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-2); }

/* ---------- Entrada de texto ---------- */
.input {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--control-hover);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: box-shadow 0.2s ease;
  resize: vertical;
}
.input::placeholder { color: var(--text-3); }
.input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.input--mono { font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace; font-size: 0.85rem; }
.input[type='date'], .input[type='time'] { color-scheme: inherit; }

/* ---------- Colores ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.swatch {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 2px 8px -2px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.25s ease;
  overflow: hidden;
}
.swatch svg { mix-blend-mode: difference; }
.swatch:hover { transform: scale(1.1); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--bg-ring, rgba(0, 0, 0, 0.5)), 0 0 0 4px var(--text); }
.swatch--custom { background: conic-gradient(from 0deg, #ff5f5f, #ffa552, #ffe066, #5ee6a0, #5fe3f0, #5aa9ff, #b38cff, #ff8ac6, #ff5f5f); }
.swatch--custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.swatch--custom.is-on::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--c); }
.swatch--custom svg { position: relative; }
.swatch--dynamic { background: linear-gradient(135deg, #ff6b6b, #5aa9ff 50%, #5ee6a0); }

.color-input {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem;
  border-radius: 0.8rem;
  background: var(--control);
  cursor: pointer;
  min-width: 0;
}
.color-input__chip { position: relative; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 0.6rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); overflow: hidden; }
.color-input__chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.color-input__chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.color-input__text { display: flex; flex-direction: column; min-width: 0; }

/* ---------- Insignias, avisos, vacíos ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  height: 1.5rem;
  padding: 0 0.6rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--control-hover);
  color: var(--text-2);
  white-space: nowrap;
}
.badge--premium { background: color-mix(in srgb, var(--premium) 20%, transparent); color: var(--premium); }
[data-tone='light'] .badge--premium { color: #0d8a3e; }
.badge--ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.badge--warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  background: var(--control);
  color: var(--text-2);
  font-size: 0.86rem;
  line-height: 1.4;
}
.notice svg { flex: none; margin-top: 0.05rem; }
.notice span { flex: 1; }
.notice--warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text); }
.notice--warn svg { color: var(--warn); }
.notice__close { border: 0; background: none; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.6rem; padding: 1rem 0.5rem; color: var(--text-2); }
.empty > svg { color: var(--text-3); }
.empty__badge {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1.1rem;
  background: var(--control-hover);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, calc(0.3 * var(--edge))), inset 0 0 0 1px var(--hairline);
}
.empty__title { margin: 0.2rem 0 0; font-size: 1.1rem; font-weight: 650; color: var(--text); }
.empty__text { margin: 0; max-width: 26rem; font-size: 0.9rem; line-height: 1.45; }
.empty--inline { padding: 0.5rem; }

.code-chip {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 0.7rem;
  background: var(--control-hover);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}
.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}
.sheet-layer--corner { place-items: end; padding: 1rem max(1rem, env(safe-area-inset-right)) calc(max(1rem, env(safe-area-inset-bottom)) + 3.6rem) 1rem; }

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  animation: scrim-in 0.5s ease both;
}
[data-tone='light'] .sheet-scrim { background: rgba(240, 240, 245, 0.25); }
.is-closing .sheet-scrim { animation: scrim-out 0.32s ease both; }
@keyframes scrim-in { from { opacity: 0; } }
@keyframes scrim-out { to { opacity: 0; } }

.sheet {
  --r: 34px;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: min(88vh, 60rem);
  border-radius: var(--r);
  overflow: hidden;
  --glass-blur: 56px;
  animation: sheet-in 0.62s var(--ease-spring) both;
}
.sheet--sm { max-width: 27rem; }
.sheet--md { max-width: 34rem; }
.sheet--lg { max-width: 56rem; }
.sheet--xl { max-width: 64rem; height: min(88vh, 50rem); }
.is-closing .sheet { animation: sheet-out 0.32s var(--ease-in-out) both; }

/* Morphing: nace desde el punto tocado con escala + desenfoque. */
@keyframes sheet-in {
  from { opacity: 0; transform: scale(0.86); filter: blur(14px); }
  60% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes sheet-out {
  to { opacity: 0; transform: scale(0.94); filter: blur(10px); }
}

.sheet__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.15rem 0.85rem 1.5rem;
  flex: none;
}
.sheet__grabber { display: none; }
.sheet__titles { flex: 1; min-width: 0; }
.sheet__title { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.sheet__subtitle { margin: 0.1rem 0 0; font-size: 0.82rem; color: var(--text-3); }
.sheet__actions { display: flex; align-items: center; gap: 0.5rem; }
.sheet__actions .icon-btn--glass { background: var(--control-hover); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }

.sheet__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.25rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  scrollbar-width: thin;
}
.sheet__body > * { flex-shrink: 0; }
.sheet__body--flush { padding: 0; overflow: hidden; }
.sheet__body--flush > * { flex-shrink: 1; }

/* Hoja inferior en teléfonos */
@media (max-width: 720px) {
  .sheet-layer, .sheet-layer--corner { place-items: end stretch; padding: 0; padding-top: max(2.5rem, env(safe-area-inset-top)); }
  .sheet { max-width: none; max-height: calc(100dvh - max(2.5rem, env(safe-area-inset-top))); border-radius: var(--r) var(--r) 0 0; padding-bottom: env(safe-area-inset-bottom); transition: transform 0.4s var(--ease-out); }
  .sheet--xl { height: calc(100dvh - max(2.5rem, env(safe-area-inset-top))); }
  .sheet__header { position: relative; padding-top: 1.4rem; touch-action: none; }
  .sheet__grabber { display: block; position: absolute; top: 0.5rem; left: 50%; width: 2.4rem; height: 0.3rem; margin-left: -1.2rem; border-radius: 99px; background: var(--text-3); opacity: 0.6; }
  .sheet__body { padding: 0.25rem 1rem 1.4rem; }
  @keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
}
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
  contain: strict;
  --px: 0;
  --py: 0;
}

.bg > * {
  position: absolute;
  inset: 0;
}

.bg__base {
  inset: calc(-1 * (var(--bg-blur) * 2 + 24px));
  transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -14px), 0);
  transition: transform 1.2s var(--ease-out), background 1.6s ease, filter 1.2s ease;
  filter: blur(var(--bg-blur)) saturate(var(--bg-sat, 1));
}

/* Aurora: degradados radiales grandes (sin filtro blur = barato) que se mueven con transform. */
.bg__aurora {
  filter: saturate(var(--bg-sat, 1));
  transform: translate3d(calc(var(--px) * -24px), calc(var(--py) * -24px), 0);
  transition: transform 1.4s var(--ease-out);
}

.blob {
  position: absolute;
  width: 90vmax;
  height: 90vmax;
  border-radius: 50%;
  opacity: 0.85;
  transition: background 1.6s ease;
}
.is-animated .blob { will-change: transform; }
.blob--a { left: -30vmax; top: -40vmax; }
.blob--b { right: -35vmax; top: -20vmax; width: 80vmax; height: 80vmax; }
.blob--c { left: -10vmax; bottom: -55vmax; width: 100vmax; height: 100vmax; }
.blob--d { right: -20vmax; bottom: -45vmax; width: 70vmax; height: 70vmax; opacity: 0.6; }

.is-animated .blob--a { animation: drift-a 46s ease-in-out infinite alternate; }
.is-animated .blob--b { animation: drift-b 58s ease-in-out infinite alternate; }
.is-animated .blob--c { animation: drift-c 64s ease-in-out infinite alternate; }
.is-animated .blob--d { animation: drift-d 52s ease-in-out infinite alternate; }

@keyframes drift-a { to { transform: translate3d(18vmax, 12vmax, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-16vmax, 18vmax, 0) scale(0.9); } }
@keyframes drift-c { to { transform: translate3d(14vmax, -14vmax, 0) scale(1.1); } }
@keyframes drift-d { to { transform: translate3d(-12vmax, -10vmax, 0) scale(1.2); } }

/* Glow musical basado en la portada. */
.bg__music {
  opacity: 0.35;
  transition: opacity 2s ease;
}
.bg__music.is-playing { opacity: 0.85; }
.bg__music span {
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  transition: background 2s ease;
}
.bg__music span:first-child { left: -20vmax; bottom: -40vmax; }
.bg__music span:last-child { right: -25vmax; top: -35vmax; }
.is-animated .bg__music.is-playing span:first-child { animation: breathe 9s ease-in-out infinite alternate; }
.is-animated .bg__music.is-playing span:last-child { animation: breathe 11s ease-in-out infinite alternate-reverse; }
@keyframes breathe { from { transform: scale(0.94); opacity: 0.8; } to { transform: scale(1.06); opacity: 1; } }

.bg__tint { mix-blend-mode: soft-light; transition: background 3s ease; }

.bg__particles { width: 100%; height: 100%; opacity: 0.7; }

.bg__dim { transition: background 0.8s ease; }

.bg__vignette {
  background: radial-gradient(140% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.35));
}

/* Grano fotográfico estático: integra el fondo y evita bandas en los degradados. */
.bg__grain {
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-tone='light'] .bg__vignette { background: radial-gradient(140% 100% at 50% 40%, transparent 60%, rgba(0, 0, 0, 0.08)); }
.clock {
  --clock-base: clamp(5.5rem, 23vmin, 30rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  min-width: 0;
  opacity: var(--clock-opacity);
  transition: opacity 0.8s ease;
  filter: drop-shadow(0 0.08em 0.6rem rgba(0, 0, 0, 0.14));
}
[data-tone='light'] .clock { filter: drop-shadow(0 0.05em 0.6rem rgba(255, 255, 255, 0.35)); }
.clock--left { align-items: flex-start; text-align: left; }
.clock--right { align-items: flex-end; text-align: right; }

.clock__time,
.clock__date {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 1.2rem;
  -webkit-tap-highlight-color: transparent;
}

.clock__time {
  display: inline-flex;
  align-items: flex-start;
  font-family: var(--clock-font);
  font-weight: var(--clock-weight);
  font-size: calc(var(--clock-base) * var(--clock-scale));
  line-height: 0.92;
  letter-spacing: var(--clock-tracking);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'cv11' 1, 'ss01' 1;
  color: var(--clock-color);
  padding: 0 0.04em;
  transition: transform 0.6s var(--ease-spring), font-size 0.6s var(--ease-out);
}
.clock__time:active { transform: scale(0.985); }

.clock__hm { display: inline-flex; white-space: nowrap; }

.clock__digit {
  display: inline-block;
}
.has-gradient .clock__digit,
.has-gradient .clock__colon,
.has-gradient .clock__period {
  background: var(--clock-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.clock__digit.is-anim {
  animation: digit-in 0.75s var(--ease-out) both;
}
@keyframes digit-in {
  from { opacity: 0; transform: translateY(0.12em) scale(0.98); filter: blur(0.06em); }
  to { opacity: 1; transform: none; filter: none; }
}

.clock__colon {
  display: inline-block;
  margin: 0 -0.02em;
  transform: translateY(-0.06em);
  opacity: 0.88;
}

.clock__aside {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  margin-left: 0.12em;
  padding: 0.1em 0 0.06em;
  font-size: 0.24em;
  letter-spacing: 0;
  font-weight: max(calc(var(--clock-weight) + 100), 400);
}
.clock__period { opacity: 0.85; }
.clock__seconds { opacity: 0.6; font-variant-numeric: tabular-nums; }

.clock__date {
  font-family: var(--ui-font);
  font-size: clamp(1.05rem, calc(1rem + 1.1vmin), 2.4rem);
  font-size: calc(clamp(1.05rem, calc(1rem + 1.1vmin), 2.4rem) * max(0.75, min(1.2, var(--clock-scale))));
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  opacity: 0.86;
  padding: 0.15em 0.4em;
}
.clock__date:hover { opacity: 1; }
.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 2.4rem;
}
.statusbar__left, .statusbar__right { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.2rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, opacity 0.6s ease;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}
.status-chip:hover { background: var(--control); }
.status-chip--static { cursor: default; }
.status-chip--static:hover { background: transparent; }
.status-chip--text { padding-left: 0.6rem; }
.status-chip__muted { color: var(--text-3); font-weight: 500; }
.status-chip__device { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.status-chip.is-low { color: var(--danger); }

.battery {
  position: relative;
  display: inline-block;
  width: 1.45rem;
  height: 0.72rem;
  border-radius: 0.22rem;
  box-shadow: inset 0 0 0 1.4px currentColor;
  opacity: 0.9;
  padding: 2px;
}
.battery::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 30%;
  width: 2px;
  height: 40%;
  border-radius: 0 1px 1px 0;
  background: currentColor;
  opacity: 0.6;
}
.battery__level { display: block; height: 100%; border-radius: 0.1rem; background: currentColor; }
.is-low .battery__level { background: var(--danger); }
.battery__bolt { position: absolute; inset: 0; margin: auto; color: var(--bg-contrast, #000); }

@media (max-width: 520px) {
  .status-chip__muted:not(:only-child) { display: none; }
  .status-chip__device { display: none; }
}
/* ---------- Portada ---------- */
.artwork {
  position: relative;
  flex: none;
  --art: 3.5rem;
  width: var(--art);
  height: var(--art);
}
.artwork--md { --art: 6rem; }
.artwork--lg { --art: min(17rem, 62vw); }

.artwork__glow {
  position: absolute;
  inset: 8%;
  border-radius: 30%;
  background: radial-gradient(closest-side, var(--art-glow), var(--art-glow-2) 60%, transparent);
  filter: blur(calc(var(--art) * 0.18));
  opacity: 0.55;
  transform: translateY(10%) scale(1.05);
  transition: opacity 1.2s ease, background 1.5s ease;
  pointer-events: none;
}
.artwork.is-playing .artwork__glow { opacity: 1; }
.motion .artwork.is-playing .artwork__glow { animation: art-glow 6s ease-in-out infinite alternate; }
@keyframes art-glow { to { transform: translateY(12%) scale(1.15); opacity: 0.75; } }

.artwork__frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--art) * 0.16);
  overflow: hidden;
  background: var(--control);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, calc(0.18 * var(--edge))) inset,
    0 calc(var(--art) * 0.06) calc(var(--art) * 0.2) rgba(0, 0, 0, calc(0.35 * var(--shadow)));
  transition: transform 1.2s var(--ease-spring);
  transform: scale(0.94);
}
.artwork.is-playing .artwork__frame { transform: scale(1); }
.motion .artwork--lg.is-playing .artwork__frame { animation: art-float 8s ease-in-out infinite alternate; }
@keyframes art-float { from { transform: translateY(0) rotate(-0.4deg); } to { transform: translateY(-4px) rotate(0.4deg); } }

.artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.04);
  filter: blur(6px);
  transition: opacity 0.6s ease, transform 0.9s var(--ease-out), filter 0.6s ease;
}
.artwork img.is-loaded { opacity: 1; transform: none; filter: none; }

.artwork__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 38%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.12), transparent 30%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.artwork__empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--text-3);
}

/* ---------- Mini reproductor ---------- */
.mini-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'open controls' 'progress progress' 'error error';
  align-items: center;
  gap: 0.75rem 0.5rem;
  padding: 0.85rem 0.9rem 0.8rem;
}
.mini-player__open {
  grid-area: open;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0.8rem;
}
.mini-player .transport { grid-area: controls; }
.mini-player__progress { grid-area: progress; }
.mini-player__error { grid-area: error; font-size: 0.78rem; color: var(--warn); }
.mini-player__meta { min-width: 0; flex: 1; }
.mini-player__title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player__sub {
  font-size: 0.86rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}
.mini-player--empty {
  display: flex;
  gap: 0.85rem;
  cursor: pointer;
  padding: 0.9rem 1rem;
}
.mini-player__empty-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 0.85rem;
  background: var(--control);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.mini-player__chev { color: var(--text-3); flex: none; }

.mini-player.is-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'open controls';
  padding: 0.6rem 0.9rem 0.6rem 0.6rem;
}
.mini-player.is-compact .artwork { --art: 2.6rem; }
.mini-player.is-compact .eq { grid-area: controls; }

/* ---------- Ecualizador (indicador de reproducción) ---------- */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 0.8rem; width: 0.85rem; }
.eq i { flex: 1; background: var(--accent); border-radius: 1px; height: 30%; transition: height 0.4s ease; }
.eq.is-on i:nth-child(1) { height: 70%; }
.eq.is-on i:nth-child(2) { height: 100%; }
.eq.is-on i:nth-child(3) { height: 50%; }
.motion .eq.is-on i { animation: eq 1.1s ease-in-out infinite alternate; }
.motion .eq.is-on i:nth-child(2) { animation-delay: -0.4s; }
.motion .eq.is-on i:nth-child(3) { animation-delay: -0.75s; }
@keyframes eq { from { height: 25%; } to { height: 100%; } }

/* ---------- Progreso ---------- */
.progress { display: flex; flex-direction: column; gap: 0.35rem; }
.progress__track {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: var(--track);
  overflow: visible;
}
.progress__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--text);
  transform-origin: left center;
  transform: scaleX(var(--p));
  width: 100%;
  opacity: 0.9;
}
.progress__fill.is-live { transition: transform 1s linear; }
.progress--interactive .progress__track { height: 6px; }
.progress--interactive:hover .progress__track { height: 8px; }
.progress__track { transition: height 0.3s var(--ease-out); }
.progress__input {
  position: absolute;
  inset: -10px 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.progress__track:has(.progress__input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
.progress__times {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- Transporte ---------- */
.transport { display: flex; align-items: center; gap: 0.25rem; }
.transport--lg { gap: 1.25rem; }
.transport__play { box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.45); }

/* ---------- Hoja del reproductor ---------- */
.player { display: flex; flex-direction: column; gap: 1.2rem; }
.player__hero { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; text-align: center; }
.player__info { min-width: 0; width: 100%; }
.player__state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.player__title { margin: 0.45rem 0 0.15rem; font-size: 1.55rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.player__artist { margin: 0; font-size: 1.05rem; color: var(--text-2); }
.player__album { margin: 0.2rem 0 0; font-size: 0.88rem; color: var(--text-3); }
.player__controls { display: flex; align-items: center; justify-content: space-between; padding: 0 0.25rem; }
.player__row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.is-repeat-one { position: relative; }
.is-repeat-one::after {
  content: '1';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 700;
}

@media (min-width: 760px) {
  .player__hero { flex-direction: row; text-align: left; align-items: center; }
  .artwork--lg { --art: 13rem; }
}

.volume { display: flex; align-items: center; gap: 0.8rem; color: var(--text-2); }
.volume .range { flex: 1; }
.volume__val { font-size: 0.8rem; width: 2.8rem; text-align: right; font-variant-numeric: tabular-nums; }
.volume.is-disabled { opacity: 0.45; }

.devices { display: flex; flex-direction: column; gap: 0.4rem; }
.device {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  border: 0;
  background: var(--control);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: background 0.25s ease, transform 0.3s var(--ease-spring);
}
.device:hover:not(:disabled) { background: var(--control-hover); }
.device:active:not(:disabled) { transform: scale(0.98); }
.device:disabled { cursor: default; }
.device.is-active { color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.device__name { flex: 1; font-weight: 550; }
.device__type { font-size: 0.78rem; color: var(--text-3); }

.caps { display: flex; flex-direction: column; font-size: 0.86rem; }
.caps__row {
  display: grid;
  grid-template-columns: 1fr 4rem 5.5rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0;
  border-top: 1px solid var(--hairline);
}
.caps__row > span:not(:first-child) { justify-self: center; }
.caps__head { border-top: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.caps small { display: block; color: var(--text-3); font-size: 0.7rem; margin-top: 0.1rem; }
/* ---------- Widget compacto ---------- */
.cal-widget {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  align-items: stretch;
}
.cal-widget__date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-right: 1.1rem;
  border-right: 1px solid var(--hairline);
  min-width: 4.6rem;
}
.cal-widget__weekday {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cal-widget__day {
  font-size: 2.6rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0.1rem 0 0.15rem;
  font-variant-numeric: tabular-nums;
}
.cal-widget__month { font-size: 0.82rem; color: var(--text-2); }
.cal-widget__events { display: flex; flex-direction: column; justify-content: center; gap: 0.55rem; min-width: 0; }
.cal-widget__empty { display: flex; flex-direction: column; gap: 0.15rem; color: var(--text-2); font-size: 0.92rem; }
.cal-widget__empty svg { color: var(--accent); margin-bottom: 0.2rem; }
.cal-widget__empty small { color: var(--text-3); font-size: 0.78rem; }

.cal-widget.is-compact { grid-template-columns: auto minmax(0, 1fr); padding: 0.7rem 0.9rem; }
.cal-widget.is-compact .cal-widget__day { font-size: 1.7rem; }
.cal-widget.is-compact .cal-widget__month { display: none; }

.cal-ev { display: flex; gap: 0.65rem; min-width: 0; align-items: stretch; opacity: 0.82; }
.cal-ev.is-next { opacity: 1; }
.cal-ev__bar {
  flex: none;
  width: 3px;
  border-radius: 3px;
  background: var(--ev);
  box-shadow: 0 0 10px color-mix(in srgb, var(--ev) 60%, transparent);
}
.cal-ev__text { display: flex; flex-direction: column; min-width: 0; }
.cal-ev__title { font-size: 0.94rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev__when { font-size: 0.8rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Próximo evento ---------- */
.next-ev { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; cursor: pointer; }
.next-ev__dot {
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--ev);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ev) 22%, transparent), 0 0 14px var(--ev);
}
.next-ev__text { display: flex; flex-direction: column; min-width: 0; }
.next-ev__label { font-size: 0.7rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.next-ev__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-ev__when { font-size: 0.82rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Vista completa ---------- */
.calendar { display: flex; flex-direction: column; gap: 1rem; min-height: 0; }
.calendar__toolbar { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.calendar__toolbar .field { flex: 1 1 18rem; max-width: 26rem; }
.calendar__nav { display: flex; align-items: center; gap: 0.25rem; }
.calendar__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.calendar__title { margin: 0; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; }
.calendar__body { transition: opacity 0.3s ease; }
.calendar__body.is-loading { opacity: 0.6; }
.calendar__hint { margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--text-3); text-align: center; }
@media (hover: none) { .calendar__hint { display: none; } }

.month__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-3);
  text-transform: uppercase;
  padding-bottom: 0.4rem;
}
.month__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month__cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  min-height: clamp(3.2rem, 8vh, 6.2rem);
  padding: 0.35rem;
  border: 0;
  border-radius: 0.7rem;
  background: var(--control);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.3s var(--ease-spring);
}
.month__cell:hover { background: var(--control-hover); }
.month__cell:active { transform: scale(0.97); }
.month__cell.is-out { opacity: 0.38; }
.month__num {
  align-self: flex-start;
  display: grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  font-size: 0.85rem;
  font-weight: 550;
  border-radius: 99px;
  font-variant-numeric: tabular-nums;
}
.month__cell.is-today .month__num { background: var(--accent); color: var(--accent-contrast); font-weight: 700; }
.month__evs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.month__ev { display: flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; min-width: 0; color: var(--text-2); }
.month__ev i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ev); }
.month__ev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month__more { font-size: 0.66rem; color: var(--text-3); }
@media (max-width: 560px) {
  .month__ev span { display: none; }
  .month__evs { flex-direction: row; flex-wrap: wrap; }
}

.tgrid { display: flex; flex-direction: column; }
.tgrid__head, .tgrid__allday {
  display: grid;
  grid-template-columns: 3.4rem repeat(var(--cols), 1fr);
  gap: 4px;
}
.tgrid__day { display: flex; flex-direction: column; align-items: center; padding-bottom: 0.4rem; }
.tgrid__wd { font-size: 0.7rem; text-transform: uppercase; color: var(--text-3); font-weight: 650; }
.tgrid__dn { font-size: 1.1rem; font-weight: 550; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; }
.tgrid__day.is-today .tgrid__dn { background: var(--accent); color: var(--accent-contrast); }
.tgrid__allday { padding: 0.3rem 0; border-top: 1px solid var(--hairline); }
.tgrid__label { font-size: 0.66rem; color: var(--text-3); align-self: center; }
.tgrid__allcol { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tgrid__scroll {
  max-height: min(56vh, 34rem);
  overflow-y: auto;
  border-top: 1px solid var(--hairline);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.tgrid__body {
  position: relative;
  display: grid;
  grid-template-columns: 3.4rem repeat(var(--cols), 1fr);
  gap: 4px;
  height: calc(var(--hour) * 24);
}
.tgrid__hours { position: relative; }
.tgrid__hours span {
  position: absolute;
  right: 0.4rem;
  transform: translateY(-50%);
  font-size: 0.66rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tgrid__col { position: relative; border-left: 1px solid var(--hairline); }
.tgrid__line { position: absolute; left: 0; right: 0; height: 1px; background: var(--hairline); }
.tgrid__now {
  position: absolute;
  left: -4px;
  right: 0;
  height: 2px;
  background: var(--danger);
  z-index: 2;
  border-radius: 2px;
}
.tgrid__now::before {
  content: '';
  position: absolute;
  left: -3px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}
.tg-ev {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.25rem 0.45rem;
  border: 0;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--ev) 26%, transparent);
  box-shadow: inset 3px 0 0 var(--ev), inset 0 0 0 1px color-mix(in srgb, var(--ev) 35%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.tg-ev strong { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-ev span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-ev--all { position: static; padding: 0.2rem 0.45rem; white-space: nowrap; text-overflow: ellipsis; }

.agenda { display: flex; flex-direction: column; gap: 1.1rem; }
.agenda__day h4 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.agenda__day h4.is-today { color: var(--accent); }
.agenda__ev {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.35rem;
  border: 0;
  border-radius: 0.85rem;
  background: var(--control);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  align-items: center;
}
.agenda__ev:hover { background: var(--control-hover); }
.agenda__ev .cal-ev__bar { align-self: stretch; }
.agenda__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.agenda__text strong { font-weight: 600; }
.agenda__text span { font-size: 0.82rem; color: var(--text-2); display: inline-flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.agenda__ev > svg { color: var(--text-3); }

/* ---------- Editor ---------- */
.event-editor { display: flex; flex-direction: column; gap: 1rem; }
.input--title { font-size: 1.25rem; font-weight: 600; padding: 0.85rem 1rem; }
.ee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.ee-field { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.8rem; color: var(--text-2); }
.ee-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.home {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas: 'status' 'notices' 'clock' 'widgets';
  height: 100%;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(clamp(1rem, 3vw, 3rem), env(safe-area-inset-right))
    max(clamp(1rem, 3.2vh, 3rem), env(safe-area-inset-bottom))
    max(clamp(1rem, 3vw, 3rem), env(safe-area-inset-left));
  gap: clamp(0.5rem, 2vh, 1.5rem);
}
.statusbar { grid-area: status; }
.notices { grid-area: notices; display: flex; justify-content: center; min-height: 0; }
.home__clock {
  grid-area: clock;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  min-width: 0;
}
.home[data-clock-pos='top'] .home__clock { justify-content: flex-start; padding-top: 4vh; }
.home[data-clock-pos='bottom'] .home__clock { justify-content: flex-end; padding-bottom: 2vh; }
.home__clock .clock--center { align-self: center; }
.home__clock .clock--left { align-self: flex-start; }
.home__clock .clock--right { align-self: flex-end; }

.home__widgets {
  grid-area: widgets;
  display: grid;
  grid-template-columns: minmax(0, 30rem);
  justify-content: center;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  padding-right: 3.2rem; /* espacio para el botón de esquina */
  padding-left: 3.2rem;
}
.home__widgets.is-pair { grid-template-columns: repeat(2, minmax(0, 28rem)); }
.home__widgets > * { min-width: 0; }

/* Teléfono vertical: reloj → fecha → música → próximo evento */
.home--phone { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.home--phone .home__clock { justify-content: center; }
.home--phone[data-clock-pos='center'] .home__clock { justify-content: flex-start; padding-top: 9vh; }
.home--phone .clock { --clock-base: clamp(5rem, 27vw, 9rem); }
.home--phone .home__widgets,
.home--phone .home__widgets.is-pair { grid-template-columns: 1fr; padding: 0 0 3.6rem; gap: 0.6rem; }

/* Lateral (StandBy): pantallas horizontales bajas — reloj a la izquierda, widgets a la derecha */
.home--standby {
  grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas: 'status status' 'notices notices' 'clock widgets';
  column-gap: clamp(1rem, 4vw, 4rem);
}
.home--standby .clock { --clock-base: min(22vw, 40vh); }
.home--standby .home__widgets,
.home--standby .home__widgets.is-pair {
  grid-template-columns: 1fr;
  align-content: center;
  padding: 0 0 0 0;
  max-width: 28rem;
  width: 100%;
  justify-self: end;
}
.home--standby .home__widgets { padding-bottom: 3rem; }

/* Solo reloj */
.home--minimal .clock { --clock-base: clamp(6rem, 26vmin, 32rem); }

/* Monitores grandes y TV */
@media (min-width: 1800px) and (min-height: 900px) {
  .home__widgets.is-pair { grid-template-columns: repeat(2, minmax(0, 32rem)); }
}

/* ---------- Avisos ---------- */
.notice-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(32rem, 90vw);
  height: 2.4rem;
  padding: 0 1rem 0 0.4rem;
  border: 0;
  border-radius: 99px;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 550;
  cursor: pointer;
}
.motion .notice-pill { animation: pill-in 0.7s var(--ease-spring) both; }
@keyframes pill-in { from { opacity: 0; transform: translateY(-8px) scale(0.92); filter: blur(4px); } }
.notice-pill__icon {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--ev, var(--accent));
  color: #0b0b0f;
}
.notice-pill.is-warn .notice-pill__icon { background: var(--warn); }
.notice-pill__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-pill__count { color: var(--text-3); font-size: 0.78rem; }

/* ---------- Estados globales ---------- */
.app.is-resting .corner,
.app.is-resting .statusbar__right .status-chip:not(.status-chip--static) .status-chip__device {
  opacity: 0;
  pointer-events: none;
}
.app.is-resting .corner { transform: translateY(8px); }
.app.is-resting .home__widgets { opacity: 0.82; }
.home__widgets, .home__clock, .statusbar { transition: opacity 1s ease, transform 1s var(--ease-out); }
.motion .home__widgets > * { animation: widget-in 0.9s var(--ease-out) both; }
.motion .home__widgets > *:nth-child(2) { animation-delay: 80ms; }
@keyframes widget-in { from { opacity: 0; transform: translateY(14px) scale(0.98); filter: blur(6px); } }

/* Profundidad: al abrir un panel la pantalla retrocede levemente. */
.app .home { transition: transform 0.6s var(--ease-out), opacity 0.6s ease; transform-origin: 50% 40%; }
.app.has-overlay .home { transform: scale(0.97); opacity: 0.38; }
.app.has-overlay .corner { opacity: 0; pointer-events: none; }
.settings {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}
.settings__nav {
  padding: 0.25rem 0.75rem 1rem 1rem;
  border-right: 1px solid var(--hairline);
  overflow-y: auto;
}
.settings__tabs { display: flex; flex-direction: column; gap: 2px; }
.settings__tab {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.settings__tab:hover { background: var(--control); color: var(--text); }
.settings__tab.is-on { background: var(--control-hover); color: var(--text); font-weight: 600; }
.settings__tab-icon {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  background: var(--control);
  color: var(--text-2);
  flex: none;
}
.settings__tab.is-on .settings__tab-icon { background: var(--accent); color: var(--accent-contrast); }
.settings__content { overflow-y: auto; padding: 0.25rem 1.5rem 2rem; overscroll-behavior: contain; scrollbar-width: thin; }
.settings__pane { display: flex; flex-direction: column; gap: 1.4rem; }
.motion .settings__pane { animation: pane-in 0.45s var(--ease-out); }
@keyframes pane-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .settings__nav { border-right: 0; border-bottom: 1px solid var(--hairline); padding: 0 1rem 0.6rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .settings__nav::-webkit-scrollbar { display: none; }
  .settings__tabs { flex-direction: row; }
  .settings__tab { white-space: nowrap; padding: 0.45rem 0.8rem 0.45rem 0.45rem; border-radius: 99px; }
  .settings__tab-icon { width: 1.6rem; height: 1.6rem; border-radius: 50%; }
  .settings__content { padding: 1rem 1rem 2rem; }
}

/* Fuentes */
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.5rem; }
.font-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-radius: 0.9rem;
  background: var(--control);
  color: var(--text);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: background 0.2s ease, box-shadow 0.25s ease, transform 0.3s var(--ease-spring);
}
.font-card:hover { background: var(--control-hover); }
.font-card:active { transform: scale(0.97); }
.font-card.is-on { box-shadow: inset 0 0 0 2px var(--accent); }
.font-card__sample { font-size: 1.9rem; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.font-card__name { font-size: 0.74rem; color: var(--text-2); font-family: var(--ui-font); }

/* Fondos */
.bg-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); gap: 0.6rem; }
.bg-type { display: flex; flex-direction: column; gap: 0.4rem; border: 0; background: none; color: var(--text); cursor: pointer; padding: 0; font: inherit; }
.bg-type__preview {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 18px -8px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.25s ease, transform 0.35s var(--ease-spring);
}
.bg-type:hover .bg-type__preview { transform: translateY(-2px); }
.bg-type.is-on .bg-type__preview { box-shadow: 0 0 0 2px var(--accent), 0 8px 22px -8px rgba(0, 0, 0, 0.6); }
.bg-type__label { font-size: 0.8rem; color: var(--text-2); }
.bg-type.is-on .bg-type__label { color: var(--text); font-weight: 600; }

.color-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.color-pair--3 { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.gradient-preview { height: 2.2rem; border-radius: 0.8rem; box-shadow: inset 0 0 0 1px var(--hairline); }
.gradient-preview--tall { height: 3.4rem; }

/* Temas */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.85rem; }
.theme-card { display: flex; flex-direction: column; gap: 0.3rem; border: 0; padding: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.theme-card__preview {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.3s ease;
}
.theme-card:hover .theme-card__preview { transform: translateY(-3px) scale(1.01); }
.theme-card.is-on .theme-card__preview { box-shadow: 0 0 0 2px var(--accent), 0 12px 28px -12px rgba(0, 0, 0, 0.7); }
.theme-card__clock {
  position: absolute;
  top: 18%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.03em;
}
.theme-card__glass {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 12%;
  height: 22%;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.theme-card__check {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
}
.theme-card__name { font-size: 0.92rem; font-weight: 600; margin-top: 0.2rem; }
.theme-card__desc { font-size: 0.76rem; color: var(--text-3); }

/* Fecha */
.dt-preview {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: var(--control);
}
.dt-preview__time { font-size: 2.2rem; font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dt-preview__date { color: var(--text-2); }
.dt-preview__zone { display: inline-flex; gap: 0.35rem; align-items: center; color: var(--text-3); font-size: 0.8rem; margin-top: 0.3rem; }

.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.4rem 1rem; margin: 0; }
.shortcuts div { display: flex; align-items: center; gap: 0.7rem; }
.shortcuts dt { min-width: 4.4rem; }
.shortcuts dd { margin: 0; color: var(--text-2); font-size: 0.88rem; }
kbd {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.4rem;
  background: var(--control-hover);
  box-shadow: inset 0 -1px 0 var(--hairline), inset 0 0 0 1px var(--hairline);
  font-family: var(--ui-font);
  font-size: 0.78rem;
  font-weight: 600;
}

.search { display: flex; gap: 0.5rem; }
.search .input { flex: 1; }
.corner {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 5;
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}
.corner .icon-btn { opacity: 0.7; }
.corner .icon-btn:hover, .corner .icon-btn:focus-visible { opacity: 1; }

.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.quick__tile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 4rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 1.1rem;
  background: var(--control);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--hairline), inset 0 1px 0 rgba(255, 255, 255, calc(0.12 * var(--edge)));
  transition: background 0.25s ease, transform 0.35s var(--ease-spring);
}
.motion .quick__tile { animation: tile-in 0.5s var(--ease-out) both; animation-delay: calc(var(--i) * 30ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.quick__tile:hover { background: var(--control-hover); }
.quick__tile:active { transform: scale(0.96); }
.quick__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--control-hover);
  transition: background 0.3s ease, color 0.3s ease;
}
.quick__tile.is-on .quick__icon { background: var(--accent); color: var(--accent-contrast); }
.quick__text { display: flex; flex-direction: column; min-width: 0; }
.quick__label { font-size: 0.9rem; font-weight: 600; line-height: 1.2; }
.quick__sub { font-size: 0.76rem; color: var(--text-3); margin-top: 0.1rem; }
/*$vite$:1*/