/* openKylin 首页新手引导 — 对齐 Figma「首页导航」（只读还原，不改原型） */
.ok-hg {
  --ok-hg-blue: #115cdb;
  --ok-hg-blue-nav: #1160d9;
  --ok-hg-blue-text: #1766d6;
  --ok-hg-title: #243652;
  --ok-hg-body: #4d6078;
  --ok-hg-muted: #7c8da6;
  --ok-hg-border: #dfe8f5;
  --ok-hg-radius: 18px;
  --ok-hg-shadow: 0 24px 76px rgba(23, 66, 129, 0.19);
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ok-hg-title);
}

.ok-hg.is-open { display: flex; }

.ok-hg__mask {
  position: absolute;
  inset: 0;
  background: rgba(13, 49, 106, 0.18);
  backdrop-filter: blur(1px);
}

.ok-hg__dialog {
  position: relative;
  z-index: 1;
  width: min(1216px, 100%);
  max-height: min(762px, calc(100vh - 48px));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ok-hg-border);
  border-radius: var(--ok-hg-radius);
  box-shadow: var(--ok-hg-shadow);
  display: flex;
  flex-direction: column;
}

.ok-hg__close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #183967;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  text-decoration: underline;
  outline: none;
}

.ok-hg__close:focus,
.ok-hg__close:focus-visible,
.ok-hg-tour__close:focus,
.ok-hg-tour__close:focus-visible {
  outline: none;
}

.ok-hg.is-steps .ok-hg__close { color: #183967; opacity: 0.7; }

/* —— 欢迎 —— */
.ok-hg-welcome { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ok-hg.is-steps .ok-hg-welcome { display: none; }

.ok-hg-welcome__banner {
  position: relative;
  height: 260px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(185deg, #639bf1 26%, #2969dc 73%, #4d75e9 100%);
}

.ok-hg-welcome__banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ok-hg-welcome__banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 63, 161, 0.72) 0%, rgba(22, 92, 193, 0.35) 58%, rgba(59, 104, 214, 0.08) 100%);
  pointer-events: none;
}

.ok-hg-welcome__top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 36px 0 60px;
}

.ok-hg-welcome__logo {
  display: block;
  width: min(420px, 48vw);
  height: auto;
  margin-top: 12px;
}

.ok-hg-welcome__badge {
  margin-top: 40px;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.ok-hg-welcome__slogan {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  padding: 0 0 0 60px;
  color: #eaf3ff;
  font-size: 18px;
}

.ok-hg-welcome__body {
  padding: 28px 48px 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.ok-hg-welcome__title {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
  color: #243652;
}

.ok-hg-welcome__desc {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 28px;
  color: #4d6078;
}

.ok-hg-welcome__desc + .ok-hg-welcome__desc { margin-top: 12px; }

.ok-hg-welcome__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ok-hg-welcome__tags li {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

.ok-hg-welcome__tags button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #dbeafd;
  color: #1766d6;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  outline: none;
}

.ok-hg-welcome__tags button:focus,
.ok-hg-welcome__tags button:focus-visible {
  outline: none;
}

.ok-hg-welcome__tags button:hover {
  background: #e0edff;
  border-color: #b7d4fb;
}

.ok-hg-welcome__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 24px 48px 28px;
  flex-shrink: 0;
}

.ok-hg-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 15px;
  color: #7c8da6;
  cursor: pointer;
  user-select: none;
}

/* 透明 input 铺满整块 label，保证真实可点、可勾选（勿用 1×1 opacity:0） */
.ok-hg-check input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ok-hg-check__box {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 2px solid #1c77f6;
  border-radius: 4px;
  background: #fff;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.ok-hg-check input:checked + .ok-hg-check__box {
  background: #1c77f6;
  border-color: #1c77f6;
}

.ok-hg-check input:checked + .ok-hg-check__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ok-hg-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  height: 42px;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
  background: transparent;
  box-sizing: border-box;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.ok-hg-btn:focus,
.ok-hg-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.ok-hg-btn--primary:focus,
.ok-hg-btn--primary:focus-visible {
  box-shadow: 0 5px 13px rgba(12, 94, 225, 0.13);
}

.ok-hg-btn--primary {
  background: #115cdb;
  color: #fff;
  box-shadow: 0 5px 13px rgba(12, 94, 225, 0.13);
  padding: 0 28px 0 20px;
}

.ok-hg-btn--primary:hover { filter: brightness(1.05); }

