:root {
  --bg: #f7faff;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #64748b;
  --line: #dbe6f5;
  --teal: #2563eb;
  --teal-dark: #1d4ed8;
  --saffron: #f59e0b;
  --rose: #e11d48;
  --blue: #1e40af;
  --shadow: 0 18px 45px rgba(37, 99, 235, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.google-login-btn,
.link-btn {
  border: 0;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
}

.google-login-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
}

.google-login-btn span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2563eb;
  color: white;
  font-weight: 900;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.link-btn {
  padding: 0;
  justify-self: start;
  font-weight: 800;
}

.top-ad,
.body-ad,
.footer-ad,
.side-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px dashed rgba(37, 99, 235, 0.32);
  background: #eff6ff;
  color: var(--teal-dark);
  text-align: center;
}

.top-ad {
  min-height: 90px;
  padding: 8px 16px;
  font-size: 14px;
}

.ad-slot {
  overflow: hidden;
}

.ad-slot.has-media {
  padding: 0;
  justify-content: center;
  border-style: solid;
  background: white;
  color: var(--ink);
}

.ad-media {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border-radius: inherit;
  object-fit: cover;
  background: #dbeafe;
}

.top-ad,
.footer-ad,
.detail-ad-row,
.in-listing-ad {
  width: min(100%, 728px);
  min-height: 90px;
  margin-inline: auto;
}

.body-ad {
  width: min(100%, 720px);
  min-height: 300px;
  margin-inline: auto;
}

.side-ad {
  width: min(100%, 300px);
  min-height: 600px;
  margin-inline: auto;
}

.popup-ad {
  width: min(calc(100vw - 32px), 300px);
  min-height: 250px;
}

.ad-slot[data-ad-size="88x31"] { aspect-ratio: 88 / 31; width: min(100%, 88px); min-height: 31px; }
.ad-slot[data-ad-size="100x100"] { aspect-ratio: 1; width: min(100%, 100px); min-height: 100px; }
.ad-slot[data-ad-size="120x60"] { aspect-ratio: 2 / 1; width: min(100%, 120px); min-height: 60px; }
.ad-slot[data-ad-size="120x90"] { aspect-ratio: 4 / 3; width: min(100%, 120px); min-height: 90px; }
.ad-slot[data-ad-size="120x240"] { aspect-ratio: 1 / 2; width: min(100%, 120px); min-height: 240px; }
.ad-slot[data-ad-size="120x600"] { aspect-ratio: 1 / 5; width: min(100%, 120px); min-height: 600px; }
.ad-slot[data-ad-size="160x600"] { aspect-ratio: 4 / 15; width: min(100%, 160px); min-height: 600px; }
.ad-slot[data-ad-size="180x150"] { aspect-ratio: 6 / 5; width: min(100%, 180px); min-height: 150px; }
.ad-slot[data-ad-size="234x60"] { aspect-ratio: 39 / 10; width: min(100%, 234px); min-height: 60px; }
.ad-slot[data-ad-size="240x400"] { aspect-ratio: 3 / 5; width: min(100%, 240px); min-height: 400px; }
.ad-slot[data-ad-size="250x250"] { aspect-ratio: 1; width: min(100%, 250px); min-height: 250px; }
.ad-slot[data-ad-size="300x100"] { aspect-ratio: 3 / 1; width: min(100%, 300px); min-height: 100px; }
.ad-slot[data-ad-size="300x250"] { aspect-ratio: 6 / 5; width: min(100%, 300px); min-height: 250px; }
.ad-slot[data-ad-size="300x600"] { aspect-ratio: 1 / 2; width: min(100%, 300px); min-height: 600px; }
.ad-slot[data-ad-size="336x280"] { aspect-ratio: 6 / 5; width: min(100%, 336px); min-height: 280px; }
.ad-slot[data-ad-size="468x60"] { aspect-ratio: 39 / 5; width: min(100%, 468px); min-height: 60px; }
.ad-slot[data-ad-size="728x90"] { aspect-ratio: 364 / 45; width: min(100%, 728px); min-height: 90px; }
.ad-slot[data-ad-size="720x300"] { aspect-ratio: 12 / 5; width: min(100%, 720px); min-height: 300px; }

