/* style-eqshop.css — gear shop + craft panel */
/* the prep button row grows to the left instead of pushing 開戰 off the right edge */
#ui-prep .pp-right { width: max-content; min-width: var(--panelW); max-width: calc(100vw - 24px); }
#ui-prep .pp-right .pp-fight { min-width: max-content; padding-left: 10px; padding-right: 10px; }
.pp-right .pp-eqbtn { flex: 0 0 auto; min-width: 56px; gap: 4px; padding: 0 10px; position: relative; }
.pp-eqbtn .eq-bt { white-space: nowrap; }
.pp-eqbtn .eq-ico { display: none; }
.pp-eqbtn .eq-ico svg, .eq-battlebtn svg { width: 22px; height: 22px; display: block; }
.eq-badge { position: absolute; right: -6px; top: -8px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #e0302a; border: 2px solid var(--gold-hi); color: #fff; font: 900 12px/16px var(--font); text-align: center; font-style: normal; }
.eq-battlebtn { position: absolute; right: 62px; top: 124px; width: 48px; height: 48px; padding: 0; z-index: 26; display: none; align-items: center; justify-content: center; }
.eq-battlebtn.on { display: flex; }
body.spectating .eq-battlebtn { display: none !important; }
@media (max-height: 520px) {
  .eq-battlebtn { top: 112px; }
  .pp-eqbtn .eq-bt { display: none; }
  .pp-eqbtn .eq-ico { display: block; }
  .pp-right .pp-eqbtn { min-width: 44px; width: 44px; padding: 0; }
}

.eq-modal { position: absolute; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(10,2,1,.55); }
.eq-modal.show { display: flex; }
.eq-panel { position: relative; width: min(96vw, 860px); max-height: 92vh; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 2px 6px 6px; color: var(--cream); font-family: var(--font); animation: eq-pop .22s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes eq-pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.eq-head { flex: none; display: flex; align-items: center; gap: 8px; }
.eq-title { flex: none; margin: 0; font-size: 20px; padding: 4px 28px 7px; }
.eq-coins { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px 0 5px; border-radius: 17px; background: rgba(0,0,0,.5); border: 2px solid var(--gold-dark); font-size: 18px; color: var(--gold-hi); }
.eq-coins img { width: 26px; height: 26px; object-fit: contain; }
.eq-sp { flex: 1; }
.eq-tabs { display: flex; gap: 6px; }
.eq-tab { min-width: 72px; font-size: 16px; opacity: .75; }
.eq-tab.on { opacity: 1; filter: brightness(1.15); box-shadow: 0 0 0 2px var(--gold-hi), 0 0 10px rgba(255,200,90,.7); border-radius: 6px; }
.eq-x { width: 44px; height: 44px; font-size: 18px; padding: 0; flex: none; }
.eq-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; touch-action: pan-y; overscroll-behavior: contain; padding: 4px; }
.eq-body::-webkit-scrollbar { display: none; }
.eq-note { font-size: 13px; font-weight: 700; color: #f3dcae; text-shadow: 0 1px 0 #2a0805; text-align: center; line-height: 1.3; margin-top: 4px; }

.eq-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.eq-card { --qc: #d8d0bc; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; cursor: pointer; font-family: var(--font); color: var(--cream);
  background: linear-gradient(rgba(118,50,42,.85), rgba(66,28,24,.9)); border: 3px solid var(--qc); box-shadow: 0 0 10px color-mix(in srgb, var(--qc) 55%, transparent), 0 3px 0 rgba(0,0,0,.5); transition: transform .12s, filter .12s; animation: lq-pop .26s both; }
.eq-card:hover, .eq-card.focus { transform: translateY(-2px) scale(1.04); filter: brightness(1.15); }
.eq-card:active { transform: scale(.94); }
.eq-card img { width: 64px; height: 64px; object-fit: contain; pointer-events: none; }
.eq-nm { font-size: 15px; font-weight: 900; color: var(--qc); text-shadow: var(--outline); text-align: center; line-height: 1.15; }
.eq-q { font-size: 12px; padding: 0 8px; border-radius: 8px; background: rgba(0,0,0,.55); border: 1px solid var(--qc); color: var(--qc); font-weight: 900; }
.eq-st { font-size: 13px; font-weight: 700; color: #fbe9c4; text-align: center; line-height: 1.2; text-shadow: 0 1px 0 #2a0805; word-break: keep-all; overflow-wrap: anywhere; }
.eq-price { display: inline-flex; align-items: center; gap: 3px; font-size: 17px; font-weight: 900; color: var(--gold-hi); text-shadow: var(--outline); margin-top: auto; }
.eq-price img { width: 22px; height: 22px; }
.eq-card.poor { filter: grayscale(.5) brightness(.8); }
/* 鎖定 (request 26) */
.eq-lock { position: absolute; left: 2px; top: 2px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; z-index: 3;
  background: rgba(70,32,27,.85); border: 2px solid #8a6a46; transition: transform .12s, filter .12s; }
.eq-lock svg { width: 26px; height: 26px; display: block; }
.eq-lock:hover, .eq-lock.focus { filter: brightness(1.3); transform: scale(1.08); }
.eq-lock:active { transform: scale(.9); }
.eq-lock.on { background: radial-gradient(circle at 40% 35%, #8a1a10, #3a0805); border-color: #ffd86a; box-shadow: 0 0 10px 2px rgba(255,210,90,.85); }
.eq-card.locked { box-shadow: 0 0 0 3px #ffd86a, 0 0 16px 4px rgba(255,210,90,.75) !important; }
.eq-card.poor .eq-price { color: #ff6a55; }
.eq-card.sold { filter: grayscale(.9) brightness(.5); cursor: default; }
.eq-card.sold .eq-price { font-size: 16px; color: #ddd; }

.eq-craftTop { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.eq-slot { --qc: #7a4810; width: 92px; min-height: 92px; box-sizing: border-box; padding: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 12px; background: rgba(0,0,0,.4); border: 3px dashed var(--qc); text-align: center; }
.eq-slot.fill { border-style: solid; box-shadow: 0 0 10px color-mix(in srgb, var(--qc) 60%, transparent); }
.eq-slot img { width: 48px; height: 48px; object-fit: contain; }
.eq-slot .eq-nm { font-size: 12px; }
.eq-slot .eq-ph { font-size: 13px; color: #c9aa78; }
.eq-arrow { font-size: 26px; color: var(--gold-hi); text-shadow: var(--outline); }
.eq-slot.res { width: 150px; }
/* request 35: magic-hero gear badge, random craft result */
.eq-mtag { font-size: 11px; padding: 0 7px; border-radius: 8px; background: linear-gradient(180deg, #6a4ad8, #3a2290); color: #e8deff; font-weight: 900; border: 1px solid #b9a2ff; text-shadow: 0 1px 0 #1a0c40; white-space: nowrap; }
.eq-card.magic { background-image: radial-gradient(ellipse at 50% 30%, rgba(140,110,255,.28), transparent 70%); }
/* request 38: UR 專屬武器 — gold-red frame everywhere it shows */
.eq-card.excl { border-color: #ffcf5a !important; box-shadow: 0 0 0 2px #c8261c, 0 0 14px rgba(255,120,40,.55), inset 0 0 18px rgba(255,90,30,.25); background-image: radial-gradient(ellipse at 50% 30%, rgba(255,110,40,.32), transparent 70%); }
.eq-xtag { background: linear-gradient(180deg, #e8402a, #8e1410); color: #fff1c8; border-color: #ffd36a; }
.eq-xfx { font-size: 11px; font-weight: 800; color: #ffc98a; text-align: center; line-height: 1.2; white-space: pre-line; text-shadow: 0 1px 0 #2a0805; }
.excl-frame { box-shadow: 0 0 0 2px #ffcf5a, 0 0 0 4px #c8261c, 0 0 10px rgba(255,110,40,.6) !important; border-radius: 10px; }
.sc-lootdesc, .ue-desc, .pp-soft { white-space: pre-line; }
.eq-mdot { position: absolute; left: 4px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d8ccff, #6a4ad8); border: 1px solid #1a0c40; pointer-events: none; }
.eq-slot.rand .eq-ph { font-size: 40px; color: var(--qc); text-shadow: var(--outline); animation: eq-qpulse 1.2s ease-in-out infinite; }
@keyframes eq-qpulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.15); opacity: 1; } }
.eq-slot.res .eq-st { font-size: 12px; }
.eq-slot.glow { animation: eq-glow .8s ease-out; }
@keyframes eq-glow { 0% { transform: scale(1.3); box-shadow: 0 0 40px 14px #ffe08a; } 100% { transform: scale(1); } }
.eq-go { min-width: 120px; min-height: 52px; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.eq-go .eq-price { margin-top: 0; font-size: 16px; }
.eq-msg { flex: 1 1 100%; text-align: center; font-size: 14px; font-weight: 800; color: #ffd98a; text-shadow: var(--outline); min-height: 18px; }
.eq-msg.bad { color: #ff9a80; }
.eq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.eq-tile { --qc: #d8d0bc; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px 4px; min-height: 44px; border-radius: 10px; cursor: pointer; color: var(--cream); font-family: var(--font);
  background: linear-gradient(rgba(118,50,42,.85), rgba(66,28,24,.9)); border: 3px solid var(--qc); transition: transform .12s, opacity .12s; }
.eq-tile img { width: 44px; height: 44px; object-fit: contain; pointer-events: none; }
.eq-tile .eq-nm { font-size: 12px; }
.eq-tile.sel { transform: scale(1.06); box-shadow: 0 0 0 3px #fff4d8, 0 0 14px var(--qc); }
.eq-tile.ok { box-shadow: 0 0 10px var(--qc); }
.eq-tile.dim { opacity: .38; }
.eq-tile:hover, .eq-tile.focus { filter: brightness(1.2); }
.eq-hero { position: absolute; left: -4px; top: -6px; width: 26px; height: 26px; border-radius: 50%; background: #3a120c center 15%/150% no-repeat; border: 2px solid var(--gold); box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.eq-empty { text-align: center; padding: 20px; font-size: 16px; color: #e9d3a8; }

/* request 43: ？ UR signature gear tip + shop refresh */
.eq-help { width: 44px; height: 44px; min-width: 44px; padding: 0; flex: none; border-radius: 50%; font-size: 22px; font-weight: 900; }
.eq-tip { position: absolute; z-index: 5; width: min(380px, 92vw); max-height: 70vh; overflow-y: auto; scrollbar-width: none; box-sizing: border-box; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; color: var(--cream); font-family: var(--font); animation: eq-pop .18s cubic-bezier(.3,1.5,.5,1) both; pointer-events: auto; }
.eq-tip::-webkit-scrollbar { display: none; }
.eq-tipT { font-size: 16px; font-weight: 900; color: var(--gold-hi); text-align: center; text-shadow: var(--outline); }
.eq-tipE { font-size: 14px; font-weight: 700; text-align: center; color: #f3dcae; padding: 6px 0; }
.eq-tipR { display: flex; gap: 8px; align-items: flex-start; padding: 6px; border-radius: 10px; background: rgba(0,0,0,.32); border: 2px solid #ffcf5a; box-shadow: inset 0 0 12px rgba(255,90,30,.22); }
.eq-tipR img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.eq-tipX { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.3; }
.eq-tipX b { font-size: 15px; color: #ffcf5a; text-shadow: var(--outline); }
.eq-tipH { color: #f3dcae; font-weight: 700; font-size: 12px; }
.eq-tipF { color: #ffc98a; font-weight: 800; }
.eq-tipS { color: #e6dcc6; font-weight: 700; font-size: 12px; }
.eq-tools { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.eq-refresh { min-height: 46px; min-width: 130px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; padding: 0 14px; }
.eq-refresh .eq-price { margin-top: 0; font-size: 16px; }
.eq-refresh.poor { filter: grayscale(.7) brightness(.75); }
.eq-refresh.poor .eq-price { color: #ff6a55; }
.eq-rIco { font-size: 22px; line-height: 1; color: var(--gold-hi); text-shadow: var(--outline); }
.eq-rNote { font-size: 13px; font-weight: 700; color: #f3dcae; text-shadow: 0 1px 0 #2a0805; }
.eq-rNote.bad { color: #ff9a80; }

@media (max-width: 760px), (max-height: 520px) {
  .eq-refresh { min-height: 44px; font-size: 16px; min-width: 110px; }
  .eq-tools { margin-bottom: 4px; }
  .eq-panel { width: 98vw; max-height: 94vh; gap: 3px; border-width: 7px; }
  .eq-title { font-size: 16px; padding: 2px 20px 5px; }
  .eq-head { gap: 6px; }
  .eq-cards { gap: 5px; }
  .eq-card { padding: 5px 2px; gap: 2px; border-width: 2px; }
  .eq-card img { width: 44px; height: 44px; }
  .eq-nm { font-size: 14px; } .eq-st { font-size: 12px; } .eq-price { font-size: 15px; }
  .eq-slot { width: 76px; min-height: 76px; } .eq-slot.res { width: 130px; }
  .eq-slot img { width: 36px; height: 36px; }
  .eq-go { min-height: 44px; font-size: 18px; min-width: 100px; }
  .eq-list { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .eq-tile img { width: 34px; height: 34px; }
  .eq-note { font-size: 12px; }
}
@media (max-width: 560px) { .eq-cards { grid-template-columns: repeat(3, 1fr); } }
