/* disorderly World - map and plot viewer. Uses the site palette from ../styles.css. */
html, body { height: 100%; }
body.world-page { margin: 0; background: var(--void); color: var(--text); overflow: hidden; display: flex; flex-direction: column; }

.wbar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--deep); flex: none; }
.wbar .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.wbar .brand img { width: 26px; height: 26px; }
.wbar .brand-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.wbar .ord { color: var(--acid); }
.wtitle { color: var(--ion); letter-spacing: .3em; font-size: .8rem; display: inline-flex; align-items: center; gap: .55rem; }
.wtitle img { width: 20px; height: 20px; border-radius: 4px; }
.wstatus { color: var(--muted); font-size: .75rem; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wstatus.err { color: var(--plasma); }

.wbtn { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; padding: 9px 14px; border: 1px solid var(--ion); background: rgba(34, 211, 238, .08); color: var(--ion); cursor: pointer; white-space: nowrap; }
.wbtn:hover:not(:disabled) { background: rgba(34, 211, 238, .18); }
.wbtn:disabled { opacity: .45; cursor: not-allowed; }
.wbtn-go { border-color: var(--acid); color: var(--acid); background: rgba(0, 255, 163, .08); width: 100%; margin-top: 10px; padding: 12px; }
.wbtn-go:hover:not(:disabled) { background: rgba(0, 255, 163, .18); }
.wbtn-ghost { border-color: var(--line2); color: var(--text); background: transparent; }
.wlink { color: var(--ion); }

.wmain { flex: 1; display: flex; min-height: 0; }
.wmap { position: relative; flex: 1; min-width: 0; background: #070510; }
.wmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; cursor: crosshair; touch-action: none; }
.wtip { position: absolute; pointer-events: none; padding: 6px 9px; background: rgba(4, 6, 11, .92); border: 1px solid var(--line); font-size: .72rem; line-height: 1.45; white-space: nowrap; z-index: 2; }
.wzoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.wzoom button { width: 34px; height: 34px; border: 1px solid var(--line); background: rgba(4, 6, 11, .85); color: var(--text); font-size: 1rem; cursor: pointer; }
.wlegend { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 8px 12px; background: rgba(4, 6, 11, .85); border: 1px solid var(--line2); font-size: .68rem; color: var(--muted); max-width: calc(100% - 24px); }
.wlegend span { display: inline-flex; align-items: center; gap: 6px; }
.wlegend i { width: 10px; height: 10px; display: inline-block; }

.wpanel { width: 340px; flex: none; border-left: 1px solid var(--line); background: var(--deep); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.wcard { border: 1px solid var(--line2); background: var(--panel); padding: 16px; }
.wpreview { border-color: #ffe14d; }
.wpreview .weyebrow { color: #ffe14d; }
.weyebrow { font-size: .68rem; letter-spacing: .24em; color: var(--violet); margin: 0 0 6px; }
.wh { font-size: 1.5rem; margin: 0 0 8px; }
.wmuted { color: var(--muted); margin: 0; font-size: .9rem; line-height: 1.5; }
.wsmall { font-size: .75rem; margin-top: 8px; overflow-wrap: anywhere; }
.wfacts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0; font-size: .82rem; }
.wfacts dt { color: var(--dim); }
.wfacts dd { margin: 0; overflow-wrap: anywhere; }
.wactions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.wactions .wbtn { text-align: center; text-decoration: none; }
.wactions .wide { grid-column: 1 / -1; }
.wthumb { width: 100%; aspect-ratio: 1; image-rendering: pixelated; border: 1px solid var(--line2); background: #12061c; display: block; margin-top: 10px; }
.wcart { list-style: none; padding: 0; margin: 0; font-size: .8rem; }
.wcart li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line2); }
.wcart li button { background: none; border: 0; color: var(--plasma); cursor: pointer; font: inherit; }
.wcart .total { color: var(--acid); border-bottom: 0; }
.wcart label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wcart input[type=checkbox] { accent-color: #00ffa3; }
#claimCard .wbtn-go { margin-top: 10px; }
.wtag { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; padding: 2px 7px; border: 1px solid currentColor; }

@media (max-width: 760px) {
  body.world-page { overflow: auto; }
  .wmain { flex-direction: column; }
  .wmap { min-height: 62vh; }
  .wpanel { width: auto; border-left: 0; border-top: 1px solid var(--line); padding: 12px 16px 24px; }
  .wtitle { display: none; }
  .wbar { gap: 6px 10px; flex-wrap: wrap; }
  .wbar .wbtn { margin-left: auto; }
  .wstatus { order: 3; flex-basis: 100%; margin-left: 0; text-align: left; font-size: .7rem; }
}

/* ---- plot viewer ---- */
.vwrap { position: relative; flex: 1; min-height: 0; background: #0b0716; }
.vwrap canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; image-rendering: pixelated; touch-action: none; }
.vhud { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; pointer-events: none; }
.vhud > * { pointer-events: auto; }
.vtitle { padding: 8px 12px; background: rgba(4, 6, 11, .85); border: 1px solid var(--line); }
.vtitle b { font-family: var(--display); font-size: 1.1rem; display: block; }
.vtitle span { font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.vviews { display: flex; gap: 6px; margin-left: auto; }
.vviews .wbtn { background: rgba(4, 6, 11, .85); }
.vnote { position: absolute; left: 12px; bottom: 12px; font-family: var(--mono); font-size: .7rem; color: var(--muted); padding: 6px 10px; background: rgba(4, 6, 11, .8); max-width: calc(100% - 24px); }
.vbuild { width: 320px; flex: none; border-left: 1px solid var(--line); background: var(--deep); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.vbuild[hidden] { display: none; }
.vcatalog { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vcatalog button { font-family: var(--mono); font-size: .72rem; padding: 8px 6px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); cursor: pointer; text-align: left; }
.vcatalog button.on { border-color: var(--acid); color: var(--acid); }
.vcatalog small { display: block; color: var(--dim); }
.vrow { display: flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: .75rem; }
.vrow .wbtn { padding: 7px 10px; }
.vrow[hidden] { display: none; }
body.embed .wbar, body.embed .vviews, body.embed .vbuild { display: none; }
@media (max-width: 760px) {
  .vbuild { width: auto; border-left: 0; border-top: 1px solid var(--line); max-height: 45vh; }
  .vmain { flex-direction: column; }
  .vwrap { min-height: 55vh; }
}
