/* Functional additions kept separate from the original visual theme. */

:root[data-palette="red"] {
  --accent: #e53935;
  --accent-strong: #ff7772;
  --accent-deep: #a81418;
  --accent-rgb: 229, 57, 53;
  --accent-soft: rgba(229, 57, 53, 0.42);
  --violet-accent: #e53935;
  --violet-soft: rgba(229, 57, 53, 0.38);
  --muted-soft: #d49a9a;
  --glow-a: rgba(229, 57, 53, 0.32);
  --glow-b: rgba(255, 122, 92, 0.2);
  --hero-gradient: linear-gradient(135deg, #431114 0%, #9f2529 46%, #ef5350 100%);
  --hero-border: rgba(255, 190, 188, 0.24);
}

:root[data-mode="light"][data-palette="red"] {
  --accent: #c62828;
  --accent-strong: #ed5350;
  --accent-deep: #941b1f;
  --accent-rgb: 198, 40, 40;
  --accent-soft: rgba(198, 40, 40, 0.28);
  --violet-accent: #c62828;
  --violet-soft: rgba(198, 40, 40, 0.24);
  --muted-soft: #9e6a6a;
  --glow-a: rgba(198, 40, 40, 0.18);
  --glow-b: rgba(242, 96, 76, 0.14);
  --hero-gradient: linear-gradient(135deg, #ffd2d0 0%, #ff8a84 44%, #c62828 100%);
  --hero-border: rgba(203, 111, 108, 0.22);
}

html {
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
}

body,
body.no-page-scroll {
  height: auto !important;
  min-height: 100dvh;
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
}

.app-shell,
.workspace,
.shell,
main {
  height: auto !important;
  max-height: none !important;
}

.workspace,
.shell,
main {
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
}

body.sidebar-open {
  overflow-y: hidden !important;
}

/* Path parking lists belong only to the path view, never to the sidebar tree. */
.task-tree-toggle-inline[data-task-tree-toggle^="paused:"],
.task-tree-leaves-paused,
.task-tree-leaf-row-paused {
  display: none !important;
}

.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior-y: auto !important;
}

.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) .task-board-grid,
.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) .task-stage-column {
  height: auto !important;
  max-height: none !important;
}

/* "lo de pendiente sigue buggueada" - poner el overflow-x aca, en el
   propio .task-board-grid (que ya tiene height:auto - queda del alto
   exacto de su contenido, nunca mas chico), en vez de en
   .task-board-shell mas arriba: el eje X y el eje Y de un mismo
   elemento no pueden quedar en "visible" y "no visible" a la vez (la
   spec obliga a que el otro eje pase a "auto" apenas uno deja de ser
   "visible"), y en .task-board-shell ESE cambio de "visible" a "auto"
   en Y si generaba un recorte real (su alto SI esta limitado por el
   layout de afuera). Aca en .task-board-grid da lo mismo porque su
   alto es siempre exactamente el de su contenido - nunca hay nada
   que recortar en Y. */
.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) .task-board-grid {
  overflow-x: auto !important;
  /* "las tareas siguen desbordadas" (con localhost andando y el fix
     de arriba ya sirviendo el scroll) - la barra estaba oculta del
     todo (scrollbar-width:none), asi que en escritorio, con mouse
     (sin swipe tactil ni gesto de scroll horizontal obvio), no habia
     ninguna pista visual de que se podia llegar a la columna que
     sobraba. Ahora se ve una barra delgada real para poder
     arrastrarla con el mouse.
  */
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.45) transparent;
}

.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) .task-board-grid::-webkit-scrollbar {
  height: 8px;
}

.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) .task-board-grid::-webkit-scrollbar-track {
  background: transparent;
}

.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) .task-board-grid::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.4);
  border-radius: 999px;
}

.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) .task-board-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.62);
}

.task-board-shell[data-board-scroll-mode="columns"]:not(.is-list-view):not(.is-matrix-view) .board-stack {
  flex: 0 0 auto !important;
  max-height: none !important;
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
}

.productivity-shortcuts {
  margin-bottom: 1.15rem;
}

.productivity-shortcuts-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.7rem;
  padding: 0 0.2rem;
}

.productivity-shortcuts-head h3,
.productivity-shortcuts-head p {
  margin: 0;
}

.productivity-shortcuts-head h3 {
  color: var(--text);
  font-size: 0.94rem;
}

.productivity-shortcuts-head p {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.productivity-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.72rem;
}

.productivity-shortcut-card {
  display: grid;
  grid-template-columns: 2.45rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
  min-height: 4.7rem;
  padding: 0.78rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--panel-glass);
  box-shadow: var(--shadow-sm, none);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.productivity-shortcut-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.3);
  background: var(--panel-faint-hover);
}

