/*
 * /play shell: the tab switch between the two games. Shared by both pages so the
 * switch reads the same on each. Both games draw a screen-space HUD across the
 * top strip (score and a sub-line at the left, timer or wave in the centre, hull
 * at the right). The pill sits just under that strip on the left, in the band
 * between the HUD and the playfield, which is clear on both desktop and phone.
 */
.tabs {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top, 0px));
  left: max(10px, env(safe-area-inset-left));
  z-index: 7;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  border: 1.5px solid rgba(120, 220, 255, 0.28);
  background: rgba(8, 16, 28, 0.72);
  backdrop-filter: blur(4px);
}
.tab {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 9px;
  color: rgba(219, 234, 255, 0.7);
  font: 700 11px ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.tab:active { color: #dbeaff; }
.tab.is-on {
  color: #05060f;
  background: #6ad7ff;
}

@media (max-width: 440px) {
  .tab { padding: 6px 9px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tabs { backdrop-filter: none; }
}

/* On touch screens the bottom-left corner belongs to the LEFT / TURN pads, so the
   sound toggle moves to the top right, under the hull and seed (25 Nov: it sat on
   top of the LEFT pad on phones). Shared by both games. */
@media (hover: none) and (pointer: coarse) {
  .mute {
    left: auto;
    right: max(10px, env(safe-area-inset-right));
    bottom: auto;
    top: calc(64px + env(safe-area-inset-top, 0px));
  }
}

/*
 * The post-round card, shared additions (#172): personal best, the daily
 * challenge tag, catalogue facts, and a Share and Run again row. The base card
 * styles stay in each game's own stylesheet; these load after them.
 */
.card {
  max-height: calc(100% - 8px);
  overflow-y: auto;
  animation: card-in 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.pr-best {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(219, 234, 255, 0.7);
}
.pr-best.is-new { color: var(--warm); }
.pr-challenge {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed var(--panel-line);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}
.pr-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #05060f;
  background: rgba(219, 234, 255, 0.55);
}
.pr-tag.is-met { background: #8affc0; }
.pr-line .pr-fact { display: block; }
.pr-line .pr-fact + .pr-fact {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(219, 234, 255, 0.7);
}
.pr-row {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
}
.pr-row .pr-again,
.pr-row .pr-share {
  flex: 1 1 0;
  margin: 0;
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 12px;
  font: 700 14px ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.pr-share {
  border: 1.5px solid var(--warm);
  background: rgba(255, 178, 74, 0.12);
  color: var(--warm);
}
.pr-share:active { background: rgba(255, 178, 74, 0.24); }
.pr-seed { margin-top: 10px; }

@media (max-width: 440px) {
  .card { padding: 18px 16px 14px; }
  .pr-title { font-size: 19px; }
  .pr-score { font-size: 30px; }
  .pr-line { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
}
