/* ================================================================
   同学意见直通车 · 视觉系统 v2（2026-11）
   概念：回执。「意见投进去，会拿到一张带编号的回执」——
   票根撕线、等宽编号、铜线内框，都从这张回执来。
   墨蓝主色 + 青瓷底色 + 铜线点缀 + 朱砂专用（警示/必填）。
   不依赖外部字体与 CDN，内网可用。
   ================================================================ */

:root {
  --ink: #131c26;
  --ink-soft: #46525f;
  --ink-faint: #78838f;

  --navy: #0e2439;
  --navy-deep: #0a1b2c;
  --navy-light: #1d4664;

  --paper: #edf1f0;
  --paper-2: #f7f9f8;
  --card: #ffffff;

  --line: #d5dedb;
  --line-soft: #e5ecea;

  --scarlet: #a93b32;
  --scarlet-soft: #f7e7e4;

  --gold: #b08a4a;
  --gold-soft: #f7efe0;

  --green: #2c6b52;
  --green-soft: #e6f0ea;
  --blue-soft: #e4edf3;
  --gray-soft: #eaeef0;

  --radius: 6px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(19, 28, 38, 0.05);
  --shadow: 0 1px 0 rgba(19, 28, 38, 0.04), 0 14px 34px -22px rgba(19, 28, 38, 0.35);

  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(29, 70, 100, 0.07), transparent 45%),
    radial-gradient(circle at 85% 12%, rgba(176, 138, 74, 0.08), transparent 40%),
    repeating-linear-gradient(0deg, rgba(19, 28, 38, 0.018) 0 1px, transparent 1px 4px);
  background-attachment: fixed;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 30px 22px 64px;
  flex: 1 0 auto;
}

.wrap.narrow {
  max-width: 760px;
}

a {
  color: var(--navy-light);
  text-decoration: none;
}

a:hover {
  color: var(--scarlet);
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--ink-faint);
}

.small {
  font-size: 12.5px;
  line-height: 1.6;
}

.req {
  color: var(--scarlet);
  font-style: normal;
}

h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(168deg, #16324c 0%, #0e2439 58%, #0a1b2c 100%);
  border-bottom: 1px solid rgba(176, 138, 74, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 8px 20px -18px #000;
}

.topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.seal {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: #fff6eb;
  background: radial-gradient(circle at 32% 26%, #bd4a3d, #92291f 78%);
  border-radius: 5px;
  box-shadow:
    0 0 0 1px rgba(255, 244, 230, 0.55) inset,
    0 0 0 3px rgba(176, 138, 74, 0.35),
    0 6px 14px -8px rgba(0, 0, 0, 0.8);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fdfaf4;
  line-height: 1.3;
}

.brand p {
  margin: 3px 0 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(253, 250, 244, 0.62);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.topnav a {
  position: relative;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  color: rgba(253, 250, 244, 0.72);
  transition: color 0.18s, background 0.18s;
}

.topnav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.topnav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(176, 138, 74, 0.5) inset;
}

/* ---------------------------------------------------------------- 主视觉 */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr);
  gap: 34px;
  align-items: center;
  padding: 14px 0 34px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 30px;
}

.hero-copy h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--navy-deep);
}

.hero-copy h2 span {
  display: block;
}

.hero-copy p {
  margin: 16px 0 0;
  max-width: 46em;
  font-size: 15.5px;
  color: var(--ink-soft);
}

.hero-copy p b {
  color: var(--navy);
  font-weight: 600;
}

/* 四步流程：确实是顺序，所以用编号 + 连接线 */

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.flow span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.flow i {
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--navy);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line) inset, 0 0 0 3px var(--paper-2);
}

.flow em {
  display: inline-block;
  width: 26px;
  height: 1px;
  margin: 0 8px;
  font-style: normal;
  background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px);
}

/* 回执样例：整站的记忆点 */

.hero-ticket {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow);
  transform: rotate(-1.1deg);
}

.hero-ticket::before,
.hero-ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  transform: translateY(-50%);
}

.hero-ticket::before {
  left: -9px;
  box-shadow: 1px 0 0 var(--line-soft) inset;
}

