/**
 * Go CSS · apps/overview-app/overview-app.css
 * 
 * Purpose:
 *   This dashboard piece.
 * 
 * Dashboard:
 *   Go · App Store / data-view · overview
 * 
 * This file:
 *   business/dashboard/overview-app/overview-app.css
 * 
 * Depends on:
 *   - business/dashboard/shell/shell.html
 *   - scripts/assemble-dashboards.js
 * 
 * Used by:
 *   - scripts/assemble-dashboards.js → business/dashboard/styles.css
 */

/* ── Business Overview — advert experience ── */

body.portal-app .main > #overview-view {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding-inline: 0;
}

/* Pull overview out of the padded main column so the banner can go edge-to-edge. */
body.portal-app.business-drawer-nav .main:has(#overview-view:not(.hidden)),
body.portal-app .app.business-drawer-nav .main:has(#overview-view:not(.hidden)) {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

body.portal-app .main:has(#overview-view:not(.hidden)) > .topbar,
body.portal-app .main:has(#overview-view:not(.hidden)) > .business-workspace,
body.portal-app .main:has(#overview-view:not(.hidden)) > .admin-access-banner,
body.portal-app .main:has(#overview-view:not(.hidden)) > .test-mode-banner {
  padding-inline: 16px;
  box-sizing: border-box;
}

/* Overview sits flush under the ribbon — no topbar chrome gap. */
body.portal-app .main:has(#overview-view:not(.hidden)) > .business-workspace {
  padding-inline: 0;
}

body.portal-app .main:has(#overview-view:not(.hidden)) .business-workspace-body > .topbar {
  display: none;
}

#overview-view {
  /* Inbox CRM theme tokens — charcoal, DM Sans/Syne, soft white panels */
  --bo-ink: #121212;
  --bo-paper: #ffffff;
  --bo-muted: #6a6a6e;
  --bo-caption: #6a6a6e;
  --bo-teal: #121212;
  --bo-link: #121212;
  --bo-link-hover: #0d0d0d;
  --bo-display: var(--font-display, "Syne", "DM Sans", sans-serif);
  --bo-body: var(--font-brand, "DM Sans", system-ui, -apple-system, sans-serif);
  --bo-card-bg: #ffffff;
  --bo-card-border: 1px solid rgba(18, 18, 18, 0.08);
  --bo-card-radius: 16px;
  --bo-card-shadow: 0 1px 3px rgba(18, 18, 18, 0.08);
  --bo-card-shadow-hover: 0 8px 24px rgba(18, 18, 18, 0.1);
  --bo-card-padding: 16px 18px 18px;
  --bo-media-size: 88px;
}

/* True full-viewport banner width (escapes any remaining main padding). */
.bo-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16.5rem, 24rem);
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: min(58vh, 28rem);
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1.15rem, 4vw, 2.5rem) clamp(1.5rem, 3vw, 2.1rem);
  border-radius: 0;
  color: #121212;
  /* Solid CRM panel — no frosted glass */
  background: var(--panel, #ffffff);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-bottom: 1px solid rgba(18, 18, 18, 0.08);
  box-shadow: 0 1px 3px rgba(18, 18, 18, 0.04);
  animation: boFadeUp 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Business Overview uses the advert banner as its top banner — hide the hero.
 * Navigation stays available via the top ribbon (.business-portal-banner-tabs). */
#overview-view .bo-hero {
  display: none;
}

.bo-hero-atmos {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  grid-column: 1 / -1;
  grid-row: 1;
}

.bo-hero-main {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.bo-hero-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.15rem 1.05rem;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0 0 0.75rem;
  overflow-x: auto;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.bo-hero-tab {
  appearance: none;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: #262626;
  font-family: var(--bo-body);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.bo-hero-tab:hover,
.bo-hero-tab:focus-visible {
  color: var(--bo-link);
  outline: none;
}

.bo-hero-tab.is-active {
  color: #121212;
  font-weight: 600;
}

.bo-hero-tab.hidden {
  display: none;
}

.bo-hero-constellation {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  justify-items: stretch;
  gap: 0.7rem;
  align-self: center;
  animation: boFadeUp 720ms 140ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-app-showcase {
  position: relative;
  width: min(100%, 24rem);
  min-height: clamp(13rem, 28vw, 17.5rem);
  margin-inline: auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.bo-app-spotlight,
.bo-app-ensemble {
  grid-area: 1 / 1;
  width: 100%;
}

.bo-app-spotlight {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.55rem;
  text-align: center;
  opacity: 0;
}

.bo-app-spotlight.is-active {
  animation: boSpotlightDrift 3.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-app-spotlight[hidden] {
  display: none !important;
}

.bo-app-spotlight-icon,
.bo-app-spotlight .app-tile-icon {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 16px;
  font-size: 1.75rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 22px rgba(18, 18, 18, 0.14),
    0 2px 4px rgba(18, 18, 18, 0.08);
}

.bo-app-spotlight-icon svg,
.bo-app-spotlight .app-tile-icon svg {
  width: 1.7rem;
  height: 1.7rem;
}

.bo-app-spotlight-name {
  margin: 0;
  font-family: var(--bo-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #121212;
}

.bo-app-spotlight-fn {
  margin: 0;
  max-width: 18rem;
  font-size: 0.92rem;
  line-height: 1.4;
  color: rgba(18, 18, 18, 0.68);
}

.bo-app-ensemble {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 280ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bo-app-ensemble.is-active {
  opacity: 1;
  transform: translateY(0);
}

.bo-app-ensemble[hidden] {
  display: none !important;
}

.bo-app-ensemble-item {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0;
  animation: boAppPop 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-app-ensemble.is-active .bo-app-ensemble-item:nth-child(1) { animation-delay: 40ms; }

.bo-app-ensemble.is-active .bo-app-ensemble-item:nth-child(2) { animation-delay: 80ms; }

.bo-app-ensemble.is-active .bo-app-ensemble-item:nth-child(3) { animation-delay: 120ms; }

.bo-app-ensemble.is-active .bo-app-ensemble-item:nth-child(4) { animation-delay: 160ms; }

.bo-app-ensemble.is-active .bo-app-ensemble-item:nth-child(5) { animation-delay: 200ms; }

.bo-app-ensemble.is-active .bo-app-ensemble-item:nth-child(6) { animation-delay: 240ms; }

.bo-app-ensemble-item .app-tile-icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 6px 14px rgba(18, 18, 18, 0.12);
}

.bo-app-ensemble-item .app-tile-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.bo-app-ensemble-label {
  display: none !important;
}

@media (max-width: 420px) {
  .bo-app-ensemble {
    gap: 0.4rem;
  }

  .bo-app-ensemble-item .app-tile-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 10px;
  }

  .bo-app-ensemble-item .app-tile-icon svg {
    width: 1rem;
    height: 1rem;
  }
}

.bo-hero-constellation-cue {
  margin: 0;
  max-width: 16rem;
  text-align: center;
  justify-self: center;
  font-family: var(--bo-display);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: rgba(18, 18, 18, 0.72);
  animation: boCueFade 700ms 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-signal-rail {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  text-align: center;
  pointer-events: none;
}

.bo-signal-live {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--bo-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bo-teal);
}

.bo-signal-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--bo-teal);
  align-self: center;
  animation: boLivePulse 1.8s ease-out infinite;
}

.bo-signal-live-sub {
  color: rgba(18, 18, 18, 0.45);
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.78rem;
}

.bo-signal-cycle {
  position: relative;
  width: 100%;
  min-height: 1.55rem;
  margin: 0.1rem 0 0.15rem;
}

.bo-signal-phrase {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: var(--bo-display);
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #121212;
  opacity: 0;
  animation: boPhraseCycle 21s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.bo-signal-phrase:nth-child(1) { animation-delay: 0s; }

.bo-signal-phrase:nth-child(2) { animation-delay: 3s; }

.bo-signal-phrase:nth-child(3) { animation-delay: 6s; }

.bo-signal-phrase:nth-child(4) { animation-delay: 9s; }

.bo-signal-phrase:nth-child(5) { animation-delay: 12s; }

.bo-signal-phrase:nth-child(6) { animation-delay: 15s; }

.bo-signal-phrase:nth-child(7) { animation-delay: 18s; }

.bo-signal-marks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  max-width: 22rem;
}

.bo-signal-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: rgba(18, 18, 18, 0.72);
  animation: boMarkIn 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-signal-mark:nth-child(1) { animation-delay: 180ms; }

.bo-signal-mark:nth-child(2) { animation-delay: 240ms; }

.bo-signal-mark:nth-child(3) { animation-delay: 300ms; }

.bo-signal-mark:nth-child(4) { animation-delay: 360ms; }

.bo-signal-mark:nth-child(5) { animation-delay: 420ms; }

.bo-signal-mark svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--bo-teal);
  flex: 0 0 auto;
}

.bo-signal-devices {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
  color: rgba(18, 18, 18, 0.7);
}

.bo-device {
  display: inline-grid;
  place-items: center;
  color: #121212;
  animation: boDeviceBob 3.6s ease-in-out infinite;
}

.bo-device svg {
  width: 1.15rem;
  height: 1.15rem;
}

.bo-device--phone { animation-delay: 0s; }

.bo-device--tablet { animation-delay: -0.7s; }

.bo-device--desktop { animation-delay: -1.4s; }

.bo-device--phone svg { width: 0.95rem; height: 0.95rem; }

.bo-device--tablet svg { width: 1.1rem; height: 1.1rem; }

.bo-device--desktop svg { width: 1.25rem; height: 1.25rem; }

.bo-signal-devices-label {
  margin-left: 0.15rem;
  font-family: var(--bo-display);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: rgba(18, 18, 18, 0.62);
}

.bo-signal-gotyou {
  margin: 0.15rem 0 0;
  font-family: var(--bo-display);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #121212;
  animation: boCueFade 700ms 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.55;
  animation: boOrbDrift 12s ease-in-out infinite;
}

.bo-hero-orb--a {
  width: min(52vw, 28rem);
  height: min(52vw, 28rem);
  top: -18%;
  right: -12%;
  background: radial-gradient(circle at 30% 30%, rgba(18, 18, 18, 0.08), transparent 68%);
}

.bo-hero-orb--b {
  width: min(42vw, 22rem);
  height: min(42vw, 22rem);
  bottom: -22%;
  left: -10%;
  background: radial-gradient(circle at 60% 40%, rgba(18, 18, 18, 0.1), transparent 70%);
  animation-delay: -4s;
}

.bo-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(18, 18, 18, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 18, 18, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 88%);
  animation: boGridShift 28s linear infinite;
}

.bo-brand {
  position: relative;
  z-index: 1;
  margin: 0 0 0.45rem;
  font-family: var(--bo-display);
  font-size: clamp(2.55rem, 7vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: #121212;
  animation: boFadeUp 640ms 60ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-brand-go {
  font-style: normal;
  font-weight: 650;
  margin-left: 0.18em;
  color: var(--bo-teal);
}

.bo-slideshow {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.1rem;
  max-width: 42rem;
  min-height: 9.5rem;
}

.bo-slides {
  position: relative;
  min-height: 8.2rem;
}

.bo-slide {
  display: grid;
  gap: 0.55rem;
  animation: boSlideIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-slide[hidden] {
  display: none !important;
}

.bo-slide-title {
  margin: 0;
  font-family: var(--bo-display);
  font-size: clamp(1.35rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #121212;
}

.bo-slide-copy {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(18, 18, 18, 0.72);
  max-width: 34rem;
}

.bo-slideshow-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.bo-slide-nav {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #121212;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.bo-slide-nav svg {
  width: 1.05rem;
  height: 1.05rem;
}

.bo-slide-nav:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
}

.bo-slide-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
}

.bo-slide-dot {
  appearance: none;
  width: 0.55rem;
  height: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.22);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease;
}

.bo-slide-dot.is-active {
  width: 1.45rem;
  background: var(--bo-teal);
}

.bo-hero-cta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.45rem;
  animation: boFadeUp 700ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Overview CTAs use shared landing buttons (.bo-btn-* aliased in buttons.css). */

.bo-section-head {
  display: grid;
  gap: 0.25rem;
  padding-inline: clamp(1rem, 3vw, 1.5rem);
}

.bo-section-head h3 {
  margin: 0;
  font-family: var(--bo-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.bo-section-head p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--bo-muted);
}

.bo-interact,
.bo-apps {
  display: grid;
  gap: 0.95rem;
  animation: boFadeUp 680ms 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Business Overview advert banner (Admin → Video adverts). */
.bo-advert-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 5;
  min-height: 140px;
  border-radius: 18px;
  border: 1px solid rgba(18, 18, 18, 0.08);
  background: #0b1120;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  animation: boFadeUp 680ms 60ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-advert-banner.hidden {
  display: none;
}

/* Business Overview — TuMicha Ask (isolated from personal Shop Ask).
 * Open canvas: no wrapping card, no shadows. Bubbles float on atmosphere. */
/* Business Ask chat chrome lives in /shared/ask-chat.css (Admin Ask parity). */

.bo-advert-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.bo-advert-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b1120;
  container-type: size;
}

.bo-advert-video,
.bo-advert-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* Keep the full uploaded frame visible — never crop creatives. */
  object-fit: contain;
  object-position: center;
  background: #0b1120;
  display: block;
}

.bo-advert-banner:not(.is-fallback):not(.hidden) {
  --ja-banner-max-h: min(56vw, 300px);
  aspect-ratio: var(--ja-media-aspect, 16 / 9);
  min-height: min(40vw, 160px);
  height: auto;
  max-height: var(--ja-banner-max-h);
  width: 100%;
}

.bo-advert-banner:not(.is-fallback):not(.hidden) .bo-advert-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bo-advert-banner:not(.is-fallback):not(.hidden) .bo-advert-video,
.bo-advert-banner:not(.is-fallback):not(.hidden) .bo-advert-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Keep Overview banner visible when no creatives are uploaded. */
.bo-advert-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end start;
  padding: 1.1rem 1.15rem;
  background:
    radial-gradient(120% 90% at 18% 12%, rgba(255, 255, 255, 0.18), transparent 52%),
    linear-gradient(145deg, #0f766e 0%, #115e59 42%, #0b1220 100%);
  overflow: hidden;
}

.bo-advert-fallback-glow {
  position: absolute;
  width: 58%;
  height: 70%;
  right: -8%;
  top: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 68%);
}

.bo-advert-fallback-copy {
  position: relative;
  z-index: 1;
  color: #f7f7f8;
  max-width: 16rem;
}

.bo-advert-fallback-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.82;
}

