:root {
  --bg: #f2efe7;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(10, 46, 61, 0.12);
  --ink: #142934;
  --subtle: #54707d;
  --sea-900: #0a2e3d;
  --sea-800: #0f4a5b;
  --sea-700: #18657a;
  --sand: #efe3c8;
  --sale: #f26d3d;
  --rent: #2a8b63;
  --both: #805ad5;
  --approx: #587f91;
  --shadow: 0 14px 30px rgba(20, 41, 52, 0.12);
}

* {
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(24, 101, 122, 0.08), transparent 22%),
    radial-gradient(circle at top right, rgba(242, 109, 61, 0.08), transparent 18%),
    linear-gradient(180deg, #f7f4ee 0%, #edf2f0 100%);
}

.shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 520px) auto auto;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(10, 46, 61, 0.97), rgba(15, 74, 91, 0.94));
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  line-height: 1;
  font-family: "Space Grotesk", sans-serif;
  white-space: nowrap;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(239, 227, 200, 0.18);
  color: var(--sand);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-subtitle {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.76);
}

.topbar-note {
  min-width: 0;
  padding: 0 8px;
  font-size: 10px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(52px, 60px));
  gap: 4px;
  flex-shrink: 0;
}

.auth-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  justify-self: end;
}

.auth-status {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.82);
}

.auth-btn {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
  white-space: nowrap;
}

.stat {
  padding: 5px 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-value {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.05;
}

.stat-label {
  display: block;
  margin-top: 1px;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.76);
}

.filterbar {
  display: grid;
  align-items: center;
  grid-template-columns: 116px 130px minmax(240px, 1fr) 136px 104px;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.filterbar label {
  display: block;
  min-width: 0;
}

.filterbar label span {
  display: none;
}

.filterbar select,
.filterbar input[type="search"] {
  width: 100%;
  border: 1px solid rgba(10, 46, 61, 0.14);
  background: var(--panel-strong);
  border-radius: 9px;
  padding: 7px 10px;
  min-height: 36px;
  font-size: 12px;
  color: var(--ink);
  outline: none;
}

.filterbar select:focus,
.filterbar input[type="search"]:focus {
  border-color: var(--sea-700);
  box-shadow: 0 0 0 3px rgba(24, 101, 122, 0.12);
}

.search-field {
  min-width: 0;
}

.compact-toggle {
  display: flex !important;
  align-items: center;
  gap: 8px;
  justify-content: center;
  border: 1px solid rgba(10, 46, 61, 0.14);
  border-radius: 12px;
  background: var(--panel-strong);
  padding: 10px 12px;
}

.compact-toggle span {
  font-size: 14px !important;
  color: var(--ink) !important;
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  min-height: 36px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
}

.primary-btn {
  background: linear-gradient(135deg, var(--sale), #fa9955);
  color: white;
  align-self: stretch;
}

.ghost-btn {
  background: rgba(10, 46, 61, 0.06);
  color: var(--sea-800);
}

.layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 8px 12px 12px;
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: grid;
  place-items: center;
  background: rgba(10, 46, 61, 0.46);
  backdrop-filter: blur(8px);
}

.auth-card {
  width: min(420px, calc(100% - 32px));
  padding: 22px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(10, 46, 61, 0.08);
  box-shadow: 0 18px 48px rgba(20, 41, 52, 0.28);
}

.auth-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--sea-900);
}

.auth-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--subtle);
}

.auth-login-btn {
  margin-top: 18px;
  width: 100%;
  min-height: 44px;
  font-size: 14px;
}

.map-panel,
.sidebar {
  min-height: 0;
}

.map-panel {
  position: relative;
  height: 100%;
}

#map {
  height: 100%;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(10, 46, 61, 0.1);
}

.map-tip {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 500;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--sea-900);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 700;
}

.detail-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 900;
  width: min(380px, calc(100% - 36px));
  max-height: calc(100% - 36px);
  overflow: auto;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(10, 46, 61, 0.08);
  box-shadow: 0 20px 44px rgba(20, 41, 52, 0.24);
}

.detail-panel.is-minimized {
  width: 220px;
  max-height: none;
  overflow: hidden;
}

.detail-panel.is-minimized .detail-media,
.detail-panel.is-minimized .detail-thumbs,
.detail-panel.is-minimized .detail-body {
  display: none;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(10, 46, 61, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 249, 0.98));
  cursor: grab;
}

.detail-toolbar:active {
  cursor: grabbing;
}

.detail-drag {
  font-size: 12px;
  font-weight: 700;
  color: var(--sea-800);
  letter-spacing: 0.04em;
}

.detail-toolbar-actions {
  display: flex;
  gap: 8px;
}

