/* 第四期 AI 数智沙龙 · 手机签到 — 与大屏同一套蓝图配色 */
:root {
  --bg: #0f3a66;
  --panel: rgba(9, 37, 68, 0.86);
  --ink: #f2f6fa;
  --muted: #a9c1da;
  --faint: #7f9bbb;
  --line: rgba(255, 255, 255, 0.16);
  --acc: #f2c14e;
  --acc-ink: #10233d;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --num: "Bahnschrift", "DIN Alternate", "Segoe UI", "Roboto", sans-serif;
}

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

body {
  min-height: 100vh;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}

.wrap { max-width: 460px; margin: 0 auto; }

.hd { padding: 8px 4px 20px; }
.meta { display: flex; gap: 16px; font: 500 13px/1 var(--num); color: var(--acc); letter-spacing: 0.08em; }
.meta span + span { color: var(--muted); }
.hd h1 { margin-top: 12px; font-size: 28px; line-height: 1.25; font-weight: 600; }
.hd p { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(242, 193, 78, 0.55);
  font-size: 16px;
}
.count .n { color: var(--muted); font-size: 15px; }
.count b { font: 600 24px/1 var(--num); color: var(--acc); margin: 0 4px; font-variant-numeric: tabular-nums; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

label { display: block; font-size: 15px; color: var(--muted); margin: 4px 0 8px; }
label + .chips { margin-bottom: 4px; }

input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 17px;
  outline: none;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
input::placeholder { color: var(--faint); }
input:focus { border-color: var(--acc); background: rgba(255, 255, 255, 0.09); }

.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.chip:active { transform: scale(0.98); }
.chip.wide { grid-column: span 2; }
.chip.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); font-weight: 500; }

button {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: 8px;
  background: var(--acc);
  color: var(--acc-ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: opacity 0.15s var(--ease), transform 0.1s var(--ease);
}
button:active { transform: scale(0.99); }
button:disabled { opacity: 0.6; }
button:focus-visible, .chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button.ghost {
  height: 44px;
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.msg { min-height: 20px; margin-top: 12px; font-size: 14px; text-align: center; color: #f3a08c; }

#form.off { display: none; }
.done { display: none; text-align: center; padding: 32px 20px 20px; }
.done.on { display: block; animation: rise 0.4s var(--ease); }
.tick {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border: 2px solid var(--acc);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.tick svg { width: 32px; height: 32px; fill: none; stroke: var(--acc); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done h2 { font-size: 24px; font-weight: 600; }
.done .who { margin-top: 8px; font-size: 16px; color: var(--muted); }
.done .no { margin-top: 20px; font-size: 16px; color: var(--muted); }
.done .no b { font: 600 40px/1 var(--num); color: var(--acc); margin: 0 6px; font-variant-numeric: tabular-nums; }
.done .hint { margin-top: 12px; font-size: 14px; color: var(--faint); }


@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
