:root {
  color-scheme: light;
  --app-bg: #f7f9fc;
  --panel: #ffffff;
  --panel-soft: #fbfcff;
  --row: #ffffff;
  --field: #f8fafd;
  --field-strong: #eef3f8;
  --text: #101d35;
  --muted: #65728a;
  --quiet: #9aa7ba;
  --line: rgba(34, 55, 88, 0.1);
  --line-soft: rgba(34, 55, 88, 0.07);
  --blue: #2f74e0;
  --blue-dark: #1f55aa;
  --blue-soft: #eef5ff;
  --complete: #eff8f5;
  --danger: #d05c57;
  --shadow-panel: 0 18px 48px rgba(28, 48, 78, 0.08);
  --shadow-soft: 0 8px 20px rgba(28, 48, 78, 0.055);
  --shadow-dock: 0 -12px 34px rgba(28, 48, 78, 0.12);
  --swipe-width: 124px;
  --app-safe-area-top: var(--native-safe-area-top, env(safe-area-inset-top, 0px));
  --app-safe-area-right: var(--native-safe-area-right, env(safe-area-inset-right, 0px));
  --app-safe-area-bottom: var(--native-safe-area-bottom, env(safe-area-inset-bottom, 0px));
  --app-safe-area-left: var(--native-safe-area-left, env(safe-area-inset-left, 0px));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  /* clip (not hidden) keeps horizontal overflow contained without turning the
     body into a scroll container, which would break the sticky list header. */
  overflow-x: clip;
}

body {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(47, 116, 224, 0.055), transparent 28rem),
    linear-gradient(180deg, #fcfdff 0%, var(--app-bg) 100%);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  width: 100%;
  border: none;
  color: var(--text);
  background: transparent;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid rgba(47, 116, 224, 0.18);
  outline-offset: 2px;
}

.app-shell {
  width: min(680px, 100%);
  overflow: visible;
  margin: 0 auto;
  padding:
    calc(0.9rem + var(--app-safe-area-top))
    max(0.9rem, var(--app-safe-area-right))
    calc(8.9rem + var(--app-safe-area-bottom))
    max(0.9rem, var(--app-safe-area-left));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.2rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  position: relative;
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  border: 1px solid rgba(47, 116, 224, 0.18);
  border-radius: 10px;
  background: var(--blue-soft);
}

.brand-mark::before {
  content: "";
  position: absolute;
  top: -0.32rem;
  left: 0.52rem;
  width: 0.62rem;
  height: 0.38rem;
  border: 1.5px solid var(--blue);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.45rem 0.45rem auto;
  height: 1.5px;
  border-radius: 999px;
  background: rgba(47, 116, 224, 0.45);
  box-shadow: 0 0.38rem 0 rgba(47, 116, 224, 0.25);
}

.topbar h1 {
  margin: 0;
  font-size: 1.72rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.app-main {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}

.list-strip-header > *,
.active-header > *,
.sticky-add-bar > * {
  min-width: 0;
}

/* ---------- List strip (compact chips) ---------- */

.list-strip {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0.9rem 1rem 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.list-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.list-strip-title-button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.35rem 0.3rem 0;
  margin: -0.3rem 0 -0.3rem -0.35rem;
  background: none;
  border: none;
  border-radius: 8px;
  transition: opacity 140ms ease, transform 140ms ease;
}

.list-strip-title-button::after {
  content: "";
  width: 0.36rem;
  height: 0.36rem;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.7;
}

.list-strip-title-button:active {
  opacity: 0.55;
}

.list-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.8rem 0.1rem 0.15rem;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.list-pills::-webkit-scrollbar {
  display: none;
}

.list-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 14rem;
  padding: 0.55rem 0.75rem 0.55rem 0.9rem;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  scroll-snap-align: start;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.list-pill:active {
  transform: scale(0.97);
}

.list-pill.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.list-pill-name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-pill-count {
  flex: 0 0 auto;
  padding: 0.08rem 0.5rem;
  color: var(--muted);
  background: var(--field-strong);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.list-pill-count.is-complete {
  color: var(--blue-dark);
  background: #e6f6f0;
}

.list-pill.active .list-pill-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
}

/* ---------- Active list ---------- */

.active-list {
  width: 100%;
  max-width: 100%;
  overflow: visible;
  min-height: 53vh;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  box-shadow: var(--shadow-panel);
}

.active-header {
  position: sticky;
  top: calc(0.7rem + var(--app-safe-area-top));
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.7rem 0.7rem 0.8rem 0.95rem;
  background: var(--panel);
  border: 1px solid rgba(47, 116, 224, 0.22);
  border-radius: 14px;
  box-shadow: 0 12px 18px -14px rgba(28, 48, 78, 0.3);
}

.active-header-copy {
  min-width: 0;
  flex: 1;
}

.active-header h2,
.empty-view h2 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
}

