#smExchangeOverlay{position:fixed;inset:0;z-index:1000500;background:rgba(7,10,16,.92);display:flex;align-items:center;justify-content:center;padding:14px;font-family:system-ui,sans-serif;color:#f4f7fb}
#smExchangeOverlay[hidden]{display:none!important}
.smExchangeShell{width:min(1080px,100%);height:min(92vh,900px);background:#151b27;border:2px solid #586b8b;border-radius:18px;box-shadow:0 20px 60px #000a;display:flex;flex-direction:column;overflow:hidden}
.smExchangeHead{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#202a3b;border-bottom:1px solid #48556d}
.smExchangeHead h2{margin:0;font-size:20px;letter-spacing:.04em}.smExchangeHead small{display:block;color:#aab6ca;font-weight:600}.smExchangeHead .spacer{flex:1}.smExchangeHead button{min-height:38px}
.smExchangeTabs{display:flex;gap:6px;overflow-x:auto;padding:9px 10px;background:#111722;border-bottom:1px solid #344055}.smExchangeTabs button{white-space:nowrap}.smExchangeTabs button.active{outline:2px solid #7bc7ff;background:#29415c}
.smExchangeBody{flex:1;min-height:0;overflow:auto;padding:12px}.smExchangeToolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:12px}.smExchangeToolbar input,.smExchangeToolbar select,.smExchangePublish input,.smExchangePublish select,.smExchangePublish textarea{background:#0c121c;color:#fff;border:1px solid #53627b;border-radius:9px;padding:9px 10px;font:inherit}.smExchangeToolbar input{flex:1;min-width:180px}.smExchangeToolbar select{min-width:130px}
.smExchangeGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}.smExchangeCard{background:#1e2735;border:1px solid #47556b;border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:8px;min-height:170px}.smExchangeCardHead{display:flex;gap:9px;align-items:flex-start}.smExchangeIcon{font-size:28px;line-height:1}.smExchangeCard b{font-size:16px}.smExchangeMeta,.smExchangeDesc,.smExchangeStats,.smExchangeTags{color:#b9c4d5;font-size:12px;line-height:1.35}.smExchangeDesc{color:#dde4ef;min-height:32px}.smExchangeTags{display:flex;gap:5px;flex-wrap:wrap}.smExchangeTag{background:#101722;border:1px solid #3e4b61;border-radius:999px;padding:2px 7px}.smExchangeActions{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto}.smExchangeActions button{flex:1;min-width:82px}.smExchangeEmpty{padding:34px 16px;text-align:center;border:1px dashed #506077;border-radius:14px;color:#aab6ca}
.smExchangePublish{display:grid;gap:11px;max-width:720px;margin:0 auto}.smExchangePublish label{display:grid;gap:5px;color:#c8d2e2;font-weight:700}.smExchangePublish textarea{min-height:90px;resize:vertical}.smExchangePublish .row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.smExchangeNotice{background:#101825;border:1px solid #3e506c;border-radius:12px;padding:10px 12px;color:#becae0;font-size:13px;line-height:1.4}.smExchangeStatus{padding:8px 12px;border-top:1px solid #344055;background:#111722;color:#9fb0c8;font-size:12px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.smExchangeStatus .good{color:#9ce6ae}.smExchangeStatus .bad{color:#ffaaa5}.smExchangeToast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:1000600;background:#0e1724;color:#fff;border:2px solid #69b8ff;border-radius:12px;padding:11px 15px;box-shadow:0 10px 35px #000b;max-width:min(92vw,720px);font:700 13px/1.35 system-ui,sans-serif;text-align:center}
@media(max-width:620px){#smExchangeOverlay{padding:0}.smExchangeShell{height:100vh;border-radius:0;border-width:0}.smExchangeHead{padding-top:max(10px,env(safe-area-inset-top))}.smExchangeBody{padding:9px}.smExchangeGrid{grid-template-columns:1fr}.smExchangePublish .row{grid-template-columns:1fr}.smExchangeActions button{min-height:42px}.smExchangeHead h2{font-size:18px}}

/* P224 — visual Exchange cards + up-close asset inspector */
.smExchangeGrid{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.smExchangeCard{padding:10px;gap:9px;min-height:330px;overflow:hidden}
.smExchangePreview{position:relative;display:block;width:100%;height:auto;aspect-ratio:16/9;padding:0;border:1px solid #52627c;border-radius:12px;overflow:hidden;background:radial-gradient(circle at 50% 42%,#27354a 0,#101722 68%,#0a0f17 100%);cursor:zoom-in;flex:0 0 auto}
.smExchangePreview canvas{display:block;width:100%;height:100%;background:transparent}
.smExchangePreviewLabel{position:absolute;left:8px;bottom:8px;max-width:calc(100% - 50px);padding:5px 8px;border-radius:999px;background:rgba(6,10,16,.78);border:1px solid rgba(150,180,220,.35);color:#d9e5f4;font:700 11px/1.2 system-ui,sans-serif;backdrop-filter:blur(5px)}
.smExchangePreviewZoom{position:absolute;right:8px;bottom:8px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(8,13,21,.86);border:1px solid #60728f;color:#fff;font-size:17px}
.smExchangePreview.ready{background:radial-gradient(circle at 50% 45%,#33455f 0,#121a27 70%,#0b1018 100%)}
.smExchangePreview.ready:hover,.smExchangePreview.ready:focus-visible{border-color:#7bc7ff;box-shadow:0 0 0 2px rgba(123,199,255,.18)}
.smExchangePreview.unavailable{opacity:.72}.smExchangePreviewPlaceholder{display:grid;place-items:center;align-content:center;gap:10px;cursor:pointer}.smExchangePreviewPlaceholder .smExchangePreviewLabel{position:static}.smExchangePreviewType{font-size:70px;line-height:1;color:#a8c9f4;text-shadow:0 8px 30px #0008}
.smExchangeCardHead b{font-size:18px}.smExchangeDesc{min-height:0}.smExchangeStats{font-size:12px}
.smExchangeDetail{position:fixed;inset:0;z-index:1000650;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(3,6,11,.92);backdrop-filter:blur(8px)}
.smExchangeDetailCard{width:min(980px,96vw);max-height:94vh;overflow:auto;background:#151d2a;border:2px solid #637898;border-radius:18px;box-shadow:0 24px 80px #000d;padding:14px;color:#f5f8fd}
.smExchangeDetailTop{display:flex;align-items:flex-start;gap:12px;margin-bottom:10px}.smExchangeDetailTop>div:first-child{min-width:0;flex:1}.smExchangeDetailTop h3{margin:0 0 3px;font-size:22px}.smExchangeDetailMeta{color:#aebcd0;font-size:13px}.smExchangeDetailClose{width:44px;height:44px;flex:0 0 auto}
.smExchangeDetailStage{height:min(62vh,620px);min-height:360px;border:1px solid #52627b;border-radius:14px;overflow:hidden;display:grid;place-items:center;background:radial-gradient(circle at 50% 45%,#2c3c54 0,#101722 70%,#090e15 100%);position:relative}.smExchangeDetailStage canvas{width:100%;height:100%;display:block}.smExchangeDetailFallback{position:absolute;inset:0;display:grid;place-items:center;padding:28px;text-align:center;color:#b9c8dc;font-weight:700;pointer-events:none}.smExchangeDetailStage.ready .smExchangeDetailFallback:empty{display:none}
.smExchangeDetailDescription{padding:11px 2px 5px;color:#e0e7f2;line-height:1.45}.smExchangeDetailTags{display:flex;gap:6px;flex-wrap:wrap;padding-top:4px}.smExchangeDetailTags span{background:#101722;border:1px solid #46566e;border-radius:999px;padding:3px 8px;color:#c8d6e8;font-size:12px}
@media(max-width:720px){.smExchangeGrid{grid-template-columns:1fr}.smExchangeCard{min-height:0}.smExchangePreview{height:250px}.smExchangeDetail{padding:0}.smExchangeDetailCard{width:100%;max-height:100vh;height:100vh;border-radius:0;border-width:0;display:flex;flex-direction:column}.smExchangeDetailStage{height:auto;min-height:0;flex:1}.smExchangeDetailTop h3{font-size:20px}}

/* P225 — saved map camera thumbnails in Exchange */
.smExchangeMapPreview img,
.smExchangeDetailStage .smExchangeDetailImage{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  background:#070b12;
}
.smExchangeMapPreview:not(.ready) img{visibility:hidden}
.smExchangeMapPreview.ready img{visibility:visible}
.smExchangeDetailStage .smExchangeDetailImage[hidden]{display:none!important}

/* P226 — map previews are fixed landscape thumbnails, independent of capture device. */
.smExchangeDetailStage{aspect-ratio:16/9;height:auto;min-height:0;max-height:none}
.smExchangeMapPreview{background:#070b12}
@media(max-width:720px){.smExchangePreview{height:auto;aspect-ratio:16/9}.smExchangeDetailStage{height:auto;min-height:0;aspect-ratio:16/9;flex:0 0 auto}}
