/* ============================================================
   IP 定位平台 · 基础样式
   视觉沿用「大运之舟 · 课堂作品台」：宣纸白底 / 靛青主色 / 朱砂点缀 / 鎏金线
   两份页面共用顶栏、按钮、表单、卡片与提示
   ============================================================ */

:root {
  --bg: #f4f2ec;
  --bg-2: #faf8f1;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --surface-3: #e2ece9;

  --line: #c4d4ce;
  --line-strong: #93b5ac;

  --ink: #173c40;
  --text: #1d3b3e;
  --muted: #4f6a68;
  --muted-2: #607a77;

  --teal: #1b6a6d;
  --teal-deep: #125356;
  --teal-soft: #e3f0ed;

  --accent: #c2543a;
  --accent-soft: #fbece7;
  --gold: #b08a45;
  --gold-light: #d9bc7e;
  --gold-deep: #8c692d;

  --green: #2f8b62;
  --red: #c2543a;

  --frame: #e6f0ec;
  --frame-line: #cfe0d9;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(23, 60, 64, 0.10);
  --shadow-lg: 0 18px 46px rgba(23, 60, 64, 0.16);

  --fs-md: 16px;
  --fs-lg: 18px;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 6% -12%, rgba(176, 138, 69, 0.13), transparent 66%),
    radial-gradient(880px 460px at 96% 0%, rgba(27, 106, 109, 0.07), transparent 68%),
    linear-gradient(180deg, #faf8f1 0%, #f5f0e4 52%, #efe9da 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* 底部运河水波暗纹 */
body::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  z-index: 0;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='60' viewBox='0 0 300 60'%3E%3Cpath d='M0 30 Q37.5 6 75 30 T150 30 T225 30 T300 30' fill='none' stroke='%231b6a6d' stroke-opacity='0.13' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x left 0 bottom 52px / 300px 48px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='60' viewBox='0 0 300 60'%3E%3Cpath d='M0 30 Q37.5 54 75 30 T150 30 T225 30 T300 30' fill='none' stroke='%23b08a45' stroke-opacity='0.11' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x left 14px bottom 10px / 300px 48px;
}

img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px clamp(16px, 3vw, 40px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 5px 14px rgba(27, 106, 109, 0.22);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.22; }
.brand-text b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--ink);
}
.brand-text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted-2);
}

.site-nav { display: flex; align-items: center; gap: 2px; margin-left: 4px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--muted);
  transition: color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--teal); background: var(--teal-soft); }
.nav-link.active { color: #ffffff; background: var(--teal); font-weight: 500; }

.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.group-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  line-height: 1.4;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

.btn.primary {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(27, 106, 109, 0.18);
}
.btn.primary:hover:not(:disabled) { background: var(--teal-deep); }

.btn.ghost {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--teal-deep);
}
.btn.ghost:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); }

.btn.small { padding: 7px 14px; font-size: 12.5px; }
.btn.block { width: 100%; }

/* ---------- 页面骨架 ---------- */

.page {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 96px;
}

.page-head { margin-bottom: 24px; }
.page-head h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--ink);
}
.page-head p { margin: 0; max-width: 48em; font-size: 14px; line-height: 1.9; color: var(--muted); }

.eyebrow {
  margin: 0 0 10px;
  font-size: 10.5px;
  letter-spacing: 4px;
  color: var(--teal);
  text-transform: uppercase;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 朱砂方印：大运之舟的标题记号 */
.seal {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 3px;
  border-radius: 9px;
  background: linear-gradient(135deg, #c2543a, #a3412a);
  box-shadow: inset 0 0 0 2px rgba(253, 243, 227, 0.55), 0 4px 12px rgba(194, 84, 58, 0.3);
  transform: rotate(3deg);
}
.seal b {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(253, 243, 227, 0.5);
  border-radius: 5px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: 1px;
  color: #fdf3e3;
  text-align: center;
}

/* 鎏金装饰线 */
.ornament { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.ornament::before {
  content: "";
  width: 190px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(176, 138, 69, 0.08));
}
.ornament i {
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 1px 3px rgba(140, 105, 45, 0.35);
  transform: rotate(45deg);
}
.ornament i:nth-child(2) { width: 9px; height: 9px; }

/* ---------- 表单 ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.field > label small { font-weight: 400; font-size: 11.5px; color: var(--muted-2); }
.field > label .count { margin-left: auto; font-size: 11px; color: var(--muted-2); letter-spacing: 0.5px; }

.input, .textarea, .select {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); opacity: 0.75; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 106, 109, 0.12);
}
.textarea { min-height: 100px; resize: vertical; line-height: 1.8; }
.select {
  appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* ---------- 提示 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 300;
  transform: translate(-50%, 16px);
  max-width: calc(100vw - 40px);
  padding: 11px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.5px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(23, 60, 64, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--accent-soft); border-color: rgba(194, 84, 58, 0.5); color: var(--red); }

/* ---------- 空态 ---------- */

.empty-note {
  padding: 40px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 13.5px;
  line-height: 1.9;
  letter-spacing: 0.5px;
  color: var(--muted);
}

/* ---------- 滚动条 ---------- */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(27, 106, 109, 0.22); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(27, 106, 109, 0.38); }

@media (max-width: 760px) {
  .page { width: calc(100% - 26px); padding-top: 20px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .brand-text em { display: none; }
  .site-nav { order: 3; width: 100%; margin-left: 0; }
  .nav-link { padding: 7px 11px; font-size: 12px; }
}
