:root {
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #17352f;
  background: #f2f5f5;
  font-size: 16px;
  --green: #09694d;
  --line: #d6e0dd;
  --muted: #60746d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0b88cf;
  outline-offset: 3px;
}
a {
  color: inherit;
}
.masthead {
  height: 88px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 750;
  text-decoration: none;
}
.brand-mark {
  background: var(--green);
  color: #fff;
  padding: 7px 9px;
  font-size: 24px;
  letter-spacing: -1px;
}
.brand-sub {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  display: block;
  margin-top: 3px;
}
.edition {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.edition span {
  margin-left: 12px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: calc(100dvh - 88px);
}
.map-area {
  padding: 28px 28px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--green);
  font-weight: 750;
  margin: 0 0 8px;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0;
  display: flex;
  gap: 15px;
  align-items: baseline;
}
#wing-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}
#floors {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: #e4ebe8;
  border-radius: 12px;
}
#floors button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 11px 17px;
  font-weight: 700;
  color: var(--muted);
}
#floors button[aria-pressed="true"] {
  background: var(--green);
  color: white;
  box-shadow: 0 2px 4px #003b2425;
}
.map-viewport {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  flex: 1;
  min-height: 450px;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.map-viewport:active {
  cursor: grabbing;
}
#floor-map {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.map-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
}
.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #4f655c;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1px solid #a9bbb4;
  border-radius: 2px;
}
.legend .event {
  background: #d6efdf;
  border-color: #78aa91;
}
.legend .normal {
  background: #eef3f2;
}
.legend .closed {
  background: #ffd15d;
  border-color: #c19731;
}
.zoom-controls {
  display: flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
}
.zoom-controls button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  min-width: 38px;
  height: 38px;
  font-size: 18px;
}
#reset {
  font-size: 14px;
  padding: 0 12px;
}
#zoom-value {
  font-size: 12px;
  min-width: 43px;
  text-align: center;
}
.sidebar {
  background: white;
  border-left: 1px solid var(--line);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 88px);
}
.detail {
  padding-bottom: 24px;
  min-height: 170px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
#place-name {
  font-size: 25px;
  line-height: 1.4;
}
#place-location {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
#place-group {
  margin-top: 14px;
  background: #e7f5ed;
  color: #126448;
  border-left: 3px solid #25805e;
  padding: 10px 12px;
  font-size: 16px;
}
.room-section {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 24px;
}
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.section-heading h2 {
  font-size: 16px;
}
.section-heading span {
  font-size: 12px;
  color: var(--muted);
}
.room-list {
  overflow: auto;
  min-height: 100px;
  padding: 0 4px 0 0;
}
.room-list button {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf1ee;
  text-align: left;
  padding: 13px 10px;
  color: #25463b;
  border-radius: 6px;
  font-size: 14px;
}
.room-list button small {
  display: block;
  color: #28724f;
  font-size: 12px;
  margin-top: 5px;
}
.room-list button:hover,
.room-list button[aria-pressed="true"] {
  background: #e7f3ec;
}
.side-note {
  font-size: 12px;
  color: var(--muted);
  padding: 20px 0 14px;
}
.source-link {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  font-size: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.map-room {
  cursor: pointer;
}
.room-shape {
  fill: #eff3f2;
  stroke: #648c7b;
  stroke-width: 2;
}
.map-room.has-group .room-shape {
  fill: #dbefdf;
}
.map-room:hover .room-shape {
  stroke: #17734e;
  stroke-width: 3;
}
.map-room.is-selected .room-shape {
  stroke: #086b4b;
  stroke-width: 5;
}
.map-room:focus {
  outline: none;
}
.map-room:focus-visible .room-shape {
  stroke: #0077bc;
  stroke-width: 5;
}
.room-label {
  font-size: 20px;
  font-weight: 600;
  fill: #25453b;
  pointer-events: none;
}
.group-label {
  font-size: 17px;
  font-weight: 600;
  fill: #18714e;
  pointer-events: none;
}
.small-room .room-label {
  font-size: 16px;
}
.map-corridor {
  fill: #fafcfb;
  stroke: none;
}
.connector {
  fill: url(#steps);
  stroke: #648c7b;
  stroke-width: 2;
}
.connector.ev {
  fill: #e4edf3;
  stroke: #7393a4;
}
.connector-text {
  fill: #3e676c;
  font-size: 20px;
  font-weight: 700;
  pointer-events: none;
}
.barrier {
  fill: url(#closed);
  stroke: #cd9b20;
  stroke-width: 2;
}
.barrier-text {
  fill: #755100;
  font-size: 16px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #ffe4a1;
  stroke-width: 4;
}
.wing-label {
  font-size: 23px;
  font-weight: 750;
  fill: #58766a;
  letter-spacing: 4px;
}
.boundary {
  fill: none;
  stroke: #648c7b;
  stroke-width: 2;
}
#load-error {
  padding: 30px;
  color: #9e3329;
}
@media (min-width: 1600px) {
  .map-area {
    padding: 36px;
  }
  .sidebar {
    padding: 36px 26px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}
@media (max-width: 950px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .map-area {
    padding: 20px 16px;
  }
  .masthead {
    padding: 0 22px;
  }
  .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .map-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .map-viewport {
    min-height: 480px;
  }
}
@media (max-width: 680px) {
  .masthead {
    height: 72px;
    padding: 0 16px;
  }
  .edition span {
    display: none;
  }
  .workspace {
    display: block;
  }
  .map-area {
    padding: 22px 12px 16px;
  }
  .map-toolbar {
    gap: 18px;
    padding: 0 6px;
  }
  .map-toolbar h1 {
    font-size: 30px;
  }
  #floors {
    width: 100%;
  }
  #floors button {
    flex: 1;
  }
  .map-viewport {
    height: 58dvh;
    min-height: 360px;
    flex: auto;
  }
  .map-footer {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .legend {
    gap: 12px;
  }
  .sidebar {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
    padding: 24px 18px;
  }
  .detail {
    min-height: 0;
  }
  .room-list {
    max-height: 330px;
  }
  .room-section {
    padding-top: 20px;
  }
  .side-note {
    padding-top: 16px;
  }
}