.productivity-shortcut-icon {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: var(--radius-md);
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), 0.12);
}

.productivity-shortcut-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.productivity-shortcut-copy,
.productivity-shortcut-copy small,
.productivity-shortcut-copy strong {
  min-width: 0;
}

.productivity-shortcut-copy small,
.productivity-shortcut-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.productivity-shortcut-copy small {
  margin-bottom: 0.12rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.productivity-shortcut-copy strong {
  font-size: 0.86rem;
}

.productivity-shortcut-arrow {
  color: var(--muted-soft);
}

.productivity-countdown-page {
  --countdown-surface: color-mix(in srgb, var(--panel-glass-strong) 94%, transparent);
  display: grid;
  gap: 1.25rem;
  width: 100%;
  padding-bottom: 1.5rem;
}

.productivity-countdown-topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.productivity-countdown-topline h2,
.productivity-countdown-topline p,
.productivity-countdown-list-head h3,
.productivity-countdown-list-head p {
  margin: 0;
}

.productivity-countdown-topline h2 {
  margin-top: 0.28rem;
  color: var(--text);
  font-size: clamp(1.18rem, 2vw, 1.65rem);
  line-height: 1.16;
}

.productivity-countdown-create {
  position: relative;
  z-index: 4;
}

.productivity-countdown-create .page-action-pill-button {
  min-height: 2.8rem;
  padding-inline: 1rem;
  border-color: rgba(var(--accent-rgb), 0.28);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 28px rgba(var(--accent-rgb), 0.2);
}

.productivity-countdown-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.productivity-countdown-summary-card {
  --event-color: #3b82f6;
  --event-color-alt: #22d3ee;
  min-width: 0;
  min-height: 7rem;
  display: grid;
  grid-template-columns: 3.35rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--panel-border);
  border-radius: 1.18rem;
  background: var(--countdown-surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.productivity-countdown-summary-card.tone-gold {
  --event-color: #f59e0b;
  --event-color-alt: #fde047;
}

.productivity-countdown-summary-card.tone-green {
  --event-color: #22c55e;
  --event-color-alt: #86efac;
}

.productivity-countdown-summary-icon {
  display: grid;
  place-items: center;
  width: 3.35rem;
  height: 3.35rem;
  border: 1px solid color-mix(in srgb, var(--event-color) 20%, var(--panel-border));
  border-radius: 50%;
  color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 10%, var(--panel));
  box-shadow: 0 9px 20px color-mix(in srgb, var(--event-color) 14%, transparent);
  font-size: 1.35rem;
  font-weight: 900;
}

.productivity-countdown-summary-card > div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  text-align: center;
}

.productivity-countdown-summary-card strong {
  color: var(--text);
  font-size: 2.15rem;
  font-weight: 760;
  line-height: 1;
}

.productivity-countdown-summary-card span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

.productivity-countdown-feature {
  --event-color: #3b82f6;
  --event-color-alt: #22d3ee;
  position: relative;
  overflow: hidden;
  min-height: 19.5rem;
  display: grid;
  grid-template-columns: minmax(15rem, 0.82fr) 1px minmax(20rem, 1.55fr);
  gap: clamp(1.4rem, 3vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.65rem);
  border: 1px solid var(--panel-border);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 75% 25%, color-mix(in srgb, var(--event-color) 8%, transparent), transparent 30%),
    var(--countdown-surface);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.11);
}

.productivity-countdown-feature::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -7rem;
  width: 17rem;
  height: 17rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--event-color) 7%, transparent);
  filter: blur(10px);
  pointer-events: none;
}

.productivity-countdown-feature.tone-sunrise,
.productivity-countdown-row.tone-sunrise {
  --event-color: #f97316;
  --event-color-alt: #fb7185;
}

.productivity-countdown-feature.tone-rose,
.productivity-countdown-row.tone-rose {
  --event-color: #f43f5e;
  --event-color-alt: #ec4899;
}

.productivity-countdown-feature.tone-gold,
.productivity-countdown-row.tone-gold {
  --event-color: #f59e0b;
  --event-color-alt: #fde047;
}

.productivity-countdown-feature.tone-sky,
.productivity-countdown-row.tone-sky {
  --event-color: #3b82f6;
  --event-color-alt: #22d3ee;
}

.productivity-countdown-feature-number {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: start;
}

.productivity-countdown-feature-number > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.productivity-countdown-feature-number > strong {
  margin-top: 0.32rem;
  color: transparent;
  background: linear-gradient(145deg, var(--event-color), var(--event-color-alt));
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(6.6rem, 12vw, 10.5rem);
  font-weight: 790;
  letter-spacing: -0.075em;
  line-height: 0.82;
  filter: drop-shadow(0 12px 24px color-mix(in srgb, var(--event-color) 15%, transparent));
}

