:root {
  --bits-deep: #004d6e;
  --bits-accent: #03a9f4;
  --bits-ice: #f0f7fb;
  --bits-navy: #0f2230;
  --bits-slate: #30424f;
  --bits-soft: #d6e8f1;
  --bits-danger: #ff6b5f;
  --bits-hacker: #ff8357;
  --bits-employee: #5bd4b0;
  --bits-hidden: #09131c;
  --bits-room: #11384d;
  --bits-room-alt: #0a2c3d;
  --shadow: 0 24px 60px rgba(4, 32, 46, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(3, 169, 244, 0.18), transparent 35%),
    linear-gradient(160deg, #07131c, #0f2230 60%, #123247);
  color: #fff;
  font-family: "IBM Plex Sans", sans-serif;
}

body[data-mode="player"] {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button,
.ghost-button {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  background: linear-gradient(135deg, var(--bits-accent), #3ac7ff);
  color: #052033;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.emergency-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #ff8a7d, #e02626);
  color: #fff5f3;
  box-shadow: 0 10px 24px rgba(224, 38, 38, 0.28);
}

.emergency-button__icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 1.2rem;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

input,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.app-shell {
  width: min(1440px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

body[data-mode="player"] .app-shell {
  width: min(1560px, calc(100vw - 0.5rem));
  height: 100dvh;
  padding: 0.35rem 0 0.45rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

body[data-mode="player"] .hero {
  display: none;
}

.hero__logo {
  width: 180px;
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

body[data-mode="player"] .hero__logo {
  width: 116px;
  padding: 0.7rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: #89daff;
}

.lobby-code--host {
  color: #ff5b5b;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 0 16px rgba(255, 91, 91, 0.45);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.subtitle {
  max-width: 70ch;
  color: rgba(255, 255, 255, 0.82);
}

body[data-mode="player"] .subtitle {
  display: none;
}

.panel {
  background: rgba(7, 19, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.card {
  background: linear-gradient(180deg, rgba(17, 56, 77, 0.88), rgba(7, 19, 28, 0.9));
  border-radius: 24px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-main {
  position: relative;
}

.info-card a,
.info-card code {
  display: inline-block;
  margin-top: 0.5rem;
  color: #89daff;
}

.functional-tests-card {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.functional-tests-result {
  margin: 0;
  padding: 0.75rem;
  border-radius: 14px;
  min-height: 7.5rem;
  white-space: pre-wrap;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(233, 248, 255, 0.92);
  background: rgba(6, 16, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: auto;
}

.functional-tests-result--pass {
  border-color: rgba(91, 212, 176, 0.65);
  box-shadow: 0 0 0 1px rgba(91, 212, 176, 0.25) inset;
}

.functional-tests-result--fail {
  border-color: rgba(255, 107, 95, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 107, 95, 0.25) inset;
}

.stack {
  display: grid;
  gap: 0.75rem;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.8fr);
  gap: 1rem;
  min-height: 0;
}

.side-panel {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-height: 0;
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
}

body[data-mode="player"] .game-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body[data-mode="player"] .panel {
  padding: 0.6rem;
}

body[data-mode="player"] .game-layout.panel {
  height: 100%;
}

#game-map {
  position: relative;
  padding-right: 21rem;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.75rem;
}

#game-map.game-map--critical {
  border: 3px solid rgba(255, 64, 64, 0.95);
  border-radius: 18px;
  animation: criticalPulse 650ms ease-in-out infinite;
}

#game-map.game-map--slip-hit {
  animation: slipHitShake 520ms cubic-bezier(0.22, 0.74, 0.34, 1);
}

@keyframes criticalPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 64, 64, 0);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 64, 64, 0.58);
  }
}

@keyframes slipHitShake {
  0% {
    transform: translate3d(0, 0, 0);
    filter: saturate(1);
  }
  20% {
    transform: translate3d(-5px, 2px, 0) rotate(-0.4deg);
    filter: saturate(1.12);
  }
  40% {
    transform: translate3d(5px, -2px, 0) rotate(0.35deg);
  }
  60% {
    transform: translate3d(-4px, 1px, 0) rotate(-0.22deg);
  }
  80% {
    transform: translate3d(3px, -1px, 0) rotate(0.16deg);
  }
  100% {
    transform: translate3d(0, 0, 0);
    filter: saturate(1);
  }
}

.map-fullscreen-button {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.95rem;
  background: rgba(7, 19, 28, 0.88);
  color: #eefbff;
  border: 1px solid rgba(137, 218, 255, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.map-fullscreen-button__icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}

.presenter-layout {
  display: grid;
  gap: 1rem;
}

.toolbar,
.toolbar__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.banner {
  margin: 1rem 0;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.08);
}

.banner--hacker {
  background: rgba(255, 131, 87, 0.16);
  border: 1px solid rgba(255, 131, 87, 0.4);
}

.banner--employee {
  background: rgba(91, 212, 176, 0.16);
  border: 1px solid rgba(91, 212, 176, 0.35);
}

.banner--meeting,
.banner--ended {
  background: rgba(3, 169, 244, 0.16);
  border: 1px solid rgba(3, 169, 244, 0.32);
}

.player-color-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.18rem 0.6rem;
  margin-left: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.92em;
}

.player-color-badge__dot {
  width: 0.75rem;
  height: 0.75rem;
  flex: 0 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: inline-block;
}

.meta-grid,
.actions-grid,
.roster-list,
.task-list,
.chat-list {
  display: grid;
  gap: 0.75rem;
}

.host-toggle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.host-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.12);
}

.pill--hacker {
  background: rgba(255, 131, 87, 0.2);
}

.pill--employee {
  background: rgba(91, 212, 176, 0.2);
}

.map-wrap {
  overflow: hidden;
  padding: 0.5rem;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.18);
  min-height: 0;
  position: relative;
}

