/* The Godot canvas and the form inside it. */
.gd-stage { position: relative; width: 100%; height: min(78svh, 680px); min-height: 520px; border-radius: 12px; overflow: hidden; background: #12141a; border: 1px solid var(--line, #333); }
.gd-stage canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; overflow-anchor: none; }
.gd-msg { position: absolute; inset: 0; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; text-align: center; color: #c9cfdb; font-size: 14px; }
.gd-msg[hidden] { display: none; }
.gd-msg.corner { inset: auto 0 0 0; padding: 8px 12px; align-items: flex-start; text-align: left; pointer-events: none; font-size: 12px; text-shadow: 0 1px 2px #000; }
.gd-msg button { font: inherit; font-size: 16px; padding: 12px 18px; border-radius: 10px; border: 1px solid #5a6a8a; background: #2f6fed; color: #fff; cursor: pointer; }
.gd-msg progress { width: min(260px, 80%); }
.gd-routes { margin: 10px 0; gap: 8px 14px; font-size: 14px; }
.gd-routes .seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gd-routes .seg > button { border: 0; border-radius: 0; background: var(--card); color: var(--fg); padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.gd-routes .seg > button + button { border-left: 1px solid var(--line); }
.gd-routes .seg > [aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.gd-routes .seg > :disabled { opacity: .5; cursor: default; }

/* #region form-css */
/* The form sits at the canvas origin. Its layout position is not used: Godot decides where
   it is drawn and updateElementGeometry() moves its hit box there. It is opaque and has
   square corners because the quad's shader does not blend. */
.gd-form {
  position: absolute; left: 0; top: 0; box-sizing: border-box; width: 300px; margin: 0; padding: 14px;
  display: grid; gap: 8px; background: #f3f1ea; color: #1d1c1a; color-scheme: light;
  font: 15px/1.35 system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.gd-form * { box-sizing: border-box; }
.gd-form .band { margin: -14px -14px 2px; padding: 9px 14px; background: #1f4fbf; color: #fff; font-weight: 600; }
.gd-form.check .band { background: #d0109a; }
.gd-form label { display: grid; gap: 3px; font-size: 13px; color: #55524c; }
.gd-form input, .gd-form textarea, .gd-form button { font: inherit; font-size: 16px; }
.gd-form input, .gd-form textarea { width: 100%; padding: 8px 9px; border: 1px solid #a9a393; border-radius: 6px; background: #fff; color: #1d1c1a; }
.gd-form textarea { resize: none; }
.gd-form button { min-height: 42px; padding: 8px 12px; border: 0; border-radius: 6px; background: #1f4fbf; color: #fff; font-weight: 600; cursor: pointer; }
.gd-form button[data-send] { background: #2c7a4b; }
.gd-form :focus-visible { outline: 3px solid #e2622b; outline-offset: 1px; }
.gd-form [data-log] { min-height: 58px; padding: 6px 8px; border-radius: 6px; background: #e4e0d4; font-size: 13px; line-height: 1.3; overflow: hidden; }
.gd-form .chat { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: end; }
/* #endregion form-css */