.productivity-countdown-feature-number > b {
  margin-top: 0.6rem;
  color: var(--event-color);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  font-weight: 750;
  line-height: 1;
}

.productivity-countdown-feature-number > small {
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.productivity-countdown-feature-divider {
  width: 1px;
  height: 76%;
  background: var(--panel-border);
}

.productivity-countdown-feature-event {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
}

.productivity-countdown-feature-icon {
  display: grid;
  place-items: center;
  width: 7.2rem;
  height: 7.2rem;
  border-radius: 50%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--event-color) 17%, var(--panel)), color-mix(in srgb, var(--event-color-alt) 7%, var(--panel)));
  box-shadow: 0 18px 36px color-mix(in srgb, var(--event-color) 16%, transparent);
  font-size: 3.35rem;
}

.productivity-countdown-feature-copy {
  min-width: 0;
}

.productivity-countdown-feature-copy small {
  color: var(--event-color);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.productivity-countdown-feature-copy h3 {
  max-width: 14ch;
  margin: 0.32rem 0 0;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.04;
}

.productivity-countdown-feature-copy p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.productivity-countdown-feature-copy > span {
  display: inline-flex;
  margin-top: 0.65rem;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 11%, transparent);
  font-size: 0.72rem;
  font-weight: 750;
}

.productivity-countdown-detail-button {
  grid-column: 2;
  justify-self: start;
  min-height: 3.2rem;
  margin-top: 0.2rem;
  padding: 0.75rem 1.45rem;
  border: 0;
  border-radius: 0.82rem;
  color: #fff;
  background: linear-gradient(135deg, var(--event-color), var(--event-color-alt));
  box-shadow: 0 13px 28px color-mix(in srgb, var(--event-color) 22%, transparent);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
}

.productivity-countdown-feature.is-empty {
  min-height: 15rem;
  grid-template-columns: 1fr;
  place-items: center;
  text-align: center;
}

.productivity-countdown-feature.is-empty > div {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
}

.productivity-countdown-feature.is-empty h3,
.productivity-countdown-feature.is-empty p {
  margin: 0;
}

.productivity-countdown-list-section {
  display: grid;
  gap: 0.72rem;
}

.productivity-countdown-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.productivity-countdown-list-head h3 {
  margin-top: 0.25rem;
  color: var(--text);
  font-size: 1rem;
}

.productivity-countdown-list-head > span {
  padding: 0.34rem 0.62rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-faint);
  font-size: 0.7rem;
}

.productivity-countdown-list {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 1.15rem;
  background: var(--countdown-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.productivity-countdown-row {
  --event-color: #3b82f6;
  --event-color-alt: #22d3ee;
  width: 100%;
  min-width: 0;
  min-height: 4.7rem;
  display: grid;
  grid-template-columns: 2.7rem minmax(10rem, 1fr) minmax(9rem, 0.75fr) 5.5rem 1rem;
  align-items: center;
  gap: 0.9rem;
  padding: 0.76rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--panel-border);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, transform 150ms ease;
}

.productivity-countdown-row:last-child {
  border-bottom: 0;
}

.productivity-countdown-row:hover {
  background: color-mix(in srgb, var(--event-color) 6%, var(--panel-faint));
}

.productivity-countdown-row-icon {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--event-color) 11%, var(--panel));
  font-size: 1.2rem;
}

.productivity-countdown-row-copy {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.productivity-countdown-row-copy strong,
.productivity-countdown-row-copy small,
.productivity-countdown-row-date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.productivity-countdown-row-copy strong {
  color: var(--text);
  font-size: 0.88rem;
}

.productivity-countdown-row-copy small,
.productivity-countdown-row-date {
  color: var(--muted);
  font-size: 0.72rem;
}

.productivity-countdown-row-days {
  color: var(--event-color);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.productivity-countdown-row-arrow {
  color: var(--muted-soft);
  font-size: 1.28rem;
}

.productivity-countdown-empty-list {
  margin: 0;
  padding: 1.25rem;
  color: var(--muted);
  text-align: center;
}

:root[data-mode="dark"] .productivity-countdown-page {
  --countdown-surface: #070708;
}

:root[data-mode="dark"] .productivity-countdown-summary-card,
:root[data-mode="dark"] .productivity-countdown-feature,
:root[data-mode="dark"] .productivity-countdown-list {
  border-color: #24252a;
}

.productivity-kanban-add-column {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 180;
  display: block;
}

.productivity-stage-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-left: auto;
}

.productivity-stage-add-button {
  color: var(--accent-strong);
  font-size: 1.12rem;
  line-height: 1;
}

.productivity-stage-add-button:hover,
.productivity-stage-add-button[aria-expanded="true"] {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(var(--accent-rgb), 0.16);
}

.productivity-add-column-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: auto;
  min-height: 3.45rem;
  padding: 0.7rem 0.82rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: var(--panel-faint);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.productivity-add-column-trigger:hover {
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), 0.08);
}

