:root {
  --page-bg: #ffffff;
  --panel-bg: rgba(255, 255, 255, 0.96);
  --panel-border: rgba(112, 99, 74, 0.28);
  --ink: #2f2a21;
  --muted: #62594a;
  --accent: #0f6e9e;
  --accent-soft: rgba(15, 110, 158, 0.12);
  --line: rgba(112, 99, 74, 0.16);
  --standard: rgb(51, 204, 136);
  --premium: rgb(51, 131, 204);
  --blocked: rgb(170, 170, 170);
  --row-alt: rgba(223, 236, 255, 0.72);
  --overlay: rgba(30, 25, 18, 0.52);
  --warning: rgba(215, 129, 16, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--page-bg);
  user-select: none;
  -webkit-user-select: none;
}

body.is-map-dragging,
body.is-map-dragging * {
  cursor: move !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

button,
input,
a {
  font: inherit;
}

input,
a,
.detail-link {
  user-select: text;
  -webkit-user-select: text;
}

.app-shell {
  padding: 1rem;
  max-width: 1600px;
  margin: 0 auto;
}

.list-panel,
.map-panel,
.detail-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 0.35rem;
}

.detail-overlay[hidden] {
  display: none;
}

.app-header {
  display: block;
  padding: 0.35rem 0;
  border-bottom: 3px groove rgba(128, 128, 128, 0.75);
}

