/* ═══════════════════════════════════════════════════════════════════
   Cash & Carry Checklist — v4 styles
   Scoped entirely to .ccc-app.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design tokens ──────────────────────────────────────────────── */
.ccc-app {
  /* Accent (green default) */
  --acc:       #16A34A;
  --acc-mid:   #15803D;
  --acc-deep:  #166534;
  --acc-soft:  #DCFCE7;
  --acc-soft2: #BBF7D0;

  /* Text */
  --ink:       #111827;
  --ink-2:     #374151;
  --ink-3:     #9CA3AF;

  /* Surfaces */
  --bg:        #F0FDF4;
  --card:      #FFFFFF;
  --line:      #E5E7EB;
  --line-2:    #D1D5DB;

  /* Typography */
  --ff-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --ff-body:    'Hanken Grotesk', system-ui, sans-serif;

  /* Radii */
  --r:    16px;
  --r-sm: 10px;
  --r-xs:  7px;

  /* Shadows */
  --shadow:    0 6px 30px rgba(0,0,0,.10);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.07);
  --btn-shadow: 0 4px 14px rgba(22,163,74,.35);
}

/* Cobalt */
.ccc-app[data-theme="cobalt"] {
  --acc:        #2563EB;
  --acc-mid:    #1D4ED8;
  --acc-deep:   #1E40AF;
  --acc-soft:   #DBEAFE;
  --acc-soft2:  #BFDBFE;
  --bg:         #EFF6FF;
  --btn-shadow: 0 4px 14px rgba(37,99,235,.35);
}

/* Magenta */
.ccc-app[data-theme="magenta"] {
  --acc:        #DB2777;
  --acc-mid:    #BE185D;
  --acc-deep:   #9D174D;
  --acc-soft:   #FCE7F3;
  --acc-soft2:  #FBCFE8;
  --bg:         #FDF2F8;
  --btn-shadow: 0 4px 14px rgba(219,39,119,.35);
}

/* ── Reset ──────────────────────────────────────────────────────── */
.ccc-app, .ccc-app * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.ccc-app {
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.ccc-app button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
.ccc-app input  { font-family: inherit; font-size: 16px; /* 16px prevents iOS zoom */ color: inherit; }

/* ── Card wrapper ───────────────────────────────────────────────── */
.ccc-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 92dvh;
  overflow: hidden;
  position: relative;
}

/* ── Loading ─────────────────────────────────────────────────────── */
.ccc-loading {
  padding: 56px 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 15px;
}

/* ════════════════════════════════════════════════════════════════════
   WELCOME SCREEN
   ════════════════════════════════════════════════════════════════════ */