.productivity-add-column-plus {
  color: var(--accent-strong);
  font-size: 1.1rem;
  line-height: 1;
}

.productivity-add-column-form {
  position: static;
  display: grid;
  align-content: start;
  gap: 0.82rem;
  width: min(26rem, calc(100vw - 2rem));
  max-height: calc(100vh - 1.5rem);
  overflow-y: auto;
  padding: 1.12rem;
  border: 1px solid var(--panel-border);
  border-radius: 1.35rem;
  background: var(--panel-glass-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.44) transparent;
}

:root[data-mode="dark"] .productivity-add-column-form {
  color-scheme: dark;
  border-color: #25252b;
  background: #050506;
}

.productivity-add-column-form[hidden],
.productivity-add-column-trigger[hidden] {
  display: none !important;
}

.productivity-add-column-form h3,
.productivity-add-column-form p {
  margin: 0;
}

.productivity-add-column-form h3 {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.15;
}

.productivity-add-column-form p {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.productivity-add-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.productivity-add-column-head > div {
  display: grid;
  gap: 0.28rem;
}

.productivity-add-column-head > div > span,
.productivity-column-field > span,
.productivity-column-color-picker > legend {
  color: var(--muted-soft);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.productivity-add-column-head-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 0.82rem;
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.12);
}

.productivity-column-field {
  display: grid;
  gap: 0.42rem;
}

.productivity-add-column-form input:not([type="hidden"]):not([type="color"]),
.productivity-add-column-form select {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--panel-border);
  border-radius: 0.86rem;
  color: var(--text);
  background: var(--input-surface);
  outline: none;
  font: inherit;
}

.productivity-add-column-form input:not([type="hidden"]):not([type="color"]):focus,
.productivity-add-column-form select:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

:root[data-mode="dark"] .productivity-add-column-form input:not([type="hidden"]):not([type="color"]),
:root[data-mode="dark"] .productivity-add-column-form select {
  border-color: #25252b;
  background: #0c0c0f;
}

.productivity-column-color-picker {
  min-width: 0;
  display: grid;
  gap: 0.72rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.productivity-column-color-picker > legend {
  margin-bottom: 0.48rem;
}

.productivity-column-color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.48rem;
}

.productivity-column-color-swatch {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 0.32rem;
  padding: 0.34rem;
  border: 1px solid transparent;
  border-radius: 0.82rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.productivity-column-color-swatch:hover {
  transform: translateY(-1px);
  border-color: var(--panel-border);
  background: var(--panel-faint);
}

.productivity-column-color-swatch.is-selected {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.11);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.08);
}

.productivity-column-color-swatch.is-selected::after {
  content: "✓";
  position: absolute;
  top: 0.55rem;
  right: 0.54rem;
  display: grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  color: #fff;
  background: rgba(5, 5, 6, 0.78);
  font-size: 0.64rem;
  font-weight: 900;
}

.productivity-column-color-sample {
  display: block;
  width: 100%;
  aspect-ratio: 1.72;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.58rem;
  background: linear-gradient(135deg, var(--column-color), var(--column-color-alt));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--column-color) 22%, transparent);
}

.productivity-column-color-swatch small {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.61rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.productivity-custom-color-panel {
  display: grid;
  gap: 0.62rem;
  padding: 0.78rem;
  border: 1px solid var(--panel-border);
  border-radius: 1rem;
  background: var(--panel-faint);
}

:root[data-mode="dark"] .productivity-custom-color-panel {
  border-color: #24242a;
  background: #0a0a0c;
}

.productivity-custom-color-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.productivity-custom-color-copy strong {
  color: var(--text);
  font-size: 0.78rem;
}

.productivity-custom-color-copy small {
  color: var(--muted-soft);
  font-size: 0.63rem;
}

.productivity-custom-color-controls {
  display: grid;
  grid-template-columns: 2.85rem minmax(0, 1fr) auto;
  gap: 0.48rem;
}

.productivity-native-color {
  --custom-color: #37b3ff;
  position: relative;
  min-height: 2.85rem;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 0.86rem;
  background: var(--custom-color);
  cursor: pointer;
}

.productivity-native-color::after {
  content: "✎";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}

.productivity-native-color input {
  position: absolute;
  inset: -0.5rem;
  width: calc(100% + 1rem);
  height: calc(100% + 1rem);
  opacity: 0;
  cursor: pointer;
}

.productivity-custom-color-controls .productivity-hex-input[aria-invalid="true"] {
  border-color: var(--danger);
}

.productivity-custom-color-controls > button {
  min-height: 2.85rem;
  padding: 0 0.78rem;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: 0.86rem;
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), 0.12);
  cursor: pointer;
  font-weight: 800;
}

