/* Tasques — aspecto de app de Apple: limpio, con los colores y tamaños de iOS. */

:root {
  --red: #ff3b30; --orange: #ff9500; --yellow: #ffcc00; --green: #34c759; --mint: #00c7be;
  --teal: #30b0c7; --blue: #007aff; --indigo: #5856d6; --purple: #af52de; --pink: #ff2d55;
  --brown: #a2845e; --gray: #8e8e93;
  --accent: var(--blue);
  --side-bg: #f2f2f7; --side-cell: #ffffff;
  --main-bg: #ffffff;
  --form-bg: #f2f2f7; --form-cell: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-strong: rgba(118, 118, 128, 0.2);
  --sep: rgba(60, 60, 67, 0.2);
  --text: #000000; --text-2: rgba(60, 60, 67, 0.62); --text-3: rgba(60, 60, 67, 0.32);
  --bar: rgba(255, 255, 255, 0.82);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  --fs: 17px; --fs-small: 15px; --fs-foot: 13px; --fs-large: 34px; --row: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --red: #ff453a; --orange: #ff9f0a; --yellow: #ffd60a; --green: #30d158; --mint: #63e6e2;
    --teal: #40c8e0; --blue: #0a84ff; --indigo: #5e5ce6; --purple: #bf5af2; --pink: #ff375f;
    --brown: #ac8e68; --gray: #98989d;
    --side-bg: #000000; --side-cell: #1c1c1e; --main-bg: #000000;
    --form-bg: #1c1c1e; --form-cell: #2c2c2e;
    --fill: rgba(118, 118, 128, 0.24); --fill-strong: rgba(118, 118, 128, 0.36);
    --sep: rgba(84, 84, 88, 0.65);
    --text: #ffffff; --text-2: rgba(235, 235, 245, 0.62); --text-3: rgba(235, 235, 245, 0.3);
    --bar: rgba(22, 22, 24, 0.82);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --red: #ff453a; --orange: #ff9f0a; --yellow: #ffd60a; --green: #30d158; --mint: #63e6e2;
  --teal: #40c8e0; --blue: #0a84ff; --indigo: #5e5ce6; --purple: #bf5af2; --pink: #ff375f;
  --brown: #ac8e68; --gray: #98989d;
  --side-bg: #000000; --side-cell: #1c1c1e; --main-bg: #000000;
  --form-bg: #1c1c1e; --form-cell: #2c2c2e;
  --fill: rgba(118, 118, 128, 0.24); --fill-strong: rgba(118, 118, 128, 0.36);
  --sep: rgba(84, 84, 88, 0.65);
  --text: #ffffff; --text-2: rgba(235, 235, 245, 0.62); --text-3: rgba(235, 235, 245, 0.3);
  --bar: rgba(22, 22, 24, 0.82);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* Con ratón (ordenador), letra algo más pequeña, como en el Mac. */
@media (pointer: fine) {
  :root { --fs: 15px; --fs-small: 13.5px; --fs-foot: 12px; --fs-large: 30px; --row: 38px; }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: var(--fs); color: var(--text); background: var(--main-bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { display: block; flex: none; }
[hidden] { display: none !important; }

/* ——— Estructura ——— */
.app { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.app.with-detail { grid-template-columns: 300px minmax(0, 1fr) 380px; }
.sidebar {
  background: var(--side-bg); border-right: 0.5px solid var(--sep); overflow-y: auto;
  padding: calc(var(--safe-top) + 12px) 14px calc(var(--safe-bottom) + 12px);
  display: flex; flex-direction: column; gap: 14px;
}
.sidebar > * { flex-shrink: 0; }
.main { background: var(--main-bg); overflow-y: auto; position: relative; display: flex; flex-direction: column; }
.detail { background: var(--form-bg); border-left: 0.5px solid var(--sep); overflow-y: auto; }

/* Móvil: una pantalla cada vez. */
@media (max-width: 759px) {
  .app, .app.with-detail { grid-template-columns: 100%; }
  .app[data-screen="home"] .main { display: none; }
  .app[data-screen="main"] .sidebar { display: none; }
  .sidebar { border-right: 0; padding-left: 16px; padding-right: 16px; }
}

/* Tableta y ventanas medianas: el detalle sale como hoja encima. */
@media (max-width: 1179px) {
  .app.with-detail { grid-template-columns: 300px minmax(0, 1fr); }
  .detail {
    position: fixed; z-index: 40; inset: auto 0 0 0; height: 92dvh; border: 0;
    border-radius: 14px 14px 0 0; box-shadow: var(--shadow);
    animation: sheet-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  }
  .scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.32); animation: fade 0.2s; }
}
@media (min-width: 760px) and (max-width: 1179px) {
  .detail { inset: 6dvh auto auto 50%; transform: translateX(-50%); width: min(520px, 92vw); height: 86dvh; border-radius: 14px; animation: fade 0.2s; }
}
@media (max-width: 759px) {
  .app.with-detail { grid-template-columns: 100%; }
}
@media (min-width: 1180px) {
  .scrim { display: none; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ——— Barra lateral (inicio) ——— */
.home-title { font-size: var(--fs-large); font-weight: 700; margin: 6px 4px 0; letter-spacing: 0.2px; }
.search {
  display: flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 10px;
  padding: 0 10px; height: 36px; color: var(--text-2);
}
.search input { flex: 1; border: 0; background: none; height: 100%; min-width: 0; color: var(--text); }
.search input::placeholder { color: var(--text-2); }

.segmented { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; }
.segmented button {
  flex: 1; padding: 5px 8px; border-radius: 7px; font-size: var(--fs-foot); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.segmented button.on { background: var(--side-cell); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); font-weight: 600; }
.main .segmented button.on, .detail .segmented button.on { background: var(--main-bg); }
.detail .segmented button.on { background: var(--form-cell); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  background: var(--side-cell); border-radius: 12px; padding: 9px 10px 8px 10px; text-align: left;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; row-gap: 6px; align-items: center;
}
.tile .badge { width: 30px; height: 30px; }
.tile .count { text-align: right; font-size: 26px; font-weight: 700; line-height: 1; }
.tile .label { grid-column: 1 / -1; font-weight: 600; color: var(--text-2); font-size: var(--fs-small); }
.tile.on { outline: 2px solid var(--tile-c, var(--accent)); outline-offset: -2px; }
.tile.wide { grid-column: 1 / -1; }

.badge {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--c, var(--blue)); color: #fff; flex: none;
}

.section-head {
  display: flex; align-items: center; justify-content: space-between; margin: 6px 4px -4px;
  font-size: 20px; font-weight: 700;
}
.section-head .add { color: var(--accent); font-size: var(--fs-small); font-weight: 500; display: flex; align-items: center; gap: 2px; }
.group-label { margin: 4px 14px -6px; font-size: var(--fs-foot); font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.3px; }

.card { background: var(--side-cell); border-radius: 12px; overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--row);
  padding: 7px 14px; text-align: left; position: relative;
}
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 56px; border-top: 0.5px solid var(--sep);
}
.row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .count { color: var(--text-2); font-variant-numeric: tabular-nums; }
.row.on { background: var(--fill); }
@media (hover: hover) { .row:hover, .tile:hover { filter: brightness(0.97); } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  padding: 5px 10px; border-radius: 16px; background: var(--side-cell); font-size: var(--fs-small);
  color: var(--text); display: inline-flex; gap: 4px; align-items: center;
}
.tag-chip.on { background: var(--accent); color: #fff; }
.tag-chip .n { color: var(--text-2); font-size: var(--fs-foot); }
.tag-chip.on .n { color: rgba(255, 255, 255, 0.8); }

.side-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 4px 0; }
@media (max-width: 759px) {
  .sidebar { padding-bottom: 0; }
  .side-foot {
    position: sticky; bottom: 0; z-index: 5; margin: auto -16px 0; padding: 10px 16px calc(var(--safe-bottom) + 10px);
    background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--sep);
  }
}
.link-btn { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs); padding: 6px 2px; }

