:root {
  color-scheme: light;
  --green-950: #143c32;
  --green-800: #246146;
  --green-600: #3f8755;
  --green-100: #e7f2e5;
  --orange: #e87f2d;
  --orange-light: #fff0df;
  --red: #b84b3f;
  --red-light: #f9e6e1;
  --blue: #2a7f9e;
  --blue-light: #e1f3f8;
  --yellow: #f2c84b;
  --ink: #21352f;
  --muted: #64746e;
  --line: #dce4df;
  --paper: #f6f7f2;
  --white: #ffffff;
  --shadow: 0 14px 40px rgba(20, 60, 50, 0.15);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body, #app { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }

body {
  color: var(--ink);
  background: var(--paper);
  overflow: hidden;
  letter-spacing: 0;
}

button, input { font: inherit; }
button { letter-spacing: 0; }
button:focus-visible { outline: 3px solid rgba(42, 127, 158, 0.38); outline-offset: 2px; }

h1, h2, p, blockquote { margin-top: 0; }

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

.primary-button:hover,
.secondary-button:hover { transform: translateY(-1px); }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border-radius: 6px;
  color: var(--white);
  background: var(--green-800);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(36, 97, 70, 0.2);
}

.primary-button span { font-size: 1.2em; }
.primary-button:disabled, .secondary-button:disabled, .icon-button:disabled { cursor: not-allowed; opacity: 0.42; transform: none; }

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--green-800);
  border-radius: 6px;
  color: var(--green-800);
  background: var(--white);
  font-weight: 700;
}

.text-button { padding: 0 8px; color: var(--green-800); background: transparent; font-weight: 700; }
.text-button:hover { color: var(--orange); }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
  font-size: 20px;
  font-weight: 700;
}

.icon-button:hover { color: var(--green-800); background: var(--green-100); }

.section-label,
.brand-kicker,
.mission-number {
  display: block;
  margin-bottom: 6px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

.loading-screen,
.error-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  text-align: center;
  background: var(--paper);
}

.loading-mark,
.error-mark {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-800);
  font-weight: 800;
}

.error-mark { background: var(--red); font-size: 36px; }
.error-screen p { max-width: 520px; color: var(--muted); }

/* Mission selection */
.mission-screen {
  position: relative;
  min-height: 100dvh;
  overflow: auto;
  background: #edf4e8;
}

.mission-map {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(247, 249, 242, 0.98) 0%, rgba(247, 249, 242, 0.9) 58%, rgba(247, 249, 242, 0.44) 100%), url("../assets/map/dongli-map.webp");
  background-position: center, 85% 61%;
  background-size: cover, 52% auto;
  background-repeat: no-repeat;
}

.mission-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(42px, 7vh, 84px) 0 52px;
}

