﻿:root {
  color-scheme: light;
  --ink: #17252f;
  --muted: #60717d;
  --line: rgba(23, 37, 47, 0.2);
  --surface: rgba(255, 255, 255, 0.88);
  --accent: #2b7a78;
  --accent-2: #d65a31;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
  background:
    radial-gradient(circle at 20% 12%, rgba(43, 122, 120, 0.08), transparent 24rem),
    linear-gradient(135deg, #f6faf9 0%, #eef4f5 46%, #f8f5ef 100%);
}

.map-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(246, 250, 249, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.loading-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.loading-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 18px 20px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(34, 55, 67, 0.18);
  backdrop-filter: blur(12px);
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(43, 122, 120, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loadingSpin 760ms linear infinite;
}

@keyframes loadingSpin {
  to {
    transform: rotate(360deg);
  }
}

#map {
  width: 100%;
  height: 100%;
  transition: width 220ms ease, margin-left 220ms ease;
}

.map-shell.has-filter-results #map {
  width: calc(100% - min(460px, 34vw));
  margin-left: min(460px, 34vw);
}

@media (max-width: 860px) {
  .map-shell.has-filter-results #map {
    width: 100%;
    margin-left: 0;
  }
}

.map-context-legend {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100vw - 36px));
  padding: 8px 10px;
  color: #39515a;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(34, 55, 67, 0.1);
  backdrop-filter: blur(10px);
}

.map-context-legend.is-visible {
  display: flex;
}

.map-context-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.map-context-legend i {
  width: 16px;
  height: 10px;
  border-radius: 3px;
}

.map-context-legend__main {
  background: #9fcfc6;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.map-context-legend__neighbor {
  background: rgba(214, 225, 228, 0.8);
  border: 1px dashed rgba(96, 113, 125, 0.58);
}

.map-context-legend small {
  color: rgba(88, 108, 117, 0.86);
  font-size: 11px;
  font-weight: 700;
}

.mode-tools {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.project-identity {
  position: fixed;
  top: 66px;
  left: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100vw - 36px));
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(34, 55, 67, 0.1);
  backdrop-filter: blur(12px);
}

.project-identity > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-identity strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-identity span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-identity__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.project-identity__actions button {
  min-height: 28px;
  padding: 0 8px;
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  background: rgba(43, 122, 120, 0.08);
  border: 1px solid rgba(43, 122, 120, 0.18);
  border-radius: 6px;
  cursor: pointer;
}

.project-identity__actions button:hover {
  color: #ffffff;
  background: var(--accent);
}

.mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(66px, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.12);
  backdrop-filter: blur(12px);
}

.guide-help-button {
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(43, 122, 120, 0.28);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(34, 55, 67, 0.12);
  cursor: pointer;
}

.guide-help-button:hover,
.guide-help-button:focus-visible {
  color: #ffffff;
  background: var(--accent);
  outline: none;
}

.guide-help-button--detail {
  flex: 0 0 auto;
  box-shadow: none;
}

.mode-toggle__button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.mode-toggle__button:hover {
  color: var(--ink);
  background: rgba(43, 122, 120, 0.08);
}

.mode-toggle__button.is-active {
  color: #ffffff;
  background: var(--accent);
}

.favorites-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 4;
  width: min(320px, calc(100vw - 36px));
  max-height: min(48vh, 430px);
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.12);
  backdrop-filter: blur(12px);
}

.favorites-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(23, 37, 47, 0.1);
}

.favorites-panel__actions {
  display: inline-flex;
  gap: 6px;
}

.favorites-panel__title {
  font-size: 14px;
  font-weight: 800;
}

.favorites-panel__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.favorites-panel__hint {
  margin-top: 2px;
  color: rgba(88, 108, 117, 0.72);
  font-size: 10px;
}

.favorites-panel__toggle {
  min-height: 28px;
  padding: 0 8px;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  background: rgba(43, 122, 120, 0.08);
  border: 1px solid rgba(43, 122, 120, 0.18);
  border-radius: 6px;
  cursor: pointer;
}