/* ——— Pantalla principal ——— */
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: calc(var(--safe-top) + 6px) 12px 6px; min-height: 44px;
  background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.topbar .back { color: var(--accent); display: flex; align-items: center; gap: 2px; font-size: var(--fs); padding: 4px 4px 4px 0; }
.topbar .actions { display: flex; gap: 4px; margin-left: auto; }
.icon-btn { color: var(--accent); width: 36px; height: 36px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) { .icon-btn:hover { background: var(--fill); } }
@media (min-width: 760px) { .topbar .back { display: none; } }

.content { padding: 0 20px 28px; max-width: 980px; width: 100%; }
.view-title { font-size: var(--fs-large); font-weight: 700; margin: 4px 0 2px; color: var(--title-c, var(--text)); letter-spacing: 0.2px; overflow-wrap: anywhere; }
.view-sub { color: var(--text-2); font-size: var(--fs-small); margin-bottom: 12px; }
.view-tools { display: flex; gap: 10px; align-items: center; margin: 10px 0 6px; flex-wrap: wrap; }
.view-tools .segmented { min-width: 240px; }

.sec-title { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 2px; font-size: 20px; font-weight: 700; color: var(--sec-c, var(--text)); }
.sec-title small { font-size: var(--fs-small); font-weight: 500; color: var(--text-2); }
.sec-title.red { --sec-c: var(--red); }

