/* 一线反馈的样式。
   看起来像一本摊开的值班记录：暖纸色、墨色字、一枚红印章。
   手机优先，输入框至少 16px，避免苹果手机一点击就放大页面。 */

:root {
  --paper: #efe6d6;
  --card: #fbf7ef;
  --ink: #1c1915;
  --ink-soft: #5e564c;
  --line: #d9cdb8;
  --stamp: #b6402a;
  --stamp-deep: #8c2e1c;
  --pine: #21584a;
  --pine-soft: #e5f0eb;
  --shadow: 0 18px 40px rgba(70, 48, 24, 0.08);
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --display: "ZCOOL XiaoWei", "Songti SC", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(900px 420px at 0% -10%, #f6e4cc 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, #e7dccb 0%, transparent 50%),
    var(--paper);
}

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: multiply;
  z-index: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: white;
  padding: 8px 12px;
  z-index: 5;
}

.skip:focus { left: 8px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

h1 { font-size: 32px; }
h2 { font-size: 22px; }

p { margin: 0; }

a { color: var(--pine); }

button, input, textarea, select { font: inherit; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(880px, calc(100% - 32px));
  margin: 0 auto 48px;
}

.wrap.narrow { width: min(640px, calc(100% - 32px)); }

.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 20px; }

.topbar, .login-screen, .fill-body { position: relative; z-index: 1; }

.topbar {
  position: relative;
  z-index: 1;
  padding-top: 16px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.mainnav.wrap {
  margin-bottom: 8px;
}

.brand {
  font-family: var(--display);
  font-size: 32px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.mainnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 8px;
}

.mainnav a, .subnav a, .chip {
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  min-height: 44px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.mainnav a.on, .subnav a.on, .chip.on {
  background: var(--ink);
  color: var(--card);
  border-color: var(--ink);
}

.subnav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

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

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login-card { width: min(440px, 100%); }

.seal {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 3px solid var(--stamp);
  color: var(--stamp);
  border-radius: 12px;
  transform: rotate(-8deg);
  font-family: var(--display);
  font-size: 32px;
  box-shadow: inset 0 0 0 1px rgba(182, 64, 42, 0.4);
  background: rgba(182, 64, 42, 0.05);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--stamp);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.muted { color: var(--ink-soft); font-size: 14px; }
.lead { margin-top: 8px; white-space: pre-wrap; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.spread { justify-content: space-between; }
.split { display: grid; gap: 12px; }

@media (min-width: 640px) {
  .split { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 14px; font-weight: 700; }

input[type="text"], input[type="password"], input:not([type]), textarea, select {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
  font-size: 16px;
}

textarea { min-height: 96px; resize: vertical; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
}

.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }

.btn {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: #fbf7ef;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.btn.stamp { background: var(--stamp); color: #fffaf6; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--stamp-deep); border: 1px solid #e4b2a6; }
.btn.tiny { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; transform: none; }

.text-link { color: var(--ink); font-weight: 700; text-decoration: none; }
.quiet { color: inherit; text-decoration: none; }

.badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  background: #efe6d6;
}

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

.flash, .banner {
  border-radius: 12px;
  padding: 10px 12px;
}

.flash-ok { background: var(--pine-soft); color: var(--pine); }
.flash-err, .field-error { background: #f8e4de; color: var(--stamp-deep); }
.field-error { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.banner { background: #f3e2c2; border: 1px solid #e0c48a; }

.steps { margin: 0; padding-left: 1.2em; }
.steps li + li { margin-top: 6px; }

/* 二维码列表：每张卡片左右排开（左码右名） */
.qr-board { display: grid; gap: 12px; }

.card.qr-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.qr-meta {
  min-width: 0;
}

.qr-meta h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.3;
  word-break: break-word;
}

@media (min-width: 720px) {
  .qr-board { grid-template-columns: 1fr 1fr; }
}

.qr {
  display: block;
  width: 140px;
  height: 140px;
  background: white;
  border-radius: 12px;
  object-fit: contain;
}

.qr-off {
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
}

.url {
  word-break: break-all;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  font-size: 14px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
}

.answers { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.answers li { display: grid; gap: 2px; }

.big-num {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 0.9;
  margin: 0;
}

.big-num small { font-size: 18px; color: var(--ink-soft); margin-left: 6px; }

.bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.bar-track { height: 8px; background: #efe6d6; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--stamp); border-radius: 99px; }

.quote {
  margin: 0;
  border-left: 3px solid var(--stamp);
  padding: 2px 0 2px 12px;
  display: grid;
  gap: 4px;
}

.fill-head { display: flex; gap: 14px; align-items: flex-start; padding-top: 28px; }
.fill-body { padding-bottom: 120px; }

fieldset.card {
  margin: 0;
  min-inline-size: 0;
}
legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 8px;
}
fieldset.card::after {
  content: "";
  display: block;
  clear: both;
}

.q-title { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.q-no { color: var(--stamp); margin-right: 6px; }

.choice-list { display: grid; gap: 8px; }

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-height: 48px;
}

.choice input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.choice:has(input:checked) { border-color: var(--ink); background: #f4efe4; }

.score-row { display: flex; flex-wrap: wrap; gap: 8px; }
.score-pip { position: relative; }
.score-pip input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.score-pip span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}
.score-pip input:checked + span { background: var(--stamp); color: white; border-color: var(--stamp); }
.score-pip input:focus-visible + span { outline: 2px solid var(--stamp); outline-offset: 2px; }
.score-labels { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 13px; }

.submit-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-top: 1px solid var(--line);
}

.submit-bar .btn { width: min(640px, 100%); }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }

::selection { background: #f0c7bc; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
  .card { animation: none; }
}
