* { box-sizing: border-box; }
/* Theme: every app color lives in these variables. To change the look (e.g. back to a brand color), edit only here. */
:root {
  /* Chain picker "sticker wall": white in light mode, black in dark mode */
  --wall: #ffffff; --wall-text: #000000; --wall-muted: #6e6e6e; --wall-line: #e6e6e6;
  --sticker-edge: #ffffff; --sticker-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 8px 18px rgba(0,0,0,.16);
  --wall-button: #000000; --wall-button-text: #ffffff; --check-bg: #000000; --unpicked-fade: .55;
  --bg: #ffffff; --card: #ffffff; --text: #000000; --muted: #6e6e6e; --line: #e6e6e6;
  --accent: #000000; --accent-text: #ffffff; --border: #e6e6e6; --badge: #f2f2f2; --soft: #f5f5f5;
  --price: #000000; --urgent: #000000; --urgent-bg: #ececec; --on: #000000; --initials-bg: #2b2b2b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #111111; --text: #ffffff; --muted: #9a9a9a; --line: #262626;
    --accent: #ffffff; --accent-text: #000000; --border: #262626; --badge: #1f1f1f; --soft: #161616;
    --price: #ffffff; --urgent: #ffffff; --urgent-bg: #2a2a2a; --on: #ffffff; --initials-bg: #2b2b2b;
    --wall: #000000; --wall-text: #ffffff; --wall-muted: #9a9a9a; --wall-line: #262626;
    --sticker-shadow: 0 10px 22px rgba(0,0,0,.55);
    --wall-button: #ffffff; --wall-button-text: #000000; --check-bg: #ffffff; --unpicked-fade: .4;
  }
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto; max-width: 560px; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
.fine { font-size: 12px; color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 6px 0; }
.primary {
  border: 0; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 17px;
  padding: 15px 20px; border-radius: 14px; width: 100%;
}
.primary:disabled { opacity: .45; }
.primary.small { width: auto; font-size: 15px; padding: 10px 16px; }

/* ---- Top bar ---- */
.topbar { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 0 10px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.topbar h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
#subtitle { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; color: var(--text);
}
.icon-btn.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.icon-btn.on svg { fill: currentColor; }

/* ---- Chain chips ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chipf {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 12px 6px 8px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chipf:first-child { padding-left: 14px; }
.chipf.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---- Avatar ---- */
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand, var(--initials-bg)); color: var(--brand-text, #fff); font-weight: 800; font-size: 16px; letter-spacing: -.02em;
}
.avatar { position: relative; overflow: hidden; }
/* Logo badge: the chain's full-color logo, filling the circle edge to edge. */
.avatar.ic, .avatar.ic.xs, .avatar.ic.sm { border-radius: 50%; background: var(--badge); }
.avatar.ic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.avatar.xs { width: 22px; height: 22px; border-radius: 7px; font-size: 10px; }

/* ---- Feed ---- */
.group h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 2px 8px; }
.deals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.deal {
  display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: var(--card);
  border: 1px solid var(--line); color: inherit; text-decoration: none;
}
.deal:active { transform: scale(.985); }
.deal.later { opacity: .6; }
.deal .body { flex: 1; min-width: 0; }
.deal .chain { font-size: 13px; color: var(--muted); font-weight: 600; }
.deal .title { font-size: 15px; font-weight: 600; line-height: 1.3; margin-top: 1px; }
.reqs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.req { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 2px 6px; }
.req.verified { color: var(--text); }
.side { text-align: right; flex: none; max-width: 38%; }
.price { font-size: 24px; font-weight: 800; color: var(--price); letter-spacing: -.02em; line-height: 1.05; }
.ends { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.ends.urgent { color: var(--urgent); background: var(--urgent-bg); border-radius: 6px; padding: 2px 6px; display: inline-block; }
.empty { text-align: center; padding: 48px 12px; color: var(--muted); }
.empty .big { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.foot { text-align: center; padding: 24px 0 32px; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  max-width: calc(100% - 32px); z-index: 20;
}

/* ---- Chain picker ---- */
.picker { position: fixed; inset: 0; background: var(--bg); z-index: 10; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 0; }
.picker[hidden] { display: none; }
.picker-head { padding: 22px 16px 8px; max-width: 560px; width: 100%; margin: 0 auto; }
.picker-head h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.picker-head p { margin: 4px 0 14px; color: var(--muted); }
.picker-head input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font: inherit;
}
.picker-list { list-style: none; margin: 0 auto; padding: 4px 16px 16px; overflow-y: auto; flex: 1; display: grid; gap: 8px; align-content: start; max-width: 560px; width: 100%; }
.pick {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card); text-align: left;
}
.pick-name { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.pick-name small { font-size: 12px; color: var(--price); font-weight: 600; }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.pick.on { border-color: var(--accent); }
.pick.on .check { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/16px no-repeat; border-color: var(--accent); }
.picker-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); max-width: 560px; width: 100%; margin: 0 auto; }

