:root {
  --bg: #fdf0f3;
  --pink-100: #fde8ed;
  --pink-200: #f9d3dc;
  --pink-300: #f2b3c2;
  --primary: #b83b5e;
  --deep: #8e2a45;
  --text: #3a2a2e;
  --muted: #7a666c;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", SimSun, serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.page { max-width: 560px; min-height: 100vh; margin: 0 auto; background: var(--bg); display: flex; flex-direction: column; }
.page.has-bar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

.hero { background: linear-gradient(180deg, #fbd9e1 0%, #fdeaef 100%); text-align: center; overflow: hidden; }
.banner { display: block; width: 100%; height: auto; }
.hero-text { padding: 28px 16px 14px; }
.logo { display: block; max-width: 72px; max-height: 72px; margin: 0 auto 12px; }
.hero h1 {
  margin: 0; font: 700 clamp(18px, 5.3vw, 24px)/1.5 var(--serif); color: var(--deep); letter-spacing: .5px;
}
.hero h1 span { display: block; }
.tags { display: flex; justify-content: center; gap: 8px; margin: 14px 0 0; }
.tags span {
  padding: 2px 10px; font-size: 12px; color: var(--deep);
  border: 1px solid var(--pink-300); border-radius: 3px; background: rgba(255, 255, 255, .6);
}
.skyline { display: block; width: 100%; height: 56px; fill: #f4bcc9; }

.content { flex: 1; padding: 14px 14px 8px; }
.status {
  display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 12px; padding: 14px;
  background: #fff; border: 1px solid var(--pink-200); border-top: 3px solid var(--primary); border-radius: 6px;
}
.status b { color: var(--deep); font-size: 17px; }
.status small { color: var(--muted); font-size: 13px; }
.status .countdown { color: var(--primary); font-size: 15px; font-variant-numeric: tabular-nums; }
.notice { margin-bottom: 12px; padding: 12px 14px; background: var(--pink-100); border-left: 3px solid var(--primary); border-radius: 0 6px 6px 0; }
.notice h2 { margin: 0 0 2px; font-size: 14px; color: var(--deep); }
.notice p { margin: 0; font-size: 14px; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0 0 8px; font: 700 16px var(--serif); color: var(--deep); }
.motion {
  margin-bottom: 12px; background: #fff; border: 1px solid var(--pink-200); border-radius: 6px; overflow: hidden;
  transition: border-color .2s;
}
.motion.missing { border-color: var(--primary); box-shadow: 0 0 0 2px var(--pink-200); }
.motion-title { display: flex; gap: 8px; margin: 0; padding: 12px 14px; font-size: 16px; font-weight: 600; line-height: 1.5; }
.motion-title em {
  flex: none; width: 22px; height: 22px; margin-top: 1px; font: 600 13px/22px sans-serif; text-align: center;
  color: #fff; background: var(--primary); border-radius: 3px;
}
.options { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--pink-200); }
.option { position: relative; cursor: pointer; }
.option + .option { border-left: 1px solid var(--pink-200); }
.option input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.box { display: flex; align-items: center; justify-content: center; gap: 6px; height: 50px; font-size: 16px; color: var(--text); }
.box i {
  width: 20px; height: 20px; font: 700 14px/18px sans-serif; text-align: center;
  color: transparent; border: 1px solid var(--pink-300); border-radius: 3px; background: #fff;
}
.option input:checked + .box { background: var(--pink-100); color: var(--deep); font-weight: 600; }
.option input:checked + .box i { color: #fff; background: var(--primary); border-color: var(--primary); }
.option input:focus-visible + .box { outline: 2px solid var(--primary); outline-offset: -2px; }
fieldset:disabled .motion { background: #fffafb; }
fieldset:disabled .option, fieldset:disabled .option input { cursor: not-allowed; }
fieldset:disabled .box { color: var(--muted); }

.done { margin-top: 8px; padding: 36px 20px; text-align: center; background: #fff; border: 1px solid var(--pink-200); border-radius: 6px; }
.tick { width: 64px; height: 64px; margin: 0 auto 14px; font: 700 34px/64px sans-serif; color: #fff; background: var(--primary); border-radius: 50%; }
.done h2 { margin: 0 0 6px; font: 700 20px var(--serif); color: var(--deep); }
.done p { margin: 0; font-size: 14px; color: var(--muted); }

.foot { padding: 14px 0 18px; text-align: center; }
.foot a { font-size: 12px; color: var(--muted); text-decoration: none; }

.bar {
  position: fixed; left: 50%; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 560px; transform: translateX(-50%);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--pink-200);
}
.progress { font-size: 14px; color: var(--muted); white-space: nowrap; }
.progress b { color: var(--primary); font-size: 18px; }
.btn {
  min-width: 132px; height: 46px; padding: 0 20px; font-family: inherit; font-size: 16px; font-weight: 600;
  color: #fff; background: var(--primary); border: 1px solid var(--primary); border-radius: 6px; cursor: pointer;
}
.btn:active { background: var(--deep); }
.btn:disabled { opacity: .6; }
.btn.ghost { color: var(--primary); background: #fff; }

.modal { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(58, 42, 46, .5); }
.dialog { width: 100%; max-width: 420px; max-height: 85vh; overflow: auto; padding: 18px; background: #fff; border-radius: 8px; }
.dialog h2 { margin: 0 0 10px; font: 700 18px var(--serif); color: var(--deep); text-align: center; }
.dialog ul { margin: 0; padding: 0; list-style: none; }
.dialog li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--pink-100); }
.dialog li b { flex: none; color: var(--primary); }
.warn { margin: 10px 0 14px; font-size: 13px; color: var(--muted); text-align: center; }
.dialog-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-btns .btn { min-width: 0; padding: 0; }

.toast {
  position: fixed; left: 50%; top: 40%; z-index: 20; max-width: 80%; transform: translateX(-50%);
  padding: 10px 16px; font-size: 14px; color: #fff; background: rgba(58, 42, 46, .9); border-radius: 6px;
}
