* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  color: #1c2420;
  background: #f3f5f4;
  font-family: "Segoe UI", "Yu Gothic UI", "Hiragino Sans", sans-serif;
  line-height: 1.5;
}

header {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #d7ddd9;
}

header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

header p {
  margin: 2px 0 0;
  color: #4d5a53;
  font-size: 0.875rem;
}

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
}

#map {
  height: 100%;
  min-height: 420px;
  background: #e6f0f7;
}

aside {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: #fff;
  border-left: 1px solid #d7ddd9;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 700;
}

input[type="search"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c5cfc9;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

#result-count {
  margin: 12px 0 8px;
  color: #4d5a53;
  font-size: 0.875rem;
}

#footage-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#footage-list button {
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: #f7faf8;
  border: 1px solid #d7ddd9;
  border-radius: 8px;
  cursor: pointer;
}

#footage-list button.is-selected {
  background: #e8f6ee;
  border-color: #1f7a45;
}

.item-location,
.item-file {
  display: block;
}

.item-location { font-weight: 700; }

.item-file {
  margin-top: 2px;
  color: #4d5a53;
  font-size: 0.875rem;
  word-break: break-all;
}

.empty, .hint, .error {
  margin: 0;
  color: #4d5a53;
}

#detail {
  padding-top: 4px;
  border-top: 1px solid #e4ebe7;
}

#detail h2 {
  margin: 12px 0 8px;
  font-size: 1rem;
}

#detail dl {
  margin: 0 0 12px;
}

#detail dt {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4d5a53;
}

#detail dd {
  margin: 0 0 8px;
  word-break: break-all;
}

.switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.switcher button {
  font: inherit;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d7ddd9;
  background: #fff;
  cursor: pointer;
}

.switcher button.is-selected {
  background: #e8f6ee;
  border-color: #1f7a45;
}

video {
  width: 100%;
  background: #111;
  border-radius: 8px;
}

.maps-link {
  display: inline-block;
  margin-top: 12px;
  color: #146c3a;
  font-weight: 700;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid #1f7a45;
  outline-offset: 2px;
}

@media (max-width: 800px) {
  body { display: block; height: auto; }
  .layout { display: block; }
  #map { height: 58vh; min-height: 280px; }
  aside { border-left: 0; border-top: 1px solid #d7ddd9; }
}
