html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #140c08;
  color: #efe6d2;
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
#view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
#hud .bar {
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 18px 0 18px;
  background: linear-gradient(to bottom, rgba(20,12,8,0.72), rgba(20,12,8,0));
}
#brand {
  min-width: 220px;
}
#brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: #efe6d2;
}
#brand p {
  margin: 2px 0 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #e8d6b8;
  opacity: 0.85;
}
#matchup {
  text-align: center;
  padding-top: 2px;
}
#matchup .vs {
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #ffe6a8;
}
#matchup .sub {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c4a574;
}
#tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}
.seg {
  display: flex;
  background: rgba(26,18,12,0.78);
  border: 1px solid #5a4030;
  border-radius: 10px;
  overflow: hidden;
}
.seg button {
  appearance: none;
  background: transparent;
  color: #e8d6b8;
  border: 0;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  min-width: 64px;
}
.seg button[aria-pressed="true"] {
  background: #3d348b;
  color: #ffd56a;
}
#fps {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #e8d6b8;
  background: rgba(26,18,12,0.66);
  border: 1px solid #5a4030;
  border-radius: 8px;
  padding: 5px 9px;
}
#hint {
  position: absolute;
  left: 18px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #e8d6b8;
  opacity: 0.8;
}
#note {
  position: absolute;
  right: 18px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #c4a574;
  opacity: 0.75;
  text-align: right;
  max-width: 46%;
}
#loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: #140c08;
  z-index: 10;
  transition: opacity 0.45s ease;
}
#loader.hide {
  opacity: 0;
  pointer-events: none;
}
#loader .mark {
  width: 52px;
  height: 52px;
}
#loader p {
  margin: 0;
  letter-spacing: 0.16em;
  font-size: 13px;
  color: #e8d6b8;
}
@media (max-height: 700px) {
  #brand h1 { font-size: 18px; }
  #hint, #note { font-size: 11px; }
}
