/* Scoped auction room: normal flow, scrollable content, compact resource header. */
body:has(#market.active,#collection.active, #tasks.active) #app{display:flex!important;flex-direction:column!important;height:var(--tg-vh,100dvh)!important;min-height:0!important;padding:calc(max(env(safe-area-inset-top,0px),var(--game-safe-top,0px)) + 8px) 0 0!important;gap:8px!important;overflow:hidden!important}
body:has(#market.active,#collection.active, #tasks.active) #app>header{position:relative!important;inset:auto!important;transform:none!important;flex:0 0 52px!important;height:52px!important;min-height:52px!important;padding:0 12px!important;margin:0!important}
body:has(#market.active,#collection.active, #tasks.active) #app>section.money{position:relative!important;inset:auto!important;transform:none!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;flex:0 0 56px!important;height:56px!important;min-height:56px!important;width:calc(100% - 24px)!important;margin:0 12px!important;padding:6px 4px!important}
body:has(#market.active,#collection.active, #tasks.active) #app>main{position:relative!important;inset:auto!important;transform:none!important;flex:1 1 0!important;min-height:0!important;height:auto!important;width:100%!important;margin:0!important;padding:0 12px!important;overflow:hidden!important}
body:has(#market.active,#collection.active, #tasks.active) #app>nav{position:relative!important;inset:auto!important;transform:none!important;flex:0 0 72px!important;height:72px!important;min-height:72px!important;margin:0!important;padding:4px 8px max(5px,env(safe-area-inset-bottom,0px))!important}
#market.page.active,#collection.page.active{position:relative!important;inset:auto!important;display:block!important;height:100%!important;max-height:100%!important;padding:0 0 18px!important;margin:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.exchange{--gold:#f0c573;--muted:#a4aec6;color:#f3f0e8;font:14px/1.45 system-ui,sans-serif;max-width:720px;margin:0 auto;isolation:isolate}
.exchange *{box-sizing:border-box;min-width:0}
.exchange h2,.exchange h3,.exchange p{margin:0}.exchange h2{font-size:28px;letter-spacing:-1px;color:#fff2d4}.exchange h3{font-size:18px;color:#fff2d4}.exchange p{color:var(--muted);font-size:12px;margin:6px 0}.exchange small{font-size:10px;letter-spacing:1.5px;color:var(--gold)}
.exchange button{position:static!important;width:auto;height:auto;min-height:42px;border:1px solid #414357;border-radius:12px;padding:10px 12px;background:#222435;color:#f1e9d8;font:600 12px/1.25 system-ui;cursor:pointer;white-space:normal;box-shadow:none;transform:none;touch-action:manipulation}
.exchange button.primary{background:linear-gradient(135deg,#f5d798,#c89a4a);color:#211a0d;border-color:#f5d798}.exchange button:disabled{opacity:.42;cursor:default}.exchange button:focus-visible,.exchange input:focus-visible,.exchange select:focus-visible{outline:2px solid #ffe4ad;outline-offset:2px}.exchange button.quiet{background:transparent;font-weight:400;color:#abb6d0}.exchange button.selected{background:#3b3024;border-color:var(--gold);color:#ffe3a9}
.ex-header{padding:20px 18px 14px;background:radial-gradient(ellipse at 100% 0,#56432866,transparent 65%),linear-gradient(130deg,#171d30,#10131f);border:1px solid #494234;border-radius:22px 22px 8px 8px}.ex-header p{max-width:290px}.ex-story,.ex-lab,.ex-note{padding:12px 14px;border:1px solid #33394f;border-radius:12px;background:#101625;margin:8px 0}.exchange summary{cursor:pointer;font-size:12px;color:#dccba8;min-height:24px}.ex-tabs{display:flex;gap:5px;overflow:auto;padding:10px 0;position:sticky;top:0;z-index:2;background:#10131ff5}.ex-tabs button{flex:1 0 auto;font-size:11px;padding:9px}.ex-filters{display:flex;gap:6px}.ex-filters button{flex:1;font-size:11px;padding:8px}.ex-hint{padding:0 3px 8px}.ex-content{display:grid;gap:10px}.ex-lot,.ex-album,.ex-choice{border:1px solid #484331;background:linear-gradient(145deg,#1c2031,#0d1320);border-radius:20px;padding:15px;overflow:hidden}.ex-lot-top,.ex-price,.ex-section-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.ex-lot-top{font-size:10px;letter-spacing:1px;color:var(--gold);padding-bottom:10px;border-bottom:1px solid #ffffff10}.ex-lot-top b{font-size:18px;font-variant-numeric:tabular-nums;color:#e9e0ce}.ex-lot-body{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;align-items:center;padding:12px 0}.ex-portrait{height:142px;display:grid;place-items:center;background:radial-gradient(ellipse,#775b3040,transparent 70%)}.ex-portrait img{width:100%;height:100%;object-fit:contain;max-height:142px}.ex-price{padding:12px 0;border-top:1px solid #ffffff10}.ex-price span{font-size:11px;color:var(--muted)}.ex-price strong{font-size:21px;color:#ffe3a9;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;text-align:right}.ex-actions{display:flex;gap:7px;flex-wrap:wrap}.ex-actions button{flex:1 1 120px}.ex-lot details{border-top:1px solid #ffffff10;margin-top:12px;padding-top:12px}.ex-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ex-card{background:#151b2b;border:1px solid #3e4154;border-radius:16px;padding:12px;display:flex;flex-direction:column;align-items:stretch;text-align:center;gap:5px}.ex-card img{height:160px;width:100%;object-fit:contain}.ex-card h3{font-size:15px;overflow-wrap:anywhere}.ex-card small{font-size:9px;letter-spacing:.5px}.ex-card p{font-size:10px}.ex-card button{margin-top:auto;font-size:11px}.ex-status{font-size:9px;letter-spacing:.7px;color:#ebcc92}.ex-choice{border-color:#b79757}.ex-path,.ex-choice form{margin-top:12px;padding:14px 0;border-top:1px solid #ffffff18}.ex-path button,.ex-choice form>button{width:100%;margin-top:6px}.ex-inputs{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}.ex-inputs label{font-size:11px;color:var(--muted)}.exchange input,.exchange select{display:block;width:100%;height:44px;margin-top:5px;border:1px solid #505468;border-radius:9px;background:#0c1120;color:#fff;padding:8px;font:16px system-ui}.ex-album-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:13px 0}.ex-album-grid>div{border:1px solid #4b4637;border-radius:10px;display:flex;flex-direction:column;align-items:center;padding:7px;background:#090f1e}.ex-album-grid img{width:100%;height:90px;object-fit:contain}.ex-album-grid span{font-size:10px;text-align:center}.ex-album-grid small{font-size:8px;letter-spacing:0}.ex-album-grid .missing img{filter:grayscale(1);opacity:.3}.ex-empty{padding:26px 18px;text-align:center;color:var(--muted);border:1px dashed #505268;border-radius:15px}.ex-event{display:flex;gap:12px;padding:13px 5px;border-bottom:1px solid #ffffff12;font-size:12px}.ex-event time{color:var(--gold);flex-shrink:0}.ex-note b{font-size:13px}.ex-lab{margin-top:14px}.ex-lab summary{color:#9bafd4}
@media(min-width:600px){.ex-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ex-album-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(prefers-reduced-motion:no-preference){.exchange button{transition:background .18s,border-color .18s}.ex-content{animation:ex-in .2s ease-out}@keyframes ex-in{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}}
