:root {
  color-scheme: light;
  --ink: #10201d;
  --muted: #52605c;
  --panel: rgba(255, 255, 255, 0.92);
  --line: rgba(255, 255, 255, 0.42);
  --shadow: 0 24px 70px rgba(10, 20, 30, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #eef4f2;
}

.map-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  background:
    linear-gradient(120deg, rgba(16, 120, 104, 0.74), rgba(20, 28, 42, 0.62)),
    url("/assets/citygames-logo.png") center 18% / 180px auto no-repeat,
    radial-gradient(circle at 20% 30%, rgba(244, 181, 62, 0.35), transparent 34%),
    linear-gradient(145deg, #296f65, #f2a33a 48%, #f7f2ea);
}

.workspace {
  position: relative;
  z-index: 1;
  width: min(1720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(14px, 2vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.center-stage {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 850;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.hero-copy {
  max-width: 780px;
  padding-top: clamp(12px, 5vw, 46px);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 850;
  color: rgba(255, 255, 255, 0.82);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.panel,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  padding: clamp(22px, 4vw, 34px);
}

.narrow {
  width: min(520px, 100%);
}

.login-card {
  width: min(460px, 100%);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #223430;
  font-weight: 760;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cbd7d4;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #10201d;
}

select {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cbd7d4;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #10201d;
}

textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid #cbd7d4;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: #10201d;
  resize: vertical;
}

.button,
.ghost-button,
.large-action {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 850;
}

.button {
  width: 100%;
  background: #101927;
  color: #fff;
}

.button:disabled {
  cursor: default;
  opacity: 0.5;
}

.as-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  color: #fff;
  text-decoration: none;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.text-link {
  display: inline-block;
  margin-top: 18px;
  color: #10201d;
  font-weight: 800;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.login-logo img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.form-message {
  min-height: 24px;
  margin-bottom: 14px;
  color: #9b1c1c;
  font-weight: 720;
}

.code-form {
  display: grid;
  gap: 12px;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.info-card {
  min-height: 132px;
  padding: 18px;
}

.info-card p {
  margin: 0;
  color: #14211f;
  font-size: 18px;
  font-weight: 800;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.large-action {
  min-height: 74px;
  background: #fff4e7;
  color: #512500;
  border: 1px solid #ffd0a2;
}

.table-list {
  display: grid;
  gap: 10px;
}

.ready-view .workspace {
  width: 100%;
}

.device-ready {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
  color: #fff;
}

.device-ready h1 {
  font-size: clamp(40px, 7vw, 82px);
}

.device-ready p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(19px, 3vw, 30px);
  font-weight: 750;
}

.logo-button {
  width: 112px;
  height: 112px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.logo-button img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.device-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.68) !important;
}

.device-ready-actions,
.setup-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.setup-board,
.admin-shell {
  display: grid;
  gap: 18px;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.ghost-dark {
  min-height: 44px;
  border: 1px solid #aebdb8;
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.82);
  color: #162420;
  cursor: pointer;
  font-weight: 820;
}

.check-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.check-list span,
.check-list strong,
.small-note {
  color: #263632;
}

.small-note {
  font-size: 14px;
}

.tabs,
.filters,
.device-create,
.row-actions,
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 16px;
}

.tab,
.row-actions button {
  min-height: 40px;
  border: 1px solid #c8d4d0;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #14211f;
  cursor: pointer;
  font-weight: 800;
}

.tab.is-active {
  background: #f3a833;
  border-color: #d88c1c;
}

.admin-panel {
  box-shadow: none;
}

.city-context {
  display: grid;
  gap: 6px;
  min-width: 240px;
  font-size: 0.84rem;
  color: var(--muted);
}

.quick-grid,
.admin-columns,
.media-grid {
  display: grid;
  gap: 12px;
}

.quick-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-card {
  min-height: 92px;
  border: 1px solid #c8d4d0;
  border-radius: 8px;
  background: #fff;
  color: #14211f;
  text-align: left;
  padding: 14px;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.quick-card span {
  color: #586965;
  font-size: 0.86rem;
  line-height: 1.35;
}

.admin-columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.media-card {
  min-height: 126px;
}

.media-library-columns {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
}

.media-library-section {
  min-width: 0;
}

.media-library-section h3 {
  overflow-wrap: anywhere;
}

.admin-view .tabs {
  flex: 1 1 620px;
  justify-content: flex-end;
}

.admin-view .tab {
  white-space: nowrap;
}

.content-subtabs,
.editor-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.content-subtab,
.editor-tabs span {
  min-height: 36px;
  border: 1px solid #c8d4d0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #14211f;
  font-weight: 820;
}

.content-subtab.is-active,
.editor-tabs span:first-child {
  background: #e6f6f3;
  border-color: #0e8f86;
}

.editor-tabbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 12px;
  margin-bottom: 12px;
  background: #f8fbfa;
}

.editor-tab {
  min-height: 36px;
  border: 1px solid #c8d4d0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #14211f;
  font-weight: 820;
  cursor: pointer;
  white-space: nowrap;
}

.editor-tab.is-active {
  background: #e6f6f3;
  border-color: #0e8f86;
  box-shadow: inset 0 -2px 0 #0e8f86;
}

.editor-tab.has-error {
  border-color: #b42318;
  color: #b42318;
}

.compact-dashboard {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.content-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.station-riddle-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.75fr) minmax(760px, 1.25fr);
  gap: 18px;
  align-items: start;
}

.station-riddle-overview,
.station-riddle-editor {
  min-width: 0;
}

.station-riddle-overview {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding-right: 2px;
}

.riddle-filters {
  align-items: stretch;
  margin-bottom: 12px;
}

.riddle-filters > * {
  min-width: 150px;
  flex: 1 1 150px;
}

.riddle-table {
  display: grid;
  gap: 8px;
  max-height: 68vh;
  overflow: auto;
  padding-right: 2px;
}

.library-map-card {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.admin-riddle-map {
  min-height: 320px;
  border: 1px solid #c8d4d0;
  border-radius: 8px;
  overflow: hidden;
  background: #dce9e3;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.admin-riddle-map .leaflet-control-container,
.admin-riddle-map .leaflet-pane {
  letter-spacing: 0;
}

.map-fallback-marker {
  min-height: 44px;
  border: 1px solid #adc6bf;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
}

.map-fallback-marker strong {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #0e8f86;
  color: #fff;
  display: grid;
  place-items: center;
}

.riddle-row {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #14211f;
  text-align: left;
  cursor: pointer;
}

.riddle-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.riddle-row.is-selected {
  border-color: #0e8f86;
  background: #e6f6f3;
}

.riddle-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.riddle-editor-shell {
  max-height: calc(100vh - 106px);
  overflow: auto;
  padding-right: 4px;
  align-self: start;
}

.riddle-form,
.riddle-standalone-tab {
  display: grid;
  gap: 12px;
}

.riddle-editor-title {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.riddle-tab-panel {
  display: grid;
  gap: 12px;
}

.ipad-preview-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 10px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.ipad-preview {
  width: 300px;
  min-height: 430px;
  border: 12px solid #1e2b28;
  border-radius: 26px;
  padding: 18px;
  background: #f8fbfa;
  box-shadow: 0 18px 42px rgba(10, 20, 30, 0.22);
}

.choice-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.choice-option {
  display: flex;
  align-items: center;
  grid-template-columns: none;
  gap: 10px;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfa;
  margin: 0;
}

.choice-option input {
  width: 20px;
  min-height: 20px;
}

.task-prompt,
.task-state-note,
.task-feedback {
  border-radius: 8px;
  padding: 12px;
  background: #edf4f2;
  color: #162420;
  font-weight: 760;
}

.task-feedback.is-correct {
  background: #d3f9d8;
  color: #1b5e20;
}

.task-feedback.is-wrong {
  background: #ffe3e3;
  color: #8a1f1f;
}

.content-tree {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.content-column {
  min-width: 240px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  background: #f8fbfa;
  overflow: hidden;
}

.content-column-heading {
  min-height: 42px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #d7e1de;
  color: #14211f;
}

.content-column-list {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.content-node {
  width: 100%;
  min-height: 58px;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: #14211f;
  text-align: left;
  cursor: pointer;
}

.content-node strong,
.content-node small {
  display: block;
}

.content-node strong {
  font-size: 14px;
  line-height: 1.25;
}

.content-node small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.content-node.is-selected {
  border-color: #0e8f86;
  background: #e6f6f3;
}

.mini-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border: 1px solid #c8d4d0;
  border-radius: 8px;
  background: #fff;
  color: #14211f;
  cursor: pointer;
  font-weight: 850;
}

.empty-column {
  color: var(--muted);
  font-size: 13px;
}

.content-detail {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.breadcrumb-button {
  min-height: 34px;
  border: 1px solid #d5dfdc;
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: #14211f;
  cursor: pointer;
  font-weight: 820;
}

.content-form {
  display: grid;
  gap: 12px;
}

.content-form h2 {
  margin-bottom: 4px;
  font-size: 24px;
}

.two-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  grid-template-columns: none;
  gap: 10px;
  margin: 0 0 8px;
}

.checkbox-field input {
  width: 20px;
  min-height: 20px;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.form-actions .button {
  width: auto;
}

.inline-field {
  min-width: 220px;
  margin: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  min-width: 0;
}

.media-item {
  display: grid;
  gap: 7px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.media-item img,
.media-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #edf4f2;
  object-fit: cover;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 820;
}

.media-item strong,
.media-item span,
.media-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.media-card {
  min-width: 0;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: hidden;
}

.media-card img,
.media-card .media-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}

.media-card h3,
.media-card p,
.media-card span {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.media-card .inline-actions {
  margin-top: 6px;
  justify-content: flex-start;
}

.media-card .mini-button {
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 32px;
  padding: 7px 10px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left;
}

.media-card h3 {
  font-size: 0.82rem;
  line-height: 1.25;
  max-height: 2.55em;
  overflow: hidden;
}

.media-card p {
  color: #14211f;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.2;
}

.media-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.28;
}

.answer-editor {
  display: grid;
  gap: 12px;
}

.answer-option-list,
.assigned-media-list {
  display: grid;
  gap: 10px;
}

.answer-option-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  background: #f8fbfa;
}

.answer-option-row.compact {
  grid-template-columns: 34px minmax(0, 1fr);
}

.answer-position {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0e8f86;
  color: #fff;
  font-weight: 860;
}

.compact-check {
  display: flex;
  grid-column: 2;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.answer-option-row .mini-button {
  justify-self: start;
}

.compact-check input {
  width: auto;
  min-height: 0;
}

.readonly-field {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  background: #f8fbfa;
}

.readonly-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.assigned-media-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  background: #f8fbfa;
}

.assigned-media-card img,
.assigned-media-card .media-placeholder {
  width: 92px;
  aspect-ratio: 16 / 9;
}

.assigned-media-card label,
.assigned-media-card .status-pill,
.assigned-media-card .inline-actions {
  grid-column: 1 / -1;
}

.assigned-media-card strong,
.assigned-media-card span,
.assigned-media-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.mini-button.danger {
  color: #9a3412;
  border-color: #fdba74;
  background: #fff7ed;
}

.answer-option-row .mini-button {
  width: auto;
  min-width: 64px;
}

.media-picker-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.35fr) minmax(240px, 0.45fr);
  gap: 10px;
}

.editor-section {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  background: #fff;
}

.editor-section.is-tab-panel {
  margin-top: 0;
}

.riddle-tab-panel .table-list .list-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.riddle-tab-panel .list-row strong,
.riddle-tab-panel .list-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.riddle-tab-panel .list-row .mini-button {
  width: fit-content;
  min-width: 112px;
}

.sticky-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 14px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(248, 251, 250, 0.72), #f8fbfa 28%);
}

.form-message.is-error {
  color: #b42318;
  background: #fff3f0;
  border: 1px solid #f0b8ad;
  border-radius: 8px;
  padding: 8px 10px;
}

.compact-form,
.tag-grid {
  display: grid;
  gap: 12px;
}

.tag-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.tag-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 9px;
  align-items: center;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.tag-option span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
  color: var(--tag-color);
}

.tag-option small {
  grid-column: 2;
  color: var(--muted);
}

.route-assignment-list .list-row {
  grid-template-columns: 42px minmax(180px, 1fr) 104px 70px minmax(130px, .8fr) minmax(150px, .9fr);
  align-items: center;
  min-width: 0;
}

.route-assignment-list {
  overflow-x: auto;
}

.route-assignment-row .mini-button {
  width: auto;
  min-width: 58px;
  padding: 0 8px;
  white-space: nowrap;
}

.route-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.inline-mini-field {
  display: grid;
  gap: 4px;
  min-width: 150px;
  font-size: 12px;
  color: var(--muted);
}

.inline-mini-field select {
  min-height: 34px;
  border: 1px solid #cbd7d4;
  border-radius: 8px;
  background: #fff;
}

.route-position {
  width: 42px;
  height: 34px;
  border-radius: 8px;
  background: #e6f6f3;
  color: #0a645e;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.editor-accordion {
  border: 1px solid #d7e1de;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.editor-accordion + .editor-accordion {
  margin-top: 4px;
}

.editor-accordion summary {
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 900;
  color: #14211f;
  background: #f8fbfa;
}

.editor-accordion-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

@media (min-width: 1200px) {
  .admin-view .map-layer {
    opacity: 0.78;
    background:
      linear-gradient(120deg, rgba(16, 120, 104, 0.76), rgba(20, 28, 42, 0.58)),
      url("/assets/citygames-logo.png") center 120px / 130px auto no-repeat,
      linear-gradient(145deg, #296f65, #f2a33a 52%, #f7f2ea);
  }

  .admin-view .workspace {
    width: min(1720px, calc(100% - 32px));
    padding-top: 14px;
  }

  .admin-shell {
    display: grid;
    gap: 14px;
  }

  .admin-view .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(239, 246, 243, 0.92);
    backdrop-filter: blur(8px);
  }

  .admin-view .tabs {
    flex: 0 1 auto;
    justify-content: flex-end;
  }

  .admin-panel {
    width: 100%;
  }

  .content-admin-grid,
  .station-riddle-layout {
    width: 100%;
  }

  .content-detail {
    max-width: none;
  }

  .content-tree {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }

  .riddle-table {
    max-height: 44vh;
  }

  .admin-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hidden {
  display: none !important;
}

.update-notice {
  position: static;
  display: block;
  margin: 14px auto 0;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #101927;
  color: #fff;
  font-weight: 850;
  box-shadow: var(--shadow);
}

.update-notice-inline {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.86rem;
  box-shadow: none;
}

.setup-modern {
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr) minmax(280px, 360px);
}

.setup-menu {
  display: grid;
  align-content: start;
  gap: 10px;
}

.setup-menu-item,
.event-card,
.placeholder-action {
  min-height: 52px;
  border: 1px solid #cbd7d4;
  border-radius: 8px;
  background: #fff;
  color: #14211f;
  cursor: pointer;
  font-weight: 820;
}

.setup-menu-item.is-active,
.event-card.is-selected {
  border-color: #0e8f86;
  background: #e6f6f3;
}

.event-list,
.expired-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.event-card,
.expired-event {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 10px;
  text-align: left;
}

.event-card img,
.expired-event img {
  width: 82px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: #edf4f2;
}

.event-card span,
.expired-event span {
  display: grid;
  gap: 3px;
}

.event-card small,
.event-card em,
.expired-event small,
.expired-event em {
  color: var(--muted);
  font-style: normal;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 10px;
  background: #e6f6f3;
  color: #0b665d;
  font-weight: 850;
}

.placeholder-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, 120px)) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
}