.favorites-list {
  display: grid;
  gap: 6px;
  max-height: calc(min(48vh, 430px) - 56px);
  overflow: auto;
  padding: 8px;
}

.favorites-panel.is-collapsed .favorites-list {
  display: none;
}

.favorites-section {
  display: grid;
  gap: 6px;
  padding: 7px;
  background: rgba(246, 250, 249, 0.72);
  border: 1px solid rgba(23, 37, 47, 0.08);
  border-radius: 8px;
}

.favorites-section__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.favorites-section__header strong {
  overflow: hidden;
  color: #18323a;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorites-section__header span {
  color: var(--muted);
  font-size: 11px;
}

.favorites-section__export {
  min-height: 24px;
  padding: 0 7px;
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  background: #ffffff;
  border: 1px solid rgba(43, 122, 120, 0.2);
  border-radius: 6px;
  cursor: pointer;
}

.favorites-section__export:disabled {
  color: rgba(88, 108, 117, 0.5);
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.5);
}

.favorites-section__body {
  display: grid;
  gap: 6px;
}

.favorite-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 6px;
  align-items: stretch;
}

.favorite-item.is-dragging {
  opacity: 0.45;
}

.favorite-item.is-drag-over {
  outline: 2px solid rgba(214, 90, 49, 0.45);
  outline-offset: 2px;
}

.favorite-main {
  min-width: 0;
  padding: 7px 8px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 7px;
  cursor: pointer;
}

.favorite-main:hover {
  background: rgba(246, 250, 249, 0.96);
  border-color: rgba(43, 122, 120, 0.28);
}

.favorite-main strong,
.favorite-main span,
.favorite-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-main strong,
.favorite-main span {
  font-size: 12px;
}

.favorite-main span {
  margin-top: 2px;
  color: #24434b;
}

.favorite-main em,
.favorites-empty {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.favorites-empty {
  padding: 8px;
}

.favorite-remove {
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 7px;
  cursor: pointer;
}

.favorite-remove:hover {
  color: #ffffff;
  background: #c2412c;
  border-color: #c2412c;
}

.search-box {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px auto;
  width: min(690px, calc(100vw - 260px));
  min-height: 42px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.12);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  transition: transform 180ms ease, opacity 180ms ease;
}

.search-box.is-collapsed {
  opacity: 0.96;
  transform: translate(-50%, calc(-100% + 16px));
}

.search-box.is-collapsed:hover,
.search-box:focus-within {
  opacity: 1;
  transform: translateX(-50%);
}

.advanced-search {
  padding: 10px;
}

.filter-menu {
  position: relative;
  display: grid;
  grid-template-columns: 112px;
  gap: 8px;
  min-height: 476px;
}

.filter-popover-group {
  position: relative;
}

.filter-menu-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 0 11px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 7px;
  box-shadow: 0 10px 26px rgba(34, 55, 67, 0.1);
  cursor: pointer;
  transform: translateX(0);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.filter-menu-button::after {
  content: "›";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.filter-popover-group.is-active .filter-menu-button,
.filter-menu-button:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(43, 122, 120, 0.22);
  transform: none;
}

.filter-popover-group.is-active .filter-menu-button::after,
.filter-menu-button:hover::after {
  color: #ffffff;
}

.filter-popover {
  position: absolute;
  top: 0;
  left: 124px;
  z-index: 2;
  width: 280px;
  max-height: 354px;
  overflow: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(34, 55, 67, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-14px) scale(0.96);
  transform-origin: left top;
  transition: opacity 160ms ease, transform 160ms ease;
}

