:root {
  --cheongju-green: #80c342;
  --cheongju-brown: #552d14;
  --cheongju-blue: #739dd2;
  --cheongju-lime: #a6ce39;
  --cheongju-gray: #9e9f9a;
  --cream: #fffdf4;
  --cream-deep: #f5efd9;
  --brown-deep: #321a0b;
  --line: rgba(85, 45, 20, 0.22);
  --soft-shadow: 0 18px 44px rgba(85, 45, 20, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--cheongju-brown);
  background: var(--cream-deep);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 10px;
  z-index: 10000;
  padding: 12px 18px;
  border: 3px solid var(--brown-deep);
  border-radius: 12px;
  color: var(--cream);
  background: var(--cheongju-brown);
  font-weight: 900;
  transition: top 120ms ease;
}

.skip-link:focus {
  top: 10px;
}

.student-app {
  min-height: 100vh;
  overflow: hidden;
}

.student-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: end;
  padding: clamp(24px, 3.4vw, 44px) max(24px, calc((100vw - 1500px) / 2));
  color: var(--brown-deep);
  background:
    radial-gradient(circle at 83% 18%, rgba(255, 253, 244, 0.54) 0 7%, transparent 7.5%),
    radial-gradient(circle at 91% 70%, rgba(115, 157, 210, 0.72) 0 15%, transparent 15.5%),
    linear-gradient(128deg, var(--cheongju-lime), var(--cheongju-green));
  border-bottom: 6px solid var(--cheongju-brown);
}

.student-hero::before,
.student-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  opacity: 0.48;
}

.student-hero::before {
  width: 260px;
  height: 34px;
  right: 22%;
  bottom: 24px;
  background: var(--cream);
  transform: rotate(-8deg);
}

.student-hero::after {
  width: 120px;
  height: 120px;
  right: 3%;
  top: -45px;
  border: 20px solid var(--cheongju-blue);
}

.student-hero__copy {
  max-width: 850px;
}

.student-hero__eyebrow,
.panel-heading__eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.student-hero h1 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(2.1rem, 4.8vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
  word-break: keep-all;
}

.student-hero__intro {
  margin: 12px 0 0;
  max-width: 720px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 750;
  line-height: 1.65;
  word-break: keep-all;
}

.student-hero__guide {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  width: fit-content;
  padding: 10px 14px;
  border: 2px solid var(--cheongju-brown);
  border-radius: 999px;
  background: rgba(255, 253, 244, 0.88);
  font-size: 0.9rem;
  font-weight: 850;
  box-shadow: 4px 4px 0 rgba(85, 45, 20, 0.18);
}

.student-hero__guide span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.student-hero__guide b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: var(--cream);
  background: var(--cheongju-brown);
}

.student-hero__compass {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: clamp(112px, 11vw, 158px);
  aspect-ratio: 1;
  margin-right: clamp(10px, 5vw, 70px);
  border: clamp(8px, 1vw, 13px) solid var(--cream);
  border-radius: 50%;
  color: var(--cream);
  background: var(--cheongju-brown);
  box-shadow: 0 0 0 5px var(--cheongju-brown), 12px 14px 0 rgba(85, 45, 20, 0.18);
  transform: rotate(5deg);
}

.student-hero__compass strong {
  position: relative;
  z-index: 2;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.student-hero__compass-north {
  position: absolute;
  top: 10px;
  font-size: 0.75rem;
  font-weight: 950;
}

.student-hero__compass-needle {
  position: absolute;
  width: 18px;
  height: 72%;
  background: linear-gradient(to bottom, var(--cheongju-lime) 0 50%, var(--cheongju-blue) 50%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: rotate(28deg);
}

.student-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: 22px;
  width: min(calc(100% - 32px), 1500px);
  margin: 0 auto;
  padding: 28px 0 34px;
}

.map-panel,
.places-panel {
  min-width: 0;
}

.panel-heading,
.places-panel__heading {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-heading h2,
.places-panel h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  word-break: keep-all;
}

.panel-heading__eyebrow {
  color: var(--cheongju-green);
}

.map-status {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid var(--cheongju-brown);
  border-radius: 999px;
  background: var(--cream);
  font-size: 0.8rem;
  font-weight: 850;
}

.map-stage {
  position: relative;
  height: clamp(490px, 64vh, 740px);
  min-height: 490px;
  overflow: hidden;
  border: 5px solid var(--cheongju-brown);
  border-radius: 30px;
  background:
    linear-gradient(rgba(115, 157, 210, 0.17) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 157, 210, 0.17) 1px, transparent 1px),
    var(--cream);
  background-size: 34px 34px;
  box-shadow: var(--soft-shadow);
}