.ccc-welcome {
  min-height: 100dvh;
  min-height: 100vh; /* fallback */
  background: linear-gradient(145deg, var(--acc) 0%, var(--acc-deep) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 28px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* decorative background circles */
.ccc-welcome-circles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ccc-wc {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.ccc-wc-1 { width: 340px; height: 340px; top: -120px; right: -80px; }
.ccc-wc-2 { width: 240px; height: 240px; bottom: 60px; left: -90px; }
.ccc-wc-3 { width: 140px; height: 140px; top: 50%; right: -30px;    }

.ccc-welcome-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.ccc-welcome-icon-wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}

.ccc-welcome-cart { color: #fff; }

.ccc-welcome-title {
  font-family: var(--ff-display);
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.ccc-welcome-subtitle {
  font-family: var(--ff-display);
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 700;
  color: rgba(255,255,255,.85);
  margin: 0;
}

.ccc-welcome-tagline {
  font-size: 15px;
  color: rgba(255,255,255,.70);
  max-width: 260px;
  margin: 4px 0 0;
  line-height: 1.5;
}

.ccc-welcome-footer {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ccc-btn-get-started {
  width: 100%;
  max-width: 340px;
  background: #fff;
  color: var(--acc-deep);
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 800;
  padding: 16px 28px;
  border-radius: 999px;
  letter-spacing: .01em;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.ccc-btn-get-started:hover  { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.22); }
.ccc-btn-get-started:active { transform: translateY(0);    }

.ccc-welcome-hint {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin: 0;
  letter-spacing: .05em;
}

/* ════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ════════════════════════════════════════════════════════════════════ */

.ccc-login-screen {
  min-height: 100dvh;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
  gap: 24px;
}

.ccc-login-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ccc-login-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--acc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.ccc-login-brand {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.ccc-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ccc-login-heading {
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 2px;
  line-height: 1.2;
}

.ccc-login-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0;
}

.ccc-login-error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
}

.ccc-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ccc-login-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: .01em;
}

.ccc-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ccc-login-input-icon {
  position: absolute;
  left: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.ccc-login-input {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 44px 12px 42px;
  font-size: 15px;
  transition: border-color .15s, background .15s;
}
.ccc-login-input:focus {
  outline: none;
  border-color: var(--acc);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--acc-soft);
}

.ccc-eye-btn {
  position: absolute;
  right: 10px;
  color: var(--ink-3);
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color .15s;
}
.ccc-eye-btn:hover { color: var(--acc); }

/* ── Primary gradient button (shared — used by Sign In too) ─────── */
.ccc-btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--acc) 0%, var(--acc-deep) 100%);
  color: #fff;
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 800;
  padding: 14px;
  border-radius: var(--r-sm);
  letter-spacing: .01em;
  box-shadow: var(--btn-shadow);
  transition: transform .15s, box-shadow .15s, opacity .15s;
  cursor: pointer;
  margin-top: 4px;
}
.ccc-btn-login:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(22,163,74,.45); opacity: .95; }
.ccc-btn-login:active { transform: translateY(0); }
.ccc-btn-login:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.ccc-btn-guest-access {
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 10px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
  text-align: center;
}
.ccc-btn-guest-access:hover { color: var(--acc); background: var(--acc-soft); }

/* ════════════════════════════════════════════════════════════════════
   MAIN APP — HEADER
   ════════════════════════════════════════════════════════════════════ */

.ccc-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.ccc-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ccc-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--acc-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.ccc-brand-name {
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--acc);
}

.ccc-page-title {
  font-family: var(--ff-display);
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 800;
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
}

/* Saved header */
.ccc-header--saved { padding-bottom: 12px; }

.ccc-saved-toprow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ccc-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--acc);
  padding: 6px 10px;
  border-radius: var(--r-xs);
  min-height: 36px;
  transition: background .12s;
}
.ccc-back-btn:hover { background: var(--acc-soft); }

.ccc-start-new {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--line-2);
  min-height: 36px;
}
.ccc-start-new:hover { border-color: var(--acc); color: var(--acc); }

.ccc-saved-title {
  display: block;
  width: 100%;
  font-family: var(--ff-display);
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 800;
  background: transparent;
  border: none;
  border-radius: var(--r-xs);
  padding: 3px 6px;
  margin-bottom: 10px;
  color: var(--ink);
  min-height: 40px;
}
.ccc-saved-title:focus { outline: 2px solid var(--acc); background: var(--acc-soft); }

/* Claim banner */
.ccc-claim-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--acc-soft);
  border: 1px solid var(--acc-soft2);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.ccc-claim-bar button,