#install { text-align: center; padding: 16px 0 72px; }
#install img { border-radius: 18px; }
#install h1 { margin: 10px 0 4px; font-size: 22px; line-height: 1.2; }
#install .lead { color: var(--muted); margin: 0 0 18px; font-size: 16px; }
.steps { text-align: left; list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; counter-reset: step; }
.steps li {
  counter-increment: step; display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px;
  font-size: 18px; line-height: 2;
}
.steps li::before {
  content: counter(step); flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-weight: 700; line-height: 32px;
  display: grid; place-items: center;
}
.chip {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px;
  border-radius: 10px; background: var(--badge); color: var(--text); font-weight: 700; font-size: 20px;
  border: 2px solid var(--accent);
  vertical-align: middle;
}
.sheet-row {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 10px;
  background: var(--badge); font-weight: 600; vertical-align: middle; line-height: 1.6;
}
.note { color: var(--muted); margin: 0; }
#install code { font-weight: 700; color: var(--text); }
button#install-btn {
  border: 0; background: var(--accent); color: var(--accent-text); font: inherit; font-size: 18px; font-weight: 700;
  padding: 16px 28px; border-radius: 14px; width: 100%;
}
.arrow { position: fixed; left: 50%; color: var(--accent); animation: bob 1.2s ease-in-out infinite; }
.arrow-bottom { bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
/* Safari 26 compact bar: the ≡ button sits about 29% across the screen. */
.arrow-bottom-menu { bottom: calc(12px + env(safe-area-inset-bottom)); left: 29%; transform: translateX(-50%); }
.arrow-top { top: calc(8px + env(safe-area-inset-top)); left: auto; right: 16px; }
.arrow-top svg { transform: rotate(180deg); }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 8px; } }
.arrow-top { animation-name: bob-up; }
@keyframes bob-up { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .arrow { animation: none; } }

