/* Playbreak — same TOKEHUNT palette as the Academy drills: navy, cyan, lime. */

:root {
  --navy: #04101d;
  --panel: #081a2e;
  --panel-edge: #14374f;
  --cyan: #3fd9ff;
  --cyan-dim: #8fb3c7;
  --lime: #b8f235;
  --danger: #ff5470;
  --font: "Courier New", ui-monospace, Menlo, Consolas, monospace;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--navy);
  color: #dff3ff;
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: .06em;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

#gameShell { position: fixed; inset: 0; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ HUD --- */

#hud {
  position: absolute;
  top: calc(6px + env(safe-area-inset-top));
  left: 10px; right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  text-transform: uppercase;
}
.chip {
  background: rgba(8,26,46,.82);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip.mid { color: var(--cyan-dim); font-size: 10px; }
.chip.score { color: var(--lime); min-width: 70px; text-align: right; }

/* ------------------------------------------------------------- overlays --- */

.overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  background: rgba(2,8,16,.82);
  z-index: 5;
}

.panel {
  width: min(380px, 100%);
  max-height: calc(100vh - 22px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.55), inset 0 0 40px rgba(63,217,255,.04);
  text-transform: uppercase;
}

h1 { font-size: 34px; line-height: 1; color: var(--cyan); text-shadow: 0 0 18px rgba(63,217,255,.6); }
h1 span { color: var(--lime); text-shadow: 0 0 18px rgba(184,242,53,.55); }
h2 { font-size: 18px; color: var(--cyan); text-shadow: 0 0 14px rgba(63,217,255,.55); margin-bottom: 8px; }
.tagline { margin: 7px 0 8px; font-size: 10px; color: var(--cyan-dim); letter-spacing: .26em; }
.lore { font-size: 10px; color: var(--cyan-dim); line-height: 1.6; margin-bottom: 12px; text-transform: none; }

.traineeRow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.traineeCard { background: rgba(4,16,29,.7); border: 1px solid var(--panel-edge); border-radius: 12px; padding: 6px 10px 8px; }
.traineeCard span { display: block; font-size: 9px; color: var(--cyan-dim); }
.traineeCard strong { display: block; font-size: 13px; color: var(--cyan); margin-top: 2px; }
.arrowBtn {
  font: inherit; font-size: 15px;
  color: var(--lime);
  background: rgba(4,16,29,.7);
  border: 1px solid var(--panel-edge); border-radius: 12px;
  padding: 0 14px;
  cursor: pointer;
}
.arrowBtn:active { background: rgba(20,55,79,.7); }

/* -------------------------------------------------------- activity grid --- */

#activityGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.activityCard {
  font: inherit;
  background: rgba(4,16,29,.7);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 9px 4px 8px;
  cursor: pointer;
  color: inherit;
  text-transform: uppercase;
}
.activityCard:active { background: rgba(20,55,79,.6); transform: scale(.97); }
.aEmoji { display: block; font-size: 24px; line-height: 1.2; }
.activityCard strong { display: block; font-size: 9.5px; color: var(--cyan); margin-top: 3px; letter-spacing: .04em; }
.activityCard small { display: block; font-size: 8px; color: var(--cyan-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----------------------------------------------------- intro and results --- */

.compactPanel { padding: 18px 18px 16px; }
.controlHint { font-size: 10px; color: var(--lime); line-height: 1.6; margin-bottom: 10px; text-transform: none; }
.bestLine { font-size: 10px; color: var(--cyan-dim); margin-bottom: 12px; }

.scoreLine { font-size: 38px; color: var(--cyan); text-shadow: 0 0 16px rgba(63,217,255,.55); margin-bottom: 6px; }

.gradeBadge {
  width: 56px; height: 56px; line-height: 54px;
  margin: 0 auto 12px;
  font-size: 29px;
  color: #0c2405;
  background: linear-gradient(180deg, #96dd3f, #7dc832);
  border-radius: 14px;
  box-shadow: 0 0 22px rgba(184,242,53,.45);
}

.resultGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
.resultGrid div { background: rgba(4,16,29,.7); border: 1px solid var(--panel-edge); border-radius: 10px; padding: 7px 4px; }
.resultGrid small { display: block; font-size: 8.5px; color: var(--cyan-dim); }
.resultGrid strong { font-size: 14px; color: var(--cyan); }

.primaryBtn {
  width: 100%;
  font: inherit; letter-spacing: .14em; text-transform: uppercase;
  font-size: 16px;
  color: #0c2405;
  background: linear-gradient(180deg, #96dd3f, #7dc832);
  border: 0; border-radius: 12px;
  padding: 13px 0;
  margin-bottom: 10px;
  box-shadow: 0 5px 0 #47761a, 0 10px 24px rgba(125,200,50,.35);
  cursor: pointer;
}
.primaryBtn:active { transform: translateY(3px); box-shadow: 0 2px 0 #47761a; }

.secondaryBtn {
  font: inherit; letter-spacing: .12em; text-transform: uppercase;
  font-size: 12px;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--panel-edge); border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
}

.newBest { color: var(--lime); font-size: 13px; margin-bottom: 6px; animation: flashText .6s steps(2) infinite; }
.retryHint { font-size: 10px; color: var(--cyan-dim); letter-spacing: .18em; margin-bottom: 12px; }
@keyframes flashText { 50% { filter: brightness(1.6); } }
