/* Fill the play area as soon as the pilot host mounts, including loading
   and error states. Removing/parking the host restores the classic layout. */
#skillView:has(.greenford-pilot-host) { padding: 0; }
#main:has(#skillView .greenford-pilot-host) { backdrop-filter: none; }
@media (min-width: 769px) {
  #app:has(.greenford-pilot-host) > #sidebar { margin-inline-end: 0; }
}
#gameViewport:has(.greenford-pilot-host)::before,
#gameViewport:has(.greenford-pilot-host)::after,
#gameViewport:has(.greenford-pilot-host) :is(.solar-background-blend, .solar-light-layer, .location-water-background, #weatherEffectLayer, .location-background-loading) {
  display: none !important;
}
.greenford-pilot-host { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.greenford-pilot-host[data-pilot-state="loading"] { pointer-events: auto; z-index: 10; }
.city-scene-map:has(> .greenford-pilot-host[data-pilot-state="loading"]) > :not(.greenford-pilot-host) { visibility: hidden; }
.greenford-pilot-viewport { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.greenford-pilot-ready .greenford-pilot-viewport { opacity: 1; pointer-events: auto; }
.greenford-pilot-viewport canvas { display: block; touch-action: none; }
.greenford-pilot-ready .city-scene-node,
.greenford-pilot-ready .city-notice-board-node,
.greenford-pilot-ready .city-gate-anchor { display: none; }
.greenford-pilot-ready .city-gate-anchor:has(.city-gate-menu:not(.hidden)) {
  display: block; left: auto !important; top: 76px !important; right: 20px; z-index: 6;
}
.greenford-pilot-ready .city-gate-button { display: none; }
.greenford-pilot-ready .city-gate-menu { position: relative; left: auto !important; right: 0 !important;
  top: auto !important; bottom: auto !important; transform: none !important; }
.greenford-pilot-controls { position: absolute; left: 12px; top: 8px; right: 12px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 12px;
  align-items: start; padding: 0; border: 0; background: none; box-shadow: none; pointer-events: none;
  font: 13px/1.4 Georgia, serif; }
.greenford-pilot-warning { color: #ff7771; text-shadow: 0 1px 3px #000,0 0 6px #000; max-width: 260px; padding-top: 2px; font: 600 12px/1.4 system-ui,sans-serif; }
.greenford-pilot-warning strong { display: block; color: #ff7771; font-size: 13px; letter-spacing: .04em; }
.greenford-pilot-warning span { display: block; }
.greenford-pilot-hint { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.greenford-pilot-actions { grid-column: 2; display: flex; justify-content: center; align-items: start; gap: 6px; flex-wrap: wrap; pointer-events: auto; }
.greenford-pilot-host button, .greenford-pilot-host summary { cursor: pointer; padding: 6px 10px; border: 1px solid #aa8c5266;
  border-radius: 5px; background: #2b3022; color: #eee2c5; font: inherit; }
.greenford-pilot-host button:hover, .greenford-pilot-host summary:hover { background: #424a32; border-color: #d6ba77; }
.greenford-pilot-host button:focus-visible, .greenford-pilot-host summary:focus-visible { outline: 2px solid #e4c887; outline-offset: 2px; }
.greenford-pilot-actions details { position: relative; }
.greenford-pilot-actions summary { list-style: none; }
.greenford-pilot-destinations { position: absolute; top: calc(100% + 6px); right: 0; width: 220px; max-height: min(400px, 50vh);
  overflow-y: auto; display: grid; gap: 5px; padding: 8px; border: 1px solid #aa8c5288; border-radius: 7px; background: #151a13fa; }
.greenford-pilot-destinations button { text-align: left; }
.greenford-pilot-status { position: absolute; inset: 0; z-index: 30; display: flex;
  flex-direction: column; justify-content: center; gap: 20px; align-items: center; padding: 32px;
  background: radial-gradient(ellipse at center, #30342a, #0d130f); text-align: center;
  color: #fff3d8; font: 18px/1.5 Georgia, serif; pointer-events: auto; }
.greenford-pilot-status strong { font-size: clamp(24px, 3vw, 40px); color: #ffe1a1; }
.greenford-pilot-status > span:last-child { max-width: 560px; color: #e3e5dc; }
.greenford-pilot-loading-spinner { width: 52px; height: 52px; border: 4px solid #bda26e40;
  border-top-color: #ffe1a1; border-radius: 50%; animation: greenford-loading-spin 1s linear infinite; }
@keyframes greenford-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .greenford-pilot-loading-spinner { animation: none; } }
.greenford-pilot-host [hidden] { display: none !important; }
@media (max-width: 1100px) {
  .greenford-pilot-controls { left: 8px; right: 8px; grid-template-columns: minmax(0,1fr); gap: 6px; }
  .greenford-pilot-warning { justify-self: center; text-align: center; max-width: none; }
  .greenford-pilot-actions { grid-column: 1; }
}
 .greenford-pilot-travel { pointer-events:auto; position:absolute; z-index:20; left:50%; top:50%; transform:translate(-50%,-50%); display:flex; flex-direction:column; gap:10px; width:min(360px,85%); max-height:80%; overflow:auto; padding:24px; color:#f6e7c3; background:#282419; border:2px solid #a08a59; border-radius:8px; box-shadow:0 8px 35px #000a; }
 .greenford-pilot-travel button { padding:10px; color:inherit; background:#423c2b; border:1px solid #998659; border-radius:4px; cursor:pointer; }

.greenford-storehouse-hint { position:absolute; z-index:12; left:50%; bottom:18px; transform:translateX(-50%); max-width:calc(100% - 32px); padding:8px 14px; border-radius:5px; background:#151a13e8; color:#f5e7c7; text-align:center; font:14px/1.5 Georgia,serif; pointer-events:none; }
/* A compact project row shares the smithy drawer with the existing workbench. */
#greenfordSmithyOverlay .processing-window-body { display:grid; grid-template-rows:auto minmax(0,1fr); }
#greenfordSmithyOverlay [data-smithy-project] { height:auto; }
#greenfordSmithyOverlay [data-smithy-project]:empty { display:none; }
#greenfordSmithyOverlay .community-project-banner { position:static; width:100%; min-width:0; transform:none; border-radius:0; padding:6px 14px; box-shadow:none; }

