/*! CubifyIt Roads. Copyright (c) 2026 Cubify It Studio. All rights reserved.
No permission is granted to copy, modify or redistribute this code. See LICENSE. */
:root {
  --panel-w: 320px; /* the settings panel, right of the model */
  --panel-pad: 20px;
  /* Next (settings) and Download (full screen) sit this far above the window's bottom: one height. Plus the screen's
     safe area: an iPhone's home indicator and rounded corners, also in in-app browsers such as WeChat's (0 elsewhere) */
  --actions-bottom: calc(20px + env(safe-area-inset-bottom));
  --bg: #f7f7f5;
  --surface: #ffffff;
  --field: #f2f2ef; /* fields, steppers and segmented controls */
  --field-hover: #e9e9e5;
  --ink: #141414;
  --muted: #6e6e69; /* secondary text, dark enough to read on white and on --field (WCAG AA) */
  --line: #e7e7e3;
  --danger: #c0392b;
  --radius: 14px;
  /* Every control in the settings is this tall with these corners: fields, steppers, segmented buttons, color chips */
  --ctl-h: 40px;
  --ctl-r: 10px;
  --zoom-btn: 32px; /* the zoom buttons on the map and on the model */
  /* The page's font: the device's own UI font (SF Pro on Apple, Segoe UI on Windows, Roboto on Android). The stand's
     engraving keeps its own (js/stand.js) */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* even where a class sets display */

html, body {
  margin: 0;
  height: 100%;
}
/* No double-tap zoom of the page on touch screens (pinch zoom still works); the map and the 3D view handle their own
   gestures */
html { touch-action: manipulation; }
/* An app, not a document: dragging or double-clicking on the map, the model or the controls never selects (blue) text,
   and phones neither flash a tap highlight nor offer a press-and-hold menu. Typing fields keep their selection */
html { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* The visible height: on phones 100% can include the part under the browser's toolbars */
body { height: 100dvh; }
/* Clear of a notch at the sides (landscape); the top bar keeps clear of one at the top, the panels of the bottom */
body {
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }
input[type=range] { accent-color: var(--ink); }

button {
  border: 0;
  background: var(--field);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
button:hover { background: var(--field-hover); }
/* One keyboard focus ring for every control */
:is(button, input, select, a):focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Main actions read as short capitalised words */
button.primary { background: var(--ink); color: #fff; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
button.primary:hover { background: #2e2e2e; }
button.primary:active { transform: translateY(1px); }
button.primary:disabled { opacity: .6; cursor: progress; }
button.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--ink); }
button.secondary:hover { background: var(--field); }
