/* 家长开放日 · 入校核验 —— 样式表
   配色：米黄纸感 + 深绿主色 + 金色点缀 */

:root {
  --paper: #fbf7ef;
  --paper-2: #f4ecdc;
  --ink: #1b2620;
  --ink-2: #61706a;
  --green: #14532d;
  --green-2: #1d7a44;
  --line: #e4dccb;
  --gold: #a8834f;
  --red: #b3261e;
  --shadow: 0 18px 40px -18px rgba(20, 40, 25, .28);
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.page-index {
  isolation: isolate;
}

.page-index::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0 26%, #ddecf7 0, transparent 48%),
    radial-gradient(ellipse at 100% 26%, #ddecf7 0, transparent 48%),
    radial-gradient(ellipse at 50% 100%, #f9dfbd 0, transparent 58%),
    linear-gradient(#fff5e7, #fbf8f0 45%, #f7f3e9);
}

.verification-card {
  position: relative;
  isolation: isolate;
  margin-top: 124px;
}

.page-index #f {
  position: relative;
  z-index: 1;
}

.card-mascot {
  position: absolute;
  bottom: calc(100% - 19px);
  left: 0;
  width: clamp(150px, 43vw, 174px);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  clip-path: inset(-12px -12px 0);
}

.card-mascot img {
  position: absolute;
  display: block;
  height: auto;
}

.card-mascot-peek {
  position: absolute;
  inset: 0;
}

.card-mascot-body {
  position: absolute;
  left: 24%;
  bottom: -8%;
  width: 54%;
  height: 40%;
  border-radius: 48% 48% 30% 30% / 58% 58% 32% 32%;
  background: radial-gradient(ellipse at 44% 50%, #fff4ed 12%, #efdcd4 63%, #cdb4a9 100%);
  box-shadow: inset 0 5px 8px #96706530;
}

.card-mascot-head {
  left: 10%;
  bottom: 12%;
  width: 79%;
  transform: rotate(-6deg);
  transform-origin: 50% 88%;
}

.card-mascot-arm {
  left: 65%;
  bottom: 11%;
  width: 26%;
  transform-origin: 25% 85%;
}

.card-mascot-front {
  z-index: 2;
}

.card-mascot-paw {
  left: 18%;
  bottom: 1%;
  width: 19%;
}

@media (prefers-reduced-motion: no-preference) {
  .card-mascot-peek {
    animation: mascot-peek 700ms cubic-bezier(.22, .75, .3, 1) 120ms both;
  }

  .card-mascot-arm {
    animation: mascot-wave 1.15s ease-in-out 850ms;
  }
}

@keyframes mascot-peek {
  from { transform: translateY(calc(100% + 12px)); }
  to { transform: translateY(0); }
}

@keyframes mascot-wave {
  0%, 56%, 100% { transform: rotate(0); }
  28% { transform: rotate(13deg); }
  78% { transform: rotate(9deg); }
}

.card-greeting-sparkles {
  position: absolute;
  bottom: calc(100% + 30px);
  left: 52%;
  width: 30px;
  height: 39px;
  transform: translateX(-50%);
  pointer-events: none;
}

.card-greeting-sparkles::before,
.card-greeting-sparkles::after {
  content: "";
  position: absolute;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}

.card-greeting-sparkles::before {
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background: #efb264;
}

.card-greeting-sparkles::after {
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  background: #e8c38a;
}

.card-greeting-boy {
  position: absolute;
  right: 0;
  bottom: calc(100% - 5px);
  width: clamp(150px, 43vw, 174px);
  aspect-ratio: 1;
  overflow: hidden;
  pointer-events: none;
}

.card-greeting-boy img {
  display: block;
  width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 26px 20px 40px;
}

/* ---------------- 首页 ---------------- */

.masthead { text-align: center; margin-bottom: 20px; }

.crest {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.school { font-size: 16px; letter-spacing: 5px; color: var(--ink-2); }

.event {
  margin: 6px 0 4px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 3px;
}

.sub { margin: 0; font-size: 13px; letter-spacing: 3px; color: var(--ink-2); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { display: block; margin-bottom: 14px; }

.lab {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ink-2);
}

select,
input[type="text"],
input[type="tel"] {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2361706a' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

select:focus,
input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(29, 122, 68, .12);
}

select:disabled { opacity: .5; }

input::placeholder { color: #aaa392; font-size: 15px; }

button {
  width: 100%;
  height: 56px;
  margin-top: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(20, 83, 45, .8);
  transition: transform .08s, opacity .15s;
}

.page-index #go {
  background: #a3033e;
  box-shadow: 0 12px 24px -12px rgba(163, 3, 62, .65);
}

button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: default; }

.err {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fdecea;
  color: var(--red);
  font-size: 14px;
  line-height: 1.55;
}

.err[hidden] { display: none; }

.note {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .5px;
  color: #9aa39b;
}

/* 错误页 */

.errcard { text-align: center; padding: 34px 24px; }
.errtitle { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.errmeta { margin: 12px 0 22px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }

.btnlink {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 2px;
}

/* ---------------- 邀请函 ---------------- */

body.page-invite {
  background: radial-gradient(1200px 800px at 50% -5%, #1e3d2c 0%, #0e1c14 55%, #070d09 100%);
  color: #fff;
}

.invitewrap { max-width: 430px; padding-top: 22px; }

.invite {
  background: linear-gradient(180deg, #fffdf8 0%, #fbf6ea 100%);
  border: 1px solid #eadfc8;
  border-radius: 22px;
  overflow: hidden;
  color: var(--ink);
  box-shadow: 0 34px 70px -24px rgba(0, 0, 0, .75);
}

.ribbon {
  padding: 15px 10px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 7px;
  text-indent: 7px;
  color: #fff;
  background: linear-gradient(180deg, #1f8449 0%, #14532d 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .12);
}

.invitebody { padding: 22px 22px 24px; text-align: center; }

.brand { font-size: 13px; letter-spacing: 5px; color: var(--ink-2); }
.event2 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--green);
}

.flourish {
  position: relative;
  height: 1px;
  margin: 17px 0 18px;
  background: linear-gradient(90deg, transparent, var(--line) 30%, var(--line) 70%, transparent);
}

.flourish::after {
  content: "❖";
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%);
  padding: 0 8px;
  background: #fdf9ef;
  color: var(--gold);
  font-size: 11px;
}

.ilabel { font-size: 11px; letter-spacing: 4px; color: var(--ink-2); }

.iname {
  margin: 2px 0 4px;
  font-family: var(--serif);
  font-size: 58px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 3px;
}

.iklass { font-size: 20px; font-weight: 600; letter-spacing: 2px; color: var(--green); }

.meta {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed var(--line);
}

.meta > div { display: flex; flex-direction: column; gap: 4px; }
.meta b { font-size: 19px; font-variant-numeric: tabular-nums; }
.meta span { font-size: 11px; letter-spacing: 1px; color: var(--ink-2); }

#left.warn { color: var(--red); }

.code {
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.foot { margin-top: 12px; font-size: 12px; color: var(--ink-2); letter-spacing: .5px; }

.invite.dead { filter: grayscale(1) opacity(.45); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 9, .9);
}

.overlay[hidden] { display: none; }
.ovbox { text-align: center; padding: 0 24px; }
.ovt { font-family: var(--serif); font-size: 27px; font-weight: 700; letter-spacing: 4px; }
.ovs { margin-top: 12px; font-size: 15px; letter-spacing: 2px; color: #c9d3cc; }

.tip {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: #7f8f86;
}

/* ---------------- 现场看板 ---------------- */

body.page-board { background: #0f1512; color: #e8efe9; }

.bwrap { max-width: 900px; margin: 0 auto; padding: 24px 20px 40px; }

.bhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 15px;
  color: #9db0a4;
}

.bsep { margin: 0 8px; color: #3d5347; }
.bclock { font-size: 19px; color: #cfe3d6; font-variant-numeric: tabular-nums; }

.bstats { display: flex; gap: 16px; margin: 22px 0 26px; }

.bstat {
  flex: 1;
  padding: 22px 16px;
  text-align: center;
  background: #16211b;
  border: 1px solid #22322a;
  border-radius: 16px;
}

.bstat b {
  display: block;
  font-size: 58px;
  line-height: 1;
  color: #5fd08a;
  font-variant-numeric: tabular-nums;
}

.bstat span { display: block; margin-top: 8px; font-size: 13px; color: #8fa497; }

.btable { width: 100%; border-collapse: collapse; font-size: 16px; }
.btable th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  color: #7f9488;
  border-bottom: 1px solid #22322a;
}
.btable td { padding: 11px 10px; border-bottom: 1px solid #1a2721; }
.btable td:first-child { color: #7f9488; font-variant-numeric: tabular-nums; }
.btable tbody tr.fresh td { animation: flash 1.6s ease-out; }

@keyframes flash {
  from { background: rgba(95, 208, 138, .16); }
  to { background: transparent; }
}

/* ---------------- 大屏 ---------------- */

body.page-screen {
  background: radial-gradient(1200px 900px at 20% 10%, #12251a 0%, #0a120e 55%, #060a07 100%);
  color: #fff;
  overflow: hidden;
}

.swrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3vw;
  align-items: center;
  height: 100dvh;
  padding: 4vh 5vw;
}

.sschool { font-size: clamp(14px, 1.9vw, 34px); letter-spacing: .55vw; color: #9db0a4; }

.sevent {
  margin: 1vh 0 1.4vh;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 92px);
  font-weight: 700;
  letter-spacing: .45vw;
  line-height: 1.1;
}

.sline { font-size: clamp(14px, 1.9vw, 34px); color: #d6e6da; letter-spacing: .1vw; }

.ssteps {
  margin: 2.4vh 0 0;
  padding-left: 1.4em;
  font-size: clamp(12px, 1.45vw, 26px);
  line-height: 2.1;
  color: #9db0a4;
}

.scount {
  margin-top: 3vh;
  font-size: clamp(13px, 1.6vw, 30px);
  color: #8fa497;
  letter-spacing: .1vw;
}

.scount b {
  font-size: clamp(30px, 4vw, 74px);
  color: #5fd08a;
  font-variant-numeric: tabular-nums;
  vertical-align: -.06em;
}

.sright { text-align: center; }

.sright img {
  width: min(36vw, 62vh);
  padding: 1.4vw;
  background: #fff;
  border-radius: 1.2vw;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 60px -20px rgba(0, 0, 0, .8);
}

.surl {
  margin-top: 1.6vh;
  font-size: clamp(11px, 1.15vw, 20px);
  letter-spacing: .08vw;
  color: #9db0a4;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

@media (max-width: 640px) {
  .swrap { grid-template-columns: 1fr; gap: 3vh; padding: 5vh 6vw; height: auto; }
  .sright img { width: min(62vw, 46vh); }
}
