:root {
  --bg: #060612;
  --card: rgba(12,20,40,0.85);
  --card2: rgba(16,28,56,0.9);
  --border: rgba(0,180,255,0.15);
  --text: #d0e8ff;
  --dim: #5a7da8;
  --green: #00ffa3;
  --yellow: #ffe144;
  --red: #ff3d5a;
  --blue: #00d4ff;
  --purple: #b388ff;
  --orange: #ff9100;
  --nav-bg: rgba(6,6,18,0.95);
  --active-bg: rgba(0,212,255,0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --hud-cyan: #00d4ff;
  --hud-glow: 0 0 15px rgba(0,212,255,0.3), 0 0 30px rgba(0,212,255,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: calc(60px + var(--safe-bottom));
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,180,255,0.015) 2px, rgba(0,180,255,0.015) 4px);
  pointer-events: none;
  z-index: 9998;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,120,255,0.08) 0%, transparent 60%), radial-gradient(ellipse at 80% 100%, rgba(0,255,163,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════ Header ═══════════════ */
.header {
  text-align: center;
  padding: 32px 16px 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
  background: linear-gradient(180deg, rgba(0,50,100,0.3) 0%, transparent 100%);
}

.header h1 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--hud-cyan), #00ffa3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
  text-shadow: 0 0 30px rgba(0,212,255,0.3);
  letter-spacing: 1px;
}

.header .sub {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
}

.header .badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 16px;
  font-size: 11px;
  color: var(--hud-cyan);
  background: rgba(0,212,255,0.06);
  animation: badgePulse 3s ease-in-out infinite;
}

/* ═══════════════ Score Bar ═══════════════ */
.score-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 800px;
  margin: 16px auto;
  background: transparent;
}

.score-bar .s {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all .3s;
}

.score-bar .s:hover {
  border-color: rgba(0,212,255,0.3);
  box-shadow: var(--hud-glow);
}

.score-bar .s::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--hud-cyan), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.score-bar .s:hover::before { opacity: 1; }

.score-bar .s .l { font-size: 12px; color: var(--dim); margin-bottom: 2px; }
.score-bar .s .v { font-size: 26px; font-weight: 700; }
.score-bar .s .d { font-size: 11px; color: var(--dim); margin-top: 2px; }

.s.y { color: var(--yellow); }
.s.r { color: var(--red); }

/* ═══════════════ Navigation ═══════════════ */
.nav-wrap {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.nav::-webkit-scrollbar { display: none; }

.nav a {
  display: block;
  padding: 12px 14px;
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  flex-shrink: 0;
  scroll-snap-align: start;
  min-width: max-content;
}

.nav a:hover, .nav a.active {
  color: var(--hud-cyan);
  border-bottom-color: var(--hud-cyan);
  text-shadow: 0 0 10px rgba(0,212,255,0.3);
}

/* ═══════════════ Main Layout ═══════════════ */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.page { display: none; }
.page.active { display: block; }

.sec { margin-bottom: 28px; }

.sec-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-title .ico { font-size: 18px; }

/* ═══════════════ Card ═══════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  transition: all .3s;
}

.card:hover {
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 0 20px rgba(0,212,255,0.08);
}

.card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hud-cyan), transparent);
  animation: scanLine 4s linear infinite;
  opacity: 0.3;
  pointer-events: none;
}

.card h3 {
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.card h3 .type {
  font-size: 10px;
  font-weight: 400;
  color: var(--dim);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 4px;
  padding: 1px 7px;
  background: rgba(0,212,255,0.05);
}

/* ═══════════════ Table ═══════════════ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tbl th {
  text-align: left;
  padding: 6px;
  font-weight: 500;
  color: var(--dim);
  font-size: 11px;
  border-bottom: 1px solid var(--border);
}

.tbl td {
  padding: 6px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  vertical-align: middle;
}

.tbl tr:last-child td { border-bottom: none; }
.tbl .tc { text-align: center; }

/* ═══════════════ Tags ═══════════════ */
.tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.tag.g { background: rgba(0,255,163,0.12); color: var(--green); border: 1px solid rgba(0,255,163,0.3); text-shadow: 0 0 8px rgba(0,255,163,0.2); }
.tag.y { background: rgba(255,225,68,0.12); color: var(--yellow); border: 1px solid rgba(255,225,68,0.3); text-shadow: 0 0 8px rgba(255,225,68,0.2); }
.tag.r { background: rgba(255,61,90,0.12); color: var(--red); border: 1px solid rgba(255,61,90,0.3); text-shadow: 0 0 8px rgba(255,61,90,0.2); }
.tag.b { background: rgba(0,212,255,0.12); color: var(--blue); border: 1px solid rgba(0,212,255,0.3); }
.tag.p { background: rgba(179,136,255,0.12); color: var(--purple); border: 1px solid rgba(179,136,255,0.3); }
.tag.o { background: rgba(255,145,0,0.12); color: var(--orange); border: 1px solid rgba(255,145,0,0.3); }

.f { font-size: 12px; color: var(--dim); }
.f.s { font-size: 10px; }

.box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.9;
  position: relative;
}

