/* ============================================================
   海沧区第十一届教育数字化校长研讨活动 · 设计基础
   明亮 / 海蓝 / 纸感 —— 手机与大屏共用一套 token
   ============================================================ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}

:root {
  /* 纸与墨 */
  --bg-0: #F2F6FA;
  --bg-1: #FFFFFF;
  --bg-2: #EAF1F7;
  --ink: #0B1B2B;
  --ink-2: #46596B;
  --ink-3: #8697A6;
  --ink-4: #B6C3CE;

  /* 海蓝 / 潮青 / 珊瑚 */
  --brand: #0B63CE;
  --brand-2: #0A8FD9;
  --brand-soft: #E7F0FC;
  --teal: #0AA39B;
  --teal-soft: #E2F5F3;
  --coral: #FF6A48;
  --coral-soft: #FFEDE7;
  --gold: #E8A020;

  --line: rgba(11, 27, 43, .085);
  --line-2: rgba(11, 27, 43, .16);

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 26px;
  --radius-pill: 999px;

  --shadow-s: 0 2px 8px rgba(11, 27, 43, .05);
  --shadow-m: 0 10px 28px -14px rgba(11, 27, 43, .28);
  --shadow-l: 0 26px 60px -28px rgba(11, 27, 43, .38);

  --ease: cubic-bezier(.22, .78, .28, 1);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-num: "Space Grotesk", "Bahnschrift", "DIN Alternate", ui-monospace, monospace;

  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--brand); color: #fff; }

/* ---------- 数字与英文 ---------- */
.num, .mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.eyebrow {
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- 版心 ---------- */
.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 18px;
}

.section { padding: 34px 0 6px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .01em;
}
.section-head .more {
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 600;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
}

.card-lift {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card-lift:active { transform: scale(.985); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .2s var(--ease), filter .2s var(--ease), box-shadow .2s var(--ease);
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(11, 99, 206, .8);
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line-2);
}
.btn-soft {
  background: var(--brand-soft);
  color: var(--brand);
}
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 标签 / 胶囊 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(10, 163, 155, .16);
}
.pill-live { background: var(--coral-soft); color: var(--coral); }
.pill-live::before {
  background: var(--coral);
  animation: blink 1.6s infinite;
}
.pill-a { background: #E7F0FC; color: #0B63CE; }
.pill-b { background: #E2F5F3; color: #06867F; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

/* ---------- 输入 ---------- */
.field {
  width: 100%;
  padding: 13px 15px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.field:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 99, 206, .1);
}
textarea.field { resize: vertical; min-height: 108px; line-height: 1.7; }
.field::placeholder { color: var(--ink-4); }

.label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 16px 0 7px;
}

/* ---------- 通用 ---------- */
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.between { justify-content: space-between; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- 骨架屏 ---------- */
.skel {
  background: linear-gradient(100deg, #EEF3F8 30%, #F7FAFC 50%, #EEF3F8 70%);
  background-size: 220% 100%;
  animation: shine 1.4s infinite linear;
  border-radius: 8px;
  color: transparent !important;
}
@keyframes shine {
  from { background-position: 140% 0; }
  to { background-position: -40% 0; }
}

/* ---------- 吐司 ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 78vw;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  background: rgba(11, 27, 43, .92);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-m);
  animation: toastIn .32s var(--ease);
  backdrop-filter: blur(8px);
}
.toast.ok { background: rgba(6, 134, 127, .94); }
.toast.err { background: rgba(198, 46, 46, .94); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ---------- 弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0;
  background: rgba(11, 27, 43, .42);
  backdrop-filter: blur(3px);
  z-index: 8000;
  opacity: 0;
  animation: fadeIn .25s var(--ease) forwards;
}
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 8100;
  background: var(--bg-1);
  border-radius: 26px 26px 0 0;
  padding: 22px 20px calc(24px + var(--safe-b));
  box-shadow: var(--shadow-l);
  max-height: 86vh;
  overflow-y: auto;
  transform: translateY(100%);
  animation: sheetUp .38s var(--ease) forwards;
}
.sheet-grab {
  width: 38px; height: 4px;
  border-radius: 2px;
  background: var(--line-2);
  margin: -8px auto 14px;
}
@keyframes sheetUp { to { transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(11, 27, 43, .16); border-radius: 3px; }

/* ---------- 动画 ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .7s var(--ease) forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
