/* =========================================================
   streepaf.nl — app.css
   All styles for the SPA: marketing page, create modal,
   list view, toast notifications.
   Mobile-first at 360px.
   ========================================================= */

/* ── CSS Custom Properties ── */
:root {
  color-scheme: light dark;
  --clr-bg:        #f7f6f2;
  --clr-surface:   #ffffff;
  --clr-primary:   #2d6a4f;
  --clr-primary-l: #52b788;
  --clr-accent:    #f4a261;
  --clr-text:      #1b1b1b;
  --clr-muted:     #6b7280;
  --clr-border:    #e5e7eb;
  --clr-strike:    #b7e4c7;
  --clr-danger:    #e63946;
  --clr-claimed:   #fef9e7;
  --clr-claimed-border: #f9e79f;
  --radius:        14px;
  --radius-sm:     10px;
  --shadow:        0 2px 16px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.15);
  --transition:    .18s ease;
  --max-content:   480px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--clr-primary);
  text-decoration: none;
  letter-spacing: -.02em;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
.logo span { color: var(--clr-accent); }
.nav-cta {
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .65rem 1.3rem;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
.nav-cta:hover { background: var(--clr-primary-l); }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 3.5rem 1.25rem 2.5rem;
  max-width: 640px;
  margin: 0 auto;
}
.hero .badge {
  display: inline-block;
  background: var(--clr-strike);
  color: var(--clr-primary);
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--clr-text);
}
.hero h1 em {
  font-style: normal;
  color: var(--clr-primary);
  position: relative;
}
.hero p {
  margin: 1.1rem auto 2rem;
  color: var(--clr-muted);
  font-size: 1.05rem;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .85rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 48px;
}
.btn-primary:hover { background: var(--clr-primary-l); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);
  border-radius: 50px;
  padding: .83rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  min-height: 48px;
}
.btn-ghost:hover { background: var(--clr-strike); }

.btn-small {
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .55rem 1.2rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
.btn-small:hover { background: var(--clr-primary-l); }

.btn-icon {
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--clr-muted);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--clr-strike); color: var(--clr-primary); }

/* Reset-knop in list header — oranje waarschuwingstint */
.btn-reset:hover {
  background: #fef3cd !important;
  color: #d97706 !important;
}

/* ── Demo list (homepage) ── */
.demo-wrap {
  padding: 1.5rem 1.25rem 3rem;
  max-width: var(--max-content);
  margin: 0 auto;
}
.demo-card {
  background: var(--clr-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-card-header {
  background: var(--clr-primary);
  color: #fff;
  padding: .85rem 1.1rem;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.demo-list {
  list-style: none;
  padding: .5rem 0;
}
.demo-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.1rem;
  border-bottom: 1px solid var(--clr-border);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
  min-height: 52px;
}
.demo-list li:last-child { border-bottom: none; }
.demo-list li:hover { background: #f0faf4; }
.demo-list li.done { color: var(--clr-muted); text-decoration: line-through; }
.demo-list li .check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: .75rem;
  transition: all var(--transition);
}
.demo-list li.done .check {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}

/* ── How it works ── */
.steps {
  padding: 3rem 1.25rem;
  background: var(--clr-surface);
}
.steps h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 2rem;
}
.steps-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.step-num {
  background: var(--clr-primary);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .2rem; }
.step p  { color: var(--clr-muted); font-size: .93rem; }

/* ── Use cases ── */
.usecases {
  padding: 3rem 1.25rem;
  max-width: 860px;
  margin: 0 auto;
}
.usecases h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.75rem;
}
.uc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.uc-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.uc-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.uc-card .icon { font-size: 1.8rem; margin-bottom: .5rem; }
.uc-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .3rem; }
.uc-card p  { color: var(--clr-muted); font-size: .85rem; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--clr-muted);
  font-size: .85rem;
  border-top: 1px solid var(--clr-border);
}

/* =========================================================
   CREATE MODAL (overlay)
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  background: var(--clr-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  max-height: 90dvh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem;
  transform: translateY(20px) scale(.97);
  transition: transform .25s ease;
}
.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}
.modal-card h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: .25rem;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
.modal-card .modal-sub {
  color: var(--clr-muted);
  font-size: .88rem;
  margin-bottom: 1.25rem;
}

/* =========================================================
   TEMPLATE PICKER (inside create modal)
   ========================================================= */