.productivity-saved-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.productivity-saved-color {
  position: relative;
  width: 4.1rem;
}

.productivity-saved-color .productivity-column-color-swatch {
  width: 100%;
}

.productivity-saved-color-remove {
  position: absolute;
  top: 0.06rem;
  right: 0.06rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.08rem;
  height: 1.08rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  font-size: 0.72rem;
}

.productivity-custom-colors-empty {
  width: 100%;
  padding: 0.42rem 0;
  color: var(--muted-soft) !important;
  font-size: 0.64rem !important;
}

.productivity-column-color-preview {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.58rem 0.66rem;
  border: 1px solid var(--panel-border);
  border-radius: 0.86rem;
  background: var(--panel-faint);
}

.productivity-column-color-preview > span {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.68rem;
  background: linear-gradient(135deg, var(--column-color), var(--column-color-alt));
  box-shadow: 0 7px 16px color-mix(in srgb, var(--column-color) 28%, transparent);
}

.productivity-column-color-preview > div {
  display: grid;
  gap: 0.1rem;
}

.productivity-column-color-preview small {
  color: var(--muted-soft);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.productivity-column-color-preview strong {
  color: var(--text);
  font-size: 0.78rem;
}

.productivity-add-column-actions {
  display: flex;
  gap: 0.45rem;
}

.productivity-add-column-actions button {
  flex: 1;
  min-height: 2.72rem;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
}

.productivity-add-column-cancel {
  color: var(--muted);
  background: var(--panel-faint-strong);
}

.productivity-add-column-save {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.18);
}

.productivity-add-column-error {
  color: var(--danger) !important;
}

.productivity-focus-alert-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
}

.productivity-focus-alert-status {
  min-width: 0;
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
}

.productivity-focus-alert-status > span {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--panel-faint-strong);
}

.productivity-focus-alert-status.is-ready > span {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
}

.productivity-focus-alert-status.is-blocked > span {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

.productivity-focus-alert-status strong,
.productivity-focus-alert-status small {
  display: block;
}

.productivity-focus-alert-status strong {
  color: var(--text);
  font-size: 0.86rem;
}

.productivity-focus-alert-status small {
  margin-top: 0.15rem;
  color: var(--muted-soft);
  font-size: 0.72rem;
  line-height: 1.4;
}

.productivity-focus-alert-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.productivity-focus-alert-actions button {
  min-height: 2.45rem;
}

.productivity-focus-alert-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted-soft);
  font-size: 0.72rem;
  line-height: 1.45;
}

.productivity-skip-break-button {
  width: 100%;
  min-height: 2.8rem;
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--accent-strong);
  border-color: rgba(var(--accent-rgb), 0.32);
  background: rgba(var(--accent-rgb), 0.08);
}

.productivity-skip-break-button:hover {
  color: #fff;
  background: rgba(var(--accent-rgb), 0.16);
}

.focus-icon-button[hidden] {
  display: none !important;
}

#logoutButton.logout-button.hidden {
  display: inline-flex !important;
}

@media (max-width: 1320px) {
  .productivity-shortcuts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .productivity-countdown-feature {
    grid-template-columns: minmax(13rem, 0.72fr) 1px minmax(18rem, 1.35fr);
    gap: 1.5rem;
  }

  .productivity-countdown-feature-event {
    grid-template-columns: 5.7rem minmax(0, 1fr);
    gap: 1.1rem;
  }

  .productivity-countdown-feature-icon {
    width: 5.7rem;
    height: 5.7rem;
    font-size: 2.65rem;
  }
}

