/* 升学智汇 · 公开使用指南（简洁版） */
:root {
  --g-bg: #f1f5f9;
  --g-card: #fff;
  --g-text: #0f172a;
  --g-muted: #64748b;
  --g-border: #e2e8f0;
  --g-blue: #2563eb;
  --g-blue-soft: #eff6ff;
  --g-green-soft: #ecfdf5;
  --g-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --g-radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei',
    sans-serif;
  background: var(--g-bg);
  color: var(--g-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--g-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- 顶栏 ---------- */
.guide-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  padding: 28px 20px 32px;
  box-shadow: 0 8px 32px rgba(29, 78, 216, 0.25);
}

.guide-hero-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.guide-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.guide-logo {
  font-size: 40px;
  line-height: 1;
  flex-shrink: 0;
}

.guide-brand h1 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
}

.guide-brand p {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 6px;
  max-width: 480px;
}

.guide-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.guide-link-btn {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--g-blue);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.guide-link-btn:hover {
  text-decoration: none;
  background: #fff;
}

.guide-badge {
  font-size: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* ---------- Tab ---------- */
.guide-tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(241, 245, 249, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--g-border);
}

.guide-tab {
  border: 1px solid var(--g-border);
  background: var(--g-card);
  color: var(--g-muted);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.guide-tab:hover {
  border-color: #93c5fd;
  color: var(--g-blue);
}
.guide-tab.active {
  background: var(--g-blue);
  border-color: var(--g-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* ---------- 主内容 ---------- */
.guide-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  width: 100%;
}

.guide-panel {
  display: none;
}
.guide-panel.active {
  display: block;
}

.card {
  background: var(--g-card);
  border-radius: var(--g-radius);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--g-shadow);
  border: 1px solid var(--g-border);
}

.guide-intro h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.guide-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--g-blue-soft);
  border-radius: 12px;
  border: 1px solid #bfdbfe;
}

.flow-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.flow-arrow {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
}

.guide-quick {
  padding-left: 22px;
  font-size: 15px;
  color: #334155;
}
.guide-quick li {
  margin-bottom: 8px;
}

.guide-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--g-muted);
  background: var(--g-blue-soft);
  padding: 10px 14px;
  border-radius: 10px;
}

/* ---------- 功能卡片网格 ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  width: 100%;
}

.guide-card {
  display: block;
  width: 100%;
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.guide-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--g-shadow);
  transform: translateY(-2px);
}
.guide-card:active {
  transform: translateY(0);
}

.guide-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.guide-card-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.guide-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--g-text);
  line-height: 1.35;
}

.guide-card-entry {
  font-size: 12px;
  color: var(--g-blue);
  margin-top: 4px;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.guide-card-desc {
  font-size: 13px;
  color: var(--g-muted);
  line-height: 1.55;
}

.guide-card-cta {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--g-blue);
}

/* ---------- 页脚 ---------- */
.guide-foot {
  text-align: center;
  padding: 32px 16px 40px;
  font-size: 13px;
  color: var(--g-muted);
}
.guide-foot p + p {
  margin-top: 8px;
}
.guide-foot-beian a {
  color: var(--g-muted);
  text-decoration: none;
}
.guide-foot-beian a:hover {
  color: var(--g-text);
}

/* ---------- 弹窗 ---------- */
.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.guide-modal.open {
  pointer-events: auto;
  opacity: 1;
}

.guide-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.guide-modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  background: var(--g-card);
  border-radius: 20px 20px 0 0;
  padding: 24px 22px 32px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.25s ease-out;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.15);
}

@media (min-width: 640px) {
  .guide-modal {
    align-items: center;
    padding: 24px;
  }
  .guide-modal-box {
    border-radius: 20px;
    transform: translateY(24px) scale(0.96);
  }
  .guide-modal.open .guide-modal-box {
    transform: translateY(0) scale(1);
  }
}
.guide-modal.open .guide-modal-box {
  transform: translateY(0);
}

.guide-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--g-bg);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--g-muted);
  cursor: pointer;
}

