

.area-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.area-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.area-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  margin: 0;
  color: var(--muted);
}

.area-card dd {
  margin: 0;
  color: var(--text);
}

.area-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 320px);
  align-items: stretch;
  gap: 16px;
}

.map-panel,
.assignment-card,
.selected-city-card,
.city-leader-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.map-panel {
  padding: 16px;
}

.area-side-stack {
  position: sticky;
  top: 26px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 190px);
}

.assignment-card {
  padding: 16px;
}

.section-title .eyebrow {
  margin-top: 0;
}

.compact-label {
  margin-top: 14px;
}

.compact-label select {
  width: 100%;
}

.selected-city-card span,
.city-leader-card span,
.area-change-note {
  color: var(--muted);
}

.selected-city-card {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 16px;
}

.selected-city-card strong,
.city-leader-card strong {
  font-size: 24px;
}

.selected-city-card p,
.area-change-note {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.6;
}

.city-leader-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  padding: 16px;
}

.city-leader-card dl {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 4px 0 0;
  font-size: 13px;
}

.city-leader-card dt {
  color: var(--muted);
}

.city-leader-card dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.detail-pill-button {
  align-self: end;
  justify-self: center;
  width: min(220px, calc(100% - 28px));
  min-height: 44px;
  margin-top: 12px;
  margin-bottom: 4px;
  border-radius: 999px;
  border-color: rgba(49, 211, 165, 0.34);
  background: rgba(49, 211, 165, 0.16);
  color: #dcfff6;
  font-weight: 700;
}

.inspector-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.map-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - 190px);
}

.guangdong-map-wrap {
  display: grid;
  min-height: 620px;
  margin-top: 12px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #060a10;
  padding: clamp(14px, 2vw, 28px);
}

.guangdong-map {
  width: 100%;
  height: min(70vh, 720px);
  min-height: 540px;
}

.section-toolbar.slim {
  padding: 0 0 14px;
  border: 0;
  background: transparent;
}

.content-editor-panel {
  min-width: 0;
}

.content-editor-toolbar,
.content-editor-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.content-editor-toolbar {
  padding: 10px;
  border-radius: 8px 8px 0 0;
}

.content-section-nav,
.content-editor-actions,
.viewport-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.content-section-nav {
  overflow-x: auto;
}

.content-section-nav button,
.viewport-switcher button,
.content-editor-actions > button,
.editor-preview-link {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  line-height: 34px;
  text-decoration: none;
}

.content-section-nav button:hover,
.content-section-nav button.is-active,
.viewport-switcher button:hover,
.viewport-switcher button.is-active,
.editor-preview-link:hover {
  border-color: rgba(49, 211, 165, 0.28);
  background: rgba(49, 211, 165, 0.1);
  color: var(--text);
}

.content-editor-actions > .primary-button {
  padding-inline: 16px;
  background: var(--accent);
  color: #04130f;
}

.viewport-switcher {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
}

.viewport-switcher button {
  min-height: 30px;
  padding: 0 9px;
  line-height: 28px;
}

.content-editor-status {
  justify-content: flex-start;
  padding: 9px 14px;
  border-top: 0;
  color: #d8e4e1;
  font-size: 13px;
}

.content-editor-status small {
  margin-left: auto;
  color: var(--muted);
}

.content-editor-status.is-error {
  color: #ff9a9a;
}

.editor-live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #31d3a5;
  box-shadow: 0 0 0 5px rgba(49, 211, 165, 0.1);
}

.content-editor-status.is-error .editor-live-dot {
  background: #ff6868;
  box-shadow: 0 0 0 5px rgba(255, 104, 104, 0.1);
}

.content-editor-stage {
  width: 100%;
  min-height: calc(100vh - 235px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #090d13;
  overflow: hidden;
  transition: width 240ms ease;
}

.content-editor-stage[data-viewport="tablet"] {
  width: min(820px, 100%);
}

.content-editor-stage[data-viewport="mobile"] {
  width: min(390px, 100%);
}

.content-editor-stage iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 235px);
  min-height: 720px;
  border: 0;
  background: #f5f5f5;
}

.image-loader-modal {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.image-loader-modal .eyebrow {
  margin-top: 0;
}

.image-loader-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(220px, 0.8fr);
  gap: 18px;
  margin-top: 20px;
}

.image-loader-preview {
  display: grid;
  min-height: 360px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(49, 211, 165, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    #090d12;
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
}

.image-loader-preview img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.image-loader-empty {
  display: grid;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.image-loader-empty span,
.image-loader-controls small {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.7;
}

.image-loader-controls {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  background: var(--panel-2);
}

.image-loader-controls p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.image-loader-controls button {
  min-height: 42px;
  border: 1px solid rgba(49, 211, 165, 0.28);
  border-radius: 8px;
  padding: 0 16px;
  background: rgba(49, 211, 165, 0.1);
  color: var(--text);
}

.image-loader-file-picker {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(49, 211, 165, 0.28);
  border-radius: 8px;
  padding: 0 16px;
  background: rgba(49, 211, 165, 0.1);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.image-loader-file-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.image-loader-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(49, 211, 165, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.image-loader-modal .modal-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--panel-3);
  color: var(--text);
}

.image-loader-modal .modal-actions .primary-button {
  border-color: transparent;
  background: var(--accent);
  color: #04130f;
}

.image-loader-modal .modal-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

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