:root {
  --bg: #e1d6b7;
  --panel: #f2efe6;
  --ink: #1d1d1b;
  --line: #9a9384;
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
}
#view {
  position: relative;
  flex: 1;
  min-height: 0;
}
#gl {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}
#box {
  position: absolute;
  border: 2px solid #000;
  background: rgba(0, 0, 255, 0.3);
  pointer-events: none;
}
#message {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 4px 6px;
  font-size: 18px;
  background: rgba(200, 200, 200, 0.8);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
#message.on {
  opacity: 1;
}
footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--panel);
  border-top: 1px solid #000;
  flex-wrap: wrap;
}
.buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
#caption {
  flex: 1;
  min-width: 200px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dataset {
  display: flex;
  gap: 8px;
  align-items: center;
}
#help {
  position: fixed;
  top: 8px;
  right: 8px;
  max-width: 340px;
  background: rgba(242, 239, 230, 0.92);
  border: 1px solid var(--line);
  padding: 4px 10px;
}
#help summary {
  cursor: pointer;
}
#help ul {
  padding-left: 18px;
  margin: 6px 0;
}
#help p {
  margin: 6px 0;
  color: #555;
}