.side-ad.has-media,
.popup-ad.has-media {
  align-items: stretch;
}

.ad-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ad-copy span {
  color: var(--muted);
  font-size: 13px;
}

.ad-cta {
  color: var(--teal-dark) !important;
  font-weight: 800;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), #0ea5e9);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--teal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

select,
input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
}

.primary-btn,
.ghost-btn,
.near-btn,
.mini-btn {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary-btn {
  background: var(--teal);
  color: white;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.near-btn {
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: #fffbeb;
  color: #92400e;
}

.ghost-btn,
.mini-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--teal-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 30px;
  padding: clamp(34px, 6vw, 74px) clamp(16px, 4vw, 52px) 28px;
  min-height: 640px;
  background:
    linear-gradient(90deg, rgba(8, 20, 48, 0.92), rgba(8, 20, 48, 0.62), rgba(8, 20, 48, 0.34)),
    url("assets/homepage-local-business-hero.png") center / cover no-repeat;
  color: white;
}

.hero .eyebrow {
  color: #bfdbfe;
}

.hero h1 {
  color: white;
  text-shadow: 0 10px 30px rgba(2, 6, 23, 0.32);
}

.hero .hero-subtitle {
  max-width: 760px;
  color: #dbeafe;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
}

.hero-subtitle,
.muted {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr auto auto;
  gap: 10px;
  max-width: 1060px;
  margin-top: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.trust-row span,
.pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  background: white;
  color: var(--teal-dark);
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 800;
}

.hero .trust-row span {
  border: 1px solid rgba(191, 219, 254, 0.3);
  background: rgba(255, 255, 255, 0.94);
}

.hero-panel {
  display: grid;
  place-items: center;
}

.phone-shell {
  width: min(100%, 340px);
  min-height: 520px;
  border: 10px solid #12201e;
  border-radius: 34px;
  background: #f9fffc;
  padding: 18px;
  box-shadow: 0 28px 70px rgba(23, 33, 31, 0.23);
}

.phone-top {
  width: 78px;
  height: 5px;
  margin: 0 auto 26px;
  border-radius: 999px;
  background: #33403d;
}

.phone-card {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
}

.phone-card strong,
.phone-card small,
.phone-card span {
  display: block;
}

.phone-card small {
  margin-top: 8px;
  color: var(--muted);
}

.phone-card.accent {
  background: var(--teal);
  color: white;
}

.phone-card.accent small,
.phone-card.accent span {
  color: rgba(255, 255, 255, 0.82);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 clamp(16px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  transform: translateY(18px);
}

.stats-band div {
  background: white;
  padding: 20px;
}

.stats-band strong,
.stats-band span {
  display: block;
}

.stats-band span {
  margin-top: 4px;
  color: var(--muted);
}

.section {
  padding: 70px clamp(16px, 4vw, 52px) 20px;
}

.section-heading,
.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.76)),
    var(--category-photo);
  background-position: center;
  background-size: cover;
  color: white;
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.category-card:hover {
  border-color: rgba(37, 99, 235, 0.5);
  filter: saturate(1.08);
  transform: translateY(-2px);
}

.category-card.active {
  border-color: var(--teal);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.16);
}

.category-card.active .category-icon {
  background: var(--teal);
  color: white;
}

.category-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--teal-dark);
  font-weight: 900;
}

.category-card strong {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.42);
}

.body-ad {
  min-height: 92px;
  margin: 34px clamp(16px, 4vw, 52px) 0;
  border-radius: 8px;
  padding: 18px;
}

.listing-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.filters-card {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.side-ad {
  min-height: 220px;
  flex-direction: column;
  border-radius: 8px;
}

.business-list {
  display: grid;
  gap: 14px;
}

.business-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(23, 33, 31, 0.05);
}