.brand-lockup { max-width: 720px; margin-bottom: clamp(28px, 5vh, 48px); }
.brand-lockup h1 { margin-bottom: 12px; color: var(--green-950); font-size: clamp(38px, 5vw, 64px); line-height: 1.05; }
.brand-lockup p { max-width: 620px; margin-bottom: 0; color: #52645d; font-size: 18px; line-height: 1.7; }

.mission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.mission-card {
  display: flex;
  min-height: 368px;
  padding: 24px;
  flex-direction: column;
  border: 1px solid rgba(33, 53, 47, 0.1);
  border-top: 5px solid var(--green-600);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.mission-card:nth-child(2) { border-top-color: var(--orange); }
.mission-card:nth-child(3) { border-top-color: var(--blue); }
.mission-card-head { display: flex; align-items: center; justify-content: space-between; }
.mission-number { margin: 0; }
.time-chip { padding: 5px 9px; border-radius: 4px; color: var(--green-950); background: var(--green-100); font-size: 12px; font-weight: 800; }
.mission-card h2 { margin: 18px 0 8px; font-size: 24px; }
.mission-card p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.mission-card .visitor-line { min-height: 22px; margin-bottom: 8px; color: var(--ink); font-weight: 700; }
.requirement-chips { display: flex; margin: auto 0 20px; flex-wrap: wrap; gap: 6px; }
.requirement-chips span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; color: #4c6259; background: #f9faf7; font-size: 12px; }
.mission-card .primary-button { width: 100%; }
.landscape-note { display: none; }

/* Briefing */
.briefing-screen { display: grid; min-height: 100dvh; grid-template-columns: minmax(360px, 1.05fr) minmax(520px, 0.95fr); background: var(--white); }
.briefing-photo { position: relative; min-height: 100dvh; overflow: hidden; background: var(--green-950); }
.briefing-photo img { width: 100%; height: 100%; object-fit: cover; }
.briefing-photo::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, transparent 45%, rgba(20, 60, 50, 0.75)); }
.briefing-brand { position: absolute; z-index: 1; left: 38px; bottom: 34px; padding: 10px 14px; border-left: 4px solid var(--orange); color: var(--white); font-weight: 800; }
.briefing-panel { display: flex; max-width: 720px; padding: clamp(34px, 6vh, 70px) clamp(36px, 6vw, 82px); flex-direction: column; justify-content: center; }
.briefing-panel .back-missions { align-self: flex-start; margin: 0 0 auto -8px; }
.briefing-panel h1 { margin-bottom: 18px; color: var(--green-950); font-size: clamp(34px, 4vw, 52px); }
.briefing-panel blockquote { margin-left: 0; padding-left: 20px; border-left: 4px solid var(--orange); color: #42564e; font-size: 18px; line-height: 1.8; }
.briefing-panel .visitor-line { color: var(--muted); }
.briefing-list { display: grid; margin: 20px 0 26px; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.briefing-list div { padding: 18px 12px; border-right: 1px solid var(--line); }
.briefing-list div:last-child { border-right: 0; }
.briefing-list strong, .briefing-list span { display: block; }
.briefing-list strong { margin-bottom: 5px; color: var(--green-800); font-size: 18px; }
.briefing-list span { color: var(--muted); font-size: 12px; }
.briefing-panel h2 { margin-bottom: 12px; font-size: 18px; }
.goal-list { display: flex; margin: 0 0 20px; padding: 0; flex-wrap: wrap; gap: 10px; list-style: none; }
.goal-list li { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 5px; background: var(--green-100); font-size: 14px; font-weight: 700; }
.goal-list li span { color: var(--green-600); }
.start-end-note { display: flex; margin-bottom: 22px; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.start-end-note span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--white); background: var(--orange); }
.briefing-panel > .primary-button { align-self: flex-start; min-width: 250px; }

/* Game shell */
.game-shell { height: 100dvh; min-height: 600px; background: var(--paper); }
.game-topbar { display: flex; height: 62px; padding: 0 16px 0 22px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--white); }
.mini-brand { display: flex; align-items: center; gap: 10px; }
.mini-brand span { padding: 5px 8px; border-radius: 4px; color: var(--white); background: var(--green-800); font-size: 12px; font-weight: 800; }
.mini-brand strong { color: var(--green-950); font-size: 17px; }
.phase-pill { display: flex; min-height: 34px; padding: 0 14px; align-items: center; gap: 8px; border-radius: 18px; color: var(--green-950); background: var(--green-100); font-size: 13px; font-weight: 800; }
.phase-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(232, 127, 45, 0.16); }
.top-actions { display: flex; align-items: center; gap: 8px; }

