/* Coupon Club — Crown Money brand: #250B40 (crown purple), #E6DEEE (lavender), white. */
:root {
  --crown: #250b40;
  --crown-2: #3b1766;
  --crown-3: #5a2a91;
  --lavender: #e6deee;
  --lavender-2: #f4f0f8;
  --bg: #f7f4fa;
  --surface: #ffffff;
  --surface-2: #f4f0f8;
  --text: #1c0f2e;
  --muted: #6b5f7b;
  --border: #e3dbeb;
  --accent: #ffb020;      /* hot / rating */
  --accent-ink: #5c3a00;
  --save: #0f8a5f;        /* savings / codes */
  --save-bg: #e3f6ee;
  --danger: #c62f45;
  --danger-bg: #fde8eb;
  --shadow: 0 1px 2px rgba(37, 11, 64, 0.06), 0 6px 20px rgba(37, 11, 64, 0.07);
  --shadow-lg: 0 10px 40px rgba(37, 11, 64, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --topbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120720;
    --surface: #1d0f30;
    --surface-2: #26163d;
    --text: #f3eef9;
    --muted: #b3a6c4;
    --border: #36234f;
    --lavender: #36234f;
    --lavender-2: #26163d;
    --save: #3fd19a;
    --save-bg: #0f2e24;
    --danger: #ff7387;
    --danger-bg: #3a1220;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 60px); }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
/* The purple footer runs to the bottom edge; on phones it also sits behind the bottom nav. */
html { background: var(--crown); }
body { min-height: 100vh; }
@media (max-width: 899px) { .footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--crown-3); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--crown);
  color: #fff;
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand img { border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.08rem; letter-spacing: -0.01em; }
.brand-text small { font-size: 0.72rem; color: var(--lavender); opacity: 0.85; font-weight: 500; }
@media (prefers-color-scheme: dark) { .brand-text small { color: #d8cbe6; } }

.search {
  position: relative; display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px; padding: 0 12px; min-width: 0; transition: background 0.15s, border-color 0.15s;
}
.search:focus-within { background: #fff; border-color: #fff; color: var(--crown); }
.search svg { width: 18px; height: 18px; fill: currentColor; opacity: 0.75; flex: none; }
.search input {
  border: 0; background: transparent; outline: none; padding: 10px 8px; width: 100%; min-width: 0;
  color: inherit; font-size: 16px; /* 16px stops iOS zoom */
}
.search input::placeholder { color: inherit; opacity: 0.7; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { border: 0; background: transparent; font-size: 1.4rem; line-height: 1; padding: 0 4px; color: inherit; opacity: 0.6; }

.topnav { display: none; gap: 2px; }
.topnav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 999px; opacity: 0.85; white-space: nowrap;
}
.topnav a:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }
.topnav a.active { background: #fff; color: var(--crown); opacity: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid transparent; padding: 10px 18px;
  font-weight: 700; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
  transition: transform 0.08s, background 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-primary { background: var(--crown); color: #fff; }
.btn-primary:hover { background: var(--crown-2); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--crown-3); }
.btn-save { background: var(--save); color: #fff; }
.btn-install { background: var(--accent); color: var(--crown); padding: 8px 14px; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }

@media (max-width: 899px) {
  .topbar-inner { grid-template-columns: auto 1fr auto; }
  .brand-text small { display: none; }
  .btn-install span { display: none; }
  .btn-install { padding: 9px; }
}
@media (max-width: 480px) {
  .topbar-inner { grid-template-columns: auto 1fr auto; gap: 8px; padding: 8px 12px; }
  .brand-text { display: none; }
}
@media (min-width: 900px) {
  .topbar-inner { grid-template-columns: auto minmax(220px, 420px) 1fr auto; }
  .topnav { display: flex; justify-content: flex-end; }
}

.status-strip {
  background: var(--crown-2); color: #efe6f8; font-size: 0.8rem; text-align: center;
  padding: 5px 16px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.status-strip:empty { display: none; }
.status-strip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fd19a; margin-right: 6px; box-shadow: 0 0 0 3px rgba(63, 209, 154, 0.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(63, 209, 154, 0); } }

/* ---------- Layout ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 16px; outline: none; min-height: 60vh; }
.loading { display: grid; place-items: center; gap: 12px; padding: 80px 0; color: var(--muted); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--lavender); border-top-color: var(--crown); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.section { margin: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.01em; }
.section-head a { font-weight: 700; color: var(--crown-3); text-decoration: none; font-size: 0.9rem; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .section-head a { color: #c9a7f2; } }
.page-title { margin: 8px 0 4px; font-size: 1.6rem; letter-spacing: -0.02em; }
.page-sub { margin: 0 0 16px; color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 400px at 90% -10%, #5a2a91 0%, transparent 60%), linear-gradient(135deg, #250b40 0%, #3b1766 100%);
  color: #fff; border-radius: 24px; padding: 28px 22px; box-shadow: var(--shadow-lg);
}
.hero h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 4.5vw, 2.6rem); line-height: 1.1; letter-spacing: -0.03em; max-width: 18ch; }
.hero p { margin: 0 0 18px; color: #e6deee; max-width: 52ch; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 14px; padding: 10px 14px; min-width: 96px; }
.stat b { display: block; font-size: 1.35rem; line-height: 1.1; }
.stat span { font-size: 0.78rem; color: #e6deee; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.hero-crown { position: absolute; right: -10px; bottom: -20px; width: 220px; opacity: 0.08; pointer-events: none; }
@media (min-width: 900px) { .hero { padding: 40px; } .hero-crown { width: 320px; opacity: 0.1; } }

/* ---------- Chips / departments ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 7px 13px; font-size: 0.88rem; font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--crown-3); }
.chip[aria-pressed="true"], .chip.active { background: var(--crown); color: #fff; border-color: var(--crown); }
.chip .count { font-size: 0.75rem; opacity: 0.65; font-weight: 600; }
.chip .x { margin-left: 2px; opacity: 0.7; font-size: 1.05em; }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dept-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); text-decoration: none; box-shadow: var(--shadow);
  transition: transform 0.12s, border-color 0.12s;
}
.dept-tile:hover { transform: translateY(-2px); border-color: var(--crown-3); }
.dept-tile .ico { font-size: 1.6rem; }
.dept-tile b { font-size: 0.95rem; line-height: 1.2; }
.dept-tile span { font-size: 0.8rem; color: var(--muted); }

/* ---------- Deal cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform 0.12s, box-shadow 0.12s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card.exclusive { border: 2px solid var(--accent); }
.card-top { display: flex; gap: 12px; padding: 14px 14px 0; cursor: pointer; }
.thumb {
  width: 84px; height: 84px; flex: none; border-radius: 12px; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb .fallback { font-size: 2rem; }
.card-body { min-width: 0; flex: 1; }
.store-line { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; min-width: 0; }
.store-line img { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.store-line a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-line a:hover { color: var(--crown-3); text-decoration: underline; }
.card h3 { margin: 0; font-size: 0.95rem; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 14px 0; }
.badge { font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: 0.01em; text-transform: uppercase; white-space: nowrap; }
.badge-off { background: var(--danger-bg); color: var(--danger); }
.badge-code { background: var(--save-bg); color: var(--save); }
.badge-free { background: #fff3d6; color: #8a5a00; }
.badge-hot { background: var(--accent); color: var(--accent-ink); }
.badge-new { background: var(--lavender); color: var(--crown); }
.badge-type { background: var(--surface-2); color: var(--muted); }
.badge-ending { background: var(--danger); color: #fff; }
.badge-excl { background: var(--crown); color: #fff; }
@media (prefers-color-scheme: dark) { .badge-free { background: #3a2a05; color: #ffcf66; } .badge-new { color: #e6deee; } }

.price-line { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px 0; }
.price { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.was { color: var(--muted); text-decoration: line-through; font-size: 0.85rem; }

.code-row { display: flex; gap: 8px; padding: 12px 14px 0; }
.code-btn {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 2px dashed var(--save); background: var(--save-bg); color: var(--save);
  border-radius: 10px; padding: 8px 12px; font-weight: 800; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.95rem; letter-spacing: 0.04em; min-width: 0;
}
.code-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-btn small { font-family: var(--font); font-weight: 700; font-size: 0.72rem; letter-spacing: 0; text-transform: uppercase; flex: none; }
.code-btn:hover { background: var(--save); color: #fff; }

.card-foot { margin-top: auto; padding: 12px 14px 12px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.76rem; color: var(--muted); padding: 10px 14px 0; }
.meta .ok { color: var(--save); font-weight: 600; }
.meta .warn { color: var(--danger); font-weight: 700; }
.stars { display: inline-flex; align-items: center; gap: 1px; color: var(--accent); font-size: 0.9rem; letter-spacing: -1px; }
.stars .num { color: var(--muted); font-size: 0.76rem; margin-left: 6px; letter-spacing: 0; font-weight: 700; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  display: inline-grid; place-items: center; flex: none; color: var(--muted);
}
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn:hover { color: var(--crown-3); border-color: var(--crown-3); }
.icon-btn[aria-pressed="true"] { color: #e0245e; border-color: #e0245e; background: #fdecf2; }
@media (prefers-color-scheme: dark) { .icon-btn[aria-pressed="true"] { background: #3a1220; } }
.foot-actions { display: flex; gap: 6px; align-items: center; }

/* ---------- Toolbar / filters ---------- */
.toolbar {
  position: sticky; top: calc(var(--topbar-h) + 26px); z-index: 30;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
  padding: 10px 0; margin: 0 0 6px;
}
.toolbar .grow { flex: 1; }
.select {
  appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b5f7b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 8px center / 20px;
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 34px 8px 14px; font-weight: 600; font-size: 0.88rem;
}
.result-count { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--crown); }

.layout-filters { display: grid; gap: 20px; }
.sidebar { display: none; }
@media (min-width: 1100px) {
  .layout-filters { grid-template-columns: 260px 1fr; align-items: start; }
  .sidebar {
    display: block; position: sticky; top: calc(var(--topbar-h) + 40px); max-height: calc(100vh - 120px); overflow: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  }
  .filters-btn { display: none !important; }
}
.filter-group { border-bottom: 1px solid var(--border); padding: 12px 0; }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { margin: 0 0 8px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.filter-list { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; }
.filter-list label { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; }
.filter-list label:hover { background: var(--surface-2); }
.filter-list input { accent-color: var(--crown); width: 16px; height: 16px; flex: none; }
.filter-list .n { margin-left: auto; color: var(--muted); font-size: 0.78rem; }
.rating-pick { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Stores ---------- */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.store-card {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); text-decoration: none; box-shadow: var(--shadow); transition: border-color 0.12s;
}
.store-card:hover { border-color: var(--crown-3); }
.store-card img { width: 36px; height: 36px; border-radius: 8px; background: #fff; flex: none; padding: 3px; border: 1px solid var(--border); }
.store-card b { display: block; font-size: 0.92rem; line-height: 1.2; }
.store-card span { font-size: 0.78rem; color: var(--muted); }
.store-card .live { color: var(--save); font-weight: 700; }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 14px; }
.az a { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; font-weight: 700; font-size: 0.82rem; }
.az a.off { opacity: 0.35; pointer-events: none; }
.store-hero { display: flex; align-items: center; gap: 16px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; flex-wrap: wrap; }
.store-hero img { width: 56px; height: 56px; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--border); }
.store-hero h1 { margin: 0; font-size: 1.4rem; }
.store-hero .grow { flex: 1; min-width: 180px; }

/* ---------- Bills ---------- */
.bills-hero { background: linear-gradient(135deg, #0f8a5f, #0b6b4a); color: #fff; border-radius: 22px; padding: 24px; margin-bottom: 18px; }
.bills-hero h1 { margin: 0 0 6px; font-size: 1.6rem; }
.bills-hero p { margin: 0; opacity: 0.92; max-width: 60ch; }
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.tip h3 { margin: 0 0 6px; font-size: 1rem; }
.tip p { margin: 0 0 10px; font-size: 0.9rem; color: var(--muted); }
.tip a { font-weight: 700; color: var(--crown-3); font-size: 0.88rem; }
@media (prefers-color-scheme: dark) { .tip a { color: #c9a7f2; } }

.cta {
  display: grid; gap: 14px; align-items: center; background: var(--lavender); color: var(--crown);
  border-radius: 22px; padding: 22px; margin: 28px 0;
}
.cta h2 { margin: 0 0 4px; font-size: 1.3rem; }
.cta p { margin: 0; }
@media (prefers-color-scheme: dark) { .cta { background: var(--surface-2); color: var(--text); } }
@media (min-width: 760px) { .cta { grid-template-columns: 1fr auto; padding: 28px 32px; } }

/* ---------- Empty, more ---------- */
.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.empty .big { font-size: 2.6rem; }
.empty h3 { color: var(--text); margin: 8px 0; }
.more { display: flex; justify-content: center; padding: 20px 0; }
.sentinel { height: 1px; }

/* ---------- Sheet (dialog) ---------- */
.sheet {
  border: 0; padding: 0; background: var(--surface); color: var(--text);
  width: min(640px, 100vw); max-height: min(92vh, 900px); border-radius: 22px; box-shadow: var(--shadow-lg);
}
.sheet::backdrop { background: rgba(18, 7, 32, 0.55); backdrop-filter: blur(2px); }
@media (max-width: 640px) {
  .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; max-height: 90vh; padding-bottom: env(safe-area-inset-bottom); }
  .sheet[open] { animation: up 0.22s ease-out; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sheet-body { padding: 16px 18px 22px; }
.sheet-foot { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 18px; background: var(--surface); border-top: 1px solid var(--border); }
.sheet-foot .btn { flex: 1; }

.detail-img { width: 100%; max-height: 260px; object-fit: contain; background: #fff; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 14px; }
.detail h3 { margin: 0 0 8px; font-size: 1.2rem; line-height: 1.3; }
.detail .desc { color: var(--muted); font-size: 0.95rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 14px 0; }
.fact { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.fact span { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.fact b { font-size: 0.95rem; }
.detail-actions { display: grid; gap: 10px; margin-top: 14px; }
.detail .code-btn { font-size: 1.15rem; padding: 14px 16px; }
.small-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 0.88rem; }
.small-links a, .small-links button { color: var(--crown-3); font-weight: 700; background: none; border: 0; padding: 0; text-decoration: underline; }
@media (prefers-color-scheme: dark) { .small-links a, .small-links button { color: #c9a7f2; } }

.install-steps { padding-left: 1.2em; }
.install-steps li { margin: 8px 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--crown); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 80; max-width: 92vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* ---------- Bottom nav (mobile) ---------- */
.bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(37, 11, 64, 0.08);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 0.7rem; font-weight: 700; padding: 4px 0; border-radius: 12px; }
.bottomnav svg { width: 24px; height: 24px; fill: currentColor; }
.bottomnav a.active { color: var(--crown); }
@media (prefers-color-scheme: dark) { .bottomnav a.active { color: #d9b8ff; } }
@media (min-width: 900px) { .bottomnav { display: none; } }

/* ---------- Footer ---------- */
.footer { background: var(--crown); color: #e6deee; margin-top: 48px; }
.featured { border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 26px 16px; text-align: center; }
.featured p { margin: 0 0 16px; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: #b9a9cf; font-weight: 700; }
.featured-logos { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 34px; }
.featured-logos img { height: 26px; width: auto; opacity: 0.72; transition: opacity 0.15s; }
.featured-logos img:hover { opacity: 1; }
@media (max-width: 599px) { .featured-logos { gap: 14px 22px; } .featured-logos img { height: 20px; } }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 36px 16px 28px; display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-inner { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; } .footer-brand { grid-column: auto; } }
.crown-link { display: inline-block; }
.crown-logo { width: 150px; height: auto; display: block; margin-bottom: 14px; }
.footer-brand p { font-size: 0.9rem; margin: 0 0 16px; max-width: 42ch; color: #d9cde8; }
.footer a { color: #fff; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); transition: background 0.15s, transform 0.15s; }
.socials a:hover { background: var(--accent); transform: translateY(-2px); }
.socials a:hover svg { fill: var(--crown); }
.socials svg { width: 18px; height: 18px; fill: #fff; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h3 { margin: 0 0 4px; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #b9a9cf; }
.footer-col a, .footer-col button { color: #f3eef9; text-decoration: none; font-size: 0.92rem; background: none; border: 0; padding: 0; text-align: left; font-weight: 500; }
.footer-col a:hover, .footer-col button:hover { color: var(--accent); }
.footer-bottom { max-width: 1280px; margin: 0 auto; padding: 18px 16px 28px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 0.82rem; color: #b9a9cf; }
.footer-bottom p { margin: 0; }
.footer-bottom .fine { flex-basis: 100%; font-size: 0.76rem; line-height: 1.5; color: #9c8cb3; margin-top: 6px; }

/* ---------- Store logos ---------- */
.brand-mark { border-radius: 10px; flex: none; }
.store-line .store-logo { width: 22px; height: 22px; border-radius: 6px; background: #fff; border: 1px solid var(--border); object-fit: contain; padding: 1px; }
.thumb .logo-thumb { width: 64%; height: 64%; object-fit: contain; background: transparent; }
.thumb:has(.logo-thumb) { background: #fff; border: 1px solid var(--border); }
.sheet-store { display: flex; align-items: center; gap: 10px; }
.sheet-store img { border-radius: 8px; border: 1px solid var(--border); background: #fff; object-fit: contain; padding: 2px; }
.store-card img { object-fit: contain; }
.store-hero img { object-fit: contain; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.logo-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 8px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow);
  transition: transform 0.12s, border-color 0.12s;
}
.logo-tile:hover { transform: translateY(-2px); border-color: var(--crown-3); }
.logo-tile img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff; padding: 4px; border: 1px solid var(--border); }
.logo-tile b { font-size: 0.85rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.logo-tile span { font-size: 0.74rem; color: var(--save); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Star rating: grey stars with a gold overlay clipped to the score. */
.rating { position: relative; display: inline-block; color: var(--border); line-height: 1; }
.rating::before { content: "★★★★★"; }
.rating i { position: absolute; inset: 0 auto 0 0; width: calc(var(--r) / 5 * 100%); overflow: hidden; color: var(--accent); white-space: nowrap; font-style: normal; }
.rating i::before { content: "★★★★★"; }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* Compact hero on phones so deals appear above the fold sooner. */
@media (max-width: 599px) {
  .hero { padding: 20px 18px; border-radius: 20px; }
  .hero h1 { font-size: 1.45rem; }
  .hero p { font-size: 0.9rem; margin-bottom: 14px; }
  .hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
  .stat { min-width: 0; padding: 8px 6px; text-align: center; border-radius: 12px; }
  .stat b { font-size: 1rem; }
  .stat span { font-size: 0.66rem; line-height: 1.15; display: block; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 9px 14px; font-size: 0.86rem; }
}
@media (max-width: 599px) {
  .tips { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .tip { scroll-snap-align: start; }
}

/* ---------- Personalisation ---------- */
.badge-pin { background: var(--crown); color: #fff; }
.icon-btn[data-act="pin"][aria-pressed="true"] { color: var(--crown); border-color: var(--crown); background: var(--lavender); }
.personal-cta {
  display: grid; gap: 14px; align-items: center; margin: 22px 0 6px; padding: 20px 22px; border-radius: 20px;
  background: linear-gradient(135deg, #fff7e6, #fdeccd); border: 1px solid #f6d58c; color: var(--crown);
}
.personal-cta h2 { margin: 0 0 4px; font-size: 1.2rem; }
.personal-cta p { margin: 0; font-size: 0.92rem; }
@media (min-width: 760px) { .personal-cta { grid-template-columns: 1fr auto; } }
@media (prefers-color-scheme: dark) { .personal-cta { background: #2a1d07; border-color: #5c4310; color: #ffe2a6; } }
.foryou-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.foryou-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pers h3 { margin: 18px 0 8px; font-size: 0.95rem; }
.pers h3:first-child { margin-top: 0; }
.pers .small { font-size: 0.82rem; margin: 0 0 8px; }
.pers-search { background: var(--surface-2); border-color: var(--border); color: var(--text); margin-bottom: 10px; }
.pers-stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.follow-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); font-size: 0.76rem; font-weight: 700; text-align: center; line-height: 1.2;
}
.follow-chip img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: #fff; }
.follow-chip.active { border: 2px solid var(--crown); background: var(--lavender); color: var(--crown); }
.follow-chip.active::after { content: "★ Following"; font-size: 0.68rem; color: var(--crown-3); }
@media (prefers-color-scheme: dark) { .follow-chip.active { color: #fff; } .follow-chip.active::after { color: #d9b8ff; } }
.kw-form { display: flex; gap: 8px; margin-bottom: 8px; }
.kw-form input { flex: 1; min-width: 0; border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 9px 14px; font-size: 16px; }
.mini-list { display: grid; gap: 8px; }
.mini { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; background: var(--surface); }
.mini:hover { border-color: var(--crown-3); }
.mini img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--border); flex: none; }
.mini b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.9rem; line-height: 1.3; }
.mini span { font-size: 0.78rem; color: var(--muted); }
.mini-code { font-style: normal; font-weight: 800; color: var(--save); font-family: ui-monospace, Menlo, monospace; }

/* ---------- Install pop-up ---------- */
.install-banner {
  position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px;
  background: var(--crown); color: #fff; box-shadow: var(--shadow-lg);
  transform: translateY(30px); opacity: 0; transition: transform 0.25s, opacity 0.25s;
}
.install-banner.show { transform: none; opacity: 1; }
.install-banner img { border-radius: 12px; flex: none; }
.ib-text { flex: 1; min-width: 0; }
.ib-text b { display: block; font-size: 0.98rem; }
.ib-text span { display: block; font-size: 0.8rem; color: #e6deee; line-height: 1.3; }
.ib-close { border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 1.2rem; line-height: 1; flex: none; }
@media (min-width: 900px) { .install-banner { left: auto; right: 24px; bottom: 24px; max-width: 460px; } }

/* ---------- Code votes ---------- */
.vote-block { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--save-bg); }
.vote-block b { display: block; font-size: 0.95rem; }
.vote-block span { font-size: 0.8rem; color: var(--muted); }
.vote-btns { display: flex; gap: 8px; }
.vote-btns.big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

/* ---------- Sale calendar ---------- */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.events-rail { grid-auto-columns: minmax(260px, 300px); }
.event { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.event.live { border: 2px solid var(--accent); }
.event-icon { font-size: 2rem; width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--lavender); }
.event-body { min-width: 0; }
.event-when { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--crown-3); }
.event.live .event-when { color: #b46b00; }
.event h3 { margin: 2px 0 2px; font-size: 1.05rem; }
.event-date { margin: 0 0 6px; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.event p { margin: 0 0 10px; font-size: 0.86rem; }
.event-actions { display: flex; flex-wrap: wrap; gap: 6px; }
@media (prefers-color-scheme: dark) { .event-when { color: #d9b8ff; } }

/* ---------- Server-rendered store pages ---------- */
.seo .seo-top { grid-template-columns: 1fr auto; }
.seo-wrap { max-width: 980px; margin: 0 auto; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin: 4px 0; }
.crumbs a { color: var(--crown-3); }
.seo-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.seo-deal { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.seo-deal-main { flex: 1; min-width: 220px; }
.seo-deal h3 { margin: 0 0 4px; font-size: 1rem; }
.seo-deal h3 a { text-decoration: none; }
.seo-deal p { margin: 0; font-size: 0.82rem; }
.seo-code { flex: none; cursor: default; }
.seo-related a { color: var(--crown-3); }
@media (min-width: 900px) and (max-width: 1199px) {
  .brand-text small { display: none; }
  .brand-text strong { white-space: nowrap; }
  .topnav a { padding: 8px 9px; font-size: 0.86rem; }
}
.brand-text strong { white-space: nowrap; }

/* ---------- AI assistant ---------- */
.ask-fab {
  position: fixed; z-index: 45; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom));
  border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; font-size: 0.95rem;
  background: linear-gradient(135deg, #5a2a91, #250b40); color: #fff; box-shadow: 0 8px 24px rgba(37, 11, 64, 0.35);
}
.ask-fab:hover { transform: translateY(-1px); }
@media (min-width: 900px) { .ask-fab { bottom: 24px; right: 24px; } }
body:has(.install-banner.show) .ask-fab { display: none; }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 40vh; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 0.93rem; line-height: 1.45; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0 6px; padding-left: 1.1em; } .msg li { margin: 3px 0; }
.msg a { color: var(--crown-3); font-weight: 700; }
.msg.user { align-self: flex-end; background: var(--crown); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
@media (prefers-color-scheme: dark) { .msg a { color: #d9b8ff; } }
.dots { display: inline-flex; gap: 4px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; } .dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.chat-form { gap: 8px; }
.chat-form input { flex: 1; min-width: 0; border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 10px 16px; font-size: 16px; }
.chat-form .btn { flex: none; }

/* ---------- Newsletter ---------- */
.newsletter { max-width: 1280px; margin: 0 auto; padding: 26px 16px; display: grid; gap: 14px; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
@media (min-width: 860px) { .newsletter { grid-template-columns: 1fr minmax(320px, 440px); } }
.newsletter h3 { margin: 0 0 4px; color: #fff; font-size: 1.15rem; }
.newsletter p { margin: 0; font-size: 0.9rem; color: #d9cde8; }
.nl-form { display: flex; gap: 8px; }
.nl-form input { flex: 1; min-width: 0; font-size: 16px; padding: 11px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.1); color: #fff; }
.nl-form input::placeholder { color: #cbbfdc; }
.nl-done { color: #fff !important; font-weight: 700; }

/* ---------- Supermarket specials ---------- */
.specials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.special { display: flex; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; box-shadow: var(--shadow); }
.special:hover { border-color: var(--crown-3); }
.special-img { width: 72px; height: 72px; flex: none; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; font-size: 1.8rem; }
.special-img img { width: 100%; height: 100%; object-fit: contain; }
.special-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.special-body b { font-size: 0.9rem; line-height: 1.25; }
.special-body .muted { font-size: 0.76rem; }
.special-when { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--crown-3); }
.special-price { font-weight: 800; font-size: 1.05rem; }
.special-price s { color: var(--muted); font-weight: 500; font-size: 0.82rem; }
.special-price em { font-style: normal; color: var(--save); font-size: 0.8rem; }
.inline-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
@media (prefers-color-scheme: dark) { .special-when { color: #d9b8ff; } }

/* ---------- Bills calculator ---------- */
.calc { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 20px; margin: 18px 0; box-shadow: var(--shadow); }
.calc-head h2 { margin: 0 0 4px; font-size: 1.25rem; }
.calc-head p { margin: 0 0 14px; color: var(--muted); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.calc-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 700; }
.calc-field small { font-weight: 500; color: var(--muted); font-size: 0.74rem; }
.calc-input { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; min-height: 44px; }
.calc-input i { font-style: normal; color: var(--muted); font-weight: 700; }
.calc-input input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; padding: 10px 0; outline: none; }
.calc-input input[type="range"] { accent-color: var(--crown); padding: 0; }
.calc-input output { font-weight: 800; min-width: 3ch; text-align: right; }
.calc-total { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #0f8a5f, #0b6b4a); color: #fff; margin-bottom: 12px; }
.calc-total b { font-size: 2rem; letter-spacing: -0.02em; }
.calc-total span { opacity: 0.9; font-size: 0.9rem; }
.calc-rows { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.calc-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.calc-rows li span { display: block; font-size: 0.8rem; color: var(--muted); }
.calc-right { text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; }
.calc-right a { color: var(--crown-3); font-weight: 700; }
.calc-cta { display: grid; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--lavender); color: var(--crown); }
.calc-cta p { margin: 0; font-size: 0.9rem; }
@media (min-width: 760px) { .calc-cta { grid-template-columns: 1fr auto; } }
@media (prefers-color-scheme: dark) { .calc-cta { color: var(--text); } .calc-right a { color: #d9b8ff; } }
.small { font-size: 0.78rem; }
.badge-drop { background: var(--save); color: #fff; }
.price-hist { font-size: 0.82rem; color: var(--muted); margin: 0 0 8px; }
.price-hist small { opacity: 0.8; }

/* ---------- Extension page ---------- */
.ext-hero { display: grid; gap: 18px; align-items: center; background: linear-gradient(135deg, #250b40, #3b1766); color: #fff; border-radius: 24px; padding: 26px 22px; }
.ext-hero h1 { margin: 0 0 8px; font-size: 1.7rem; letter-spacing: -0.02em; }
.ext-hero p { color: #e6deee; margin: 0 0 16px; max-width: 56ch; }
.ext-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ext-points li { background: rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; }
@media (min-width: 860px) { .ext-hero { grid-template-columns: 1.3fr 1fr; padding: 36px; } }
.ext-steps code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* ---------- Smart shopping guide ---------- */
.tips-hero { background: linear-gradient(135deg, #fff7e6, #fdeccd); border: 1px solid #f6d58c; color: var(--crown); border-radius: 22px; padding: 24px 22px; margin-bottom: 16px; }
.tips-hero h1 { margin: 0 0 6px; font-size: 1.7rem; letter-spacing: -0.02em; }
.tips-hero p { margin: 0 0 14px; max-width: 62ch; }
@media (prefers-color-scheme: dark) { .tips-hero { background: #2a1d07; border-color: #5c4310; color: #ffe2a6; } }
.guide { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; margin: 12px 0; box-shadow: var(--shadow); scroll-margin-top: calc(var(--topbar-h) + 50px); }
.guide summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform 0.15s; }
.guide[open] summary::after { transform: rotate(180deg); }
.guide-icon { font-size: 1.6rem; width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--lavender); }
.guide summary b { display: block; font-size: 1.08rem; }
.guide summary small { color: var(--muted); font-size: 0.8rem; }
.guide-intro { margin: 0 18px 12px; color: var(--muted); }
.guide-tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 0 18px 18px; }
.guide-tip { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.guide-tip h3 { margin: 0 0 6px; font-size: 0.98rem; }
.guide-tip p { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.5; }
.guide-tip a, .tip-day a { color: var(--crown-3); font-weight: 700; font-size: 0.86rem; }
@media (prefers-color-scheme: dark) { .guide-tip a, .tip-day a { color: #d9b8ff; } }
.tip-day { display: flex; gap: 14px; align-items: flex-start; margin: 22px 0 4px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.tip-day-icon { font-size: 1.6rem; width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: #fff3d6; }
.tip-day-label { display: block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tip-day b { display: block; font-size: 1.02rem; margin: 2px 0 4px; }
.tip-day p { margin: 0 0 6px; font-size: 0.9rem; }