.bo-advert-fallback-title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.bo-advert-banner.is-fallback .bo-advert-badge {
  background: rgba(15, 23, 42, 0.45);
}

@media (max-width: 720px) {
  .bo-advert-banner.is-fallback {
    aspect-ratio: 16 / 10;
    min-height: min(56vw, 300px);
  }

  .bo-advert-video,
  .bo-advert-image,
  .bo-advert-banner:not(.is-fallback):not(.hidden) .bo-advert-video,
  .bo-advert-banner:not(.is-fallback):not(.hidden) .bo-advert-image {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .bo-advert-banner:not(.is-fallback):not(.hidden) {
    /* Prefer a stable mobile stage; media covers it edge-to-edge. */
    aspect-ratio: auto;
    min-height: min(56vw, 300px);
    height: min(56vw, 300px);
    max-height: none;
  }
}

/*
 * Desktop: left-justified advert stage for storefront + Overview.
 * Media keeps natural proportions and grows to the max width/height box.
 * In-store stays full-width; height follows the creative up to the max.
 */
@media (min-width: 961px) {
  .shop-browse-banner,
  .shop-browse-banner.has-tumicha-ad,
  .shop-browse-banner.has-video {
    --ja-banner-max-h: clamp(360px, 40vw, 620px);
    width: min(100%, 960px);
    max-width: min(72vw, 960px);
    margin: 0 auto 20px 0;
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    max-height: none;
  }

  .shop-browse-banner.has-tumicha-ad .shop-browse-banner-stage,
  .shop-browse-banner.has-video .shop-browse-banner-stage {
    aspect-ratio: var(--ja-media-aspect, 16 / 9);
    min-height: clamp(300px, 34vw, 440px);
    height: auto;
    max-height: var(--ja-banner-max-h);
  }

  .shop-menu-banner.has-video {
    /* Full-width in-store; height from store details body, not a locked aspect. */
    width: 100%;
    max-width: 100%;
    min-height: clamp(260px, 32vw, 420px);
    height: auto;
    max-height: none;
    aspect-ratio: auto;
  }

  .shop-menu-banner.has-video .shop-menu-banner-body {
    position: relative;
    inset: auto;
    min-height: clamp(260px, 32vw, 420px);
    align-content: end;
  }

  .bo-advert-banner.is-fallback {
    width: min(100%, 960px);
    max-width: min(72vw, 960px);
    margin-left: 0;
    margin-right: auto;
    aspect-ratio: 16 / 9;
    min-height: clamp(280px, 32vw, 520px);
  }

  .bo-advert-banner:not(.is-fallback):not(.hidden) {
    --ja-banner-max-h: clamp(280px, 32vw, 520px);
    width: min(100%, 960px);
    max-width: min(72vw, 960px);
    margin-left: 0;
    margin-right: auto;
    aspect-ratio: var(--ja-media-aspect, 16 / 9);
    min-height: clamp(220px, 26vw, 320px);
    height: auto;
    max-height: var(--ja-banner-max-h);
  }
}

.bo-story-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 0.15rem clamp(1rem, 3vw, 1.5rem) 0.65rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* All app cards fit on screen at once — responsive grid, never scrolls left/right. */
.bo-apps-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  overflow: visible;
  padding: 0.15rem clamp(1rem, 3vw, 1.5rem) 0.65rem;
  box-sizing: border-box;
}

