/* ============================================================
   hearth-hunts - main stylesheet (warm ember theme)
   ============================================================ */
:root {
  --primary: #d9642e;
  --primary-dark: #b44e1f;
  --accent: #f4a83c;
  --bg: #fbf8f4;
  --surface: #ffffff;
  --text: #2a211b;
  --muted: #8b7d70;
  --border: #efe6da;
  --border-strong: #d8cbbb;
  --footer-bg: #241b15;
  --footer-text: #efe4d8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 18px rgba(42, 33, 27, 0.08);
  --shadow-hover: 0 10px 26px rgba(42, 33, 27, 0.14);
  --maxw: 1080px;
  --header-h: 62px;
  /* category accent colors */
  --c-fashion: #b85c79;
  --c-home: #7a9e7e;
  --c-electronics: #4e7da6;
  --c-beauty: #c77ba0;
  --c-outdoor: #6b8f71;
  --c-kitchen: #c98243;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(42, 33, 27, 0.04);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -0.02em; }
.logo img { width: 34px; height: 34px; }
.logo span { white-space: nowrap; }
.logo .mark-word b { color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
}
.main-nav a:hover { background: #f7efe6; color: var(--primary-dark); }
.main-nav a.active { background: var(--primary); color: #fff; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.icon-btn:hover { background: #f7efe6; }
.icon-btn svg { width: 19px; height: 19px; }
.hamburger { display: none; }

/* mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 14px 22px rgba(42, 33, 27, 0.1);
  padding: 10px 18px 16px;
  z-index: 490;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 12px 8px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { color: var(--primary); }

/* ============ Hero ============ */
.hero {
  position: relative;
  background-image: linear-gradient(100deg, rgba(36, 27, 21, 0.78) 8%, rgba(36, 27, 21, 0.38) 55%, rgba(36, 27, 21, 0.15) 100%), url("hero.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 64px 0 70px;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.hero h1 { font-size: 26px; line-height: 1.25; letter-spacing: -0.02em; max-width: 560px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { margin: 14px 0 22px; max-width: 480px; color: rgba(255, 255, 255, 0.88); font-size: 16.5px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

/* ============ Sections ============ */
.section { padding: 34px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 19px; letter-spacing: -0.02em; position: relative; padding-left: 14px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 4px; background: var(--primary); }
.section-head .more { font-size: 14px; font-weight: 600; }
.page-title { font-size: 21px; letter-spacing: -0.02em; margin: 26px 0 6px; }
.page-sub { color: var(--muted); margin-bottom: 20px; }

/* ============ Filter chips ============ */
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0 22px; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============ Coupon cards (ticket style, distinct from reference) ============ */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.deal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
  /* transparent semicircular notches punched at the left/right edges at the banner/body seam */
  --notch-y: 61px;
  -webkit-mask:
    radial-gradient(circle at left var(--notch-y), transparent 9px, #000 9.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at right var(--notch-y), transparent 9px, #000 9.5px) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle at left var(--notch-y), transparent 9px, #000 9.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at right var(--notch-y), transparent 9px, #000 9.5px) right / 51% 100% no-repeat;
}
.deal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
/* full-card click target (keeps the reference jump behaviour, the whole card opens the detail page) */
.deal-card .card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.deal-card .card-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* top brand banner - fixed short height (stays ~30px below the white body) so the seam/notch stays exact */
.deal-card .banner { position: relative; height: 60px; background: var(--bg); }
.deal-card .banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* white body with a bold dashed tear line; side notches are real transparent cutouts via the card mask above */
.deal-card .body { position: relative; flex: 1; padding: 16px 16px 16px; display: flex; flex-direction: column; }
.deal-card .body::before {
  content: "";
  position: absolute;
  left: 16px; right: 16px; top: -1.5px; height: 0;
  border-top: 3px dashed #8a7a66;
  pointer-events: none;
  z-index: 3;
}
.deal-card .m-row { display: flex; align-items: center; gap: 14px; }
.deal-card .m-logo {
  width: 58px; height: 58px; flex: 0 0 58px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 23px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: none;
}
.deal-card .m-logo.cat-color-fashion { color: var(--c-fashion); }
.deal-card .m-logo.cat-color-home { color: var(--c-home); }
.deal-card .m-logo.cat-color-electronics { color: var(--c-electronics); }
.deal-card .m-logo.cat-color-beauty { color: var(--c-beauty); }
.deal-card .m-logo.cat-color-outdoor { color: var(--c-outdoor); }
.deal-card .m-logo.cat-color-kitchen { color: var(--c-kitchen); }
.deal-card .m-logo.word, .detail-head .avatar.word, .brand-card .avatar.word {
  font-size: 11.5px; line-height: 1.15; padding: 5px 4px; text-align: center;
  word-break: break-word; letter-spacing: 0.02em;
}

.deal-card .m-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.deal-card .m-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.deal-card .m-tag { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.35; color: var(--muted); }
/* card footer removed on purpose: the reference card is banner + logo + name + tagline only,
   the coupon code and claim action live on the detail page */
.cat-color-fashion { background: linear-gradient(160deg, var(--c-fashion), #93435c); }
.cat-color-home { background: linear-gradient(160deg, var(--c-home), #5c7a60); }
.cat-color-electronics { background: linear-gradient(160deg, var(--c-electronics), #3a6186); }
.cat-color-beauty { background: linear-gradient(160deg, var(--c-beauty), #a05d82); }
.cat-color-outdoor { background: linear-gradient(160deg, var(--c-outdoor), #527057); }
.cat-color-kitchen { background: linear-gradient(160deg, var(--c-kitchen), #a36733); }

/* ============ Category cards ============ */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow);
  transition: transform 0.18s;
}
.cat-card:hover { transform: translateY(-3px); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-card .cat-label {
  position: relative;
  width: 100%;
  padding: 30px 16px 14px;
  background: linear-gradient(to top, rgba(36, 27, 21, 0.82), rgba(36, 27, 21, 0));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cat-card .cat-label small { font-weight: 500; font-size: 12.5px; color: rgba(255, 255, 255, 0.82); }
.cat-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.cat-links a {
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.cat-links a:hover { border-color: var(--primary); color: var(--primary); }

/* ============ Brand list ============ */
.brand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 380px) { .brand-grid { grid-template-columns: 1fr; } }
.brand-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.brand-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.brand-card .avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  flex: 0 0 46px;
}
.brand-card .b-name { font-weight: 700; font-size: 14px; }
.brand-card .b-count { font-size: 12.5px; color: var(--muted); }

/* ============ Detail page ============ */
.breadcrumb { font-size: 13px; color: var(--muted); margin: 18px 0 4px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.detail-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  margin: 14px 0 26px;
  overflow: hidden;
}
/* ---------- horizontal ticket rows (brand view + related) ---------- */
.deal-row {
  position: relative;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: stretch;
  margin-bottom: 16px;
}
.deal-row .card-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.deal-row .r-logo { flex: 0 0 128px; display: flex; align-items: center; justify-content: center; padding: 20px 10px; }
.deal-row .r-logo .m-logo { width: 66px; height: 66px; flex: 0 0 66px; }
.deal-row .r-body {
  flex: 1; position: relative;
  border-left: 2px dashed var(--border);
  padding: 20px 18px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  min-width: 0;
}
.deal-row .r-body::before, .deal-row .r-body::after {
  content: ""; position: absolute; left: -9px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--bg);
}
.deal-row .r-body::before { top: -9px; }
.deal-row .r-body::after { bottom: -9px; }
.deal-row .r-brand { font-size: 14px; color: var(--muted); }
.deal-row .r-offer { font-family: Georgia, "Times New Roman", serif; font-size: 16.5px; color: var(--text); line-height: 1.35; }
.deal-grid.rows { display: block; }

/* ---------- detail ticket (reference layout) ---------- */
.detail-root { margin: 14px 0 26px; }
.ticket {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px 26px 28px;
  text-align: center;
  margin-bottom: 22px;
}
.ticket .t-logo { width: 90px; height: 90px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.ticket .t-logo.mono { font-size: 34px; }
.ticket .t-logo.word { font-size: 24px; letter-spacing: 0.01em; }
.ticket .t-name { font-size: 20px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.ticket .t-offer { font-family: Georgia, "Times New Roman", serif; font-size: 17px; color: var(--text); margin-top: 8px; }
.t-divider { position: relative; border-top: 2px dashed var(--border); margin: 24px -26px; }
.t-divider::before, .t-divider::after {
  content: ""; position: absolute; top: -10px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--bg);
}
.t-divider::before { left: -10px; }
.t-divider::after { right: -10px; }
.t-hint { font-size: 13.5px; color: var(--muted); }
.t-code { font-size: 30px; font-weight: 800; color: #f0b400; letter-spacing: 0.05em; margin: 8px 0 18px; }
.t-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #ffd60a; color: #20242c; font-size: 18px; font-weight: 700;
  border: none; border-radius: 999px; padding: 15px 20px; cursor: pointer;
  font-family: inherit;
}
.t-btn:hover { background: #f2c800; }
.detail-root .article {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 26px; margin-bottom: 26px;
}

.detail-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-head .avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 25px;
  flex: 0 0 64px;
  background: #fff;
  border: 1px solid var(--border);
}
.detail-head .avatar.cat-color-fashion { color: var(--c-fashion); }
.detail-head .avatar.cat-color-home { color: var(--c-home); }
.detail-head .avatar.cat-color-electronics { color: var(--c-electronics); }
.detail-head .avatar.cat-color-beauty { color: var(--c-beauty); }
.detail-head .avatar.cat-color-outdoor { color: var(--c-outdoor); }
.detail-head .avatar.cat-color-kitchen { color: var(--c-kitchen); }

.detail-head .d-merchant { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.detail-head h1 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.25; }
.meta-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0 20px; }
.meta-pill {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fdf3e7;
  border: 1px solid #f0dcbf;
  color: var(--primary-dark);
}
.article h2 { font-size: 17px; margin: 24px 0 10px; letter-spacing: -0.01em; }
.article p { margin-bottom: 14px; color: #4a3f36; font-size: 15.5px; }
.article ol, .article ul { margin: 0 0 16px 22px; color: #4a3f36; font-size: 15px; }
.article li { margin-bottom: 7px; }
.reveal-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fdf3e7;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  margin: 20px 0;
}
.reveal-box .code-big {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
}
.reveal-note { font-size: 12.5px; color: var(--muted); }
.claim-area { margin: 22px 0; }
.claim-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.claim-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.claim-btn:disabled { opacity: 0.6; cursor: default; }
.terms-list { font-size: 13.5px; color: var(--muted); }
.terms-list li { margin-bottom: 5px; }

/* ============ Search page ============ */
.search-hero { padding: 30px 0 6px; }
.search-box { display: flex; gap: 10px; max-width: 640px; margin: 14px 0 8px; }
.search-box input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  font-size: 15.5px;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  color: var(--text);
}
.search-box input:focus { border-color: var(--primary); }
.search-hint { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.no-results { padding: 40px 0; text-align: center; color: var(--muted); }

/* ============ Legal pages ============ */
.legal-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 32px; margin: 20px 0 30px; box-shadow: var(--shadow); }
.legal-wrap h1 { font-size: 21px; margin-bottom: 16px; letter-spacing: -0.02em; }
.legal-wrap h2 { font-size: 16.5px; margin: 20px 0 8px; }
.legal-wrap p, .legal-wrap li { font-size: 14.5px; color: #4a3f36; margin-bottom: 10px; }
.legal-wrap ul { margin-left: 22px; }
.contact-card { background: #fdf3e7; border: 1px solid #f0dcbf; border-radius: var(--radius-sm); padding: 18px 20px; margin: 18px 0; font-size: 14.5px; }

/* ============ Ad slots (contract: <div class="ad-slot" data-slot="X"></div>) ============ */
.ad-container { margin: 26px auto; max-width: var(--maxw); padding: 0 18px; }
.ad-slot { display: block; width: 100%; }
/* homepage (home1-3) and detail-page (detail1-3) slots reserve >=250px height */
.ad-slot[data-slot^="home"], .ad-slot[data-slot^="detail"] { min-height: 250px; }
.ad-slot[data-slot^="home"]:empty::after, .ad-slot[data-slot^="detail"]:empty::after { min-height: 250px; }
/* empty inline slots show the reserved "advertisement" position label */
.ad-slot:empty::after {
  content: "advertisement";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(45deg, #faf6f0, #faf6f0 12px, #f6efe6 12px, #f6efe6 24px);
  color: #a6988a;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
/* anchor: fixed bottom bar, reserved padding uses the footer background color */
.ad-slot[data-slot="anchor"] {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 800;
  background: var(--footer-bg);
  padding: 9px 12px;
}
.ad-slot[data-slot="anchor"]:empty::after {
  min-height: 44px;
  max-width: 728px;
  margin: 0 auto;
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
}
/* interstitial: stays hidden until a real ad fills the unit and a trigger opens it */
.ad-slot[data-slot="inter"] {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 12, 6, 0.64);
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.ad-slot[data-slot="inter"].is-open:not(:empty) { display: flex; }
.ad-slot[data-slot="inter"]:not(:empty) > * { background: var(--surface); border-radius: var(--radius); overflow: auto; max-width: 96vw; max-height: 88vh; }
.inter-close {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 1001;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
}
body.inter-lock { overflow: hidden; }

/* ============ Float buttons (back to top / back home) ============ */
.float-btns {
  position: fixed;
  right: 15px;
  bottom: 130px; /* minimum 130px from the bottom edge */
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 850;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.float-btns.show { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.float-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(42, 33, 27, 0.28);
  transition: transform 0.15s, background 0.15s;
}
.float-btn:hover { transform: translateY(-2px); background: var(--primary-dark); }
.float-btn svg { width: 21px; height: 21px; }
.float-btn.fb-home { background: var(--footer-bg); }
.float-btn.fb-home:hover { background: #3a2c22; }

/* ============ Footer ============ */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 40px;
  /* the dark footer background extends behind the fixed anchor bar so the
     two connect seamlessly with no light gap when the page is fully scrolled */
  padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px));
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 30px 18px 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; margin-bottom: 16px; }
.footer-links a { color: var(--footer-text); font-size: 14px; font-weight: 600; }
.footer-links a:hover { color: var(--accent); }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; font-size: 16px; margin-bottom: 12px; }
.footer-brand img { width: 26px; height: 26px; }
.footer-disclosure { font-size: 12px; color: rgba(239, 228, 216, 0.6); text-align: center; max-width: 760px; margin: 0 auto 12px; line-height: 1.6; }
.footer-copy { text-align: center; font-size: 13px; color: rgba(239, 228, 216, 0.75); }

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 140px;
  transform: translateX(-50%) translateY(12px);
  background: var(--footer-bg);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
  z-index: 950;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%); }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .hamburger { display: inline-flex; }
  .hero h1 { font-size: 23px; }
  .hero { padding: 46px 0 52px; }
}
@media (max-width: 520px) {
  .container { padding: 0 14px; }
  .header-inner { padding: 0 14px; gap: 10px; }
  .logo span { font-size: 18px; }
  .hero h1 { font-size: 23px; }
  .hero p { font-size: 15px; }
  .deal-grid { grid-template-columns: 1fr; }
  .detail-wrap { padding: 20px 16px; }
  .detail-root .article { padding: 20px 16px; }
  .ticket { padding: 26px 18px 24px; }
  .t-divider { margin: 22px -18px; }
  .deal-row .r-logo { flex-basis: 106px; }
  .deal-row .r-offer { font-size: 15.5px; }
  .ad-container { padding: 0 16px; }
  .legal-wrap { padding: 22px 18px; }
  .detail-head h1 { font-size: 20px; }
  .float-btns { right: 12px; bottom: 130px; }
  .float-btn { width: 42px; height: 42px; }
  .code-chip { max-width: 46%; }
  .section-head h2 { font-size: 18px; }
}

/* real brand logo images (reference brand logos stored locally) */
.m-logo.has-img, .avatar.has-img, .t-logo.has-img {
  background: #ffffff;
  border: 1px solid var(--border);
  color: inherit;
}
.m-logo.has-img img, .avatar.has-img img, .t-logo.has-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  padding: 5px;
  box-sizing: border-box;
  border-radius: inherit;
}

/* ---- horizontal overflow guards: the page must never exceed screen width ---- */
html { overflow-x: hidden; }
.ad-slot iframe, .ad-slot ins, .ad-slot img { max-width: 100% !important; }
.brand-grid > *, .deal-grid > * { min-width: 0; max-width: 100%; }
.brand-card { min-width: 0; }
.brand-card .b-name, .brand-card .b-count { overflow-wrap: anywhere; }

/* detail page logo: no border, keep the white tile */
.ticket .t-logo.has-img { border: none; }
/* centered "View More" button under the featured stream */
.more-wrap { text-align: center; margin: 22px 0 2px; }
