* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: #dff2ff;
  background: radial-gradient(ellipse at 50% 0%, #0a1d4a 0%, #050e2a 48%, #02061a 100%) fixed;
  overflow: hidden;
}

.screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
#header {
  flex: 0 0 64px;
  border-bottom: 1px solid rgba(31, 90, 192, 0.5);
  background: linear-gradient(180deg, rgba(10, 29, 74, 0.92), rgba(4, 12, 38, 0.92));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header-inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(10px, 1.1vw, 20px);
}

.header-title {
  flex: 1 1 auto;
  min-width: 0;
}

.title-main {
  display: block;
  overflow: hidden;
  font-size: clamp(20px, 1.35vw, 26px);
  font-weight: 700;
  letter-spacing: clamp(2px, 0.26vw, 5px);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffffff, #6fc6ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(47, 168, 255, 0.35);
}

.title-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 6px;
  color: #4f7fae;
  margin-top: 2px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.month-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ms-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #1f5ac0;
  background: rgba(16, 48, 110, 0.6);
  color: #6fc6ff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.ms-btn:hover {
  background: #12408f;
}

.ms-select {
  height: 30px;
  background: #0a1f4d;
  color: #dff2ff;
  border: 1px solid #1f5ac0;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 14px;
  outline: none;
}

.ms-year-select {
  width: 82px;
}

.ms-month-select {
  width: 66px;
}

.clock {
  font-size: 14px;
  color: #6fc6ff;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Main layout ---------- */
.main {
  flex: 1;
  display: flex;
  gap: clamp(8px, 0.75vw, 14px);
  padding: clamp(8px, 0.75vw, 14px) clamp(10px, 0.85vw, 16px);
  min-height: 0;
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(6, 18, 48, 0.72);
  border: 1px solid rgba(31, 90, 192, 0.55);
  border-radius: 8px;
  box-shadow: inset 0 0 30px rgba(15, 60, 140, 0.15), 0 0 18px rgba(20, 70, 160, 0.18);
}

.panel::before,
.panel::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #2ea8ff;
  z-index: 2;
}

.panel::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.panel::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.panel-title {
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #9fdcff;
  border-bottom: 1px solid rgba(31, 90, 192, 0.4);
  background: linear-gradient(90deg, rgba(18, 60, 130, 0.5), transparent);
}

.panel-title i {
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #2ea8ff, #7ef0ff);
  box-shadow: 0 0 8px #2ea8ff;
}

.panel-title-en {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 2px;
  color: #3d6a9e;
}

.mode-toggle {
  margin-left: 12px;
  height: 24px;
  padding: 0 12px;
  font-size: 12px;
  color: #7ef0ff;
  background: rgba(16, 48, 110, 0.7);
  border: 1px solid #2ea8ff;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.mode-toggle:hover {
  background: #12408f;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(47, 168, 255, 0.6);
}

.map-level-toggle {
  display: flex;
  overflow: hidden;
  height: 24px;
  margin-left: 4px;
  border: 1px solid #2ea8ff;
  border-radius: 12px;
}

.map-level-btn {
  padding: 0 10px;
  color: #7ef0ff;
  background: rgba(16, 48, 110, 0.7);
  border: 0;
  border-right: 1px solid rgba(46, 168, 255, 0.5);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 1px;
}

.map-level-btn:last-child {
  border-right: 0;
}