.student-map {
  position: absolute;
  inset: 0;
}

.student-map:focus-visible {
  outline: 5px solid var(--cheongju-blue);
  outline-offset: -8px;
}

.map-message {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  display: grid;
  gap: 6px;
  justify-items: center;
  width: min(calc(100% - 42px), 390px);
  padding: 24px;
  border: 3px solid var(--cheongju-brown);
  border-radius: 22px;
  background: rgba(255, 253, 244, 0.96);
  text-align: center;
  box-shadow: 8px 9px 0 rgba(85, 45, 20, 0.2);
  transform: translate(-50%, -50%);
}

.map-message strong {
  font-size: 1.06rem;
}

.map-message span:last-child {
  font-size: 0.9rem;
  line-height: 1.5;
}

.map-message.is-error {
  border-color: var(--cheongju-blue);
}

.map-message__spinner {
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  border: 6px solid var(--cream-deep);
  border-top-color: var(--cheongju-green);
  border-radius: 50%;
  animation: map-spinner 0.9s linear infinite;
}

.map-message.is-error .map-message__spinner {
  display: grid;
  place-items: center;
  border: 0;
  color: var(--cream);
  background: var(--cheongju-blue);
  animation: none;
}

.map-message.is-error .map-message__spinner::before {
  content: "!";
  font-size: 1.3rem;
  font-weight: 950;
}

@keyframes map-spinner {
  to {
    transform: rotate(360deg);
  }
}

.map-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 30;
  display: grid;
  grid-template-columns: 48px 48px auto;
  gap: 8px;
}

.map-control {
  min-height: 48px;
  border: 3px solid var(--cheongju-brown);
  border-radius: 14px;
  color: var(--brown-deep);
  background: var(--cream);
  font-weight: 900;
  box-shadow: 4px 5px 0 rgba(85, 45, 20, 0.2);
  cursor: pointer;
}

.map-control:hover:not(:disabled) {
  background: var(--cheongju-lime);
}

.map-control:active:not(:disabled) {
  box-shadow: 1px 2px 0 rgba(85, 45, 20, 0.2);
  transform: translate(2px, 2px);
}

.map-control:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.map-control--square {
  width: 48px;
  padding: 0;
  font-size: 1.7rem;
  line-height: 1;
}

.map-control--all {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 0 15px;
  white-space: nowrap;
}

.map-control--all span {
  font-size: 1.25rem;
}

.map-overlay {
  pointer-events: none;
}

.place-marker,
.place-cluster,
.region-marker {
  pointer-events: auto;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--brown-deep);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.place-marker {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 3px solid var(--cheongju-brown);
  border-radius: 50%;
  background: var(--cheongju-green);
  box-shadow: 4px 5px 0 rgba(85, 45, 20, 0.24);
  text-decoration: none;
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.place-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 17px;
  height: 17px;
  border-right: 3px solid var(--cheongju-brown);
  border-bottom: 3px solid var(--cheongju-brown);
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  z-index: 0;
}

.place-marker::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(255, 253, 244, 0.88);
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
}

.place-marker__number {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  font-weight: 950;
}

