:root {
  --bg: #edf3ee;
  --ink: #18282b;
  --muted: #647376;
  --panel: rgba(255, 255, 255, 0.94);
  --line: #d8e2de;
  --green: #2f9d68;
  --blue: #2774c6;
  --yellow: #f0ad38;
  --red: #d9574a;
  --slate: #263238;
  --shadow: 0 18px 46px rgba(29, 50, 44, 0.15);
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(47, 157, 104, 0.13), transparent 34%),
    linear-gradient(225deg, rgba(240, 173, 56, 0.16), transparent 42%),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 800;
  padding: 11px 14px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(47, 157, 104, 0.24);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px 10px;
}

.topbar h1,
.topbar p {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.nav-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.nav-tabs a {
  border-radius: 7px;
  color: var(--muted);
  font-weight: 800;
  padding: 8px 12px;
}

.nav-tabs a.active {
  background: var(--slate);
  color: white;
}

.workspace,
.teacher-layout {
  padding: 0 16px 18px;
}

.join-panel,
.teacher-login {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  width: min(980px, calc(100vw - 32px));
  margin: 38px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.join-copy h2,
.teacher-login h2 {
  margin: 4px 0 12px;
  font-size: 28px;
  line-height: 1.28;
  letter-spacing: 0;
}

.join-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.quick-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.quick-codes span,
.facility-chip {
  border-radius: 999px;
  background: #edf5f0;
  color: #245945;
  font-size: 12px;
  font-weight: 850;
  padding: 7px 10px;
}

.join-form,
.teacher-login form,
.inline-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #415053;
  font-size: 14px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 157, 104, 0.14);
}

.form-message,
.hint {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(560px, 1fr) 292px;
  gap: 14px;
  height: calc(100vh - 88px);
  min-height: 690px;
}

.tool-panel,
.benefit-panel,
.map-stage,
.teacher-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-panel,
.benefit-panel {
  padding: 14px;
  overflow: auto;
}

.panel-title,
.map-toolbar,
.submissions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title span,
.map-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.panel-title strong,
.map-toolbar strong {
  display: block;
  margin-top: 2px;
}

.facility-palette {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.facility-tile {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.facility-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(31, 55, 48, 0.12);
}

.facility-tile.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 157, 104, 0.16);
}

.facility-tile small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.facility-tile em {
  display: block;
  margin-top: 5px;
  color: #245945;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.facility-tile.over-budget {
  background: #f6f1ed;
  color: #8a6f64;
}

.facility-tile.over-budget .facility-preview {
  opacity: 0.52;
}

.secondary-button {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  box-shadow: none;
}

.secondary-button:disabled {
  opacity: 0.48;
  box-shadow: none;
}

.budget-box {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cdded6;
  border-radius: 8px;
  background: #f7fbf8;
}

.budget-box span,
.budget-box small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.budget-box strong {
  font-size: 27px;
  line-height: 1.1;
}

.budget-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e4;
}

.budget-meter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--yellow));
  transition: width 180ms ease;
}

.map-stage {
  display: grid;
  grid-template-rows: auto auto minmax(430px, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.map-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(47, 157, 104, 0.12), rgba(240, 173, 56, 0.12)),
    rgba(255, 255, 255, 0.9);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.map-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(38, 50, 56, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 248, 245, 0.92));
}

.reference-filters {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.reference-filter {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.reference-filter input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.reference-filter span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid #cbded5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #385052;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(38, 50, 56, 0.06);
}

.reference-filter span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--filter-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.reference-filter input:checked + span {
  border-color: var(--filter-color);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 247, 0.94)),
    var(--filter-color);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.72),
    0 4px 0 rgba(38, 50, 56, 0.08);
}

.reference-filter input:not(:checked) + span {
  opacity: 0.58;
  text-decoration: line-through;
}

.filter-actions {
  display: flex;
  gap: 6px;
}

.filter-action-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #cbded5;
  background: white;
  color: #23484a;
  font-size: 12px;
  box-shadow: none;
}

.edit-hint {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 850;
}

.map-action-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.96);
  color: var(--slate);
  box-shadow: none;
  white-space: nowrap;
}

.map-action-button:disabled {
  opacity: 0.48;
  box-shadow: none;
}

.map-action-button.active {
  background: #ffcf5a;
  color: #2d250c;
  box-shadow: 0 0 0 3px rgba(255, 207, 90, 0.28);
}

.map-action-button.danger:not(:disabled) {
  background: #e03131;
  color: white;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  background: white;
  color: var(--slate);
  box-shadow: none;
  border: 1px solid var(--line);
}

.map-wrap {
  position: relative;
  min-height: 430px;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(30deg, rgba(47, 157, 104, 0.12) 12%, transparent 12% 24%, rgba(39, 116, 198, 0.09) 24% 36%, transparent 36%),
    #cfe1d9;
}

.leaflet-container {
  font-family: inherit;
}

.map-fallback {
  position: absolute;
  inset: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed rgba(38, 50, 56, 0.25);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    repeating-linear-gradient(45deg, rgba(47, 157, 104, 0.14) 0 16px, rgba(39, 116, 198, 0.1) 16px 32px);
  color: var(--slate);
  text-align: center;
  pointer-events: none;
}

.map-fallback span {
  color: var(--muted);
  font-size: 13px;
}

.writing-strip {
  display: grid;
  grid-template-columns: 0.9fr 1.25fr 0.9fr;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.intent-box {
  display: grid;
  align-content: start;
  gap: 8px;
  color: #415053;
  font-size: 14px;
  font-weight: 800;
}

.intent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.intent-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}

.intent-chip input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.intent-chip span {
  border: 1px solid #cbded5;
  border-radius: 999px;
  background: #f7fbf8;
  color: #245945;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 10px;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.intent-chip input:checked + span {
  border-color: #ffcf5a;
  background: #fff5cc;
  box-shadow: 0 0 0 3px rgba(255, 207, 90, 0.24);
  color: #473909;
}

.benefit-total {
  margin: 14px 0;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #173f37, #234d61),
    var(--slate);
  color: white;
}

.benefit-total span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 850;
}

.benefit-total strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
}

.benefit-cards {
  display: grid;
  gap: 9px;
}

.benefit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.benefit-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.benefit-card strong {
  font-size: 22px;
}

.plain-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  line-height: 1.45;
}

.plain-card.highlight {
  border-color: rgba(47, 157, 104, 0.38);
  background: #f4fbf7;
}

.plain-card.school {
  background: #f7f9fc;
}

.plain-card.risk {
  border-color: rgba(217, 87, 74, 0.34);
  background: #fff7f5;
}

.plain-card strong {
  font-size: 15px;
}

.plain-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.context-block {
  margin-top: 16px;
}

.context-block h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.context-cards {
  display: grid;
  gap: 12px;
}

.context-cards section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.context-cards h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #edf2ef;
}

.context-row:first-of-type {
  border-top: 0;
}

.context-row span {
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
}

.context-row strong {
  color: var(--blue);
  white-space: nowrap;
}

.submission-actions {
  margin-top: 14px;
}

.submission-actions button {
  width: 100%;
}

.iso-preview,
.facility-marker {
  --icon-color: var(--green);
  position: relative;
  width: 58px;
  height: 58px;
}

.iso-preview::before,
.facility-marker::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 3px;
  bottom: 1px;
  height: 13px;
  border-radius: 50%;
  background: rgba(27, 45, 40, 0.22);
  filter: blur(3px);
}

.iso-core {
  position: absolute;
  left: 9px;
  bottom: 9px;
  width: 34px;
  height: 34px;
  border-radius: 8px 8px 5px 5px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 45%), var(--icon-color);
  transform: skewY(-10deg) rotate(-3deg);
  box-shadow:
    7px 8px 0 rgba(24, 40, 43, 0.28),
    0 3px 10px rgba(0, 0, 0, 0.2);
}

.iso-core::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 4px;
  width: 28px;
  height: 13px;
  border-radius: 7px 7px 4px 4px;
  background: rgba(255, 255, 255, 0.52);
  transform: skewX(-28deg);
}

.iso-core::after {
  content: attr(data-symbol);
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 18px;
  font-weight: 950;
  opacity: 0.22;
  transform: skewY(10deg) rotate(3deg);
}

.type-hospital .iso-core {
  bottom: 7px;
  height: 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 44%),
    #d9574a;
}

.type-library .iso-core {
  width: 38px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 48%),
    #2774c6;
}

.type-park .iso-core,
.type-large_park .iso-core {
  width: 40px;
  height: 28px;
  border-radius: 12px 12px 6px 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 48%),
    #2f9d68;
}

.type-large_park .iso-core {
  width: 48px;
  height: 32px;
  left: 4px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 48%),
    #147c59;
}

.type-playground .iso-core {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 48%),
    #f0ad38;
}

.type-safety .iso-core {
  border-radius: 50% 50% 10px 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 48%),
    #6d7f89;
}

.model-cross,
.model-window,
.model-tree,
.model-path,
.model-pond,
.model-slide,
.model-swing,
.model-column,
.model-shield,
.model-beacon {
  position: absolute;
  z-index: 2;
  transform: skewY(10deg) rotate(3deg);
}

.model-cross {
  top: 7px;
  left: 14px;
  width: 12px;
  height: 12px;
}

.model-cross::before,
.model-cross::after {
  content: "";
  position: absolute;
  background: white;
  border-radius: 2px;
}

.model-cross::before {
  inset: 4px 0;
}

.model-cross::after {
  inset: 0 4px;
}

.model-window {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.68);
}

.model-window.w1 { left: 8px; bottom: 8px; }
.model-window.w2 { left: 17px; bottom: 8px; }
.model-window.w3 { left: 26px; bottom: 8px; }

.model-tree {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #b8e36e;
  box-shadow: 0 8px 0 -3px #6b8f38;
}

.model-tree.t1 { left: 7px; top: 5px; }
.model-tree.t2 { right: 8px; top: 8px; }
.model-tree.t3 { left: 24px; top: 2px; }

.model-path {
  left: 14px;
  bottom: 5px;
  width: 24px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
}

.model-pond {
  right: 7px;
  bottom: 5px;
  width: 15px;
  height: 8px;
  border-radius: 50%;
  background: #79c7df;
}