#game-map > .task-progress {
  grid-row: 1;
  margin: 0;
}

#game-map > .map-wrap {
  grid-row: 2;
  min-height: 0;
}

.stink-timer {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 12;
  min-width: 170px;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  background: rgba(48, 8, 8, 0.86);
  border: 1px solid rgba(255, 107, 95, 0.62);
  box-shadow: 0 10px 22px rgba(255, 64, 64, 0.28);
  text-align: center;
}

.meeting-result-banner {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  background: rgba(7, 19, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffe3e3;
  font-size: 0.86rem;
}

.stink-timer__title {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd7d2;
}

.stink-timer__value {
  margin-top: 0.15rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #ff5b5b;
}

.next-task-inline {
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: rgba(6, 16, 24, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.next-task-inline__eyebrow {
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: #ffd166;
}

.next-task-inline__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
}

.next-task-inline__arrow,
.next-task-inline__done {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.next-task-inline__arrow {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 209, 102, 0.16);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.4);
}

.next-task-inline__meta {
  margin-top: 0.1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.64);
}

.next-task-inline__done {
  color: #8ef0ca;
}

body[data-mode="player"] .game-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body[data-mode="player"] .banner {
  margin: 0.45rem 0;
  padding: 0.6rem 0.8rem;
}

body[data-mode="player"] .task-progress {
  margin: 0;
  padding: 0.55rem 0.75rem;
}

body[data-mode="player"] .task-progress__header {
  margin-bottom: 0.35rem;
}

body[data-mode="player"] .map-wrap {
  min-height: 0;
  flex: 1;
}

.map-stage {
  position: relative;
  width: max-content;
  height: max-content;
}

.task-progress {
  margin: 0.25rem 0 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.task-progress__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
}

.task-progress__track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.task-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #42d6a4, #8ef0ca);
  box-shadow: 0 0 18px rgba(66, 214, 164, 0.35);
}