.segmented {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.segmented-option {
  margin: 0;
}

.segmented-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-option span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid #cbd7d4;
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
}

.segmented-option input:checked + span {
  border-color: #0e8f86;
  background: #e6f6f3;
}

.device-inspection {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.player-view {
  background: #f5f7f4;
}

.player-view .map-layer {
  display: none;
}

.player-view .workspace {
  width: 100%;
  max-width: none;
  padding: 0;
}

.player-shell {
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) calc(68px + env(safe-area-inset-bottom));
  background: #f5f7f4;
  overflow: hidden;
}

.player-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid #dde5e2;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.94);
  z-index: 5;
}

.team-block,
.device-block {
  display: grid;
  gap: 2px;
}

.device-block {
  text-align: right;
}

.team-block span,
.device-block span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.player-logo {
  width: 52px;
  height: 52px;
  border: 0;
  background: transparent;
  justify-self: center;
  cursor: pointer;
}

.player-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.game-board {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(318px, 41vw) minmax(0, 1fr);
  overflow: hidden;
}

.panel-closed .game-board {
  grid-template-columns: 28px minmax(0, 1fr);
}

.task-drawer {
  position: relative;
  z-index: 4;
  min-width: 0;
  border-right: 1px solid #d8e2df;
  background: rgba(255, 255, 255, 0.96);
  transition: width 180ms ease, transform 180ms ease;
  overflow: visible;
}

