/* 扫码端公共样式：移动端优先，无外部字体/图标/框架，可离线使用。
   颜色为浅色主题；所有可点区域不小于 44px，输入框 >=16px 防 iOS 自动缩放。 */
:root {
  --brand: #1857d1;
  --brand-dark: #1246a8;
  --brand-soft: #eaf1ff;
  --text: #1b2330;
  --text-soft: #5b6575;
  --text-mute: #8992a1;
  --bg: #f2f5fa;
  --surface: #ffffff;
  --line: #e2e8f2;
  --danger: #c4392f;
  --danger-bg: #fdecea;
  --success: #16724a;
  --success-bg: #e7f6ed;
  --warn: #95610a;
  --warn-bg: #fff5df;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(24, 45, 88, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand); text-decoration: none; }
a:active { opacity: .7; }

.topbar { background: linear-gradient(135deg, var(--brand), #2b76e8); color: #fff; }
.topbar__inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
}
.topbar__brand { color: #fff; font-size: 17px; font-weight: 600; letter-spacing: .3px; }
.topbar__link { color: rgba(255, 255, 255, .92); font-size: 14px;
  border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 5px 12px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 14px 8px; }
.footer {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 18px calc(24px + env(safe-area-inset-bottom));
  color: var(--text-mute);
  font-size: 12px;
  text-align: center;
}
.footer__line, .footer__links { margin: 4px 0; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}
.card--muted { background: #f8fafd; box-shadow: none; border: 1px solid var(--line); }
.card__title { margin: 0 0 12px; font-size: 17px; font-weight: 600; }
.card__sub { margin: 0 0 12px; color: var(--text-soft); font-size: 14px; }
.para { margin: 0 0 10px; color: var(--text-soft); font-size: 14px; }
.para:last-child { margin-bottom: 0; }
.para--muted { color: var(--text-mute); font-size: 13px; }

/* 首页 */
.hero { padding-top: 24px; padding-bottom: 22px; }
.hero__title { margin: 0 0 8px; font-size: 22px; line-height: 1.35; }
.hero__text { margin: 0 0 18px; color: var(--text-soft); font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps__item { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0;
  font-size: 14px; color: var(--text-soft); }
.steps__num { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); font-size: 13px; font-weight: 700; text-align: center; line-height: 24px; }

/* 教室信息卡 */
.room-card { border-left: 4px solid var(--brand); }
.room-card__eyebrow { margin: 0 0 2px; color: var(--text-mute); font-size: 12px; letter-spacing: 1px; }
.room-card__name { margin: 0 0 4px; font-size: 21px; font-weight: 650; line-height: 1.35; }
.room-card__meta { margin: 0 0 8px; color: var(--text-soft); font-size: 14px; min-height: 22px; }
.room-card__code { margin: 0; color: var(--text-mute); font-size: 12px; }
.room-card__code span { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* 表单 */
.field { margin-bottom: 18px; }
.field--plain { border: 0; margin: 0 0 18px; padding: 0; }
.field__label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.field__hint { margin: 6px 0 0; color: var(--text-mute); font-size: 12px; line-height: 1.5; }
.field__optional { color: var(--text-mute); font-size: 12px; font-weight: 400; margin-left: 4px; }
.required { color: var(--danger); font-size: 12px; font-weight: 400; margin-left: 4px; }
.field__control {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field__control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(24, 87, 209, .12); }
.field__control--textarea { resize: vertical; min-height: 108px; line-height: 1.6; }
.field__control--mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .5px; }
.field__control::placeholder { color: #aab2c0; }

.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-chip { position: relative; display: inline-flex; align-items: center; }
.radio-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-chip__text {
  display: inline-block; min-height: 44px; line-height: 42px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 14px; color: var(--text-soft); cursor: pointer;
}
.radio-chip input:checked + .radio-chip__text {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600;
}
.radio-chip input:focus-visible + .radio-chip__text { box-shadow: 0 0 0 3px rgba(24, 87, 209, .18); }

.uploader { display: inline-block; cursor: pointer; }
.uploader__button {
  display: inline-block; min-height: 44px; line-height: 42px; padding: 0 18px;
  border: 1px dashed #a9bede; border-radius: 10px; background: #f8fbff;
  color: var(--brand); font-size: 14px;
}
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.thumbs:empty { display: none; }
.thumb { position: relative; margin: 0; }
.thumb__img { display: block; width: 100%; height: 88px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); background: #eef2f8; }
.thumb__remove {
  position: absolute; top: -7px; right: -7px; width: 26px; height: 26px;
  border: 0; border-radius: 50%; background: rgba(27, 35, 48, .78); color: #fff;
  font-size: 17px; line-height: 26px; text-align: center; cursor: pointer; padding: 0;
}
.thumb__name { display: block; margin-top: 3px; color: var(--text-mute); font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-align: center;
}
.btn--block { display: flex; width: 100%; margin-bottom: 10px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:active { background: var(--brand-dark); }
.btn--ghost { background: #fff; color: var(--brand); border-color: #b9cdf0; }
.btn--text { display: flex; width: 100%; background: transparent; color: var(--text-soft);
  font-size: 14px; font-weight: 400; min-height: 44px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.form-foot { margin: 4px 0 0; text-align: center; color: var(--text-mute); font-size: 12px; }

/* 提示条 */
.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px;
  line-height: 1.55; }
.notice--error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c6c1; }
.notice--warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0dcaa; }
.notice--success { background: var(--success-bg); color: var(--success); border: 1px solid #bfe5cf; }
.notice--info { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #cadbfa; }
.notice a { color: inherit; font-weight: 600; text-decoration: underline; }

/* 提交成功 */
.success { text-align: center; }
.success__mark { width: 46px; height: 46px; margin: 4px auto 12px; border-radius: 50%;
  background: var(--success-bg); position: relative; }
.success__mark::after { content: ""; position: absolute; left: 16px; top: 12px;
  width: 11px; height: 19px; border: solid var(--success); border-width: 0 3px 3px 0;
  transform: rotate(43deg); }
.success__title { margin: 0 0 6px; font-size: 20px; }
.success__text { margin: 0 0 14px; color: var(--text-soft); font-size: 14px; }
.success__no { margin: 0 0 18px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 21px; font-weight: 700; letter-spacing: 1px; color: var(--brand); word-break: break-all; }

/* 查询结果 */
.result__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result__head .card__title { margin-bottom: 0; }
.result__no { margin: 4px 0 14px; color: var(--text-mute); font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: #eef1f6; color: var(--text-soft); }
.badge--pending { background: var(--warn-bg); color: var(--warn); }
.badge--assigned, .badge--processing { background: var(--brand-soft); color: var(--brand); }
.badge--resolved { background: var(--success-bg); color: var(--success); }
.badge--closed { background: #eef1f6; color: var(--text-mute); }

.kv { margin: 0 0 4px; }
.kv__row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f3f8; }
.kv__row:last-child { border-bottom: 0; }
.kv__key { flex: 0 0 84px; margin: 0; color: var(--text-mute); font-size: 13px; }
.kv__val { flex: 1; margin: 0; font-size: 14px; word-break: break-word; }

.block { margin-top: 18px; }
.block__title { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.block__text { margin: 0; padding: 12px; border-radius: 10px; background: #f7f9fc;
  color: var(--text); font-size: 14px; white-space: pre-wrap; word-break: break-word; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline__item { position: relative; padding: 0 0 14px 8px; font-size: 14px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before { content: ""; position: absolute; left: -25px; top: 7px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.timeline__label { display: block; color: var(--text); }
.timeline__time { display: block; color: var(--text-mute); font-size: 12px; }

.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.img-grid a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.img-grid img { display: block; width: 100%; height: 88px; object-fit: cover; background: #eef2f8; }

/* 错误页 */
.error-card__code { margin: 0 0 4px; color: var(--text-mute); font-size: 13px; letter-spacing: 1px; }
.error-card__title { margin: 0 0 12px; font-size: 21px; }
.error-card__actions { margin-top: 18px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 600px) {
  .wrap { padding-top: 24px; }
  .card { padding: 22px; }
}
