/*
 * User look: matches dev.thedealgoat.com (work/dev-site/site.html).
 * Loaded only for visitors and levels 1–3 (ui_skin() = 'front'); admins and devs keep app.css alone.
 * Light tan by default; dark when the visitor picks it (moon button or Theme menu: html[data-theme=dark]),
 * or data-theme=auto and the device is in dark mode.
 */
.skin-front {
  --bg: #fff5e4; --surface: #fffdf7; --ink: #2d241e; --muted: #665346; --line: #e0c8aa;
  --accent: #a43b0b; --accent-ink: #fff; --soft: #fae2c1; --green-soft: #f6e5c8;
  --highlight: #efb44e; --highlight-ink: #2d241e; --control-line: #955126;
  --good: #2f6b3a; --bad: #a3281b; --shadow: 0 8px 25px #100a2014; --radius: 15px;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
  background: var(--bg); color: var(--ink);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
}
html[data-theme="dark"] .skin-front {
  --bg: #0e1929; --surface: #18283b; --ink: #eff6fc; --muted: #bed0dd; --line: #344c60;
  --accent: #83e9d1; --accent-ink: #0e1929; --soft: #25374a; --green-soft: #203d47;
  --highlight: #f9d463; --highlight-ink: #182435; --control-line: #6e9ea9;
  --good: #8fe0a0; --bad: #ff9a8a; --shadow: none;
  color-scheme: dark;
}
html:has(.skin-front) { background: #fff5e4; color-scheme: light; }
html[data-theme="dark"]:has(.skin-front) { background: #0e1929; color-scheme: dark; }
/* "Match my device" (data-theme="auto", src/prefs.php): same dark colours when the device is in dark mode. */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .skin-front {
    --bg: #0e1929; --surface: #18283b; --ink: #eff6fc; --muted: #bed0dd; --line: #344c60;
    --accent: #83e9d1; --accent-ink: #0e1929; --soft: #25374a; --green-soft: #203d47;
    --highlight: #f9d463; --highlight-ink: #182435; --control-line: #6e9ea9;
    --good: #8fe0a0; --bad: #ff9a8a; --shadow: none;
    color-scheme: dark;
  }
  html[data-theme="auto"]:has(.skin-front) { background: #0e1929; color-scheme: dark; }
}

.skin-front .wrap { max-width: none; width: min(1536px, 100%); padding: 0 46px; }
.skin-front a { color: var(--ink); text-underline-offset: 3px; }
.skin-front h1 { font: 700 clamp(34px, 4.25vw, 60px)/1.08 var(--serif); letter-spacing: -.035em; margin: 0 0 8px; }
.skin-front h2 { font: 700 clamp(22px, 2.2vw, 30px)/1.15 var(--serif); letter-spacing: -.02em; margin: 1.6rem 0 .6rem; }
.skin-front h3 { font-family: var(--serif); }
.skin-front .narrow h1, .skin-front .narrow-wide h1 { font-size: clamp(32px, 4vw, 46px); }

/* ── Header ── */
.skin-front .ftop { position: static; background: var(--surface); border-bottom: 1px solid var(--line); }
.skin-front .ftop-row { display: flex; align-items: center; gap: 22px; min-height: 78px; padding-top: 8px; padding-bottom: 8px; }
.fbrand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.fbrand img { width: auto; height: 72px; display: block; margin: -6px 0; position: relative; z-index: 6; filter: drop-shadow(0 6px 10px #100a2040);
  transform-origin: 50% 80%; transition: transform .25s cubic-bezier(.175, .885, .32, 1.275); }
@media (min-width: 1341px) { .fbrand img { height: 96px; margin: -8px 0 -34px; } .skin-front > main.wrap { padding-top: 18px; } }   /* one-row header: the goat pops out over the edge; room under it */
.fbrand:hover img, .fbrand:focus-visible img { transform: rotate(-6deg) scale(1.08); }
@media (prefers-reduced-motion: reduce) { .fbrand img { transition: none; } .fbrand:hover img, .fbrand:focus-visible img { transform: none; } }
.wordmark { display: flex; font: italic 900 34px/1 "Arial Black", "Segoe UI Black", Impact, sans-serif; letter-spacing: -1.5px; white-space: nowrap;
  -webkit-text-stroke: 1.5px #1d1410; paint-order: stroke fill; text-shadow: 2px 2px 0 #1d1410; }
.wordmark b { font: inherit; }
.wordmark b:nth-child(1) { color: #fffdf7; }
.wordmark b:nth-child(2) { color: #d23a1c; }
.wordmark b:nth-child(3) { color: #f4b73a; }
.fdeal-nav { display: flex; align-items: center; gap: 14px; border-left: 1px solid var(--line); padding-left: 22px; flex: 0 0 auto; }  /* never squeeze the menu; the search box gives way */
.fcity select { min-width: 150px; max-width: 220px; font-size: 17px; font-weight: 650; background: transparent; border: 1px solid var(--control-line);
  border-radius: 10px; padding: 8px 12px; min-height: 0; color: var(--ink); }
.fnav { display: flex; gap: 6px; flex-wrap: nowrap; }
.fnav a { color: var(--ink); text-decoration: none; font-size: 14px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 24px; white-space: nowrap; }
.fnav a:hover { border-color: var(--control-line); }
.fnav a[aria-current] { background: var(--highlight); color: var(--highlight-ink); border-color: var(--highlight); }
.fsearch { flex: 1; min-width: 160px; }
.fsearch input { width: 100%; background: transparent; border: 1px solid var(--control-line); border-radius: 30px; padding: 11px 20px; font-size: 17px; min-height: 0; }
.fsearch input::placeholder { color: var(--muted); opacity: 1; }
.ficon { border: 0; background: none; color: var(--ink); font-size: 26px; line-height: 1; padding: 4px; min-width: 32px; text-decoration: none; cursor: pointer; }
.ficon.is-on { color: var(--accent); }
.faccount { font-size: 14px; font-weight: 650; white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 24px; background: var(--soft); }

/* ── Controls ── */
.skin-front input, .skin-front select, .skin-front textarea { background: var(--surface); border-color: var(--control-line); border-radius: 10px; }
.skin-front input:focus-visible, .skin-front select:focus-visible, .skin-front button:focus-visible, .skin-front a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skin-front .btn, .skin-front .btn-small { background: var(--highlight); color: var(--highlight-ink); border-radius: 30px; font-weight: 650; }
.skin-front .btn:hover, .skin-front .btn-small:hover { filter: brightness(1.04); }
.skin-front .btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--control-line); }
.skin-front .pill { background: var(--soft); }
.skin-front .flash { background: var(--soft); border-left-color: var(--highlight); }
.skin-front .flash-error { border-left-color: var(--bad); }
.skin-front .panel { border-radius: var(--radius); box-shadow: var(--shadow); }
.skin-front .subnav a[aria-current="page"], .skin-front .tabs a[aria-current="page"] { background: var(--highlight); color: var(--highlight-ink); border-color: var(--highlight); }

/* ── Home ── */
.skin-front .hero { margin: 22px 0 10px; }
.skin-front .hero h1 { margin-bottom: 0; }
.skin-front .hero .hero-tagline { margin: 6px 0 0; }
.skin-front .hero p { font-size: clamp(17px, 1.6vw, 22px); color: var(--muted); }
.skin-front .hero .city-pick { display: none; }   /* the city menu is in the header */
.skin-front .pager-summary { font-size: 12px; color: var(--muted); }

.skin-front .slot { grid-template-columns: minmax(0, 46%) 1fr; border: 1px solid var(--muted); border-radius: 12px; }
.skin-front .slot-tag { border-radius: 6px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 700; }
.skin-front .slot h2 { font-size: clamp(28px, 2.6vw, 38px); margin: 8px 0 4px; }
.skin-front .slot-title { font-weight: 650; }
.skin-front .slot .btn:not(.btn-ghost) { background: var(--ink); color: var(--bg); }

/* ── Deal cards (dev "standard-card") ── */
.skin-front .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.fcard { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.fcard:hover { transform: translateY(-2px); border-color: var(--muted); }
.fcard-media { display: block; text-decoration: none; color: var(--ink); height: 190px; background: var(--soft); flex: none; }
.fcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fcard-media.is-logo { background: #fff; }
.fcard-media.is-logo img { object-fit: contain; padding: 26px; }
.fcard-textcover { height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 24px; background: var(--green-soft); }
.fcard-textcover span { font-size: 9px; letter-spacing: .18em; color: var(--muted); }
.fcard-textcover strong { font: 700 27px/1.2 var(--serif); margin-top: 10px; }
.fcard-label { font-size: 10px; color: var(--muted); padding: 6px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.fcard-body { padding: 16px 20px 18px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fcard-meta { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.fcard h3 { font: 700 28px/1.15 var(--serif); margin: 0 28px 8px 0; overflow-wrap: anywhere; }
.fcard h3 a { color: var(--ink); text-decoration: none; }
.fcard h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.fcard-title { font-weight: 650; font-size: 16px; margin: 0 0 10px; }
.fcard-price { font: 700 34px/1.15 var(--serif); color: var(--accent); margin: 0 0 10px; overflow-wrap: anywhere; }
.fcard-hours { font-size: 14px; margin: 0 0 12px; }
.fcard-hours::before { content: "▢"; margin-right: 8px; color: var(--muted); }
.fcard-more { margin-top: auto; align-self: flex-start; font-size: 13px; color: var(--ink); }
.skin-front .fcard .save { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: #2d241e; color: #fffdf7; font-size: 20px; box-shadow: none; display: grid; place-items: center; }
.skin-front .fcard .save.is-saved { background: var(--accent); color: #fff; }
html[data-theme="dark"] .skin-front .fcard .save { background: #0e1929d9; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .skin-front .fcard .save { background: #0e1929d9; } }

/* Several deals at one restaurant (like dev's multi-offer cards) */
.fcard-offers { list-style: none; padding: 0; margin: 2px 0 10px; }
.fcard-offers li { padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 650; font-size: 15px; line-height: 1.35; }
.fcard-offers li::before { content: "▸ "; font-size: 12px; }
.fcard-offers a { color: var(--ink); text-decoration: none; }
.fcard-offers a:hover { text-decoration: underline; }
.fcard-offer-price { color: var(--accent); font-weight: 700; white-space: nowrap; }
.fcard-count { margin: auto 0 0; padding-top: 8px; font-size: 12px; color: var(--muted); }

/* Token slot banner (dev's "Recently added" banner) */
.skin-front .slot-banner { grid-template-columns: minmax(0, 36%) 1fr; border: 1px solid var(--muted); border-radius: 12px; box-shadow: var(--shadow); }
.skin-front .slot-media { min-height: 250px; }
.skin-front .slot-banner .slot-body { padding: 24px 30px; }
.skin-front .slot-banner h2 { font: 700 clamp(30px, 3vw, 44px)/1.1 var(--serif); margin: 10px 0 6px; }
.skin-front .slot-price { font: 700 clamp(28px, 2.6vw, 38px)/1.15 var(--serif); }
.skin-front .slot-banner.is-preview { border-style: dashed; }

/* ── Pager ── */
.skin-front .pager { justify-content: center; gap: 18px; margin: 30px 0 10px; }
.skin-front .pager-num, .skin-front .pager-step { border-radius: 22px; border-color: var(--line); background: var(--surface); color: var(--ink); }
.skin-front .pager-num[aria-current="page"] { background: var(--highlight); color: var(--highlight-ink); border-color: var(--highlight); }
.skin-front a.pager-num:hover, .skin-front a.pager-step:hover { border-color: var(--control-line); color: var(--ink); }

/* ── Deal page ── */
.skin-front .deal h1 { font-size: clamp(34px, 4vw, 54px); }
.skin-front .deal-title { font: 700 22px/1.3 var(--serif); }
.skin-front .deal-img { border-radius: 15px; border: 1px solid var(--line); }

/* ── Business ── */
.skin-front .balance { border-radius: 15px; border-color: var(--highlight); box-shadow: var(--shadow); }
.skin-front .balance-num { font-family: var(--serif); }

/* ── Footer ── */
.skin-front .foot { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font-size: 12px; }

@media (min-width: 1500px) { .skin-front .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1340px) {  /* city menu + Deals/Dice/Business(/Admin) need about 1340px on one row with the search box */
  .skin-front .ftop-row { flex-wrap: wrap; gap: 12px 16px; }
  .fdeal-nav { order: 5; flex: 1 0 100%; border-left: 0; padding-left: 0; }
  .fsearch { order: 4; flex-basis: 100%; }
  .ftop-row > a.ficon[href="/saved"] { margin-left: auto; }   /* icons go right (the phone box sits between search and icons) */
}
@media (max-width: 1000px) {
  .skin-front .wrap { padding: 0 24px; }
  .skin-front .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wordmark { font-size: 28px; }
}
@media (max-width: 600px) {
  .skin-front .wrap { padding: 0 16px; }
  .skin-front .grid { grid-template-columns: 1fr; gap: 18px; }
  .wordmark { font-size: 22px; -webkit-text-stroke-width: 1px; text-shadow: 1px 1px 0 #1d1410; }
  .fbrand img { height: 54px; margin: -4px 0 -8px; }   /* phones: big, only a little overhang */
  .fbrand { gap: 6px; }
  .skin-front .ftop-row { gap: 10px 8px; }
  .ficon { font-size: 22px; min-width: 26px; padding: 2px; }
  .faccount { font-size: 12px; padding: 6px 10px; }
  .fdeal-nav { flex-wrap: wrap; gap: 8px; }
  .skin-front .qbox { order: 4; flex: 1 0 100%; }   /* scoped: Admin → Add a deal loads this file for its visitor-look preview */
  .skin-front .qbox input[type="search"], .skin-front .qbox select { background: transparent; border: 1px solid var(--control-line); border-radius: 30px; padding: 8px 14px; font-size: 16px; }
  .skin-front .qbox select { font-weight: 650; }
  .skin-front .qbox-modes { border-color: var(--control-line); background: transparent; }
  .faccount.acct { background: var(--soft); margin-left: 0; }
  .fnav a { font-size: 12px; padding: 6px 10px; }
  .fcard:hover { transform: none; }
  .fcard h3 { font-size: 25px; }
  .fcard-price { font-size: 30px; }
  .skin-front .slot { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .fcard { transition: none; } }

/* A picture that fails to load falls back to the text cover (app.js, .js-fallback) */
.fcard-textcover[hidden] { display: none; }
.fcard-media.is-broken { background: var(--surface, #fffdf7); }
.fcard-media.is-broken img { display: none; }

/* City heading size (user look; Medium = the normal .skin-front h1). */
.skin-front .hero h1.city-title.size-xs { font-size: clamp(22px, 2.6vw, 34px); }
.skin-front .hero h1.city-title.size-s  { font-size: clamp(28px, 3.4vw, 46px); }
.skin-front .hero h1.city-title.size-l  { font-size: clamp(40px, 5.2vw, 74px); }
.skin-front .hero h1.city-title.size-xl { font-size: clamp(46px, 6.4vw, 92px); }

/* Fallback pictures (src/fallbackimages.php): the card's text cover is the emoji tile (gradient from .fb-t* in app.css). */
.fcard-textcover .fb-emoji { font-size: 44px; letter-spacing: normal; color: inherit; margin-bottom: 8px; line-height: 1; }
.skin-front .deal-tile { border-radius: 15px; border: 1px solid var(--line); }