/* Small desktop / tablet landscape: 4 per row (8 apps -> 2 tidy rows). */
@media (max-width: 1199px) {
  .bo-apps-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet portrait: 3 per row. */
@media (max-width: 899px) {
  .bo-apps-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Phones: 2 per row. */
@media (max-width: 599px) {
  .bo-apps-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* App cards fill their grid cell (override the fixed card widths/heights). */
#overview-apps-row .bo-app {
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 11.5rem;
}

/*
 * Tall rectangular cards — Inbox CRM surface:
 * white panels, soft radius, hairline border, quiet shadow.
 */
.bo-story,
.bo-app,
.bo-apps-row .business-overview-app {
  appearance: none;
  flex: 0 0 auto;
  width: 10.5rem;
  height: 14.5rem; /* longest side = height */
  max-width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  justify-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: var(--bo-card-border);
  border-radius: var(--bo-card-radius);
  background: var(--bo-card-bg);
  color: var(--bo-ink);
  box-shadow: var(--bo-card-shadow);
  cursor: pointer;
  box-sizing: border-box;
  transition: box-shadow 160ms ease, transform 160ms ease;
  animation: boAppPop 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-story:nth-child(1),
.bo-app:nth-child(1) { animation-delay: 80ms; }

.bo-story:nth-child(2),
.bo-app:nth-child(2) { animation-delay: 130ms; }

.bo-story:nth-child(3),
.bo-app:nth-child(3) { animation-delay: 180ms; }

.bo-story:nth-child(4),
.bo-app:nth-child(4) { animation-delay: 230ms; }

.bo-app:nth-child(5) { animation-delay: 280ms; }

.bo-app:nth-child(6) { animation-delay: 330ms; }

.bo-story:hover,
.bo-story:focus-visible,
.bo-app:hover,
.bo-app:focus-visible {
  box-shadow: var(--bo-card-shadow-hover);
  transform: translateY(-2px);
  outline: none;
}

.bo-story-kicker {
  display: grid;
  place-items: center;
  height: var(--bo-media-size);
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(18, 18, 18, 0.08);
  background: var(--mist, #fafafa);
  font-family: var(--bo-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--bo-link);
}

.bo-story strong {
  display: block;
  margin: 0;
  padding: 12px 14px 4px;
  font-family: var(--bo-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.25;
  color: #121212;
}

.bo-story > span:last-child {
  display: block;
  margin: 0;
  padding: 0 14px 14px;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--bo-muted);
}

.bo-app .app-tile-icon,
.bo-apps-row .business-overview-app .app-tile-icon {
  width: 100%;
  height: var(--bo-media-size);
  border-radius: 0;
  box-shadow: none;
}

.bo-app .app-tile-icon svg,
.bo-apps-row .business-overview-app .app-tile-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.bo-app-name,
.bo-apps-row .business-overview-app-name {
  margin: 0;
  padding: 12px 14px 2px;
  font-family: var(--bo-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.25;
  color: #000000;
}

.bo-app-tag,
.bo-apps-row .business-overview-app-tag {
  margin: 0;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--bo-muted);
}

.bo-app-action,
.bo-apps-row .business-overview-app-action {
  margin-top: auto;
  padding: 10px 14px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bo-link);
}

.bo-story:hover .bo-app-action,
.bo-app:hover .bo-app-action,
.bo-apps-row .business-overview-app:hover .bo-app-action,
.bo-apps-row .business-overview-app:hover .business-overview-app-action {
  color: var(--bo-link-hover);
}

.bo-app.is-installed .bo-app-action {
  color: #15803d;
}

.bo-popup[hidden] {
  display: none !important;
}

.bo-popup {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.bo-popup-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(18, 18, 18, 0.42);
  cursor: pointer;
}

.bo-popup-panel {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  display: grid;
  gap: 0.7rem;
  padding: var(--bo-card-padding);
  padding-top: 1.15rem;
  border: var(--bo-card-border);
  border-radius: var(--bo-card-radius);
  background: var(--bo-card-bg);
  color: var(--bo-ink);
  box-shadow: var(--bo-card-shadow-hover);
  font-family: var(--bo-body);
  animation: boPopupIn 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bo-popup-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(18, 18, 18, 0.08);
  border-radius: 12px;
  background: var(--mist, #fafafa);
  color: var(--bo-ink);
  cursor: pointer;
}

.bo-popup-close svg {
  width: 1rem;
  height: 1rem;
}

.bo-popup-icon {
  width: var(--bo-media-size);
  height: var(--bo-media-size);
}

.bo-popup-icon .app-tile-icon {
  width: var(--bo-media-size);
  height: var(--bo-media-size);
  border-radius: 0;
}

.bo-popup-title {
  margin: 0;
  padding-right: 2rem;
  font-family: var(--bo-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: normal;
  color: #000000;
}

.bo-popup-body {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bo-muted);
}

.bo-popup-points {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.bo-popup-points li {
  position: relative;
  padding-left: 1.05rem;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--bo-muted);
}

.bo-popup-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--bo-link);
}

.bo-popup-actions {
  margin-top: 0.35rem;
}

.bo-popup-actions .bo-btn-primary {
  width: 100%;
}

@media (max-width: 900px) {
  .bo-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .bo-hero-constellation {
    display: none;
  }

  .bo-story,
  .bo-app,
  .bo-apps-row .business-overview-app {
    width: 9.75rem;
    height: 13.75rem;
  }

  .bo-hero-cta {
    flex-direction: column;
  }

  .bo-hero-cta .bo-btn-primary,
  .bo-hero-cta .bo-btn-ghost {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bo-hero,
  .bo-brand,
  .bo-hero-cta,
  .bo-hero-constellation,
  .bo-hero-constellation-cue,
  .bo-signal-gotyou,
  .bo-signal-mark,
  .bo-signal-phrase,
  .bo-interact,
  .bo-apps,
  .bo-slide,
  .bo-app,
  .bo-story,
  .bo-popup-panel,
  .bo-hero-orb,
  .bo-hero-grid,
  .bo-app-spotlight,
  .bo-app-spotlight.is-active,
  .bo-app-ensemble-item,
  .bo-signal-dot,
  .bo-device {
    animation: none !important;
  }

  .bo-app-spotlight,
  .bo-app-ensemble {
    transition: none !important;
  }

  .bo-signal-phrase {
    position: static;
    opacity: 1;
    transform: none;
    display: none;
  }

  .bo-signal-phrase:first-child,
  .bo-signal-phrase:nth-child(3),
  .bo-signal-phrase:nth-child(5) {
    display: block;
    margin: 0.1rem 0;
  }

  .bo-story:hover,
  .bo-app:hover {
    transform: none;
  }
}

body.welcome-tour-active .business-portal-banner,
body.welcome-tour-active #settings-mode-tabs,
body.welcome-tour-active .bo-hero-tabs,
body.welcome-tour-active .nav-primary {
  position: relative;
  z-index: 5001;
}