.template-picker {
  margin-bottom: 1rem;
}
.template-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--clr-muted);
  margin-bottom: .6rem;
}
.template-cards {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: .4rem;
  /* hide scrollbar on webkit */
  scrollbar-width: none; /* Firefox */
}
.template-cards::-webkit-scrollbar { display: none; }

.template-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 100px;
  min-width: 90px;
  min-height: 48px;
  background: var(--clr-bg);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: .65rem .5rem .55rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  text-align: center;
  transition: all var(--transition);
  font-family: inherit;
  font-size: inherit;
  line-height: 1.3;
  color: var(--clr-text);
}
.template-card:hover {
  background: var(--clr-strike);
  border-color: var(--clr-primary-l);
  transform: translateY(-2px);
}
.template-card:active {
  transform: translateY(0);
}
.template-card.selected {
  background: var(--clr-strike);
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 2px var(--clr-primary-l);
}
.template-emoji {
  font-size: 1.5rem;
  line-height: 1;
}
.template-name {
  font-size: .72rem;
  font-weight: 600;
  word-break: break-word;
  max-width: 100%;
}
.template-badge {
  display: inline-block;
  background: var(--clr-primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 0 .45rem;
  border-radius: 50px;
  line-height: 1.5;
  min-width: 1.4rem;
}
.template-card.selected .template-badge {
  background: var(--clr-primary-l);
}
.template-clear-wrap {
  display: flex;
  justify-content: center;
  margin-top: .5rem;
}
.template-clear-btn {
  background: transparent;
  border: 1px solid var(--clr-border);
  border-radius: 50px;
  padding: .25rem .9rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--clr-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  min-height: 48px;
}
.template-clear-btn:hover {
  background: var(--clr-bg);
  border-color: var(--clr-muted);
  color: var(--clr-text);
}

/* ── Form fields ── */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--clr-text);
}
.form-input {
  width: 100%;
  padding: .75rem .9rem;
  font-size: 1rem;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: var(--clr-bg);
  transition: border-color var(--transition);
  font-family: inherit;
  min-height: 48px;
}
.form-input:focus {
  outline: none;
  border-color: var(--clr-primary);
}

/* ── Items input area ── */
.items-input-row {
  display: flex;
  gap: .5rem;
}
.items-input-row .form-input {
  flex: 1;
}
.items-list {
  list-style: none;
  margin-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.items-list li {
  background: var(--clr-strike);
  color: var(--clr-primary);
  padding: .3rem .7rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  animation: fadeIn .2s ease;
}
.items-list li .remove-item {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  color: var(--clr-primary);
  opacity: .6;
  transition: opacity var(--transition);
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.items-list li .remove-item:hover { opacity: 1; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Modal actions ── */
.modal-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
}
.modal-actions .btn-primary {
  flex: 1;
  justify-content: center;
}
.modal-actions .btn-ghost {
  flex: 1;
  justify-content: center;
}

/* =========================================================
   LIST VIEW
   ========================================================= */
.list-view {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
  display: none;
}
.list-view.active {
  display: block;
  animation: fadeIn .25s ease;
}

/* ── List header ── */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--clr-border);
}
.list-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  flex: 1;
  min-width: 0;
  cursor: text;
  padding: .15rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.list-header h2:hover {
  border-bottom-color: var(--clr-border);
}

/* Inline title edit <input> */
.title-edit-input {
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--clr-text);
  background: transparent;
  border: none;
  border-bottom: 2px dashed var(--clr-primary);
  outline: none;
  width: 100%;
  padding: .15rem 0;
  border-radius: 0;
  /* match the h2 line-height; ensure 48px tap target */
  line-height: 48px;
  min-height: 48px;
}
.title-edit-input:focus {
  border-bottom-style: solid;
  border-bottom-color: var(--clr-primary);
}
.list-header-actions {
  display: flex;
  gap: .25rem;
  flex-shrink: 0;
}