.business-photo {
  min-height: 118px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #bae6fd);
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  font-size: 30px;
  font-weight: 900;
}

.business-photo.has-image {
  min-height: 118px;
  overflow: hidden;
  background: #dbeafe;
}

.business-photo img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  display: block;
}

.business-main {
  min-width: 0;
}

.business-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.business-title-row h3 {
  margin: 0;
  font-size: 22px;
}

.badge.featured {
  background: #fff7ed;
  color: #9a3412;
}

.badge.verified {
  background: #eff6ff;
  color: var(--blue);
}

.business-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.business-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.action-btn {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--teal-dark);
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.action-btn.strong {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.in-listing-ad {
  min-height: 72px;
  border-radius: 8px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: start;
}

.owner-priority {
  padding-top: 42px;
  padding-bottom: 12px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.plan-card,
.owner-form,
.owner-next-steps,
.dashboard-grid article,
.admin-panels article,
.testimonials blockquote {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
}

.plan-card strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}

.plan-card.highlighted {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: var(--shadow);
}

.owner-form {
  display: grid;
  gap: 12px;
}

.owner-next-steps {
  display: grid;
  gap: 12px;
}

.owner-next-steps h3 {
  margin-bottom: 0;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dashboard-grid span,
.dashboard-grid small {
  display: block;
  color: var(--muted);
}

.dashboard-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 30px;
}

.admin-panels,
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.community-card,
.community-chat,
.community-join-card,
.community-post {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}

.community-card {
  display: grid;
  gap: 12px;
}

.community-card h3,
.community-join-card h3,
.community-chat h3 {
  margin-bottom: 4px;
}

.community-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.community-meta span {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.community-chat {
  margin-top: 16px;
}

.community-post-list {
  display: grid;
  gap: 10px;
}

.community-post {
  box-shadow: none;
}

.community-post p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.community-post small {
  color: var(--muted);
  font-weight: 700;
}

.business-deals,
.community-offers {
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 8px;
  background: #fff7ed;
  padding: 12px;
}

.business-deals {
  margin: 12px 0;
}

.deal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.deal-head span,
.deal-card span {
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.deal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.deal-card {
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.deal-card.soft {
  background: #fffbeb;
}

.deal-card strong,
.deal-card small,
.community-offers strong,
.community-offers span {
  display: block;
}

.deal-card small,
.community-offers span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.deal-play-btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  margin-top: 10px;
  background: var(--teal);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.game-modal.hidden {
  display: none;
}

.game-modal-panel {
  width: min(1120px, 100%);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto auto minmax(280px, 1fr) auto;
  gap: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  padding: 18px;
  box-shadow: var(--shadow);
}

.game-modal-head,
.game-controls,
.game-claim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.game-modal-head h2,
.game-modal-head p {
  margin: 0;
}

.game-discount-status {
  display: grid;
  gap: 3px;
  text-align: right;
}

.game-discount-status span {
  color: var(--muted);
  font-size: 13px;
}

.game-stage {
  width: 100%;
  min-height: 54vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.mini-game {
  display: grid;
  gap: 14px;
  min-height: 54vh;
  padding: 18px;
}

.mini-game h3,
.mini-game p {
  margin: 0;
}

.mini-score {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--teal-dark);
  font-weight: 900;
}

.tap-arena {
  position: relative;
  min-height: 260px;
  border: 1px dashed rgba(37, 99, 235, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}

.tap-target {
  position: absolute;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--saffron);
  color: #111827;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.34);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 12px;
}

.memory-card {
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--teal-dark);
  font-size: 34px;
  font-weight: 900;
  cursor: pointer;
}

.memory-card.matched {
  border-color: var(--teal);
  background: #dcfce7;
  color: #166534;
}

.quiz-list {
  display: grid;
  gap: 12px;
}

.quiz-list fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.quiz-list legend {
  font-weight: 900;
}

.quiz-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 12px 0 0;
}

.game-claim-row {
  align-items: start;
}

.game-claim-row .form-status {
  flex: 1;
  margin: 0;
  text-align: right;
}

.community-join-card {
  position: sticky;
  top: 96px;
}

.community-join-card form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.community-join-card form + form {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.admin-console {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.06);
}

.admin-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.08)),
    var(--bg);
}

