:root {
  color-scheme: dark;
  --ink: #13221d;
  --paper: #f6f0e4;
  --paper-soft: rgba(250, 246, 237, 0.9);
  --green: #2f7a55;
  --green-bright: #76c36c;
  --green-dark: #173c31;
  --sand: #d7b16f;
  --rust: #a75f35;
  --line: rgba(255, 255, 255, 0.15);
  --shadow: 0 24px 70px rgba(2, 14, 11, 0.28);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #071410;
  color: var(--paper);
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 3px solid #f2c65f;
  outline-offset: 3px;
}

#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#world.dragging {
  cursor: grabbing;
}

.glass {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(16, 39, 33, 0.88), rgba(9, 25, 21, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.loading-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(52, 112, 84, 0.45), transparent 28%),
    #071410;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.loading-screen.done {
  visibility: hidden;
  opacity: 0;
}

.loading-screen h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.loading-screen p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.64);
}

.loading-mark {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
}

.loading-mark span {
  position: absolute;
  bottom: 6px;
  width: 24px;
  height: 44px;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #98dc72, #2e8658);
  transform-origin: bottom center;
  animation: breathe 1.5s ease-in-out infinite alternate;
}

.loading-mark span:nth-child(1) { left: 5px; transform: rotate(-35deg) scale(0.8); }
.loading-mark span:nth-child(2) { left: 21px; animation-delay: 120ms; }
.loading-mark span:nth-child(3) { right: 2px; transform: rotate(35deg) scale(0.72); animation-delay: 240ms; }

.loading-track {
  width: min(360px, 70vw);
  height: 3px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.loading-track span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: #92d774;
  transition: width 350ms ease;
}

.topbar {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 9px 12px;
  border-radius: 20px;
}

.brand-button,
.icon-button,
.text-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.brand-button {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 2px 2px;
  text-align: left;
}

.brand-button strong,
.brand-button small {
  display: block;
}

.brand-button strong {
  letter-spacing: -0.02em;
}

.brand-button small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #90d16b, #2d7654);
  color: white;
  font-weight: 900;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35), 0 8px 20px rgba(34, 110, 72, 0.35);
}

.location-chip {
  min-width: 220px;
  text-align: center;
}

