/* The coast owns the viewport. Shopping keeps its existing light palette. */
body { overflow: hidden; background: #050d16; }
[hidden] { display: none !important; }
#virtual-mart { width: 100%; height: 100dvh; min-height: 400px; position: relative; overflow: hidden; color: #f4f0e6; background: radial-gradient(ellipse at 45% 35%, #16313b, #071019 65%); }
#mart-world { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#mart-world:active { cursor: grabbing; }
#mart-world:focus-visible { outline: 2px solid #e6c68b; outline-offset: -4px; }
.world-header { position: absolute; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 23px 28px; z-index: 3; background: linear-gradient(#02070c8c, transparent); border: 0; pointer-events: none; }
.world-brand { display: flex; align-items: center; gap: 10px; text-shadow: 0 1px 8px #000; }
.world-brand-star { font-size: 25px; color: #eacb92; }
.world-brand strong { display: block; font-size: 14px; font-weight: 650; letter-spacing: .015em; }
.world-brand strong span { font-weight: 450; color: #ece6d7; }
.world-brand small { display: block; font-size: 10px; color: #b7c6c9; margin-top: 3px; }
.world-tools { display: flex; align-items: center; gap: 5px; pointer-events: auto; }
.world-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #e9e5da; background: #09121a80; border: 1px solid #d6e5e119; min-height: 38px; border-radius: 9px; padding: 6px 10px; font-size: 16px; font-weight: 450; backdrop-filter: blur(12px); }
.world-tools button:hover { background: #2b353ac2; border-color: #cbb78c70; }
.world-tools .tool-label { font-size: 11px; }
.world-tools .world-scan-shortcut { color: #e8d1a6; font-size: 12px; border-color: #dac59650; margin-left: 5px; }
#world-entry { position: absolute; z-index: 5; top: 50%; left: clamp(24px, 5.5vw, 96px); transform: translateY(-47%); width: min(400px, calc(100% - 48px)); padding: 24px 0; color: #eee9de; text-shadow: 0 1px 10px #0008; }
#world-entry::before { content: ''; position: absolute; inset: -150px -90px -110px -160px; background: radial-gradient(ellipse at center, #040a12dc, #040a1270 45%, transparent 70%); pointer-events: none; z-index: -1; }
.entry-kicker { color: #d8be8b; font-size: 10px; letter-spacing: .21em; margin: 0 0 16px; font-weight: 650; }
#world-entry h1 { font-size: clamp(38px, 4.3vw, 64px); line-height: 1.16; letter-spacing: -.055em; font-weight: 450; margin: 0 0 18px; }
.entry-description { font-size: 14px; color: #c8d2d1; line-height: 1.8; margin: 0 0 23px; }
.entry-card { padding: 14px 16px; border: 1px solid #d7d3c143; border-radius: 11px; background: #0b141e91; backdrop-filter: blur(12px); margin-bottom: 22px; }
.entry-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.entry-card-heading strong { font-weight: 600; }
.entry-card-heading > span { color: #e4c38c; font-size: 10px; }
.entry-card p { font-size: 11px; color: #bbc6c9; margin: 7px 0 0; line-height: 1.75; }
.avatar-looks { border: 0; padding: 0; margin: 0 0 17px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.avatar-looks legend { font-size: 11px; color: #c5d0d1; margin-bottom: 9px; padding: 0; }
.avatar-looks button { color: #d8dfdc; background: #0a121b91; border: 1px solid #bac8c52b; min-height: 42px; padding: 8px 4px; font-size: 11px; font-weight: 450; display: flex; align-items: center; justify-content: center; gap: 7px; }
.avatar-looks button[aria-pressed=true] { color: #f7e7c6; background: #c6ad7420; border-color: #e3c58a; }
.look-swatch { width: 11px; height: 14px; border-radius: 5px 5px 3px 3px; box-shadow: inset -3px -2px 0 #0002; }
.look-swatch.cream { background: #e8dfc8; }.look-swatch.mint { background: #8bbcaf; }.look-swatch.navy { background: #526780; }
#world-entry > label { display: block; font-size: 11px; color: #c5d0d1; margin-bottom: 8px; font-weight: 450; }
#avatar-name { display: block; width: 100%; background: #07101bab; border: 1px solid #b8c9ca3b; color: #f4efdf; border-radius: 9px; font-size: 13px; padding: 11px 13px; min-height: 43px; }
#avatar-name::placeholder { color: #aab9be; }
#enter-world { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 13px; min-height: 48px; padding: 12px 17px; background: #ede7d8; color: #152027; font-size: 13px; border-radius: 9px; border: 1px solid #efe8d7; }
#enter-world:hover { background: #fff7e6; }
.entry-controls { margin: 15px 0 0; color: #b2bec2; line-height: 1.7; font-size: 10px; }
.world-guide { position: absolute; z-index: 2; top: 90px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(520px, calc(100% - 36px)); display: flex; gap: 8px; align-items: center; padding: 9px 14px; background: #07111bd1; border: 1px solid #c8d7d222; border-radius: 11px; box-shadow: 0 4px 20px #0002; pointer-events: none; backdrop-filter: blur(14px); }
.guide-symbol { color: #edc385; font-size: 15px; flex-shrink: 0; }
.world-guide p { margin: 0; color: #e2e5de; font-size: 12px; line-height: 1.55; }
.world-shortcuts { position: absolute; z-index: 3; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: stretch; gap: 3px; padding: 7px 11px; width: max-content; max-width: calc(100% - 340px); border: 1px solid #becdce30; border-radius: 22px; background: #08121dde; backdrop-filter: blur(20px); box-shadow: 0 12px 45px #0005; overflow-x: auto; scrollbar-width: none; }
.world-shortcuts::-webkit-scrollbar { display: none; }
.world-shortcuts button { min-height: 58px; padding: 7px 13px; display: grid; justify-items: center; align-content: center; gap: 3px; flex-shrink: 0; color: #d8ddda; background: transparent; border-radius: 13px; font-size: 10px; font-weight: 450; white-space: nowrap; }
.world-shortcuts button > span:first-child { font-size: 23px; line-height: 1.2; color: #d7cfb8; font-weight: 400; }
.world-shortcuts button:hover, .world-shortcuts button[aria-pressed=true] { background: #c9ae7530; color: #f7e4bc; }
.world-shortcuts button[aria-pressed=true] > span:first-child { color: #f0c784; }
.dock-divider { width: 1px; margin: 8px 5px; background: #b8c9cd2e; flex-shrink: 0; }
.movement { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 24px; z-index: 3; display: grid; justify-items: center; gap: 4px; padding: 8px; }
.movement > div { display: flex; gap: 4px; }
.movement button { width: 38px; height: 36px; min-height: 36px; padding: 0; border: 1px solid #bfcbc638; border-radius: 11px; background: #0b1723ad; color: #e2e8dc; font-size: 17px; font-weight: 400; touch-action: none; user-select: none; backdrop-filter: blur(10px); }
.movement button:active { background: #bfa57575; }
.world-controls { position: absolute; bottom: 27px; right: 25px; margin: 0; width: 130px; text-align: right; font-size: 10px; line-height: 1.8; color: #c1c9c5; text-shadow: 0 1px 5px #000; pointer-events: none; }
.world-controls span { color: #e8c481; padding: 0 2px; }
#virtual-mart:has(#world-entry:not([hidden])) .world-guide, #virtual-mart:has(#world-entry:not([hidden])) .world-shortcuts, #virtual-mart:has(#world-entry:not([hidden])) .movement, #virtual-mart:has(#world-entry:not([hidden])) .world-controls { visibility: hidden; }
#virtual-mart button:focus-visible, #virtual-mart input:focus-visible, .coast-dialog button:focus-visible, .coast-dialog input:focus-visible { outline: 2px solid #e9c985; outline-offset: 3px; }
.coast-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid #c6c5b64d; border-radius: 20px; color: #ece9df; background: #0e1a25f5; box-shadow: 0 24px 100px #0008; }
.coast-dialog::backdrop { background: #02070ba3; backdrop-filter: blur(5px); }
.coast-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.coast-dialog-top h2 { margin: 0; font-size: 22px; font-weight: 550; letter-spacing: -.035em; }
.coast-dialog-top button { color: #dce4de; background: #ffffff0b; min-height: 34px; padding: 3px 11px; font-size: 21px; font-weight: 400; border: 1px solid #ffffff12; }
.coast-dialog-intro { color: #c2ced0; font-size: 13px; margin: 13px 0 22px; }
.world-key-guide { margin: 0; font-size: 12px; }
.world-key-guide dt { color: #edd1a1; font-weight: 600; margin-top: 15px; }
.world-key-guide dd { color: #c5d0d1; margin: 4px 0 0; line-height: 1.7; }
.world-local-note { color: #aabec4; font-size: 11px; line-height: 1.75; margin: 20px 0; }
.coast-dialog .coast-primary { min-height: 45px; width: 100%; color: #17232a; background: #e9dfc9; border-radius: 10px; border: 1px solid #e6d4b0; font-size: 13px; }
#wish-form label { display: block; font-size: 12px; color: #dce3dc; font-weight: 450; margin-bottom: 9px; }
#wish-text { display: block; width: 100%; min-height: 48px; color: #f2eddf; background: #07111a; border: 1px solid #bccbc346; border-radius: 9px; font-size: 13px; }
#wish-text::placeholder { color: #97adb5; }
/* The existing product UI stays readable and familiar inside its drawer. */
#shopping-dialog { width: min(600px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border: 0; padding: 0; background: #f7f9f4; color: #1e2520; overflow-y: auto; color-scheme: light; }
#shopping-dialog::backdrop { background: #02080ba8; backdrop-filter: blur(3px); }
#shopping-dialog .wrap { width: calc(100% - 32px); }
.drawer-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #fbfdf8; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.drawer-top strong { font-size: 14px; }
.drawer-top button { font-size: 12px; min-height: 36px; }
#shopping-dialog .intro { margin: 20px 0; }
#shopping-dialog .intro h1 { font-size: 28px; }
@media (max-height: 760px) and (min-width: 701px) {
  #world-entry { top: 50%; transform: translateY(-46%); padding: 0; width: 360px; }
  #world-entry h1 { font-size: 43px; margin-bottom: 12px; }
  .entry-kicker { margin-bottom: 10px; }
  .entry-description { margin-bottom: 14px; font-size: 12px; }
  .entry-card { margin-bottom: 14px; padding: 11px 13px; }
  .avatar-looks { margin-bottom: 12px; }
  .entry-controls { margin-top: 9px; }
}
@media (max-width: 1000px) {
  .world-tools .tool-label { display: none; }
  .world-shortcuts { max-width: calc(100% - 210px); left: auto; right: 18px; transform: none; }
  .world-controls { display: none; }
}
@media (max-width: 700px) {
  .world-header { padding: max(14px, env(safe-area-inset-top)) 14px 14px; align-items: flex-start; gap: 8px; }
  .world-brand { gap: 7px; padding-top: 3px; }
  .world-brand-star { font-size: 20px; }
  .world-brand strong { font-size: 12px; }
  .world-brand strong span { display: block; font-size: 10px; margin-top: 1px; }
  .world-brand small { font-size: 9px; }
  .world-tools { gap: 3px; flex-wrap: wrap; justify-content: flex-end; max-width: 216px; }
  .world-tools button { min-height: 32px; padding: 4px 8px; font-size: 14px; border-radius: 8px; }
  .world-tools .world-scan-shortcut { font-size: 10px; padding: 5px 8px; margin-left: 0; }
  #world-entry { top: 49%; transform: translateY(-45%); left: 24px; width: min(360px, calc(100% - 48px)); max-height: calc(100dvh - 110px); padding: 12px 0; overflow-y: auto; scrollbar-width: none; }
  #world-entry h1 { font-size: clamp(35px, 10vw, 48px); margin-bottom: 13px; }
  .entry-kicker { font-size: 8px; margin-bottom: 11px; }
  .entry-description { font-size: 12px; margin-bottom: 17px; }
  .entry-card { margin-bottom: 17px; padding: 12px 13px; }
  .entry-card p { font-size: 10px; }
  .avatar-looks { margin-bottom: 14px; }
  .entry-controls { font-size: 9px; margin-top: 11px; }
  .world-guide { top: 92px; padding: 8px 11px; max-width: calc(100% - 28px); }
  .world-guide p { font-size: 10px; }
  .world-shortcuts { left: 14px; right: 14px; bottom: max(16px, env(safe-area-inset-bottom)); width: auto; max-width: none; border-radius: 17px; padding: 6px; gap: 1px; }
  .world-shortcuts button { min-height: 52px; padding: 5px 12px; font-size: 9px; }
  .world-shortcuts button > span:first-child { font-size: 21px; }
  .dock-divider { margin-inline: 3px; }
  .movement { left: 14px; bottom: 100px; padding: 5px; }
  .movement button { width: 36px; min-height: 34px; height: 34px; }
  .coast-dialog { padding: 21px; border-radius: 17px; }
  .coast-dialog-top h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

.coast-product-images { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.coast-product-images img { position: absolute; top: 0; left: 0; object-fit: contain; background: #f3eddd; border-radius: 3px; pointer-events: none; }