@media (max-width: 700px) {
  .productivity-shortcuts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .productivity-countdown-page {
    gap: 0.85rem;
  }

  .productivity-countdown-topline {
    align-items: stretch;
  }

  .productivity-countdown-topline > div:first-child {
    display: none;
  }

  .productivity-countdown-create {
    width: 100%;
  }

  .productivity-countdown-create .page-action-menu-shell,
  .productivity-countdown-create .page-action-pill-button {
    width: 100%;
  }

  .productivity-countdown-summary {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .productivity-countdown-summary-card {
    min-height: 4.6rem;
    grid-template-columns: 2.7rem minmax(0, 1fr);
    padding: 0.66rem 0.8rem;
  }

  .productivity-countdown-summary-icon {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1rem;
  }

  .productivity-countdown-summary-card > div {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    justify-items: start;
    gap: 0.7rem;
    text-align: left;
  }

  .productivity-countdown-summary-card strong {
    font-size: 1.55rem;
  }

  .productivity-countdown-feature {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.15rem;
  }

  .productivity-countdown-feature-divider {
    display: none;
  }

  .productivity-countdown-feature-number {
    justify-items: center;
    text-align: center;
  }

  .productivity-countdown-feature-number > strong {
    font-size: 7rem;
  }

  .productivity-countdown-feature-number > small {
    margin-top: 0.85rem;
  }

  .productivity-countdown-feature-event {
    grid-template-columns: 4.4rem minmax(0, 1fr);
    gap: 0.85rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--panel-border);
  }

  .productivity-countdown-feature-icon {
    width: 4.4rem;
    height: 4.4rem;
    font-size: 2.05rem;
  }

  .productivity-countdown-feature-copy h3 {
    max-width: none;
    font-size: 1.65rem;
  }

  .productivity-countdown-detail-button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .productivity-countdown-row {
    grid-template-columns: 2.55rem minmax(0, 1fr) auto 0.7rem;
    gap: 0.65rem;
    padding-inline: 0.75rem;
  }

  .productivity-countdown-row-date {
    display: none;
  }

  .productivity-countdown-row-days {
    white-space: nowrap;
  }

  .productivity-add-column-form {
    width: min(26rem, calc(100vw - 1rem));
    max-height: calc(100vh - 1rem);
    padding: 0.88rem;
  }

  .productivity-column-color-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .productivity-custom-color-controls {
    grid-template-columns: 2.85rem minmax(0, 1fr);
  }

  .productivity-custom-color-controls > button {
    grid-column: 1 / -1;
  }

  .productivity-custom-color-copy {
    display: grid;
    gap: 0.12rem;
  }

  .productivity-focus-alert-panel {
    grid-template-columns: 1fr;
  }

  .productivity-focus-alert-actions {
    justify-content: stretch;
  }

  .productivity-focus-alert-actions button {
    flex: 1;
  }
}

@media (max-width: 460px) {
  .productivity-shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .productivity-countdown-feature-number > strong {
    font-size: 6rem;
  }

  .productivity-countdown-feature-event {
    grid-template-columns: 3.6rem minmax(0, 1fr);
  }

  .productivity-countdown-feature-icon {
    width: 3.6rem;
    height: 3.6rem;
    font-size: 1.65rem;
  }

  .productivity-countdown-row-copy small {
    display: none;
  }
}

/* Notes behave as one continuous document instead of a title card plus a second editor. */
.notification-list .notification-item {
  grid-template-columns: minmax(0, 1fr) 2.1rem;
  min-height: 4.35rem;
}

.notification-list .notification-item-open {
  min-width: 0;
  height: 100%;
}

.notification-list .notification-item-remove {
  grid-column: 2;
  justify-self: center;
  margin-right: 0;
}

.modal-sheet-note .task-detail-title-input,
[data-productivity-note-document] .task-detail-title-input {
  display: none !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.modal-sheet-note .task-detail-property-summary,
.modal-sheet-note .task-detail-property-rows {
  display: none !important;
}

.modal-sheet-note .task-detail-canvas,
.modal-sheet-note .task-detail-note-shell,
.modal-sheet-note .task-detail-note-input {
  min-height: 0;
}

.modal-sheet-note .task-detail-note-input {
  display: block;
  min-height: clamp(30rem, 66vh, 58rem) !important;
  max-height: none !important;
  padding: 1.1rem 0 4rem;
  overflow: visible !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.72;
}

.modal-sheet-note .task-detail-note-input > :first-child {
  margin-bottom: 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 750;
  line-height: 1.18;
  color: var(--text);
}

.modal-sheet-note .task-detail-note-input[data-productivity-note-empty="true"]::before {
  content: "Escribe tu nota…";
  color: var(--muted-soft);
  pointer-events: none;
}

.productivity-note-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--panel-border);
}

.productivity-note-composer-footer small {
  color: var(--muted-soft);
  font-size: 0.76rem;
}

