/* Onboarding tour (see onboarding.js): screenshot in a phone frame, target lit, the rest dimmed */
body.is-tour { overflow: hidden; }

.ob {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: calc(var(--safe-t, 0px) + 44px) 16px calc(var(--safe-b, 0px) + 14px);
  background: rgba(5, 9, 20, .84);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: ob-in .25s ease-out;
}

.ob-skip {
  position: absolute;
  top: calc(var(--safe-t, 0px) + 10px);
  right: 14px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
}

.ob-phone {
  position: relative;
  flex: 0 1 auto;
  height: clamp(250px, calc(100dvh - 292px), 660px);
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border: 5px solid #1b2236;
  border-radius: 30px;
  background: var(--paper, #f4f1e9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .12);
}

.ob-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .2s ease;
}

.ob.is-swapping .ob-shot { opacity: 0; }

/* the huge shadow darkens everything outside the target; the frame clips it */
.ob-spot {
  position: absolute;
  border-radius: 14px;
  border: 2px solid var(--gold, #f3bd50);
  box-shadow: 0 0 0 100vmax rgba(5, 9, 20, .68), 0 0 18px rgba(243, 189, 80, .55);
  pointer-events: none;
  transition: left .35s cubic-bezier(.2, .8, .2, 1), top .35s cubic-bezier(.2, .8, .2, 1), width .35s cubic-bezier(.2, .8, .2, 1), height .35s cubic-bezier(.2, .8, .2, 1);
  animation: ob-pulse 2s ease-in-out infinite;
}

.ob-card {
  width: min(100%, 420px);
  padding: 16px 18px 14px;
  border-radius: 22px;
  color: var(--ink, #12213a);
  background: var(--surface, #fff);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
}

.ob-kicker {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
  color: var(--gold-dark, #a66f13);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ob-card h2 { margin: 0 0 6px; font-size: 1.08rem; line-height: 1.25; }
.ob-text { margin: 0; color: var(--muted, #727b89); font-size: .88rem; line-height: 1.5; }

.ob-dots { display: flex; justify-content: center; gap: 6px; margin: 12px 0 10px; }
.ob-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong, rgba(18, 33, 58, .18)); transition: width .25s, background .25s; }
.ob-dots i.is-on { width: 18px; border-radius: 4px; background: var(--gold, #f3bd50); }

.ob-actions { display: flex; align-items: center; gap: 8px; }
.ob-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: .9rem;
  font-weight: 750;
}
.ob-btn-ghost { color: var(--ink, #12213a); background: var(--seg, #eae6dc); }
.ob-btn-open { margin-left: auto; padding: 0 6px; color: var(--gold-dark, #a66f13); background: transparent; font-size: .82rem; }
.ob-btn-primary { min-width: 112px; color: var(--night, #091c3b); background: var(--gold, #f3bd50); box-shadow: 0 8px 20px rgba(184, 124, 21, .2); }
.ob-skip:focus-visible, .ob-btn:focus-visible { outline: 3px solid var(--gold, #f3bd50); outline-offset: 2px; }

@keyframes ob-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ob-pulse { 50% { border-color: rgba(243, 189, 80, .55); } }

@media (max-height: 640px) {
  .ob { gap: 10px; padding-top: calc(var(--safe-t, 0px) + 40px); }
  .ob-phone { height: clamp(200px, calc(100dvh - 268px), 660px); }
  .ob-text { font-size: .82rem; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  .ob, .ob-spot, .ob-shot, .ob-dots i { animation: none; transition: none; }
}


/* help button lives in the app bar, only on the home screen */
.appbar > * { grid-row: 1; }
.appbar-brand { justify-self: start; }
.appbar-help { grid-column: 2; justify-self: end; }
body:not([data-view="home"]) .appbar-help { display: none; }
