* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  height: 100%;
  touch-action: none;
  background: #0B0F16;
  font-family: Inter, system-ui, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  color: #FFFFFF;
}

#world {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  image-rendering: pixelated;
  touch-action: none;
}

#hud {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: clamp(8px, 2vmin, 14px) clamp(10px, 2.4vmin, 16px);
}

.chip {
  background: #12161E;
  border: 2px solid #05070B;
  padding: clamp(4px, 1.2vmin, 7px) clamp(7px, 1.8vmin, 12px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: clamp(74px, 16vmin, 132px);
}

.chip.right { text-align: right; }

.tag { font-size: clamp(13px, 2.6vmin, 17px); font-weight: 600; letter-spacing: 0.01em; }
.sub { font-size: clamp(10px, 2vmin, 13px); font-weight: 400; color: #E4E8EE; }
.label { font-weight: 400; font-size: clamp(9px, 1.8vmin, 12px); color: #E4E8EE; }

.panel {
  margin-top: auto;
  margin-bottom: 7%;
  background: #12161E;
  border: 3px solid #05070B;
  padding: clamp(10px, 2.4vmin, 16px) clamp(14px, 3vmin, 22px);
  text-align: center;
  max-height: 82%;
  overflow-y: auto;
  min-width: min(258px, 76vw);
  box-shadow: 8px 8px 0 rgba(5, 7, 11, 0.45);
}

.panel h1 { font-size: clamp(19px, 4.6vmin, 27px); font-weight: 600; letter-spacing: -0.02em; }
.panel h2 { font-size: clamp(17px, 3.8vmin, 22px); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 14px; }
.lead { font-size: 14px; color: #E4E8EE; margin-top: 4px; }

.picker {
  margin: 14px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #05070B;
  padding: 6px;
  pointer-events: none;
}

.picker button { pointer-events: auto; }

.picker span { font-size: 15px; font-weight: 500; flex: 1; }

.picker button {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  background: #1F2733;
  border: 0;
  width: clamp(34px, 9vmin, 46px);
  height: clamp(30px, 8vmin, 42px);
  cursor: pointer;
}

.picker button:hover { background: #2C3846; }

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 26px;
  padding: 6px 0;
  font-size: 14px;
  color: #E4E8EE;
}

.row strong { font-size: 20px; font-weight: 600; color: #FFFFFF; }

.prompt { margin-top: 12px; font-size: 13px; font-weight: 500; }

.bar-left { display: flex; align-items: stretch; gap: 8px; }

.back {
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  color: #FFFFFF;
  background: #12161E;
  border: 2px solid #05070B;
  width: clamp(30px, 7vmin, 40px);
  cursor: pointer;
  pointer-events: auto;
  flex: none;
}

.rotate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  background: #0B0F16;
  pointer-events: auto;
}

.rotate-inner { text-align: center; padding: 24px; }
.rotate-inner p { margin-top: 18px; font-size: 20px; font-weight: 600; }
.rotate-inner span { display: block; margin-top: 6px; font-size: 14px; color: #E4E8EE; }

@media (orientation: portrait) and (max-width: 900px) {
  .rotate { display: flex; }
}




.flag {
  position: absolute;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  background: #E0A32E;
  color: #14181F;
  border: 2px solid #05070B;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
}

.flag.rain { background: #2E7BA6; color: #FFFFFF; }

.radio {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(86%, 440px);
  background: #101014;
  overflow: hidden;
}

.radio-bar { display: block; height: 5px; background: #C4452F; }

.radio-head {
  background: #0A0A0A;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.radio-tag { width: 6px; height: 26px; background: #C4452F; flex: none; }
.radio-name { font-size: clamp(14px, 3.2vmin, 19px); font-weight: 800; letter-spacing: -0.01em; }
.radio-lap { margin-left: auto; font-size: 13px; font-weight: 700; }
.radio-said { padding: clamp(8px, 2vmin, 13px) 14px; font-size: clamp(12px, 2.8vmin, 16px); font-weight: 600; line-height: 1.35; }


.drs {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  font-family: inherit;
  color: #FFFFFF;
  background: #12161E;
  border: 2px solid #05070B;
  padding: 8px 12px;
  cursor: pointer;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: clamp(72px, 16vmin, 96px);
}

.drs-bar { display: block; height: 8px; background: #05070B; }
.drs-fill { display: block; height: 100%; width: 0%; background: #E4E8EE; }
.drs-word { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.drs.armed { background: #0E7C4A; pointer-events: auto; }
.drs.armed .drs-fill { background: #FFFFFF; }
.drs.open { background: #C4452F; }


.board { margin: 12px 0 4px; background: #05070B; padding: 8px 12px; text-align: left; }
.board-title { font-size: 12px; font-weight: 500; color: #E4E8EE; }
.board ol { list-style: none; margin: 6px 0 0; padding: 0; }
.board li { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.board li strong { font-weight: 600; }
.board li.fresh { color: #E0A32E; }

.seat { margin-top: 10px; font-size: 13px; font-weight: 500; color: #E4E8EE; }

.chip.pos { min-width: 92px; align-items: flex-start; }
.chip.pos .tag { font-size: clamp(15px, 3.2vmin, 21px); }

.back.off { background: #05070B; color: #7E8894; }