.detail-toolbar-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 46, 61, 0.08);
  color: var(--sea-900);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.detail-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(10, 46, 61, 0.08), rgba(24, 101, 122, 0.16));
}

.detail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sea-900);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(20, 41, 52, 0.14);
}

.detail-nav.prev { left: 12px; }
.detail-nav.next { right: 12px; }

.detail-counter {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(10, 46, 61, 0.74);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 10px 14px 0;
}

.detail-thumb {
  width: 66px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 2px solid transparent;
  overflow: hidden;
  background: rgba(10, 46, 61, 0.08);
  cursor: pointer;
}

.detail-thumb.is-active {
  border-color: var(--sea-700);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-body {
  padding: 12px 14px 14px;
}

.detail-title {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

.detail-price-primary {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--sea-900);
}

.detail-price-secondary {
  margin-top: 4px;
  font-size: 12px;
  color: var(--subtle);
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.detail-cell {
  background: rgba(10, 46, 61, 0.05);
  border-radius: 12px;
  padding: 8px 10px;
}

.detail-cell-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--subtle);
  font-weight: 700;
}

.detail-cell-value {
  font-size: 14px;
  color: var(--sea-900);
  font-weight: 700;
  line-height: 1.4;
}

.detail-location {
  margin-top: 10px;
  font-size: 12px;
  color: var(--sea-800);
  line-height: 1.5;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.detail-action-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
}

.detail-description {
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(10, 46, 61, 0.05);
  padding: 10px 12px;
}

.detail-section-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sea-900);
}

.detail-description-text {
  font-size: 12px;
  line-height: 1.65;
  color: var(--subtle);
  white-space: pre-wrap;
  word-break: break-word;
}

.map-legend {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 500;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  font-size: 11px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.sale { background: var(--sale); }
.dot.rent { background: var(--rent); }
.dot.both { background: var(--both); }
.dot.approx { background: var(--approx); }

.major-landmark-marker {
  background: transparent;
  border: 0;
}

.major-landmark-pin {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid rgba(10, 46, 61, 0.14);
  box-shadow: 0 8px 16px rgba(20, 41, 52, 0.18);
}

.major-landmark-label {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(10, 46, 61, 0.12);
  color: var(--sea-900);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(20, 41, 52, 0.12);
  white-space: nowrap;
}

.sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 16px 16px 12px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar-label,
.sidebar-subcount {
  margin: 0;
  font-size: 12px;
  color: var(--subtle);
}

.sidebar-head h2 {
  margin: 6px 0 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  line-height: 1;
}

.listing-list {
  min-height: 0;
  overflow: auto;
  padding: 4px 2px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.listing-list::-webkit-scrollbar {
  width: 8px;
}

.listing-list::-webkit-scrollbar-thumb {
  background: rgba(10, 46, 61, 0.18);
  border-radius: 999px;
}

.card {
  display: block;
  width: 100%;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel-strong);
  border: 1px solid rgba(10, 46, 61, 0.08);
  box-shadow: 0 10px 22px rgba(20, 41, 52, 0.07);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.card:hover,
.card.is-active {
  transform: translateY(-1px);
  border-color: rgba(24, 101, 122, 0.28);
  box-shadow: 0 16px 28px rgba(20, 41, 52, 0.14);
}

.card-image-wrap {
  position: relative;
  height: 148px;
  background: linear-gradient(135deg, rgba(10, 46, 61, 0.08), rgba(24, 101, 122, 0.16));
}

.card-image,
.card-image-placeholder {
  width: 100%;
  height: 100%;
}

.card-image {
  object-fit: cover;
  display: block;
}

.card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  color: rgba(10, 46, 61, 0.28);
}

.card-badges {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  gap: 8px;
}

.trade-chip,
.geo-chip,
.metric,
.meta-pill,
.price-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.trade-chip,
.geo-chip {
  padding: 6px 10px;
  color: white;
  box-shadow: 0 8px 16px rgba(20, 41, 52, 0.16);
}

.card-body {
  padding: 14px;
}

.card-region {
  font-size: 12px;
  color: var(--sea-700);
  font-weight: 700;
}

.card-title {
  margin: 6px 0 10px;
  font-size: 16px;
  line-height: 1.38;
}

.card-prices {
  display: grid;
  gap: 4px;
}

.card-price-primary {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 700;
  color: var(--sea-900);
}

.card-price-secondary {
  font-size: 12px;
  color: var(--subtle);
  font-weight: 600;
}

.card-metrics,
.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.metric {
  padding: 6px 10px;
  background: rgba(10, 46, 61, 0.06);
  color: var(--sea-800);
}

.meta-pill {
  padding: 5px 9px;
  background: rgba(24, 101, 122, 0.09);
  color: var(--sea-700);
}

.empty {
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 32px 18px;
  text-align: center;
  color: var(--subtle);
}

.leaflet-control-layers,
.leaflet-bar {
  box-shadow: 0 10px 24px rgba(20, 41, 52, 0.16) !important;
  border: 0 !important;
}

.leaflet-control-layers {
  border-radius: 14px !important;
}

.leaflet-control-scale {
  margin-bottom: 20px !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 18px;
  overflow: hidden;
}

.leaflet-popup-close-button {
  top: 8px !important;
  right: 8px !important;
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center;
  font-size: 28px !important;
  line-height: 1 !important;
  color: var(--sea-900) !important;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(20, 41, 52, 0.12);
}

.leaflet-popup-content {
  margin: 14px 14px 16px !important;
}

.popup {
  width: min(320px, 62vw);
  display: block;
}

.popup,
.popup * {
  box-sizing: border-box;
  float: none !important;
}

.popup-media {
  display: block;
  width: 100%;
  margin: 0 0 12px;
}

.popup-image {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 180px !important;
  object-fit: cover;
  border-radius: 14px;
}

.popup h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.38;
}