[data-productivity-note-composer] {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem !important;
  border: 1px solid var(--panel-border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

[data-productivity-note-composer] .task-quick-add-input {
  min-height: 9rem !important;
  max-height: 45vh;
  padding: 0.25rem !important;
  overflow-y: auto;
  resize: vertical;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .modal-sheet-note .task-detail-note-input {
    min-height: 62vh !important;
    padding-top: 0.75rem;
  }

  .productivity-note-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Compact mobile agenda: preserve the clean layout and clarify its grid. */
@media (max-width: 860px) {
  /* "es un cuadradito demasiado pequeño para el calendario donde se
     hace scroll... que pueda deslizar de arriba para abajo en toda la
     agenda y no solo dentro de ese cuadrito" - el max-height:68dvh de
     aca abajo encerraba la grilla de horas en una cajita con su propio
     scroll interno en vez de dejar que crezca con el contenido y sea
     la pagina la que se desplaza (como ya funciona el resto de la
     app). El header de dias (.calendar-agenda-head-viewport) ya usa
     position:sticky, asi que al quitar el scroll interno se sigue
     pegando arriba, ahora contra el scroll de la pagina en vez del de
     esta caja. */
  .calendar-agenda-shell,
  .calendar-agenda-desktop {
    margin-top: 0.5rem;
  }

  /* "que lo hagas mas grande porque siento que no se ve mucho, no importa
     si hay que deslizar horizontalmente en la vista de semana con tal la
     fecha y hora se mantenga sticky" - el bloque de arriba (borrado)
     forzaba cada dia a encogerse hasta caber en la pantalla
     (minmax(0,1fr) + min-width:0 con !important), que es exactamente lo
     que aplastaba el texto de las tareas a "Cep...", "hac...", etc. Se
     saca el override por completo: styles.css ya define
     min-width:980px en .calendar-agenda-grid-head/.grid-body y
     minmax(8.75rem,1fr) por dia en .calendar-agenda-day-columns (la
     misma base que usa escritorio), asi que ahora vuelve a desbordar y
     scrollear en vez de encogerse. wireCalendarAgendaScrollSync()
     (app.js) ya sincroniza el scroll horizontal del header con el del
     cuerpo, no hace falta nada nuevo en JS - solo dejar que ambos
     contenedores puedan desplazarse (ver overflow-x:auto mas abajo).*/

  .calendar-agenda-head-viewport {
    top: 0;
    z-index: 32;
    overflow-x: auto;
    overflow-y: clip;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom: 0;
    border-radius: 0.9rem 0.9rem 0 0;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
  }

  .calendar-agenda-body-viewport {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-top: 0;
    border-radius: 0 0 0.9rem 0.9rem;
  }

  .calendar-agenda-time-head,
  .calendar-agenda-all-day-label,
  .calendar-agenda-time-rail {
    position: sticky;
    left: 0;
    z-index: 5;
    background: color-mix(in srgb, var(--panel) 96%, var(--bg));
  }

  .calendar-agenda-time-head,
  .calendar-agenda-all-day-label {
    z-index: 7;
    padding-right: 0.22rem;
  }

  .calendar-agenda-time-head {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .calendar-agenda-all-day-label {
    overflow: hidden;
    font-size: 0;
    letter-spacing: 0;
  }

  .calendar-agenda-all-day-label::after {
    content: "Día";
    font-size: 0.5rem;
    letter-spacing: 0.04em;
  }

  .calendar-agenda-time-rail {
    z-index: 6;
    padding-right: 0.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.61rem;
  }

  .calendar-agenda-time-rail span,
  .calendar-agenda-slot {
    border-top-color: rgba(255, 255, 255, 0.085);
  }

  .calendar-agenda-day-column,
  .calendar-agenda-all-day-columns {
    background: rgba(255, 255, 255, 0.14);
  }

  .calendar-agenda-day-tab {
    min-width: 0;
    min-height: 3.1rem;
    padding: 0.3rem 0.08rem;
  }

  .calendar-agenda-day-tab span {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.56rem;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-agenda-day-tab strong {
    font-size: 0.82rem;
  }

  .calendar-agenda-day-tab strong.is-today {
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding-inline: 0.28rem;
  }

  .calendar-agenda-all-day {
    min-width: 0;
    padding-inline: 0.14rem;
  }

  .calendar-agenda-chip {
    min-width: 0;
    padding-inline: 0.2rem;
    font-size: 0.52rem;
  }

  .calendar-agenda-block {
    left: 0.12rem;
    right: 0.12rem;
    padding: 0.26rem 0.2rem;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
  }

  .calendar-agenda-block strong {
    font-size: 0.6rem;
    line-height: 1.08;
    -webkit-line-clamp: 3;
  }

  .calendar-agenda-block small {
    margin-top: 0.1rem;
    font-size: 0.52rem;
  }

  .calendar-agenda-now-marker {
    gap: 0.2rem;
    padding-inline: 0.12rem;
  }

  .calendar-agenda-now-badge {
    min-width: 0;
    min-height: 1.15rem;
    padding: 0.08rem 0.2rem;
    font-size: 0.5rem;
  }

  :root[data-mode="light"] .calendar-agenda-head-viewport,
  :root[data-mode="light"] .calendar-agenda-body-viewport {
    border-color: rgba(15, 23, 42, 0.13);
  }

  :root[data-mode="light"] .calendar-agenda-day-strip,
  :root[data-mode="light"] .calendar-agenda-day-column,
  :root[data-mode="light"] .calendar-agenda-all-day-columns {
    background: rgba(15, 23, 42, 0.13);
  }

  :root[data-mode="light"] .calendar-agenda-time-rail {
    border-right-color: rgba(15, 23, 42, 0.13);
  }

  :root[data-mode="light"] .calendar-agenda-time-rail span,
  :root[data-mode="light"] .calendar-agenda-slot {
    border-top-color: rgba(15, 23, 42, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .productivity-shortcut-card {
    transition: none;
  }
}

/* Configuración general y accesibilidad */
.general-settings-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.general-settings-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.general-settings-button:hover,
.general-settings-button:focus-visible,
.general-settings-button[aria-expanded="true"] {
  color: var(--accent-strong);
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.13);
  transform: translateY(-1px);
}

.general-settings-button:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.48);
  outline-offset: 2px;
}

.general-settings-dialog {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(12px);
}

.general-settings-dialog[hidden] {
  display: none;
}

.general-settings-panel {
  width: min(42rem, calc(100vw - 2rem));
  max-height: min(44rem, calc(100dvh - 2rem));
  overflow-y: auto;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.13), transparent 32%),
    #07080c;
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.66);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.general-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.15rem 1rem;
  border-bottom: 1px solid var(--panel-border);
}

.general-settings-kicker,
.general-settings-section-title {
  margin: 0 0 0.28rem;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.general-settings-head h2,
.general-settings-section-copy h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
}

.general-settings-head h2 {
  font-size: 1.45rem;
}

.general-settings-head p:last-child,
.general-settings-section-copy p:last-child,
.general-settings-device-note {
  margin: 0.32rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.general-settings-close {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.general-settings-close:hover,
.general-settings-close:focus-visible {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.12);
  outline: none;
}

.general-settings-section {
  display: grid;
  gap: 0.9rem;
  padding-top: 1rem;
}

.general-settings-section-copy {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.general-settings-section-icon {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  border-radius: 0.85rem;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}

.general-settings-section-copy h3 {
  font-size: 1.05rem;
}

.font-size-preview {
  display: grid;
  gap: 0.22rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.035);
}

.font-size-preview > span,
.font-size-preview small {
  color: var(--muted);
  font-size: 0.7rem;
}

.font-size-preview strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.font-size-preview b {
  color: var(--accent-strong);
}

.font-size-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.font-size-option {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr) 1.15rem;
  align-items: center;
  gap: 0.65rem;
  min-height: 4.35rem;
  padding: 0.65rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.font-size-option:hover,
.font-size-option:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.09);
  outline: none;
  transform: translateY(-1px);
}