.guide-modal-head {
  display: flex;
  gap: 14px;
  padding-right: 36px;
  margin-bottom: 12px;
}

.guide-modal-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}

.guide-modal-head h3 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.guide-modal-entry {
  font-size: 13px;
  color: var(--g-blue);
  font-weight: 600;
  margin-top: 4px;
}

.guide-modal-chip {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  background: var(--g-blue-soft);
  border-radius: 8px;
  font-size: 13px;
  color: #1e40af;
  font-weight: 600;
}
.guide-modal-chip:empty {
  display: none;
}

.guide-modal-desc {
  font-size: 15px;
  color: #475569;
  margin-bottom: 16px;
  line-height: 1.65;
}

.guide-modal-steps-title {
  font-size: 14px;
  color: var(--g-muted);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.guide-steps {
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}

.guide-steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 12px 12px 44px;
  margin-bottom: 8px;
  background: var(--g-bg);
  border-radius: 10px;
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
}
.guide-steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  background: var(--g-blue);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-modal-tips {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--g-green-soft);
  border-radius: 10px;
  font-size: 13px;
  color: #047857;
  line-height: 1.55;
}
.guide-modal-tips:empty {
  display: none;
}

/* ---------- 手机 / 小屏适配 ---------- */
@media (max-width: 640px) {
  .guide-hero {
    padding: 18px 14px 22px;
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .guide-hero-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .guide-brand {
    align-items: flex-start;
    gap: 12px;
  }

  .guide-logo {
    font-size: 32px;
  }

  .guide-brand h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  .guide-brand p {
    max-width: none;
    font-size: 13px;
    line-height: 1.5;
  }

  .guide-hero-actions {
    width: 100%;
    gap: 8px;
    flex-direction: column;
  }

  .guide-link-btn {
    width: 100%;
    text-align: center;
    padding: 11px 16px;
  }

  .guide-badge {
    width: 100%;
    text-align: center;
  }

  .guide-tabs {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    gap: 6px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .guide-tab {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
  }

  .guide-main {
    padding: 14px 12px 28px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .card {
    padding: 16px 14px;
    margin-bottom: 14px;
    border-radius: 14px;
  }

  .guide-intro h2 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  /* 流程条：小屏改为纵向，避免箭头换行错乱 */
  .guide-flow {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 12px;
  }

  .flow-arrow {
    display: none;
  }

  .flow-item {
    white-space: normal;
    justify-content: flex-start;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 4px;
    font-size: 13px;
  }

  .flow-item:last-child {
    margin-bottom: 0;
  }

  .guide-quick {
    padding-left: 18px;
    font-size: 14px;
  }

  .guide-quick li {
    margin-bottom: 10px;
    padding-right: 4px;
  }

  .guide-note {
    font-size: 12px;
    padding: 10px 12px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .guide-card {
    padding: 14px;
    border-radius: 12px;
  }

  .guide-card:hover {
    transform: none;
  }

  .guide-card-top {
    gap: 10px;
  }

  .guide-card-icon {
    font-size: 24px;
  }

  .guide-card-title {
    font-size: 15px;
  }

  .guide-card-desc {
    font-size: 13px;
  }

  .guide-foot {
    padding: 24px 12px 32px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    font-size: 12px;
  }

  .guide-modal-box {
    max-height: 92vh;
    padding: 20px 14px 28px;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .guide-modal-head {
    gap: 10px;
    padding-right: 32px;
  }

  .guide-modal-icon {
    font-size: 30px;
  }

  .guide-modal-head h3 {
    font-size: 17px;
  }

  .guide-modal-entry {
    font-size: 12px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .guide-modal-desc {
    font-size: 14px;
  }

  .guide-steps li {
    font-size: 13px;
    padding: 10px 10px 10px 40px;
  }

  .guide-steps li::before {
    left: 10px;
    top: 10px;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .guide-tab {
    font-size: 13px;
    padding: 9px 6px;
  }

  .guide-brand h1 {
    font-size: 18px;
  }
}