.ok-hg-btn--ghost {
  color: #495c78;
  font-size: 17px;
  padding: 11px 20px;
}

.ok-hg-btn--ghost:disabled { opacity: 0.35; cursor: not-allowed; }

/* —— 分步 —— */
.ok-hg-steps {
  display: none;
  flex: 1;
  min-height: 0;
  max-height: inherit;
}

.ok-hg.is-steps .ok-hg-steps { display: flex; }

.ok-hg-steps__aside {
  width: 338px;
  flex-shrink: 0;
  padding: 53px 32px 28px;
  border-right: 1px solid #e9eef8;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.ok-hg-steps__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.ok-hg-steps__brand-label {
  font-size: 22px;
  color: #252c39;
}

.ok-hg-steps__brand-name {
  font-size: 27px;
  font-weight: 400;
  background: linear-gradient(181deg, #76a3ef 8%, #005ee7 86%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ok-hg-steps__aside-desc {
  margin: 29px 0 0;
  font-size: 17px;
  line-height: 30px;
  color: #59697d;
}

.ok-hg-steps__nav {
  margin: 43px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ok-hg-steps__nav li + li { margin-top: 29px; }

.ok-hg-steps__nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 16px 12px;
  font-size: 24px;
  color: #26344b;
  cursor: pointer;
  text-align: center;
}

.ok-hg-steps__nav-btn.is-active {
  background: #1160d9;
  color: #fff;
  box-shadow: 0 6px 15px rgba(25, 92, 222, 0.13);
}

.ok-hg-steps__aside-foot {
  margin-top: auto;
  padding-top: 24px;
  font-size: 13px;
  color: #8da1b8;
}

.ok-hg-steps__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 50px 40px 28px;
  background: linear-gradient(227deg, #fcfdff 56%, #f2f6fd 127%);
  box-sizing: border-box;
  overflow: auto;
}

.ok-hg-steps__browser {
  background: #fff;
  border: 5px solid #dae7ff;
  border-radius: 15px;
  box-shadow: 0 8px 28px rgba(27, 72, 146, 0.08);
  overflow: hidden;
}

.ok-hg-steps__chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 13px;
  background: #f7faff;
  border-bottom: 1px solid #e5edfa;
}

.ok-hg-steps__dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: #cad9f3;
}

.ok-hg-steps__url {
  margin-left: 13px;
  padding: 5px 18px;
  border-radius: 5px;
  background: #e9f1fd;
  color: #6e8ba8;
  font-size: 11px;
}

.ok-hg-steps__shot-wrap {
  position: relative;
  padding: 10px;
  background: #e9f5ff;
}

.ok-hg-steps__shot {
  display: block;
  width: 100%;
  height: auto;
  max-height: 330px;
  object-fit: cover;
  border-radius: 13px;
  border: 3px solid rgba(38, 119, 245, 0.75);
}

.ok-hg-steps__cta {
  position: absolute;
  right: 28px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 9px;
  background: #fff;
  color: #1766df;
  font-size: 13px;
  box-shadow: 0 8px 16px rgba(23, 62, 126, 0.16);
  pointer-events: none;
}

.ok-hg-steps__copy { padding: 29px 0 0; }

.ok-hg-steps__eyebrow {
  margin: 0;
  font-size: 13px;
  color: #2379e2;
}

.ok-hg-steps__title {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 36px;
  color: #1e304c;
}

.ok-hg-steps__desc {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 29px;
  color: #556678;
}

.ok-hg-steps__tags {
  margin: 14px 0 0;
  font-size: 13px;
  color: #2e7ddb;
  line-height: 1.6;
}

.ok-hg-steps__tags a {
  color: #2e7ddb;
  text-decoration: none;
}

.ok-hg-steps__tags a:hover {
  text-decoration: underline;
}

.ok-hg-steps__tags-sep {
  margin: 0 0.35em;
  color: #2e7ddb;
}

.ok-hg-steps__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 48px;
  position: relative;
}

.ok-hg-steps__indicator {
  position: absolute;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
  font-size: 14px;
  color: #99a7b9;
}

.ok-hg-steps__footer-right {
  display: flex;
  align-items: center;
  gap: 34px;
}