.task-overlay-list {
  position: absolute;
  top: 5.5rem;
  right: 1rem;
  z-index: 11;
  width: min(320px, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(7, 19, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.hud-nearest-task,
.hud-minimap {
  position: absolute;
  left: 1rem;
  z-index: 11;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(6, 16, 24, 0.92), rgba(8, 22, 33, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.hud-nearest-task {
  top: 5.5rem;
  width: min(280px, calc(100% - 2rem));
  padding: 0.9rem 1rem;
}

.hud-nearest-task__eyebrow {
  margin-bottom: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #ffd166;
}

.hud-nearest-task__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
}

.hud-nearest-task__arrow,
.hud-nearest-task__done {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.hud-nearest-task__arrow {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 209, 102, 0.16);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.4);
  font-size: 1.1rem;
}

.hud-nearest-task__meta {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.64);
}

.hud-nearest-task__done {
  color: #8ef0ca;
}

.hud-minimap {
  bottom: 1rem;
  width: min(260px, calc(100% - 2rem));
  padding: 0.85rem;
}

.hud-minimap__title {
  margin-bottom: 0.65rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.hud-minimap__frame {
  border-radius: 18px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-minimap__svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.map-floating-panel {
  position: absolute;
  z-index: 11;
  width: min(360px, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(7, 19, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.map-floating-panel--actions {
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(620px, calc(100% - 2rem));
}

.map-floating-panel--meeting {
  left: 1rem;
  bottom: 1rem;
  width: min(520px, calc(100% - 2rem));
}

.map-floating-panel:empty {
  display: none;
}

.game-layout--player-only {
  grid-template-columns: 1fr;
}

.side-panel--hidden {
  display: none;
}

.task-overlay-list__title {
  margin-bottom: 0.7rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.task-overlay-list__reactor-counter {
  margin-bottom: 0.55rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(138, 22, 22, 0.3);
  border: 1px solid rgba(255, 96, 96, 0.55);
  color: #ffb5b5;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.task-overlay-list__items {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.45rem;
}

.task-overlay-list__item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.8rem;
  align-items: center;
  padding: 0.5rem 0.2rem;
  color: rgba(255, 255, 255, 0.95);
}

.task-overlay-list__text {
  font-weight: 600;
}

.task-overlay-list__meta {
  grid-column: 1;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

.task-overlay-list__index,
.task-overlay-list__check {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.task-overlay-list__index {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}

.task-overlay-list__check {
  background: rgba(66, 214, 164, 0.2);
  color: #8ef0ca;
  border: 1px solid rgba(66, 214, 164, 0.45);
}

.task-overlay-list__item--done .task-overlay-list__text,
.task-overlay-list__item--done .task-overlay-list__meta {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.5);
}

.task-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 40;
  pointer-events: auto;
}

.task-overlay__cancel-bar {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 42;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  width: min(92%, 520px);
  pointer-events: auto;
}

.end-overlay {
  position: absolute;
  inset: 0;
  z-index: 13;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.end-overlay__panel {
  padding: 1rem 1.4rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(7, 19, 28, 0.86);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

.end-overlay__panel--win {
  border-color: rgba(91, 212, 176, 0.7);
  box-shadow: 0 14px 34px rgba(91, 212, 176, 0.24);
}

.end-overlay__panel--lose {
  border-color: rgba(255, 107, 95, 0.72);
  box-shadow: 0 14px 34px rgba(255, 107, 95, 0.24);
}

.end-overlay__panel h2 {
  font-size: clamp(1.15rem, 2.5vw, 2rem);
  margin: 0;
}

.task-overlay__scrim {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: rgba(3, 10, 17, 0.9);
  backdrop-filter: blur(14px);
  pointer-events: none;
}

.task-overlay__content {
  position: relative;
  z-index: 41;
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(220px, 0.9fr);
  gap: 1.2rem;
  width: min(92%, 920px);
  align-items: center;
  pointer-events: auto;
}

.task-overlay__photo,
.task-overlay__status {
  border-radius: 26px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.task-overlay__photo {
  position: relative;
  overflow: hidden;
}

.task-overlay__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%);
  pointer-events: none;
}

.task-overlay__photo-art {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

.task-overlay__photo-shot {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 220px;
}

.task-overlay__photo-image {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.task-overlay__photo-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 10, 16, 0.12), rgba(2, 10, 16, 0.35));
}

.task-overlay__photo-player {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  max-width: calc(100% - 1.6rem);
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: rgba(6, 16, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
  font-weight: 600;
}

.task-overlay__photo-player-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.task-overlay__caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
}

.task-overlay__caption span {
  text-align: right;
}

.task-overlay__status {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1rem;
}

.task-overlay__ring-wrap {
  position: relative;
  width: 180px;
  height: 180px;
}

.task-overlay__ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.task-overlay__ring-track,
.task-overlay__ring-progress {
  fill: none;
  stroke-width: 10;
}

.task-overlay__ring-track {
  stroke: rgba(255, 255, 255, 0.12);
}

.task-overlay__ring-progress {
  stroke-linecap: round;
  transition: stroke-dashoffset 100ms linear;
}

.task-overlay__ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
}

.task-overlay__ring-center strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
}

.task-overlay__ring-center span {
  color: rgba(255, 255, 255, 0.72);
}

.task-overlay__status p {
  margin: 0;
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.78);
}

.task-overlay__cancel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.4rem;
  width: min(260px, 100%);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(29, 52, 67, 0.95), rgba(14, 26, 35, 0.95));
  color: #d6f5e8;
  border: 1px solid rgba(91, 212, 176, 0.45);
}

.task-overlay__cancel-button .tile__icon {
  width: 16px;
  height: 16px;
}

.task-overlay__cancel-hint {
  width: 100%;
  text-align: center;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(6, 16, 24, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}

.task-overlay--slip .task-overlay__content {
  grid-template-columns: minmax(300px, 560px);
  justify-content: center;
}

.task-overlay__content--slip {
  width: min(92%, 620px);
}

.task-overlay__status--slip {
  padding: 1.4rem;
  background: linear-gradient(180deg, rgba(255, 154, 117, 0.18), rgba(255, 107, 95, 0.12));
  border-color: rgba(255, 131, 87, 0.42);
}

.task-overlay__ring-wrap--slip {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle at 30% 30%, rgba(255, 168, 120, 0.24), rgba(19, 26, 35, 0.82));
}

.task-overlay__ring-center--slip strong {
  font-size: 1.8rem;
}

.map-grid {
  display: grid;
  gap: 2px;
  position: relative;
}

.emergency-map-button {
  position: absolute;
  z-index: 14;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 0;
  background: transparent;
  color: #fff7f5;
  border: none;
  box-shadow: none;
  white-space: nowrap;
}

.task-map-button {
  position: absolute;
  z-index: 14;
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  padding: 0;
  background: transparent;
  color: #f4fff8;
  border: none;
  box-shadow: none;
  white-space: nowrap;
}

.task-map-button__core {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #cffff0, #79e3bc 32%, #1fa36d 72%, #116347 100%);
  border: 2px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    0 10px 22px rgba(17, 99, 71, 0.36),
    inset 0 -6px 10px rgba(6, 54, 39, 0.4),
    inset 0 5px 10px rgba(255, 255, 255, 0.22);
  color: #0f533d;
}

.task-map-button__core::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 14px;
  margin-top: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, #78908f, #405050);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
}

.task-map-button__label {
  position: relative;
  z-index: 1;
  max-width: 180px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(6, 16, 24, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 800;
}

.task-map-button .tile__icon {
  width: 20px;
  height: 20px;
}

.sabotage-map-button {
  position: absolute;
  z-index: 14;
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  padding: 0;
  background: transparent;
  color: #fff4ee;
  border: none;
  box-shadow: none;
  white-space: nowrap;
}

.sabotage-map-button__core {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffd7ca, #ff9a83 30%, #e04a31 68%, #8a2516 100%);
  border: 2px solid rgba(255, 255, 255, 0.62);
  box-shadow:
    0 10px 22px rgba(138, 37, 22, 0.36),
    inset 0 -6px 10px rgba(78, 16, 9, 0.42),
    inset 0 5px 10px rgba(255, 255, 255, 0.22);
  color: #ffe9df;
}

.sabotage-map-button__core::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 14px;
  margin-top: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7c8993, #44505a);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
}

.sabotage-map-button__label {
  position: relative;
  z-index: 1;
  max-width: 210px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(6, 16, 24, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 800;
}

.sabotage-map-button .tile__icon {
  width: 20px;
  height: 20px;
}

.resolve-map-button {
  position: absolute;
  z-index: 14;
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  padding: 0;
  background: transparent;
  color: #fff9ed;
  border: none;
  box-shadow: none;
  white-space: nowrap;
}

.resolve-map-button__core {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #fff0c7, #ffd166 34%, #ff9f1c 70%, #b56208 100%);
  border: 2px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    0 10px 22px rgba(181, 98, 8, 0.34),
    inset 0 -6px 10px rgba(115, 57, 4, 0.4),
    inset 0 5px 10px rgba(255, 255, 255, 0.24);
  color: #6b3f07;
}

.resolve-map-button__core::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 14px;
  margin-top: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7d8892, #434b53);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
}

.resolve-map-button__label {
  position: relative;
  z-index: 1;
  max-width: 180px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(6, 16, 24, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 800;
}

.resolve-map-button .tile__icon {
  width: 20px;
  height: 20px;
}

.emergency-map-button__core {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, #ffd5cf 0 18%, #ff897b 18% 42%, #d51f1f 58%, #7c0c0c 100%);
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 10px 22px rgba(212, 31, 31, 0.4),
    inset 0 -6px 10px rgba(110, 8, 8, 0.45),
    inset 0 5px 10px rgba(255, 255, 255, 0.22);
}

.emergency-map-button__core::after {
  content: "";
  position: absolute;
  width: 64px;
  height: 16px;
  margin-top: 54px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6f7c86, #3c4650);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
}

.emergency-map-button__label {
  position: relative;
  z-index: 1;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(6, 16, 24, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.emergency-map-button .emergency-button__icon {
  width: 1.45rem;
  height: 1.45rem;
}

.tile {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  overflow: visible;
  transition:
    filter 120ms ease,
    opacity 120ms ease,
    transform 120ms ease;
  --tile-visibility: 1;
}

.tile--wall {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 4px, rgba(0, 0, 0, 0) 4px 8px),
    #5f6972;
  border: 1px solid rgba(229, 235, 240, 0.4);
  filter: brightness(var(--tile-visibility));
}

.tile--hidden {
  background:
    radial-gradient(circle at center, rgba(15, 27, 38, 0.94), rgba(5, 10, 16, 0.98));
}

.tile--floor {
  background: var(--bits-room-alt);
  filter: brightness(var(--tile-visibility));
}

.tile--room {
  background: var(--bits-room);
  filter: brightness(var(--tile-visibility));
}

.tile--vent {
  background: #b8c1c9;
  filter: brightness(var(--tile-visibility));
}

.tile--task-field {
  background-image: radial-gradient(circle at center, rgba(91, 212, 176, 0.28), rgba(91, 212, 176, 0) 68%);
  box-shadow: inset 0 0 0 1px rgba(91, 212, 176, 0.42);
}

.tile--sabotage-field {
  background-image: radial-gradient(circle at center, rgba(255, 131, 87, 0.28), rgba(255, 131, 87, 0) 68%);
  box-shadow: inset 0 0 0 1px rgba(255, 131, 87, 0.45);
}

.tile--sabotage-ready {
  animation: sabotagePulse 1.15s ease-in-out infinite;
}

@keyframes sabotagePulse {
  0%,
  100% {
    filter: brightness(var(--tile-visibility));
  }
  50% {
    filter: brightness(calc(var(--tile-visibility) + 0.22));
  }
}

.tile--locked {
  outline: 2px solid rgba(255, 107, 95, 0.8);
}

.tile__marker {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 0.92rem;
  font-weight: 800;
}

.tile__icon {
  width: 28px;
  height: 28px;
  display: block;
}

.tile__marker--player {
  width: 44px;
  height: 44px;
}

.tile__avatar {
  width: 44px;
  height: 44px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.tile__avatar--photo {
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.tile__marker--self {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 0 0 4px rgba(3, 169, 244, 0.4);
  border-radius: 999px;
}

.tile__marker--other {
  border-radius: 999px;
}

.tile__marker--body {
  background: var(--bits-danger);
  color: #fff;
}

.tile__marker--task {
  background: rgba(91, 212, 176, 0.2);
  border: 1px solid rgba(91, 212, 176, 0.75);
  color: #cbfff1;
  box-shadow: 0 0 12px rgba(91, 212, 176, 0.42);
}

.tile__marker--sabotage {
  background: rgba(255, 131, 87, 0.18);
  border: 1px solid rgba(255, 131, 87, 0.74);
  color: #ffe7db;
  box-shadow: 0 0 12px rgba(255, 131, 87, 0.4);
}

.tile__marker--sock {
  background: rgba(182, 195, 205, 0.08);
  border: 1px solid rgba(182, 195, 205, 0.14);
  color: rgba(182, 195, 205, 0.42);
  box-shadow: none;
}

.tile__marker--sock .tile__icon {
  opacity: 0.46;
}

.tile__marker--hacker {
  background: rgba(255, 131, 87, 0.26);
  border: 1px solid rgba(255, 131, 87, 0.8);
  color: #ffe7db;
  box-shadow: 0 0 12px rgba(255, 131, 87, 0.46);
}

.tile__marker--vent-public {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(23, 35, 43, 0.36);
  color: #1b2a34;
}

.tile__hacker-tag {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(11, 19, 29, 0.86);
  border: 1px solid rgba(255, 131, 87, 0.38);
  color: #ffba9f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tile__count {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: #052033;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
}

.actions-grid button,
.roster-list button,
.meeting-panel button,
.meeting-panel form button {
  width: 100%;
}

.vote-button--selected {
  border-color: rgba(91, 212, 176, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(91, 212, 176, 0.55) inset;
  background: linear-gradient(180deg, rgba(91, 212, 176, 0.26), rgba(91, 212, 176, 0.12));
  color: #e8fff8;
}

.hud-actions {
  padding: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(5, 12, 19, 0.94), rgba(11, 25, 37, 0.9));
}

.hud-actions .actions-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
}

.hud-actions button {
  min-height: 3.3rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(36, 58, 73, 0.98), rgba(13, 27, 38, 0.98));
  color: #eefbff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hud-actions .emergency-button {
  background: linear-gradient(180deg, #ff8a7d, #d41f1f);
  color: #fff8f6;
}

.hud-meeting {
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 2rem));
  max-height: min(78vh, 760px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(10, 22, 32, 0.98), rgba(5, 14, 21, 0.98));
}

.hacker-action-dock {
  position: absolute;
  right: 1rem;
  bottom: 4.6rem;
  z-index: 12;
  width: min(340px, calc(100% - 2rem));
  padding: 0.65rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(34, 12, 12, 0.92), rgba(21, 9, 9, 0.92));
  border: 1px solid rgba(255, 131, 87, 0.35);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.36);
}