.model-slide {
  left: 9px;
  bottom: 7px;
  width: 20px;
  height: 14px;
  border-left: 5px solid #2774c6;
  border-bottom: 5px solid #d9574a;
  transform: skewY(10deg) rotate(-16deg);
}

.model-swing {
  right: 7px;
  top: 7px;
  width: 12px;
  height: 16px;
  border: 3px solid white;
  border-bottom: 0;
  opacity: 0.78;
}

.model-column {
  top: 11px;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.72);
}

.model-column.c1 { left: 10px; }
.model-column.c2 { left: 18px; }
.model-column.c3 { left: 26px; }

.model-shield {
  left: 10px;
  top: 8px;
  width: 17px;
  height: 20px;
  border-radius: 9px 9px 7px 7px;
  background: rgba(255, 255, 255, 0.78);
  clip-path: polygon(50% 0, 100% 20%, 84% 78%, 50% 100%, 16% 78%, 0 20%);
}

.model-beacon {
  right: 7px;
  top: 5px;
  width: 8px;
  height: 18px;
  border-radius: 6px;
  background: #ffdf6b;
  box-shadow: 0 0 9px rgba(255, 223, 107, 0.8);
}

.facility-marker {
  transform: translate(-29px, -52px);
  transition:
    transform 140ms ease,
    filter 140ms ease;
}

.facility-marker.selected,
.leaflet-marker-draggable.leaflet-drag-target .facility-marker {
  filter: drop-shadow(0 0 0.65rem rgba(240, 173, 56, 0.75));
  transform: translate(-29px, -56px) scale(1.12);
}

.reference-div-icon {
  border: 0;
  background: transparent;
}

.reference-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 54%),
    var(--ref-color);
  box-shadow:
    0 8px 18px rgba(21, 36, 38, 0.32),
    0 0 0 2px rgba(24, 40, 43, 0.08);
  color: white;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.candidate-dot {
  cursor: pointer;
  filter:
    drop-shadow(0 3px 5px rgba(43, 35, 15, 0.32))
    drop-shadow(0 0 7px rgba(245, 184, 60, 0.38));
  transition:
    filter 140ms ease,
    stroke-width 140ms ease,
    fill-opacity 140ms ease;
}

.candidate-dot:hover {
  filter:
    drop-shadow(0 5px 8px rgba(43, 35, 15, 0.38))
    drop-shadow(0 0 10px rgba(245, 184, 60, 0.56));
}

.safety-risk-div-icon {
  border: 0;
  background: transparent;
}

.safety-risk-marker {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50% 50% 50% 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 50%),
    #d9574a;
  box-shadow:
    0 8px 18px rgba(77, 28, 22, 0.34),
    0 0 0 3px rgba(217, 87, 74, 0.15);
  color: white;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
  transform: rotate(-45deg);
}

.safety-risk-marker::before {
  content: "!";
  font-size: var(--safety-symbol-size, 18px);
  transform: rotate(45deg);
}

.safety-risk-marker {
  font-size: 0;
}

.facility-preview,
.facility-div-icon .facility-marker {
  position: relative;
  display: grid;
  place-items: center;
  background: transparent;
}

.facility-preview {
  width: 66px;
  height: 66px;
}

.facility-div-icon {
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.facility-div-icon .facility-marker {
  width: var(--facility-size, 96px);
  height: var(--facility-size, 96px);
  transform: none;
  transform-origin: 50% 82%;
  transition:
    transform 140ms ease,
    filter 140ms ease;
}

.facility-preview::before,
.facility-div-icon .facility-marker::before {
  content: "";
  position: absolute;
  z-index: 0;
  height: 16px;
  border-radius: 50%;
  background: rgba(27, 45, 40, 0.22);
  filter: blur(4px);
}

.facility-preview::before {
  left: 12px;
  right: 8px;
  bottom: 4px;
}

.facility-div-icon .facility-marker::before {
  left: 15px;
  right: 12px;
  bottom: 8px;
}

.facility-preview img,
.facility-div-icon .facility-marker img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 6px 8px rgba(24, 40, 43, 0.24));
}

.facility-preview img {
  width: 64px;
  height: 64px;
}

.facility-div-icon .facility-marker img {
  width: var(--facility-size, 96px);
  height: var(--facility-size, 96px);
}

.facility-div-icon .facility-marker.selected,
.leaflet-marker-draggable.leaflet-drag-target .facility-marker {
  filter: drop-shadow(0 0 0.7rem rgba(240, 173, 56, 0.78));
  transform: translateY(-6px) scale(1.16);
}

.leaflet-marker-draggable.leaflet-drag-target {
  cursor: grabbing;
}

.map-wrap .move-mode {
  cursor: crosshair;
}

.type-large_park.facility-marker img,
.type-large_park.facility-preview img,
.type-hospital.facility-marker img,
.type-hospital.facility-preview img {
  width: 94%;
  height: 94%;
}

.facility-div-icon .facility-marker {
  width: var(--facility-size, 96px);
  height: var(--facility-size, 96px);
}

.facility-div-icon .facility-marker img {
  width: var(--facility-size, 96px);
  height: var(--facility-size, 96px);
}

.leaflet-interactive {
  transition:
    stroke-width 140ms ease,
    fill-opacity 140ms ease;
}

.teacher-login {
  grid-template-columns: 1fr;
  max-width: 520px;
}

.dashboard {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  align-items: start;
}

.teacher-column {
  display: grid;
  gap: 16px;
}

.teacher-section {
  padding: 16px;
}

.teacher-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.class-list,
.submission-list,
.student-activity-list {
  display: grid;
  gap: 10px;
}

.class-card,
.submission-card,
.student-activity-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.class-card {
  cursor: pointer;
}

.class-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 157, 104, 0.14);
}

.class-card strong,
.submission-card strong,
.student-activity-card strong {
  display: block;
}

.student-activity-card {
  display: grid;
  gap: 5px;
}

.student-activity-card span {
  width: fit-content;
  border-radius: 999px;
  background: #edf5f0;
  color: #245945;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 8px;
}

.student-activity-card.submitted {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 157, 104, 0.1);
}

.student-activity-card.draft {
  border-color: #f0ad38;
  box-shadow: 0 0 0 3px rgba(240, 173, 56, 0.12);
}

.student-activity-card.submitted span {
  background: #245945;
  color: white;
}

.student-activity-card.draft span,
.draft-badge {
  background: #fff3d6;
  color: #8a5a00;
}

.student-activity-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.submission-map {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.submission-pdf-button {
  width: auto;
  margin-top: 12px;
}

.submission-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.submission-export-actions .secondary-button {
  width: auto;
  margin-top: 0;
}

.submission-map-preview {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  margin-top: 10px;
  border: 2px solid #dce8e2;
  border-radius: 8px;
  background: #dceee8;
}

.submission-card.draft-card {
  border-color: #f0ad38;
  background: #fffdf8;
}

.draft-badge {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
  vertical-align: middle;
}

.pdf-report-sheet {
  position: fixed;
  left: -20000px;
  top: 0;
  z-index: 0;
  overflow: hidden;
  background: #ffffff;
  color: #14282b;
  pointer-events: none;
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    system-ui,
    sans-serif;
}

.pdf-report-sheet.portrait {
  width: 794px;
  height: 1123px;
}

.pdf-report-sheet.landscape {
  width: 1123px;
  height: 794px;
}

.facility-slide-sheet {
  position: fixed;
  left: -20000px;
  top: 0;
  width: 1600px;
  height: 900px;
  overflow: hidden;
  background: transparent;
  color: #122d34;
  pointer-events: none;
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    system-ui,
    sans-serif;
}

.facility-slide-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 910px 1fr;
  grid-template-rows: 104px 350px 122px 150px;
  gap: 18px 22px;
  box-sizing: border-box;
  height: 100%;
  padding: 46px 58px 42px;
  background: transparent;
}

.facility-slide-content header {
  grid-column: 1 / -1;
  align-self: end;
}

.facility-slide-content header span,
.facility-slide-cards span,
.facility-slide-details h3,
.facility-slide-summary strong {
  font-weight: 950;
}

.facility-slide-content header span {
  color: var(--facility-color);
  font-size: 22px;
}

.facility-slide-content h2 {
  margin: 7px 0 2px;
  color: #0f3340;
  font-size: 54px;
  line-height: 1.05;
  letter-spacing: 0;
}

.facility-slide-content header p {
  margin: 0;
  color: #52686c;
  font-size: 20px;
  font-weight: 850;
}

.facility-slide-map,
.facility-slide-cards article,
.facility-slide-details,
.facility-slide-summary {
  border: 3px solid rgba(18, 58, 69, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 0 rgba(18, 58, 69, 0.12);
}

.facility-slide-map {
  position: relative;
  grid-row: 2 / 4;
  overflow: hidden;
  background:
    repeating-linear-gradient(32deg, rgba(255, 255, 255, 0.4) 0 2px, transparent 2px 42px),
    #dceee8;
}

.facility-slide-map > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.facility-slide-map-label {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(18, 58, 69, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 5px 16px rgba(18, 58, 69, 0.15);
}

.facility-slide-map-label span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #203f46;
  font-size: 16px;
  font-weight: 950;
}

.facility-slide-map-label i {
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(18, 58, 69, 0.22);
}

.facility-slide-map-label .existing {
  background: #263238;
}

.facility-slide-map-label .planned {
  background: var(--facility-color);
}

.facility-slide-plan-map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 42% 48%, rgba(47, 157, 104, 0.16), transparent 34%),
    repeating-linear-gradient(30deg, rgba(255, 255, 255, 0.65) 0 2px, transparent 2px 48px),
    linear-gradient(135deg, #d7eee5, #edf2d9);
}

.facility-slide-map-district {
  position: absolute;
  left: 12%;
  top: 13%;
  width: 72%;
  height: 66%;
  border: 5px dashed rgba(18, 58, 69, 0.25);
  border-radius: 46% 54% 43% 57%;
  transform: rotate(-4deg);
}

.facility-slide-ref-point,
.facility-slide-planned-point {
  position: absolute;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
}