/* ── New item row inside list view ── */
.list-add-row {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.list-add-row .form-input {
  flex: 1;
  border-radius: 50px;
  padding: .7rem 1rem;
}

/* ── List items ── */
.list-items {
  list-style: none;
}
.list-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--clr-surface);
  border-radius: var(--radius-sm);
  margin-bottom: .4rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
  min-height: 52px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.list-item:hover { background: #f0faf4; }
.list-item:active { transform: scale(.99); }

.list-item .item-check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--clr-border);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: all var(--transition);
  color: transparent;
}
.list-item.done .item-check {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}

.list-item .item-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  font-size: 1rem;
  font-weight: 500;
  transition: color var(--transition);
}
.list-item.done .item-text {
  color: var(--clr-muted);
  text-decoration: line-through;
}

.list-item .item-delete {
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--clr-muted);
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  flex-shrink: 0;
}

/* On touch devices, always show the delete button at low opacity */
@media (hover: none) and (pointer: coarse) {
  .list-item .item-delete {
    opacity: .35;
  }
}

.list-item:hover .item-delete,
.list-item:focus-within .item-delete {
  opacity: .5;
}
.item-delete:hover { opacity: 1 !important; background: #fee2e2; color: var(--clr-danger); }

/* ── Empty state ── */
.list-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--clr-muted);
}
.list-empty p { font-size: .95rem; }
.list-empty .empty-icon { font-size: 2.5rem; margin-bottom: .5rem; }

/* ── Progress bar ── */
.list-progress {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .8rem;
  font-size: .82rem;
  color: var(--clr-muted);
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--clr-border);
  border-radius: 50px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--clr-primary);
  border-radius: 50px;
  transition: width .3s ease;
  width: 0%;
}

/* ── Reset flash animation op items ── */
@keyframes resetFlash {
  0%   { background: var(--clr-strike); transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { background: var(--clr-surface); transform: scale(1); }
}
.list-item.reset-flash {
  animation: resetFlash .4s ease;
}

/* =========================================================
   CLAIM BADGE & BUTTON (inside list items)
   ========================================================= */

/* Claim badge — shows claimed name with lock icon */
.list-item .claim-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .15rem .55rem .15rem .4rem;
  border-radius: 50px;
  background: var(--clr-claimed);
  border: 1px solid var(--clr-claimed-border);
  color: #8b6914;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Claim button — unlocked state, smaller and hints at tap */
.list-item .claim-badge.claim-btn {
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
  cursor: pointer;
  font-size: .85rem;
  padding: .15rem .5rem;
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .6; /* visible by default — mobile-first */
  transition: opacity var(--transition), background var(--transition), border-color var(--transition);
}

/* On desktop (fine pointer with hover), hide claim button until row hover/focus */
@media (hover: hover) and (pointer: fine) {
  .list-item .claim-badge.claim-btn {
    opacity: 0;
  }
  .list-item:hover .claim-badge.claim-btn,
  .list-item:focus-within .claim-badge.claim-btn {
    opacity: .6;
  }
}

.list-item .claim-badge.claim-btn:hover {
  opacity: 1 !important;
  background: var(--clr-strike);
  border-color: var(--clr-primary-l);
}

/* Small release button inside the claimed badge */
.claim-free-btn {
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  color: #8b6914;
  opacity: .5;
  transition: opacity var(--transition), background var(--transition);
  flex-shrink: 0;
  margin-left: .1rem;
}
.claim-free-btn:hover {
  opacity: 1;
  background: rgba(139,105,20,.12);
}

/* Claimed item background highlight */
.list-item.claimed {
  background: var(--clr-claimed);
  border: 1px solid var(--clr-claimed-border);
}
.list-item.claimed:hover {
  background: #fef5d0;
}

/* =========================================================
   CLAIM BOTTOM-SHEET (<dialog>)
   ========================================================= */
.claim-sheet {
  border: none;
  border-radius: 16px 16px 0 0;
  padding: 0;
  max-width: 400px;
  width: 100%;
  max-width: min(400px, 100vw);
  box-sizing: border-box;
  margin-top: auto;
  max-height: 50vh;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--clr-surface);
  color: var(--clr-text);
  box-shadow: var(--shadow-lg);
  animation: sheetSlideUp .3s ease;
}