.filter-popover-group.is-active .filter-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.filter-popover--range {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.filter-popover__hint {
  color: rgba(23, 37, 47, 0.72);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.filter-popover--large {
  position: fixed;
  top: 50%;
  left: 148px;
  z-index: 12;
  width: min(50vw, 860px);
  min-width: min(620px, calc(100vw - 110px));
  max-height: min(76vh, 680px);
  transform: translate(-14px, -50%) scale(0.96);
  transform-origin: left center;
}

.filter-popover-group.is-active .filter-popover--large {
  transform: translate(0, -50%) scale(1);
}

.province-options,
.subject-options,
.stage-options,
.category-options,
.level-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.major-name-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-height: 540px;
  margin-top: 8px;
  overflow: auto;
  padding-right: 2px;
}

.province-option,
.subject-option,
.stage-option,
.category-option,
.level-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 5px 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 6px;
  cursor: pointer;
}

.province-option.is-retained,
.subject-option.is-retained,
.stage-option.is-retained,
.category-option.is-retained,
.level-option.is-retained,
.major-name-option.is-retained {
  background: rgba(255, 255, 255, 0.48);
  border-style: dashed;
  opacity: 0.78;
}

.province-option input,
.subject-option input,
.stage-option input,
.category-option input,
.level-option input {
  margin: 0;
}

.province-option span,
.subject-option span,
.stage-option span,
.category-option span,
.level-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.major-name-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(23, 37, 47, 0.09);
  border-radius: 6px;
  cursor: pointer;
}

.major-name-option:hover {
  background: rgba(246, 250, 249, 0.96);
  border-color: rgba(43, 122, 120, 0.22);
}

.major-name-option input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.major-name-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.major-name-option em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.major-name-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.major-name-actions button {
  min-height: 32px;
  padding: 0 8px;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  background: rgba(43, 122, 120, 0.08);
  border: 1px solid rgba(43, 122, 120, 0.18);
  border-radius: 6px;
  cursor: pointer;
}

.major-name-actions button:hover {
  color: #ffffff;
  background: var(--accent);
}

.filter-drawer {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  pointer-events: none;
  transform: translateY(-50%);
}

.filter-drawer__toggle {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 46px;
  min-height: 112px;
  margin-top: 0;
  padding: 12px 0;
  color: #ffffff;
  font: inherit;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  writing-mode: horizontal-tb;
  letter-spacing: 0;
  background: var(--accent);
  border: 0;
  border-radius: 0 9px 9px 0;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.16);
  cursor: pointer;
  pointer-events: auto;
  transition: width 180ms ease, background 160ms ease;
}

.filter-drawer.is-open .filter-drawer__toggle {
  width: 54px;
}

.filter-drawer.is-open .filter-drawer__arrow {
  display: inline-block;
  transform: rotate(180deg);
}

.filter-drawer__toggle small {
  display: block;
  max-width: 1em;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.filter-drawer__toggle:hover {
  background: #205f5d;
}

.filter-drawer__body {
  width: min(430px, calc(100vw - 50px));
  max-height: calc(100vh - 112px);
  margin-left: 10px;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 100% 0 0);
  transform: translateX(-18px);
  transition: opacity 190ms ease, transform 220ms ease, clip-path 220ms ease;
}

.filter-drawer.is-open .filter-drawer__body {
  opacity: 1;
  pointer-events: auto;
  clip-path: none;
  transform: translateX(0);
}

.filter-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(23, 37, 47, 0.1);
}

.filter-drawer__title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.filter-drawer__meta,
.filter-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.filter-drawer__actions {
  position: relative;
  bottom: auto;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  width: 112px;
  background: transparent;
  border-top: 0;
}

.active-filter-box {
  width: min(420px, calc(100vw - 70px));
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(34, 55, 67, 0.08);
}