.box strong { color: #fff; }

/* ═══════════════ Progress Bar ═══════════════ */
.prog { margin: 8px 0; }
.prog .bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(0,180,255,0.1);
  overflow: hidden;
  margin: 4px 0;
  border: 1px solid rgba(0,180,255,0.1);
}
.prog .bar .fill {
  height: 100%;
  border-radius: 3px;
  transition: .5s;
  box-shadow: 0 0 8px currentColor;
}
.prog .lbl {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--dim);
}

/* ═══════════════ Timeline ═══════════════ */
.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 1px solid var(--border);
  margin: 12px 0;
}
.timeline .t { margin-bottom: 10px; }
.timeline .t .h { font-size: 11px; color: var(--dim); margin-bottom: 2px; }
.timeline .t .c { font-size: 13px; }

/* ═══════════════ Level Tabs ═══════════════ */
.level-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.level-tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  color: var(--dim);
  background: transparent;
  transition: all .2s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.level-tab:hover {
  border-color: rgba(0,212,255,0.4);
  color: var(--text);
  box-shadow: 0 0 12px rgba(0,212,255,0.1);
}

.level-tab.sel {
  border-color: var(--hud-cyan);
  color: var(--hud-cyan);
  background: rgba(0,212,255,0.08);
  box-shadow: 0 0 15px rgba(0,212,255,0.15);
}

.lt-all { color: var(--dim); border-color: rgba(0,212,255,0.2); }
.lt-green { color: var(--green); border-color: rgba(0,255,163,0.3); }
.lt-yellow { color: var(--yellow); border-color: rgba(255,225,68,0.3); }
.lt-red { color: var(--red); border-color: rgba(255,61,90,0.3); }

.lt-green.sel { background: rgba(0,255,163,0.08); color: var(--green); border-color: var(--green); box-shadow: 0 0 15px rgba(0,255,163,0.15); }
.lt-yellow.sel { background: rgba(255,225,68,0.08); color: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 15px rgba(255,225,68,0.15); }
.lt-red.sel { background: rgba(255,61,90,0.08); color: var(--red); border-color: var(--red); box-shadow: 0 0 15px rgba(255,61,90,0.15); }

/* ═══════════════ Collapsible Sections ═══════════════ */
.collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 12px 16px;
  margin: 0 -16px;
  margin-top: -16px;
  transition: background .2s;
}

.collapse-header:hover { background: rgba(255,255,255,0.03); }

.collapse-header::after {
  content: '▾';
  font-size: 14px;
  color: var(--dim);
  transition: transform .2s;
}

.collapse-header.collapsed::after { transform: rotate(-90deg); }

.collapse-content {
  overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease;
  max-height: 2000px;
  opacity: 1;
}

.collapse-content.hidden {
  max-height: 0;
  opacity: 0;
}

/* ═══════════════ Volunteer Groups ═══════════════ */
.vol-group {
  border-left: 3px solid;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 0 8px 8px 0;
  position: relative;
  overflow: hidden;
}

.vol-group::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: 0.3;
}