.empty { color: var(--text-2); text-align: center; padding: 48px 20px; }
.empty .big { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* Tarea */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0 10px; position: relative; cursor: default; }
.task + .task::before { content: ""; position: absolute; top: 0; left: 36px; right: 0; border-top: 0.5px solid var(--sep); }
.task.selected { background: var(--fill); border-radius: 10px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.task.selected + .task::before, .task.selected::before { display: none; }
.check {
  width: 24px; height: 24px; border-radius: 50%; flex: none; margin-top: 0;
  border: 1.6px solid var(--text-3); display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}
.check::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); transform: scale(0); transition: transform 0.18s; }
@media (hover: hover) { .check:hover { border-color: var(--c); } }
.task.is-done .check, .task.completing .check { border-color: var(--c); }
.task.is-done .check::after, .task.completing .check::after { transform: scale(1); }
.task.completing { opacity: 0.55; transition: opacity 0.6s 0.2s; }
.task-body { flex: 1; min-width: 0; cursor: pointer; padding-top: 1px; }
.task-title { line-height: 1.3; overflow-wrap: anywhere; }
.task.is-done .task-title { color: var(--text-2); }
.prio { color: var(--c); font-weight: 700; margin-right: 4px; }
.task-notes { color: var(--text-2); font-size: var(--fs-small); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: var(--fs-small); color: var(--text-2); align-items: center; }
.meta span { display: inline-flex; align-items: center; gap: 3px; }
.meta .late { color: var(--red); }
.meta .list-name { color: var(--c); }
.meta .ic { width: 14px; height: 14px; }
.tag-text { color: var(--accent); }

.add-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.add-row .check { border-style: dashed; }
.add-row input { flex: 1; border: 0; background: none; padding: 2px 0; min-width: 0; }
.bottombar {
  position: sticky; bottom: 0; z-index: 5; margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px calc(var(--safe-bottom) + 10px); background: var(--bar);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
}
.new-task-btn { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs); padding: 4px 0; }
.new-task-btn .plus { width: 24px; height: 24px; border-radius: 12px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; }