.location-chip span,
.eyebrow {
  display: block;
  margin: 0 0 4px;
  color: #9cd889;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.location-chip strong {
  font-size: 14px;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.performance-chip,
.icon-button,
.text-button {
  min-height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.performance-chip {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.performance-chip span {
  margin-right: 5px;
  color: #a8e28b;
  font-size: 13px;
  font-weight: 800;
}

.icon-button {
  width: 40px;
  border: 0;
  color: rgba(255, 255, 255, 0.84);
  cursor: pointer;
}

.text-button {
  border: 0;
  padding: 0 15px;
  cursor: pointer;
}

.intro-card {
  width: min(440px, 100%);
  margin-top: auto;
  padding: 30px;
  border-radius: 26px;
  transition: transform 500ms ease, opacity 500ms ease;
}

.intro-card.hidden {
  pointer-events: none;
  transform: translateY(28px);
  opacity: 0;
}

.intro-card h1 {
  margin: 5px 0 12px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.intro-card > p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
}

.intro-card > small {
  display: block;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.intro-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 22px 0;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-facts span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  text-align: center;
  text-transform: uppercase;
}

.intro-facts strong {
  display: block;
  margin-bottom: 3px;
  color: white;
  font-size: 17px;
}

.primary-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 17px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(120deg, #78bb63, #3f8b5c);
  color: white;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(39, 114, 72, 0.35);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.secondary-button {
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.site-only {
  display: none !important;
}

body.site-mode .site-only {
  display: revert !important;
}

body.site-mode .action-dock {
  display: grid !important;
}

body.site-mode .mission-card {
  display: flex !important;
}

/* Shared rows replace per-panel offsets. Dynamic text changes the layout,
   never the stacking order. Empty space still accepts landscape gestures. */
.hud-layout {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  pointer-events: none;
}

.hud-layout button,
.hud-layout summary,
.hud-layout .glass,
.debug-panel {
  pointer-events: auto;
}

.hud-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  min-height: 0;
  min-width: 0;
}

.feedback-row {
  min-width: 0;
  min-height: 44px;
}

.context-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.context-column > * {
  flex-shrink: 0;
}

.inspector-column {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  align-self: start;
  max-height: 100%;
}

.inspector-summary {
  display: none;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
}

.inspector-summary small {
  color: #b8d8a8;
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.inspector-content {
  display: grid;
  gap: 12px;
}

.action-dock {
  grid-auto-rows: max-content;
  align-content: start;
  width: min(1180px, 100%);
  min-width: 0;
  justify-self: center;
  gap: 10px;
  max-height: 45vh;
  overflow: auto;
  scrollbar-width: thin;
}

.tool-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.status-panel {
  min-width: 0;
  padding: 20px;
  border-radius: 22px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.land-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin: 17px 0 12px;
}

.land-stat {
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
}

.land-stat strong,
.land-stat span {
  display: block;
}

.land-stat strong {
  font-size: 16px;
}

.land-stat span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  text-transform: uppercase;
}

.land-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
}

.land-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.land-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.arable-swatch { background: #bda373; }
.non-arable-swatch { background: #77745f; }
.kiawe-swatch { background: #415b36; }

.score-ring {
  width: 58px;
  height: 58px;
  display: grid;
  grid-template-columns: 1fr auto;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(#7dcc65 calc(var(--score, 8) * 1%), rgba(255, 255, 255, 0.08) 0);
  box-shadow: inset 0 0 0 7px rgba(10, 28, 23, 0.92);
}

.score-ring strong {
  font-size: 17px;
}

.score-ring span {
  margin-top: 2px;
  font-size: 9px;
}

.metrics {
  margin: 18px 0;
}

.metric {
  margin: 10px 0;
}

.metric-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.metric-track {
  height: 5px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
}

.metric-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4d8f59, #a1d56b);
  transition: width 550ms cubic-bezier(.2,.8,.2,1);
}

.cell-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  overflow-wrap: anywhere;
}

.cell-card strong {
  font-size: 13px;
}

.cell-card span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  line-height: 1.35;
}

.cell-card code {
  margin-top: 5px;
  color: #8ccf78;
  font-size: 9px;
}

.mission-card {
  width: min(390px, 100%);
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 15px;
  border-radius: 18px;
}

.mission-number {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(155, 218, 125, 0.4);
  border-radius: 13px;
  background: rgba(95, 161, 84, 0.15);
  color: #a8e184;
  font-weight: 900;
}

.mission-card strong,
.mission-card span {
  display: block;
}

.site-compass {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: #edf3e5;
  cursor: pointer;
}

.site-compass span {
  display: block;
  color: #f1d36f;
  font-size: 22px;
  line-height: 18px;
  transform-origin: 50% 58%;
}

.site-compass small {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.mission-card strong {
  font-size: 14px;
}

.mission-card span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

.toolbar {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
}

.tool-group,
.species-group {
  display: flex;
  gap: 6px;
}

.tool-group {
  flex-shrink: 0;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.species-group {
  flex: 1;
  flex-shrink: 0;
  justify-content: center;
}

.palette-label {
  display: none;
}

.tool,
.species,
.danger-button,
.time-button {
  height: 54px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: background 160ms ease, border 160ms ease, transform 160ms ease;
}

.fence-editor {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 15px;
}

.fence-editor > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.fence-editor > div {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fence-mode {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  cursor: pointer;
}

.fence-mode.active {
  border-color: rgba(151, 220, 113, 0.55);
  background: rgba(111, 179, 91, 0.18);
  color: white;
}

.tool {
  min-width: 63px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  padding: 6px 8px;
  font-size: 9px;
}

.tool-icon {
  grid-column: 1 / 3;
  color: #9bd47d;
  font-size: 17px;
}

.tool kbd {
  color: rgba(255, 255, 255, 0.3);
  font-size: 8px;
}

.tool.active,
.species.active {
  border-color: rgba(151, 220, 113, 0.55);
  background: rgba(111, 179, 91, 0.18);
  transform: translateY(-2px);
}

/* Reserve the longer label's width so Shift never moves nearby controls. */
.tool[data-tool="raze"] { min-width: 90px; }
#raze-label { white-space: nowrap; }
.tool.force-raze {
  border-color: #ef8d87;
  background: rgba(224, 109, 109, 0.26);
  color: #ffe5e1;
}
.tool.force-raze .tool-icon { color: #ffb2a9; }
.tool.force-raze kbd { color: #efb6b0; }

.species {
  min-width: 92px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px 9px;
  flex-direction: column;
  height: 118px;
  justify-content: flex-end;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.species img {
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border: 0;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.2));
}

.debug-controls { display: grid; gap: 10px; margin-top: 12px; font-size: 12px; }
.debug-controls button { padding: 9px; border: 1px solid #6e9d71; border-radius: 8px; color: #ecf5e4; background: #315839; cursor: pointer; }
.debug-controls label { display: flex; align-items: center; gap: 8px; }
.debug-controls input[type="range"] { min-width: 0; width: 100%; }
.debug-controls input[type="checkbox"] { flex-shrink: 0; }

.danger-button,
.time-button {
  padding: 0 14px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.danger-button {
  border-color: rgba(232, 174, 103, 0.45);
  background: rgba(156, 91, 42, 0.24);
}

.time-button {
  border-color: rgba(139, 206, 109, 0.4);
  background: rgba(60, 132, 79, 0.24);
}

.hidden {
  display: none !important;
}

.toast {
  width: min(390px, 100%);
  min-height: 44px;
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: rgba(8, 25, 20, 0.9);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  font-size: 12px;
  visibility: hidden;
  overflow-wrap: anywhere;
  line-height: 1.45;
  pointer-events: none;
}

.toast.show {
  visibility: visible;
}

.transition-overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(233, 239, 222, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 450ms ease, background 450ms ease;
}

.transition-overlay.active {
  background: rgba(232, 238, 218, 0.88);
  opacity: 1;
}

.transition-overlay div {
  display: grid;
  justify-items: center;
  color: #28483d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.transition-overlay span {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(40, 72, 61, 0.15);
  border-top-color: #467c5e;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.help-dialog {
  width: min(520px, calc(100vw - 40px));
  padding: 28px;
  border-radius: 24px;
  color: white;
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.help-dialog::backdrop {
  background: rgba(2, 10, 8, 0.68);
  backdrop-filter: blur(5px);
}

.help-dialog h2 {
  margin: 6px 0 22px;
  font-size: 27px;
}

.help-dialog dl {
  margin: 0;
}

.help-dialog dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.help-dialog dt {
  color: #a4da88;
  font-weight: 800;
}

.help-dialog dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

.dialog-close,
.debug-heading button {
  float: right;
  border: 0;
  background: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.debug-panel {
  display: none;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(143, 218, 113, 0.35);
  border-radius: 16px;
  background: rgba(4, 16, 12, 0.94);
  box-shadow: var(--shadow);
}

.debug-panel.open {
  display: block;
}

.debug-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.debug-panel pre {
  max-height: 46vh;
  overflow: auto;
  margin: 12px 0 0;
  color: #a6d68e;
  font: 10px/1.5 ui-monospace, "SFMono-Regular", Menlo, monospace;
  white-space: pre-wrap;
}

.attribution {
  grid-row: 5;
  text-align: right;
  color: rgba(255, 255, 255, 0.4);
  font-size: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  to { filter: brightness(1.2); transform: translateY(-4px) rotate(-6deg); }
}

@media (max-width: 850px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .location-chip,
  .performance-chip {
    display: none;
  }

  .hud-layout { padding: 10px 12px 7px; gap: 10px; }
  .hud-workspace { grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; }
  .status-panel { padding: 14px; }
}

@media (max-width: 620px) {
  .hud-layout { padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); gap: 8px; }
  .hud-workspace { display: flex; flex-direction: column; overflow: auto; gap: 8px; scrollbar-width: thin; }
  .context-column { flex: 0 0 auto; overflow: visible; }
  .inspector-column { flex-shrink: 0; overflow: visible; align-self: stretch; }
  .inspector-column[open] { max-height: none; }
  .inspector-summary { display: block; background: #19372e; }
  .inspector-summary::before { content: '▸ '; float: right; }
  .inspector-column[open] > summary::before { content: '▾ '; }
  .inspector-content { margin-top: 8px; }
  body:not(.site-mode) .inspector-column:not(:has(.debug-panel.open)) { display: none; }
  .brand-button small { display: none; }
  .brand-button { gap: 6px; }
  .brand-button strong { font-size: 13px; }
  .brand-mark { width: 32px; height: 36px; }
  .top-actions { gap: 4px; }
  .topbar { padding: 6px; min-height: 52px; border-radius: 15px; }
  .icon-button { width: 34px; }
  .text-button { padding: 0 8px; }
  .mission-card { width: 100%; padding: 10px; gap: 9px; }
  .toast { width: 100%; padding: 10px 12px; }
  .tool-row { gap: 6px; }
  .site-compass { flex-basis: 40px; width: 40px; height: 44px; }
  .fence-editor { gap: 6px; padding: 8px; }
  .fence-editor > strong { font-size: 12px; }
  .fence-mode { padding: 6px; }
  .intro-card { padding: 22px; }
  .intro-card h1 { font-size: 34px; }
  .attribution { text-align: left; font-size: 7px; }
  .help-dialog { padding: 18px; }
  .help-dialog dl div { grid-template-columns: 90px minmax(0, 1fr); font-size: 13px; gap: 8px; }
}

@media (max-height: 600px) {
  .hud-layout { gap: 7px; padding-top: max(7px, env(safe-area-inset-top)); }
  .topbar { min-height: 52px; padding-top: 5px; padding-bottom: 5px; }
  .species { height: 82px; gap: 2px; }
  .species img { height: 48px; width: 60px; }
  .toolbar { padding: 6px; }
  .action-dock { gap: 6px; }
  .status-panel { padding: 12px; }
  .intro-card { padding: 20px; }
  .intro-card h1 { font-size: 30px; }
}

@media (min-width: 1050px) {
  .fence-editor { grid-template-columns: auto minmax(0, 1fr) auto; }
  .fence-editor > div { grid-column: auto; }
}

@media (max-width: 380px) {
  .brand-button > span:last-child { display: none; }
  .fence-editor { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
:root { --danger-ink: #9e3027; }
.modifier-hint { flex-shrink: 0; margin: 0; min-height: 18px; padding: 4px 10px; align-self: center; max-width: 100%; border-radius: 8px; background: rgba(239,247,228,.94); text-align: center; font-size: 12px; color: #284330; pointer-events: none; }
.modifier-hint:empty { display: none; }
.modifier-hint.danger { color: var(--danger-ink); font-weight: 700; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.dialog-actions button { padding: 12px 18px; border-radius: 12px; border: 1px solid #819780; background: #f1f6e9; cursor: pointer; }
.dialog-actions .danger { color: white; background: #a33329; border-color: #a33329; }
.hud-layout:has(#build-status) { grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; }
#build-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 3px 8px; background: #143c32; color: #e4f4ec; font: 10px/1.4 monospace; pointer-events: none; min-width: 0; }
#build-status span { overflow-wrap: anywhere; }
#build-status[data-pending="true"] { background: #633f0e; }

.google-login {
  width: min(380px, calc(100vw - 40px));
  box-sizing: border-box; padding: 28px; border: 0; border-radius: 18px;
  background: #f7f6ed; color: #243c30; font: 16px/1.5 system-ui, sans-serif;
  box-shadow: 0 16px 80px #0005;
}
.google-login::backdrop { background: #10251cbb; }
.google-login h1 { font-size: 26px; margin-top: 0; }
.google-login [role="status"] { font-size: 14px; }
.google-login-button { min-height: 44px; }