.vol-group.g1 { border-color: var(--hud-cyan); background: rgba(0,212,255,0.04); }
.vol-group.g2 { border-color: var(--yellow); background: rgba(255,225,68,0.04); }
.vol-group.g3 { border-color: var(--dim); background: rgba(90,125,168,0.04); }

.vol-group .gtitle {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.vol-group .gtitle::after {
  content: '▾';
  font-size: 12px;
  color: var(--dim);
  transition: transform .2s;
}

.vol-group .gtitle.collapsed::after { transform: rotate(-90deg); }

.vol-group .gcontent {
  overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease;
}

.vol-group .gcontent.hidden {
  max-height: 0;
  opacity: 0;
}

/* ═══════════════ Steps ═══════════════ */
.step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.step:last-child { border-bottom: none; }

.step .num {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  min-width: 24px;
  padding-top: 2px;
}

.step .info { flex: 1; }
.step .info .sn { font-weight: 600; font-size: 13px; }
.step .info .sd { font-size: 12px; color: var(--dim); }

/* ═══════════════ Action Box ═══════════════ */
.action-box {
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,255,163,0.08));
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 0 20px rgba(0,212,255,0.06);
  position: relative;
  overflow: hidden;
}

.action-box::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: radial-gradient(circle at top right, rgba(0,212,255,0.15), transparent);
  pointer-events: none;
}

.action-box h4 { font-size: 15px; margin-bottom: 8px; color: var(--hud-cyan); }
.action-box ol { padding-left: 20px; font-size: 13px; line-height: 1.9; }
.action-box ol li { margin-bottom: 4px; }

/* ═══════════════ Timeline Box ═══════════════ */
.timeline-box {
  border-left: 3px solid var(--hud-cyan);
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 0 8px 8px 0;
  background: rgba(0,212,255,0.04);
  position: relative;
}

.timeline-box::after {
  content: '';
  position: absolute;
  left: -3px; top: 50%;
  width: 8px; height: 8px;
  background: var(--hud-cyan);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px var(--hud-cyan);
}

.timeline-box h4 { font-size: 14px; font-weight: 600; color: var(--hud-cyan); margin-bottom: 6px; }
.timeline-box .date { font-size: 13px; font-weight: 600; color: var(--yellow); }
.timeline-box .desc { font-size: 13px; color: var(--text); }

/* ═══════════════ Volunteer Items ═══════════════ */
.vol-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  transition: .15s;
  border-radius: 6px;
  min-height: 44px;
}

.vol-item:hover, .vol-item:active { background: rgba(255,255,255,.04); }

.vol-item.added {
  background: rgba(0,255,163,0.06);
  border-left: 3px solid var(--green);
  opacity: 0.8;
}

.vol-item.added:hover { background: rgba(0,255,163,0.1); }

.vol-item .add-state {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--dim);
  white-space: nowrap;
}

.vol-item.added .add-state {
  background: rgba(0,255,163,0.12);
  color: var(--green);
  border-color: rgba(0,255,163,0.3);
}

.my-vol-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  border-radius: 6px;
  background: var(--card);
  min-height: 44px;
  gap: 8px;
}

.drag-handle {
  color: var(--dim);
  font-size: 16px;
  cursor: grab;
  padding: 4px;
  flex-shrink: 0;
  user-select: none;
  touch-action: none;
}

.drag-handle:active { cursor: grabbing; }

/* ═══════════════ Footer ═══════════════ */
.footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--dim);
  font-size: 11px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  line-height: 1.8;
}

/* ═══════════════ Toast ═══════════════ */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--card2);
  border: 1px solid var(--hud-cyan);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  transition: transform .3s ease;
  box-shadow: 0 0 25px rgba(0,212,255,0.2);
  max-width: 90%;
  text-align: center;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(0,255,163,0.5); background: rgba(0,255,163,0.1); box-shadow: 0 0 25px rgba(0,255,163,0.15); }
.toast.info { border-color: rgba(0,212,255,0.5); background: rgba(0,212,255,0.1); box-shadow: 0 0 25px rgba(0,212,255,0.15); }

