/* 암시장 — 이벤트 상점. 다른 화면과 달리 자기 전용 색(금빛 장식)을 쓴다 — 이 파일 안의 색은 tokens.css 를 따르지 않는다.
   PC: 위(제목 · 남은 시간 · 지갑) / 왼쪽 상인 · 오른쪽 상품 카드 2열. 폰(900 이하): 상인 작게, 상품은 한 줄 목록. */
.bm-screen { --bm-gold: #d9ae5f; --bm-line: #655331; min-width: 0; padding: 24px; color: #eadfca; background: radial-gradient(ellipse at 15% 35%, #29251b99, transparent 60%), linear-gradient(135deg, #131815, #0c1012); border: 1px solid #3f382a; border-radius: var(--radius); overflow: hidden; }
.bm-screen .btn { min-height: 48px; min-width: 48px; white-space: normal; margin: 0; border-radius: var(--radius); }

/* 위 */
.bm-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid #54472c; }
.bm-top h1 { font-size: clamp(22px, 2.5vw, 32px); margin: 5px 0 10px; letter-spacing: -.04em; color: #f1dfba; }
.bm-time { font-size: 12px; color: #c2b394; margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bm-time small { width: 100%; color: #897e69; font-size: 12px; }
.bm-live-dot { width: 5px; height: 5px; border-radius: 50%; background: #d9ae5f; box-shadow: 0 0 8px #d9ae5f; }
.bm-wallet { flex-shrink: 0; padding: 10px 16px; border: 1px solid #75603a; border-radius: var(--radius); background: linear-gradient(135deg, #42382277, #1c201b); box-shadow: inset 0 1px #b79a4e22; }
.bm-wallet > span { font-size: 12px; color: #b5a683; }
.bm-balance { display: flex; align-items: center; gap: 9px; margin-top: 4px; }
.bm-balance b { font-size: 27px; color: #f2d28f; line-height: 1.1; }
.bm-token { width: 28px; height: 28px; object-fit: contain; }

/* 상인 */
.bm-layout { display: grid; grid-template-columns: minmax(200px, 30%) minmax(0, 1fr); gap: 24px; padding-top: 20px; }
.bm-header, .bm-content { min-width: 0; }
.bm-merchant { text-align: center; }
.bm-merchant-art { height: 310px; overflow: hidden; filter: drop-shadow(0 10px 22px #000); }
.bm-merchant-image { width: 100%; height: 310px; object-fit: contain; pointer-events: none; }
.bm-speech { position: relative; text-align: left; padding: 14px 16px; border: 1px solid #756037; border-radius: var(--radius); background: #211f18; box-shadow: 0 8px 18px #0005; }
.bm-speech::before { content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; background: #211f18; border-left: 1px solid #756037; border-top: 1px solid #756037; transform: rotate(45deg); }
.bm-speech > span { font-size: 12px; letter-spacing: .08em; color: #d6b879; }
.bm-speech p { margin: 6px 0 0; font-size: 12px; line-height: 1.65; color: #d2c3a3; overflow-wrap: anywhere; }
.bm-intro { font-size: 12px; line-height: 1.8; color: #8f897b; text-align: center; margin: 16px 0; }

/* 상품 */
.bm-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.bm-tools h2 { font-size: 16px; margin: 0; color: #d6c6a2; }
.bm-tools > div { display: flex; gap: 6px; }
.bm-tools .btn { font-size: 12px; border-color: #605237; background: #24241d; color: #cdb989; padding: 9px; }
.bm-refresh { font-size: 22px; }
.bm-status:empty, .bm-reason:empty { display: none; }
.bm-status { padding: 10px; border: 1px solid #685531; color: #e9c486; font-size: 12px; border-radius: var(--radius); }
.bm-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bm-card { min-width: 0; border: 1px solid #78613b; border-radius: var(--radius); background: linear-gradient(145deg, #24271f, #13191a); overflow: hidden; box-shadow: 0 8px 20px #0003; }
.bm-product-art { height: 132px; display: flex; align-items: center; justify-content: center; position: relative; background: radial-gradient(ellipse, #9b76302e, transparent 70%), linear-gradient(145deg, #1c211d, #101617); border-bottom: 1px solid #655333; }
.bm-product-tag { position: absolute; top: 10px; left: 10px; font-size: 12px; color: #d6bc89; background: #131714c9; border: 1px solid #695534; border-radius: var(--radius); padding: 4px 8px; }
.bm-voucher-picture { display: block; width: 100%; height: 100%; }
.bm-voucher-art { display: block; width: 100%; height: 100%; object-fit: contain; transform: none; border: 0; background: transparent; pointer-events: none; }
.bm-voucher-inline { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; margin-right: 4px; transform: none; }
.bm-card-copy { padding: 16px; }
.bm-card h3 { font-size: 15px; color: #eedbb7; margin: 0 0 8px; line-height: 1.5; overflow-wrap: anywhere; }
.bm-description { font-size: 12px; line-height: 1.7; color: #aaa28e; margin: 0 0 12px; min-height: 36px; }
.bm-reward { font-size: 12px; color: #8e8b7f; margin-bottom: 12px; }
.bm-reward b { display: block; font-weight: 500; color: #c8bea5; margin-top: 3px; }
.bm-reward .bm-voucher-inline { width: 16px; height: 16px; }
.bm-limit { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: #a0977e; padding-top: 12px; border-top: 1px solid #454433; margin-bottom: 14px; }
.bm-limit b { font-weight: 500; color: #d3b97f; }
.bm-reason { font-size: 12px; color: #ce9b79; min-height: 18px; }
.bm-mobile-meta, .bm-mobile-price { display: none; }
.bm-screen .bm-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 1px solid #e2bc6b; background: linear-gradient(135deg, #dfb65e, #b88839); color: #271c0d; box-shadow: inset 0 1px #f8dea3; padding: 10px; font-size: 12px; }
.bm-screen .bm-buy:disabled { background: #33372d; border-color: #5b5b42; color: #a49b80; box-shadow: none; opacity: 1; }
.bm-buy > span { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.bm-buy b { font-size: 18px; }
.bm-buy .bm-token { width: 22px; height: 22px; }
.bm-buy strong { font-size: 12px; white-space: nowrap; }
.bm-footnote { font-size: 12px; color: #8d8778; line-height: 1.7; margin: 18px 0 0; }
.bm-empty { padding: 40px 16px; text-align: center; border: 1px dashed #615331; border-radius: var(--radius); color: #b2a78e; }
.bm-empty > span { font-size: 28px; color: #bd9d60; }
.bm-empty p { font-size: 12px; line-height: 1.8; }
.bm-heroes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bm-heroes .bm-card { padding: 10px; }
.bm-heroes p { font-size: 12px; }
.bm-preview { width: 100%; height: 140px; object-fit: contain; }

@media (max-width: 900px) {
  .bm-screen { padding: 12px; }
  .bm-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding-bottom: 10px; }
  .bm-top > div:first-child { display: contents; }
  .bm-top h1 { order: 1; max-width: none; margin: 0; font-size: 14px; line-height: 1.4; letter-spacing: -.045em; }
  .bm-time { order: 2; flex-wrap: nowrap; white-space: nowrap; gap: 3px; }
  .bm-time small { display: none; }
  .bm-live-dot { width: 4px; height: 4px; }
  .bm-wallet { order: 3; padding: 7px 8px; }
  .bm-wallet > span { display: none; }
  .bm-balance { margin: 0; gap: 4px; }
  .bm-balance b { font-size: 18px; }
  .bm-token { width: 25px; height: 25px; }
  .bm-wallet .bm-token { width: 20px; height: 20px; }
  .bm-layout { display: block; padding-top: 6px; }
  .bm-merchant { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: center; gap: 6px; min-height: 190px; }
  .bm-merchant-art { height: 190px; }
  .bm-merchant-image { height: 238px; width: 160px; object-position: top; }
  .bm-speech { padding: 12px 9px; }
  .bm-speech::before { top: 50%; left: -7px; border-top: none; border-bottom: 1px solid #756037; }
  .bm-intro { display: none; }
  .bm-tools { margin: 4px 0 10px; }
  .bm-tools h2 { font-size: 13px; }
  .bm-tools .btn { min-height: 44px; padding: 6px; }
  .bm-refresh { min-width: 44px; }
  .bm-products { display: flex; flex-direction: column; gap: 10px; }
  .bm-product-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; overflow: visible; }
  .bm-product-art { height: 64px; width: 64px; border: 1px solid #655333; border-radius: var(--radius); overflow: hidden; }
  .bm-product-tag { display: none; }
  .bm-card-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; padding: 0; }
  .bm-card-copy h3 { grid-column: 1 / -1; margin: 0 0 5px; font-size: 12px; line-height: 1.5; }
  .bm-description, .bm-reward, .bm-limit { display: none; }
  .bm-mobile-meta { display: block; grid-column: 1 / -1; font-size: 12px; line-height: 1.6; margin: 0 0 8px; color: #b7ab8e; }
  .bm-reason { grid-column: 1 / -1; margin: 0 0 6px; }
  .bm-screen .bm-buy { grid-column: 1 / -1; justify-self: end; width: auto; min-width: 88px; min-height: 48px; padding: 8px 14px; }
  .bm-buy > span:not(.bm-mobile-price), .bm-buy > strong { display: none; }
  .bm-buy > .bm-mobile-price { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; }
  .bm-heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm-preview { height: 120px; }
  .bm-footnote { margin: 10px 0 0; line-height: 1.5; white-space: nowrap; }
}
