html { min-height: 100%; background: linear-gradient(135deg, #f0f4fc 0%, #dfeafa 55%, #eaf0f9 100%); }
:root {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #102648;
  font-synthesis: none;
  --ink: #102648;
  --muted: #526a8a;
  --line: #dce5f1;
  --navy: #163861;
  --width: 470px;
}
* { box-sizing: border-box; }
body {
  width: min(100%, var(--width)); margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; background: linear-gradient(180deg, #f8fbff, #edf3fc);
  box-shadow: 0 0 0 1px #234e8210, 0 20px 70px #21375122;
}
a { text-decoration: none; color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
:focus-visible { outline: 3px solid #377fd1; outline-offset: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: 11px 17px; font-weight: 700; font-size: 15px; border: 1px solid transparent; }
.gold { background: linear-gradient(155deg, #ffe7a1, #ffca4d); border-color: #efb23d; color: #292219; box-shadow: 0 5px 16px #db9e2930; }
.gold:hover { background: #ffcd57; }
.dark { background: var(--navy); color: #fff; }
.dark:hover { background: #223b5b; }
.outline { background: #fff; border-color: #bccadb; color: var(--ink); }
.outline:hover { background: #edf3fa; }
h2 { font-size: 19px; margin: 0 0 14px; }
.period-list { display: grid; gap: 13px; }
.period, .panel { border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 22px; }
.period-head, .period-brand, .period-foot { display: flex; align-items: center; gap: 11px; }
.period-head, .period-foot { justify-content: space-between; }
.period-brand h3 { margin: 0; font-size: 18px; }
.period-brand p, .period-foot span { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.phase { border-radius: 6px; background: #ecf1f7; color: #355173; padding: 5px 9px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.phase-2 { background: #e4f4ea; color: #246042; }
.phase-4 { background: #eaf0fc; color: #2b5189; }
.facts { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 13px; padding: 15px 0; margin: 17px 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
dt { color: var(--muted); font-size: 14px; }
dd { margin: 5px 0 0; font-weight: 700; overflow-wrap: anywhere; }
dd small { font-size: 12px; color: var(--muted); }
.empty { display: grid; justify-items: center; gap: 13px; color: var(--muted); padding: 36px 16px; }
.rules p, dialog p { color: var(--muted); line-height: 1.65; }
.rule-rows { margin: 16px 0; }
.rule-rows > div { display: grid; grid-template-columns: minmax(95px, 1fr) 3fr; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rule-rows dd { margin: 0; }
.address { font-family: ui-monospace, monospace; font-size: 14px; }
.teacher-form { display: grid; gap: 8px; max-width: 530px; }
.teacher-form label { font-size: 14px; font-weight: 700; }
.teacher-form input, .teacher-form textarea { min-width: 0; width: 100%; font: inherit; border: 1px solid #aebed0; border-radius: 8px; padding: 9px 10px; }
.teacher-form textarea { min-height: 105px; resize: vertical; }
.teacher-form button { justify-self: start; margin-top: 4px; }
.teacher-fee { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; }
#modal { width: min(515px, calc(100% - 34px)); max-height: 85dvh; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); padding: 24px; }
dialog::backdrop { background: #0b1529a8; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.modal-head h2 { margin: 0; }
.close { border: 0; border-radius: 8px; padding: 0 10px; font-size: 23px; background: #edf2f8; color: var(--ink); }
dialog form label { display: block; font-size: 14px; font-weight: 700; }
dialog input { width: 100%; border: 1px solid #aebed0; border-radius: 8px; padding: 9px 10px; margin: 6px 0 13px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-error { color: #a13f32; margin-bottom: 0; }
.form-error:empty { display: none; }
#toast { position: fixed; bottom: 22px; right: 22px; border-radius: 9px; background: var(--navy); color: #fff; opacity: 0; pointer-events: none; }
#toast.visible { padding: 12px 18px; opacity: 1; }
@media (max-width: 385px) {
  .period, .panel { padding: 14px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:first-child { grid-column: 1 / -1; }
}