.facility-slide-ref-point {
  width: 13px;
  height: 13px;
  border: 2px solid white;
  border-radius: 50%;
  background: #263238;
  box-shadow: 0 3px 7px rgba(18, 58, 69, 0.2);
}

.facility-slide-planned-point {
  width: 42px;
  height: 42px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--point-color, var(--facility-color));
  color: white;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(18, 58, 69, 0.32);
}

.facility-slide-planned-point b {
  line-height: 1;
}

.facility-slide-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.facility-slide-cards article {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 18px;
  border-color: rgba(205, 224, 215, 0.96);
}

.facility-slide-cards span {
  color: var(--facility-color);
  font-size: 16px;
}

.facility-slide-cards strong {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: #14282b;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.facility-slide-cards small {
  display: block;
  margin-top: 6px;
  color: #52686c;
  font-size: 15px;
  font-weight: 850;
}

.facility-slide-details {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
  padding: 16px 18px;
  border-color: rgba(205, 224, 215, 0.96);
  overflow: hidden;
}

.facility-slide-details h3 {
  margin: 0 0 9px;
  color: #123a45;
  font-size: 21px;
}

.facility-slide-details ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facility-slide-details li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 8px;
  min-width: 0;
}

.facility-slide-details li b {
  grid-row: 1 / 3;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--facility-color);
  color: white;
  font-size: 12px;
}

.facility-slide-details li span,
.facility-slide-details li small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facility-slide-details li span {
  color: #203f46;
  font-size: 15px;
  font-weight: 950;
}

.facility-slide-details li small,
.facility-slide-details .more {
  color: #52686c;
  font-size: 13px;
  font-weight: 850;
}

.facility-slide-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 16px 20px;
  border-color: rgba(205, 224, 215, 0.96);
}

.facility-slide-summary strong {
  color: #123a45;
  font-size: 21px;
}

.facility-slide-summary p,
.facility-slide-summary em {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #2c4145;
  font-size: 17px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.facility-slide-summary em {
  color: var(--facility-color);
  font-weight: 950;
}

.report-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
}

.report-content {
  position: relative;
  z-index: 1;
  display: grid;
  box-sizing: border-box;
  height: 100%;
  padding: 34px 42px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(0deg, rgba(31, 122, 94, 0.035) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(31, 122, 94, 0.035) 0 1px, transparent 1px 30px);
}

.portrait .report-content {
  grid-template-rows: 76px 490px 112px 160px 106px 24px;
  gap: 10px;
}

.student-report.portrait .report-content {
  grid-template-rows: 72px 430px 104px 232px 142px 24px;
  gap: 9px;
}

.landscape .report-content {
  grid-template-columns: 676px 1fr;
  grid-template-rows: 82px 390px 172px 28px;
  gap: 12px 16px;
  padding: 34px 40px 28px;
}

.report-header {
  align-self: end;
}

.landscape .report-header {
  grid-column: 1 / -1;
}

.report-header span,
.report-summary-grid span,
.report-proposal h3,
.report-facilities h3,
.report-facility-row strong,
.report-more,
.pdf-report-sheet footer {
  font-weight: 950;
}

.report-header span {
  color: #1f7a5e;
  font-size: 15px;
}

.report-header h2 {
  margin: 5px 0 3px;
  color: #123a45;
  font-size: 31px;
  line-height: 1.12;
  letter-spacing: 0;
}

.landscape .report-header h2 {
  font-size: 29px;
}

.report-header p {
  margin: 0;
  color: #5f7072;
  font-size: 14px;
  font-weight: 800;
}

.report-map-frame {
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(18, 58, 69, 0.88);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(31, 122, 94, 0.08) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(31, 122, 94, 0.08) 0 1px, transparent 1px 34px),
    #dceee8;
  box-shadow:
    0 7px 0 rgba(18, 58, 69, 0.16),
    inset 0 0 0 2px rgba(255, 255, 255, 0.76);
}

.landscape .report-map-frame {
  grid-row: 2 / 4;
}

.report-map-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #dceee8;
}

.report-map-legend {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(18, 58, 69, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(18, 58, 69, 0.12);
}

.report-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #284347;
  font-size: 11px;
  font-weight: 900;
}

.report-map-legend i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--legend-color);
  color: white;
  font-size: 9px;
  font-style: normal;
  box-shadow: 0 2px 5px rgba(18, 58, 69, 0.18);
}

.report-map-fallback {
  display: grid;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #123a45;
  text-align: center;
}

.report-map-fallback strong {
  font-size: 22px;
}

.report-map-fallback span,
.report-empty {
  color: #627275;
  font-size: 15px;
  font-weight: 800;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.landscape .report-summary-grid {
  grid-template-columns: 1fr;
}

.report-summary-grid article,
.report-proposal,
.report-facilities {
  border: 2px solid rgba(205, 224, 215, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 5px 0 rgba(18, 58, 69, 0.08);
}

.report-summary-grid article {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 13px;
}

.report-summary-grid span {
  color: #1f7a5e;
  font-size: 12px;
}

.report-summary-grid strong {
  overflow-wrap: anywhere;
  color: #14282b;
  font-size: 18px;
  line-height: 1.2;
}

.report-summary-grid small {
  color: #627275;
  font-size: 12px;
  font-weight: 850;
}

.report-proposal {
  padding: 16px 18px;
  overflow: hidden;
}

.report-proposal h3,
.report-facilities h3 {
  margin: 0 0 8px;
  color: #123a45;
  font-size: 20px;
  line-height: 1.2;
}

.report-proposal p {
  margin: 4px 0;
  color: #2c4145;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.42;
}

.portrait .report-proposal p {
  font-size: 14px;
  line-height: 1.35;
}

.student-report.portrait .report-proposal {
  padding: 12px 16px;
}

.student-report.portrait .report-proposal h3 {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 6px;
  font-size: 19px;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-report.portrait .report-proposal p {
  display: -webkit-box;
  overflow: hidden;
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
}

.student-report.portrait .report-proposal p:nth-of-type(1) {
  -webkit-line-clamp: 2;
}

.student-report.portrait .report-proposal p:nth-of-type(2) {
  -webkit-line-clamp: 5;
}

.student-report.portrait .report-proposal p:nth-of-type(3) {
  -webkit-line-clamp: 2;
}

.report-facilities {
  padding: 13px 16px;
  overflow: hidden;
}

.report-facility-list {
  display: grid;
  gap: 7px;
}

.report-facility-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #2c4145;
  font-size: 14px;
  font-weight: 850;
}

.report-facility-row img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.report-facility-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-report.portrait .report-facilities {
  padding: 10px 14px;
}

.student-report.portrait .report-facilities h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.student-report.portrait .report-facility-list {
  gap: 5px;
}

.student-report.portrait .report-facility-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 6px;
  font-size: 12px;
}

.student-report.portrait .report-facility-row img {
  width: 28px;
  height: 28px;
}

.student-report.portrait .report-facility-row span {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-report.portrait .report-facility-row strong,
.student-report.portrait .report-more {
  font-size: 11px;
  white-space: nowrap;
}

.report-facility-row strong,
.report-more {
  color: #1f7a5e;
  font-size: 13px;
}

.pdf-report-sheet footer {
  align-self: end;
  color: #587073;
  font-size: 13px;
  text-align: center;
}

.landscape .report-proposal {
  grid-column: 1 / 2;
}

.landscape .report-facilities {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}

.landscape footer {
  grid-column: 1 / -1;
}

.teacher-report-landscape .report-content {
  grid-template-columns: 610px 1fr;
  grid-template-rows: 64px 160px 360px 86px 20px;
  gap: 12px 16px;
  padding: 30px 38px 26px;
}

.teacher-report-landscape .report-header {
  grid-column: 1 / -1;
}

.teacher-report-landscape .report-map-frame {
  grid-column: 1 / 2;
  grid-row: 2 / 4;
}

.teacher-report-landscape .report-summary-grid {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  grid-template-columns: repeat(2, 1fr);
}

.teacher-report-landscape .teacher-report-cards {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}

.teacher-report-landscape .report-proposal {
  grid-column: 1 / -1;
  grid-row: 4 / 5;
}

.teacher-report-landscape footer {
  grid-column: 1 / -1;
  grid-row: 5 / 6;
}

.teacher-report-portrait .report-content {
  grid-template-rows: 70px 330px 100px 310px 140px 22px;
  gap: 10px;
  padding: 34px 42px 28px;
}

.teacher-report-portrait .report-summary-grid {
  grid-template-columns: repeat(4, 1fr);
}

.teacher-report-cards,
.teacher-facility-card {
  border: 2px solid rgba(205, 224, 215, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 0 rgba(18, 58, 69, 0.08);
}

.teacher-report-cards {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.teacher-report-cards h3 {
  margin: 0;
  color: #123a45;
  font-size: 18px;
  line-height: 1.1;
}

.teacher-facility-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-height: 0;
}

.teacher-report-portrait .teacher-facility-cards {
  grid-template-columns: repeat(2, 1fr);
}

.teacher-facility-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border-color: var(--facility-color);
}

.teacher-facility-card-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.teacher-facility-card-title b {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--facility-color);
  color: white;
  font-size: 11px;
  box-shadow: 0 3px 8px rgba(18, 58, 69, 0.18);
}

.teacher-facility-card-title strong {
  display: -webkit-box;
  overflow: hidden;
  color: #123a45;
  font-size: 13px;
  line-height: 1.15;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.teacher-facility-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 7px;
  margin: 0;
}

.teacher-facility-card dl div {
  min-width: 0;
}

.teacher-facility-card dt {
  color: #1f7a5e;
  font-size: 9px;
  font-weight: 950;
}

.teacher-facility-card dd {
  display: -webkit-box;
  overflow: hidden;
  margin: 1px 0 0;
  color: #2c4145;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.teacher-facility-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #314d51;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.teacher-report-landscape .report-summary-grid article {
  gap: 3px;
  padding: 10px;
}

.teacher-report-landscape .report-summary-grid span,
.teacher-report-landscape .report-summary-grid small {
  font-size: 10px;
}

.teacher-report-landscape .report-summary-grid strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.teacher-report-portrait .teacher-report-cards {
  gap: 6px;
  padding: 10px;
}

.teacher-report-portrait .teacher-facility-cards {
  gap: 6px;
}

.teacher-report-portrait .teacher-facility-card {
  gap: 3px;
  padding: 7px;
}

.teacher-report-landscape .teacher-facility-card-title strong {
  font-size: 12px;
}

.teacher-report-landscape .teacher-facility-card dd {
  font-size: 9px;
  -webkit-line-clamp: 1;
}

.teacher-report-landscape .teacher-facility-card p,
.teacher-report-portrait .teacher-facility-card p {
  display: none;
}

.teacher-report .report-proposal h3 {
  font-size: 17px;
}

.teacher-report .report-proposal p {
  font-size: 13px;
  line-height: 1.34;
}

.teacher-report-portrait .report-proposal {
  padding: 12px 18px;
}

.teacher-report-portrait .report-proposal h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.teacher-report-portrait .report-proposal p {
  display: -webkit-box;
  overflow: hidden;
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.teacher-report-portrait .report-proposal p + p {
  -webkit-line-clamp: 3;
}

.teacher-report-landscape .report-proposal {
  padding: 10px 18px;
}

.teacher-report-landscape .report-proposal h3 {
  margin-bottom: 5px;
  font-size: 15px;
}

.teacher-report-landscape .report-proposal p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.teacher-report-landscape .report-proposal p + p {
  display: none;
}

.teacher-plan-map {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(47, 157, 104, 0.2), transparent 34%),
    linear-gradient(225deg, rgba(240, 173, 56, 0.18), transparent 38%),
    repeating-linear-gradient(30deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 52px),
    #cfe7dc;
}

.teacher-plan-map::before {
  content: "";
  position: absolute;
  inset: 42px 70px 54px;
  border: 3px dashed rgba(18, 58, 69, 0.36);
  border-radius: 44% 38% 47% 34%;
  background: rgba(255, 255, 255, 0.18);
}

.teacher-plan-point {
  position: absolute;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 9px rgba(24, 40, 43, 0.24));
}