.place-marker__landmark {
  position: absolute;
  inset: 7px;
  z-index: 2;
  display: block;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.place-marker[data-landmark-state="ready"] .place-marker__number {
  visibility: hidden;
}

.place-marker__label {
  position: absolute;
  display: none;
  left: 50%;
  bottom: calc(100% + 11px);
  width: max-content;
  max-width: 190px;
  padding: 7px 10px;
  border: 2px solid var(--cheongju-brown);
  border-radius: 10px;
  color: var(--cream);
  background: var(--cheongju-brown);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
  box-shadow: 3px 4px 0 rgba(85, 45, 20, 0.18);
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 5;
}

.place-marker[data-show-label="true"] .place-marker__label {
  display: block;
}

.place-marker[data-selected="true"] {
  background: var(--cheongju-lime);
  box-shadow: 0 0 0 6px rgba(115, 157, 210, 0.7), 5px 6px 0 rgba(85, 45, 20, 0.26);
  transform: scale(1.08);
}

.place-cluster {
  width: 58px;
  height: 58px;
  padding: 0;
  border: 4px solid var(--cream);
  border-radius: 50%;
  color: var(--cream);
  background: var(--cheongju-brown);
  box-shadow: 0 0 0 4px var(--cheongju-blue), 5px 6px 0 rgba(85, 45, 20, 0.22);
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.region-marker {
  min-width: 72px;
  min-height: 42px;
  padding: 7px 12px;
  border: 3px solid var(--cheongju-brown);
  border-radius: 15px;
  color: var(--brown-deep);
  background: var(--cream);
  box-shadow: 4px 5px 0 rgba(85, 45, 20, 0.24);
  line-height: 1.15;
}

.region-marker strong {
  display: block;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 950;
}

.place-marker:hover,
.place-cluster:hover,
.region-marker:hover {
  filter: brightness(1.06);
}

.place-marker:focus-visible,
.place-cluster:focus-visible,
.region-marker:focus-visible,
.map-control:focus-visible,
.region-back-button:focus-visible,
.region-list__button:focus-visible,
.place-list__select:focus-visible,
.place-list__link:focus-visible {
  outline: 5px solid var(--cheongju-blue);
  outline-offset: 4px;
}

.places-panel {
  align-self: start;
  max-height: calc(64vh + 198px);
  overflow: hidden;
  padding: 20px;
  border: 4px solid var(--cheongju-brown);
  border-radius: 28px;
  background: var(--cream);
  box-shadow: var(--soft-shadow);
}

.places-panel__count {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--brown-deep);
  background: var(--cheongju-green);
  font-size: 1.2rem;
  font-weight: 950;
}

.places-panel__help {
  margin: -2px 0 14px;
  color: rgba(85, 45, 20, 0.75);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.region-back-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  margin: -2px 0 12px;
  padding: 7px 12px;
  border: 2px solid var(--cheongju-brown);
  border-radius: 12px;
  color: var(--brown-deep);
  background: var(--cream-deep);
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.region-back-button:hover {
  background: rgba(166, 206, 57, 0.48);
}

.region-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 2px;
  list-style: none;
}

.region-list__button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  padding: 8px 11px;
  border: 2px solid var(--line);
  border-radius: 15px;
  color: var(--brown-deep);
  background: var(--cream-deep);
  text-align: left;
  cursor: pointer;
}

.region-list__button:hover {
  border-color: var(--cheongju-brown);
  background: rgba(166, 206, 57, 0.32);
}

.region-list__order {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--cheongju-brown);
  border-radius: 50%;
  background: var(--cheongju-lime);
  font-size: 0.86rem;
  font-weight: 950;
}

.region-list__copy {
  min-width: 0;
}

.region-list__copy strong,
.region-list__copy small {
  display: block;
  word-break: keep-all;
}

.region-list__copy strong {
  font-size: 0.96rem;
  font-weight: 900;
}

.region-list__copy small {
  margin-top: 4px;
  color: rgba(85, 45, 20, 0.7);
  font-size: 0.76rem;
  font-weight: 750;
}

.region-empty {
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  min-height: 180px;
  margin: 0;
  padding: 28px 18px;
  border: 2px dashed var(--cheongju-gray);
  border-radius: 18px;
  background: var(--cream-deep);
  font-size: 1.02rem;
  font-weight: 900;
  text-align: center;
}

