/* =====================================================================
 * Cell3D — guided tour styles (paired with assets/myjs/tour.js)
 * ---------------------------------------------------------------------
 * Dark by default (matches the viewer pages); the light skin kicks in
 * under html[data-theme="light"] so the tour follows the site toggle.
 * Palette reuses the site accents: #00d4ff / #4361ee on dark,
 * #219EBC / #023047 on light.
 * ===================================================================== */

html.c3t-locked { overflow: hidden; }

.c3t-root {
  position: fixed;
  inset: 0;
  z-index: 100000;
  opacity: 0;
  transition: opacity .22s ease;
  font-family: inherit;
}
.c3t-root.is-on { opacity: 1; }

/* ---------- dim layer ----------
   The spotlight ring paints the dim itself (via a 9999px shadow), so the
   flat mask is normally transparent and only catches clicks. On centred
   steps there is no ring, so the mask takes over the dimming. */
.c3t-mask {
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: pointer;
  transition: background .22s ease;
}
.c3t-root.is-center .c3t-mask { background: rgba(3, 8, 20, .72); }

/* ---------- spotlight ---------- */
.c3t-ring {
  position: fixed;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(3, 8, 20, .72),
              0 0 0 2px #00d4ff,
              0 0 22px 4px rgba(0, 212, 255, .45);
  transition: top .28s cubic-bezier(.4, 0, .2, 1),
              left .28s cubic-bezier(.4, 0, .2, 1),
              width .28s cubic-bezier(.4, 0, .2, 1),
              height .28s cubic-bezier(.4, 0, .2, 1),
              opacity .2s ease;
}
.c3t-root.is-center .c3t-ring { opacity: 0; }

/* ---------- card ---------- */
.c3t-card {
  position: fixed;
  width: 330px;
  max-width: calc(100vw - 24px);
  padding: 16px 18px 14px;
  border-radius: 14px;
  background: #0f1b2d;
  border: 1px solid rgba(0, 212, 255, .35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  color: #e8f1f8;
  transition: top .28s cubic-bezier(.4, 0, .2, 1), left .28s cubic-bezier(.4, 0, .2, 1);
}

.c3t-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.c3t-step {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #00d4ff;
}
.c3t-skip {
  background: none;
  border: 0;
  padding: 2px 4px;
  font-size: 12px;
  color: rgba(232, 241, 248, .55);
  cursor: pointer;
  transition: color .15s ease;
}
.c3t-skip:hover { color: #e8f1f8; text-decoration: underline; }

.c3t-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
}
.c3t-text {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(232, 241, 248, .82);
}
.c3t-text code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 212, 255, .12);
  color: #7fe3ff;
  font-size: 12.5px;
}
.c3t-text b { color: #ffffff; }

.c3t-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.c3t-dots { display: flex; align-items: center; gap: 6px; }
.c3t-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(232, 241, 248, .22);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, width .18s ease;
}
.c3t-dot:hover { background: rgba(232, 241, 248, .45); }
.c3t-dot.is-done { background: rgba(0, 212, 255, .5); }
.c3t-dot.is-on { width: 18px; background: #00d4ff; }

.c3t-btns { display: flex; gap: 8px; }
.c3t-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter .15s ease, background .15s ease, color .15s ease;
}
.c3t-back {
  background: transparent;
  border-color: rgba(232, 241, 248, .25);
  color: rgba(232, 241, 248, .8);
}
.c3t-back:hover { background: rgba(232, 241, 248, .08); color: #fff; }
.c3t-next {
  background: linear-gradient(135deg, #4361ee, #00d4ff);
  color: #04121f;
}
.c3t-next:hover { filter: brightness(1.08); }

/* ---------- light skin ---------- */
html[data-theme="light"] .c3t-ring {
  box-shadow: 0 0 0 9999px rgba(12, 34, 51, .55),
              0 0 0 2px #219EBC,
              0 0 22px 4px rgba(33, 158, 188, .38);
}
html[data-theme="light"] .c3t-root.is-center .c3t-mask {
  background: rgba(12, 34, 51, .55);
}
html[data-theme="light"] .c3t-card {
  background: #ffffff;
  border-color: rgba(2, 48, 71, .16);
  box-shadow: 0 18px 44px rgba(2, 48, 71, .22);
  color: #1c2b36;
}
html[data-theme="light"] .c3t-step  { color: #0f7f9c; }
html[data-theme="light"] .c3t-title { color: #023047; }
html[data-theme="light"] .c3t-text  { color: #40525f; }
html[data-theme="light"] .c3t-text b { color: #023047; }
html[data-theme="light"] .c3t-text code {
  background: rgba(33, 158, 188, .12);
  color: #0f6f88;
}
html[data-theme="light"] .c3t-skip { color: #7d8b96; }
html[data-theme="light"] .c3t-skip:hover { color: #023047; }
html[data-theme="light"] .c3t-dot { background: rgba(2, 48, 71, .18); }
html[data-theme="light"] .c3t-dot.is-done { background: rgba(33, 158, 188, .55); }
html[data-theme="light"] .c3t-dot.is-on { background: #219EBC; }
html[data-theme="light"] .c3t-back {
  border-color: rgba(2, 48, 71, .2);
  color: #40525f;
}
html[data-theme="light"] .c3t-back:hover { background: rgba(2, 48, 71, .05); color: #023047; }
html[data-theme="light"] .c3t-next {
  background: linear-gradient(135deg, #219EBC, #4cc9f0);
  color: #ffffff;
}

/* ---------- "Take a tour" launcher button ---------- */
.c3t-launch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 255, .45);
  background: rgba(0, 212, 255, .1);
  color: #00d4ff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.c3t-launch:hover { background: rgba(0, 212, 255, .2); transform: translateY(-1px); }
.c3t-launch svg { width: 14px; height: 14px; }
html[data-theme="light"] .c3t-launch {
  border-color: rgba(33, 158, 188, .5);
  background: rgba(33, 158, 188, .1);
  color: #0f7f9c;
}
html[data-theme="light"] .c3t-launch:hover { background: rgba(33, 158, 188, .18); }

@media (max-width: 640px) {
  .c3t-card { width: calc(100vw - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  .c3t-root, .c3t-ring, .c3t-card { transition: none; }
}
