.market-page { background: #f8f3ed; }
.market-shell { width: min(100% - 24px, 1080px); margin-inline: auto; padding: 16px 0 24px; text-align: center; }
.market-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.market-header a { font-size: .9rem; font-weight: 650; }
.market-header img { mix-blend-mode: multiply; object-fit: contain; }
.market-shell h1 { margin-top: 10px; font-size: clamp(2.6rem, 8vw, 5.3rem); }
.market-shell > p { margin: 9px auto 12px; color: var(--muted); }
.market-hud { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 8px; gap: 7px; }
.market-hud div { background: #fffaf5; padding: 6px 4px; border-radius: 12px; display: grid; gap: 3px; }
.market-hud span { font-size: .875rem; }
.market-hud strong { font-size: clamp(1rem, 4vw, 1.35rem); }
.market-stage { position: relative; overflow: hidden; border-radius: 20px; background: #302622; }
#market-road { width: 100%; height: clamp(310px, 60vh, 570px); touch-action: none; }
#market-road:focus-visible { outline: 3px solid #f2ac74; outline-offset: -5px; }
.market-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; background: #1a110d57; }
.market-overlay > div { max-width: 420px; padding: clamp(19px, 4vw, 35px); background: #fff9f1f5; border-radius: 22px; box-shadow: 0 14px 60px #2f120c70; }
.market-overlay h2 { font-size: clamp(1.8rem, 5vw, 3.3rem); }
.market-overlay button, .market-buttons button { cursor: pointer; }
.market-buttons { display: flex; justify-content: center; gap: 8px; margin-top: 9px; }
.market-buttons button { min-height: 45px; min-width: 82px; padding: 6px 12px; border: 1px solid #c7b6ac; border-radius: 24px; background: #fff9f3; color: var(--ink); font: inherit; font-weight: 650; touch-action: none; }
.market-buttons button:active { background: #ead6cf; }
#market-controls { font-size: .875rem; }
@media (max-width: 530px) { #market-road { height: clamp(300px, 48vh, 480px); } }

.market-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; }
.market-actions button, .market-overlay select { border: 1px solid #bea9a2; border-radius: .7rem; padding: .45rem .7rem; min-height: 40px; background: #fff9f3; color: #592b36; font: inherit; }
.market-shell .market-hud { grid-template-columns: repeat(5,minmax(0,1fr)); }
.market-hud div { border: 1px solid #e8d9d0; }
.market-hud strong { color: #75293d; }
#market-progress { display: block; width: 100%; height: 8px; margin-bottom: 8px; accent-color: #852c43; }
#market-road { display: block; }
.market-stage { box-shadow: 0 17px 42px #43282033; }
.market-overlay[hidden] { display: none; }
.market-overlay label { display: block; font-weight: 700; margin-top: .65rem; }
.market-overlay select { margin-block: .35rem; }
.market-overlay p { margin-block: .65rem; }
.market-overlay { overflow: auto; }
@media (max-width: 530px) {
  .market-hud span { font-size: .65rem; overflow-wrap: anywhere; }
  .market-hud strong { font-size: .78rem; }
  .market-header img { width: 90px; }
}
.market-actions a { color: #ffd19a; }
.market-shell .market-hud strong { color: #ffd19a; }
.market-overlay > div { color: #f5e1d5; }
.market-buttons { flex-wrap: wrap; }
.market-buttons button:disabled { opacity: .55; cursor: default; }
@media (max-width: 530px) {
  .market-buttons button { min-width: 0; flex: 1 1 68px; padding-inline: .3rem; font-size: .8rem; }
}

.market-page { background: radial-gradient(ellipse at top, #452639, #241722 65%); }
.market-shell { width: min(100% - 24px, 1150px); }
.market-shell .market-hud div { border-color: #e6b09138; background: #3d2937; }
.market-shell .market-hud strong { color: #ffd19a; }
.market-hud span { color: #f5ded1; }
.market-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; color: #f5ded1; }
#market-progress { flex: 1; margin: 0; }
#market-zone { min-width: 7rem; font-size: .78rem; text-align: right; }
.market-overlay { background: #180f176e; }
.market-overlay > div { background: #291b29f2; border-color: #eabc8d66; }
.market-overlay h2 { color: #ffd9c2; }
.market-overlay [hidden] { display: none; }
#market-scan-progress { width: 100%; accent-color: #e8a867; }
.market-scan-meter { height: 18px; margin-top: .65rem; border-radius: 12px; background: #704251; position: relative; }
.market-scan-meter span { position: absolute; inset: 0 36%; background: #81cda1; }
.market-scan-meter i { position: absolute; top: -3px; bottom: -3px; width: 4px; border-radius: 4px; background: #fff3da; transform: translateX(-50%); }
.market-scan-static .market-scan-meter { display: none; }
#market-scan-button { background: #ffd19a; color: #271722; }

.market-route-guide { position: absolute; top: .65rem; left: .65rem; display: flex; align-items: center; gap: .45rem; padding: .4rem .6rem; background: #2b1b2bea; border: 1px solid #f2c59e74; border-radius: .75rem; color: #ffe6d2; text-align: left; pointer-events: none; }
.market-route-guide[hidden] { display: none; }
.market-route-guide img { width: 25px; height: 35px; object-fit: contain; }
.market-route-guide div { display: grid; gap: 1px; }
.market-route-guide strong { font-size: clamp(.65rem, 2vw, .88rem); }
.market-route-guide span { font-size: .75rem; color: #f7ca96; }