.map-level-btn.active {
  color: #081a3a;
  background: linear-gradient(180deg, #7ef0ff, #2ea8ff);
  font-weight: 600;
}

.metric-select {
  margin-left: 10px;
  height: 24px;
  background: #0a1f4d;
  color: #7ef0ff;
  border: 1px solid #2ea8ff;
  border-radius: 4px;
  font-size: 12px;
  padding: 0 4px;
  outline: none;
}

.panel-left {
  flex: 0 1 clamp(238px, 25%, 420px);
}

.dimension-toggle {
  margin-left: auto;
  height: 22px;
  padding: 0 8px;
  color: #7ef0ff;
  background: rgba(16, 48, 110, 0.55);
  border: 1px solid #1f5ac0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}

.dimension-content {
  flex: 0 1 52%;
  min-height: 170px;
  overflow-x: hidden;
  overflow-y: auto;
  border-bottom: 1px solid rgba(31, 90, 192, 0.4);
}

.dimension-content .ranking {
  flex: none;
  overflow: visible;
}

.dimension-content .chart-panel {
  min-height: 250px;
}

.map-back-button {
  position: absolute;
  z-index: 8;
  top: calc(var(--panel-title-height, 38px) + 12px);
  left: 12px;
  margin-left: 0;
}

.dimension-content::-webkit-scrollbar {
  width: 5px;
}

.dimension-content::-webkit-scrollbar-thumb {
  background: #1f5ac0;
  border-radius: 3px;
}

.dimensions-collapsed .dimension-content {
  display: none;
}

.trend-section {
  flex: 1 1 0;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.trend-title {
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #9fdcff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(31, 90, 192, 0.35);
  background: linear-gradient(90deg, rgba(18, 60, 130, 0.4), transparent);
}

.trend-title i {
  width: 4px;
  height: 14px;
  background: linear-gradient(180deg, #ffe873, #2ea8ff);
  box-shadow: 0 0 8px #2ea8ff;
}

.trend-scope-label {
  margin-left: auto;
  color: #7ef0ff;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.trend-chart {
  flex: 1;
  min-height: 0;
}

.panel-right {
  flex: 0 1 clamp(230px, 24%, 400px);
}

.panel-center {
  flex: 1;
  min-width: 360px;
}

/* ---------- Ranking ---------- */
.ranking {
  flex: 1;
  overflow: auto;
  padding: 6px 8px;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px 4px;
  border-bottom: 1px solid rgba(31, 90, 192, 0.35);
}

.tab {
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  font-size: 12px;
  color: #9fd8ff;
  background: rgba(16, 48, 110, 0.55);
  border: 1px solid #1f5ac0;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.tab:hover {
  background: #12408f;
}

.tab.active {
  color: #081a3a;
  background: linear-gradient(180deg, #7ef0ff, #2ea8ff);
  border-color: #7ef0ff;
  font-weight: 600;
}

.chart-panel {
  flex: 1;
  min-height: 0;
}

.chart-scope-label {
  margin-left: 12px;
  font-size: 11px;
  color: #7ef0ff;
  letter-spacing: 1px;
}

.ranking::-webkit-scrollbar {
  width: 4px;
}

.ranking::-webkit-scrollbar-thumb {
  background: #1f5ac0;
  border-radius: 2px;
}

.rank-list {
  list-style: none;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  margin-bottom: 2px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s;
}

.rank-item:hover {
  background: rgba(31, 167, 255, 0.14);
}

.rank-item.active {
  background: rgba(31, 167, 255, 0.22);
  border-color: #2ea8ff;
}

.rank-no {
  width: 22px;
  text-align: center;
  color: #4f7fae;
  font-style: italic;
  font-size: 13px;
}

.rank-no.top {
  color: #ffe873;
}

.rank-name {
  flex: 0 0 58px;
  font-size: 13px;
}

.rank-bar {
  flex: 1;
  height: 10px;
  background: rgba(16, 48, 110, 0.5);
  border-radius: 5px;
  overflow: hidden;
}

.rank-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f5bd0, #2ea8ff);
  border-radius: 5px;
}

.rank-item.active .rank-bar i {
  background: linear-gradient(90deg, #ffe873, #ff9d3c);
}

.rank-value {
  flex: 0 0 58px;
  text-align: right;
  color: #7ef0ff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.rank-posts {
  flex: 0 0 52px;
  text-align: right;
  color: #6fa8d8;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Map ---------- */
.map {
  flex: 1;
  min-height: 0;
  position: relative;
}

.map-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: rgba(5, 18, 48, 0.94);
  border: 1px solid #1f5ac0;
  border-radius: 4px;
  color: #dff2ff;
  font-size: 12px;
  line-height: 1.7;
  padding: 6px 10px;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(20, 70, 160, 0.4);
}

.three-legend {
  position: absolute;
  z-index: 4;
  left: 16px;
  bottom: 42px;
  min-width: 138px;
  max-height: 230px;
  overflow-y: auto;
  padding: 7px 9px;
  color: #cceaff;
  background: rgba(5, 18, 48, 0.84);
  border: 1px solid rgba(46, 168, 255, 0.65);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(20, 70, 160, 0.3);
}

.three-legend-title {
  margin-bottom: 4px;
  color: #7ef0ff;
  font-weight: 600;
}

.three-legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.three-legend-row i {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.map-footer {
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #3d6a9e;
  border-top: 1px solid rgba(31, 90, 192, 0.3);
}

/* ---------- Summary ---------- */
.summary {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scard {
  background: linear-gradient(160deg, rgba(16, 48, 110, 0.55), rgba(8, 24, 66, 0.45));
  border: 1px solid rgba(31, 90, 192, 0.5);
  border-radius: 6px;
  padding: 10px 12px;
}

.scard-wide {
  grid-column: 1 / -1;
}

.scard-label {
  font-size: 12px;
  color: #6fa8d8;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.scard-value {
  font-size: 22px;
  font-weight: 700;
  color: #7ef0ff;
  font-variant-numeric: tabular-nums;
}

.scard-value.up {
  color: #ff6b4a;
}

.scard-value.down {
  color: #3fc79b;
}

.scard-unit {
  font-size: 11px;
  color: #4f7fae;
  margin-top: 2px;
}

.notes {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 2;
  color: #6fa8d8;
}

/* ---------- Footer ---------- */
.footer {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 11px;
  color: #3d6a9e;
  border-top: 1px solid rgba(31, 90, 192, 0.35);
  background: rgba(3, 10, 30, 0.8);
}

/* ---------- Responsive desktop layout ----------
   设计基准：1366×768 起完整三栏；窄桌面优先保留地图可视面积，侧栏压缩文字与间距。 */
@media (max-width: 1366px) {
  #header {
    flex-basis: 58px;
  }

  .panel-left {
    flex-basis: clamp(230px, 24%, 320px);
  }

  .panel-right {
    flex-basis: clamp(220px, 23%, 300px);
  }

  .panel-center > .panel-title {
    flex: 0 0 auto;
    min-height: 38px;
    padding-top: 5px;
    padding-bottom: 5px;
    flex-wrap: wrap;
    row-gap: 4px;
  }

  #mapTitleText {
    flex: 1 1 150px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .metric-select {
    margin-left: 0;
  }

  .mode-toggle {
    margin-left: 4px;
    padding: 0 8px;
  }

  .map-level-btn {
    padding: 0 8px;
  }
}

@media (max-width: 1180px) {
  .header-tools {
    gap: 8px;
  }

  .clock {
    display: none;
  }

  .panel-title {
    padding: 0 9px;
    font-size: 14px;
    letter-spacing: 1px;
  }

  .panel-left {
    flex-basis: 230px;
  }

  .panel-right {
    flex-basis: 220px;
  }

  .panel-center {
    min-width: 390px;
  }

  .summary {
    gap: 7px;
    padding: 7px;
  }

  .scard {
    padding: 7px 8px;
  }

  .scard-value {
    font-size: 19px;
  }

  .notes {
    padding: 7px 10px;
    font-size: 11px;
    line-height: 1.65;
  }

  .rank-name {
    flex-basis: 48px;
    font-size: 12px;
  }

  .rank-value {
    flex-basis: 52px;
    font-size: 12px;
  }

  .rank-posts {
    flex-basis: 46px;
    font-size: 11px;
  }
}

@media (max-height: 820px) {
  #header {
    flex-basis: 54px;
  }

  .title-main {
    font-size: 20px;
  }

  .main {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .dimension-content,
  .trend-section {
    min-height: 135px;
  }

  .trend-title {
    flex-basis: 30px;
    font-size: 13px;
  }

  .rank-item {
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .scard-label {
    margin-bottom: 3px;
  }

  .footer {
    flex-basis: 24px;
  }
}

/* 1366×768 是常见办公电脑视口：使用紧凑信息密度，而非整体缩放画布。 */
@media (min-width: 1181px) and (max-width: 1440px) and (max-height: 820px) {
  .panel-title {
    flex-basis: 34px;
    padding: 0 9px;
    font-size: 13px;
  }

  .panel-title i {
    width: 3px;
    height: 13px;
  }

  .mode-toggle,
  .map-level-toggle,
  .metric-select {
    height: 22px;
    font-size: 11px;
  }

  .mode-toggle {
    padding: 0 7px;
  }

  .map-level-btn {
    padding: 0 7px;
    font-size: 11px;
  }

  .tab-bar {
    padding: 4px 6px 3px;
  }

  .tab {
    height: 24px;
    font-size: 11px;
  }

  .rank-item {
    gap: 5px;
    padding: 2px 4px;
    margin-bottom: 1px;
  }

  .rank-no,
  .rank-name,
  .rank-value {
    font-size: 12px;
  }

  .rank-posts {
    font-size: 11px;
  }

  .summary {
    gap: 6px;
    padding: 6px;
  }

  .scard {
    padding: 6px 8px;
  }

  .scard-label {
    margin-bottom: 3px;
    font-size: 11px;
  }

  .scard-value {
    font-size: 19px;
  }

  .scard-unit,
  .notes,
  .map-footer {
    font-size: 10px;
  }

  .notes {
    padding: 6px 10px;
    line-height: 1.55;
  }

  .trend-title {
    flex-basis: 29px;
    font-size: 12px;
  }

  .trend-scope-label {
    font-size: 10px;
  }
}

@media (max-width: 980px) {
  .screen {
    min-width: 980px;
  }

  body {
    overflow-x: auto;
    overflow-y: hidden;
  }
}

/* ---------- Adaptive layout core ----------
   由 app.js 根据实时窗口宽高写入变量；窗口拖动、分屏或更换显示器时无需刷新页面。 */
.screen {
  --header-height: 60px;
  --footer-height: 26px;
  --header-gap: 16px;
  --header-padding: 20px;
  --title-size: 24px;
  --title-spacing: 4px;
  --month-control-height: 30px;
  --month-font-size: 14px;
  --main-gap: 14px;
  --main-padding-y: 12px;
  --main-padding-x: 16px;
  --panel-title-height: 38px;
  --panel-title-font-size: 15px;
  --panel-title-padding: 12px;
  --control-height: 24px;
  --control-font-size: 12px;
  --control-padding: 10px;
  --body-font-size: 12px;
  --small-font-size: 11px;
  --card-padding-y: 10px;
  --card-padding-x: 12px;
  --card-value-font-size: 22px;
  --rank-padding-y: 4px;
  --rank-padding-x: 6px;
  --section-min-height: 170px;
  --map-footer-height: 24px;
  --notes-line-height: 1.8;
  --left-panel-basis: clamp(260px, 25%, 400px);
  --right-panel-basis: clamp(250px, 24%, 380px);
  --center-panel-min-width: 420px;
}

.screen #header { flex-basis: var(--header-height); }
.screen .header-inner { gap: var(--header-gap); padding: 0 var(--header-padding); }
.screen .title-main { font-size: var(--title-size); letter-spacing: var(--title-spacing); }
.screen .header-tools { gap: var(--header-gap); }
.screen .ms-btn { width: var(--month-control-height); height: var(--month-control-height); font-size: calc(var(--month-font-size) + 3px); }
.screen .ms-select { height: var(--month-control-height); padding: 0 calc(var(--control-padding) - 2px); font-size: var(--month-font-size); }
.screen .clock { font-size: var(--body-font-size); }
.screen .main { gap: var(--main-gap); padding: var(--main-padding-y) var(--main-padding-x); }
.screen .panel-title { flex-basis: var(--panel-title-height); padding: 0 var(--panel-title-padding); font-size: var(--panel-title-font-size); }
.screen .mode-toggle,
.screen .map-level-toggle,
.screen .metric-select { height: var(--control-height); font-size: var(--control-font-size); }
.screen .mode-toggle { padding: 0 var(--control-padding); }
.screen .map-level-btn { padding: 0 var(--control-padding); font-size: var(--control-font-size); }
.screen .panel-left { flex-basis: var(--left-panel-basis); }
.screen .panel-right { flex-basis: var(--right-panel-basis); }
.screen .panel-center { min-width: var(--center-panel-min-width); }
.screen .dimension-content,
.screen .trend-section { min-height: var(--section-min-height); }
.screen .trend-title { font-size: var(--panel-title-font-size); }
.screen .trend-scope-label,
.screen .chart-scope-label { font-size: var(--small-font-size); }
.screen .tab { font-size: var(--body-font-size); }
.screen .rank-item { padding: var(--rank-padding-y) var(--rank-padding-x); }
.screen .rank-no,
.screen .rank-name,
.screen .rank-value { font-size: var(--body-font-size); }
.screen .rank-posts { font-size: var(--small-font-size); }
.screen .summary { padding: var(--card-padding-y); gap: var(--card-padding-y); }
.screen .scard { padding: var(--card-padding-y) var(--card-padding-x); }
.screen .panel-right > .panel-title { font-size: calc(var(--panel-title-font-size) + 1px); font-weight: 600; letter-spacing: 0.5px; }
.screen .scard-label { font-size: calc(var(--body-font-size) + 1px); color: #91c7f0; font-weight: 600; margin-bottom: calc(var(--card-padding-y) - 3px); letter-spacing: 0.6px; }
.screen .scard-value { font-size: calc(var(--card-value-font-size) + 2px); line-height: 1.12; text-shadow: 0 0 10px rgba(126, 240, 255, 0.2); }
.screen .scard-unit { font-size: var(--body-font-size); color: #8ab6dc; margin-top: 4px; }
.screen .notes { font-size: calc(var(--body-font-size) + 1px); color: #a9d2f5; line-height: 1.85; }
.screen .map-footer,
.screen .three-legend { font-size: var(--small-font-size); }
.screen .notes { padding: var(--card-padding-y) var(--card-padding-x); }
.screen .map-footer { flex-basis: var(--map-footer-height); }
.screen .footer { flex-basis: var(--footer-height); font-size: var(--small-font-size); padding: 0 var(--header-padding); }

.screen[data-viewport-profile="wide"] {
  --left-panel-basis: 25%;
  --right-panel-basis: 24%;
  --center-panel-min-width: 560px;
}

/* 2560×1440：增加侧栏比例并提高文字密度，避免地图过宽且概况卡片向下溢出。 */
.screen[data-viewport-profile="qhd"] {
  --left-panel-basis: 26%;
  --right-panel-basis: 26%;
  --center-panel-min-width: 760px;
}

.screen[data-viewport-profile="qhd"] .summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.screen[data-viewport-profile="qhd"] .scard-wide {
  grid-column: span 2;
}

/* QHD 显示器中的非全屏浏览器：仍限制地图宽度，但降低字号与垂直留白，避免内容区被浏览器栏压缩后溢出。 */
.screen[data-viewport-profile="qhd-compact"] {
  --left-panel-basis: 24%;
  --right-panel-basis: 24%;
  --center-panel-min-width: 650px;
}

.screen[data-viewport-profile="qhd-compact"] .summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.screen[data-viewport-profile="qhd-compact"] .scard-wide {
  grid-column: span 2;
}

/* 3440×1440 / 3840×2160：控制侧栏上限，仍把额外空间优先给中央地图。 */
.screen[data-viewport-profile="ultrawide"] {
  --left-panel-basis: clamp(520px, 20.5%, 680px);
  --right-panel-basis: clamp(480px, 19.5%, 640px);
  --center-panel-min-width: 900px;
}

.screen[data-viewport-profile="standard"] {
  --left-panel-basis: clamp(260px, 25%, 400px);
  --right-panel-basis: clamp(250px, 24%, 380px);
  --center-panel-min-width: 420px;
}

.screen[data-viewport-profile="compact"] {
  --left-panel-basis: 230px;
  --right-panel-basis: 220px;
  --center-panel-min-width: 390px;
}

.screen[data-viewport-profile="compact"] .clock { display: none; }
.screen[data-viewport-profile="compact"] .panel-center > .panel-title {
  flex: 0 0 auto;
  min-height: var(--panel-title-height);
  padding-top: 4px;
  padding-bottom: 4px;
  flex-wrap: wrap;
  row-gap: 4px;
}
.screen[data-viewport-profile="compact"] #mapTitleText {
  flex: 1 1 150px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.screen[data-viewport-profile="compact"] .metric-select { margin-left: 0; }