.teacher-plan-point b {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--point-color, #2f9d68);
  color: white;
  font-size: 12px;
  line-height: 1;
}

.teacher-map-export-capture {
  position: fixed;
  left: -20000px;
  top: 0;
  z-index: 0;
  pointer-events: none;
}

.teacher-map-export-sheet {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  width: 1123px;
  height: 794px;
  padding: 30px;
  background: #f8fbfa;
  color: #14282b;
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    system-ui,
    sans-serif;
}

.teacher-map-export-sheet header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #123a45;
}

.teacher-map-export-sheet header span {
  color: #1f7a5e;
  font-weight: 950;
}

.teacher-map-export-sheet header strong {
  font-size: 20px;
}

.teacher-map-export-image,
.teacher-map-export-sheet .teacher-plan-map {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 3px solid rgba(18, 58, 69, 0.88);
  border-radius: 8px;
  object-fit: contain;
  background: #dceee8;
  box-shadow: 0 7px 0 rgba(18, 58, 69, 0.16);
}

@media (max-width: 1160px) {
  .app-shell,
  .dashboard {
    grid-template-columns: 1fr;
    height: auto;
  }

  .tool-panel,
  .benefit-panel {
    overflow: visible;
  }

  .facility-palette {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .writing-strip,
  .join-panel {
    grid-template-columns: 1fr;
  }

  .map-wrap {
    min-height: 590px;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace,
  .teacher-layout {
    padding-inline: 10px;
  }

  .join-panel,
  .teacher-login {
    width: 100%;
    margin: 16px auto;
    padding: 18px;
  }

  .map-wrap {
    min-height: 430px;
  }
}

body {
  background:
    linear-gradient(135deg, rgba(123, 75, 216, 0.16), transparent 32%),
    linear-gradient(225deg, rgba(245, 184, 60, 0.18), transparent 42%),
    linear-gradient(180deg, #eaf5f0, #dceee8);
}

.topbar {
  border-bottom: 1px solid rgba(38, 50, 56, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 245, 0.88));
  box-shadow: 0 8px 22px rgba(24, 40, 43, 0.08);
}

.topbar h1 {
  color: #173d48;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
}

.app-shell {
  gap: 16px;
}

.tool-panel,
.benefit-panel,
.map-stage {
  border: 2px solid rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 246, 0.95));
  box-shadow:
    0 18px 36px rgba(24, 40, 43, 0.16),
    inset 0 0 0 1px rgba(38, 50, 56, 0.08);
}

.panel-title,
.map-toolbar {
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, #173d48, #265d56);
  color: white;
}

.panel-title span,
.map-toolbar span {
  color: rgba(255, 255, 255, 0.72);
}

.map-toolbar {
  border-radius: 0;
  border-bottom: 2px solid rgba(38, 50, 56, 0.1);
}