/* Planificado: semana y mes */
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav .label { font-weight: 600; min-width: 140px; text-align: center; }
.small-btn { padding: 5px 12px; border-radius: 16px; background: var(--fill); font-size: var(--fs-small); font-weight: 500; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.day-col { background: var(--form-bg); border-radius: 12px; padding: 8px; min-height: 180px; display: flex; flex-direction: column; gap: 6px; }
.day-col .day-head { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-small); color: var(--text-2); padding: 0 2px 2px; }
.day-col .day-head b { font-size: 20px; color: var(--text); font-weight: 600; }
.day-col.today .day-head b { color: #fff; background: var(--red); border-radius: 14px; padding: 0 7px; }
.chip {
  display: block; width: 100%; text-align: left; font-size: var(--fs-foot); line-height: 1.25; padding: 6px 7px;
  border-radius: 8px; background: var(--form-cell); border-left: 3px solid var(--c); overflow-wrap: anywhere;
}
.chip .t { color: var(--text-2); font-variant-numeric: tabular-nums; margin-right: 4px; }
.chip.ghost { opacity: 0.55; border-left-style: dashed; }
.chip .ic { display: inline-block; vertical-align: -2px; width: 12px; height: 12px; margin-left: 3px; }
@media (max-width: 899px) {
  .week { grid-template-columns: 1fr; }
  .day-col { min-height: 0; }
}

.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 12px; border-top: 0.5px solid var(--sep); }
.month-grid .wd { text-align: center; font-size: var(--fs-foot); color: var(--text-2); padding: 6px 0; font-weight: 600; }
.cell {
  min-height: 92px; border-bottom: 0.5px solid var(--sep); padding: 4px; text-align: left; display: flex;
  flex-direction: column; gap: 3px; align-items: stretch; overflow: hidden;
}
.cell .n { align-self: center; font-size: var(--fs-small); width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; }
.cell.other { color: var(--text-3); }
.cell.today .n { background: var(--red); color: #fff; font-weight: 700; }
.cell.sel .n { background: var(--text); color: var(--main-bg); font-weight: 700; }
.cell.today.sel .n { background: var(--red); }
.cell .mini { font-size: 11px; line-height: 1.2; padding: 2px 4px; border-radius: 4px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .mini.ghost { opacity: 0.5; }
.cell .more { font-size: 11px; color: var(--text-2); padding-left: 4px; }
.cell .dots { display: none; gap: 3px; justify-content: center; }
.cell .dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--c); }
.cell .dots i.ghost { opacity: 0.4; }
@media (max-width: 759px) {
  .cell { min-height: 54px; align-items: center; }
  .cell .mini, .cell .more { display: none; }
  .cell .dots { display: flex; }
}

/* ——— Detalle de una tarea y formularios ——— */
.sheet-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--form-bg); border-bottom: 0.5px solid var(--sep);
}
.sheet-head h2 { margin: 0; font-size: var(--fs); font-weight: 600; }
.sheet-head .text-btn { color: var(--accent); font-size: var(--fs); padding: 4px; min-width: 60px; }
.sheet-head .text-btn.strong { font-weight: 600; text-align: right; }
.form { padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.group { background: var(--form-cell); border-radius: 12px; overflow: hidden; }
.group-title { margin: 0 14px -12px; font-size: var(--fs-foot); color: var(--text-2); text-transform: uppercase; letter-spacing: 0.3px; }
.field { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: var(--row); position: relative; }
.field + .field::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; border-top: 0.5px solid var(--sep); }
.field.plain + .field::before, .field + .field.plain::before { left: 14px; }
.field .ico { width: 28px; height: 28px; border-radius: 7px; color: #fff; display: inline-flex; align-items: center; justify-content: center; background: var(--c, var(--gray)); flex: none; }
.field .lbl { flex: 1; min-width: 0; }
.field .lbl small { display: block; color: var(--accent); font-size: var(--fs-foot); }
.field .val { color: var(--text-2); }
.field input[type="date"], .field input[type="time"], .field input[type="number"], .field select, .field input[type="text"] {
  border: 0; background: var(--fill); border-radius: 8px; padding: 6px 8px; min-height: 32px;
}
.field input[type="number"] { width: 64px; text-align: center; }
.field.stack { flex-direction: column; align-items: stretch; padding: 10px 14px; gap: 10px; }
.field.wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.title-input, .notes-input {
  width: 100%; border: 0; background: none; resize: none; padding: 12px 14px; display: block; overflow: hidden;
}
.title-input { font-size: 20px; font-weight: 600; }
.notes-input { color: var(--text); border-top: 0.5px solid var(--sep); min-height: 64px; }
.notes-input::placeholder, .title-input::placeholder { color: var(--text-3); }

.toggle { position: relative; width: 51px; height: 31px; flex: none; }
.toggle input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 16px; background: var(--fill-strong); transition: background 0.2s; }
.toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22); transition: transform 0.2s; }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(20px); }
@media (pointer: fine) {
  .toggle { width: 40px; height: 24px; }
  .toggle span::after { width: 20px; height: 20px; }
  .toggle input:checked + span::after { transform: translateX(16px); }
}