.hero-ticket::after {
  right: -9px;
  box-shadow: -1px 0 0 var(--line-soft) inset;
}

.tk-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.tk-head b {
  font-weight: 500;
  color: var(--navy);
}

.tk-title {
  margin: 12px 0 10px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.45;
  color: var(--navy-deep);
}

.tk-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-faint);
}

.tk-tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--gold-soft);
  color: #7a5c21;
}

.tk-tag.done {
  background: var(--green-soft);
  color: var(--green);
}

.tk-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------- 卡片 */

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fff, #fbfcfb);
}

.card-head h3 {
  font-size: 18px;
  color: var(--navy-deep);
}

.card-head h4 {
  font-size: 15.5px;
  color: var(--navy-deep);
  letter-spacing: 0.01em;
}

.card-head .hint {
  font-size: 12.5px;
  color: var(--ink-faint);
}

.card-body {
  padding: 22px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card .card-head {
  padding: 14px 18px;
}

.side-card .card-body {
  padding: 16px 18px;
}

/* ---------------------------------------------------------------- 表单 */

.field {
  margin-bottom: 22px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label,
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-deep);
}

.field-note {
  display: inline;
  margin-left: 8px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-faint);
  line-height: 1.6;
}

.field-label .field-note {
  margin-left: 6px;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="email"],
input[type="tel"],
select {
  height: 46px;
}

textarea {
  min-height: 148px;
  line-height: 1.78;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a3adb8;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(29, 70, 100, 0.13);
  background: #fff;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%),
    linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.counter {
  margin-top: 6px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.counter.over {
  color: var(--scarlet);
}

/* 类别选择 */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  margin: 0;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.16s;
  user-select: none;
}

.chip span:hover {
  border-color: var(--navy-light);
  color: var(--navy);
}

.chip input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(29, 70, 100, 0.1);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* 匿名开关 */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.switch-row .txt strong {
  display: block;
  font-size: 14px;
  color: var(--navy-deep);
}

.switch-row .txt span {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}

.switch input {
  appearance: none;
  position: relative;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: #c9d3cf;
  box-shadow: 0 1px 2px rgba(19, 28, 38, 0.18) inset;
  cursor: pointer;
  transition: background 0.2s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(19, 28, 38, 0.3);
  transition: transform 0.2s;
}

.switch input:checked {
  background: var(--navy-light);
}

.switch input:checked::after {
  transform: translateX(20px);
}

.switch input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.realname {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.realname .field-label {
  margin-bottom: 6px;
}

/* 注意事项折叠 */

.notice-inline {
  margin: 20px 0 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.notice-inline summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
}

.notice-inline summary::-webkit-details-marker {
  display: none;
}

.notice-inline summary::after {
  content: "展开";
  font-size: 12px;
  color: var(--ink-faint);
}

.notice-inline[open] summary::after {
  content: "收起";
}

.notice-inline .inner {
  padding: 0 14px 14px;
  font-size: 12.5px;
  line-height: 2;
  color: var(--ink-soft);
}

/* 同意勾选 */

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}

.checkline input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--navy-light);
  cursor: pointer;
}

/* 按钮 */

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.actions .small {
  font-size: 12px;
  color: var(--ink-faint);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, #24506f, #16334c);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 18px -12px rgba(14, 36, 57, 0.9);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.18s, background 0.18s, color 0.18s;
  text-decoration: none;
}

.btn:hover {
  color: #fff;
  background: linear-gradient(180deg, #2a5b7d, #1a3b58);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px -4px rgba(14, 36, 57, 0.7) inset;
}


#formCard .actions .btn,
.actions.primary .btn {
  min-width: 168px;
}
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn.ghost {
  color: var(--navy);
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn.ghost:hover {
  color: var(--navy-deep);
  border-color: var(--navy-light);
  background: #fff;
}

.btn.danger {
  color: var(--scarlet);
  background: #fff;
  border-color: #e9ceca;
  box-shadow: var(--shadow-sm);
}

.btn.danger:hover {
  color: #fff;
  background: var(--scarlet);
  border-color: var(--scarlet);
}

.btn.small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
}

.form-error {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid #eccfca;
  background: var(--scarlet-soft);
  font-size: 13px;
  color: #8a2a22;
  line-height: 1.6;
}

.form-error.show {
  display: block;
}

/* ---------------------------------------------------------------- 侧栏列表 */

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding-left: 18px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-soft);
}