@media (max-width: 980px) {
  .ok-hg { padding: 0; align-items: stretch; }
  .ok-hg__dialog {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .ok-hg-welcome__banner { height: 180px; }
  .ok-hg-welcome__logo { width: min(240px, 64vw); margin-top: 4px; }
  .ok-hg-welcome__top { padding: 12px 16px 0 20px; }
  .ok-hg-welcome__badge { margin-top: 8px; padding: 8px 14px; font-size: 12px; }
  .ok-hg-welcome__slogan { padding-left: 20px; font-size: 14px; }
  .ok-hg-welcome__body,
  .ok-hg-welcome__footer { padding-left: 20px; padding-right: 20px; }
  .ok-hg-welcome__body { padding-top: 20px; overflow: auto; }
  .ok-hg-welcome__footer { padding-top: 16px; padding-bottom: 20px; }
  .ok-hg-welcome__title { font-size: 20px; }
  .ok-hg-welcome__desc { font-size: 14px; line-height: 1.6; margin-top: 10px; }
  .ok-hg-steps { flex-direction: column; }
  .ok-hg-steps__aside {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #e9eef8;
    padding: 20px 16px;
  }
  .ok-hg-steps__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
  }
  .ok-hg-steps__nav li { margin: 0 !important; }
  .ok-hg-steps__nav-btn { font-size: 14px; padding: 10px 12px; white-space: nowrap; }
  .ok-hg-steps__aside-desc,
  .ok-hg-steps__aside-foot { display: none; }
  .ok-hg-steps__main { padding: 20px 16px; }
  .ok-hg-steps__title { font-size: 22px; }
  .ok-hg-steps__footer-right { gap: 12px; }
}

/* —— 二期：顶栏 Tour —— */
.ok-hg-tour {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: #243652;
  pointer-events: none;
}

.ok-hg-tour.is-open { display: block; }

.ok-hg-tour__spot {
  position: fixed;
  z-index: 1;
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 9999px rgba(13, 49, 106, 0.42),
    0 4px 16px rgba(17, 92, 219, 0.12);
  border: 0;
  pointer-events: none;
}

.ok-hg-tour-target {
  position: relative !important;
  z-index: 10061 !important;
  outline: none !important;
  box-shadow: none !important;
}

.ok-hg-tour-target:focus,
.ok-hg-tour-target:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.ok-hg-tour__pop {
  position: fixed;
  z-index: 2;
  width: 570px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #dfe8f5;
  border-radius: 16px;
  box-shadow: 0 24px 76px rgba(23, 66, 129, 0.22);
  overflow: visible;
  pointer-events: auto;
  box-sizing: border-box;
}

.ok-hg-tour__arrow {
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  background: #115cdb;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px;
  /* 箭头落在高亮与气泡的间隙中，不压住光圈 */
  box-shadow: none;
}

.ok-hg-tour__pop.is-above .ok-hg-tour__arrow {
  top: auto;
  bottom: -9px;
  background: #fff;
  border: 1px solid #dfe8f5;
  box-shadow: none;
}

.ok-hg-tour__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  outline: none;
}

.ok-hg-tour__hero {
  position: relative;
  height: 156px;
  padding: 14px 30px 16px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background:
    radial-gradient(circle at 82% 30%, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(135deg, #4d8ef5 0%, #115cdb 48%, #0b4bb8 100%);
  color: #fff;
}

.ok-hg-tour__eyebrow {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  opacity: 0.95;
}

.ok-hg-tour__hero-title {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 500;
}

.ok-hg-tour__hero-sub {
  margin: 8px 0 0;
  font-size: 12px;
  opacity: 0.85;
}

.ok-hg-tour__badge {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 12px;
  white-space: nowrap;
}

.ok-hg-tour__mock {
  position: absolute;
  right: 92px;
  top: 28px;
  width: 196px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-sizing: border-box;
}

.ok-hg-tour__mock-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.ok-hg-tour__mock-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.ok-hg-tour__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ok-hg-tour__chips li {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ok-hg-tour__body {
  padding: 28px 36px 8px;
}

.ok-hg-tour__title {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  color: #243652;
}

.ok-hg-tour__desc {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: #4d6078;
}

.ok-hg-tour__footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px 24px;
}

.ok-hg-tour__indicator {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: #99a7b9;
}

.ok-hg-tour__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ok-hg-tour__actions .ok-hg-btn--ghost {
  height: 42px;
  padding: 0 16px;
}

.ok-hg-tour__actions .ok-hg-btn--primary {
  padding: 0 22px;
}

@media (max-width: 1200px) {
  /* 移动端无桌面顶栏导航，整套新手引导不展示 */
  .ok-hg,
  .ok-hg-tour { display: none !important; }
}
