/* UNDERTOW. Flat deep-water surfaces; warm amber for value; teal for clear
   water; red only for danger. Motion and sound carry the excitement. */

:root {
  --abyss: #050b15;
  --deep: #0a1828;
  --deep-2: #0f2236;
  --deep-3: #14304a;
  --line: #1f3d58;
  --foam: #e6f1f3;
  --mist: #8fa9b8;
  --sea: #2a8c9a;
  --teal: #4fd1c5;
  --pearl: #ffd9a0;
  --amber: #ffb547;
  --amber-ink: #2a1904;
  --coral: #ff7f5c;
  --danger: #e5383b;
  --radius: 12px;
  --display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--abyss);
  color: var(--foam);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
}
a {
  color: var(--teal);
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  word-break: break-all;
}
.num {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--mist);
}
.small {
  font-size: 0.85rem;
}
.label {
  display: block;
  font-size: 0.8rem;
  color: var(--mist);
  font-weight: 500;
}
.show-phone,
.show-phone-block {
  display: none;
}
.error {
  color: #ff9b9d;
}

/* ------------------------------------------------------------- buttons */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--deep-2);
  color: var(--foam);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover:not(:disabled) {
  background: var(--deep-3);
}
.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn:focus-visible,
.lane:focus-visible,
.gear:focus-visible,
.stake:focus-visible,
.emote:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--mist);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--foam);
  background: var(--deep-2);
}
.btn-icon {
  background: transparent;
  border-color: transparent;
  padding: 8px;
  color: var(--mist);
}
.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}
.btn-primary:hover:not(:disabled) {
  background: #ffc265;
}
.btn-surface {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}
.btn-surface:hover:not(:disabled) {
  background: #ffc265;
}
.btn-surface:disabled {
  opacity: 1;
  background: var(--deep-2);
  border-color: var(--line);
  color: var(--mist);
}
.btn-big {
  flex-direction: column;
  gap: 0;
  min-width: 190px;
  height: 72px;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  border-radius: 14px;
  line-height: 1.1;
}
.btn-sub {
  font-family: var(--ui);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.85;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--deep);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 600;
  cursor: default;
}
button.chip {
  cursor: pointer;
}