/* Backdrop overlay */
.claim-sheet::backdrop {
  background: rgba(0,0,0,.35);
  animation: backdropFade .25s ease;
}

@keyframes sheetSlideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to   { transform: translateX(-50%) translateY(0); }
}

@keyframes backdropFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.claim-sheet-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.claim-sheet h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}

.claim-sheet-sub {
  font-size: .88rem;
  color: var(--clr-muted);
  margin: 0;
}

.claim-sheet-actions {
  display: flex;
  gap: .75rem;
  margin-top: .25rem;
}
.claim-sheet-actions .btn-primary {
  flex: 1;
  justify-content: center;
}
.claim-sheet-actions .btn-ghost {
  flex: 1;
  justify-content: center;
}

/* =========================================================
   TOAST NOTIFICATION
   ========================================================= */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--clr-text);
  color: #fff;
  padding: .7rem 1.3rem;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn .3s ease, toastOut .3s ease 2.5s forwards;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(20px); }
}

/* =========================================================
   APP-VIEW CONTAINER (hidden by default, shown when list route)
   ========================================================= */
#app-view {
  display: none;
}
body.list-mode #app-view {
  display: block;
}
body.list-mode .marketing-content {
  display: none;
}

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */
@media (min-width: 600px) {
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .modal-card { padding: 2rem; }
  .template-card { width: 115px; }
}

@media (max-width: 380px) {
  .hero { padding: 2.5rem 1rem 1.5rem; }
  .list-item { min-height: 48px; padding: .6rem .8rem; }
  .list-header h2 { font-size: 1.05rem; }
  .template-card { width: 82px; min-width: 78px; padding: .5rem .35rem .45rem; }
  .template-emoji { font-size: 1.2rem; }
  .template-name { font-size: .65rem; }
}

/* Tighten spacing at 360px and below — smallest common mobile width */
@media (max-width: 360px) {
  .list-view { padding: 0.75rem; }
  .list-item { padding: 0.55rem 0.7rem; min-height: 48px; }
  .modal-card { padding: 1rem; }

  nav { padding: 0.6rem 0.75rem; }
  .list-header h2 { font-size: 1.05rem; }
  .list-add-row { gap: 0.4rem; }
  .modal-card h2 { font-size: 1.1rem; }
  .hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .uc-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* =========================================================
   DARK MODE — auto via prefers-color-scheme
   ========================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --clr-bg:        #12121f;
    --clr-surface:   #1e1e35;
    --clr-primary:   #52b788;
    --clr-primary-l: #6fcf97;
    --clr-accent:    #f4a261;
    --clr-text:      #ececec;
    --clr-muted:     #9a9ab0;
    --clr-border:    #34345a;
    --clr-strike:    #1e3a2a;
    --clr-danger:    #ff6b6b;
    --clr-claimed:   #2e2818;
    --clr-claimed-border: #4a4025;
    --shadow:        0 2px 16px rgba(0,0,0,.35);
    --shadow-lg:     0 8px 32px rgba(0,0,0,.5);
  }

  /* ── Toast: keep dark bg + white text (--clr-text is light now) ── */
  .toast {
    background: #2a2a42;
    color: #fff;
  }

  /* ── Hardcoded hover backgrounds → dark equivalents ── */
  .list-item:hover {
    background: #253528;
  }

  .demo-list li:hover {
    background: #253528;
  }

  .btn-reset:hover {
    background: #362e18 !important;
    color: #f4a261 !important;
  }

  .item-delete:hover {
    opacity: 1 !important;
    background: #3d1e1e;
    color: var(--clr-danger);
  }

  .list-item.claimed:hover {
    background: #3d3418;
  }

  /* ── Claim badge gold text — lighter for dark background ── */
  .list-item .claim-badge {
    color: #d4a843;
  }

  .claim-free-btn {
    color: #d4a843;
  }

  .claim-free-btn:hover {
    background: rgba(212,168,67,.15);
  }

  /* ── Modal and sheet overlays — darker in dark mode ── */
  .modal-overlay {
    background: rgba(0,0,0,.72);
  }

  .claim-sheet::backdrop {
    background: rgba(0,0,0,.60);
  }
}
