/* lane-shop.css: stub created by the foundation lane; owned by the shop lane. */
/* ===== lane shoploop: gold fx, shelf fx, sell undo, run tracker, round intro ===== */
.gfx-float { position: fixed; z-index: 900; pointer-events: none; font: bold 20px var(--font-head, serif); text-shadow: 0 1px 2px #000, 0 0 6px #000; white-space: nowrap; }
.gfx-float.spend { color: #ff5a4a; } .gfx-float.earn { color: #6cff7a; }
.gfx-coin { position: fixed; z-index: 900; pointer-events: none; width: 14px; height: 14px; margin: -7px; background: url(../assets/ui/gold-hd.png) center / contain no-repeat; }
.srow.gold-tween b { color: #ffd100; transition: color .25s; }
.srow.s-income { font-size: .85em; opacity: .85; } .srow.s-income b { color: #3d8a2a; }

.ware { position: relative; }
.ware.lock-frame { outline: 2px solid var(--gold, #ffd100); outline-offset: 2px; border-radius: 4px; }
.padlock-slam { position: absolute; left: 50%; top: 40%; font-size: 30px; z-index: 5; pointer-events: none; filter: drop-shadow(0 2px 3px #000); }
.sold-stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-14deg); z-index: 5; pointer-events: none; padding: 2px 10px; font: bold 22px var(--font-head, serif); letter-spacing: .12em; color: #d63a2a; border: 3px solid #d63a2a; border-radius: 4px; background: rgba(20, 8, 4, .55); animation: sold-stamp 1.6s ease-out forwards; }
@keyframes sold-stamp { 0% { opacity: 0; scale: 2.2; } 15% { opacity: 1; scale: .95; } 75% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1; } }
.bin-arrive { animation: bin-arrive 1s ease-out; }
@keyframes bin-arrive { 0% { box-shadow: 0 0 0 0 rgba(255, 209, 0, .9); } 100% { box-shadow: 0 0 0 18px rgba(255, 209, 0, 0); } }

.sell-undo-chip { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 850; display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; border-radius: 18px; color: #f2d089; background: rgba(24, 14, 6, .94); box-shadow: inset 0 0 0 2px var(--wow-trim, #8a6a2c), 0 4px 10px #000; animation: undo-in .2s ease-out; }
.sell-undo-btn { min-height: 32px; padding: 4px 12px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; font-weight: bold; color: #2a1a0c; background: linear-gradient(#ffe08a, #e0a82a); }
.sell-undo-btn:active { transform: translateY(1px); }
@keyframes undo-in { from { opacity: 0; translate: 0 10px; } }

.run-tracker { display: flex; align-items: center; gap: 12px; }
.rt-pips { display: flex; gap: 3px; } .rt-pip { width: 9px; height: 14px; border-radius: 2px; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px #5a3b17; }
.rt-pip.on { background: linear-gradient(#ffe08a, #e0a82a); box-shadow: 0 0 6px rgba(255, 209, 0, .7), inset 0 0 0 1px #8a6a2c; }
.rt-hearts { display: flex; gap: 3px; } .rt-heart svg { width: 18px; height: 17px; display: block; fill: #d3261a; filter: drop-shadow(0 1px 1px #000); }
.rt-heart.gone svg { fill: rgba(60, 30, 10, .35); filter: none; }
.rt-heart.breaking svg { animation: heart-break .5s ease-out; }
.rt-hearts.last-life { animation: last-life 1.2s ease-in-out infinite; }
@keyframes heart-break { 0% { scale: 1.5; fill: #fff; } 100% { scale: 1; } }
@keyframes last-life { 50% { filter: drop-shadow(0 0 8px #ff2a1a); } }
.rt-shard { position: fixed; z-index: 900; pointer-events: none; width: 6px; height: 6px; margin: -3px; background: #d3261a; clip-path: polygon(0 0, 100% 30%, 40% 100%); }

.round-intro { position: fixed; left: 0; right: 0; top: 34%; z-index: 880; pointer-events: none; text-align: center; padding: 14px 0; color: #f2d089; text-shadow: 0 2px 3px #000; background: linear-gradient(90deg, transparent, rgba(16, 8, 2, .88) 20% 80%, transparent); }
.ri-round { font: bold 44px var(--font-head, serif); } .ri-last { font-size: 16px; opacity: .9; } .ri-income { font-size: 18px; margin-top: 4px; } .ri-income b { color: #ffd100; }
.round-intro.won .ri-last { color: #7dff8a; } .round-intro.lost .ri-last { color: #ff7a6a; }
.restocking .ware { animation: restock .35s ease-out backwards; animation-delay: calc(var(--restock, 0) * 90ms + .5s); }
@keyframes restock { from { opacity: 0; translate: 0 -30px; } }

/* craft hint badge */
.recipe-badge { position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 10px; font-size: 11px; white-space: nowrap; color: #f2d089; background: rgba(24, 14, 6, .92); box-shadow: inset 0 0 0 1px #8a6a2c; z-index: 4; }
.recipe-badge img { width: 20px; height: 20px; border-radius: 3px; } .recipe-badge small { display: none; }
.recipe-badge:focus small, .recipe-badge:active small { display: inline; }
@media (hover: hover) { .recipe-badge:hover small { display: inline; } }

/* class pennant, bag boost glint, today's pick ribbon */
.ware .pennant { position: absolute; left: 4px; top: -4px; width: 14px; height: 22px; background: var(--pennant, #c9a14a); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); filter: drop-shadow(0 1px 1px #000); z-index: 3; }
.ware .pick-ribbon { position: absolute; right: -4px; top: 6px; padding: 1px 6px; font-size: 10px; font-weight: bold; color: #2a1a0c; background: linear-gradient(#ffe08a, #e0a82a); transform: rotate(6deg); z-index: 3; }
.ware .bag-glint { position: absolute; right: 2px; top: 2px; padding: 0 5px; font-size: 10px; font-weight: bold; color: #fff; border-radius: 8px; background: rgba(60, 120, 220, .75); overflow: hidden; z-index: 3; }
.ware .bag-glint::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); translate: -100% 0; animation: glint 2.4s ease-in-out infinite; }
@keyframes glint { to { translate: 100% 0; } }

/* touch: bigger padlock hit area, pressed states */
.ware .lock { position: relative; } .ware .lock:active { transform: scale(.9); }
@media (pointer: coarse) { .ware .lock::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); } }

@media (prefers-reduced-motion: reduce) {
  .sold-stamp, .restocking .ware, .bin-arrive, .rt-heart.breaking svg, .rt-hearts.last-life, .bag-glint::after, .sell-undo-chip { animation: none; }
}

/* integrate lane: shop wiring (opponent plaque host, battle-plan host, tracker slot) */
.opp-host { display: flex; justify-content: center; min-width: 0; max-width: 100%; }
.top-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.srow.plan-row { display: block; }
.srow.plan-row .battle-plan-host { width: 100%; }
@media (max-height: 500px) and (orientation: landscape) {
  .scene { padding-top: 6px; gap: 4px 12px; }
  .opp-host { display: none; }
}

/* touch targets (gate round 1): coarse pointers get real 40px hit boxes on shop buttons */
@media (pointer: coarse) {
  .ware .tag.buy { min-height: 40px; min-width: 60px; }
  .ware .lock { min-width: 40px; min-height: 40px; margin: -12px; display: inline-flex; align-items: center; justify-content: center; }
  .scene .sign.recipes-btn { min-height: 40px; }
  .bp-row { min-height: 40px; grid-template-columns: 24px 1fr 38px minmax(70px, auto) 40px; }
}