/* ═══════════════ Bottom Nav ═══════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  z-index: 200;
  display: none;
  padding-bottom: var(--safe-bottom);
}

.bottom-nav-inner {
  display: flex;
  max-width: 900px;
  margin: 0 auto;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  color: var(--dim);
  text-decoration: none;
  font-size: 10px;
  transition: .15s;
  min-height: 50px;
  justify-content: center;
}

.bottom-nav a:hover, .bottom-nav a.active { color: var(--text); }
.bottom-nav a .bnav-icon { font-size: 18px; margin-bottom: 2px; }

/* ═══════════════ Form Elements ═══════════════ */
.grade-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0,212,255,0.2);
  background: rgba(6,6,18,0.9);
  color: var(--text);
  font-size: 15px;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300d4ff' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all .2s;
}

.grade-select:focus {
  outline: none;
  border-color: var(--hud-cyan);
  box-shadow: 0 0 15px rgba(0,212,255,0.15);
}

.pref-check-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pref-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 20px;
  transition: all .2s;
  min-height: 44px;
}

.pref-label:has(input:checked) {
  border-color: var(--hud-cyan);
  background: rgba(0,212,255,0.08);
  color: var(--hud-cyan);
  box-shadow: 0 0 12px rgba(0,212,255,0.1);
}

.pref-label input { width: 18px; height: 18px; accent-color: var(--hud-cyan); }

/* ═══════════════ Buttons ═══════════════ */
.btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  transition: all .2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--hud-cyan), #0090cc);
  color: #fff;
  box-shadow: 0 0 15px rgba(0,212,255,0.2);
}

.btn-primary:hover {
  box-shadow: 0 0 25px rgba(0,212,255,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1px solid rgba(0,212,255,0.25);
  background: rgba(0,212,255,0.06);
  color: var(--hud-cyan);
}

.btn-secondary:hover {
  background: rgba(0,212,255,0.12);
  box-shadow: 0 0 12px rgba(0,212,255,0.1);
}

.btn-sm { padding: 6px 12px; font-size: 12px; min-height: 36px; border-radius: 6px; }

.btn-del {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--red);
  font-size: 14px;
  cursor: pointer;
  min-width: 32px;
  min-height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-del:hover { background: rgba(255,61,90,0.1); border-color: var(--red); }

/* ═══════════════ School Contact ═══════════════ */
.school-contact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.school-contact a {
  display: block;
  padding: 8px 12px;
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 8px;
  font-size: 12px;
  color: var(--hud-cyan);
  text-decoration: none;
  transition: all .2s;
}

.school-contact a:hover {
  background: rgba(0,212,255,0.08);
  border-color: var(--hud-cyan);
  box-shadow: 0 0 10px rgba(0,212,255,0.1);
}

/* ═══════════════ HUD Elements ═══════════════ */
.hud-section { animation: dataLoad .4s ease-out; }

.hud-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--card);
  overflow: hidden;
}

.hud-frame::before, .hud-frame::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--hud-cyan);
}

.hud-frame::before { top: 4px; left: 4px; border-top: 2px solid; border-left: 2px solid; }
.hud-frame::after { bottom: 4px; right: 4px; border-bottom: 2px solid; border-right: 2px solid; }

.hud-corner-bl { position: absolute; bottom: 4px; left: 4px; width: 12px; height: 12px; border-bottom: 2px solid var(--hud-cyan); border-left: 2px solid var(--hud-cyan); }
.hud-corner-tr { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-top: 2px solid var(--hud-cyan); border-right: 2px solid var(--hud-cyan); }

/* ═══════════════ Ring SVG ═══════════════ */
.ring-container { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px; }
.ring-svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(0,180,255,0.1); stroke-width: 4; }
.ring-fill { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-label { font-size: 11px; color: var(--dim); text-align: center; }

/* ═══════════════ School Marker (Commute) ═══════════════ */
.school-marker { display: flex; align-items: center; gap: 4px; padding: 3px 0; font-size: 12px; cursor: pointer; transition: all .15s; }
.school-marker:hover { transform: translateX(4px); }
.school-marker .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 6px currentColor; }