.budget-box,
.benefit-total {
  border: 2px solid rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(135deg, #183d49, #1f6b5a);
  color: white;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.budget-box span,
.budget-box small,
.benefit-total span {
  color: rgba(255, 255, 255, 0.78);
}

.budget-meter {
  background: rgba(255, 255, 255, 0.2);
}

.facility-tile {
  min-height: 88px;
  border: 2px solid #d9e5df;
  background:
    linear-gradient(180deg, #ffffff, #f5faf7);
  box-shadow:
    0 5px 0 rgba(38, 50, 56, 0.08),
    0 12px 20px rgba(24, 40, 43, 0.08);
}

.facility-tile:hover {
  border-color: #9bcfb4;
  box-shadow:
    0 6px 0 rgba(38, 50, 56, 0.1),
    0 16px 24px rgba(24, 40, 43, 0.13);
}

.facility-tile.active {
  border-color: #ffcf5a;
  box-shadow:
    0 0 0 3px rgba(255, 207, 90, 0.36),
    0 8px 0 rgba(122, 86, 12, 0.12);
}

.facility-preview {
  width: 72px;
  height: 72px;
}

.facility-preview img {
  width: 72px;
  height: 72px;
}

#map {
  background:
    linear-gradient(30deg, rgba(47, 157, 104, 0.16) 12%, transparent 12% 24%, rgba(39, 116, 198, 0.1) 24% 36%, transparent 36%),
    #bfded2;
}

.plain-card,
.context-cards section,
.benefit-card {
  border: 2px solid #dce8e2;
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
  box-shadow: 0 5px 0 rgba(38, 50, 56, 0.07);
}

.plain-card.highlight {
  border-color: #7dcc9c;
  background: linear-gradient(180deg, #f2fff8, #ffffff);
}

.plain-card.risk {
  border-color: rgba(224, 49, 49, 0.38);
  background: linear-gradient(180deg, #fff5f5, #ffffff);
}

.reference-marker {
  box-shadow:
    0 8px 18px rgba(21, 36, 38, 0.36),
    0 0 0 3px rgba(255, 255, 255, 0.86);
}

.safety-risk-marker {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 50%),
    #e03131;
  box-shadow:
    0 8px 20px rgba(105, 18, 18, 0.42),
    0 0 0 4px rgba(224, 49, 49, 0.18);
}

body.student-page {
  background:
    linear-gradient(135deg, rgba(47, 157, 104, 0.16), transparent 30%),
    linear-gradient(225deg, rgba(123, 75, 216, 0.13), transparent 34%),
    repeating-linear-gradient(0deg, rgba(23, 61, 72, 0.045) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(23, 61, 72, 0.045) 0 1px, transparent 1px 28px),
    #e8f2ed;
}

.student-page .topbar {
  border-bottom: 2px solid rgba(255, 255, 255, 0.8);
  background:
    linear-gradient(180deg, #f8fffb, #dcece6);
  box-shadow:
    0 10px 0 rgba(23, 61, 72, 0.06),
    0 18px 34px rgba(24, 40, 43, 0.12);
}

.student-page .topbar h1 {
  color: #0f3340;
  text-shadow:
    0 2px 0 white,
    0 4px 0 rgba(47, 157, 104, 0.16);
}

.student-page .app-shell {
  grid-template-columns: 260px minmax(560px, 1fr) 304px;
  gap: 14px;
}

.student-page .tool-panel,
.student-page .benefit-panel,
.student-page .map-stage {
  border: 2px solid #173d48;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 243, 0.97));
  box-shadow:
    0 8px 0 rgba(23, 61, 72, 0.18),
    0 20px 34px rgba(24, 40, 43, 0.16),
    inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.student-page .panel-title,
.student-page .map-toolbar {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, #184f52, #123a45);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    0 4px 0 rgba(11, 35, 42, 0.18);
}

.student-page .budget-box,
.student-page .benefit-total {
  border-color: rgba(255, 207, 90, 0.58);
  background:
    linear-gradient(180deg, #1e7563, #144a4d);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -5px 0 rgba(0, 0, 0, 0.14);
}

.student-page .facility-tile {
  grid-template-columns: 76px 1fr;
  border: 2px solid #c9ded4;
  background:
    linear-gradient(180deg, #ffffff, #eef7f2);
  box-shadow:
    0 5px 0 rgba(23, 61, 72, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.student-page .facility-tile:hover {
  border-color: #61bf85;
  transform: translateY(-2px);
  box-shadow:
    0 7px 0 rgba(23, 61, 72, 0.14),
    0 16px 24px rgba(24, 40, 43, 0.12);
}

.student-page .facility-tile.active {
  border-color: #ffcf5a;
  background:
    linear-gradient(180deg, #fffdf0, #f4fbf6);
  box-shadow:
    0 0 0 3px rgba(255, 207, 90, 0.35),
    0 7px 0 rgba(132, 93, 13, 0.18);
}

.student-page .facility-preview {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #d9efe5, #b9d9cc);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -4px 0 rgba(23, 61, 72, 0.08);
}

.student-page .facility-preview img {
  width: 62px;
  height: 62px;
}

.student-page .map-wrap {
  border-top: 2px solid rgba(23, 61, 72, 0.2);
  border-bottom: 2px solid rgba(23, 61, 72, 0.12);
}

.student-page #map {
  background:
    linear-gradient(30deg, rgba(47, 157, 104, 0.13) 12%, transparent 12% 24%, rgba(39, 116, 198, 0.08) 24% 36%, transparent 36%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 54px),
    #b7d8ce;
}

.student-page .map-action-button,
.student-page .icon-button,
.student-page #savePdf,
.student-page #saveMapImage,
.student-page #sendToTeacher,
.student-page #submitPlan {
  border: 2px solid rgba(255, 255, 255, 0.84);
  box-shadow:
    0 4px 0 rgba(11, 35, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.student-page .plain-card,
.student-page .context-cards section,
.student-page .benefit-card {
  border: 2px solid #d2e4dc;
  box-shadow:
    0 5px 0 rgba(23, 61, 72, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.student-page .reference-marker {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.student-page .candidate-dot {
  filter:
    drop-shadow(0 2px 3px rgba(43, 35, 15, 0.28))
    drop-shadow(0 0 5px rgba(245, 184, 60, 0.42));
}

@media (max-width: 1160px) {
  .student-page .app-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .student-page .tool-panel,
  .student-page .benefit-panel {
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .student-page .workspace {
    padding-inline: 8px;
  }

  .student-page .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-page .toolbar-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .student-page .map-filter-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-page .reference-filters {
    width: 100%;
  }

  .student-page .filter-actions {
    width: 100%;
  }

  .student-page .map-action-button,
  .student-page #savePdf,
  .student-page #saveMapImage,
  .student-page #sendToTeacher {
    min-height: 44px;
    padding-inline: 10px;
  }
}

/* PPT guide inspired dark neon HUD theme */
:root {
  --bg: #07170f;
  --ink: #ecfff5;
  --muted: #92b6a3;
  --panel: rgba(10, 28, 20, 0.9);
  --line: rgba(75, 222, 145, 0.2);
  --green: #25a66a;
  --blue: #4b7cff;
  --yellow: #ffcf5a;
  --red: #ff565f;
  --slate: #0b1f12;
  --neon: #5df7a4;
  --neon-soft: rgba(93, 247, 164, 0.18);
  --hud-blue: #192840;
  --hud-purple: #7c3cff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

body,
body.student-page {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 9%, rgba(37, 166, 106, 0.28), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(91, 33, 182, 0.2), transparent 28%),
    linear-gradient(rgba(93, 247, 164, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 247, 164, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #06120d 0%, #0b1f12 48%, #101a2e 100%);
  background-size:
    auto,
    auto,
    34px 34px,
    34px 34px,
    auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 16%),
    radial-gradient(circle at 50% 120%, rgba(37, 166, 106, 0.16), transparent 42%);
  pointer-events: none;
}

.topbar,
.student-page .topbar {
  border-bottom: 1px solid rgba(93, 247, 164, 0.24);
  background:
    linear-gradient(90deg, rgba(11, 31, 18, 0.96), rgba(20, 50, 28, 0.9), rgba(25, 40, 64, 0.92));
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.32),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.topbar h1,
.student-page .topbar h1 {
  color: #f7fff9;
  text-shadow:
    0 0 16px rgba(93, 247, 164, 0.34),
    0 2px 0 rgba(0, 0, 0, 0.35);
}

.eyebrow,
.panel-title span,
.map-toolbar span,
.quick-codes span {
  color: var(--neon);
}

.nav-tabs {
  border-color: rgba(93, 247, 164, 0.2);
  background: rgba(7, 23, 15, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.nav-tabs a {
  color: #a9cdb8;
}

.nav-tabs a.active {
  background:
    linear-gradient(135deg, rgba(37, 166, 106, 0.96), rgba(17, 71, 60, 0.96));
  color: white;
  box-shadow: 0 0 18px rgba(93, 247, 164, 0.28);
}

.join-panel,
.teacher-login {
  border: 1px solid rgba(93, 247, 164, 0.28);
  background:
    linear-gradient(180deg, rgba(11, 31, 18, 0.94), rgba(9, 23, 31, 0.92));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 4px 0 rgba(93, 247, 164, 0.08);
}

.join-copy h2,
.teacher-login h2 {
  color: white;
  text-shadow: 0 0 18px rgba(93, 247, 164, 0.25);
}

.join-copy p,
.hint,
.form-message,
.meta-row,
.student-activity-card small {
  color: #a6c5b3;
}

.quick-codes span {
  border: 1px solid rgba(93, 247, 164, 0.22);
  background: rgba(93, 247, 164, 0.09);
  box-shadow: inset 0 0 18px rgba(93, 247, 164, 0.05);
}

input,
textarea {
  border-color: rgba(93, 247, 164, 0.2);
  background: rgba(4, 14, 10, 0.82);
  color: #f4fff8;
}

input::placeholder,
textarea::placeholder {
  color: rgba(210, 238, 220, 0.58);
}

input:focus,
textarea:focus {
  border-color: var(--neon);
  box-shadow:
    0 0 0 3px rgba(93, 247, 164, 0.15),
    0 0 22px rgba(93, 247, 164, 0.16);
}

button,
.teacher-login button,
.join-form button {
  background:
    linear-gradient(180deg, #32c987, #188257);
  color: white;
  box-shadow:
    0 10px 24px rgba(37, 166, 106, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.secondary-button,
.icon-button,
.filter-action-button,
.map-action-button,
.student-page .map-action-button,
.student-page .icon-button {
  border: 1px solid rgba(93, 247, 164, 0.24);
  background: rgba(8, 24, 17, 0.86);
  color: #dfffee;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.map-action-button.active,
.student-page .map-action-button.active {
  border-color: rgba(255, 207, 90, 0.78);
  background: linear-gradient(180deg, #ffdc75, #c58a16);
  color: #1d1605;
  box-shadow: 0 0 24px rgba(255, 207, 90, 0.38);
}

.map-action-button.danger:not(:disabled) {
  border-color: rgba(255, 86, 95, 0.5);
  background: linear-gradient(180deg, #ff6570, #bf2932);
}

.app-shell,
.student-page .app-shell {
  gap: 16px;
}

.tool-panel,
.benefit-panel,
.map-stage,
.teacher-section,
.student-page .tool-panel,
.student-page .benefit-panel,
.student-page .map-stage {
  border: 1px solid rgba(93, 247, 164, 0.24);
  background:
    linear-gradient(180deg, rgba(13, 35, 24, 0.94), rgba(8, 22, 31, 0.92));
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    inset 0 4px 0 rgba(93, 247, 164, 0.06);
}

.panel-title,
.map-toolbar,
.student-page .panel-title,
.student-page .map-toolbar,
.submissions-header {
  border: 1px solid rgba(93, 247, 164, 0.18);
  background:
    linear-gradient(90deg, rgba(20, 50, 28, 0.94), rgba(25, 40, 64, 0.94));
  color: white;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 22px rgba(93, 247, 164, 0.09);
}

.panel-title strong,
.map-toolbar strong,
.teacher-section h2,
.context-block h2 {
  color: #f5fff8;
}

.budget-box,
.benefit-total,
.student-page .budget-box,
.student-page .benefit-total {
  border: 1px solid rgba(255, 207, 90, 0.35);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 207, 90, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(20, 50, 28, 0.95), rgba(25, 40, 64, 0.95));
  box-shadow:
    0 0 28px rgba(255, 207, 90, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.budget-box strong,
.benefit-total strong,
.benefit-card strong,
.context-row strong {
  color: #fff6cb;
}

.budget-meter {
  background: rgba(255, 255, 255, 0.12);
}

.budget-meter span {
  background: linear-gradient(90deg, #5df7a4, #ffcf5a);
  box-shadow: 0 0 16px rgba(93, 247, 164, 0.42);
}

.facility-tile,
.student-page .facility-tile,
.class-card,
.submission-card,
.student-activity-card,
.plain-card,
.context-cards section,
.benefit-card,
.student-page .plain-card,
.student-page .context-cards section,
.student-page .benefit-card {
  border: 1px solid rgba(93, 247, 164, 0.18);
  background:
    linear-gradient(180deg, rgba(20, 50, 28, 0.84), rgba(9, 27, 32, 0.86));
  color: #f0fff5;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.facility-tile:hover,
.student-page .facility-tile:hover {
  border-color: rgba(93, 247, 164, 0.58);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.28),
    0 0 26px rgba(93, 247, 164, 0.13);
}

.facility-tile.active,
.student-page .facility-tile.active,
.class-card.active {
  border-color: rgba(255, 207, 90, 0.85);
  background:
    linear-gradient(180deg, rgba(65, 54, 22, 0.92), rgba(12, 35, 28, 0.9));
  box-shadow:
    0 0 0 2px rgba(255, 207, 90, 0.18),
    0 0 28px rgba(255, 207, 90, 0.2);
}

.facility-tile small,
.facility-tile em,
.benefit-card span,
.plain-card span,
.context-cards h3,
.context-row span,
.student-activity-card span,
.report-empty {
  color: #a8ccb6;
}

.facility-tile em {
  color: #5df7a4;
}

.facility-preview,
.student-page .facility-preview {
  border: 1px solid rgba(93, 247, 164, 0.18);
  background:
    radial-gradient(circle at 50% 26%, rgba(93, 247, 164, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(14, 42, 29, 0.95), rgba(7, 23, 27, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(93, 247, 164, 0.08);
}

.facility-preview::before,
.facility-div-icon .facility-marker::before {
  background: rgba(0, 0, 0, 0.36);
}

.facility-preview img,
.facility-div-icon .facility-marker img {
  filter:
    drop-shadow(0 7px 9px rgba(0, 0, 0, 0.36))
    drop-shadow(0 0 10px rgba(93, 247, 164, 0.12));
}

.map-stage,
.student-page .map-stage {
  overflow: hidden;
}

.map-filter-bar,
.writing-strip {
  border-color: rgba(93, 247, 164, 0.18);
  background:
    linear-gradient(180deg, rgba(7, 23, 15, 0.9), rgba(9, 24, 32, 0.88));
}

.map-wrap,
.student-page .map-wrap {
  border-color: rgba(93, 247, 164, 0.2);
  background: #06120d;
}

#map,
.student-page #map {
  background:
    linear-gradient(30deg, rgba(93, 247, 164, 0.08) 12%, transparent 12% 24%, rgba(75, 124, 255, 0.08) 24% 36%, transparent 36%),
    #123326;
}

.leaflet-tile-pane {
  filter: saturate(1.05) contrast(1.02) brightness(0.92);
}

.leaflet-control-zoom a,
.leaflet-control-attribution {
  border-color: rgba(93, 247, 164, 0.2) !important;
  background: rgba(7, 23, 15, 0.86) !important;
  color: #dcffed !important;
}

.reference-filter span,
.intent-chip span {
  border-color: rgba(93, 247, 164, 0.18);
  background: rgba(7, 23, 15, 0.68);
  color: #dfffee;
  box-shadow: none;
}

.reference-filter input:checked + span,
.intent-chip input:checked + span {
  border-color: var(--filter-color, #5df7a4);
  background:
    linear-gradient(180deg, rgba(93, 247, 164, 0.18), rgba(7, 23, 15, 0.72));
  color: white;
  box-shadow: 0 0 18px rgba(93, 247, 164, 0.12);
}

.intent-chip input:checked + span {
  border-color: rgba(255, 207, 90, 0.72);
  background: rgba(255, 207, 90, 0.14);
  color: #fff6cb;
}

.reference-filter input:not(:checked) + span {
  opacity: 0.46;
}

.plain-card.highlight,
.student-page .plain-card.highlight {
  border-color: rgba(93, 247, 164, 0.45);
  background:
    linear-gradient(180deg, rgba(20, 72, 48, 0.88), rgba(9, 27, 32, 0.86));
}

.plain-card.school {
  background:
    linear-gradient(180deg, rgba(22, 44, 82, 0.82), rgba(9, 27, 32, 0.86));
}

.plain-card.risk,
.student-page .plain-card.risk {
  border-color: rgba(255, 86, 95, 0.5);
  background:
    linear-gradient(180deg, rgba(80, 23, 28, 0.8), rgba(26, 18, 24, 0.88));
}

.context-row {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.reference-marker {
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(93, 247, 164, 0.2);
}

.hospital-marker {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 50%),
    #7c3cff;
  box-shadow:
    0 10px 24px rgba(64, 28, 140, 0.46),
    0 0 0 4px rgba(124, 60, 255, 0.2),
    0 0 18px rgba(124, 60, 255, 0.28);
}

.safety-risk-marker {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 50%),
    #ff303d;
  box-shadow:
    0 10px 24px rgba(120, 18, 26, 0.5),
    0 0 0 4px rgba(255, 48, 61, 0.22),
    0 0 20px rgba(255, 48, 61, 0.32);
}

.student-activity-card.submitted,
.student-activity-card.draft,
.submission-card.draft-card {
  background:
    linear-gradient(180deg, rgba(20, 50, 28, 0.9), rgba(9, 27, 32, 0.88));
}

.student-activity-card.submitted {
  border-color: rgba(93, 247, 164, 0.42);
}

.student-activity-card.draft,
.submission-card.draft-card {
  border-color: rgba(255, 207, 90, 0.48);
}

.student-activity-card.submitted span,
.student-activity-card.draft span,
.draft-badge {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(93, 247, 164, 0.14);
  color: #dfffee;
}

.student-activity-card.draft span,
.draft-badge {
  background: rgba(255, 207, 90, 0.16);
  color: #fff1bd;
}

.submission-map-preview {
  border-color: rgba(93, 247, 164, 0.24);
  background: #07170f;
}

@media (max-width: 1160px) {
  .student-page .app-shell,
  .app-shell,
  .dashboard {
    grid-template-columns: 1fr;
    height: auto;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .join-panel,
  .teacher-login {
    padding: 18px;
  }

  .join-copy h2,
  .teacher-login h2 {
    font-size: 24px;
  }

  .quick-codes span {
    font-size: 11px;
  }
}

/* Black, silver, and gold refinement */
:root {
  --bg: #050607;
  --ink: #f5f4ee;
  --muted: #aeb5bc;
  --panel: rgba(16, 17, 19, 0.94);
  --line: rgba(209, 214, 219, 0.22);
  --green: #d6aa45;
  --blue: #9fb4d8;
  --yellow: #f2c86b;
  --red: #ff5963;
  --slate: #0b0c0e;
  --neon: #f2c86b;
  --neon-soft: rgba(242, 200, 107, 0.16);
  --hud-blue: #16191f;
  --hud-purple: #d7dde3;
  --shadow: 0 26px 64px rgba(0, 0, 0, 0.46);
}

body,
body.student-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(242, 200, 107, 0.16), transparent 25%),
    radial-gradient(circle at 88% 16%, rgba(218, 225, 232, 0.12), transparent 30%),
    linear-gradient(rgba(210, 216, 222, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 216, 222, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #030405 0%, #090a0c 48%, #15181e 100%);
  background-size:
    auto,
    auto,
    34px 34px,
    34px 34px,
    auto;
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%),
    radial-gradient(circle at 50% 118%, rgba(242, 200, 107, 0.12), transparent 42%);
}

.topbar,
.student-page .topbar {
  border-bottom-color: rgba(242, 200, 107, 0.3);
  background:
    linear-gradient(90deg, rgba(3, 4, 5, 0.98), rgba(18, 19, 22, 0.94), rgba(31, 29, 23, 0.96));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.44),
    inset 0 -1px 0 rgba(242, 200, 107, 0.14);
}

.topbar h1,
.student-page .topbar h1 {
  color: #f7f2e4;
  text-shadow:
    0 0 18px rgba(242, 200, 107, 0.2),
    0 2px 0 rgba(0, 0, 0, 0.42);
}

.eyebrow,
.panel-title span,
.map-toolbar span,
.quick-codes span {
  color: #f2c86b;
}

.nav-tabs,
.join-panel,
.teacher-login,
.tool-panel,
.benefit-panel,
.map-stage,
.teacher-section,
.student-page .tool-panel,
.student-page .benefit-panel,
.student-page .map-stage {
  border-color: rgba(210, 216, 222, 0.2);
  background:
    linear-gradient(180deg, rgba(18, 19, 22, 0.96), rgba(8, 9, 11, 0.94));
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.44),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    inset 0 3px 0 rgba(242, 200, 107, 0.06);
}

.nav-tabs a.active,
button,
.teacher-login button,
.join-form button {
  background:
    linear-gradient(180deg, #f1ce78, #b88522);
  color: #11100b;
  box-shadow:
    0 10px 26px rgba(242, 200, 107, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.nav-tabs a {
  color: #c2c8ce;
}

.quick-codes span {
  border-color: rgba(242, 200, 107, 0.3);
  background: rgba(242, 200, 107, 0.1);
}

input,
textarea {
  border-color: rgba(210, 216, 222, 0.22);
  background: rgba(3, 4, 5, 0.82);
}

input:focus,
textarea:focus {
  border-color: #f2c86b;
  box-shadow:
    0 0 0 3px rgba(242, 200, 107, 0.13),
    0 0 22px rgba(242, 200, 107, 0.11);
}

.secondary-button,
.icon-button,
.filter-action-button,
.map-action-button,
.student-page .map-action-button,
.student-page .icon-button {
  border-color: rgba(210, 216, 222, 0.24);
  background: rgba(10, 11, 13, 0.9);
  color: #e8edf1;
}

.panel-title,
.map-toolbar,
.student-page .panel-title,
.student-page .map-toolbar,
.submissions-header {
  border-color: rgba(242, 200, 107, 0.18);
  background:
    linear-gradient(90deg, rgba(8, 9, 11, 0.98), rgba(27, 29, 34, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(242, 200, 107, 0.12);
}

.budget-box,
.benefit-total,
.student-page .budget-box,
.student-page .benefit-total {
  border-color: rgba(242, 200, 107, 0.42);
  background:
    radial-gradient(circle at 18% 10%, rgba(242, 200, 107, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(35, 32, 23, 0.96), rgba(16, 18, 23, 0.96));
}

.budget-meter span {
  background: linear-gradient(90deg, #cfd6dd, #f2c86b);
  box-shadow: 0 0 16px rgba(242, 200, 107, 0.34);
}

.facility-tile,
.student-page .facility-tile,
.class-card,
.submission-card,
.student-activity-card,
.plain-card,
.context-cards section,
.benefit-card,
.student-page .plain-card,
.student-page .context-cards section,
.student-page .benefit-card {
  border-color: rgba(210, 216, 222, 0.18);
  background:
    linear-gradient(180deg, rgba(26, 28, 33, 0.9), rgba(9, 10, 12, 0.88));
}

.facility-tile:hover,
.student-page .facility-tile:hover {
  border-color: rgba(242, 200, 107, 0.5);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(242, 200, 107, 0.1);
}

.facility-tile.active,
.student-page .facility-tile.active,
.class-card.active {
  border-color: rgba(242, 200, 107, 0.86);
  background:
    linear-gradient(180deg, rgba(55, 44, 20, 0.92), rgba(15, 16, 18, 0.9));
  box-shadow:
    0 0 0 2px rgba(242, 200, 107, 0.16),
    0 0 28px rgba(242, 200, 107, 0.16);
}

.facility-tile em,
.budget-box strong,
.benefit-total strong,
.benefit-card strong,
.context-row strong {
  color: #f5d98c;
}

.facility-preview,
.student-page .facility-preview {
  border-color: rgba(210, 216, 222, 0.2);
  background:
    radial-gradient(circle at 50% 26%, rgba(242, 200, 107, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(31, 34, 40, 0.96), rgba(7, 8, 10, 0.96));
}

.map-filter-bar,
.writing-strip {
  border-color: rgba(210, 216, 222, 0.14);
  background:
    linear-gradient(180deg, rgba(8, 9, 11, 0.94), rgba(12, 13, 16, 0.92));
}

#map,
.student-page #map {
  background:
    linear-gradient(30deg, rgba(242, 200, 107, 0.055) 12%, transparent 12% 24%, rgba(210, 216, 222, 0.055) 24% 36%, transparent 36%),
    #15181a;
}

.leaflet-tile-pane {
  filter: saturate(0.9) contrast(1.04) brightness(0.95);
}

.leaflet-control-zoom a,
.leaflet-control-attribution {
  border-color: rgba(210, 216, 222, 0.22) !important;
  background: rgba(8, 9, 11, 0.88) !important;
  color: #edf1f4 !important;
}

.reference-filter span,
.intent-chip span {
  border-color: rgba(210, 216, 222, 0.2);
  background: rgba(8, 9, 11, 0.76);
  color: #edf1f4;
}

.intent-chip input:checked + span {
  border-color: rgba(242, 200, 107, 0.72);
  background: rgba(242, 200, 107, 0.14);
  color: #f7e4ad;
}

.plain-card.highlight,
.student-page .plain-card.highlight {
  border-color: rgba(242, 200, 107, 0.38);
  background:
    linear-gradient(180deg, rgba(43, 37, 22, 0.9), rgba(10, 11, 13, 0.88));
}

.plain-card.school {
  background:
    linear-gradient(180deg, rgba(26, 32, 42, 0.9), rgba(10, 11, 13, 0.88));
}

.student-activity-card.submitted,
.student-activity-card.draft,
.submission-card.draft-card {
  background:
    linear-gradient(180deg, rgba(26, 28, 33, 0.92), rgba(9, 10, 12, 0.9));
}

.student-activity-card.submitted {
  border-color: rgba(210, 216, 222, 0.34);
}

.student-activity-card.draft,
.submission-card.draft-card {
  border-color: rgba(242, 200, 107, 0.46);
}

.student-activity-card.submitted span,
.student-activity-card.draft span,
.draft-badge {
  background: rgba(210, 216, 222, 0.12);
  color: #edf1f4;
}

.student-activity-card.draft span,
.draft-badge {
  background: rgba(242, 200, 107, 0.16);
  color: #f7e4ad;
}

/* ===== report v2 (P6) ===== */

/* ── 공통: 보고서 v2 sheet ─────────────────────────────────────── */
.pdf-report-sheet.report-v2 {
  background: #ffffff;
  color: #18282b;
}

/* ── 세로(portrait) 레이아웃 ───────────────────────────────────── */
.report-v2.portrait .report-content.rv2-portrait-content {
  display: grid;
  /* 행 높이 합계: 60+240+148+118+115+22=703, gap×5=40, pad=50 → 793≤794 */
  grid-template-rows: 60px 240px 148px 118px 115px 22px;
  gap: 8px;
  padding: 28px 36px 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.96)),
    repeating-linear-gradient(0deg, rgba(31,122,94,0.03) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(31,122,94,0.03) 0 1px, transparent 1px 30px);
}

/* ── 가로(landscape) 레이아웃 ──────────────────────────────────── */
.report-v2.landscape .report-content.rv2-landscape-content {
  display: grid;
  grid-template-columns: 480px 1fr;
  /* 행 높이 합계: 58+502+116+22=698, gap×3=24, pad=50 → 총 772≤794 */
  grid-template-rows: 58px 502px 116px 22px;
  gap: 8px 14px;
  padding: 28px 36px 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.96));
}

/* ── 헤더 ──────────────────────────────────────────────────────── */
.rv2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 2px solid #d2e8dc;
}

.rv2-header-left {
  min-width: 0;
}

.rv2-eyebrow {
  display: block;
  color: #1f7a5e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rv2-header h2 {
  margin: 3px 0 2px;
  color: #123a45;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv2-header p {
  margin: 0;
  color: #5f7072;
  font-size: 12px;
  font-weight: 800;
}

.rv2-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rv2-grade-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

.rv2-score-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid #18282b;
  color: #18282b;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

/* ── 1단 2열 (지도 / 레이더+표) ──────────────────────────────── */
.rv2-row1 {
  display: grid;
  grid-template-columns: 1fr 210px;
  grid-template-rows: 240px;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.rv2-map-frame {
  position: relative;
  overflow: hidden;
  height: 240px;
  border: 2px solid rgba(18,58,69,0.72);
  border-radius: 8px;
  background: #dceee8;
  box-shadow: 0 5px 0 rgba(18,58,69,0.12);
}

.rv2-map-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rv2-radar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d2e8dc;
  border-radius: 8px;
  background: #f8fbf9;
  overflow: hidden;
  min-height: 0;
}

/* 세로 보고서 레이더 이미지 높이 상한 */
.rv2-radar-col .rv2-chart-img {
  max-height: 140px;
  width: auto;
}

/* landscape 우측 열 — 3개 행이 균등 분할, 각 행 클리핑 */
.rv2-right-col {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.rv2-radar-row,
.rv2-bar-row,
.rv2-donut-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #d2e8dc;
  border-radius: 8px;
  background: #f8fbf9;
  overflow: hidden;
  min-height: 0;
}

/* ── 차트 이미지 공통 ─────────────────────────────────────────── */
.rv2-chart-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.rv2-bar-box {
  overflow: hidden;
}

.rv2-bar-box .rv2-chart-img {
  height: 100%;
  width: auto;
}

.rv2-donut-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

/* ── 영역별 점수 미니 표 ─────────────────────────────────────── */
.rv2-part-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  color: #18282b;
}

.rv2-part-table td {
  padding: 2px 4px;
  border-bottom: 1px solid #e4ebe6;
}

.rv2-part-table tr:last-child td {
  border-bottom: none;
}

.rv2-score-val {
  text-align: right;
  font-weight: 950;
  color: #1f7a5e;
  white-space: nowrap;
}

/* ── 2단 2열 (막대 / 도넛+예산) ──────────────────────────────── */
.rv2-row2 {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.rv2-bar-box,
.rv2-donut-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #d2e8dc;
  border-radius: 8px;
  background: #f8fbf9;
  overflow: hidden;
}

.rv2-donut-box {
  flex-direction: column;
}

.rv2-budget-line {
  margin: 0;
  color: #2c4145;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  line-height: 1.4;
}

/* ── 시설 표 ─────────────────────────────────────────────────── */
.rv2-facility-section {
  overflow: hidden;
  min-height: 0;
}

.rv2-facility-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  color: #18282b;
  table-layout: fixed;
}

.rv2-facility-table th {
  padding: 4px 6px;
  border-bottom: 2px solid #18282b;
  color: #1f7a5e;
  font-size: 10px;
  font-weight: 950;
  text-align: left;
  white-space: nowrap;
}

.rv2-facility-table td {
  padding: 2px 6px;
  border-bottom: 1px solid #e4ebe6;
  vertical-align: middle;
}

.rv2-facility-table tr:last-child td {
  border-bottom: none;
}

/* 시설명 열: 넘치면 말줄임 */
.rv2-facility-table td:first-child {
  max-width: 0; /* table-layout:fixed 시 필요 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv2-fac-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
  object-fit: contain;
}

.rv2-more {
  color: #627275;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

/* ── 자동 분석문 ─────────────────────────────────────────────── */
.rv2-analysis {
  padding: 6px 12px;
  border: 1px solid #d2e8dc;
  border-radius: 8px;
  background: #f4fbf7;
  overflow: hidden;
  min-height: 0;
}

.rv2-analysis p {
  margin: 0 0 4px;
  color: #2c4145;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.38;
  word-break: keep-all;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.rv2-analysis p:last-of-type {
  margin-bottom: 0;
}

.rv2-planner-quote {
  margin-top: 5px !important;
  color: #1f7a5e !important;
  font-style: italic;
  font-size: 11px !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1 !important;
  overflow: hidden;
}

/* ── 푸터 ────────────────────────────────────────────────────── */
.rv2-footer {
  align-self: end;
  color: #587073;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

/* ── landscape 특화 ─────────────────────────────────────────── */
.rv2-landscape-content .rv2-map-col {
  grid-row: 2 / 3;
  overflow: hidden;
}

.rv2-landscape-content .rv2-right-col {
  grid-row: 2 / 3;
  overflow: hidden;
}

.rv2-landscape-content .rv2-analysis {
  grid-column: 1 / -1;
  grid-row: 3 / 4;
  overflow: hidden;
}

.rv2-landscape-content .rv2-footer {
  grid-column: 1 / -1;
  grid-row: 4 / 5;
}

/* landscape 지도 프레임: 고정 240px 해제, 컬럼 높이에 맞춤 */
.rv2-landscape-content .rv2-map-frame {
  height: 100%;
}

/* landscape 분석문: 각 문장 1줄로 클램프 (4문장×~16px+pad≤116px) */
.rv2-landscape-content .rv2-analysis p {
  -webkit-line-clamp: 1;
}

.rv2-landscape-content .rv2-planner-quote {
  -webkit-line-clamp: 1 !important;
}

/* ── 시설 슬라이드 v2 (1600×900) ──────────────────────────────── */
.rv2-slide-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 820px 1fr;
  grid-template-rows: 110px 1fr 100px 120px;
  gap: 16px 24px;
  box-sizing: border-box;
  width: 1600px;
  height: 900px;
  padding: 40px 52px 36px;
  background: #ffffff;
  color: #18282b;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

/* 슬라이드 헤더 전폭 */
.rv2-slide-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 10px;
  border-bottom: 3px solid rgba(18,58,69,0.18);
  overflow: hidden;
  min-height: 0;
}

.rv2-slide-title-block {
  min-width: 0;
  overflow: hidden;
}

.rv2-slide-eyebrow {
  display: block;
  color: var(--facility-color, #2f9d68);
  font-size: 15px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.03em;
}

.rv2-slide-h2 {
  margin: 4px 0 3px;
  color: #0f3340;
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv2-slide-sub {
  margin: 0;
  color: #52686c;
  font-size: 15px;
  line-height: 1;
  font-weight: 850;
}

.rv2-slide-score-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  overflow: hidden;
}

.rv2-slide-grade {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.rv2-slide-total {
  font-size: 44px;
  font-weight: 950;
  color: #18282b;
  line-height: 1;
}

.rv2-slide-total span {
  font-size: 20px;
  color: #52686c;
}

.rv2-slide-mission {
  font-size: 14px;
  font-weight: 850;
  color: #52686c;
  line-height: 1;
}

/* 지도 영역 */
.rv2-slide-map {
  grid-row: 2 / 4;
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(18,58,69,0.72);
  border-radius: 12px;
  background: #dceee8;
  box-shadow: 0 8px 0 rgba(18,58,69,0.12);
}

.rv2-slide-map > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 차트 영역 (오른쪽 중단) */
.rv2-slide-chart-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 2px solid #d2e8dc;
  border-radius: 12px;
  background: #f8fbf9;
  overflow: hidden;
}

.rv2-slide-bar-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 핵심 수치 카드 (오른쪽 하단 3열) */
.rv2-slide-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  overflow: hidden;
  min-height: 0;
}

.rv2-slide-stat {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 16px;
  border: 2px solid rgba(205,224,215,0.96);
  border-radius: 12px;
  background: rgba(255,255,255,0.93);
  box-shadow: 0 4px 0 rgba(18,58,69,0.08);
  overflow: hidden;
  min-height: 0;
}

.rv2-slide-stat span {
  color: var(--facility-color, #2f9d68);
  font-size: 15px;
  font-weight: 950;
}

.rv2-slide-stat strong {
  display: block;
  color: #14282b;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rv2-slide-stat small {
  display: block;
  color: #52686c;
  font-size: 14px;
  font-weight: 850;
}

/* 핵심 분석 문장 (하단 전폭) */
.rv2-slide-impact {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border: 2px solid rgba(205,224,215,0.96);
  border-radius: 12px;
  background: rgba(255,255,255,0.93);
  box-shadow: 0 4px 0 rgba(18,58,69,0.08);
  overflow: hidden;
}

.rv2-slide-impact p {
  margin: 0;
  color: #2c4145;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  word-break: keep-all;
}

/* ── 공용 유틸 ───────────────────────────────────────────────── */
.rv2-no-data {
  color: #627275;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  padding: 12px;
}

/* ===== teacher report v2 (P7) ===== */

/* ── 세로 레이아웃 오버라이드 ──────────────────────────────────── */
.teacher-report.portrait .report-content.rv2-portrait-content,
.report-v2.portrait .report-content.trv2-portrait-content {
  grid-template-rows: 60px 240px 148px 118px 115px 22px;
  gap: 8px;
  padding: 28px 36px 22px;
  overflow: hidden;
}

/* ── 가로 레이아웃 오버라이드 ──────────────────────────────────── */
.teacher-report.landscape .report-content.rv2-landscape-content,
.report-v2.landscape .report-content.trv2-landscape-content {
  grid-template-columns: 480px 1fr;
  grid-template-rows: 58px 502px 116px 22px;
  gap: 8px 14px;
  padding: 28px 36px 22px;
  overflow: hidden;
}

/* ── 교사 전용: 영역별 점수 표에 코멘트 열 추가 ──────────────── */
.trv2-part-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  color: #18282b;
}

.trv2-part-table td {
  padding: 2px 4px;
  border-bottom: 1px solid #e4ebe6;
}

.trv2-part-table tr:last-child td {
  border-bottom: none;
}

.trv2-part-comment {
  color: #52686c;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
}

/* radar 열 좁히기 (코멘트 열이 추가돼 폭이 넉넉하지 않음) */
.rv2-radar-col .trv2-part-table .rv2-score-val {
  font-size: 10px;
}

.rv2-radar-col .trv2-part-comment {
  display: none; /* 세로 우측 좁은 열에서는 코멘트 생략 */
}

/* ── 교사 전용: 시설 칩 ──────────────────────────────────────── */
.trv2-fac-chip {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 999px;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
  margin-right: 3px;
  vertical-align: middle;
}

/* ── 교사 전용: 시설 섹션 overflow 보정 ─────────────────────── */
.trv2-facility-section {
  overflow: hidden;
  min-height: 0;
}

/* ── 교사 전용: 분석문 line-clamp (학생 보고서와 동일 — 115px 셀 기준) */
.trv2-analysis p {
  -webkit-line-clamp: 2;
}

.trv2-analysis .rv2-planner-quote {
  -webkit-line-clamp: 1 !important;
}

/* ── 교사 가로 우측 열: 차트 3개를 고르게 나눔 ────────────────── */
.trv2-right-col {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 8px;
  min-height: 0;
}

/* ── 교사 가로 분석문 위치 재배치 ───────────────────────────── */
.trv2-landscape-content .rv2-analysis {
  grid-column: 1 / -1;
  grid-row: 3 / 4;
}

.trv2-landscape-content .rv2-footer {
  grid-column: 1 / -1;
  grid-row: 4 / 5;
}

.trv2-landscape-content .rv2-map-col {
  grid-row: 2 / 3;
}

.trv2-landscape-content .trv2-right-col {
  grid-row: 2 / 3;
}

/* ══════════════════════════════════════════════════════════════════
   폰 화면(≤640px) 학생 작업공간 재구성
   목표: 지도(#map)를 첫 화면 가까이 끌어올리고, 모든 컨트롤의 탭 영역을
   40px 이상 확보한다. 데스크톱(이 미디어쿼리 밖)의 레이아웃은 그대로 둔다.
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .student-page .topbar {
    padding: 10px 12px 8px;
    gap: 8px;
  }

  .student-page .topbar h1 {
    font-size: 20px;
  }

  .student-page .nav-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
  }

  .student-page .app-shell {
    gap: 10px;
  }

  .student-page .map-stage {
    min-width: 0;
  }

  .student-page .map-stage > * {
    min-width: 0; /* map-stage는 grid-template-columns가 없어 암묵적 auto 트랙이 자식의
                     min-content만큼 늘어날 수 있다. 각 행(툴바/필터바/지도/작성란)을
                     명시적으로 0으로 눌러 뷰포트 밖으로 밀려나지 않게 한다. */
  }

  .student-page .tool-panel {
    padding: 10px;
    min-width: 0; /* 그리드 아이템 기본 min-width:auto가 가로 스크롤 팔레트의 내재
                     너비만큼 트랙을 밀어내 가로 스크롤이 생기는 것을 막는다 */
  }

  .student-page .facility-palette {
    min-width: 0;
  }

  .student-page .panel-title {
    padding: 8px 10px;
  }

  .student-page .budget-box {
    margin-top: 8px;
    padding: 6px 10px;
    gap: 2px;
  }

  .student-page .budget-box strong {
    font-size: 18px;
  }

  .student-page .budget-meter {
    height: 6px;
  }

  /* 시설 카드 6장을 세로로 쌓지 않고 가로 스크롤 칩으로 압축해
     지도가 화면 아래로 밀려나지 않게 한다. */
  .student-page .facility-palette {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    margin-top: 8px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none; /* Firefox: 스크롤바만큼 세로 공간을 더 먹지 않도록 숨긴다(스크롤 동작은 유지) */
  }

  .student-page .facility-palette::-webkit-scrollbar {
    display: none;
  }

  .student-page .facility-tile {
    grid-template-columns: unset;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 96px;
    min-height: 96px;
    gap: 2px;
    padding: 6px;
    text-align: center;
    scroll-snap-align: start;
  }

  .student-page .facility-tile > span:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .student-page .facility-tile .facility-preview,
  .student-page .facility-preview {
    width: 38px;
    height: 38px;
  }

  .student-page .facility-tile .facility-preview img,
  .student-page .facility-preview img {
    width: 34px;
    height: 34px;
  }

  .student-page .facility-tile strong {
    display: block;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.25;
    word-break: keep-all; /* "공원"·"센터"처럼 붙어 있어야 하는 단어가 음절 사이에서
                              잘리지 않도록 하고, 띄어쓰기 지점에서만 줄바꿈한다 */
    overflow-wrap: anywhere; /* 그래도 한 단어가 타일 폭보다 넓으면 그때만 강제로 자른다 */
  }

  .student-page .facility-tile small {
    display: none; /* 설명 문구는 폰 칩에서 생략하고 이름·가격만 보여준다 */
  }

  .student-page .facility-tile em {
    font-size: 11px;
    margin-top: 1px;
  }

  .student-page .hint {
    display: none; /* 팔레트를 가로 스크롤 칩으로 바꾸면서 자리를 아이콘/이름으로 충분히
                       설명하므로, 공간이 좁은 폰에서는 안내문을 생략한다 */
  }

  /* #moveSelected/#deleteSelected는 지도 툴바의 #moveSelectedTop/#deleteSelectedTop과
     완전히 동일한 동작(same handler)이라 폰 화면에서는 숨긴다. 기능은 그대로 유지된다. */
  .student-page #moveSelected,
  .student-page #deleteSelected {
    display: none;
  }

  .student-page .map-toolbar {
    padding: 6px 10px;
    gap: 4px;
  }

  .student-page .edit-hint {
    display: none; /* 팔레트 하단 안내문과 내용이 중복된다 */
  }

  /* 8개 버튼이 한 줄에 욱여넣어져 들쭉날쭉 줄바꿈되던 것을, 4열×2행의
     정돈된 그리드로 바꿔 겹침 없이 균일한 탭 영역을 확보한다. */
  .student-page .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    align-items: stretch; /* 라벨이 길어 2~3줄이 되는 버튼이 있어도 같은 행은 높이를 맞춘다 */
  }

  .student-page .toolbar-actions > button {
    width: 100%;
    min-width: 0; /* 그리드 트랙보다 긴 한글 라벨(min-content)이 트랙을 밀어내는 것을 막는다 */
    min-height: 44px;
    height: 100%;
    margin: 0;
    padding: 4px 4px;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal;
    word-break: keep-all; /* "지도 이미|지 저장"처럼 낱말 중간에서 끊기는 것을 막는다 */
    overflow-wrap: break-word;
  }

  .student-page .map-filter-bar {
    padding: 5px 10px;
    gap: 5px;
  }

  /* 참조 필터 칩이 여러 줄로 접히지 않도록 가로 스크롤 한 줄로 압축한다. */
  .student-page .reference-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .student-page .reference-filters::-webkit-scrollbar {
    display: none;
  }

  .student-page .reference-filter {
    position: relative; /* 내부 숨김 체크박스(position:absolute)의 containing block을 만들어,
                            가로 스크롤 중 뷰포트 기준 정적 위치로 새어나가 페이지 전체가
                            가로로 넘치는 것을 막는다 */
    flex: 0 0 auto;
  }

  .student-page .reference-filter span {
    min-height: 40px;
    white-space: nowrap;
  }

  .student-page .filter-actions {
    flex-wrap: nowrap;
  }

  .student-page .filter-action-button {
    min-height: 40px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .student-page .intent-chip span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  .student-page .writing-strip {
    padding: 10px;
    gap: 10px;
  }
}