.task-drawer.is-closed .drawer-content {
  opacity: 0;
  pointer-events: none;
}

.drawer-toggle {
  position: absolute;
  top: 48%;
  right: -22px;
  z-index: 8;
  width: 44px;
  height: 82px;
  border: 1px solid #cbd7d4;
  border-radius: 0 8px 8px 0;
  background: #fff;
  color: #0e8f86;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(10, 20, 30, 0.12);
}

.drawer-toggle svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.4;
}

.drawer-content {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  transition: opacity 120ms ease;
}

.task-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 86px;
  padding: 18px;
  background: #f0f2f1;
}

.task-head h2 {
  margin: 0;
}

.round-tool {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: #9aa0a0;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.round-tool svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.3;
}

.task-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.task-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(86px, auto);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 100px;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  padding: 12px;
  background: #fff;
  color: #14211f;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.task-item.is-selected {
  background: #e9f7f4;
  box-shadow: inset 4px 0 0 #0e8f86;
}

.task-marker {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--marker);
  color: #fff;
  font-weight: 900;
  flex: 0 0 auto;
}

.task-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.task-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.16;
}

.task-main small {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.task-main small,
.task-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.task-main small span {
  max-width: 100%;
  min-height: 25px;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  padding: 4px 7px;
  background: #f7faf9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-status {
  justify-self: end;
  align-self: start;
  min-width: 86px;
  max-width: 112px;
  min-height: 30px;
  border-radius: 8px;
  padding: 7px 8px;
  background: #eef4f2;
  color: #263632;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status-locked {
  opacity: 0.62;
}

.task-item.is-selected .task-status {
  background: #0e8f86;
  color: #fff;
}

.status-completed .task-status {
  color: #2f9e44;
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.game-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
  background: #dfecea;
}

.map-fallback {
  padding: 20px;
}

.map-actions {
  position: absolute;
  right: 18px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.map-action {
  min-height: 46px;
  border: 1px solid #cbd7d4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #14211f;
  cursor: pointer;
  padding: 0 14px;
  font-weight: 850;
  box-shadow: 0 10px 28px rgba(10, 20, 30, 0.12);
}

.map-action-icon {
  width: 48px;
  padding: 0;
  display: grid;
  place-items: center;
}

.task-map-marker {
  border: 0;
  background: transparent;
}

.task-map-marker span {
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  display: grid;
  place-items: center;
  transform: rotate(-45deg);
  background: var(--marker);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  font-weight: 900;
}

.task-map-marker b {
  transform: rotate(45deg);
}

.task-map-marker span::first-line {
  transform: rotate(45deg);
}

.task-map-marker.is-selected span {
  outline: 4px solid #101927;
}

.bottom-nav {
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #dde5e2;
  background: rgba(255, 255, 255, 0.96);
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: #8a9290;
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  font-weight: 850;
}

.bottom-nav button svg {
  width: 24px;
  height: 24px;
}

.bottom-nav button span {
  font-size: 13px;
}

.bottom-nav button.is-active {
  color: #e03131;
}

.bottom-sheet {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 12;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.bottom-sheet p {
  margin-bottom: 8px;
}

.offline-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 72px;
  z-index: 14;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff3bf;
  color: #5f3f00;
  font-weight: 850;
  box-shadow: 0 10px 28px rgba(10, 20, 30, 0.12);
}

.task-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 14, 20, 0.42);
}