.active-filter-box__title {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-filter-empty {
  color: var(--muted);
  font-size: 12px;
}

.active-filter-chip {
  max-width: 100%;
  min-height: 26px;
  padding: 0 8px;
  overflow: hidden;
  color: #23565d;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(43, 122, 120, 0.09);
  border: 1px solid rgba(43, 122, 120, 0.18);
  border-radius: 999px;
  cursor: pointer;
}

.active-filter-chip:hover {
  color: #ffffff;
  background: var(--accent);
}

.filter-empty {
  margin-top: 7px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 6px;
}

.filter-input {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 6px;
  outline: 0;
}

.filter-input--wide {
  width: 100%;
}

.filter-input--full {
  width: 100%;
}

.filter-button,
.filter-clear {
  height: 34px;
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.filter-button {
  color: #ffffff;
  background: var(--accent-2);
}

.filter-button:hover {
  background: #b94827;
}

.filter-clear {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(23, 37, 47, 0.12);
}

.filter-clear:hover {
  color: var(--ink);
  background: #ffffff;
}

.search-input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  background: transparent;
  border: 0;
  outline: 0;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-button {
  height: 42px;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: var(--accent);
  border: 0;
  border-left: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 0 7px 7px 0;
  cursor: pointer;
}

.search-button:hover {
  background: #205f5d;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  width: 100%;
  max-height: min(48vh, 360px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.14);
}

.filter-panel {
  position: fixed;
  top: 50%;
  right: auto;
  left: 46px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 80px));
  height: min(68vh, 560px);
  min-width: min(320px, calc(100vw - 80px));
  min-height: 220px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  overflow: hidden;
  resize: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.14);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-10px, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.filter-drawer.is-open ~ .filter-panel {
  left: min(500px, calc(100vw - 230px));
}

.filter-panel.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.filter-panel.is-dragging {
  user-select: none;
  transition: opacity 180ms ease;
}

.filter-panel__resize-handle {
  position: absolute;
  z-index: 4;
  width: 22px;
  height: 22px;
  pointer-events: auto;
}

.filter-panel__resize-handle::before {
  position: absolute;
  inset: 4px;
  content: "";
  border-color: var(--accent-2);
  border-style: solid;
  opacity: 0.95;
  animation: resizeCornerPulse 1200ms ease-in-out infinite;
}

.filter-panel.has-resized .filter-panel__resize-handle::before {
  opacity: 0;
  animation: none;
}

.filter-panel__resize-handle--nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.filter-panel__resize-handle--nw::before {
  border-width: 2px 0 0 2px;
}

.filter-panel__resize-handle--ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.filter-panel__resize-handle--ne::before {
  border-width: 2px 2px 0 0;
}

.filter-panel__resize-handle--sw {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

.filter-panel__resize-handle--sw::before {
  border-width: 0 0 2px 2px;
}

.filter-panel__resize-handle--se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
}

.filter-panel__resize-handle--se::before {
  border-width: 0 2px 2px 0;
}

@keyframes resizeCornerPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.88);
  }
  50% {
    opacity: 0.95;
    transform: scale(1);
  }
}

.filter-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid rgba(23, 37, 47, 0.1);
  cursor: move;
}

.filter-panel__title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.filter-panel__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.filter-result-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
  overflow: auto;
  padding: 8px 10px 10px;
}

.filter-result-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 7px;
  align-items: start;
  width: 100%;
  padding: 7px 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 37, 47, 0.08);
  border-radius: 7px;
  cursor: pointer;
}

.filter-result-item:hover {
  border-color: rgba(214, 90, 49, 0.34);
  background: rgba(214, 90, 49, 0.08);
}

.filter-result-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  background: var(--accent-2);
  border-radius: 50%;
}

.filter-result-name {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.45;
}

.filter-result-meta,
.filter-result-major {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.filter-result-major strong {
  color: var(--ink);
}

.search-results.is-visible {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(23, 37, 47, 0.08);
  cursor: pointer;
}

.search-result:hover,
.search-result.is-active {
  background: rgba(43, 122, 120, 0.09);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result__dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
}

.search-result__dot--public {
  background: #111111;
}

.search-result__dot--other {
  background: #1d68d8;
}

.search-result__name {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.search-result__meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.toolbar {
  position: fixed;
  top: 128px;
  left: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.12);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toolbar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 126px;
  height: 32px;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  background: #ffffff;
  border: 1px solid rgba(23, 37, 47, 0.14);
  border-radius: 6px;
  cursor: pointer;
}

.icon-button__symbol {
  font-size: 18px;
  font-weight: 700;
}

.icon-button:hover {
  color: #ffffff;
  background: var(--accent);
}

.crumb {
  max-width: min(62vw, 520px);
  padding-right: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  max-width: min(72vw, 360px);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  background: var(--surface);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.1);
  backdrop-filter: blur(12px);
}