.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { padding: 5px 11px; border-radius: 15px; background: var(--fill); font-size: var(--fs-small); }
.quick button.on { background: var(--accent); color: #fff; }

.weekdays { display: flex; gap: 6px; }
.weekdays button { width: 36px; height: 36px; border-radius: 18px; background: var(--fill); font-weight: 600; font-size: var(--fs-small); }
.weekdays button.on { background: var(--accent); color: #fff; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rule-summary { color: var(--text-2); font-size: var(--fs-small); }
.rule-summary b { color: var(--text); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .tag-chip { background: var(--fill); }
.chips .tag-chip button { color: var(--text-2); display: inline-flex; }
.chips input { flex: 1; min-width: 120px; border: 0; background: none; padding: 6px 0; }

.step { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: var(--row); position: relative; }
.step + .step::before, .step-add::before { content: ""; position: absolute; top: 0; left: 48px; right: 0; border-top: 0.5px solid var(--sep); }
.step .check { width: 22px; height: 22px; --c: var(--accent); }
.step .check::after { width: 12px; height: 12px; }
.step.is-done .check { border-color: var(--c); }
.step.is-done .check::after { transform: scale(1); }
.step input { flex: 1; border: 0; background: none; min-width: 0; padding: 8px 0; }
.step.is-done input { color: var(--text-2); text-decoration: line-through; }
.step .x { color: var(--text-3); padding: 6px; }
.step-add { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: var(--row); color: var(--accent); }
.step-add input { flex: 1; border: 0; background: none; padding: 8px 0; }
.step-add input::placeholder { color: var(--accent); }

.danger { color: var(--red); width: 100%; padding: 12px; text-align: center; }
.foot-note { color: var(--text-2); font-size: var(--fs-foot); text-align: center; margin: -4px 0 0; }

.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; justify-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); position: relative; }
.swatch.on::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid var(--text-3); }
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; justify-items: center; }
.icon-pick { width: 40px; height: 40px; border-radius: 50%; background: var(--fill); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.icon-pick.on { background: var(--c); color: #fff; }
.name-input { width: 100%; text-align: center; font-size: 22px; font-weight: 700; border: 0; border-radius: 10px; background: var(--fill); padding: 10px; color: var(--c); }

/* Hojas (crear o editar una lista) */
.modal-scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.32); display: flex; align-items: center; justify-content: center; animation: fade 0.2s; }
.modal { background: var(--form-bg); width: min(440px, 94vw); max-height: 90dvh; overflow-y: auto; border-radius: 14px; box-shadow: var(--shadow); }
@media (max-width: 759px) {
  .modal-scrim { align-items: flex-end; }
  .modal { width: 100%; border-radius: 14px 14px 0 0; max-height: 94dvh; animation: sheet-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1); padding-bottom: var(--safe-bottom); }
}

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--safe-bottom) + 84px); transform: translateX(-50%);
  background: rgba(30, 30, 32, 0.92); color: #fff; padding: 10px 14px; border-radius: 12px; font-size: var(--fs-small);
  display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); animation: fade 0.2s; max-width: 92vw;
}
.toast button { color: #64b5ff; font-weight: 600; }

.banner { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: var(--fs-small); }