.task-dialog {
  position: relative;
  width: min(860px, calc(100vw - 28px));
  min-height: min(760px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.task-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 40px;
  height: 40px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #263632;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.task-dialog h2 {
  margin-bottom: 10px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.task-dialog p {
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.task-dialog-symbol {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: var(--marker);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.station-template {
  min-height: min(760px, calc(100vh - 28px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
}

.station-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(92px, 0.55fr));
  gap: 1px;
  border-bottom: 1px solid #d7e1de;
  background: #d7e1de;
  padding-right: 54px;
}

.station-header div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
  background: #f8fbfa;
}

.station-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.station-header strong {
  min-width: 0;
  color: #14211f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-step {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  overflow: auto;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}

.station-info-step {
  grid-template-rows: minmax(220px, 0.9fr) auto auto;
}

.station-task-step,
.station-feedback-step {
  align-content: start;
}

.station-step-kicker {
  color: #0e8f86;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.station-copy {
  display: grid;
  gap: 10px;
}

.station-copy h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

.station-copy p {
  margin: 0;
  color: #263632;
  font-size: 18px;
  line-height: 1.45;
}

.station-media-placeholder {
  min-height: 220px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #edf4f2, #f8fbfa);
  border: 1px solid #d7e1de;
}

.station-media-placeholder span {
  width: 94px;
  height: 94px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--marker);
  color: #fff;
  font-size: 40px;
  font-weight: 950;
}

.station-primary-action {
  width: 100%;
  min-height: 58px;
  font-size: 18px;
}

.capture-placeholder {
  min-height: 150px;
  border: 1px dashed #b9c8c4;
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 20px;
  background: #f8fbfa;
  color: #263632;
  text-align: center;
}

.capture-placeholder strong {
  font-size: 20px;
}

.capture-placeholder span {
  color: var(--muted);
  font-weight: 760;
}

.capture-upload {
  min-height: 178px;
  border: 1px dashed #8fb5ad;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  place-items: center;
  padding: 22px;
  background: #f8fbfa;
  color: #263632;
  text-align: center;
  cursor: pointer;
}

.capture-upload-icon {
  min-width: 76px;
  min-height: 48px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  background: #0f766e;
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.capture-upload strong {
  font-size: 20px;
}

.capture-upload small,
.capture-selection {
  color: var(--muted);
  font-weight: 760;
}

.capture-upload input {
  width: min(360px, 100%);
  font-weight: 780;
}

.capture-selection {
  min-height: 28px;
  text-align: center;
}

.media-portal-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #eef4f2;
}

.media-login-card,
.media-gallery-module {
  width: min(1080px, 100%);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(10, 30, 26, 0.18);
}

.media-login-card {
  max-width: 460px;
  display: grid;
  gap: 16px;
  padding: 32px;
}

.media-login-card h1,
.media-gallery-header h1 {
  margin: 0;
  color: #10221e;
  font-size: 34px;
  line-height: 1.1;
}

.media-login-card p,
.media-gallery-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
}

.media-gallery-module {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.media-gallery-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.media-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.customer-media-card {
  min-width: 0;
  border: 1px solid #dce7e4;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f9fbfa;
}

.customer-media-card img,
.customer-media-file {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: #dfe9e6;
}

.customer-media-file {
  display: grid;
  place-items: center;
  color: #18342f;
  font-weight: 950;
}

.customer-media-card strong,
.customer-media-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-media-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.station-feedback-symbol {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 24px auto 0;
  background: #edf4f2;
  color: #0e8f86;
  font-size: 54px;
  font-weight: 950;
}

.station-feedback-symbol.is-correct {
  background: #d3f9d8;
  color: #1b5e20;
}

.station-feedback-facts {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 8px 0 0;
}

.preview-media-strip {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.preview-media-strip img,
.preview-media-strip span {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d7e1de;
  background: #edf4f2;
}

.preview-media-strip img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.preview-media-strip span {
  display: block;
  padding: 10px;
  font-weight: 820;
  color: var(--muted);
}

.task-dialog dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  margin: 16px 0;
}

.task-dialog dt {
  color: var(--muted);
  font-weight: 800;
}

.task-dialog dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-dialog-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.task-dialog-tabs span {
  min-height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #edf4f2;
  color: #263632;
  font-weight: 850;
  text-align: center;
  padding: 6px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.guide-dialog-actions {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 5;
  width: auto;
  pointer-events: none;
}

.guide-dialog-actions button {
  pointer-events: auto;
}

.dialog-actions button {
  min-height: 50px;
}

.list-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.device-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.row-actions {
  grid-column: 1 / -1;
}

.filters {
  margin-bottom: 14px;
}

.device-create {
  align-items: stretch;
  margin-bottom: 14px;
}

.filters input,
.filters select,
.device-create input {
  width: min(240px, 100%);
}

@media (max-width: 820px) {
  .setup-grid,
  .setup-modern,
  .dashboard,
  .action-row,
  .content-admin-grid,
  .station-riddle-layout,
  .riddle-editor-grid,
  .compact-dashboard,
  .media-grid,
  .answer-option-row,
  .answer-option-row.compact,
  .assigned-media-card,
  .media-picker-filters,
  .list-row,
  .device-row {
    grid-template-columns: 1fr;
  }

  .content-tree {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
  }

  .two-fields,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs,
  .filters {
    width: 100%;
  }

  .tab,
  .filters input,
  .filters select {
    flex: 1 1 160px;
  }

  .ipad-preview-panel {
    position: static;
  }

  .station-riddle-overview,
  .riddle-editor-shell {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .ipad-preview {
    width: min(300px, 100%);
  }
}

@media (orientation: portrait) and (min-width: 700px) {
  .game-board {
    grid-template-columns: minmax(286px, 40vw) minmax(0, 1fr);
  }

  .task-item {
    min-height: 92px;
  }
}

@media (orientation: landscape) and (min-width: 900px) {
  .setup-modern {
    grid-template-columns: minmax(190px, 260px) minmax(0, 1.1fr) minmax(300px, 0.8fr);
  }

  .game-board {
    grid-template-columns: minmax(300px, 38vw) minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .player-shell {
    grid-template-rows: 72px minmax(0, 1fr) calc(72px + env(safe-area-inset-bottom));
  }

  .player-header {
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    padding: 6px 10px;
  }

  .team-block strong,
  .device-block strong {
    font-size: 14px;
  }

  .team-block span,
  .device-block span {
    font-size: 11px;
  }

  .player-logo,
  .player-logo img {
    width: 44px;
    height: 44px;
  }

  .game-board {
    grid-template-columns: minmax(250px, 82vw) minmax(0, 1fr);
  }

  .panel-closed .game-board {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .task-head {
    min-height: 72px;
    padding: 14px;
  }

  .task-head h2 {
    font-size: 24px;
  }

  .task-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .task-status {
    grid-column: 2;
  }

  .map-actions {
    right: 12px;
    bottom: 14px;
    flex-direction: column;
  }

  .bottom-nav button span {
    font-size: 11px;
  }

  .placeholder-row {
    grid-template-columns: 1fr 1fr;
  }

  .placeholder-row span {
    grid-column: 1 / -1;
  }
}

.table-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  align-items: center;
  border-bottom: 1px solid #e3e8e6;
}

.table-list span {
  color: var(--muted);
}

.compact div {
  min-height: 38px;
}

.surface-home {
  background: #0e8f86;
}

.surface-home .map-layer {
  background:
    radial-gradient(circle at 22% 22%, rgba(134, 239, 172, 0.55), transparent 24%),
    linear-gradient(135deg, transparent 0 16%, rgba(255,255,255,.18) 16% 17%, transparent 17% 33%, rgba(255,255,255,.14) 33% 34%, transparent 34%),
    radial-gradient(circle at 72% 38%, rgba(255,255,255,.9) 0 5px, transparent 6px),
    radial-gradient(circle at 54% 62%, rgba(255,255,255,.85) 0 5px, transparent 6px),
    radial-gradient(circle at 34% 76%, rgba(255,255,255,.85) 0 5px, transparent 6px),
    #0e8f86;
}

.surface-login {
  background: #081827;
}

.surface-login .map-layer {
  background:
    linear-gradient(to top, rgba(17, 54, 84, .95), transparent 46%),
    linear-gradient(90deg, transparent 0 8%, rgba(255,255,255,.1) 8% 9%, transparent 9% 22%, rgba(255,255,255,.12) 22% 23%, transparent 23%),
    radial-gradient(circle at 31% 42%, rgba(103, 232, 249, .85) 0 4px, transparent 5px),
    radial-gradient(circle at 53% 54%, rgba(103, 232, 249, .75) 0 4px, transparent 5px),
    radial-gradient(circle at 70% 30%, rgba(103, 232, 249, .65) 0 4px, transparent 5px),
    #081827;
}

.surface-guide {
  background: #d86310;
}

.surface-guide .map-layer {
  background:
    conic-gradient(from 35deg at 78% 24%, rgba(255,255,255,.45), transparent 9%, rgba(255,255,255,.22) 13%, transparent 18%),
    linear-gradient(135deg, transparent 0 20%, rgba(255,255,255,.18) 20% 21%, transparent 21% 55%, rgba(255,255,255,.16) 55% 56%, transparent 56%),
    #d86310;
}

.surface-portal {
  background: #155e95;
}

.surface-portal .map-layer {
  background:
    linear-gradient(45deg, transparent 0 18%, rgba(255,255,255,.16) 18% 19%, transparent 19% 40%, rgba(255,255,255,.12) 40% 41%, transparent 41%),
    radial-gradient(circle at 18% 72%, rgba(191, 219, 254, .65) 0 7px, transparent 8px),
    radial-gradient(circle at 66% 38%, rgba(191, 219, 254, .6) 0 7px, transparent 8px),
    #155e95;
}

.surface-admin,
.surface-forbidden {
  background: #18131f;
}

.surface-admin .map-layer,
.surface-forbidden .map-layer {
  background:
    radial-gradient(circle at 22% 24%, rgba(168, 85, 247, .38), transparent 26%),
    radial-gradient(circle at 78% 28%, rgba(56, 189, 248, .22), transparent 22%),
    linear-gradient(135deg, rgba(255,255,255,.13) 0 1px, transparent 1px 86px),
    #18131f;
}

@media (max-width: 860px) {
  .dashboard,
  .action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .dashboard,
  .action-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(38px, 15vw, 54px);
  }
}