.status:empty {
  display: none;
}

.city-panel {
  position: fixed;
  top: 136px;
  right: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 36px));
  max-height: calc(100vh - 124px);
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(34, 55, 67, 0.14);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.city-panel.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.map-shell.has-favorites-open .city-panel.is-visible {
  right: min(356px, calc(100vw - 390px));
}

.city-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(23, 37, 47, 0.1);
}

.city-panel__title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.city-panel__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.panel-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  background: #ffffff;
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 6px;
  cursor: pointer;
}

.panel-close:hover {
  color: #ffffff;
  background: var(--accent-2);
}

.legend {
  display: flex;
  gap: 14px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid rgba(23, 37, 47, 0.08);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.legend-dot--public {
  background: #111111;
}

.legend-dot--other {
  background: #1d68d8;
}

.university-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  overflow: auto;
  padding: 12px 14px 14px;
}

.university-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  align-items: start;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 37, 47, 0.08);
  border-radius: 7px;
  cursor: pointer;
}

.university-item:hover {
  border-color: rgba(43, 122, 120, 0.28);
  background: rgba(43, 122, 120, 0.08);
}

.university-item__dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
}

.university-item__dot--public {
  background: #111111;
}

.university-item__dot--other {
  background: #1d68d8;
}

.university-item__name {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.batch-tag {
  color: #c62828;
  font-weight: 800;
}

.university-item__nature {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.university-item__place {
  margin-top: 4px;
  color: #3b5964;
  font-size: 12px;
  line-height: 1.4;
}

.university-item__place strong {
  color: var(--ink);
  font-weight: 700;
}

.empty-list {
  padding: 24px 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.detail-page {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  overflow: auto;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(246, 250, 249, 0.96), rgba(248, 245, 239, 0.98)),
    #ffffff;
}

.detail-page.is-visible {
  display: block;
}

.detail-page__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(23, 37, 47, 0.1);
  backdrop-filter: blur(12px);
}

.detail-back {
  min-height: 36px;
  padding: 0 14px;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.detail-back:hover {
  background: #205f5d;
}

.detail-place {
  margin-left: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-content {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 42px;
}

.detail-hero {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(23, 37, 47, 0.12);
}

.detail-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 32px;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.detail-pill {
  padding: 5px 8px;
  color: #24434b;
  font-size: 12px;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.detail-stat {
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 8px;
}

.detail-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-stat strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.detail-section-title {
  margin: 24px 0 10px;
  font-size: 18px;
}

.major-toolbar {
  display: flex;
  gap: 10px;
  margin: 16px 0 12px;
}

.major-search {
  width: min(420px, 100%);
  height: 38px;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(23, 37, 47, 0.14);
  border-radius: 7px;
  outline: 0;
}

.major-list {
  display: grid;
  gap: 8px;
}

.major-item {
  position: relative;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 8px;
  transition: opacity 160ms ease, filter 160ms ease;
}

.major-item.is-junior {
  background: rgba(238, 248, 250, 0.86);
  border-color: rgba(73, 145, 159, 0.24);
}

.major-item.is-junior .major-meta {
  color: #4d6c76;
}

.major-item.is-junior .major-data span {
  background: rgba(247, 252, 253, 0.9);
  border-color: rgba(73, 145, 159, 0.16);
}

.major-item.is-junior .major-data .major-score {
  color: #ffffff;
  background: #4f8fa0;
  border-color: rgba(79, 143, 160, 0.72);
}

.major-item.is-filter-mismatch {
  opacity: 0.36;
  filter: grayscale(0.85);
}

.major-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.major-new-marker {
  margin-left: 7px;
  color: #c83d32;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.major-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-right: 86px;
}

.major-info-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.major-info-button {
  min-height: 24px;
  padding: 0 7px;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  background: rgba(43, 122, 120, 0.08);
  border: 1px solid rgba(43, 122, 120, 0.2);
  border-radius: 6px;
  cursor: pointer;
}

.major-info-button:hover,
.major-info-button.is-active {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.major-favorite-button {
  position: absolute;
  top: 10px;
  right: 12px;
  min-height: 24px;
  padding: 0 10px;
  color: #9b4b14;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: rgba(214, 90, 49, 0.08);
  border: 1px solid rgba(214, 90, 49, 0.24);
  border-radius: 6px;
  cursor: pointer;
}

.major-favorite-button:hover,
.major-favorite-button.is-active {
  color: #ffffff;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.major-info-panel {
  margin-top: 8px;
  padding: 9px 10px;
  color: #24434b;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  background: rgba(246, 250, 249, 0.9);
  border: 1px solid rgba(43, 122, 120, 0.14);
  border-radius: 7px;
}

.course-search-hint {
  margin-bottom: 7px;
  color: #5b7280;
  font-size: 12px;
}

.course-keyword-list,
.course-platforms__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: normal;
}

.course-keyword-button,
.course-platform-button {
  min-height: 26px;
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.course-keyword-button {
  color: #215d66;
  background: rgba(237, 249, 249, 0.95);
  border: 1px solid rgba(73, 145, 159, 0.22);
}

.course-keyword-button:hover,
.course-keyword-button.is-active {
  color: #ffffff;
  background: #4f8fa0;
  border-color: #4f8fa0;
  transform: translateY(-1px);
}

.course-platforms {
  margin-top: 9px;
  padding-top: 8px;
  white-space: normal;
  border-top: 1px dashed rgba(43, 122, 120, 0.2);
}

.course-platforms__title {
  margin-bottom: 6px;
  color: #264f58;
  font-size: 12px;
  font-weight: 800;
}

.course-platform-button {
  color: #814112;
  background: rgba(214, 90, 49, 0.08);
  border: 1px solid rgba(214, 90, 49, 0.2);
}

.course-platform-button:hover {
  color: #ffffff;
  background: #d65a31;
  border-color: #d65a31;
}

.major-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.major-risk-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.major-risk {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  color: #74400f;
  font-size: 11px;
  font-weight: 800;
  background: #fff6df;
  border: 1px solid rgba(202, 137, 33, 0.28);
  border-radius: 6px;
}

.major-risk--high {
  color: #8d2f26;
  background: #fff0ed;
  border-color: rgba(200, 61, 50, 0.25);
}

.product-dialog[hidden] {
  display: none;
}

.product-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 31, 38, 0.52);
  backdrop-filter: blur(5px);
}

.product-dialog__panel {
  width: min(680px, calc(100vw - 32px));
  max-height: min(82vh, 720px);
  overflow: auto;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(23, 37, 47, 0.14);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(20, 40, 49, 0.28);
}

.product-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.product-dialog__header h2,
.product-dialog__header p {
  margin: 0;
}

.product-dialog__header h2 {
  font-size: 20px;
}

.product-dialog__header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.product-dialog__close {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  background: #f4f7f7;
  border: 1px solid rgba(23, 37, 47, 0.1);
  border-radius: 7px;
  cursor: pointer;
}

.data-notice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.data-notice-grid > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: #f5f9f8;
  border: 1px solid rgba(43, 122, 120, 0.12);
  border-radius: 7px;
}

.data-notice-grid span {
  color: var(--muted);
  font-size: 11px;
}

.data-notice-grid strong {
  font-size: 13px;
}

.data-notice-copy {
  margin-top: 12px;
  padding: 12px;
  color: #3b5964;
  font-size: 13px;
  line-height: 1.7;
  background: #fff8ed;
  border-left: 3px solid var(--accent-2);
}

.data-notice-copy p {
  margin: 0 0 7px;
}

.data-notice-copy p:last-child {
  margin-bottom: 0;
}

.candidate-profile form {
  display: grid;
  gap: 12px;
}

.candidate-profile__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.candidate-profile label {
  color: #35515b;
  font-size: 12px;
  font-weight: 700;
}

.candidate-profile__grid label,
.candidate-profile__provinces {
  display: grid;
  gap: 5px;
}

.candidate-profile input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  background: #fbfcfc;
  border: 1px solid rgba(23, 37, 47, 0.16);
  border-radius: 7px;
}

.candidate-profile fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 7px;
}

