/* src/ui/styles.css */
:root {
  font-family:
    Inter,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #f1f2ec;
  background: #15191c;
  font-synthesis: none;
  --accent:#d4f78a;
  --muted:#9ca8aa;
  --line:#323a3d;
  --panel:#202629;
  --weapon-bar-height:64px;
  --status-bar-height:30px;
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
}
button:focus,
input:focus,
summary:focus {
  outline: 2px solid #d4f78a;
  outline-offset: 3px;
}
button:disabled {
  opacity: .5;
  cursor: wait;
}
button,
summary {
  -webkit-tap-highlight-color: transparent;
}
button svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg + span {
  margin-left: 7px;
}
button:hover {
  filter: brightness(1.12);
}
[hidden] {
  display: none !important;
}
.app-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  background: #1b2023;
}
.brand {
  display: flex;
  align-items: center;
}
.brand-mark {
  width: 35px;
  height: 35px;
  background: var(--accent);
  color: #273023;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  margin-right: 12px;
}
.brand-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.brand h1 {
  font-size: 19px;
  letter-spacing: 2px;
  margin: 0 0 3px;
  font-weight: 650;
}
.brand small {
  font: 10px monospace;
  letter-spacing: 2px;
  color: #93a09f;
}
.top-actions {
  display: flex;
  align-items: center;
}
.top-actions > * + * {
  margin-left: 12px;
}
.text-button {
  background: transparent;
  color: #aab5b5;
  font-size: 13px;
  padding: 8px;
}
.workspace {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: 282px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 27px 22px 18px;
  overflow-y: auto;
  background: #1b2124;
}
.eyebrow {
  font: 11px monospace;
  letter-spacing: 1.6px;
  color: #a6b09c;
}
.sidebar h2 {
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: .5px;
  margin: 12px 0 8px;
  font-weight: 650;
}
.intro {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 24px;
}
.upload {
  width: 100%;
  border: 1px dashed #59674c;
  background: #252e26;
  border-radius: 9px;
  padding: 21px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.upload:hover,
.upload.dragover {
  background: #303d2b;
  border-color: var(--accent);
}
.upload svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  margin-bottom: 10px;
}
.upload strong {
  font-size: 14px;
  font-weight: 550;
}
.upload small {
  font-size: 11px;
  color: #8d9e88;
  margin-top: 6px;
}
.sample-row {
  display: flex;
  margin-top: 11px;
}
.sample-row button {
  flex: 1;
  font-size: 12px;
  background: #282f33;
  border: 1px solid #384145;
  border-radius: 5px;
  padding: 9px 4px;
  color: #acb9ba;
}
.sample-row button + button {
  margin-left: 8px;
}
.sample-row button.active {
  border-color: #83946f;
  color: var(--accent);
  background: #2b3328;
}
.section {
  border-top: 1px solid #333b3e;
  margin-top: 24px;
  padding-top: 20px;
}
.section-title {
  font-size: 13px;
  color: #d3dad5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title small {
  font: 11px monospace;
  color: #8f9c96;
}
.file-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 215px;
  color: #cbd4cf;
}
.image-meta {
  font: 11px monospace;
  color: #81908b;
  margin-top: 6px;
}
.image-tools {
  display: flex;
  margin-top: 12px;
}
.small-btn {
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid #3a4446;
  background: #262e31;
  border-radius: 5px;
}
.image-tools button + button {
  margin-left: 8px;
}
.range-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #98a6a4;
  margin-bottom: 9px;
}
input[type=range] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0 0 12px;
}
input[type=checkbox] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  margin: 0 8px 0 0;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 13px;
  color: #cad3ce;
}
.toggle-row label {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.count-badge {
  font: 11px monospace;
  color: var(--accent);
  padding: 3px 6px;
  background: #303a2b;
  border-radius: 4px;
}
.primary {
  background: var(--accent);
  color: #263021;
  width: 100%;
  padding: 13px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
  margin-top: 17px;
}
.editor {
  margin-top: 13px;
}
.tool-row {
  display: flex;
}
.tool-row button {
  flex: 1;
  padding: 8px 3px;
  background: #293034;
  border: 1px solid #414b4e;
  font-size: 12px;
}
.tool-row button:first-child {
  border-radius: 5px 0 0 5px;
}
.tool-row button:last-child {
  border-radius: 0 5px 5px 0;
}
.tool-row button.active {
  background: #46513b;
  border-color: #93ae71;
  color: #e0f5ba;
}
.help-copy {
  font-size: 12px;
  line-height: 1.8;
  color: #9ba9a5;
  margin: 11px 0;
}
.keyboard-list {
  margin-top: 20px;
  font-size: 12px;
  color: #8d9e98;
}
.key-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.keys {
  white-space: nowrap;
}
kbd {
  font: 11px monospace;
  display: inline-block;
  background: #2d3538;
  border: 1px solid #424d50;
  border-bottom: 2px solid #424d50;
  border-radius: 4px;
  padding: 3px 6px;
  color: #d9e0da;
  margin-right: 3px;
}
.main-area {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  height: 49px;
  padding: 0 22px;
  color: #a7b2ad;
  font-size: 12px;
  border-bottom: 1px solid #2b3437;
}
.stage-status {
  display: flex;
  align-items: center;
}
.stage-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 8px;
}
.stage-toolbar .small-btn {
  background: transparent;
  font-size: 11px;
  padding: 5px 10px;
  border-color: #384143;
}
.stage-host {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}
.stage-host canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}
.stage-host.editing {
  cursor: crosshair;
}
.bottom-bar {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-top: 1px solid #30393d;
  color: #99a7a3;
  background: #1b2225;
  font-size: 12px;
}
.traveller-indicator {
  display: flex;
  align-items: center;
}
.traveller-indicator span:first-child {
  color: #ffad74;
  margin-right: 9px;
}
.toast {
  pointer-events: none;
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 12px 19px;
  background: #e3efca;
  color: #293425;
  box-shadow: 0 7px 25px rgba(0, 0, 0, .267);
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.6;
  z-index: 5;
}
.mobile-controls {
  display: none;
  position: absolute;
  bottom: 65px;
  left: 18px;
  right: 18px;
  justify-content: space-between;
  pointer-events: none;
}
.mobile-controls > div {
  display: flex;
}
.mobile-controls button {
  pointer-events: auto;
  width: 45px;
  height: 45px;
  border-radius: 8px;
  border: 1px solid #727f61;
  background: rgba(38, 53, 43, .867);
  color: #dbf2b3;
  margin: 0 4px;
  touch-action: none;
  font-size: 20px;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 16, 19, .867);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  width: 760px;
  max-width: 100%;
  max-height: 95%;
  overflow: auto;
  border: 1px solid #455149;
  background: #20282b;
  border-radius: 12px;
  padding: 23px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.modal-head h2 {
  margin: 0;
  font-size: 19px;
}
.close-btn {
  background: transparent;
  color: #acb7af;
  font-size: 22px;
  padding: 2px 7px;
}
.modal p {
  font-size: 13px;
  color: #a1afa6;
  line-height: 1.8;
  margin: 8px 0 15px;
}
.crop-stage {
  height: 390px;
  max-height: 49vh;
  background: #12191b;
  position: relative;
  overflow: hidden;
  touch-action: none;
}
.crop-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 17px;
}
.modal-actions button {
  width: auto;
  min-width: 90px;
  margin-top: 0;
  margin-left: 10px;
}
.modal-actions .secondary {
  padding: 11px 17px;
  background: #303b3f;
  border-radius: 6px;
  font-size: 13px;
}
.hint-chip {
  color: #879b8c;
  font: 11px monospace;
  margin-right: auto;
  align-self: center;
}
.busy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(23, 28, 31, .9);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 15px;
}
.mobile-panel-toggle {
  display: none;
}
.badge-key {
  border: 1px solid #53614c;
  border-radius: 3px;
  padding: 1px 4px;
  color: #c0d3a3;
  margin-left: 6px;
  font: 10px monospace;
}
@media (min-width:1650px) {
  .sidebar {
    width: 310px;
    padding-left: 28px;
    padding-right: 28px;
  }
  .sidebar h2 {
    font-size: 27px;
  }
  .intro {
    font-size: 14px;
  }
  .file-name {
    max-width: 250px;
  }
}
.stage-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.stage-actions > button + button {
  margin-left: 6px;
}
.stage-status {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  margin-right: 10px;
}
.stage-status i {
  flex-shrink: 0;
}
#stage-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.view-hint {
  flex-shrink: 0;
  margin-left: 5px;
  color: #81938d;
}
.stage-toolbar .small-btn {
  min-height: 30px;
  white-space: nowrap;
}
.stage-toolbar .browse-tool {
  min-width: 44px;
}
.stage-toolbar .browse-tool.active {
  border-color: #8eaa64;
  background: #303d2b;
  color: var(--accent);
}
.pan-view-button[aria-pressed=true] {
  background: #d4f78a;
  color: #263021;
  border-color: #d4f78a;
}
.stage-host:not(.editing):not(.weapon-mode),
.stage-host.pan-mode {
  cursor: grab;
}
.stage-host.dragging-view {
  cursor: grabbing;
}
.weapon-bar {
  height: var(--weapon-bar-height);
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  padding: 5px 14px;
  background: #1b2225;
  border-top: 1px solid #354046;
}
.weapon {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #3b494f;
  border-radius: 6px;
  background: #252f34;
  padding: 2px 4px;
  color: #b2c1c5;
  text-align: center;
  touch-action: manipulation;
}
.weapon + .weapon {
  margin-left: 8px;
}
.weapon .weapon-label {
  display: block;
  font-size: 11px;
  line-height: 13px;
  font-weight: 500;
  white-space: nowrap;
  margin-top: 1px;
}
.weapon .weapon-icon {
  display: block;
  width: 56px;
  height: 28px;
  max-width: 100%;
  flex-shrink: 0;
  fill: none;
  stroke: none;
}
.weapon-icon image {
  image-rendering: pixelated;
}
.weapon:focus {
  outline-offset: -3px;
}
.weapon.active {
  border-color: #d4f78a;
  background: #344331;
  color: #e3fac1;
}
.damage-readout {
  font-size: 11px;
  color: #94a49e;
  white-space: nowrap;
}
.damage-readout b {
  color: #ffb17b;
  font-family: monospace;
  margin-left: 4px;
}
.stage-host.weapon-mode {
  cursor: crosshair;
}
@media (max-width:680px) {
  :root {
    --weapon-bar-height:56px;
    --status-bar-height:22px;
  }
  .weapon-bar {
    padding: 4px 6px;
  }
  .weapon + .weapon {
    margin-left: 4px;
  }
  .weapon .weapon-label {
    font-size: 10px;
    line-height: 12px;
  }
  .main-area .mobile-controls[hidden] {
    display: none;
  }
  .stage-host.weapon-mode:not(.editing) {
    cursor: crosshair;
  }
}
@media (max-width:950px) {
  .sidebar {
    width: 235px;
    padding: 20px 16px;
  }
  .sidebar h2 {
    font-size: 21px;
  }
  .intro {
    font-size: 12px;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .file-name {
    max-width: 195px;
  }
  .stage-toolbar {
    padding: 0 14px;
  }
  .bottom-bar {
    padding: 0 14px;
  }
}
@media (max-width:680px) {
  .topbar {
    height: 61px;
    padding: 0 15px;
  }
  .brand h1 {
    font-size: 16px;
  }
  .brand small {
    font-size: 8px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    margin-right: 9px;
  }
  .top-actions > * + * {
    margin-left: 5px;
  }
  .mobile-panel-toggle {
    display: inline-block;
  }
  .sidebar {
    position: absolute;
    top: 61px;
    bottom: 0;
    left: 0;
    z-index: 12;
    width: 272px;
    box-shadow: 16px 0 40px rgba(0, 0, 0, .533);
    transform: translateX(-110%);
    transition: transform .18s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .stage-toolbar {
    height: 43px;
    font-size: 11px;
  }
  .stage-toolbar .small-btn {
    font-size: 10px;
  }
  .bottom-bar {
    height: 45px;
    font-size: 11px;
    padding-bottom: 0;
    padding-bottom: var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px));
  }
  .mobile-controls {
    display: flex;
    bottom: 61px;
  }
  .bottom-hint {
    display: none;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .modal {
    padding: 16px;
  }
  .hint-chip {
    display: none;
  }
  .crop-stage {
    height: 370px;
  }
  .toast {
    bottom: 117px;
    min-width: 230px;
  }
  .section {
    margin-top: 18px;
    padding-top: 16px;
  }
}

/* src/ui/polish.css */
.pause-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(17, 25, 27, .79);
  color: #e3eaca;
}
.pause-overlay b {
  font-size: 28px;
  letter-spacing: 3px;
}
.pause-overlay span {
  font-size: 13px;
  color: #afbcac;
  margin: 14px 0 22px;
}
.pause-overlay button {
  background: #d4f78a;
  color: #263021;
  padding: 11px 25px;
  font-weight: 600;
}
.result-modal {
  width: 1000px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 94%;
}
.result-modal .modal-head,
.result-modal p,
.result-tabs,
.result-footer {
  flex-shrink: 0;
}
.result-modal h2 {
  margin-top: 7px;
}
.result-tabs {
  display: flex;
  margin: 2px 0 16px;
}
.result-tabs button + button {
  margin-left: 8px;
}
.result-tabs .active {
  color: #d4f78a;
  background: #34402b;
  border-color: #9fbb79;
}
.result-image-host {
  height: 65vh;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #131a1d;
  border: 1px solid #374140;
  border-radius: 5px;
  -webkit-overflow-scrolling: touch;
}
.result-image-host canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
}
.result-image-host.zoom {
  display: block;
}
.result-image-host.zoom canvas {
  max-height: none;
  width: 100%;
}
#result-zoom {
  margin-left: auto;
}
.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  color: #92a396;
  font-size: 12px;
}
.result-export {
  display: flex;
  flex-shrink: 0;
  margin-top: 12px;
}
.result-export button {
  flex: 1;
  min-height: 40px;
  margin-top: 0;
  width: auto;
}
.result-export button + button {
  margin-left: 10px;
}
.result-export .secondary {
  padding: 9px 16px;
  border: 1px solid #526152;
  border-radius: 6px;
  background: #283338;
  color: #dce7d3;
  font-weight: 600;
}
.result-modal #result-export-status {
  font-size: 12px;
  line-height: 18px;
  margin: 6px 0 0;
  min-height: 18px;
  color: #a9b7ae;
}
.result-modal button:disabled {
  opacity: .45;
  cursor: default;
}
.native-window {
  --safe-area-inset-top:var(--native-top);
  --safe-area-inset-bottom:var(--native-bottom);
}
.native-window .topbar {
  padding-top: var(--native-top);
  padding-left: var(--native-left);
  padding-right: var(--native-right);
  height: calc(72px + var(--native-top));
}
.native-window .modal-backdrop {
  padding-top: var(--native-contentTop);
  padding-bottom: calc(10px + var(--native-bottom));
}
.quality-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bottom-bar {
  height: var(--status-bar-height);
  font-size: 11px;
  line-height: 14px;
}
.traveller-indicator {
  min-width: 0;
  margin-right: 10px;
}
.traveller-indicator span:first-child {
  font-size: 8px;
  margin-right: 6px;
}
#player-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.damage-readout {
  flex-shrink: 0;
}
.quality-choice select {
  margin-left: 8px;
  padding: 4px;
  background: #28312e;
  color: #cbd6c3;
  border: 1px solid #526047;
  border-radius: 4px;
}
.top-actions button[aria-pressed=true] {
  color: #d4f78a;
}
@media (max-width:680px) {
  :root {
    --mobile-header-height:38px;
    --mobile-menu-space:96px;
    --direction-pad-size:136px;
  }
  .topbar {
    height: var(--mobile-header-height);
    height: calc(var(--mobile-header-height) + var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
    padding: 0 var(--mobile-menu-space) 0 8px;
    padding-top: var(--safe-area-inset-top,env(safe-area-inset-top,0px));
  }
  .top-actions {
    order: 0;
    flex-shrink: 0;
    margin-right: 8px;
  }
  .top-actions > * + * {
    margin-left: 1px;
  }
  .top-actions .text-button {
    height: 32px;
    padding: 6px 4px;
    font-size: 11px;
    line-height: 20px;
    white-space: nowrap;
  }
  .top-actions .text-button:focus {
    outline-offset: -2px;
    border-radius: 3px;
  }
  .brand {
    order: 1;
    flex-shrink: 0;
    margin-left: auto;
  }
  .brand-mark {
    width: 22px;
    height: 22px;
    margin-right: 5px;
    border-radius: 5px;
  }
  .brand-mark svg {
    width: 18px;
    height: 18px;
  }
  .brand h1 {
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .brand small {
    display: none;
  }
  .sidebar {
    top: var(--mobile-header-height);
    top: calc(var(--mobile-header-height) + var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
  }
  .bottom-bar {
    height: var(--status-bar-height);
    height: calc(var(--status-bar-height) + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));
    padding: 0 10px;
    padding-bottom: var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px));
    font-size: 10px;
    line-height: 12px;
  }
  .damage-readout {
    font-size: 10px;
  }
  .main-area .mobile-controls {
    left: 14px;
    right: auto;
    width: var(--direction-pad-size);
    bottom: calc(var(--weapon-bar-height) + var(--status-bar-height) + 16px);
    bottom: calc(var(--weapon-bar-height) + var(--status-bar-height) + 16px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));
  }
  .mobile-controls > .direction-pad {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    grid-template-rows: repeat(3, 44px);
    grid-template-areas: ". up ." "left center right" ". down .";
    grid-gap: 2px;
    pointer-events: auto;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }
  .direction-pad button {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    background: rgba(38, 53, 43, .85);
    border-color: #758265;
    color: #e2f2c5;
    font-size: 22px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(239, 255, 197, .1);
  }
  .direction-pad button:focus {
    outline-offset: -3px;
  }
  .direction-pad button:active {
    background: #b8d880;
    color: #223320;
    border-color: #d4f78a;
    box-shadow: inset 0 2px 5px rgba(24, 41, 27, .3);
  }
  .direction-pad .dpad-up {
    grid-area: up;
    border-radius: 9px 9px 4px 4px;
  }
  .direction-pad .dpad-left {
    grid-area: left;
    border-radius: 9px 4px 4px 9px;
  }
  .direction-pad .dpad-right {
    grid-area: right;
    border-radius: 4px 9px 9px 4px;
  }
  .direction-pad .dpad-down {
    grid-area: down;
    border-radius: 4px 4px 9px 9px;
  }
  .dpad-center {
    grid-area: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #617052;
    background: rgba(38, 53, 43, .7);
    border-radius: 4px;
  }
  .dpad-center i {
    width: 6px;
    height: 6px;
    border: 1px solid #b4cd8c;
    border-radius: 50%;
    opacity: .65;
  }
  .toast {
    bottom: calc(var(--weapon-bar-height) + var(--status-bar-height) + var(--direction-pad-size) + 26px);
    bottom: calc(var(--weapon-bar-height) + var(--status-bar-height) + var(--direction-pad-size) + 26px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));
  }
  .modal-backdrop {
    padding-top: 10px;
    padding-top: calc(10px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
    padding-bottom: 10px;
    padding-bottom: calc(10px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));
  }
  .result-modal {
    max-height: 100%;
    padding: 15px;
  }
  .result-modal h2 {
    font-size: 18px;
  }
  .result-modal p {
    font-size: 12px;
  }
  .result-footer {
    font-size: 10px;
  }
  .stage-toolbar {
    padding: 0 10px;
  }
  .stage-toolbar .small-btn {
    padding: 5px 7px;
  }
  .stage-status {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .stage-actions {
    flex-shrink: 0;
  }
}
@media (max-width:359px) {
  .top-actions {
    margin-right: 6px;
  }
  .top-actions .text-button {
    font-size: 10px;
    padding-left: 3px;
    padding-right: 3px;
  }
  .brand-mark {
    width: 20px;
    height: 20px;
    margin-right: 4px;
  }
  .brand h1 {
    font-size: 13px;
    line-height: 20px;
  }
}
@media (max-width:680px) {
  .native-window .topbar {
    height: calc(var(--native-headerHeight) + var(--native-top));
  }
  .native-window .sidebar {
    top: calc(var(--native-headerHeight) + var(--native-top));
  }
  .native-window .main-area .mobile-controls {
    left: calc(14px + var(--native-gestureLeft));
  }
  .result-export button {
    min-height: 38px;
    padding: 8px 12px;
  }
  .result-modal #result-export-status {
    font-size: 11px;
    line-height: 16px;
    min-height: 16px;
  }
}