/* ═══════════════ Commute Visual Bar ═══════════════ */
.commute-row { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.commute-row:last-child { border-bottom: none; }
.commute-row .info { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.commute-row .name { font-size: 13px; font-weight: 600; }
.commute-row .meta { font-size: 11px; color: var(--dim); }
.commute-row .bar-wrap { display: flex; align-items: center; gap: 8px; }
.commute-row .bar-track { flex: 1; height: 8px; background: rgba(0,180,255,0.08); border-radius: 4px; overflow: hidden; border: 1px solid rgba(0,180,255,0.1); }
.commute-row .bar-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.commute-row .bar-label { font-size: 11px; color: var(--dim); min-width: 40px; text-align: right; }

/* ═══════════════ Print Area ═══════════════ */
#printArea {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #fff;
  color: #000;
  z-index: 10000;
  overflow-y: auto;
  padding: 24px;
}

#printArea.show { display: block; }

.print-header { text-align: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid #333; }
.print-header h1 { font-size: 22px; margin-bottom: 8px; color: #111; }
.print-header p { font-size: 14px; color: #555; margin: 2px 0; }

.print-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.print-table th, .print-table td { padding: 10px 12px; border: 1px solid #ccc; text-align: left; font-size: 14px; }
.print-table th { background: #f0f0f0; font-weight: 600; }
.print-table .must { color: #2e7d32; font-weight: 600; }
.print-table .maybe { color: #f57f17; font-weight: 600; }
.print-table .danger { color: #c62828; font-weight: 600; }

.print-footer { margin-top: 24px; padding-top: 12px; border-top: 1px solid #ddd; font-size: 12px; color: #666; }

.print-close {
  position: fixed;
  top: 16px; right: 16px;
  padding: 8px 16px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  z-index: 10001;
}

.print-btn {
  padding: 10px 24px;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  margin: 16px auto;
  display: block;
}

/* ═══════════════ Animations ═══════════════ */
@keyframes scanLine { 0% { left: -100%; } 100% { left: 200%; } }
@keyframes badgePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes hudBreathe { 0%, 100% { box-shadow: 0 0 5px rgba(0,212,255,0.1); } 50% { box-shadow: 0 0 15px rgba(0,212,255,0.2); } }
@keyframes dataLoad { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes glowPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.3); } }

/* ═══════════════ Media Queries ═══════════════ */
@media (max-width: 640px) {
  .score-bar { grid-template-columns: 1fr 1fr; gap: 6px; }
  .score-bar .s { padding: 10px; }
  .score-bar .s .v { font-size: 22px; }
  .nav a { padding: 10px 10px; font-size: 12px; }
  .header h1 { font-size: 19px; }
  .header { padding: 20px 12px 16px; }
  .card { padding: 12px; }
  .tbl { font-size: 11px; }
  .tbl td, .tbl th { padding: 4px 5px; }
  .main { padding: 16px 12px 80px; }
  .sec-title { font-size: 15px; }
  .vol-group { padding: 8px 10px; }
  .box { font-size: 13px; }
  .step .num { min-width: 20px; }
  .bottom-nav { display: flex; }
  .action-box { padding: 12px; }
  .timeline-box { padding: 10px 12px; }
  .level-tab { padding: 6px 12px; font-size: 13px; }
  .school-contact { grid-template-columns: 1fr; }
  .drag-handle { font-size: 18px; padding: 6px; }
}

@media (max-width: 400px) {
  .score-bar { grid-template-columns: 1fr 1fr; }
  .nav a { padding: 8px 8px; font-size: 11px; }
  .score-bar .s .v { font-size: 20px; }
  .header h1 { font-size: 17px; }
  .tbl { font-size: 10px; }
}

@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea {
    display: block !important;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: auto;
    background: #fff;
    color: #000;
    padding: 20px;
  }
  .print-close, .print-btn { display: none !important; }
}

@media (min-width: 641px) {
  .score-bar { grid-template-columns: repeat(4, 1fr); }
  .score-bar .s { padding: 16px; }
  .score-bar .s .v { font-size: 28px; }
}