.candidate-profile legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.candidate-profile fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.candidate-profile__hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.candidate-profile__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.candidate-profile__actions button {
  min-height: 36px;
  padding: 0 13px;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  background: #f3f6f6;
  border: 1px solid rgba(23, 37, 47, 0.12);
  border-radius: 7px;
  cursor: pointer;
}

.candidate-profile__actions button[type="submit"] {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.major-data {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.major-data span {
  padding: 6px 7px;
  color: #24434b;
  font-size: 12px;
  line-height: 1.3;
  background: rgba(246, 250, 249, 0.86);
  border: 1px solid rgba(23, 37, 47, 0.08);
  border-radius: 6px;
}

.major-data .major-score {
  color: #ffffff;
  font-weight: 800;
  background: #d65a31;
  border-color: rgba(214, 90, 49, 0.72);
}

.detail-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.detail-link:hover {
  text-decoration: underline;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(43, 122, 120, 0.22);
  border-radius: 7px;
}

.detail-link-button:hover {
  color: #ffffff;
  background: var(--accent);
}

.major-note {
  margin-top: 6px;
  color: #3b5964;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .project-identity {
    top: 62px;
    left: 10px;
    right: 10px;
    max-width: none;
  }

  .project-identity strong {
    font-size: 13px;
  }

  .project-identity span {
    display: none;
  }

  .candidate-profile__grid,
  .data-notice-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    top: 10px;
    grid-template-columns: minmax(0, 1fr) 58px auto;
    width: calc(100vw - 20px);
  }

  .search-button {
    font-size: 13px;
  }

  .mode-tools {
    top: auto;
    left: 10px;
    bottom: 10px;
  }

  .filter-drawer {
    top: 50%;
    left: 0;
  }

  .filter-drawer__body {
    width: calc(100vw - 70px);
    max-height: calc(100vh - 126px);
  }

  .filter-menu {
    grid-template-columns: 104px;
    min-height: 430px;
  }

  .filter-popover {
    left: 112px;
    width: calc(100vw - 196px);
  }

  .filter-popover--large {
    top: 50%;
    left: 122px;
    width: calc(100vw - 196px);
    min-width: 0;
    max-height: 70vh;
  }

  .major-name-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 50vh;
  }

  .province-options,
  .subject-options,
  .stage-options,
  .category-options,
  .level-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-input--wide,
  .filter-button,
  .filter-clear {
    grid-column: auto;
  }

  .search-results {
    top: calc(100% + 6px);
  }

  .toolbar {
    top: 122px;
    left: 10px;
  }

  .filter-panel {
    top: 50%;
    left: 46px;
    bottom: auto;
    width: min(360px, calc(100vw - 56px));
    max-height: 45vh;
    transform: translate(-10px, -50%);
  }

  .filter-panel.is-visible {
    transform: translate(0, -50%);
  }

  .status {
    right: 10px;
    bottom: 10px;
  }

  .city-panel {
    top: auto;
    right: 10px;
    bottom: 54px;
    width: calc(100vw - 20px);
    max-height: 45vh;
    transform: translateY(10px);
  }

  .city-panel.is-visible {
    transform: translateY(0);
  }

  .map-shell.has-favorites-open .city-panel.is-visible {
    right: 10px;
    bottom: 54px;
    max-height: 36vh;
  }

  .detail-content {
    width: calc(100vw - 20px);
    padding-top: 18px;
  }

  .detail-title {
    font-size: 24px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .major-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

