/* The help guides (guide.js): step cards and the large view. Shared by the app and the site, so it only leans on the
   colour names both have, with fallbacks. */

.guide-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 12px; overflow-x: auto; padding: 4px 2px 12px;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.guide-strip.grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); overflow: visible; gap: 16px; }
/* A phone: two steps a row, so a step is not a whole screen tall. */
@media (max-width: 560px) { .guide-strip.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
/* Pictures of the app: wider cards, the picture whole in a frame of one height. */
.guide-strip.wide { grid-auto-columns: 260px; }
.guide-strip.wide .guide-pic { height: 168px; display: grid; place-items: center; border-radius: 12px; background: rgba(0, 0, 0, 0.28); margin-bottom: 4px; overflow: hidden; }
.guide-strip.wide .guide-pic img { max-width: 100%; max-height: 152px; width: auto; height: auto; margin: 0; border-radius: 8px; }
.guide-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 12px; scroll-snap-align: start;
  border-radius: 16px; border: 1px solid var(--line, rgba(255, 255, 255, 0.08)); background: var(--card, rgba(255, 255, 255, 0.04));
  color: var(--text, #f1f2f6); text-align: left; font: inherit; cursor: zoom-in;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.22s, background-color 0.22s; }
.guide-card:hover { transform: translateY(-3px); border-color: rgba(126, 163, 255, 0.4); background: rgba(126, 163, 255, 0.08); }
.guide-card:focus-visible { outline: 2px solid var(--accent, #4b80ff); outline-offset: 2px; }
.guide-pic { display: block; }
.guide-card img { display: block; width: 100%; height: auto; border-radius: 14px; margin-bottom: 4px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
/* The step number by the title: on the picture it covered part of the screen. */
.guide-card b { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.guide-card .guide-text { font-size: 12px; line-height: 1.4; color: var(--text-2, #a6aabb); }
.guide-num { flex: none; width: 20px; height: 20px; margin-top: -1px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #4b80ff, #7d63ff); box-shadow: 0 3px 8px rgba(75, 128, 255, 0.4); }
/* The last card: no picture, a check in the accent colours, the same frame as the steps. */
.guide-done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px 16px; text-align: center;
  border-radius: 16px; border: 1px solid var(--line, rgba(255, 255, 255, 0.08)); background: var(--card, rgba(255, 255, 255, 0.04)); color: var(--text, #f1f2f6); }
.guide-done i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; margin-bottom: 4px;
  background: linear-gradient(135deg, #4b80ff, #7d63ff); box-shadow: 0 8px 24px rgba(75, 128, 255, 0.4); }
.guide-done i svg { width: 26px; height: 26px; }
.guide-done b { font-size: 16px; }
.guide-done span { font-size: 12.5px; line-height: 1.45; color: var(--text-2, #a6aabb); max-width: 220px; }

/* The large view: over everything, the picture with its step and words beside it. */
.guide-box { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 32px 24px 56px;
  background: rgba(8, 9, 14, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.18s; touch-action: pan-y; }
.guide-box.open { opacity: 1; }
.guide-figure { margin: 0; display: flex; align-items: center; gap: 36px; max-width: 920px; }
.guide-img { height: min(80vh, 760px); width: auto; max-width: 70vw; aspect-ratio: 780 / 1688; border-radius: 34px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  user-select: none; -webkit-user-drag: none; animation: guide-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.guide-cap { width: 280px; display: flex; flex-direction: column; gap: 10px; color: #f1f2f6; }
.guide-count { font-size: 13px; font-weight: 600; color: #9db8ff; text-transform: none; }
.guide-cap b { font-size: 24px; line-height: 1.2; font-weight: 700; }
.guide-cap span:last-child { font-size: 15.5px; line-height: 1.5; color: #c3c7d6; }
.guide-btn { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08); color: #f1f2f6; transition: background-color 0.15s, opacity 0.15s; }
.guide-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.guide-btn:disabled { opacity: 0.25; cursor: default; }
.guide-btn svg { width: 22px; height: 22px; }
.guide-close { position: absolute; top: 18px; right: 18px; }
.guide-dots { position: absolute; bottom: 22px; left: 50%; translate: -50% 0; display: flex; gap: 8px; }
.guide-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); transition: width 0.2s, background-color 0.2s; }
.guide-dots i.on { width: 22px; border-radius: 4px; background: #7ea3ff; }
@keyframes guide-in { from { opacity: 0.4; transform: scale(0.985); } }
/* A narrow window or a phone: the picture over its words, the arrows under them. */
@media (max-width: 760px) {
  .guide-box { flex-wrap: wrap; align-content: center; gap: 16px; padding: 64px 16px 48px; }
  .guide-figure { flex-direction: column; gap: 16px; order: 0; width: 100%; }
  .guide-img { height: min(60vh, 560px); max-width: 100%; border-radius: 26px; }
  .guide-cap { width: 100%; max-width: 420px; text-align: center; align-items: center; }
  .guide-cap b { font-size: 20px; }
  .guide-prev, .guide-next { order: 1; }
}
/* The large view of an app picture: any shape, a smaller rounding. */
.guide-box.wide .guide-img { height: auto; width: auto; max-height: min(78vh, 720px); max-width: min(62vw, 860px); aspect-ratio: auto; border-radius: 14px; }
@media (max-width: 760px) { .guide-box.wide .guide-img { max-width: 100%; max-height: 56vh; } }
@media (prefers-reduced-motion: reduce) { .guide-box, .guide-card, .guide-img { transition: none; animation: none; } }