.hacker-station-button,
.hacker-kill-button,
.hacker-vent-button {
  position: absolute;
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.9rem;
  padding: 0.28rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.hacker-station-button {
  background: linear-gradient(180deg, rgba(94, 35, 30, 0.96), rgba(58, 21, 18, 0.96));
  color: #ffe7db;
}

.hacker-kill-button {
  background: linear-gradient(180deg, rgba(132, 27, 27, 0.96), rgba(88, 17, 17, 0.96));
  color: #ffe8e8;
}

.hacker-vent-button {
  background: linear-gradient(180deg, rgba(72, 84, 92, 0.96), rgba(40, 48, 54, 0.96));
  color: #eef6fa;
}

.hacker-station-button .tile__icon,
.hacker-kill-button .tile__icon,
.hacker-vent-button .tile__icon {
  width: 12px;
  height: 12px;
}

.hacker-action-dock__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 0.45rem;
}

.hacker-action-dock__row + .hacker-action-dock__row {
  margin-top: 0.45rem;
}

.hacker-action-dock__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(94, 35, 30, 0.94), rgba(58, 21, 18, 0.94));
  border: 1px solid rgba(255, 167, 140, 0.35);
  color: #ffe7db;
  font-size: 0.73rem;
  font-weight: 700;
}

.hacker-action-dock__button .tile__icon {
  width: 13px;
  height: 13px;
}

