:root {
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #1d2a39;
  --muted: #627286;
  --line: #d9e2ee;
  --primary: #264a7a;
  --accent: #5d87c7;
  --soft: #edf4ff;
  --shadow: 0 16px 40px rgba(22, 35, 55, 0.08);
  --ok: #1f8f5f;
  --pending: #b58b38;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans TC', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hero {
  background: linear-gradient(135deg, #153256 0%, #264a7a 55%, #5d87c7 100%);
  color: #fff;
  padding: 48px 20px 42px;
}
.hero-inner, .container, .footer { max-width: 1180px; margin: 0 auto; }
.back-link { color: #dceaff; text-decoration: none; font-size: 14px; }
.eyebrow { margin: 22px 0 8px; letter-spacing: .18em; text-transform: uppercase; font-size: 12px; opacity: .86; }
.hero h1 { margin: 0 0 14px; font-size: clamp(32px, 5vw, 56px); }
.subtitle { max-width: 880px; line-height: 1.85; font-size: 18px; color: #eef5ff; }
.notice {
  margin-top: 22px; max-width: 900px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px; padding: 16px 18px; line-height: 1.8;
}
.container { padding: 34px 20px 56px; }
.section { margin-bottom: 34px; }
.section-head h2 { margin: 0 0 8px; font-size: 30px; }
.section-head p { margin: 0 0 18px; color: var(--muted); line-height: 1.8; }
.combined-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}
.combined-layout.map-only .right-column.full { width: 100%; }
.task-overlay {
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.task-overlay.hidden { display: none; }
.floating-overlay {
  z-index: 20;
  margin-bottom: 0;
}
.page-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(13, 24, 38, 0.18);
}
.task-overlay-inner {
  width: min(92vw, 520px);
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.task-overlay-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.task-overlay-head h3 {
  margin: 0;
  font-size: 22px;
  color: var(--primary);
}
.close-overlay {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.task-grid.single, .place-grid { display: grid; gap: 18px; }
.task-grid.single { grid-template-columns: 1fr; }
.place-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.task-card, .place-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 20px;
}
.floating-overlay .task-card {
  background: #ffffff;
  opacity: 1;
}
.floating-overlay .task-card h3,
.floating-overlay .task-card .tag,
.floating-overlay .task-card .meta,
.floating-overlay .task-card p {
  position: relative;
  z-index: 1;
}
.tag {
  display: inline-block; margin-bottom: 10px; padding: 6px 10px; border-radius: 999px;
  background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 700;
}
.task-card h3, .place-card h3 { margin: 0 0 10px; font-size: 20px; color: var(--primary); }
.floating-overlay .task-card h3 {
  color: var(--primary);
  font-weight: 800;
}
.task-card p, .place-card p { margin: 0; color: var(--muted); line-height: 1.75; }
.action-row { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.toggle-btn, .link-btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--primary);
  border-radius: 999px; padding: 10px 14px; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.toggle-btn:hover, .link-btn:hover { border-color: var(--accent); }
.qr-panel {
  margin-top: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: 18px; background: #fbfdff; display: none; text-align: center;
}
.qr-panel.open { display: block; }
.qr-panel img { width: 132px; height: 132px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.qr-panel .small { margin-top: 10px; font-size: 13px; color: var(--muted); word-break: break-all; }
.map-title-outside {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}
.map-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 12px; box-shadow: var(--shadow); overflow: auto;
}
.campus-map { width: 100%; min-width: 900px; height: auto; display: block; }
.campus-border { fill: #fff; stroke: #dbe6f4; stroke-width: 3; }
.map-title { fill: var(--primary); font-size: 26px; font-weight: 800; }
.building { stroke-width: 3; }
.clickable-building { cursor: pointer; transition: transform .2s ease, filter .2s ease; }
.clickable-building:hover { filter: brightness(1.03); }
.task-card.highlight { outline: 3px solid rgba(93,135,199,.28); box-shadow: 0 0 0 6px rgba(93,135,199,.10), var(--shadow); }
.building-admin { fill: #eaf2ff; stroke: #5d87c7; }
.building-wuyu { fill: #eef7f1; stroke: #63a27e; }
.building-liuyi { fill: #f7f0ff; stroke: #9679c7; }
.building-chengxi { fill: #fff2eb; stroke: #d28d67; }
.building-library { fill: #fff7e9; stroke: #d4a84f; }
.building-gym { fill: #edf8ff; stroke: #68a9c6; }
.building-unknown { fill: #fafafa; stroke: #aab4c2; }
.dashed { stroke-dasharray: 10 7; }
.b-name { fill: #203047; font-size: 24px; font-weight: 800; }
.b-sub { fill: #4d6078; font-size: 18px; }
.path { stroke: #c4d3e7; stroke-width: 6; stroke-linecap: round; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }
.dot.confirmed { background: var(--ok); }
.dot.pending { background: var(--pending); }
.meta { margin: 10px 0 12px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.status { font-weight: 700; }
.status.ok { color: var(--ok); }
.status.pending { color: var(--pending); }
.footer { padding: 0 20px 48px; color: var(--muted); font-size: 14px; line-height: 1.8; }
@media (max-width: 1040px) {
  .combined-layout { grid-template-columns: 1fr; }
  .place-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 28px; }
  .map-wrap { padding: 10px; }
}

@media (max-width: 768px) {
  .hero { padding: 36px 16px 32px; }
  .hero h1 { font-size: clamp(28px, 7vw, 42px); }
  .subtitle { font-size: 16px; line-height: 1.75; }
  .notice { font-size: 14px; padding: 14px; }
  .container { padding: 24px 16px 40px; }
  .section { margin-bottom: 26px; }
  .section-head h2 { font-size: 24px; }
  .section-head p { font-size: 15px; margin-bottom: 14px; }
  .task-card, .place-card, .task-overlay { padding: 16px; border-radius: 18px; }
  .task-card h3, .place-card h3 { font-size: 18px; }
  .task-card p, .place-card p, .meta { font-size: 14px; line-height: 1.7; }
  .action-row { gap: 8px; }
  .toggle-btn, .link-btn, .close-overlay { width: 100%; text-align: center; justify-content: center; }
  .map-wrap { padding: 8px; border-radius: 18px; overflow: hidden; width: 100%; }
  .campus-map { width: 100%; min-width: 0; height: auto; }
  .page-overlay { padding: 12px; align-items: center; }
  .task-overlay-inner { width: 90vw; max-width: 90vw; display: flex; flex-direction: column; }
  .combined-layout, .right-column, .right-column.full, .section, .section-head, .task-card, .place-card, .qr-panel, .task-overlay { width: 100%; max-width: 100%; }
  .task-overlay-head { order: 2; margin-top: 12px; margin-bottom: 0; }
  .task-overlay-head.no-title { justify-content: stretch; }
  .task-grid.single { order: 1; }
  .task-overlay-head h3 { font-size: 18px; }
  .qr-panel img { width: 120px; height: 120px; }
  .legend { font-size: 13px; gap: 10px; }
  .footer { padding: 0 16px 32px; font-size: 13px; }
}

@media (max-width: 480px) {
  .hero { padding: 28px 14px 24px; }
  .eyebrow { margin-top: 18px; font-size: 11px; }
  .hero h1 { font-size: 28px; }
  .subtitle { font-size: 15px; }
  .notice { border-radius: 14px; }
  .container { padding: 20px 14px 34px; }
  .task-card, .place-card, .task-overlay { padding: 14px; }
  .tag { font-size: 11px; }
  .campus-map { width: 100%; min-width: 0; }
  .qr-panel img { width: 108px; height: 108px; }
}