.popup-prices {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.popup-price-primary {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--sea-900);
}

.popup-price-secondary {
  font-size: 12px;
  color: var(--subtle);
}

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

.popup-cell {
  background: rgba(10, 46, 61, 0.05);
  border-radius: 12px;
  padding: 9px 10px;
}

.popup-cell b {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--subtle);
}

.popup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.popup-links a {
  text-decoration: none;
  color: white;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sea-800), var(--sea-700));
  font-size: 12px;
  font-weight: 700;
}

.popup-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--subtle);
}

.marker-pin {
  width: 20px;
  height: 20px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid white;
  box-shadow: 0 8px 16px rgba(20, 41, 52, 0.24);
}

.marker-pin.sale { background: var(--sale); }
.marker-pin.rent { background: var(--rent); }
.marker-pin.both { background: var(--both); }
.marker-pin.approx { opacity: 0.78; border-style: dashed; }

.cluster-ring {
  background: rgba(10, 46, 61, 0.18);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.cluster-core {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sea-800), var(--sea-700));
  color: white;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.admin-label {
  background: rgba(15, 74, 91, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: white;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(20, 41, 52, 0.14);
}

.admin-label::before {
  content: "◆";
  margin-right: 6px;
  color: var(--sand);
}

.major-landmark-label {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(10, 46, 61, 0.1);
  color: var(--sea-900);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(20, 41, 52, 0.12);
}

.major-landmark-label::before {
  content: "●";
  margin-right: 6px;
  color: #ff8a3d;
}

.home-control button {
  width: 34px;
  height: 34px;
  border: 0;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  color: var(--sea-900);
}

.google-control {
  margin: 10px 10px 0 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(20, 41, 52, 0.16);
  border: 1px solid rgba(10, 46, 61, 0.1);
  overflow: hidden;
}

.google-home-control {
  padding: 6px;
}

.google-map-btn {
  border: 0;
  background: white;
  color: var(--sea-900);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 10px;
}

.google-overlay-control {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  min-width: 140px;
  font-size: 12px;
  color: var(--sea-900);
}

.google-control-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sea-800);
}

.google-overlay-control label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.google-overlay-control input {
  accent-color: var(--sea-700);
}

@media (max-width: 1440px) {
  .filterbar {
    grid-template-columns: 108px 122px minmax(180px, 1fr) 130px 100px;
  }
}

@media (max-width: 1120px) {
  html,
  body {
    overflow: auto;
  }

  .shell {
    height: auto;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stats {
    width: 100%;
    grid-template-columns: repeat(5, minmax(60px, 1fr));
  }

  .brand {
    width: 100%;
  }

  .auth-strip {
    justify-self: start;
  }

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

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: 58vh;
  }

  .detail-panel {
    width: min(380px, calc(100% - 24px));
    top: 12px;
    right: 12px;
    max-height: calc(100% - 24px);
  }

  .sidebar {
    overflow: visible;
  }

  .listing-list {
    max-height: 48vh;
  }
}

@media (max-width: 720px) {
  .topbar,
  .filterbar,
  .layout {
    padding-left: 12px;
    padding-right: 12px;
  }

  .filterbar {
    grid-template-columns: 1fr;
  }

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

  .brand {
    flex-wrap: wrap;
    gap: 6px;
  }

  .brand-subtitle {
    width: 100%;
  }

  .topbar-note {
    display: none;
  }

  .detail-panel {
    left: 12px;
    right: 12px;
    width: auto;
    max-height: min(70vh, calc(100% - 24px));
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }
}