.ccc-claim-bar a {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--acc-deep);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--acc);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}
.ccc-claim-bar button:hover,
.ccc-claim-bar a:hover { background: var(--acc); color: #fff; }

/* Progress bar */
.ccc-progress-row { display: flex; align-items: center; gap: 10px; }

.ccc-prog-track {
  flex: 1;
  height: 7px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.ccc-prog-track--sm { height: 5px; }

.ccc-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--acc), var(--acc-mid));
  border-radius: 99px;
  transition: width .35s cubic-bezier(.4,0,.2,1);
}
.ccc-prog-fill--done {
  background: linear-gradient(90deg, #16A34A, #15803D);
}

.ccc-prog-label { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* My Lists header */
.ccc-ml-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.ccc-ml-count { font-size: 13px; color: var(--ink-3); margin: 3px 0 0; }

.ccc-btn-new {
  font-size: 13px;
  font-weight: 700;
  color: var(--acc);
  padding: 7px 16px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--acc);
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 38px;
  transition: all .15s;
}
.ccc-btn-new:hover { background: var(--acc); color: #fff; }

/* ── Scrollable area ────────────────────────────────────────────── */
.ccc-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  scroll-padding-bottom: 8px;
}

/* ── List name input ────────────────────────────────────────────── */
.ccc-list-name {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  transition: border-color .15s, background .15s;
}
.ccc-list-name:focus { outline: none; border-color: var(--acc); background: var(--card); box-shadow: 0 0 0 3px var(--acc-soft); }
.ccc-list-name::placeholder { color: var(--ink-3); font-weight: 500; }

/* ── Search block ───────────────────────────────────────────────── */
.ccc-search-wrap { margin-bottom: 14px; }

.ccc-search-row {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding-left: 40px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.ccc-search-row:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.ccc-search-row svg { position: absolute; left: 11px; color: var(--ink-3); pointer-events: none; }

.ccc-search-input {
  flex: 1;
  background: none;
  border: none;
  padding: 11px 12px 11px 0;
  font-size: 15px;
}
.ccc-search-input:focus { outline: none; }
.ccc-search-input::-webkit-search-cancel-button { display: none; }

/* Chips */
.ccc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.ccc-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  color: var(--ink-2);
  background: var(--card);
  min-height: 32px;
  transition: all .15s;
  letter-spacing: .01em;
}
.ccc-chip:hover { border-color: var(--acc); color: var(--acc); }
.ccc-chip--on { background: var(--acc); border-color: var(--acc); color: #fff; }

/* Suggestions */
.ccc-suggestions {
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.ccc-sugg-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  gap: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
  transition: background .12s;
}
.ccc-sugg-row:last-child { border-bottom: none; }
.ccc-sugg-row:hover { background: var(--acc-soft); }

.ccc-sugg-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--r-xs);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}

.ccc-sugg-text { flex: 1; min-width: 0; }
.ccc-sugg-name { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccc-sugg-meta { display: block; font-size: 12px; color: var(--ink-3); }
.ccc-sugg-plus { font-size: 22px; color: var(--acc); flex-shrink: 0; line-height: 1; }
.ccc-sugg-empty { padding: 14px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* Add by hand */
.ccc-add-hand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--acc);
  padding: 6px 2px;
  min-height: 36px;
}
.ccc-add-hand:hover { text-decoration: underline; }

/* Hand form */
.ccc-hand-form {
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 16px;
  margin-top: 8px;
}
.ccc-hand-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ccc-hand-field { flex: 1; min-width: 140px; }
.ccc-hand-field--sm { max-width: 96px; flex: none; }
.ccc-hand-field label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.ccc-hand-field input {
  display: block;
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-xs);
  padding: 9px 12px;
  font-size: 15px;
  transition: border-color .15s;
  min-height: 44px;
}
.ccc-hand-field input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.ccc-hand-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Item list ───────────────────────────────────────────────────── */
.ccc-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.ccc-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  transition: opacity .2s, border-color .2s;
}
.ccc-item--checked { opacity: .5; border-color: transparent; }
.ccc-item--checked .ccc-item-name { text-decoration: line-through; color: var(--ink-3); }

.ccc-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  color: transparent;
  transition: all .18s;
  min-width: 24px;
}
.ccc-check:hover { border-color: var(--acc); background: var(--acc-soft); }
.ccc-item--checked .ccc-check {
  background: linear-gradient(135deg, var(--acc), var(--acc-mid));
  border-color: var(--acc);
  color: #fff;
}

.ccc-item-body { flex: 1; min-width: 0; }
.ccc-item-top { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 5px; }
.ccc-item-name { flex: 1; font-size: 14px; font-weight: 700; color: var(--ink); word-break: break-word; line-height: 1.4; }

.ccc-item-del {
  color: var(--ink-3);
  padding: 3px;
  border-radius: var(--r-xs);
  flex-shrink: 0;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
}
.ccc-item-del:hover { color: #DC2626; background: #FEF2F2; }

.ccc-item-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ccc-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-3);
  border: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ccc-item-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }

