:root {
  --ink: #1f2a3a;
  --sub: #5b6676;
  --rule: #d5dbe3;
  --paper: rgba(255, 255, 255, 0.93);
}
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: 'LINE Seed JP', 'Hiragino Kaku Gothic ProN', sans-serif; color: var(--ink); }
#map { position: fixed; inset: 0; }
#anim { position: fixed; inset: 0; z-index: 1; pointer-events: none; display: none; }

.panel {
  position: fixed; top: 16px; left: 16px; z-index: 5;
  width: 270px; padding: 14px 16px 12px;
  background: var(--paper); border-radius: 6px;
  box-shadow: 0 1px 3px rgba(31, 42, 58, 0.2);
}
.who-cap { font-size: 11px; color: var(--sub); }
.who { font-size: 26px; font-weight: 700; margin: 2px 0 12px; line-height: 1.25; }

.modes { display: flex; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.modes button {
  flex: 1; border: 0; background: #fff; padding: 6px 4px;
  font: inherit; font-size: 12px; color: var(--sub); cursor: pointer;
}
.modes button[aria-pressed="true"] { background: var(--ink); color: #fff; }
button:focus-visible, input:focus-visible { outline: 2px solid #3b6fd8; outline-offset: 1px; }

.bar { height: 8px; border-radius: 2px;
  background: linear-gradient(90deg, #9ed8c6, #57b0ad, #2f7fa0, #34508d, #2b2463); }
.bar-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--sub); margin-top: 3px; }

.judge { font-size: 11px; color: var(--sub); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.keys { font-size: 10px; color: var(--sub); margin: 4px 0 0 20px; line-height: 1.7; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: -1px; margin-right: 3px; }

dl { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; font-size: 10px; }
dt { color: var(--sub); }
dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.route { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 11px; line-height: 1.7; }
.route strong { font-size: 15px; }
.route .sub { color: var(--sub); font-size: 10px; }
.hold { width: 100%; margin: 0 0 10px; padding: 7px 4px; border: 1px solid var(--rule); border-radius: 4px;
  background: #fff; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; user-select: none; touch-action: none; }
.hold:active, .hold[data-on="1"] { background: #e7ebf0; }
.cause-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; font-size: 10.5px; color: var(--sub); }
.cause-list i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: 2px; margin-right: 5px; }
.status { font-size: 10px; color: var(--sub); margin-top: 8px; line-height: 1.6; }
.debug {
  position: fixed; top: 16px; right: 16px; z-index: 6; max-width: 360px;
  padding: 10px 12px; background: #fffbe6; border: 2px solid #d9a400; border-radius: 6px;
  font-size: 13px; line-height: 1.6; white-space: pre-line; color: var(--ink);
}

.cross { position: fixed; left: 50%; top: 50%; width: 22px; height: 22px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 4; }
.cross::before, .cross::after { content: ''; position: absolute; background: var(--ink); }
.cross::before { left: 10.5px; top: 0; width: 1px; height: 22px; }
.cross::after { top: 10.5px; left: 0; height: 1px; width: 22px; }

@media (max-width: 600px) {
  .panel { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; }
  .who { font-size: 20px; margin-bottom: 8px; }
  dl { display: none; }
}