.hacker-action-dock__button--vent {
  background: linear-gradient(180deg, rgba(72, 84, 92, 0.94), rgba(40, 48, 54, 0.94));
  border-color: rgba(187, 203, 214, 0.34);
  color: #e9f2f7;
}

.hacker-action-dock__button--kill {
  background: linear-gradient(180deg, rgba(132, 27, 27, 0.94), rgba(88, 17, 17, 0.94));
  border-color: rgba(255, 153, 153, 0.38);
}

.hacker-action-dock__meta {
  margin: 0.45rem 0 0.3rem;
  font-size: 0.7rem;
  color: rgba(255, 214, 201, 0.86);
}

.muted {
  color: rgba(255, 255, 255, 0.68);
}

.roster-item,
.task-item,
.chat-item,
.presenter-card,
.stat-box {
  border-radius: 18px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
}

.presenter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1rem;
}

.presenter-card h3 {
  margin-bottom: 0.75rem;
}

.presenter-header {
  display: grid;
  gap: 0.75rem;
}

.inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(255, 107, 95, 0.18);
  border: 1px solid rgba(255, 107, 95, 0.35);
}

.game-main:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  padding: 1rem 1rem 1.2rem;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(17, 56, 77, 0.98), rgba(7, 19, 28, 1));
  display: flex;
  flex-direction: column;
}

.game-main:fullscreen #game-map {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-right: 21rem;
}

.game-main:fullscreen .map-wrap {
  flex: 1;
  min-height: 0;
}

@media (max-width: 1080px) {
  .grid-two,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .toolbar__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .side-panel {
    max-height: none;
    overflow: visible;
  }

  #game-map,
  .game-main:fullscreen #game-map {
    padding-right: 0;
  }

  .task-overlay-list {
    position: static;
    width: 100%;
    margin-bottom: 0.9rem;
  }

  .hud-nearest-task,
  .hud-minimap {
    position: static;
    width: 100%;
    margin-bottom: 0.9rem;
  }

  .map-floating-panel,
  .map-floating-panel--meeting,
  .map-floating-panel--actions {
    position: static;
    width: 100%;
    margin-top: 0.9rem;
    transform: none;
  }

  .hacker-action-dock {
    position: static;
    width: 100%;
    margin-top: 0.9rem;
  }

  .map-fullscreen-button {
    position: static;
    margin-top: 0.9rem;
    width: 100%;
    justify-content: center;
  }
}