/* -------------------------------------------------------------- layout */
.app {
  min-height: 100vh;
}
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--deep);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--foam);
}
.logo-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
}
.balance {
  font-size: 0.95rem;
  margin-right: 6px;
  color: var(--pearl);
  min-width: 15ch;
  justify-content: flex-end;
}
.topbar {
  position: relative;
}
.conn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--amber);
  font-size: 0.85rem;
}
.fair-link-row {
  height: 1.4em;
}
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}
.play {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

/* --------------------------------------------------------------- stage */
.stage {
  position: relative;
  width: 100%;
  max-width: calc((100vh - 56px - 32px - 168px - 54px) * 1.6);
  min-width: 0;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #06121d;
  border: 1px solid var(--line);
  user-select: none;
  contain: layout paint;
}
.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.timebar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.35);
}
.timebar-fill {
  height: 100%;
  width: 100%;
  background: var(--teal);
  transform-origin: left center;
}
.hud {
  position: absolute;
  top: 10px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.hud-depth {
  display: flex;
  flex-direction: column;
}
.hud-depth-n {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
}
.hud-depth-n b {
  font-weight: 800;
}
.hud-biome {
  color: var(--mist);
  font-size: 0.85rem;
}
.hud-timer {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  min-width: 2ch;
  text-align: right;
}
.event-tag {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 70%;
  background: rgba(4, 14, 24, 0.82);
  border: 1px solid rgba(255, 217, 160, 0.4);
  color: var(--pearl);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.85rem;
  text-align: center;
  animation: drop 0.35s ease-out;
}

/* lanes: the whole column is the tap target, the card sits on top of it */
.lane {
  position: absolute;
  top: 17%;
  bottom: 0;
  pointer-events: auto;
  background: transparent;
  border: 0;
  padding: 0 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  cursor: default;
}
.lane.lane-live {
  cursor: pointer;
}
.lane:disabled {
  cursor: default;
}
.lane-card {
  position: relative;
  background: rgba(4, 14, 24, 0.78);
  border: 1px solid rgba(143, 169, 184, 0.28);
  border-radius: 12px;
  padding: 8px 10px 9px;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lane-live:hover:not(:disabled) .lane-card {
  border-color: rgba(79, 209, 197, 0.6);
}
.lane-mine .lane-card {
  border: 2px solid var(--teal);
  padding: 7px 9px 8px;
  transform: translateY(-2px);
}
.lane-sealed .lane-card {
  opacity: 0.55;
}
.lane-name {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-odds {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  margin: 2px 0 1px;
}
.lane-pct {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1.05;
}
.lane-mult {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--pearl);
}
.lane-sub {
  font-size: 0.8rem;
  color: var(--mist);
  height: 1.2em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-closed {
  color: var(--amber);
}
.lane-yours {
  color: var(--pearl);
}
.lane-outcome {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  border-radius: 999px;
  padding: 0 10px;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2em;
  animation: pop 0.28s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.lane-outcome-bad {
  background: var(--danger);
  color: #fff;
}
.lane-outcome-good {
  background: var(--teal);
  color: #06201d;
}
.lane-you {
  align-self: center;
  margin-top: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #06201d;
  background: var(--teal);
  border-radius: 999px;
  padding: 1px 9px;
}

.banner {
  position: absolute;
  left: 8%;
  right: 8%;
  text-align: center;
  pointer-events: none;
  animation: rise 0.35s ease-out;
}
.banner-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.3rem;
  line-height: 1.1;
}
.banner-small {
  color: var(--mist);
  margin-top: 6px;
}
.banner-lobby {
  top: 52%;
}
.banner-pocket {
  top: 30%;
}
.banner-summary {
  top: 40%;
}
.banner-taken {
  top: 72%;
}
.banner-taken .banner-big {
  color: #ff8a8c;
}
.banner-save {
  top: 72%;
}
.banner-save .banner-big {
  color: var(--pearl);
}

/* ------------------------------------------------------------ controls */
.controls {
  height: 168px;
  margin-top: 12px;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  overflow: hidden;
}
.join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  column-gap: 16px;
  row-gap: 8px;
  height: 100%;
}
.join-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.join-row .label {
  flex: 0 0 auto;
  width: 96px;
}
.join-gear {
  align-items: stretch;
}
.join-go {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
}
.joined-stake {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--pearl);
}
.stakes {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.stake {
  border: 1px solid var(--line);
  background: var(--deep-2);
  border-radius: 999px;
  padding: 5px 13px;
  font-weight: 600;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.stake.on {
  background: var(--pearl);
  border-color: var(--pearl);
  color: var(--amber-ink);
}
.gears {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.gear {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--deep-2);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.gear:hover:not(:disabled) {
  border-color: rgba(79, 209, 197, 0.6);
}
.gear.on {
  border: 2px solid var(--teal);
  padding: 7px 9px;
}
.gear:disabled {
  opacity: 0.45;
  cursor: default;
}
.gear-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--deep-3);
  display: grid;
  place-items: center;
  color: var(--pearl);
}
.gear-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.gear-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gear-name {
  font-weight: 700;
  font-size: 0.92rem;
}
.gear-blurb {
  font-size: 0.76rem;
  color: var(--mist);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.water {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  height: 100%;
}
.mult-block {
  display: flex;
  flex-direction: column;
}
.mult {
  font-family: var(--display);
  font-weight: 800;
  font-size: 3.1rem;
  line-height: 1;
  color: var(--pearl);
  display: inline-block;
  min-width: 6ch;
  transform-origin: left center;
}
.mult-up {
  animation: thump 0.48s ease-out;
}
.mult-x {
  font-size: 0.55em;
  margin-left: 2px;
}
.water-taken .mult {
  color: #ff8a8c;
}
.mult-value {
  color: var(--mist);
  font-weight: 600;
}
.water-mid {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  justify-content: flex-start;
  padding-top: 8px;
}
.kit {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kit-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--deep-2);
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
  font-size: 0.85rem;
  color: var(--foam);
}
.kit-item svg {
  color: var(--pearl);
}
.kit-item.used {
  opacity: 0.5;
}
.hint {
  font-size: 0.8rem;
  color: var(--mist);
  height: 2.6em;
  line-height: 1.3em;
  overflow: hidden;
}
.water-go .btn-big {
  min-width: 210px;
  height: 84px;
}

.watching {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 100%;
}
.result {
  display: flex;
  flex-direction: column;
}
.result-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1.15;
}
.result-good .result-big {
  color: var(--pearl);
}
.result-bad .result-big {
  color: #ff8a8c;
}
.watching-note {
  color: var(--mist);
  max-width: 340px;
  text-align: right;
}

.emotes {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  height: 42px;
}
.emote {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--deep);
  color: var(--pearl);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.emote:active {
  transform: scale(0.9);
}

/* ---------------------------------------------------------------- side */
.side {
  min-width: 0;
}
.sidepanel {
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px - 32px);
  max-height: 900px;
  min-height: 420px;
  overflow: hidden;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 11px 6px;
  color: var(--mist);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabs button.on {
  color: var(--foam);
  border-bottom-color: var(--teal);
}
.tabbody {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}
.empty {
  color: var(--mist);
  padding: 10px 6px;
  font-size: 0.9rem;
}
.divers,
.wall,
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.diver {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto 52px 74px;
  gap: 8px;
  align-items: center;
  padding: 7px 6px;
  border-bottom: 1px solid rgba(31, 61, 88, 0.5);
  font-size: 0.88rem;
}
.diver.me {
  background: rgba(79, 209, 197, 0.07);
  border-radius: 8px;
}
.diver-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.diver-gear {
  display: flex;
  gap: 3px;
  color: var(--pearl);
}
.diver-lane {
  color: var(--mist);
  font-size: 0.8rem;
}
.diver-st {
  text-align: right;
  font-weight: 600;
}
.st-taken {
  color: #ff8a8c;
}
.st-surfaced,
.st-floor {
  color: var(--pearl);
}
.diver-taken .diver-name {
  color: var(--mist);
}
.swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}
.feed li {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(31, 61, 88, 0.5);
  font-size: 0.86rem;
  animation: drop 0.3s ease-out;
}
.feed-surface {
  color: var(--pearl);
}
.feed-info {
  color: var(--mist);
}
.wall li {
  display: grid;
  grid-template-columns: 22px 12px minmax(0, 1fr) auto 70px;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(31, 61, 88, 0.5);
  font-size: 0.88rem;
}
.rank {
  color: var(--mist);
  font-weight: 700;
}
.wall-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wall-depth {
  font-weight: 700;
}
.wall-mult {
  text-align: right;
  color: var(--pearl);
}
.fair {
  border-top: 1px solid var(--line);
  padding: 10px 14px 12px;
  font-size: 0.85rem;
}
.fair code {
  color: var(--foam);
}
.fair-note {
  margin: 4px 0;
  color: var(--mist);
  font-size: 0.78rem;
}
.fair-link {
  font-weight: 600;
}