.plain-list li:last-child {
  margin-bottom: 0;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--gold);
}

/* ---------------------------------------------------------------- 提交结果（存根） */

.result {
  padding: 30px 26px 28px;
  text-align: center;
  position: relative;
}

.tick {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 24px;
  color: #fff;
  background: radial-gradient(circle at 32% 28%, #3d7d61, #245840 80%);
  box-shadow: 0 0 0 4px var(--green-soft), 0 8px 18px -10px rgba(44, 107, 82, 0.8);
  animation: stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-14deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.result h3 {
  font-size: 22px;
  color: var(--navy-deep);
}

.result .lead {
  margin: 10px auto 0;
  max-width: 34em;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.code-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 4px;
  padding: 14px 16px 14px 22px;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  background: var(--gold-soft);
}

.code-box code {
  font-family: var(--font-mono);
  font-size: 26px;
  letter-spacing: 0.16em;
  color: #6d4f16;
  font-weight: 600;
}

.warn {
  margin: 14px auto 0;
  max-width: 32em;
  font-size: 12.5px;
  color: var(--scarlet);
}

.result .meta {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------- 详情通用 */

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  margin: 0;
  font-size: 13.5px;
}

.kv dt {
  color: var(--ink-faint);
  white-space: nowrap;
}

.kv dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}

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

.content-block {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  font-size: 14.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reply-item {
  padding: 13px 15px;
  border-radius: var(--radius);
  border-left: 3px solid var(--navy-light);
  background: #f5f8fa;
}

.reply-item .who {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.reply-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.timeline {
  margin: 0;
  padding: 0 0 0 4px;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 16px 22px;
  font-size: 13px;
  color: var(--ink-soft);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--line) inset;
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  bottom: 0;
  width: 1px;
  background: var(--line-soft);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li:last-child::after {
  display: none;
}

.timeline li.done::before {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green-soft) inset;
}

.timeline li.now::before {
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft) inset;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px var(--gold-soft) inset, 0 0 0 0 rgba(176, 138, 74, 0.45);
  }
  60% {
    box-shadow: 0 0 0 2px var(--gold-soft) inset, 0 0 0 7px rgba(176, 138, 74, 0);
  }
}

.timeline .t {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
}

.timeline .d {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  margin-top: 2px;
}

.timeline .c {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- 页脚 */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(168deg, #10283f, #0a1b2c);
  color: rgba(253, 250, 244, 0.55);
  font-size: 12px;
  line-height: 1.8;
  padding: 22px;
  text-align: center;
}

.footer strong {
  color: rgba(253, 250, 244, 0.82);
  font-weight: 600;
}

/* ---------------------------------------------------------------- 底部标签栏（手机） */

.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px) saturate(1.4);
  border-top: 1px solid var(--line-soft);
  box-shadow: 0 -10px 24px -20px rgba(19, 28, 38, 0.5);
}

.tabbar a {
  position: relative;
  float: left;
  width: 33.3333%;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  color: var(--ink-faint);
}

.tabbar a svg {
  width: 21px;
  height: 21px;
}

.tabbar a.active {
  color: var(--scarlet);
  font-weight: 600;
}

.tabbar a.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--scarlet);
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------- 弹层 */

.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 40px 18px;
  background: rgba(10, 27, 44, 0.52);
  backdrop-filter: blur(3px);
  overflow-y: auto;
}

.modal-mask.show {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: sheetIn 0.22s ease-out both;
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
}

.modal header h3 {
  font-size: 17px;
  color: var(--navy-deep);
}

.modal header .sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-faint);
}

.modal .close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.16s;
}

.modal .close:hover {
  color: #fff;
  background: var(--scarlet);
  border-color: var(--scarlet);
}

.modal .body {
  padding: 20px 22px;
}

.modal footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-2);
}