.font-size-option.is-active {
  border-color: rgba(var(--accent-rgb), 0.54);
  background: rgba(var(--accent-rgb), 0.15);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.font-size-option-sample {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.75rem;
  background: rgba(var(--accent-rgb), 0.13);
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: var(--font-size-sample);
  font-weight: 800;
}

.font-size-option > span:nth-child(2) {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.font-size-option strong {
  font-size: 0.86rem;
}

.font-size-option small {
  color: var(--muted);
  font-size: 0.68rem;
}

.font-size-option-check {
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 900;
  opacity: 0;
}

.font-size-option.is-active .font-size-option-check {
  opacity: 1;
}

.general-settings-device-note {
  padding-top: 0.15rem;
  font-size: 0.72rem;
}

:root[data-mode="light"] .general-settings-dialog {
  background: rgba(15, 23, 42, 0.34);
}

:root[data-mode="light"] .general-settings-panel {
  border-color: rgba(15, 23, 42, 0.13);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 34%),
    #ffffff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

:root[data-mode="light"] .font-size-preview,
:root[data-mode="light"] .font-size-option,
:root[data-mode="light"] .general-settings-close {
  border-color: rgba(15, 23, 42, 0.1);
  background-color: rgba(15, 23, 42, 0.035);
}

@media (max-width: 620px) {
  .general-settings-dialog {
    align-items: end;
    padding: 0.55rem;
  }

  .general-settings-panel {
    width: 100%;
    max-height: calc(100dvh - 1.1rem);
    padding: 1rem;
    border-radius: 1.25rem;
  }

  .font-size-option-grid {
    grid-template-columns: 1fr;
  }

  .font-size-option {
    min-height: 3.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .general-settings-button,
  .font-size-option {
    transition: none;
  }
}