/* --------------------------------------------------------------- toasts */
.toasts {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}
.toast {
  background: var(--deep-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  animation: drop 0.25s ease-out;
}
.toast-good {
  border-color: rgba(255, 217, 160, 0.55);
  color: var(--pearl);
}
.toast-bad {
  border-color: rgba(229, 56, 59, 0.6);
}

/* --------------------------------------------------------------- modals */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(1, 5, 10, 0.72);
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal {
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(820px, 100%);
  outline: none;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
}
.modal-body {
  padding: 6px 20px 20px;
}
.modal-body h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 18px 0 8px;
}
.modal-body p,
.modal-body li {
  color: #cfdde3;
}
table.odds {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 8px 0;
}
.odds th,
.odds td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.odds th {
  color: var(--mist);
  font-weight: 600;
}
.gearlist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gearlist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.records {
  margin: 14px 0 0;
  font-size: 1.05rem;
}
.records b {
  color: var(--pearl);
  font-weight: 700;
}
.suits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.suit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--deep-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
}
.suit.on {
  border: 2px solid var(--teal);
  padding: 7px;
}
.suit:disabled {
  cursor: default;
  opacity: 0.6;
}
.suit-name {
  font-weight: 600;
  font-size: 0.85rem;
}
.suit-rule {
  font-size: 0.75rem;
  color: var(--mist);
  text-align: center;
}
.suit-swatch {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.codex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.codex-item {
  background: var(--deep-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.codex-item.found {
  border-color: rgba(255, 217, 160, 0.35);
}
.codex-name {
  font-weight: 600;
  font-size: 0.88rem;
}

/* --------------------------------------------------------------- verify */
.verify-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}
.verify-main h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2rem;
  margin: 10px 0 6px;
}
.verify-main h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
}
.lead {
  color: #cfdde3;
  max-width: 760px;
}
.verify-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 14px 0;
}
.verify-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--mist);
  font-size: 0.85rem;
}
.verify-form input {
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--foam);
  padding: 9px 12px;
  font-family: var(--mono);
  min-width: 140px;
}
.verify-form label:first-child input {
  min-width: min(520px, 80vw);
}
.recent {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.recent .label {
  margin-right: 6px;
}
.report {
  margin-top: 18px;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px 18px 18px;
}
.checks {
  padding-left: 18px;
}
.checks li {
  margin: 6px 0;
}
.ok {
  color: var(--teal);
}
.bad {
  color: #ff8a8c;
}
.seed code {
  color: var(--pearl);
}
.table-wrap {
  overflow-x: auto;
}
.layouts td {
  font-size: 0.82rem;
}
.manual,
.howto {
  margin-top: 26px;
}
.howto li {
  margin: 8px 0;
  color: #cfdde3;
}

/* ----------------------------------------------------------- animation */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
  }
}
@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes thump {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 1099px) {
  .main {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .stakes .stake {
    padding: 5px 10px;
  }
}
@media (max-width: 759px) {
  html,
  body {
    font-size: 14px;
  }
  .topbar {
    height: 52px;
    padding: 0 10px;
  }
  .topbar .btn-ghost {
    padding: 6px 8px;
  }
  .hide-phone {
    display: none !important;
  }
  .show-phone {
    display: inline;
  }
  .show-phone-block {
    display: block;
  }
  .gear-note {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.3em;
    height: 2.6em;
    overflow: hidden;
    color: var(--mist);
  }
  .balance {
    margin-right: 0;
    padding: 4px 9px;
    font-size: 0.85rem;
    min-width: 0;
  }
  .logo-word {
    font-size: 1rem;
  }
  .logo {
    gap: 6px;
  }
  .logo-mark,
  .logo img {
    width: 26px;
    height: 26px;
  }
  .main {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
    gap: 10px;
  }
  .stage {
    max-width: none;
    border-radius: 12px;
  }
  .hud {
    top: 8px;
    left: 10px;
    right: 10px;
  }
  .hud-depth-n {
    font-size: 1.05rem;
  }
  .hud-timer {
    font-size: 1.6rem;
  }
  .event-tag {
    top: 44px;
    max-width: 92%;
    font-size: 0.75rem;
  }
  .lane {
    top: 13%;
    padding: 0 3px;
  }
  .lane-card {
    padding: 6px 4px 7px;
    border-radius: 10px;
  }
  .lane-mine .lane-card {
    padding: 5px 3px 6px;
  }
  .lane-name {
    font-size: 0.78rem;
  }
  .lane-odds {
    flex-direction: column;
    gap: 0;
    align-items: center;
  }
  .lane-pct {
    font-size: 1.45rem;
  }
  .lane-mult {
    font-size: 1.05rem;
  }
  .lane-sub {
    font-size: 0.7rem;
  }
  .lane-you {
    margin-top: 20px;
  }
  .banner-big {
    font-size: 1.6rem;
  }
  .controls {
    height: 290px;
    margin-top: 8px;
    padding: 10px;
  }
  .join {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
  }
  .join-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .join-row .label {
    width: auto;
  }
  .join-go {
    grid-column: 1;
    grid-row: 4;
  }
  .join-go .btn-big {
    width: 100%;
    height: 56px;
    flex-direction: row;
    gap: 10px;
  }
  .stakes {
    justify-content: space-between;
  }
  .stake {
    flex: 1;
    padding: 6px 4px;
  }
  .gears {
    gap: 6px;
  }
  .gear {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6px 4px;
    gap: 4px;
  }
  .gear.on {
    padding: 5px 3px;
  }
  .gear-icon,
  .gear-icon img {
    width: 30px;
    height: 30px;
  }
  .gear-blurb {
    display: none;
  }
  .gear-name {
    font-size: 0.78rem;
  }
  .water {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    gap: 10px 12px;
    align-content: space-between;
  }
  .mult-block {
    grid-column: 1;
    grid-row: 1;
  }
  .water-mid {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start;
    height: auto;
  }
  .water-go {
    grid-column: 1 / span 2;
    grid-row: 3;
  }
  .water-go .btn-big {
    width: 100%;
    min-width: 0;
    height: 64px;
    flex-direction: row;
    gap: 12px;
    font-size: 1.35rem;
  }
  .water-pocket {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .water-pocket .water-go {
    grid-column: 2;
    grid-row: 1;
  }
  .water-pocket .water-go .btn-big {
    width: 150px;
    height: 64px;
    flex-direction: column;
    gap: 0;
    font-size: 1.15rem;
  }
  .water-pocket .water-mid {
    grid-column: 1 / span 2;
    grid-row: 2;
  }
  .mult {
    font-size: 2.6rem;
  }
  .water-mid .hint {
    display: none;
  }
  .water-hint-phone {
    grid-column: 1 / span 2;
    grid-row: 2;
  }
  .watching {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
  .watching-note {
    text-align: left;
  }
  .sidepanel {
    height: 440px;
  }

  .modal-back {
    padding: 10px 6px;
  }
  .modal-body {
    padding: 4px 12px 16px;
  }
}

.leader {
  display: block;
  margin-top: 6px;
  color: var(--foam);
}
.leader b {
  color: var(--pearl);
}
