/* v1.5.1 — Welcome and setup walkthrough. Same surfaces, shadows and colours as the rest of My Wage. */

/* Welcome (first launch) */
.welcome { position: fixed; inset: 0; z-index: 70; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: grid; place-items: center; padding: calc(var(--safe-t) + 24px) 18px calc(var(--safe-b) + 24px);
  background: radial-gradient(120% 70% at 10% 0%, #F7EEFA 0%, transparent 60%), radial-gradient(100% 60% at 100% 100%, #E3F0FE 0%, transparent 60%), var(--bg);
  animation: fade .3s ease both; }
.welcome.closing { animation: fade .22s ease reverse both; }
.welcome-card { position: relative; isolation: isolate; width: min(100%, 440px); padding: 30px 22px 22px; border-radius: var(--r-xl);
  background: var(--surface); box-shadow: var(--raise); text-align: center; overflow: hidden; animation: rise .45s var(--ease) both; }
.welcome-logo { width: 72px; height: 72px; border-radius: 22px; box-shadow: var(--raise-sm); margin: 4px auto 16px; display: block; }
.welcome h1 { font-size: clamp(24px, 7vw, 29px); font-weight: 900; color: var(--ink-strong); letter-spacing: -.01em; margin: 0 0 8px; }
.welcome-lede { font-size: 15.5px; font-weight: 600; color: var(--muted); line-height: 1.45; margin: 0 auto 20px; max-width: 30ch; }
.welcome-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; text-align: left; }
.welcome-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); box-shadow: var(--inset-sm); font-weight: 700; font-size: 14.5px; color: var(--ink); }
.welcome-list .ico { flex: none; }
.welcome .btn-block + .btn-block { margin-top: 10px; }
.welcome-note { display: flex; gap: 8px; align-items: flex-start; text-align: left; margin: 16px 2px 0; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.45; }
.welcome-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: #3F7FB8; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* The guide panel: above the navigation, on top of the real screen (which still works) */
.guide { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px); width: min(calc(100% - 24px), 460px);
  max-height: min(48vh, 420px); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 14px 14px; border-radius: 26px; background: rgba(246, 249, 255, .92);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 10px 10px 26px rgba(150, 166, 205, .5), -4px -4px 12px rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(255, 255, 255, .7);
  animation: guideIn .35s var(--ease) both; }
@keyframes guideIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.guide-top { display: flex; align-items: center; gap: 6px; }
.guide-progress { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 4px; border: 0; background: none; font: inherit;
  font-size: 12.5px; font-weight: 800; color: var(--muted); text-align: left; cursor: pointer; border-radius: 12px; }
.guide-progress small { font-weight: 700; color: var(--faint); }
.guide-dots { display: inline-flex; gap: 4px; flex: none; }
.guide-dots i { width: 8px; height: 8px; border-radius: 50%; background: #D5DDED; box-shadow: var(--inset-sm); }
.guide-dots i.past { background: var(--sky); box-shadow: none; }
.guide-dots i.past.skip { background: #D9CDE6; }
.guide-dots i.now { width: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--sky), var(--orchid)); box-shadow: none; }
.guide-chev { margin-left: auto; display: inline-flex; transform: rotate(90deg); transition: transform .2s var(--ease); }
.guide.min .guide-chev { transform: rotate(-90deg); }
.guide-chev svg, .guide-there svg, .guide-nav svg, .guide-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.guide-x { width: 36px; height: 36px; flex: none; }
.guide.min .guide-body { display: none; }
.guide-body h2 { font-size: 17px; font-weight: 900; color: var(--ink-strong); margin: 6px 4px 6px; }
.guide-body p { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; margin: 0 4px 12px; }
.guide-done { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; margin-right: 2px; font-size: 12px; font-weight: 900; color: #fff; background: #5FA88A; vertical-align: -3px; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.guide-actions .btn { gap: 6px; }
.guide-there { display: inline-flex; align-items: center; gap: 4px; margin: -4px 4px 10px; font-weight: 800; }
.guide-nav { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid rgba(150, 166, 205, .25); }
.guide-nav .btn-primary { margin-left: auto; }
.guide-nav .btn { gap: 4px; }
.guide-nav .btn[disabled] { opacity: .4; }
body.guiding .view { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 40px + var(--guide-h, 240px)); }

