:root {
  --bg2: #201a40;
  --card: #31254b;
  --card2: #453655;
  --text: #fff8ed;
  --teal: #80e3bc;
  --yellow: #ffd45c;
  --display: system-ui, sans-serif;
}
.shape {
  position: relative;
  overflow: hidden;
}
.shape svg {
  touch-action: none;
}
.outline-tools {
  position: absolute;
  bottom: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
}
.outline-tools button {
  width: 44px;
  height: 44px;
  border: 1px solid #80e3bc88;
  border-radius: 10px;
  background: #17122de8;
  color: #fff;
  font-size: 20px;
}
.map-grid {
  fill: none;
  stroke: #ffffff18;
  stroke-width: 0.6;
  pointer-events: none;
}
.map-borders {
  fill: none;
  stroke: #acdfcc88;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.map-regions {
  fill: #ffe7aa99;
  font: 700 10px system-ui;
  text-anchor: middle;
  pointer-events: none;
}
.dg.stage {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 0;
  text-align: center;
}
.dg-head,
.dg-sub,
#game > .result {
  display: none !important;
}
.dg.stage .shape {
  width: min(170px, 29vh);
  margin: 0;
  max-height: 170px;
  flex-shrink: 0;
}
.dg.stage .og {
  width: min(100%, 500px);
  margin: 0;
  flex-shrink: 0;
}
.dg.stage .og input {
  min-width: 0;
  padding: 0 12px;
}
.dg.stage .og button {
  min-width: 64px;
  padding: 0 12px;
}
.dg.stage .gl {
  width: min(100%, 500px);
  gap: 4px;
  margin: 0;
}
.dg.stage .gr {
  grid-template-columns: minmax(0, 1fr) 74px 34px 44px;
  gap: 4px;
}
.dg.stage .gr > * {
  font-size: 12px;
  min-height: 32px;
  padding: 6px 3px;
}
.dg.stage .sug div {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 14px;
}
.dg.stage .sug {
  top: 50px;
}
.dg.stage .map {
  width: min(100%, 760px);
  flex-shrink: 0;
}
.dg.stage .map svg {
  width: 100%;
  height: auto;
}
.dg.stage .zoom button {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
}
.dg.stage .pd-top {
  width: min(100%, 760px);
  padding: 8px 12px;
  margin: 0;
  flex-shrink: 0;
}
.dg.stage .pd-top b.city {
  font-size: clamp(14px, 3vw, 21px);
}
.dg.stage .pd-score {
  font-size: 18px;
}
.dg.stage .dots {
  margin: 0;
}
.dg.stage .pd-next {
  min-height: 44px;
  background: #ffd45c;
  color: #211936;
}
.dg.stage .pd-top small {
  font-size: 12px;
}
.dg.stage .gr.ge {
  opacity: 0.45;
}
@media (max-height: 620px) {
  .dg.stage .shape {
    width: 110px;
    height: 110px;
  }
  .dg.stage .gr > * {
    min-height: 28px;
    padding: 4px;
    font-size: 12px;
  }
  .dg.stage .gl {
    gap: 3px;
  }
  .dg.stage .pd-top {
    padding: 6px 10px;
  }
  .dg.stage .map {
    width: min(100%, calc((100dvh - 238px) * 2));
  }
  .dg.stage .og {
    gap: 4px;
  }
  .dg.stage .og input,
  .dg.stage .og button {
    height: 44px;
  }
  .dg.stage {
    gap: 5px;
  }
}
@media (max-height: 440px) and (min-width: 500px) {
  .dg.stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: center;
    justify-items: center;
  }
  .dg.stage .shape {
    grid-column: 1;
    grid-row: 1/4;
    width: 160px;
    height: 160px;
  }
  .dg.stage .og {
    grid-column: 2;
    grid-row: 1;
  }
  .dg.stage .gl {
    grid-column: 2;
    grid-row: 2/4;
  }
  .dg.stage .map {
    grid-column: 1;
    grid-row: 1/4;
    width: min(100%, calc((100dvh - 182px) * 2));
  }
  .dg.stage .pd-top {
    grid-column: 2;
    grid-row: 1;
  }
  .dg.stage .dots {
    grid-column: 2;
    grid-row: 2;
  }
  .dg.stage .pd-top b.city {
    font-size: 16px;
  }
}
.map-cursor {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 32px;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 3px #000;
}
.map:focus .map-cursor {
  display: block;
}
.map:focus-visible {
  outline: 3px solid #ffd45c;
  outline-offset: 2px;
}
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #ffd45c;
  outline-offset: 2px;
}
#dialog label {
  display: block;
  margin: 6px 0;
}
#dialog select,
#dialog textarea {
  font: inherit;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
}
#dialog #feedback-note,
#dialog #feedback-copy {
  height: 64px;
  resize: none;
}
@media (max-height: 440px) {
  #dialog:has(#feedback-save) h2,
  #dialog:has(#feedback-copy) h2 {
    font-size: 18px;
    margin: 0;
  }
  #dialog:has(#feedback-save) label {
    margin: 3px 0;
  }
}
#dialog p#feedback-copy {
  height: auto;
  overflow-wrap: anywhere;
}
#dialog #feedback-note {
  height: 96px;
}
@media (max-height: 440px) {
  #dialog:has(#feedback-save) {
    padding: 12px;
  }
  #dialog:has(#feedback-save) label {
    font-size: 14px;
  }
  #dialog:has(#feedback-save) #feedback-note {
    height: 80px;
  }
}

#f #outline-region {
  min-width: 44px;
  width: 44px;
  padding: 0;
  flex-shrink: 0;
}
