* {
  box-sizing: border-box;
}
:root {
  font-family: Inter, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  color: #334742;
  font-size: 12px;
  background: #fff;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #dce4df;
  background: white;
  color: #4c615b;
  border-radius: 5px;
  padding: 7px 10px;
  transition: background 0.15s;
}
button:hover {
  background: #eff5f0;
}
button.active,
button.primary {
  background: #286b52;
  border-color: #286b52;
  color: white;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
input,
select {
  width: 100%;
  padding: 8px;
  border: 1px solid #dce4df;
  border-radius: 5px;
  background: #fff;
  color: #344b43;
  min-width: 0;
}
input[type='color'] {
  height: 34px;
  padding: 3px;
}
input[type='checkbox'] {
  width: auto;
  accent-color: #286b52;
}
label {
  display: block;
  margin: 12px 0;
  color: #728179;
  font-size: 11px;
}
label input,
label select {
  margin-top: 6px;
}
label.inline {
  display: flex;
  align-items: center;
  gap: 7px;
}
label.inline input {
  margin: 0;
}
header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid #e3e9e4;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand > b {
  font-size: 33px;
  color: #2e7255;
}
.brand > span {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 2px;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 2px;
  color: #86978e;
  margin-top: 2px;
}
.brand em {
  font-size: 8px;
  font-style: normal;
  letter-spacing: 1px;
  background: #eef4ed;
  color: #678369;
  padding: 5px;
  border-radius: 3px;
  margin-left: 10px;
}
.project {
  display: flex;
  align-items: center;
  gap: 12px;
}
.project input {
  border: 0;
  width: 200px;
  font-weight: 600;
  text-align: center;
}
.project span {
  font-size: 10px;
  color: #8b9b92;
}
nav {
  display: flex;
  gap: 7px;
}
.workspace {
  display: grid;
  grid-template-columns: 225px minmax(400px, 1fr) 250px;
  height: calc(100vh - 70px);
}
/* Planet overview owns the canvas and geographic layer list.  Keeping the
   inspector element in the DOM is useful when returning to planar editing,
   but it must not reserve a blank white column in the planet workspace. */