.place-list {
  display: grid;
  gap: 8px;
  max-height: calc(64vh + 74px);
  margin: 0;
  padding: 2px 5px 4px 2px;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: var(--cheongju-gray) var(--cream-deep);
}

.place-list__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 7px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: var(--cream-deep);
  transition: border-color 140ms ease, background 140ms ease;
}

.place-list__item[data-selected="true"] {
  border-color: var(--cheongju-brown);
  background: rgba(166, 206, 57, 0.42);
}

.place-list__select,
.place-list__link {
  min-height: 54px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.place-list__select {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  text-align: left;
}

.place-list__number {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--cheongju-brown);
  border-radius: 50%;
  overflow: hidden;
  color: var(--brown-deep);
  background: var(--cheongju-lime);
  font-size: 0.84rem;
  font-weight: 950;
}

.place-list__number-fallback {
  position: relative;
  z-index: 1;
}

.place-list__landmark {
  position: absolute;
  inset: 4px;
  z-index: 2;
  display: block;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.place-list__number[data-landmark-state="ready"] .place-list__number-fallback {
  visibility: hidden;
}

.place-list__name {
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.35;
  word-break: keep-all;
}

.place-list__link {
  display: grid;
  place-items: center;
  margin: 5px;
  border-radius: 10px;
  color: var(--cream);
  background: var(--cheongju-brown);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
}

@media (min-width: 1081px) {
  .student-explorer {
    align-items: stretch;
  }

  .places-panel {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
    max-height: none;
  }

  .place-list {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    /* Keep the 5px keyboard outline and its 4px offset inside the scrollport. */
    padding: 9px;
    overflow-y: auto;
    scroll-padding: 9px;
  }

  .region-list {
    flex: 1 1 0;
    min-height: 0;
    padding: 9px;
    overflow-y: auto;
    scroll-padding: 9px;
  }
}

.student-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 18px 24px;
  border-top: 5px solid var(--cheongju-brown);
  color: var(--cream);
  background: var(--cheongju-brown);
  text-align: center;
  white-space: nowrap;
}

.student-footer__brand {
  color: #d7b66f;
}

.student-footer__separator {
  color: #ffffff;
}

.student-footer__tagline {
  color: var(--cheongju-lime);
}

@media (max-width: 1080px) {
  .student-explorer {
    grid-template-columns: 1fr;
  }

  .places-panel {
    max-height: none;
  }

  .place-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }

  .region-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .student-hero {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 18px 14px;
    padding: 28px 20px 25px;
  }

  .student-hero__compass {
    width: 82px;
    margin-right: 4px;
    border-width: 6px;
  }

  .student-hero__compass-north {
    top: 5px;
  }

  .student-hero__guide {
    gap: 7px;
    padding: 9px 11px;
    border-radius: 18px;
    font-size: 0.78rem;
  }

  .student-explorer {
    width: min(calc(100% - 20px), 720px);
    padding-top: 20px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .map-status {
    max-width: 128px;
    text-align: center;
  }

  .map-stage {
    height: max(430px, 56vh);
    min-height: 430px;
    border-width: 4px;
    border-radius: 23px;
  }

  .map-controls {
    top: 11px;
    right: 11px;
    grid-template-columns: 46px 46px auto;
  }

  .map-control {
    min-height: 46px;
  }

  .map-control--square {
    width: 46px;
  }

  .map-control--all {
    justify-content: center;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .place-marker[data-show-label="true"] .place-marker__label {
    display: none;
  }

  .place-marker[data-selected="true"] .place-marker__label {
    display: block;
  }
}

@media (max-width: 640px) {
  .place-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 470px) {
  .student-hero {
    grid-template-columns: 1fr;
  }

  .student-hero__compass {
    display: none;
  }

  .student-hero__guide {
    grid-column: 1;
  }

  .panel-heading {
    display: grid;
    gap: 10px;
  }

  .map-status {
    width: fit-content;
    max-width: none;
  }

  .places-panel {
    padding: 16px;
    border-radius: 23px;
  }

  .region-list {
    grid-template-columns: 1fr;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