.brand-block {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.brand-link,
.status-brand {
  color: inherit;
  text-decoration: none;
}

.header-status-card {
  display: none;
}

.brand-copy {
  text-align: left;
}

.brand-logo {
  width: min(6.5rem, 22vw);
  height: auto;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.app-header h1,
.panel-header h2,
.status-card h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.1;
}

.app-header h1 {
  font-size: clamp(1.35rem, 2.7vw, 1.75rem);
  color: #00f;
  font-weight: 700;
  line-height: 1.2;
}

.event-meta {
  margin: 0;
  color: #00f;
  font-weight: 700;
  line-height: 1.2;
}

.status-card {
  --status-brand-gap: 0;
  --status-brand-width: 0;
  display: grid;
  grid-template-columns: var(--status-brand-width) minmax(0, 1fr) auto;
  column-gap: var(--status-brand-gap);
  align-items: center;
  min-height: 2.85rem;
}

.status-card p {
  margin: 0;
}

.status-brand {
  display: grid;
  justify-items: center;
  width: 2.4rem;
  opacity: 0;
  transform: scale(0.88);
  transform-origin: center left;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.status-logo {
  width: 1.85rem;
  height: auto;
}

.status-brand-text {
  margin-top: 0.18rem;
  color: #00f;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-copy {
  min-width: 0;
}

.status-exhibitor-logo {
  display: none;
  max-width: 4.75rem;
  max-height: 2.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-left: 0.7rem;
}

body.has-compact-brand .status-card {
  --status-brand-gap: 0.55rem;
  --status-brand-width: 2.4rem;
}

body.has-compact-brand .status-brand {
  opacity: 1;
  transform: scale(1);
}

.status-booth {
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 1.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-name {
  margin-top: 0.35rem;
  color: var(--muted);
  min-height: 1.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-main {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

html.is-directory-suppressed .app-main {
  grid-template-columns: minmax(0, 1fr);
}

html.is-directory-suppressed .list-panel {
  display: none;
}

html.is-comparison-embed .app-shell {
  padding-top: 0;
}

html.is-comparison-embed .app-header,
html.is-comparison-embed .map-panel-header {
  display: none;
}

html.is-comparison-embed .app-main {
  margin-top: 0;
}

html.is-map-embed,
html.is-map-embed body {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

html.is-map-embed .app-shell {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

html.is-map-embed .app-header,
html.is-map-embed .list-panel {
  display: none;
}

html.is-map-embed .app-main {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

html.is-map-embed .map-panel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

html.is-map-embed .map-viewport {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}

html.is-map-embed .map-panel-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 4;
  display: block;
  min-height: 0;
  padding: 0.28rem 0.75rem 0.3rem 3.35rem;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

html.is-map-embed .map-panel-header:has(.status-booth:not(:empty)) {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
}

html.is-map-embed .map-status-card {
  display: block;
  min-height: 1.2rem;
}

html.is-map-embed .map-status-card .status-brand,
html.is-map-embed .map-status-card .status-exhibitor-logo {
  display: none !important;
}

html.is-map-embed .map-status-card .status-copy {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
}

html.is-map-embed .map-status-card .status-booth,
html.is-map-embed .map-status-card .status-name {
  min-height: 0;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.2;
  white-space: nowrap;
}

html.is-map-embed .map-status-card .status-booth {
  flex: 0 0 auto;
}

html.is-map-embed .map-status-card .status-booth:not(:empty)::after {
  content: ":";
}

html.is-map-embed .map-status-card .status-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-panel,
.map-panel {
  position: relative;
}

.list-panel {
  display: flex;
  flex-direction: column;
  order: 2;
  overflow: hidden;
}

.map-panel {
  order: 1;
  overflow: visible;
}

.panel-header {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
  padding: 0.85rem 1rem 0;
}

.list-panel .panel-header h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.results-meta,
.map-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.results-meta {
  display: none;
}

html.is-map-embed .map-stage #Scale {
  display: none;
}

.list-controls {
  display: grid;
  gap: 0.9rem;
  padding: 0.65rem 1rem;
}

.search-field {
  position: relative;
  display: block;
}

.search-field input {
  width: 100%;
  padding: 0.72rem 2.5rem 0.72rem 0.95rem;
  border: 1px solid rgba(72, 69, 62, 0.18);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.88);
  appearance: none;
  -webkit-appearance: none;
}

.search-action {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(15, 110, 158, 0.9);
  cursor: pointer;
  transform: translateY(-50%);
}

.search-action:hover,
.search-action:focus-visible {
  color: var(--accent);
  outline: none;
}

#searchActionIcon {
  font-size: 1.25rem;
  line-height: 1;
}

.search-field input::-webkit-search-decoration,
.search-field input::-webkit-search-cancel-button,
.search-field input::-webkit-search-results-button,
.search-field input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.toolbar-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.58;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    filter 140ms ease;
}

.toolbar-button:hover,
.toolbar-button:focus-visible {
  opacity: 1;
  filter: saturate(1.15);
  outline: none;
}

.list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f0f0f8;
}

.head-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.head-sort:last-child {
  justify-content: end;
  text-align: right;
}

.head-sort:hover,
.head-sort:focus-visible,
.head-sort.is-active {
  color: var(--accent);
  outline: none;
}

.sort-indicator {
  font-size: 0.7rem;
  letter-spacing: -0.18em;
  line-height: 1;
  min-width: 0.85rem;
}

.list-body {
  display: block;
  min-height: 0;
  height: min(17rem, 30vh);
  overflow: auto;
  overflow-anchor: none;
}

.list-empty,
.loading-state {
  padding: 1rem;
  color: var(--muted);
}

.exhibitor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  gap: 0.6rem;
  align-items: start;
  width: 100%;
  padding: 0.34rem 0.85rem;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: transparent;
  text-align: left;
  cursor: pointer;
  line-height: 1.08;
}

.exhibitor-row:nth-child(odd) {
  background: var(--row-alt);
}

.exhibitor-row:hover,
.exhibitor-row:focus-visible,
.exhibitor-row.is-active {
  background: rgba(15, 110, 158, 0.09);
  outline: none;
}

.exhibitor-row .booth-column {
  font-weight: 700;
  text-align: right;
}

.exhibitor-row .company-column {
  line-height: 1.3;
}

.map-panel {
  min-height: 0;
  padding-bottom: 0.5rem;
}

.map-panel-header {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 3rem;
  padding: 0.45rem 0.7rem 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.map-status-card .status-exhibitor-logo:not([hidden]) {
  display: block;
  max-width: 6rem;
  max-height: 2.2rem;
  margin-left: 0.45rem;
}

.map-toolbar {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  width: fit-content;
  margin: 0;
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.15rem;
}

.toolbar-button img {
  width: 1.2rem;
  height: 1.2rem;
}

.map-viewport {
  position: relative;
  margin: 1rem;
  height: var(--map-workspace-height, clamp(14.5rem, 40vh, 21rem));
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid var(--line);
  background: rgba(255, 239, 213, 0.25);
  touch-action: none;
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
}

.print-map-brand {
  display: none;
}

.print-directory-header,
.print-directory-list,
.print-directory-title {
  display: none;
}

.map-viewport.is-dragging {
  cursor: move;
}

.map-viewport.is-dragging,
.map-viewport.is-dragging * {
  cursor: grabbing !important;
}

.map-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

html.is-map-loading .map-stage {
  visibility: hidden;
}

.map-stage svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-stage [data-booth-interactive="true"] {
  cursor: pointer !important;
}

.map-stage [data-booth-interactive="true"] * {
  cursor: pointer !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.map-stage [data-booth-interactive="true"]:focus-visible > rect:first-of-type {
  stroke: rgba(255, 0, 0, 1);
  stroke-width: 2;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.22);
}

.detail-card {
  width: min(26rem, 100%);
  max-height: min(42rem, calc(100vh - 2.5rem));
  padding: 1rem;
  background: rgb(255, 245, 230);
  border: 2px solid #444;
  border-radius: 6px;
}

.detail-content {
  overflow: auto;
  max-height: 100%;
  padding-right: 0.4rem;
  color: #333;
  cursor: default;
}

.detail-shell {
  position: relative;
}

.detail-shell h1 {
  margin: 0;
  color: #222;
  font-size: 1.35rem;
}

.detail-logo {
  float: right;
  width: 96px;
  height: auto;
  margin: 0 0 0.5rem 0.5rem;
}

.detail-shell .o85 .detail-logo {
  opacity: 0.85;
}

.detail-contact,
.detail-booth-line,
.detail-address,
.detail-phone,
.detail-other {
  margin-top: 0.85rem;
}

.detail-booth-line {
  font-weight: 700;
}

.detail-description {
  margin-top: 1rem;
  line-height: 1.45;
}

.detail-link {
  color: var(--ink);
  text-decoration: none;
}

.detail-link:hover,
.detail-link:focus-visible {
  color: var(--accent);
}

.header-status-card {
  display: none;
}

.detail-overlay a,
.detail-overlay a * {
  cursor: pointer !important;
}

.is-warning {
  color: var(--warning);
}

.detail-shell .s64 .detail-logo {
  width: 64px;
}

.detail-shell .s80 .detail-logo {
  width: 80px;
}

.detail-shell .s112 .detail-logo {
  width: 112px;
}

.detail-shell .s128 .detail-logo {
  width: 128px;
}

.detail-shell .s160 .detail-logo {
  width: 160px;
}

.detail-shell .lm-64 .detail-logo {
  margin-left: calc(1rem - 64px);
}

.detail-shell .lm-80 .detail-logo {
  margin-left: calc(1rem - 80px);
}

.detail-shell .lm-96 .detail-logo {
  margin-left: calc(1rem - 96px);
}

.detail-shell .lm-112 .detail-logo {
  margin-left: calc(1rem - 112px);
}

.detail-shell .lm-128 .detail-logo {
  margin-left: calc(1rem - 128px);
}

.detail-shell .lm-160 .detail-logo {
  margin-left: calc(1rem - 160px);
}

.detail-shell .tm-075 .detail-logo {
  margin-top: 0.75rem;
}

.detail-shell .tm-100 .detail-logo {
  margin-top: 1rem;
}

.detail-shell .tm-125 .detail-logo {
  margin-top: 1.25rem;
}

.detail-shell .tm-175 .detail-logo {
  margin-top: 1.75rem;
}

@media (min-width: 72rem) {
  .app-shell {
    padding: 1.25rem;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(18rem, 1fr);
    align-items: start;
    gap: 1rem;
    padding-bottom: 0.6rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(6px);
  }

  .app-main {
    grid-template-columns: minmax(20rem, 25rem) minmax(0, 1fr);
    align-items: start;
  }

  .header-status-card {
    display: grid;
    align-items: start;
    align-content: start;
    justify-self: start;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    min-height: 6.35rem;
    width: min(100%, 21rem);
    margin-left: 1.5rem;
  }

  .list-controls {
    padding: 0.65rem 1rem;
  }

  .exhibitor-row {
    padding: 0.42rem 1rem;
  }

  .list-panel {
    order: 1;
  }

  .map-panel {
    order: 2;
  }

  .list-body {
    height: var(--desktop-workspace-height, min(48rem, 74vh));
  }

  .map-panel-header {
    display: none;
  }

  .map-panel {
    min-height: calc(var(--map-workspace-height, 32rem) + 2rem);
  }

  .map-viewport {
    height: var(--map-workspace-height, min(74vh, 48rem));
  }

  .header-status-card .status-copy {
    min-width: 0;
  }

  .header-status-card .status-name {
    margin-top: 0.55rem;
  }

  .header-status-card .status-exhibitor-logo:not([hidden]) {
    display: block;
    max-width: 9.5rem;
    max-height: 2.5rem;
    margin-left: 0;
    margin-top: 0.1rem;
  }
}