.planet-workspace .workspace {
  grid-template-columns: 225px minmax(400px, 1fr);
}
.planet-workspace .inspector {
  display: none;
}
aside {
  overflow: auto;
  position: relative;
}
.layers {
  border-right: 1px solid #e1e7e2;
  padding-bottom: 45px;
}
.panel-title {
  font-weight: 650;
  font-size: 12px;
  padding: 19px 16px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-title span {
  font-weight: 400;
  font-size: 10px;
  color: #94a097;
}
.layer-actions {
  padding: 0 14px 18px;
}
.layer-actions button {
  width: 100%;
  border-style: dashed;
  color: #6a8476;
}
.layer-group {
  font-size: 10px;
  color: #8d9c91;
  letter-spacing: 1px;
  padding: 15px 17px 6px;
}
.layer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-left: 3px solid transparent;
  min-height: 32px;
}
.layer.current {
  background: #edf4ee;
  border-left-color: #34785a;
}
.layer-name {
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.swatch {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid #0002;
}
.layer button {
  padding: 2px 3px;
  border: 0;
  font-size: 11px;
  color: #9aa79d;
  background: transparent;
}
.layer button.on {
  color: #266d50;
}
.layer.off {
  opacity: 0.45;
}
.aside-footer {
  position: fixed;
  bottom: 0;
  width: 224px;
  padding: 13px;
  background: white;
  border-top: 1px solid #e8ece8;
  font-size: 9px;
  color: #91a093;
  display: flex;
  align-items: center;
  gap: 6px;
}
.aside-footer > span:last-child {
  margin-left: auto;
}
.dot {
  width: 5px;
  height: 5px;
  background: #65a77a;
  border-radius: 50%;
}
main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.canvas-bar {
  height: 55px;
  flex-shrink: 0;
  background: #fafcf9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 13px;
  border-bottom: 1px solid #dfe6df;
  gap: 8px;
}
.canvas-bar > div {
  display: flex;
  gap: 4px;
  align-items: center;
}
.canvas-bar button {
  border: 0;
  background: transparent;
  padding: 7px 9px;
}
.canvas-bar button.active {
  background: #e0ece3;
  color: #27664d;
}
.canvas-bar i {
  height: 20px;
  border-left: 1px solid #d7e0d7;
  margin: 0 5px;
}
#viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #e7ece6;
}
#map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
}
.map-caption {
  pointer-events: none;
  position: absolute;
  left: 25px;
  top: 23px;
  color: #6d8475;
}
.map-caption span {
  font-size: 8px;
  letter-spacing: 3px;
  display: block;
  margin-bottom: 7px;
}
.map-caption strong {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 1px;
}
.canvas-help {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #fffe;
  border: 1px solid #dfe6dc;
  border-radius: 6px;
  padding: 9px 14px;
  color: #768575;
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
}
.zoom {
  position: absolute;
  right: 18px;
  bottom: 20px;
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #dce3da;
  border-radius: 5px;
  overflow: hidden;
}
.zoom button {
  border: 0;
  border-radius: 0;
}
.zoom span {
  font-size: 10px;
  min-width: 40px;
  text-align: center;
}
.scale {
  position: absolute;
  bottom: 22px;
  left: 24px;
  font-size: 9px;
  color: #65776c;
}
#scaleLine {
  border: 1px solid #65776c;
  border-top: 0;
  height: 5px;
  margin-bottom: 5px;
}
footer {
  height: 30px;
  border-top: 1px solid #e0e6df;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  color: #8a998f;
  font-size: 10px;
  background: #fafcf9;
}
.inspector {
  border-left: 1px solid #e1e7e2;
}
#properties {
  padding: 0 17px;
}
.empty-state {
  padding: 28px 0;
  text-align: center;
  color: #91a294;
  line-height: 1.9;
}
.empty-state b {
  display: block;
  font-size: 29px;
  font-weight: 400;
  color: #acbdae;
  margin-bottom: 10px;
}
.field-row {
  display: flex;
  gap: 10px;
}
.field-row > * {
  flex: 1;
  min-width: 0;
}
.button-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.button-row button {
  font-size: 10px;
}
.guide {
  margin: 18px 16px;
  background: #f5f7f2;
  border: 1px solid #e5eade;
  border-radius: 6px;
  padding: 13px;
  color: #8b9987;
  font-size: 10px;
  line-height: 1.8;
}
.guide small {
  color: #6e8469;
  font-weight: 600;
}
.guide p {
  margin-bottom: 0;
}
.document-settings {
  border-top: 1px solid #e6ebe4;
  padding: 0 17px 20px;
}
.document-settings .panel-title {
  padding-left: 0;
}
.reference-section {
  border-top: 1px solid #e5ebe3;
  margin-top: 16px;
}
.ref {
  padding: 5px 14px;
  font-size: 10px;
}
.ref header {
  height: auto;
  padding: 0;
  border: 0;
  gap: 4px;
}
.ref input {
  margin: 4px 0;
}
.ref button {
  padding: 3px 5px;
}
.ref span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
dialog {
  width: 430px;
  border: 1px solid #d5e0d6;
  border-radius: 12px;
  padding: 24px;
  color: #455d50;
  box-shadow: 0 20px 100px #253f3933;
}
dialog::backdrop {
  background: #172f2944;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
h2 {
  font-size: 20px;
  margin: 0 0 14px;
}
dialog p {
  font-size: 11px;
  color: #8a978c;
  line-height: 1.8;
}
.form-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  border-bottom: 1px solid #d5e0d6;
  overflow-x: auto;
  scrollbar-width: thin;
}
.form-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6a7d70;
  padding: 7px 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.form-tabs button.active {
  border-bottom-color: #2f7d5b;
  color: #264e3f;
  font-weight: 600;
}
.form-tab-panel[hidden] {
  display: none;
}
dialog .primary {
  width: 100%;
  margin-top: 12px;
}
#toast {
  position: fixed;
  top: 82px;
  left: 50%;
  transform: translateX(-50%);
  background: #264e3f;
  color: white;
  padding: 11px 20px;
  border-radius: 6px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#toast.show {
  opacity: 1;
}
@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: 195px minmax(380px, 1fr) 220px;
  }
  .brand em {
    display: none;
  }
  .aside-footer {
    width: 194px;
  }
  .canvas-bar button span {
    display: none;
  }
  .project span {
    display: none;
  }
}

.active-layer-badge {
  position: absolute;
  left: 18px;
  bottom: 118px;
  padding: 6px 10px;
  background: #202c32e8;
  border: 1px solid #60747b;
  color: #edf3f3;
  font-size: 13px;
  pointer-events: none;
  z-index: 5;
}

html[data-locale='en'] dialog#projectSettings {
  width: min(760px, 92vw);
  max-width: 92vw;
}
html[data-locale='en'] .workspace {
  grid-template-columns: 225px minmax(400px, 1fr) 250px;
}
html[data-locale='en'] .planet-workspace .workspace {
  grid-template-columns: 225px minmax(400px, 1fr);
}
@media (max-width: 1200px) {
  html[data-locale='en'] .workspace {
    grid-template-columns: 195px minmax(380px, 1fr) 220px;
  }
  html[data-locale='en'] .planet-workspace .workspace {
    grid-template-columns: 195px minmax(380px, 1fr);
  }
}
html[data-locale='en'] dialog#projectSettings .form-tabs button {
  font-size: 10px;
  padding-inline: 8px;
}
html[data-locale='en'] dialog#projectSettings .form-tabs {
  scrollbar-width: none;
}
html[data-locale='en'] .layer-name,
html[data-locale='en'] .layer-group > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-locale='en'] .editor-dialog button,
html[data-locale='en'] .geometry-tool-form button {
  overflow-wrap: anywhere;
}
html[data-locale='en'] .canvas-bar {
  min-width: 0;
}
html[data-locale='en'] #hint.canvas-help {
  white-space: pre-wrap !important;
  overflow-wrap: normal;
  word-break: normal;
  min-width: 0;
  width: auto;
  max-width: min(620px, calc(100% - 160px));
  font-size: 11px !important;
  line-height: 1.55;
  -webkit-text-stroke: 2px white;
}