.modal footer .btn {
  min-height: 40px;
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- 后台 */

.admin-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.admin-bar h2 {
  font-size: 24px;
  color: var(--navy-deep);
}

.admin-bar .who {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.admin-bar .actions {
  margin: 0;
  gap: 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat {
  padding: 15px 16px 14px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat .k {
  font-size: 12.5px;
  color: var(--ink-faint);
}

.stat .v {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
}

.stat .v small {
  margin-left: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0;
}

.stat.alert {
  border-color: #e8cbc6;
  background: linear-gradient(180deg, #fff, #fdf6f5);
}

.stat.alert .v {
  color: var(--scarlet);
}

.trend {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 108px;
}

.trend .bar {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.trend .bar-fill {
  width: 100%;
  max-width: 42px;
  min-height: 4px;
  margin-top: auto;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #2a5b7d, #16334c);
  transition: height 0.3s;
}

.trend .bar.today .bar-fill {
  background: linear-gradient(180deg, #c99a4e, #a97f39);
}

.trend .bar-v {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1;
}

.trend .bar-d {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  line-height: 1;
}

.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
}

.filters select,
.filters input[type="search"] {
  width: auto;
  min-width: 130px;
  height: 40px;
  font-size: 13.5px;
  padding: 8px 12px;
  background-color: #fff;
}

.filters input[type="search"] {
  flex: 1 1 220px;
  min-width: 180px;
}

.filters .spacer {
  flex: 1 1 auto;
}

.filters .small {
  font-size: 12px;
}

.item-list {
  display: flex;
  flex-direction: column;
}

.item-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 15px 20px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.item-card:last-child {
  border-bottom: 0;
}

.item-card:hover {
  background: var(--paper-2);
}

.item-card:active {
  background: #f1f5f4;
}

.item-card .row1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.item-card .row1 .sp {
  flex: 1 1 auto;
}

.item-card h4 {
  margin: 7px 0 4px;
  font-size: 15.5px;
  color: var(--navy-deep);
  letter-spacing: 0;
}

.item-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-card .row2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-faint);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge.gray {
  background: var(--gray-soft);
  color: #4d5866;
}

.badge.blue {
  background: var(--blue-soft);
  color: #215c85;
}

.badge.green {
  background: var(--green-soft);
  color: var(--green);
}

.badge.gold {
  background: var(--gold-soft);
  color: #7a5c21;
}

.badge.red {
  background: var(--scarlet-soft);
  color: var(--scarlet);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-2);
  font-size: 12.5px;
  color: var(--ink-faint);
}

.pager .btns {
  display: flex;
  gap: 8px;
}

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--ink-faint);
}

.empty .big {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

/* 登录 */

.login-wrap {
  margin-top: 28px;
}

.login-wrap .card-head {
  justify-content: center;
  background: linear-gradient(180deg, #fff, var(--paper-2));
}

.login-wrap .card-head h3 {
  font-size: 19px;
  letter-spacing: 0.04em;
}

.login-wrap .card-body {
  padding: 24px 26px 26px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.footnote {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------------------------------------------------------------- 提示 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 120;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(14, 36, 57, 0.95);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- 动效 */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.hero-copy > * {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.hero-copy > *:nth-child(2) {
  animation-delay: 0.08s;
}

.hero-copy > *:nth-child(3) {
  animation-delay: 0.16s;
}

.hero-ticket {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.1s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ================================================================
   响应式：≤980px 收窄两栏，≤760px 转手机版式
   ================================================================ */

@media (max-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 18px;
  }

  .card-body {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  :root {
    --tabbar-h: 56px;
  }

  body {
    font-size: 15px;
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
    -webkit-tap-highlight-color: transparent;
  }

  .wrap {
    padding: 16px 14px 40px;
    flex: 0 0 auto;
  }

  .topbar-inner {
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    gap: 10px;
  }

  .seal {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .brand h1 {
    font-size: 16.5px;
  }

  .brand p {
    font-size: 11px;
  }

  .topnav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 6px 0 22px;
    margin-bottom: 20px;
  }

  .hero-copy h2 {
    font-size: 27px;
  }

  .hero-copy p {
    margin-top: 12px;
    font-size: 14.5px;
  }

  .flow {
    margin-top: 16px;
    gap: 8px 0;
  }

  .flow span {
    font-size: 12px;
  }

  .flow i {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .flow em {
    width: 14px;
    margin: 0 5px;
  }

  .hero-ticket {
    transform: none;
  }

  .card-head {
    padding: 13px 16px;
  }

  .card-head h3 {
    font-size: 16.5px;
  }

  .card-head h4 {
    font-size: 14.5px;
  }

  .card-head .hint {
    font-size: 11.5px;
  }

  .card-body {
    padding: 16px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .field {
    margin-bottom: 18px;
  }

  .field > label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .field > label,
  .field-label {
    display: block;
  }

  .field-note {
    display: block;
    margin: 3px 0 0;
    font-size: 12px;
  }

  .field-label .field-note {
    display: inline;
    margin-left: 6px;
  }

  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px;
  }

  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="email"],
  input[type="tel"] {
    min-height: 46px;
  }

  select {
    height: 46px;
  }

  .chip span {
    padding: 8px 13px;
    font-size: 13px;
  }

  .switch-row {
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 12px 14px;
  }

  .switch-row .txt {
    min-width: 0;
    flex: 1 1 auto;
  }

  .switch-row .txt span {
    font-size: 12px;
  }

  .switch {
    flex: 0 0 auto;
  }

  .realname {
    grid-template-columns: 1fr;
  }

  .actions {
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .actions .btn {
    width: 100%;
    min-height: 48px;
    flex: 0 0 auto;
  }

  .actions .small {
    text-align: center;
  }

  .btn.small {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .result {
    padding: 24px 16px;
  }

  .result h3 {
    font-size: 19px;
  }

  .code-box {
    padding: 12px 12px 12px 16px;
  }

  .code-box code {
    font-size: 21px;
    letter-spacing: 0.12em;
  }

  .kv {
    grid-template-columns: 84px 1fr;
    gap: 8px 12px;
  }

  /* 底部标签栏：几项就各占几分之一 */
  .tabbar {
    display: flex;
  }

  .tabbar a {
    float: none;
    width: auto;
    flex: 1 1 0;
  }

  /* 后台 */
  .admin-bar {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  .admin-bar h2 {
    font-size: 20px;
  }

  .admin-bar .actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-bar .actions .btn {
    width: 100%;
    min-height: 38px;
    font-size: 13px;
    padding: 0 8px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat {
    padding: 12px 13px;
  }

  .stat .v {
    font-size: 24px;
  }

  .trend {
    gap: 6px;
    height: 96px;
  }

  .trend .bar-fill {
    max-width: 100%;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 14px;
  }

  .filters select,
  .filters input[type="search"] {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    height: 44px;
    font-size: 15px;
  }

  .filters .spacer {
    display: none;
  }

  .item-card {
    padding: 13px 15px;
  }

  .item-card h4 {
    font-size: 15px;
  }

  .pager {
    padding: 12px 14px;
  }

  .pager .btns .btn {
    min-height: 40px;
  }

  /* 弹层 → 底部抽屉 */
  .modal-mask {
    z-index: 90;
    padding: 0;
    align-items: flex-end;
    overflow: hidden;
  }

  .modal-mask.show {
    align-items: flex-end;
  }

  .modal {
    display: flex;
    flex-direction: column;
    max-width: none;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: sheetUp 0.26s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }

  .modal header {
    padding: 15px 16px;
  }

  .modal .body {
    padding: 16px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
  }

  .modal footer {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
    flex: 0 0 auto;
  }

  .modal footer .btn {
    flex: 1 1 46%;
    min-height: 44px;
  }

  .toast {
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  }

  body.sheet-open {
    overflow: hidden;
  }

  body.sheet-open .tabbar {
    display: none;
  }

  @keyframes sheetUp {
    from {
      opacity: 0.6;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .hide-sm {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .hero-copy h2 {
    font-size: 24px;
  }

  .flow em {
    display: none;
  }

  .flow {
    gap: 8px;
  }
}

/* 蜜罐字段：视觉上移出屏幕，读屏器与 Tab 键都会跳过 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