/* What the guide is talking about, on the real screen */
.guide-spot { outline: 3px solid rgba(91, 141, 214, .85); outline-offset: 5px; border-radius: 18px; animation: guidePulse 1.8s ease-in-out infinite; scroll-margin-top: 80px; }
.tabbar .guide-spot, .topbar .guide-spot { outline-offset: 2px; }
section.card.guide-spot, .hero.guide-spot { border-radius: var(--r-xl); }
@keyframes guidePulse { 0%, 100% { outline-color: rgba(91, 141, 214, .85); } 50% { outline-color: rgba(205, 180, 219, .95); } }
@media (prefers-reduced-motion: reduce) { .guide-spot { animation: none; } .guide, .welcome, .welcome-card { animation: none; } }

/* Home: carry on with setup */
.card.guide-prompt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 10px 14px 16px; }
.guide-ring { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface) 72%, transparent 74%), conic-gradient(var(--sky-deep) calc(var(--p) * 1%), #DCE5F4 0); }
.guide-ring b { font-size: 12px; font-weight: 900; color: var(--ink-strong); }
.guide-prompt-text { display: grid; gap: 2px; min-width: 0; }
.guide-prompt-text b { font-size: 14.5px; font-weight: 900; color: var(--ink-strong); }
.guide-prompt-text small { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.guide-prompt-x { width: 34px; height: 34px; }
@media (max-width: 359px) { .card.guide-prompt { grid-template-columns: auto minmax(0, 1fr) auto; } .card.guide-prompt .btn { grid-column: 2 / -1; justify-self: start; } .guide-prompt-x { grid-row: 1; grid-column: 3; } }

/* Settings → Help */
.guide-steps { display: grid; gap: 6px; }
.guide-step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 16px;
  background: var(--surface); box-shadow: var(--raise-xs); font: inherit; font-size: 14px; font-weight: 800; color: var(--ink); text-align: left; cursor: pointer; }
.guide-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 900; color: var(--muted); box-shadow: var(--inset-sm); }
.guide-n.done { color: #fff; background: #5FA88A; box-shadow: none; }
.guide-n svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.guide-st { font-size: 12px; font-weight: 800; color: var(--faint); }
.guide-st.done { color: #2F6A55; }
.guide-st.skipped { color: #8A6BA6; }

/* Messages show above the guide, and its Back / Continue row always stays in view */
body.guiding .toast { bottom: calc(var(--tabbar-h) + var(--safe-b) + 34px + var(--guide-h, 240px)); }
.guide-nav { position: sticky; bottom: -14px; margin: 0 -14px -14px; padding: 10px 14px 14px; background: rgba(246, 249, 255, .97); border-radius: 0 0 26px 26px; }
@media (max-height: 700px) {
  .guide { max-height: 54vh; padding-top: 8px; }
  .guide-body h2 { font-size: 16px; margin-top: 2px; }
  .guide-body p { font-size: 13px; line-height: 1.42; margin-bottom: 10px; }
  .guide-actions { margin-bottom: 8px; }
}
@media (max-width: 359px) { .guide-progress { font-size: 11.5px; gap: 6px; } .guide-dots i { width: 6px; height: 6px; } .guide-dots i.now { width: 14px; } }
#guide-help .btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
#guide-help .btn-row .btn { width: auto; flex: 0 1 auto; white-space: nowrap; }

/* v1.5.2 — welcome for existing users, and the tour label */
.welcome-back { display: flex; gap: 8px; align-items: flex-start; text-align: left; margin: -8px 0 18px; padding: 10px 12px; border-radius: var(--r-md);
  background: linear-gradient(145deg, #EEF7F2, #E3F1EA); color: #2F6A55; font-size: 13px; font-weight: 700; line-height: 1.45; }
.welcome-back svg { flex: none; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.welcome-sub { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-left: -2px; }