.game-workspace { display: grid; height: calc(100dvh - 62px); min-height: 538px; grid-template-columns: minmax(0, 1fr) 390px; }
.map-viewport { position: relative; min-width: 0; overflow: hidden; touch-action: none; cursor: grab; background: #dceacf; }
.map-viewport.dragging { cursor: grabbing; }
.map-stage { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 3240 / 4576; transform-origin: center center; transition: transform 90ms ease-out; }
.map-stage { margin-left: calc(-0.5 * 100vh * 3240 / 4576); }
.map-image { display: block; width: 100%; height: 100%; user-select: none; }
.route-overlay, .marker-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-overlay { overflow: visible; pointer-events: none; }
.route-shadow, .route-line { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.route-shadow { stroke: rgba(255, 255, 255, 0.94); stroke-width: 8; }
.route-line { stroke: var(--orange); stroke-width: 4; stroke-dasharray: 10 5; animation: route-flow 12s linear infinite; }
@keyframes route-flow { to { stroke-dashoffset: -100; } }

.map-marker {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 3px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 4px 10px rgba(16, 48, 39, 0.33);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  z-index: 3;
}
.map-marker:hover { z-index: 8; transform: translate(-50%, -50%) scale(1.14); }
.marker-red { background: var(--red); }
.marker-culture { background: var(--orange); }
.marker-nature { background: var(--green-600); }
.marker-farming { background: #89712f; }
.marker-service { background: var(--blue); }
.facility-marker { width: 26px; height: 26px; border-width: 2px; opacity: 0.82; font-size: 9px; }
.selected-marker { width: 38px; height: 38px; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(242, 200, 75, 0.38), 0 4px 12px rgba(16, 48, 39, 0.38); }
.completed-marker { background: var(--green-950); }
.current-marker { animation: current-pulse 1.7s ease-out infinite; }
@keyframes current-pulse { 50% { box-shadow: 0 0 0 12px rgba(232, 127, 45, 0.18), 0 4px 12px rgba(16, 48, 39, 0.38); } }
.disabled-marker { filter: grayscale(1); opacity: 0.45; }

.map-controls { position: absolute; z-index: 12; top: 16px; left: 16px; display: grid; gap: 6px; }
.map-controls .icon-button { box-shadow: 0 4px 14px rgba(20, 60, 50, 0.15); }
.map-legend { position: absolute; z-index: 9; left: 16px; bottom: 38px; display: flex; max-width: calc(100% - 32px); padding: 8px 10px; flex-wrap: wrap; gap: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 5px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 5px 16px rgba(20, 60, 50, 0.12); font-size: 11px; }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.legend-dot.red { background: var(--red); }
.legend-dot.culture { background: var(--orange); }
.legend-dot.nature { background: var(--green-600); }
.legend-dot.farming { background: #89712f; }
.navigation-note { position: absolute; z-index: 8; right: 12px; bottom: 7px; margin: 0; color: rgba(20, 60, 50, 0.72); font-size: 10px; }

.poi-drawer {
  position: absolute;
  z-index: 15;
  top: 16px;
  bottom: 16px;
  left: 74px;
  width: min(370px, calc(100% - 100px));
  overflow: auto;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(20, 60, 50, 0.26);
  cursor: default;
  animation: drawer-in 180ms ease-out;
}
@keyframes drawer-in { from { opacity: 0; transform: translateX(-14px); } }
.close-drawer { position: absolute; z-index: 2; top: 10px; right: 10px; border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.92); }
.poi-photo { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #dde7dd; }
.poi-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { display: grid; width: 100%; height: 100%; place-content: center; justify-items: center; gap: 8px; color: var(--white); background: var(--blue); }
.photo-placeholder.red { background: var(--red); }
.photo-placeholder.culture { background: var(--orange); }
.photo-placeholder.nature { background: var(--green-600); }
.photo-placeholder.farming { background: #89712f; }
.photo-placeholder span { font-size: 50px; font-weight: 900; }
.poi-copy { padding: 20px; }
.poi-copy h2 { margin: 10px 0 8px; color: var(--green-950); font-size: 23px; }
.poi-copy > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.category-label { display: inline-flex; gap: 5px; color: var(--blue); font-size: 12px; font-weight: 800; }
.category-label.red { color: var(--red); }
.category-label.culture { color: var(--orange); }
.category-label.nature { color: var(--green-600); }
.category-label.farming { color: #89712f; }
.poi-facts { display: grid; margin: 16px 0; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.poi-facts div { padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.poi-facts div:nth-child(2n) { border-right: 0; }
.poi-facts div:nth-last-child(-n+2) { border-bottom: 0; }
.poi-facts dt { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.poi-facts dd { margin: 0; font-size: 12px; font-weight: 700; }
.poi-copy .primary-button, .poi-copy .secondary-button { width: 100%; }
.inline-warning { padding: 9px 10px; border-left: 3px solid var(--red); color: var(--red) !important; background: var(--red-light); }
.completed-note, .facility-note { margin: 12px 0 0; text-align: center; }

/* Sidebar */
.game-sidebar { display: flex; min-width: 0; overflow: hidden; flex-direction: column; border-left: 1px solid var(--line); background: var(--white); }
.active-event-banner { display: grid; padding: 10px 18px; grid-template-columns: auto 1fr; align-items: center; gap: 3px 9px; color: #70451f; background: var(--orange-light); border-bottom: 1px solid #f1d2b4; }
.active-event-banner span { padding: 3px 5px; border-radius: 3px; color: var(--white); background: var(--orange); font-size: 9px; font-weight: 800; }
.active-event-banner strong { font-size: 13px; }
.active-event-banner small { grid-column: 1 / -1; color: #76583f; font-size: 10px; }
.sidebar-section { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sidebar-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-title h2, .travel-sidebar h2 { margin: 0; font-size: 18px; }
.compact-goals { display: flex; margin: 12px 0 0; padding: 0; flex-wrap: wrap; gap: 6px; list-style: none; }
.compact-goals li { display: flex; padding: 5px 7px; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; }
.compact-goals li.done { border-color: #b8d8bf; color: var(--green-800); background: var(--green-100); }
.task-section { flex: 0 0 auto; }
.route-section { min-height: 0; flex: 1 1 auto; overflow: auto; }
.route-list { margin: 12px 0 0; padding: 0; list-style: none; }
.route-item { display: grid; min-height: 52px; padding: 7px 0; align-items: center; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; border-bottom: 1px solid #edf0ed; }
.route-item:last-child { border-bottom: 0; }
.route-item > div { min-width: 0; }
.route-item strong, .route-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-item strong { font-size: 13px; }
.route-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.route-item.draggable { cursor: grab; }
.route-item.locked { color: var(--muted); }
.route-order { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: var(--white); background: var(--orange); font-size: 11px; font-weight: 800; }
.route-order.home { background: var(--green-800); }
.route-actions { display: flex; }
.route-actions button { width: 30px; height: 32px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-weight: 800; }
.route-actions button:hover { color: var(--orange); background: var(--orange-light); }
.done-check { color: var(--green-600); font-weight: 900; }
.upcoming-dot { color: var(--orange); font-size: 24px; }
.empty-route { margin: 8px 0; padding: 14px; border: 1px dashed #bdcac3; color: var(--muted); background: #fafbf8; font-size: 12px; line-height: 1.6; text-align: center; }
.route-summary { display: grid; padding: 12px 18px; grid-template-columns: 1.35fr 1fr 1fr; border-top: 1px solid var(--line); background: #f8faf7; }
.route-summary div { padding-right: 7px; }
.route-summary span, .route-summary strong { display: block; }
.route-summary span { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.route-summary strong { font-size: 13px; }
.danger-text { color: var(--red); }
.validation-box { margin: 10px 18px; padding: 10px 12px; border-left: 3px solid var(--orange); background: var(--orange-light); font-size: 11px; }
.validation-box strong { color: #8a4b18; }
.validation-box ul { margin: 5px 0 0; padding-left: 17px; color: #745541; line-height: 1.55; }
.ready-box { display: flex; margin: 10px 18px; padding: 10px 12px; align-items: center; gap: 10px; color: var(--green-800); background: var(--green-100); }
.ready-box > span { font-size: 20px; font-weight: 900; }
.ready-box strong, .ready-box small { display: block; }
.ready-box strong { font-size: 12px; }
.ready-box small { margin-top: 2px; color: #527160; font-size: 10px; }
.game-sidebar > .primary-button { min-height: 50px; margin: 0 18px 16px; flex: 0 0 auto; }

.progress-track { height: 8px; margin: 14px 0 7px; overflow: hidden; border-radius: 4px; background: #e7ece8; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.progress-copy { margin: 0; color: var(--muted); font-size: 12px; }
.next-stop-panel { padding: 22px 18px; text-align: center; background: var(--green-950); color: var(--white); }
.next-stop-panel > span { color: #bcd4c4; font-size: 11px; }
.next-stop-icon { display: grid; width: 48px; height: 48px; margin: 10px auto; place-items: center; border-radius: 50%; color: var(--green-950); background: var(--yellow); font-size: 18px; font-weight: 900; }
.next-stop-panel h2 { margin-bottom: 5px; }
.next-stop-panel p { margin: 0; color: #c8d9ce; font-size: 12px; }
.compact-route { padding-top: 6px; padding-bottom: 6px; }
.compact-route .route-list { margin-top: 0; }

.task-popover { position: fixed; z-index: 30; top: 78px; right: 405px; width: min(360px, calc(100vw - 430px)); padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); box-shadow: var(--shadow); }
.task-popover .close-task { position: absolute; top: 8px; right: 8px; }
.task-popover h2 { font-size: 20px; }
.task-popover p { color: var(--muted); font-size: 13px; line-height: 1.65; }

/* Event */
.dialog-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; padding: 24px; place-items: center; background: rgba(14, 38, 31, 0.66); }
.event-dialog { width: min(460px, 100%); padding: 32px; border-top: 6px solid var(--orange); border-radius: 8px; background: var(--white); box-shadow: 0 24px 70px rgba(8, 28, 22, 0.38); text-align: center; animation: event-in 220ms ease-out; }
@keyframes event-in { from { opacity: 0; transform: translateY(15px) scale(0.97); } }
.event-icon { display: grid; width: 66px; height: 66px; margin: 0 auto 18px; place-items: center; border-radius: 50%; color: var(--white); background: var(--orange); font-size: 25px; font-weight: 900; }
.event-dialog h2 { margin-bottom: 14px; color: var(--green-950); font-size: 30px; }
.event-prompt { color: #3f544c; font-size: 17px; line-height: 1.75; }
.event-effect { display: flex; margin: 20px 0; padding: 12px 14px; align-items: center; gap: 12px; border-radius: 5px; background: var(--orange-light); text-align: left; }
.event-effect strong { flex: 0 0 auto; color: #8a4b18; font-size: 11px; }
.event-effect span { color: #6c503a; font-size: 13px; }
.event-dialog .primary-button { width: 100%; }

/* Results */
.result-screen { height: 100dvh; overflow: auto; background: var(--paper); }
.result-header { display: flex; height: 62px; padding: 0 28px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--white); }
.result-layout { display: grid; width: min(1180px, calc(100% - 48px)); min-height: calc(100dvh - 62px); margin: 0 auto; padding: 28px 0; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; }
.score-panel { display: flex; padding: 30px; flex-direction: column; align-items: center; border-radius: 8px; color: var(--white); background: var(--green-950); text-align: center; }
.score-panel .section-label { color: #b8d1c1; }
.score-ring { display: grid; width: 184px; height: 184px; margin: 18px 0; place-items: center; border-radius: 50%; background: conic-gradient(var(--yellow) var(--score), rgba(255,255,255,0.14) 0); }
.score-ring::before { position: absolute; content: ""; width: 150px; height: 150px; border-radius: 50%; background: var(--green-950); }
.score-ring div { position: relative; z-index: 1; }
.score-ring strong { display: block; font-size: 60px; line-height: 1; }
.score-ring span { color: #b8d1c1; font-size: 13px; }
.score-panel h1 { margin-bottom: 12px; font-size: 30px; }
.score-panel > p { color: #c8d9ce; font-size: 13px; line-height: 1.7; }
.score-actions { display: grid; width: 100%; margin-top: auto; grid-template-columns: 1fr 1fr; gap: 10px; }
.score-actions .secondary-button { color: var(--white); border-color: rgba(255,255,255,0.55); background: transparent; }
.score-actions .primary-button { color: var(--green-950); background: var(--yellow); box-shadow: none; }
.result-details { display: grid; align-content: start; grid-template-columns: 1fr 1fr; gap: 18px; }
.score-breakdown, .journey-summary, .result-route, .feedback-panel { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.score-breakdown { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 22px; }
.score-breakdown > div { display: grid; align-items: center; grid-template-columns: 80px 1fr 38px; gap: 8px; font-size: 11px; }
.score-breakdown strong { text-align: right; }
.mini-track { height: 7px; overflow: hidden; border-radius: 4px; background: #e8ede9; }
.mini-track i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.journey-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.journey-summary div { padding: 12px; background: #f5f8f4; }
.journey-summary span, .journey-summary strong { display: block; }
.journey-summary span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.journey-summary strong { font-size: 14px; }
.result-route { min-height: 180px; }
.result-route ol { display: flex; margin: 16px 0 0; padding: 0; flex-wrap: wrap; gap: 8px; list-style: none; }
.result-route li { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.result-route li:not(:last-child)::after { margin-left: 3px; content: "→"; color: #aab6af; }
.result-route li span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--white); background: var(--green-800); font-size: 10px; font-weight: 800; }
.result-route li span.red { background: var(--red); }
.result-route li span.culture { background: var(--orange); }
.result-route li span.nature { background: var(--green-600); }
.result-route li span.farming { background: #89712f; }
.result-route li span.service { background: var(--blue); }
.feedback-panel { grid-column: 1 / -1; }
.feedback-panel article { display: flex; margin-top: 10px; padding: 11px 13px; align-items: center; gap: 10px; border-left: 3px solid var(--orange); background: var(--orange-light); }
.feedback-panel article > span { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--white); background: var(--orange); font-weight: 900; }
.feedback-panel article p { margin: 0; color: #6d523d; font-size: 12px; }
.feedback-panel article.positive { border-left-color: var(--green-600); background: var(--green-100); }
.feedback-panel article.positive > span { background: var(--green-600); }

@media (max-width: 1100px) {
  .game-workspace { grid-template-columns: minmax(0, 1fr) 340px; }
  .game-sidebar { font-size: 95%; }
  .sidebar-section { padding-inline: 14px; }
  .game-sidebar > .primary-button { margin-inline: 14px; }
  .validation-box, .ready-box { margin-inline: 14px; }
  .task-popover { right: 355px; width: min(340px, calc(100vw - 380px)); }
  .mission-content { width: min(100% - 40px, 1050px); }
  .mission-card { min-height: 390px; padding: 20px; }
  .briefing-panel { padding: 34px; }
}

@media (max-height: 720px) {
  .game-topbar, .result-header { height: 56px; }
  .game-workspace { height: calc(100dvh - 56px); }
  .sidebar-section { padding-block: 10px; }
  .compact-goals { margin-top: 7px; }
  .route-item { min-height: 45px; padding-block: 4px; }
  .route-summary { padding-block: 8px; }
  .validation-box, .ready-box { margin-block: 7px; padding-block: 7px; }
  .game-sidebar > .primary-button { min-height: 44px; margin-bottom: 10px; }
  .next-stop-panel { padding-block: 13px; }
  .next-stop-icon { width: 40px; height: 40px; margin-block: 6px; }
}

@media (max-width: 820px), (orientation: portrait) {
  body::before {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    padding: 32px;
    place-content: center;
    content: "请将设备横过来，使用横屏完成旅游路线规划";
    color: var(--white);
    background: var(--green-950);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.7;
    text-align: center;
  }
}