/* Stepper */
.ccc-stepper { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-xs); overflow: hidden; background: var(--card); }
.ccc-stepper button {
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: var(--acc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: background .12s;
  min-height: 32px;
}
.ccc-stepper button:hover { background: var(--acc-soft); }
.ccc-stepper input {
  width: 44px;
  height: 32px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  background: var(--card);
  padding: 0;
}
.ccc-stepper input:focus { outline: none; background: var(--acc-soft); }
.ccc-stepper input::-webkit-inner-spin-button,
.ccc-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Unit toggle */
.ccc-unit {
  font-size: 12px;
  font-weight: 700;
  color: var(--acc);
  border: 1.5px solid var(--acc);
  border-radius: var(--r-xs);
  padding: 4px 10px;
  min-height: 32px;
  letter-spacing: .01em;
  transition: all .12s;
}
.ccc-unit:hover { background: var(--acc); color: #fff; }

.ccc-case-note { font-size: 11px; color: var(--ink-3); font-style: italic; }

.ccc-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--acc-deep);
  margin-left: auto;
}

/* ── Empty states ────────────────────────────────────────────────── */
.ccc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
  gap: 8px;
  color: var(--ink-3);
}
.ccc-empty svg { opacity: .2; }
.ccc-empty-title { font-size: 16px; font-weight: 700; color: var(--ink-2); margin: 0; }
.ccc-empty-msg   { font-size: 14px; margin: 0; }

.ccc-btn-retry {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--acc);
  border: 1.5px solid var(--acc);
  border-radius: var(--r-sm);
  padding: 9px 20px;
  min-height: 42px;
  transition: all .15s;
}
.ccc-btn-retry:hover { background: var(--acc); color: #fff; }

/* ── My Checklists cards ─────────────────────────────────────────── */
.ccc-ml-list { display: flex; flex-direction: column; gap: 10px; }

.ccc-ml-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.ccc-ml-card:hover { border-color: var(--acc-soft2); box-shadow: var(--shadow-sm); }

.ccc-ml-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ccc-ml-card-title { font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.ccc-ml-card-meta  { font-size: 12px; color: var(--ink-3); }

.ccc-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--acc-deep);
  background: var(--acc-soft);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ccc-ml-prog { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

.ccc-ml-card-actions { display: flex; gap: 8px; align-items: center; }

.ccc-btn-open {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--acc);
  border: 1.5px solid var(--acc);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  text-align: center;
  min-height: 42px;
  transition: all .15s;
}
.ccc-btn-open:hover { background: var(--acc); color: #fff; box-shadow: var(--btn-shadow); }

.ccc-btn-del-list {
  padding: 9px 12px;
  color: var(--ink-3);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  min-height: 42px;
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
}
.ccc-btn-del-list:hover { color: #DC2626; border-color: #DC2626; background: #FEF2F2; }

/* ── Bottom bar ──────────────────────────────────────────────────── */
.ccc-bottombar {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ccc-bb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
}

.ccc-bb-meta { display: flex; flex-direction: column; gap: 1px; margin-right: auto; }
.ccc-bb-count { font-size: 12px; color: var(--ink-3); }
.ccc-bb-total { font-size: 17px; font-weight: 800; color: var(--ink); }
.ccc-bb-total small { font-size: 11px; font-weight: 500; color: var(--ink-3); }

/* Save button — gradient + glow */
.ccc-btn-save {
  background: linear-gradient(135deg, var(--acc) 0%, var(--acc-deep) 100%);
  color: #fff;
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  min-height: 42px;
  box-shadow: var(--btn-shadow);
  transition: transform .15s, box-shadow .15s, opacity .15s;
  letter-spacing: .01em;
}
.ccc-btn-save:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(22,163,74,.45); }
.ccc-btn-save:active { transform: translateY(0); }
.ccc-btn-save:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; background: var(--line-2); }

/* Share / Export buttons */
.ccc-btn-share,
.ccc-btn-export {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2);
  color: var(--ink-2);
  min-height: 40px;
  transition: all .15s;
}
.ccc-btn-share:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }
.ccc-btn-export:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }

/* ── Tab bar ─────────────────────────────────────────────────────── */
.ccc-tabbar {
  display: flex;
  border-top: 1px solid var(--line);
}

.ccc-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  transition: color .15s;
  min-height: 52px;
  letter-spacing: .02em;
}
.ccc-tab:hover  { color: var(--acc); }
.ccc-tab--on    { color: var(--acc); }