.active-header h2 {
  overflow: hidden;
  font-size: 1.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-view h2 {
  font-size: 1rem;
  font-weight: 500;
}

.active-list-summary,
.empty-view p,
.inline-empty {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.active-list.complete .active-list-summary {
  color: var(--blue-dark);
}

.progress-track {
  height: 0.46rem;
  margin-top: 0.72rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--field-strong);
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #5d9df6);
  transition: width 280ms ease;
}

.progress-fill.complete {
  background: linear-gradient(90deg, var(--blue), #41b883);
}

.active-list.complete .progress-track {
  background: #e6f6f0;
}

.empty-view {
  display: grid;
  gap: 0.36rem;
  align-content: center;
  min-height: 100%;
  padding: 1.4rem 0.1rem;
}

#list-view {
  display: grid;
  gap: 1rem;
}

.inline-empty {
  padding: 1.15rem 0.2rem 0.2rem;
  color: var(--muted);
}

/* ---------- Buttons ---------- */

.mini-button,
.icon-button,
.sticky-add-bar button,
.swipe-action,
.sheet-button,
.sheet-cancel,
.item-menu-button,
.drag-handle {
  border: none;
  border-radius: 999px;
}

.mini-button {
  min-height: 2.35rem;
  padding: 0.48rem 0.9rem;
  color: #fff;
  background: var(--blue);
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 7px 16px rgba(47, 116, 224, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.icon-button svg,
.item-menu-button svg,
.drag-handle svg {
  fill: currentColor;
}

.mini-button:active,
.icon-button:active,
.sticky-add-bar button:active,
.sheet-button:active,
.sheet-cancel:active,
.item-menu-button:active {
  transform: scale(0.985);
}

/* ---------- Items ---------- */

.items-shell {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.items {
  display: grid;
}

.section-heading {
  margin: 0;
  padding: 0.7rem 0.85rem 0.4rem;
  color: var(--quiet);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-heading:not(:first-child) {
  margin-top: 0.1rem;
  border-top: 1px solid var(--line-soft);
}

.item-row {
  position: relative;
  overflow: hidden;
  background: var(--row);
  scroll-margin-bottom: 12rem;
  transition: background-color 170ms ease, opacity 170ms ease;
}

.item-row + .item-row {
  border-top: 1px solid var(--line-soft);
}

.item-row.packed {
  background: var(--complete);
}

.item-row.note-open {
  background: #f7fbff;
}

.item-row.dragging {
  z-index: 10;
  overflow: visible;
  border-radius: 12px;
  border-top-color: transparent;
  background: #fff;
  box-shadow: 0 16px 34px rgba(28, 48, 78, 0.22);
  transition: none;
  will-change: transform;
}

.item-row.dragging .item-main {
  transform: none;
  transition: none;
}

/* let a lifted row escape the card while reordering */
.items-shell.reordering {
  overflow: visible;
}

body.reordering {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.item-actions-swipe {
  position: absolute;
  inset: 0 0 0 auto;
  width: var(--swipe-width);
  display: flex;
  /* Don't paint the Note/Delete buttons until the row is actually swiped,
     otherwise they can bleed through sub-pixel seams (e.g. while reordering). */
  visibility: hidden;
}

.item-row.swiped .item-actions-swipe {
  visibility: visible;
}

.swipe-action {
  width: 50%;
  color: #fff;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 500;
}

.note-action {
  background: #5a8eea;
}

.delete-action {
  background: var(--danger);
}

.item-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  min-height: 3.35rem;
  padding: 0.72rem 0.6rem 0.72rem 0.85rem;
  background: inherit;
  transform: translateX(0);
  transition: transform 180ms ease, background-color 170ms ease;
}

.item-row.swiped .item-main {
  transform: translateX(calc(var(--swipe-width) * -1));
}

.item-check {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.26rem;
}

.item-checkbox {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
}

.checkbox-ui {
  position: relative;
  width: 1.42rem;
  height: 1.42rem;
  border: 1.4px solid rgba(52, 77, 113, 0.28);
  border-radius: 999px;
  background: #fff;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.checkbox-ui::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.27rem;
  width: 0.32rem;
  height: 0.56rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(38deg) scale(0.6);
  transition: opacity 140ms ease, transform 160ms ease;
}

.item-checkbox:checked + .checkbox-ui {
  border-color: var(--blue);
  background: var(--blue);
  transform: scale(1.03);
}

.item-checkbox:checked + .checkbox-ui::after {
  opacity: 1;
  transform: rotate(38deg) scale(1);
}

.item-content {
  min-width: 0;
  flex: 1;
}

.item-name-input {
  display: block;
  min-width: 0;
  padding: 0.38rem 0;
  color: var(--text);
  background: transparent;
  border-radius: 10px;
  font-weight: 400;
  font-family: inherit;
  line-height: 1.35;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transition: background-color 160ms ease, box-shadow 160ms ease, padding 160ms ease;
}

.item-name-input:focus {
  padding-inline: 0.58rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(47, 116, 224, 0.14);
}

.item-name-input.packed {
  color: var(--quiet);
  text-decoration: line-through;
}

.note-preview {
  display: block;
  max-width: 100%;
  margin-top: 0.28rem;
  padding: 0;
  overflow: hidden;
  color: var(--blue-dark);
  background: transparent;
  border: none;
  font-size: 0.8rem;
  font-weight: 400;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-preview.is-collapse-control {
  color: var(--muted);
  font-weight: 500;
}

.note-editor {
  display: block;
  margin-top: 0.44rem;
  animation: revealNote 180ms ease;
}

.item-note {
  min-height: 3.6rem;
  padding: 0.65rem 0.72rem;
  background: var(--field);
  border-radius: 12px;
}

.drag-handle {
  align-self: center;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  color: var(--quiet);
  background: transparent;
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
  opacity: 0.5;
  transition: opacity 140ms ease, background-color 140ms ease;
}

.drag-handle:active {
  cursor: grabbing;
}

.item-menu-button {
  align-self: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  opacity: 0.45;
  transition: opacity 140ms ease, background-color 140ms ease, transform 140ms ease;
}

/* ---------- Sticky add bar + mode slider ---------- */

.sticky-add-bar {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  display: grid;
  width: min(680px, 100%);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  padding:
    0.82rem
    max(0.9rem, var(--app-safe-area-right))
    calc(0.95rem + var(--app-safe-area-bottom))
    max(0.9rem, var(--app-safe-area-left));
  background: linear-gradient(180deg, rgba(247, 249, 252, 0), rgba(247, 249, 252, 0.94) 34%);
  transform: translateX(-50%);
}

.sticky-add-bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0.45rem max(0.55rem, var(--app-safe-area-right)) calc(0.55rem + var(--app-safe-area-bottom))
    max(0.55rem, var(--app-safe-area-left));
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-dock);
}

.add-mode-switch {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: fit-content;
  padding: 0.2rem;
  margin-bottom: 0.15rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.add-mode-thumb {
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: 0.2rem;
  width: calc(50% - 0.2rem);
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 5px 12px rgba(47, 116, 224, 0.32);
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.add-mode-switch[data-mode="todo"] .add-mode-thumb {
  transform: translateX(100%);
}

.add-mode-button {
  position: relative;
  z-index: 1;
  min-height: 2rem;
  padding: 0.34rem 1.15rem;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 200ms ease;
}

.add-mode-button.is-active {
  color: #fff;
}

.sticky-add-bar input {
  padding: 0.86rem 0.95rem;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.sticky-add-bar button[type="submit"] {
  min-width: 4.8rem;
  padding: 0.86rem 1rem;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 9px 18px rgba(47, 116, 224, 0.22);
  font-weight: 500;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.sticky-add-bar button span {
  display: inline-block;
  margin-right: 0.15rem;
  font-weight: 400;
}

/* ---------- Sheets & modal ---------- */

.sheet-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgba(16, 29, 53, 0.28);
  backdrop-filter: blur(4px);
}

#modal-backdrop {
  z-index: 85;
}

.action-sheet {
  position: fixed;
  z-index: 90;
  right: 0;
  bottom: 0;
  left: 0;
  padding:
    0.62rem
    max(0.9rem, var(--app-safe-area-right))
    calc(0.78rem + var(--app-safe-area-bottom))
    max(0.9rem, var(--app-safe-area-left));
  background: var(--panel);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 34px rgba(16, 29, 53, 0.16);
  animation: slideSheet 180ms ease;
}

.sheet-handle {
  width: 2.5rem;
  height: 0.24rem;
  margin: 0 auto 0.68rem;
  border-radius: 999px;
  background: rgba(16, 29, 53, 0.16);
}

.sheet-title {
  margin: 0 0 0.68rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
}

.sheet-actions {
  display: grid;
  gap: 0.5rem;
}

.sheet-button,
.sheet-cancel {
  width: 100%;
  padding: 0.9rem 1rem;
  color: var(--text);
  background: var(--field);
  border: none;
  border-radius: 999px;
  font-weight: 400;
}

.sheet-button.danger {
  color: rgba(208, 92, 87, 0.9);
}

.sheet-cancel {
  margin-top: 0.58rem;
  color: var(--muted);
}

.new-list-modal {
  position: fixed;
  z-index: 90;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 90vh;
  overflow-y: auto;
  padding:
    0.62rem
    max(1rem, var(--app-safe-area-right))
    calc(1rem + var(--app-safe-area-bottom))
    max(1rem, var(--app-safe-area-left));
  background: var(--panel);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 34px rgba(16, 29, 53, 0.16);
  animation: slideSheet 180ms ease;
}

.modal-title {
  margin: 0.2rem 0 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

.modal-form {
  display: grid;
  gap: 0.6rem;
}

.modal-label {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.modal-form input,
.paste-import-textarea {
  padding: 0.78rem 0.9rem;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.paste-import-textarea {
  min-height: 9rem;
  font-family: inherit;
  line-height: 1.4;
  resize: vertical;
}

.modal-hint {
  margin: 0.2rem 0 0;
  color: var(--quiet);
  font-size: 0.78rem;
  line-height: 1.4;
}

.modal-hint strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- All-lists modal ---------- */

.lists-modal {
  position: fixed;
  z-index: 90;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  padding:
    0.62rem
    max(1rem, var(--app-safe-area-right))
    calc(1rem + var(--app-safe-area-bottom))
    max(1rem, var(--app-safe-area-left));
  background: var(--panel);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 34px rgba(16, 29, 53, 0.16);
  animation: slideSheet 180ms ease;
}

.lists-modal .modal-title {
  margin-bottom: 0.15rem;
}

.lists-modal .modal-hint {
  margin-bottom: 0.6rem;
  text-align: center;
}

.all-lists {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0.5rem;
  overflow-y: auto;
  padding: 0.15rem 0.1rem 0.3rem;
  -webkit-overflow-scrolling: touch;
}

.all-list-row {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background-color 170ms ease, border-color 170ms ease;
}

.all-list-row.active {
  background: var(--blue-soft);
  border-color: rgba(47, 116, 224, 0.45);
}

.all-list-row.dragging {
  z-index: 5;
  background: #fff;
  box-shadow: 0 16px 34px rgba(28, 48, 78, 0.22);
  transition: none;
  will-change: transform;
}

.all-list-select {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.78rem 0.85rem;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 14px 0 0 14px;
}

.all-list-row.active .all-list-select {
  color: var(--blue-dark);
}

.all-list-row-name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.all-list-row-count {
  flex: 0 0 auto;
  padding: 0.08rem 0.5rem;
  color: var(--muted);
  background: var(--field-strong);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.all-list-row-count.is-complete {
  color: var(--blue-dark);
  background: #e6f6f0;
}

.all-list-row.active .all-list-row-count {
  color: #fff;
  background: var(--blue);
}

.all-list-row .drag-handle {
  margin: auto 0.3rem auto 0;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.option-card {
  display: grid;
  gap: 0.12rem;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  text-align: left;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.option-card.is-active {
  background: var(--blue-soft);
  border-color: rgba(47, 116, 224, 0.45);
}

.option-title {
  font-size: 0.92rem;
  font-weight: 500;
}

.option-sub {
  color: var(--muted);
  font-size: 0.76rem;
}

.season-grid {
  grid-template-columns: repeat(4, 1fr);
}

.season-grid .option-card {
  justify-items: center;
  text-align: center;
  font-size: 0.85rem;
}

.modal-submit {
  min-height: 2.85rem;
  margin-top: 0.8rem;
  color: #fff;
  background: var(--blue);
  border: none;
  border-radius: 999px;
  font-weight: 500;
  box-shadow: 0 9px 18px rgba(47, 116, 224, 0.22);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes revealNote {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideSheet {
  from {
    transform: translateY(12px);
  }

  to {
    transform: translateY(0);
  }
}

@media (hover: hover) {
  .item-row:hover {
    background: #fbfdff;
  }

  .item-row:hover .item-menu-button,
  .item-row:hover .drag-handle,
  .item-menu-button:hover,
  .drag-handle:hover {
    opacity: 1;
  }

  .list-pill:hover,
  .mini-button:hover,
  .icon-button:hover,
  .list-strip-title-button:hover {
    transform: translateY(-1px);
  }

  .item-menu-button:hover,
  .drag-handle:hover {
    background: rgba(16, 29, 53, 0.045);
  }

  .all-list-row:hover {
    border-color: rgba(47, 116, 224, 0.32);
  }
}

/* ---------- Static info pages ---------- */

.info-page {
  min-height: 100vh;
}

.info-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding:
    calc(1.2rem + var(--app-safe-area-top))
    max(1rem, var(--app-safe-area-right))
    calc(2rem + var(--app-safe-area-bottom))
    max(1rem, var(--app-safe-area-left));
}

.info-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.info-brand {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
}

.info-nav-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.info-card {
  padding: clamp(1.25rem, 4vw, 2.2rem);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  box-shadow: var(--shadow-panel);
}

.info-card h1 {
  max-width: 12em;
  margin: 0.55rem 0 0;
  color: var(--text);
  font-size: clamp(2rem, 8vw, 3.4rem);
  font-weight: 600;
  line-height: 1.02;
}

.info-updated {
  margin: 0.8rem 0 1.7rem;
  color: var(--muted);
}

.info-section {
  padding-top: 1.15rem;
  margin-top: 1.15rem;
  border-top: 1px solid var(--line-soft);
}

.info-section h2 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
}

.info-section p,
.info-list {
  margin: 0.52rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.58;
}

.info-section a {
  color: var(--blue);
  font-weight: 600;
}

.info-list {
  padding-left: 1.1rem;
}

.info-list li + li {
  margin-top: 0.35rem;
}

@media (max-width: 760px) {
  .app-shell {
    padding:
      calc(0.85rem + var(--app-safe-area-top))
      max(0.75rem, var(--app-safe-area-right))
      calc(8.5rem + var(--app-safe-area-bottom))
      max(0.75rem, var(--app-safe-area-left));
  }

  .topbar h1 {
    font-size: clamp(1.45rem, 8vw, 1.72rem);
  }

  .list-strip {
    border-radius: 18px;
  }

  .active-list {
    border-radius: 18px;
  }

  .sticky-add-bar {
    gap: 0.45rem;
    padding:
      0.74rem
      max(0.7rem, var(--app-safe-area-right))
      calc(0.84rem + var(--app-safe-area-bottom))
      max(0.7rem, var(--app-safe-area-left));
  }

  .sticky-add-bar input {
    padding-inline: 0.78rem;
  }

  .sticky-add-bar button[type="submit"] {
    min-width: 4.2rem;
    padding-inline: 0.78rem;
  }
}

@media (min-width: 761px) {
  .app-shell {
    padding-bottom: 8.8rem;
  }

  .sticky-add-bar {
    bottom: 0.55rem;
    width: min(680px, calc(100% - 1.8rem));
    background: transparent;
  }

  .action-sheet {
    left: 50%;
    right: auto;
    bottom: 0.75rem;
    width: min(420px, calc(100% - 1.8rem));
    border-radius: 22px;
    transform: translateX(-50%);
  }

  .new-list-modal {
    left: 50%;
    right: auto;
    bottom: 50%;
    width: min(460px, calc(100% - 1.8rem));
    border-radius: 22px;
    transform: translate(-50%, 50%);
    animation: none;
  }

  .lists-modal {
    left: 50%;
    right: auto;
    bottom: 50%;
    width: min(460px, calc(100% - 1.8rem));
    max-height: 70vh;
    border-radius: 22px;
    transform: translate(-50%, 50%);
    animation: none;
  }

  @keyframes slideSheet {
    from {
      transform: translate(-50%, 12px);
    }

    to {
      transform: translate(-50%, 0);
    }
  }
}