#phone-only { text-align: center; padding: 48px 0; }
#phone-only img { border-radius: 18px; }
#phone-only h1 { margin: 14px 0 6px; font-size: 26px; }
#phone-only .lead { color: var(--muted); margin: 0 auto 24px; max-width: 420px; font-size: 17px; }
.qr { width: 220px; height: 220px; margin: 0 auto 20px; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--border); }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---- Fake Safari tap demo ---- */
.demo {
  position: relative; width: 300px; max-width: 100%; height: 190px; margin: 0 auto 14px;
  border-radius: 22px; overflow: hidden; background: #1c1c1e; color: #f2f2f7;
  border: 1px solid var(--border); font-size: 13px; text-align: left;
}
.demo svg { width: 16px; height: 16px; flex: none; }
.d-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 38px; display: flex; gap: 8px; align-items: center; }
.d-circle { width: 38px; height: 38px; border-radius: 50%; background: #3a3a3c; display: grid; place-items: center; font-size: 18px; flex: none; }
.d-pill { flex: 1; height: 38px; border-radius: 19px; background: #3a3a3c; display: flex; align-items: center; gap: 8px; padding: 0 12px; min-width: 0; }
.d-url { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: .9; }
.d-bar-old { justify-content: space-around; background: #2c2c2e; left: 0; right: 0; bottom: 0; height: 44px; font-size: 18px; color: #0a84ff; }
.d-bar-old svg { width: 20px; height: 20px; }
.d-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; transition: background .2s; }
.d-pop {
  position: absolute; left: 50px; bottom: 54px; width: 170px; padding: 4px; border-radius: 14px; background: #2c2c2e;
  opacity: 0; transform: scale(.9) translateY(6px); transform-origin: bottom left; transition: opacity .25s, transform .25s;
}
.d-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 8px 12px; border-radius: 16px 16px 0 0; background: #2c2c2e;
  transform: translateY(105%); transition: transform .35s ease;
}
.d-confirm {
  position: absolute; inset: 0; background: #1c1c1e; transform: translateY(105%); transition: transform .35s ease; padding: 10px 12px;
}
.d-confirm-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.d-confirm-head span { color: #0a84ff; }
.d-add { font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.d-confirm-body { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px; border-radius: 12px; background: #2c2c2e; font-size: 15px; }
#install .d-confirm-body img { width: 44px; height: 44px; border-radius: 10px; }
.d-finger {
  position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  background: rgba(255,255,255,.45); border: 2px solid #fff; left: 50%; top: 120%;
  transition: left .45s ease, top .45s ease; animation: tap 1.7s ease-in-out infinite;
}
@keyframes tap { 0%, 40% { scale: 1; } 55% { scale: .7; } 70%, 100% { scale: 1; } }
/* Phases: where the finger is and which layer is open. */
.demo-ios26[data-phase="p-menu"] .d-finger { left: 77px; top: 161px; }
.demo-ios26[data-phase="p-menu"] .d-menu { color: #fff; }
.demo[data-phase="p-share"] .d-pop { opacity: 1; transform: none; }
.demo-ios26[data-phase="p-share"] .d-finger { left: 100px; top: 49px; }
.demo-ios26[data-phase="p-share"] .d-row-share { background: #48484a; }
.demo-ios[data-phase="p-share"] .d-finger { left: 138px; top: 168px; }
.demo[data-phase="p-add"] .d-sheet { transform: none; }
.demo[data-phase="p-add"] .d-finger { left: 120px; top: 128px; }
.demo[data-phase="p-add"] .d-row-add { background: #48484a; }
.demo[data-phase="p-confirm"] .d-sheet { transform: none; }
.demo[data-phase="p-confirm"] .d-confirm { transform: none; }
.demo[data-phase="p-confirm"] .d-finger { left: 271px; top: 23px; }
.demo[data-phase="p-confirm"] .d-add { background: rgba(10,132,255,.25); }
@media (prefers-reduced-motion: reduce) { .d-finger { animation: none; } }
.steps li { transition: border-color .2s, box-shadow .2s; }
.steps li.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---- Install + "phone app" screens: logo sticker wallpaper ---- */
/* Tilted full-color logo stickers fill the screen behind everything; a wash dims them so text stays readable. */
:root { --wash: rgba(255,255,255,.88); --gate-lead: #B88A00; }
@media (prefers-color-scheme: dark) { :root { --wash: rgba(0,0,0,.8); --gate-lead: #FFC600; } }
html.gate { background: var(--bg); }
html.gate body { background: transparent; }
.wall { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.wall::after { content: ""; position: absolute; inset: 0; background: var(--wash); }
.wall .stk {
  position: absolute; border-radius: 24%; border: 3px solid #fff; overflow: hidden; background: #fff;
  transform: rotate(var(--r)); box-shadow: 0 6px 16px rgba(0,0,0,.28);
}
.wall .stk img { width: 100%; height: 100%; display: block; transform: scale(1.14); }
.gate-head { background: var(--bg); border-radius: 22px; padding: 14px 14px 12px; margin: 0 0 14px; box-shadow: 0 0 0 1px var(--line); }
#install { padding-top: 60px; }
#install h1 { margin-top: 0; font-size: 23px; }
#install .lead, #phone-only .lead { color: var(--gate-lead); font-weight: 600; margin: 0; }
/* Step cards: solid cards that stand out on the sticker wall; the step the demo is on turns yellow. No fading. */
#install .steps li {
  background: var(--bg); color: var(--text); border: 1.5px solid var(--line); padding: 12px 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: background-color .2s, border-color .2s, box-shadow .2s;
}
#install .steps li.active { background: #FFC600; color: #000; border-color: #FFC600; box-shadow: 0 6px 24px rgba(255,198,0,.35); }
#install .steps li.active::before { background: #000; color: #FFC600; }
#install .steps li.active .sheet-row, #install .steps li.active .chip { background: rgba(0,0,0,.12); color: #000; border-color: #000; }
#install .steps { gap: 10px; }
#install .note { background: var(--bg); border-radius: 14px; padding: 8px 12px; }
#phone-only {
  background: var(--bg); border-radius: 32px; max-width: 520px; margin: 70px auto 0; padding: 36px 36px 30px;
  box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.35);
}
#phone-only .lead { margin-bottom: 24px; }

/* ---- Settings sheet ---- */
.sheet { position: fixed; inset: 0; z-index: 9; background: var(--bg); overflow-y: auto; padding-top: env(safe-area-inset-top); }
.sheet[hidden] { display: none; }
.sheet-head { position: sticky; top: 0; background: var(--bg); display: flex; flex-direction: column; align-items: flex-end; padding: 10px 16px 6px; max-width: 560px; margin: 0 auto; }
.sheet-head h2 { align-self: flex-start; margin: 0; font-size: 30px; letter-spacing: -.02em; }
.sheet-body { max-width: 560px; margin: 0 auto; padding: 8px 16px 40px; }
.set-group { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px 14px; margin: 14px 0; }
.set-label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 6px 0; }
.set-label .link-btn { text-transform: none; letter-spacing: 0; font-size: 15px; }
.my-chains { list-style: none; margin: 0; padding: 0; }
.my-chains li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-weight: 600; }
.my-chains .grow { flex: 1; }
.my-chains small { color: var(--muted); font-weight: 500; font-size: 13px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; width: 100%; }
.set-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.set-btn { background: none; border: 0; text-align: left; font-size: 16px; }
.set-btn span { color: var(--muted); font-size: 22px; }
.switch { flex: none; width: 52px; height: 32px; border-radius: 16px; border: 0; background: var(--line); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--on); }
.switch[aria-checked="true"]::after { background: var(--bg); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.center { text-align: center; }
.picker { z-index: 11; }

/* ---- Logo-first: hide the name wherever the logo loaded ---- */
.avatar.lg { width: 100%; height: auto; aspect-ratio: 1; border-radius: 22%; font-size: 20px; }
.picker-list { grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 360px) { .picker-list { grid-template-columns: repeat(3, 1fr); } }
.tile {
  position: relative; width: 100%; padding: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.tile .avatar { box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s; }
.tile.on .avatar { box-shadow: 0 0 0 3px var(--accent); }
.tile:active .avatar { transform: scale(.94); }
.tile-name { font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--muted); }
.tile .check { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; border-color: var(--bg); }
.tile.on .check { opacity: 1; transform: none; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; border: 2px solid var(--bg); }
.tile .dot { position: absolute; left: -3px; top: -3px; background: var(--price); color: #fff; border: 2px solid var(--bg); width: 12px; height: 12px; border-radius: 50%; }
.chipf .avatar.xs { width: 28px; height: 28px; }
.picker-legend { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.picker-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--price); display: inline-block; }
.picker-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.picker-list { padding-top: 14px; }

/* ---- Sticker wall picker (plain wall that follows the phone theme, logos bring the color) ---- */
.picker { background: var(--wall); color: var(--wall-text); }
.picker-head { position: relative; padding-bottom: 0; }
.picker-head h2 { font-size: 32px; font-weight: 800; color: var(--wall-text); }
.picker-head p { color: var(--wall-muted); margin-bottom: 6px; }
#picker-all { position: absolute; top: 30px; right: 16px; color: var(--wall-text); font-weight: 700; }
.picker-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; padding: 18px 22px 28px; }
@media (max-width: 360px) { .picker-list { gap: 16px 12px; } }
/* Unpicked stickers sit tilted and faded; picked ones straighten up in full color.
   No extra rings, so a wall with everything picked still looks clean. */
.picker .tile { transform: rotate(var(--r)); transition: transform .25s cubic-bezier(.3,1.5,.6,1); -webkit-tap-highlight-color: transparent; }
.picker .tile .avatar.lg {
  border-radius: 22px; border: 4px solid var(--sticker-edge); font-size: 14px; line-height: 1.1; padding: 6px;
  box-shadow: var(--sticker-shadow); opacity: var(--unpicked-fade); filter: grayscale(.7); transition: opacity .2s, filter .2s;
}
.picker .tile .avatar.lg b { overflow-wrap: anywhere; }
/* Stickers: the full-color logo inside a white sticker edge. */
.picker .tile .avatar.ic { padding: 0; }
.picker .tile .avatar.ic img { transform: scale(1.14); }
.picker .tile.on { transform: rotate(calc(var(--r) * .35)); }
.picker .tile.on .avatar.lg { opacity: 1; filter: none; }
.picker .tile:active { transform: rotate(0) scale(.94); }
.picker .tile-name { display: none; }
.picker .tile .check { width: 22px; height: 22px; top: -7px; right: -7px; }
.picker .tile.on .check { background: var(--check-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; border: 0; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
@media (prefers-color-scheme: dark) { .picker .tile.on .check { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); box-shadow: 0 2px 6px rgba(0,0,0,.5); } }
.picker-foot { background: var(--wall); border-top: 1px solid var(--wall-line); max-width: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picker-count { color: var(--wall-text); font-weight: 700; }
.picker-foot .primary { width: auto; padding: 14px 28px; border-radius: 999px; background: var(--wall-button); color: var(--wall-button-text); font-weight: 800; }
.picker-foot .primary:disabled { opacity: .35; }

/* ---- Brand accents: kept minimal. Brand color only on the logo badge and the price (--c set inline from data/chains.json). ---- */
.branded { --ink: var(--ink-l); }
@media (prefers-color-scheme: dark) { .branded { --ink: var(--ink-d); } }
.deal.branded .price { color: var(--ink); }

/* ---- Special-day banner (today's food holiday on yellow, next one underneath) ---- */
.special { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 2px 0 12px; }
.special[hidden] { display: none; }
.special.only-next { border-color: var(--line); }
.sp-today { display: flex; gap: 12px; align-items: center; background: #FFC600; color: #000; padding: 12px 14px; }
.sp-emoji { font-size: 26px; line-height: 1; flex: none; }
.sp-today strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.sp-today small { display: block; font-size: 13px; opacity: .7; margin-top: 2px; }
.sp-next { padding: 9px 14px; font-size: 13px; }
.sp-next span { color: var(--muted); }
.sp-next b { font-weight: 700; }
/* Dark mode: a quiet dark card instead of a bright white box. */
@media (prefers-color-scheme: dark) {
  .special { border-color: var(--line); }
  .sp-next { border-top: 1px solid var(--line); }
}

/* ---- Restaurant filter: a bar fixed to the bottom, in thumb reach ---- */
.chips {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: 560px; margin: 0 auto;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Restaurant bar chips: logo plus a short code (e.g. CFA) instead of the full name.
   Chains without a food icon show the code inside the badge instead, so the text is hidden. */
.chips .chipf:not(:first-child) .cn { display: none; }
.chips .chipf:has(.avatar.ic) .cn { display: inline; letter-spacing: .02em; }
.chips .chipf:not(:first-child):not(:has(.avatar.ic)) { padding: 4px; }
.chips .chipf .avatar.xs { width: auto; min-width: 28px; padding: 0 4px; }
.chips .chipf .avatar.xs.ic { width: 36px; height: 36px; padding: 0; }
/* The logo circle fills the chip's whole left end (top, bottom and left edge), with the code to its right. */
.chips .chipf:has(.avatar.ic) { padding: 0 14px 0 0; gap: 8px; overflow: hidden; }

/* ---- Bottom tab bar: floating glass pill, icons only (Deals · My restaurants · Alerts · You) ---- */
#app { padding-top: 16px; }
#subtitle { margin: 4px 2px 0; color: var(--muted); font-size: 14px; }
.chips[hidden] { display: none; }
.tabbar {
  --tb-hole: #fff;
  position: fixed; left: 18px; right: 18px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; z-index: 7;
  display: flex; align-items: center; padding: 6px; border-radius: 999px;
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(0,0,0,.08); box-shadow: 0 10px 34px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.7);
}
.tb { position: relative; flex: 1; height: 54px; display: grid; place-items: center; border: 0; background: none; color: #111; border-radius: 999px; padding: 0; }
.tb.on { background: rgba(0,0,0,.08); }
#bell.on { background: none; }
#bell.on svg { fill: currentColor; }
.tb .dot { position: absolute; top: 14px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; }
#bell.on .dot { display: none; }
.tb .me { width: 32px; height: 32px; border-radius: 50%; background: #2b2b2b; color: #fff; display: grid; place-items: center; overflow: hidden; }
.tb .me svg { margin-top: 6px; width: 22px; height: 22px; }
.tb:active { transform: scale(.94); }
@media (prefers-color-scheme: dark) {
  .tabbar { --tb-hole: #3a3a3c; background: rgba(28,28,30,.82); border-color: rgba(255,255,255,.1); box-shadow: 0 10px 34px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.08); }
  .tb { color: #fff; }
  .tb.on { background: rgba(255,255,255,.16); }
  .tb .me { background: #e6e6e6; color: #000; }
}
.foot { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* Special day today: the banner becomes the page header, full width and up under the status bar. */
.special:not(.only-next) {
  margin: calc(-16px - env(safe-area-inset-top)) -16px 4px; border: 0; border-radius: 0;
}
.special:not(.only-next) .sp-today { padding: calc(18px + env(safe-area-inset-top)) 16px 16px; }
.special:not(.only-next) .sp-next { padding: 10px 16px; border-bottom: 1px solid var(--line); border-top: 0; }
/* "Next" row under the yellow header: a softer yellow (light) / yellow mixed with black (dark). */
.special:not(.only-next) .sp-next { background: #FFE680; color: #000; border-bottom: 0; }
.special:not(.only-next) .sp-next span { color: rgba(0,0,0,.6); }
@media (prefers-color-scheme: dark) {
  .special:not(.only-next) .sp-next { background: #5C4A00; color: #fff; }
  .special:not(.only-next) .sp-next span { color: rgba(255,255,255,.7); }
}
#subtitle { margin-top: 14px; }
/* Restaurant filter back at the top (under the date line), scrolling sideways like before. */
.chips {
  position: static; max-width: none; margin: 8px -16px 0; padding: 4px 16px 6px;
  background: none; border-top: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* "Live now" heading in the old date-line spot, styled like the section headings. */
#subtitle { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); margin: 16px 2px 0; }
.group:first-child { margin-top: 10px; }

/* "Next" special day on the right of the "Live now" heading (the banner only shows today). */
#subtitle { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
#subtitle > span:first-child { flex: none; }
#subtitle .nx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0; font-weight: 600; }
#subtitle .nx b { font-weight: 700; color: var(--text); }

/* Special day: iOS 26 paints the status bar (and the overscroll area) from the page background
   color, not theme-color. Make that color yellow, but paint the body itself with the normal
   background on top so the app looks the same below the header. */
html.special-day { background-color: #FFC600; }
html.special-day body { background-color: #FFC600; background-image: linear-gradient(var(--bg), var(--bg)); min-height: 100vh; }

/* Special-day banner is a button: tap it (or "Show all") to see every restaurant's deals for the day. */
button.sp-today { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
button.sp-today:disabled { cursor: default; }
.sp-today > div { flex: 1; min-width: 0; }
.sp-all {
  flex: none; align-self: center; background: rgba(0,0,0,.1); color: #000; border-radius: 999px;
  padding: 7px 12px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.sp-all span { font-size: 16px; line-height: 0; margin-left: 2px; }
#special-sheet .sheet-head h2 { font-size: 24px; line-height: 1.2; }
.ss-sub { align-self: flex-start; margin: 4px 0 0; color: var(--muted); font-size: 14px; }
#special-sheet .group:first-child { margin-top: 4px; }

/* ---- Coming up page (calendar tab): next special day as a big yellow card, then a plain list ---- */
.upcoming[hidden] { display: none; }
body.view-up #special, body.view-up #subtitle, body.view-up #chips, body.view-up #feed { display: none; }
.upcoming h1 { margin: 6px 2px 2px; font-size: 30px; letter-spacing: -.02em; }
.upcoming .lead { margin: 0 2px 8px; color: var(--muted); font-size: 14px; }
.up-list { list-style: none; margin: 0; padding: 0; }
.up-row { display: flex; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.up-row .em { font-size: 26px; flex: none; width: 40px; text-align: center; line-height: 1; }
.up-row .tx { flex: 1; min-width: 0; }
.up-row .t { font-size: 15px; font-weight: 700; line-height: 1.25; }
.up-row .s { font-size: 13px; color: var(--muted); margin-top: 1px; }
.up-row .wh { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.up-logos { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.up-logos .avatar.xs { width: 24px; height: 24px; }

/* "Show all" page in the special-day yellow (Dan's call). Cards keep their normal color. */
#special-sheet, #special-sheet .sheet-head { background: #FFC600; color: #000; }
#special-sheet .link-btn { color: #000; }
#special-sheet .ss-sub, #special-sheet .group h2 { color: rgba(0,0,0,.6); }
#special-sheet .deals { color: var(--text); }
/* Coming up tiers: today = full yellow row, next up = yellow text, later = plain. */
.up-list { margin-top: 8px; }
.up-row.now { background: #FFC600; color: #000; border-radius: 16px; border-bottom-color: transparent; padding: 12px 12px 12px 10px; margin-bottom: 2px; cursor: pointer; }
.up-row.now .s, .up-row.now .wh { color: rgba(0,0,0,.65); }
.up-row.now .up-logos .avatar { box-shadow: 0 0 0 2px #fff; }
.up-row.next .t, .up-row.next .wh { color: #B88A00; }
@media (prefers-color-scheme: dark) { .up-row.next .t, .up-row.next .wh { color: #FFC600; } }

/* ---- Alerts sheet (bell tab): status, or the exact Settings taps when notifications are blocked ---- */
.al-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 16px 16px; margin: 10px 0 14px; text-align: center; }
.al-card h3 { font-size: 20px; letter-spacing: -.01em; margin: 10px 0 4px; }
.al-card p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.al-card p strong { color: var(--text); }
.al-card.left { text-align: left; }
.al-card.left h3 { margin-top: 0; }
.al-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--badge); display: grid; place-items: center; margin: 0 auto; }
.al-note { text-align: center; color: var(--muted); font-size: 14px; margin: 4px 0 0 !important; }
.al-row + .al-row { border-top: 1px solid var(--line); }
.al-dim .al-row { opacity: .45; }
.al-test { border-top: 1px solid var(--line); }
.al-steps { list-style: none; padding: 0; margin: 0; counter-reset: al; }
.al-steps li { counter-increment: al; position: relative; padding: 0 0 14px 40px; }
.al-steps li::before {
  content: counter(al); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 14px; display: grid; place-items: center;
}
.al-steps li:not(:last-child)::after { content: ""; position: absolute; left: 12.5px; top: 30px; bottom: 4px; width: 1px; background: var(--line); }
.al-steps small { display: block; font-size: 15px; font-weight: 600; line-height: 26px; margin-bottom: 6px; }
.al-steps .ios-row { display: flex; width: 100%; }
.al-steps .ios-row b { flex: 1; }
.ios-row {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border-radius: 12px;
  background: var(--badge); font-size: 16px; min-height: 42px;
}
.ios-row b { font-weight: 600; }
.ios-row:not(:has(.ios-ic)) { padding-left: 14px; }
.ios-chev { color: var(--muted); font-size: 22px; line-height: 1; margin-left: 6px; }
.ios-ic { width: 29px; height: 29px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.ios-gear { background: #8e8e93; }
.ios-bell { background: #ff3b30; }
.ios-switch { width: 46px; height: 28px; border-radius: 14px; background: #34c759; position: relative; margin-left: 10px; flex: none; }
.ios-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
