/* CleanNibble website: the app look in a browser (html.cn-web).
   Loaded after app-shell.css and welcome.css. Mobile keeps the bottom tabs; desktop moves them into the top bar. */

html.cn-web,
html.cn-web body { height: auto; overflow: visible; }
html.cn-web body {
  display: block;
  min-height: 100vh;
  padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  background: #fafaf9;
}
html.cn-web header {
  position: sticky;
  top: 0;
  overflow: visible;
  box-shadow: 0 2px 14px rgba(150, 40, 20, 0.18);
}
html.cn-web header .container { display: flex; align-items: center; gap: 0.75rem; }
html.cn-web main.container,
html.cn-web #cnAppMain { flex: none; overflow: visible; min-height: 60vh; }
html.cn-web body.cn-app-doc main.container { padding-top: 0.9rem; }

/* "Get the app" pill in the top bar */
.cn-getapp-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #ffd166; color: #5a2a00; border: 0; border-radius: 999px;
  font: inherit; font-size: 0.85rem; font-weight: 800; padding: 0.45rem 0.85rem; cursor: pointer;
  box-shadow: 0 2px 8px rgba(90, 30, 0, 0.18); white-space: nowrap;
}
.cn-getapp-btn svg { width: 17px; height: 17px; }
.cn-getapp-btn:hover { background: #ffdb85; }

/* Website sections the app hides: keep them on the Search tab for visitors and search engines */
html.cn-web.cn-tab-search:not(.cn-subopen) main > .why-section,
html.cn-web.cn-tab-search:not(.cn-subopen) main > #disclaimer { display: block !important; }
html.cn-web main > .why-section { margin-top: 1.6rem; }

/* Footer */
html.cn-web footer { margin-top: 1.5rem; padding: 1.8rem 0 1.6rem; }
html.cn-web body.cn-app-doc footer { margin-top: 1rem; }
.cn-foot-app {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 820px; margin: 0 auto 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid rgba(255, 226, 199, 0.18); text-align: left;
}
.cn-foot-brand { display: flex; align-items: center; gap: 0.6rem; }
.cn-foot-brand img { background: #fff; border-radius: 50%; padding: 3px; }
.cn-foot-brand b { display: block; font-family: Nunito, sans-serif; font-size: 1.25rem; font-weight: 800; color: #fff; line-height: 1.1; }
.cn-foot-brand b span { color: #ffd166; }
.cn-foot-brand small { color: #ffd2a8; font-size: 0.82rem; }
.cn-foot-get { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.cn-foot-get > span { color: #ffd2a8; font-weight: 700; font-size: 0.85rem; }
html.cn-web footer p { opacity: 0.85; }

/* Store badges ("Coming soon" until app-links.js has a link) */
.cn-stores { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.cn-store {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem;
  min-width: 150px; height: 46px; padding: 0 0.9rem 0 0.7rem; box-sizing: border-box;
  background: #0b0b0c; color: #fff; border-radius: 11px; border: 1px solid #3a3a3c;
  text-decoration: none; line-height: 1;
}
a.cn-store:hover { background: #1c1c1e; }
.cn-store-logo svg { width: 24px; height: 24px; display: block; }
.cn-store-txt { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.cn-store-txt small { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.02em; text-transform: none; }
.cn-store-android .cn-store-txt small { text-transform: uppercase; font-size: 0.56rem; letter-spacing: 0.06em; }
.cn-store-txt b { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.cn-store.soon { cursor: default; }
.cn-store.soon .cn-store-logo, .cn-store.soon .cn-store-txt { opacity: 0.55; }
.cn-store em {
  position: absolute; top: -11px; right: -8px; font-style: normal;
  background: #ffd166; color: #5a2a00; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.18rem 0.45rem; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Get the app sheet */
.cn-getapp {
  position: fixed; inset: 0; z-index: 300; background: rgba(17, 24, 39, 0.55);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.cn-getapp[hidden] { display: none; }
.cn-getapp-card {
  position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 24px 24px 0 0;
  padding: 1.6rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom, 0px)); text-align: center;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
}
.cn-getapp-card h3 { font-family: Nunito, sans-serif; font-size: 1.4rem; font-weight: 800; margin: 0.7rem 0 0.4rem; color: #111827; }
.cn-getapp-card p { color: #4b5563; font-size: 0.95rem; line-height: 1.5; margin: 0 0 1rem; }
.cn-getapp-card .cn-stores { justify-content: center; margin: 0.4rem 0 0.9rem; }
.cn-getapp-card .cn-getapp-fine { font-size: 0.8rem; color: #6b7280; margin: 0; }
.cn-getapp-ico {
  width: 58px; height: 58px; margin: 0 auto; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #ff7a59 0%, #e5432a 100%); color: #fff; box-shadow: 0 0 0 4px #ffe9a3;
}
.cn-getapp-ico svg { width: 28px; height: 28px; }
.cn-getapp-x {
  position: absolute; top: 0.7rem; right: 0.8rem; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: #f3f4f6; color: #374151; font-size: 1.4rem; line-height: 1; cursor: pointer;
}

/* Web scan card: points to the app */
.cn-scan-card-web { cursor: pointer; }
.cn-scan-card-tag {
  flex: none; background: #ffd166; color: #5a2a00; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.22rem 0.5rem; border-radius: 999px;
}

/* Account: get the app */
.cn-account-app {
  background: #fff; border: 1px solid #ffe08a; border-radius: 22px; padding: 1.1rem 1.1rem 1.15rem; margin: 0.85rem 0 0;
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}
.cn-account-app h2 { font-family: Nunito, sans-serif; font-size: 1.15rem; font-weight: 800; margin: 0 0 0.25rem; }
.cn-account-app p { color: #6b7280; font-size: 0.9rem; margin: 0 0 0.9rem; }

/* Landing hero (the welcome screen as a web page section) */
.cnw.cnw-web {
  position: relative; overflow: hidden;
  display: grid; gap: 1.1rem; align-items: center;
  margin: 0.8rem 0 0.4rem; padding: 1.35rem 1.15rem 1.2rem;
  border-radius: 26px; color: #fff;
  background: radial-gradient(110% 90% at 90% 0%, #ff7a59 0%, rgba(255,122,89,0) 60%), linear-gradient(160deg, #f0533a 0%, #e5432a 100%);
  box-shadow: 0 16px 36px rgba(229, 67, 42, 0.22);
}
.cnw.cnw-web:after {
  content: ""; position: absolute; left: -70px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 209, 102, 0.14); pointer-events: none;
}
.cnw-web-main { position: relative; z-index: 1; }
.cnw-web-kicker {
  display: inline-flex; align-items: center; gap: 0.35rem; margin: 0;
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 0.3rem 0.7rem;
}
.cnw-web-kicker svg { width: 15px; height: 15px; color: #ffd166; }
.cnw-web-title {
  font-family: Nunito, sans-serif; font-weight: 800; letter-spacing: -0.02em; line-height: 1.08;
  font-size: 1.85rem; margin: 0.7rem 0 0.55rem; color: #fff;
}
.cnw-web-title span { color: #ffd166; display: block; }
.cnw-web-sub { font-size: 0.95rem; line-height: 1.5; margin: 0; color: rgba(255,255,255,0.96); max-width: 540px; }
.cnw-web-sub strong { color: #ffd166; }
.cnw-web .cnw-badges { justify-content: flex-start; margin-top: 0.85rem; }
.cnw-web-actions { display: flex; gap: 0.55rem; margin-top: 1.05rem; }
.cnw-web .cnw-join, .cnw-web .cnw-login { width: auto; flex: 1; min-height: 48px; padding: 0 1.2rem; border-radius: 14px; font-size: 1rem; }
.cnw-web .cnw-join { background: #ffd166; color: #4a2200; box-shadow: 0 8px 20px rgba(90, 30, 0, 0.22); }
.cnw-web .cnw-join:hover { background: #ffdb85; }
.cnw-web .cnw-login { background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.75); }
.cnw-web .cnw-login:hover { background: rgba(255,255,255,0.22); }
.cnw-web .cnw-skip { display: inline-block; width: auto; margin-top: 0.55rem; color: rgba(255,255,255,0.92); text-decoration-color: rgba(255,255,255,0.5); font-size: 0.84rem; }
.cnw-web .cnw-note { color: #fff3c4; text-align: left; }
.cnw-web-card.cnw-card {
  width: auto; max-width: none; margin: 0; color: #111827; padding: 1rem 1rem 0.95rem;
  box-shadow: 0 14px 34px rgba(120, 30, 10, 0.25);
}
.cnw-web-card h3 {
  font-family: Nunito, sans-serif; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: #9a3412; margin: 0 0 0.55rem;
}
.cnw-web-card .cnw-tiles button {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 100%;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: inherit;
}
.cnw-web-card .cnw-tiles button:hover .cnw-ico { transform: translateY(-2px); }
.cnw-web-card .cnw-ico { transition: transform 0.15s ease; }
.cnw-web-card .cnw-alert { margin-bottom: 0; }
.cnw-web-get { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid #f1f1f1; }
.cnw-web-get > span { font-family: Nunito, sans-serif; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #9a3412; }
.cnw-web-get .cn-store { min-width: 0; height: 40px; padding: 0 0.7rem 0 0.55rem; }
.cnw-web-get .cn-store-txt b { font-size: 0.92rem; }
.cnw-web-get .cn-store-logo svg { width: 20px; height: 20px; }

/* Hero shows for first visits; it steps aside once you search, sign in, or skip it */
html.cn-web.cn-hero-skip #cnWebHero,
html.cn-web.cn-signed-in #cnWebHero,
html.cn-web.cn-has-results #cnWebHero { display: none; }
html.cn-web:not(.cn-hero-skip):not(.cn-signed-in):not(.cn-has-results) #cnPageSearch .cn-search-hello { display: none; }
html.cn-web:not(.cn-hero-skip):not(.cn-signed-in):not(.cn-has-results) #cnPageSearch .search-card { margin-top: 0.9rem; }

/* Mobile web: bottom tabs (from app-shell.css), lift the cookie bar and toasts above them */
@media (max-width: 899px) {
  html.cn-web #cookieBanner { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  html.cn-web .cnw-web-card .cnw-web-get { justify-content: center; }
}

/* Desktop: top navigation instead of the bottom tab bar */
@media (min-width: 900px) {
  html.cn-web body { padding-bottom: 0; }
  html.cn-web header { padding: 10px 28px !important; }
  html.cn-web header .container { max-width: 1120px; margin: 0 auto; gap: 1.25rem; }
  html.cn-web header .logo-mark { width: 40px !important; height: 40px !important; }
  html.cn-web header h1 { font-size: 1.5rem !important; }
  html.cn-web #cnTabBar {
    position: static; margin-left: auto; min-height: 0; padding: 0; gap: 0.25rem;
    background: transparent; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-sizing: border-box;
  }
  html.cn-web #cnTabBar .cn-tab {
    flex: none; flex-direction: row; gap: 0.45rem; padding: 0.5rem 0.95rem; border-radius: 999px;
    color: rgba(255,255,255,0.92); font-size: 0.95rem; font-weight: 650; line-height: 1;
  }
  html.cn-web #cnTabBar .cn-tab svg { width: 19px; height: 19px; }
  html.cn-web #cnTabBar .cn-tab:hover { background: rgba(255,255,255,0.14); color: #fff; }
  html.cn-web #cnTabBar .cn-tab.on { background: #fff; color: #e5432a; }
  html.cn-web #cnTabBar .cn-badge { top: -7px; right: -8px; background: #ffd166; color: #5a2a00; }
  html.cn-web .cn-getapp-btn { margin-left: 0.4rem; font-size: 0.9rem; padding: 0.55rem 1rem; }
  html.cn-web .toast { bottom: 1rem; }

  html.cn-web main.container,
  html.cn-web #cnAppMain { max-width: 1120px; padding: 0 1.75rem 2rem; }
  html.cn-web .cn-page > *:not(.cnw-web),
  html.cn-web main > .why-section,
  html.cn-web main > #disclaimer,
  html.cn-web body.cn-app-doc main.container > * { max-width: 820px; margin-left: auto; margin-right: auto; }
  html.cn-web #cnPageSearch .search-card { margin-top: 1.2rem; }

  .cnw.cnw-web { grid-template-columns: 1.08fr 1fr; gap: 2.2rem; padding: 2.4rem 2.5rem; margin-top: 1.4rem; border-radius: 32px; }
  .cnw-web-title { font-size: 2.7rem; }
  .cnw-web-sub { font-size: 1.04rem; }
  .cnw-web-actions { max-width: 420px; }
  .cnw-web-card.cnw-card { padding: 1.25rem 1.3rem 1.2rem; }
  .cn-getapp { align-items: center; padding: 1rem; }
  .cn-getapp-card { border-radius: 24px; padding-bottom: 1.5rem; }
}
@media (min-width: 900px) and (max-width: 1040px) {
  html.cn-web #cnTabBar .cn-tab { padding: 0.5rem 0.7rem; }
  html.cn-web .cn-getapp-btn span { display: none; }
}