.admin-login-view {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: center;
  padding: 34px clamp(16px, 4vw, 52px);
}

.admin-login-card {
  display: grid;
  width: min(100%, 460px);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.admin-login-card h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 48px);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.admin-search span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.admin-tabs button,
.table-action {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--teal-dark);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tabs button.active,
.table-action.strong {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.table-action.danger {
  border-color: rgba(225, 29, 72, 0.32);
  background: #fff1f2;
  color: var(--rose);
}

.ad-create-form,
.content-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
}

.ad-create-form > div,
.content-create-form > div,
.wide-field {
  grid-column: 1 / -1;
}

.admin-edit-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ad-create-form .primary-btn,
.ad-create-form .form-status,
.content-create-form .primary-btn,
.content-create-form .form-status {
  align-self: end;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
}

.field-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ad-upload-field input {
  padding: 8px;
}

.ad-upload-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.ad-size-guide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.ad-size-guide strong {
  grid-column: 1 / -1;
  color: var(--ink);
}

.ad-size-guide span {
  display: block;
}

.ad-upload-preview img,
.ad-upload-preview video {
  width: 100%;
  max-height: 92px;
  border-radius: 8px;
  object-fit: cover;
  background: #dbeafe;
}

.ad-upload-preview strong,
.ad-upload-preview span {
  display: block;
}