/* ── Utility buttons ─────────────────────────────────────────────── */
.ccc-btn-primary {
  background: linear-gradient(135deg, var(--acc) 0%, var(--acc-deep) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  min-height: 42px;
  box-shadow: var(--btn-shadow);
  transition: transform .15s, box-shadow .15s;
}
.ccc-btn-primary:hover { transform: translateY(-1px); }

.ccc-btn-ghost {
  font-size: 14px;
  color: var(--ink-2);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  min-height: 42px;
  transition: border-color .12s;
}
.ccc-btn-ghost:hover { border-color: var(--ink-2); }

/* ── Share popup ─────────────────────────────────────────────────── */
.ccc-share-popup {
  position: absolute;
  bottom: 120px;
  left: 12px;
  right: 12px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  padding: 16px;
  z-index: 10;
  animation: cccPopIn .18s ease;
}
@keyframes cccPopIn {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.ccc-share-popup p { font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
.ccc-share-row { display: flex; gap: 7px; }
.ccc-share-row input {
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-xs);
  padding: 9px 12px;
  font-size: 13px;
  min-height: 40px;
}
.ccc-share-row button {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--acc), var(--acc-deep));
  border-radius: var(--r-xs);
  padding: 9px 16px;
  min-height: 40px;
  box-shadow: var(--btn-shadow);
}
.ccc-share-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 15px;
  color: var(--ink-3);
  padding: 4px 8px;
  min-height: 32px;
}

/* ── Toast ───────────────────────────────────────────────────────── */
.ccc-toast {
  position: absolute;
  bottom: 128px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(0,0,0,.20);
}
.ccc-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ccc-toast--error   { background: #DC2626; }

/* ── Busy overlay ────────────────────────────────────────────────── */
.ccc-app--busy .ccc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(2px);
  z-index: 30;
  pointer-events: all;
  border-radius: var(--r);
}

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 540 px)
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 540px) {
  /* Cards fill the full screen on mobile */
  .ccc-card {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100dvh;
    min-height: 100vh;
  }

  .ccc-header  { padding: 14px 14px 12px; }
  .ccc-scroll  { padding: 12px; }
  .ccc-bb-row  { padding: 8px 12px; }

  /* Larger touch targets */
  .ccc-stepper button { width: 36px; height: 36px; }
  .ccc-stepper input  { width: 48px; height: 36px; }
  .ccc-unit           { padding: 5px 12px; min-height: 36px; }
  .ccc-chip           { padding: 6px 14px; min-height: 34px; }
  .ccc-check          { width: 26px; height: 26px; min-width: 26px; }

  /* Save button full-width on very small screens */
  .ccc-btn-save { padding: 11px 16px; font-size: 15px; }

  /* Share/Export wrap nicely */
  .ccc-btn-share,
  .ccc-btn-export { padding: 8px 10px; font-size: 12px; }
  .ccc-btn-share span,
  .ccc-btn-export span { display: none; } /* hide text, keep icon */

  /* Welcome screen */
  .ccc-welcome { padding: 40px 20px 36px; }
  .ccc-welcome-icon-wrap { width: 88px; height: 88px; }

  /* Login screen */
  .ccc-login-screen { padding: 24px 16px 36px; }
  .ccc-login-card   { padding: 24px 20px 20px; }
  .ccc-btn-login    { padding: 14px; }

  /* Hand form full-width stacked */
  .ccc-hand-field     { min-width: 100%; }
  .ccc-hand-field--sm { max-width: 100%; }
}

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE — LARGE SCREENS  (≥ 600 px, keep card centered)
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 541px) {
  .ccc-app {
    padding: 24px 16px;
  }

  .ccc-welcome {
    min-height: 600px;
    max-width: 520px;
    margin: 0 auto;
    border-radius: var(--r);
    box-shadow: var(--shadow);
  }

  .ccc-login-screen {
    min-height: auto;
    padding: 40px 24px;
  }
}

/* Reduced motion: disable CSS animations */
@media (prefers-reduced-motion: reduce) {
  .ccc-btn-get-started,
  .ccc-btn-login,
  .ccc-btn-save,
  .ccc-prog-fill {
    transition: none;
  }
}