.ad-upload-preview span {
  margin-top: 4px;
  color: var(--muted);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.admin-table th {
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.testimonials blockquote {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.testimonial-list {
  display: contents;
}

.testimonials cite {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.footer-ad {
  min-height: 118px;
  margin: 42px clamp(16px, 4vw, 52px) 24px;
  border-radius: 8px;
  padding: 20px;
}

.site-footer {
  margin-top: 34px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 38px clamp(16px, 4vw, 52px) 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.site-footer .brand {
  justify-content: flex-start;
  margin-bottom: 14px;
  color: white;
}

.site-footer .brand-mark {
  background: #2563eb;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 15px;
}

.site-footer a {
  display: block;
  width: fit-content;
  margin: 9px 0;
  color: #cbd5e1;
  font-weight: 700;
}

.site-footer a:hover {
  color: white;
}

.site-footer p {
  margin: 0 0 10px;
  color: #cbd5e1;
  line-height: 1.6;
}

.footer-brand p {
  max-width: 360px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

.legal-page main {
  padding: 42px clamp(16px, 4vw, 52px) 64px;
}

.contact-hero {
  min-height: 340px;
  max-width: 1180px;
  margin: 0 auto 24px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.44)),
    url("assets/contact-local-business-banner.png") center / cover no-repeat;
  display: grid;
  align-items: end;
  padding: clamp(24px, 5vw, 54px);
  color: white;
  box-shadow: var(--shadow);
}

.contact-hero > div {
  max-width: 660px;
}

.contact-hero .eyebrow {
  color: #bfdbfe;
}

.contact-hero h1 {
  margin: 0 0 12px;
  color: white;
  font-size: clamp(42px, 6vw, 70px);
}

.contact-hero p {
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.6;
}

.legal-content {
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: clamp(22px, 4vw, 44px);
  box-shadow: var(--shadow);
}

.contact-content {
  max-width: 1180px;
}

.legal-content h1 {
  margin-top: 0;
  font-size: 42px;
}

.legal-content h2 {
  margin-top: 30px;
  font-size: 22px;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 18px;
}

.detail-page main {
  padding: 34px clamp(16px, 4vw, 52px) 64px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto 24px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(8, 20, 48, 0.92), rgba(37, 99, 235, 0.68)),
    url("assets/homepage-local-business-hero.png") center / cover no-repeat;
  color: white;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: var(--shadow);
}

.community-detail-hero {
  grid-template-columns: 1fr;
}

.detail-hero h1 {
  margin-bottom: 12px;
  color: white;
  font-size: clamp(36px, 5vw, 60px);
}

.detail-hero p {
  color: #dbeafe;
  line-height: 1.6;
}

.detail-media {
  min-height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.detail-media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.detail-initials {
  color: white;
  font-size: 64px;
  font-weight: 900;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.detail-ad-row {
  margin: 20px auto;
}

.detail-ad-panel {
  display: grid;
  place-items: center;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}

.offering-list {
  display: grid;
  gap: 12px;
}

.offering-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
}

.offering-card span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.offering-card h3 {
  margin-top: 6px;
}

.offering-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.product-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.product-image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: #dbeafe;
}

.owner-page {
  min-height: 100vh;
}

.owner-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 0 24px 24px;
}

.owner-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.owner-edit-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.owner-edit-form input,
.owner-edit-form select,
.owner-edit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}

.owner-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.owner-panel-head h2,
.owner-panel-head p {
  margin: 0;
}

.owner-offering-panel {
  margin: 0 24px 32px;
}

.owner-offering-list {
  display: grid;
  gap: 12px;
}

.owner-offering-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.owner-offering-card h3,
.owner-offering-card p {
  margin: 4px 0;
}

.owner-offering-card span,
.owner-offering-card small {
  color: var(--muted);
  font-weight: 800;
}

.owner-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.detail-empty {
  max-width: 780px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 32px;
}

.popup-ad {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 6px;
  width: min(310px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
  box-shadow: var(--shadow);
}

.popup-ad button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  cursor: pointer;
}

.popup-ad span {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 1040px) {
  .search-panel,
  .hero,
  .listing-layout,
  .split-section,
  .community-layout {
    grid-template-columns: 1fr;
  }

  .community-join-card {
    position: static;
  }

  .category-grid,
  .dashboard-grid,
  .community-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .filters-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .main-nav,
  .header-actions,
  .section-heading,
  .results-head,
  .top-ad,
  .body-ad,
  .footer-ad {
    align-items: stretch;
    flex-direction: column;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
  }

  .main-nav a,
  .header-actions > * {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 10px;
  }

  h1 {
    font-size: 38px;
  }

  .stats-band,
  .category-grid,
  .plan-grid,
  .dashboard-grid,
  .admin-panels,
  .testimonials,
  .community-grid,
  .footer-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .detail-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-table {
    min-width: 0;
  }

  .ad-create-form,
  .content-create-form {
    grid-template-columns: 1fr;
  }

  .admin-edit-fields {
    grid-template-columns: 1fr;
  }

  .ad-size-guide {
    grid-template-columns: 1fr;
  }

  .ad-upload-preview {
    grid-template-columns: 1fr;
  }

  .game-modal-panel {
    max-height: 96vh;
    grid-template-rows: auto auto minmax(260px, 1fr) auto;
  }

  .game-modal-head,
  .game-controls,
  .game-claim-row {
    align-items: stretch;
    flex-direction: column;
  }

  .game-discount-status,
  .game-claim-row .form-status {
    text-align: left;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }

  .admin-table td {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 0;
    padding: 7px 2px;
  }

  .admin-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
  }

  .business-card {
    grid-template-columns: 1fr;
  }

  .business-photo {
    min-height: 96px;
  }

  .top-ad.has-media {
    height: 72px;
  }

  .body-ad.has-media,
  .footer-ad.has-media,
  .side-ad.has-media,
  .in-listing-ad.has-media,
  .popup-ad.has-media {
    height: 180px;
  }

  .hero {
    padding-top: 28px;
  }

  .contact-hero {
    min-height: 280px;
    align-items: end;
  }

  .section {
    padding-top: 50px;
  }
}
