html, body, #root { margin: 0; height: 680px; background: #1b1410; overflow: hidden; }
.pg-root { position: relative; width: 100%; height: 680px; overflow: hidden; background: #1b1410; font-family: system-ui, sans-serif; color: #fff4dc; -webkit-user-select: none; user-select: none; }
.pg-stage { position: absolute; inset: 0 0 156px 0; }
.pg-hud { position: absolute; inset: 0 0 156px 0; pointer-events: none; }
.pg-hud > * { pointer-events: auto; }
.pg-res { position: absolute; top: 8px; right: 8px; left: 8px; display: flex; gap: 6px; justify-content: space-between; background: rgba(30,20,12,.78); border: 1px solid rgba(224,176,42,.5); border-radius: 12px; padding: 7px 10px; font-weight: 700; font-size: 15px; backdrop-filter: blur(4px); }
.pg-top2 { position: absolute; top: 50px; right: 8px; left: 8px; text-align: center; pointer-events: none; }
.pg-chip { display: inline-block; background: rgba(120,30,24,.85); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.pg-bars { position: absolute; top: 84px; right: 8px; width: 38%; display: grid; gap: 4px; pointer-events: none; }
.pg-bars div { position: relative; height: 16px; background: rgba(20,12,8,.75); border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); }
.pg-bars i { position: absolute; inset: 0 0 0 auto; display: block; height: 100%; }
.pg-bars b { position: relative; font-size: 10.5px; line-height: 16px; padding: 0 7px; font-weight: 600; text-shadow: 0 1px 2px #000; }
.pg-side { position: absolute; left: 8px; top: 84px; display: grid; gap: 6px; }
.pg-side button { width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(224,176,42,.5); background: rgba(30,20,12,.78); color: #fff4dc; font-size: 19px; }
.pg-toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; background: rgba(20,12,8,.92); border: 1px solid #e0b02a; padding: 8px 14px; border-radius: 12px; font-size: 14px; max-width: 86%; text-align: center; }
.pg-help { position: absolute; inset: 120px 18px auto 18px; background: rgba(25,16,10,.94); border: 1px solid #e0b02a; border-radius: 16px; padding: 14px 16px; font-size: 14px; line-height: 1.6; }
.pg-help b { font-size: 17px; color: #e0b02a; } .pg-help p { margin: 6px 0; }
.pg-end { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(15,10,6,.8); padding: 20px; }
.pg-end h2 { margin: 0 0 8px; } .pg-end button { margin-top: 12px; padding: 12px 26px; font-size: 16px; border-radius: 12px; border: 0; background: #e0b02a; color: #2a1a08; font-weight: 800; }
.pg-dock { position: absolute; bottom: 0; right: 0; left: 0; height: 156px; background: linear-gradient(#3a2818, #24170d); border-top: 2px solid #e0b02a; padding: 6px 8px; box-sizing: border-box; }
.pg-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.pg-tabs button { flex: 1; padding: 7px 0; border-radius: 10px; border: 1px solid rgba(224,176,42,.4); background: #2f2013; color: #fff4dc; font-size: 14px; font-weight: 700; }
.pg-tabs button.on { background: #e0b02a; color: #2a1a08; } .pg-tabs .cancel { flex: 1.5; background: #7c1d1a; }
.pg-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.pg-card { flex: 0 0 auto; min-width: 84px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 6px; border-radius: 10px; border: 1px solid rgba(224,176,42,.35); background: #3b2917; color: #fff4dc; }
.pg-card .ic { font-size: 22px; line-height: 1.1; } .pg-card b { font-size: 12.5px; } .pg-card small { font-size: 10.5px; opacity: .85; white-space: nowrap; }
.pg-card.on { background: #e0b02a; color: #2a1a08; border-color: #fff; } .pg-card.atk { background: #b3302a; color: #fff; }
.pg-card.wide { min-width: 150px; }
.pg-note { align-self: center; font-size: 12px; opacity: .85; padding: 0 8px; }

.pg-side button.warn { background: #7c1d1a; font-size: 11px; }
.pg-side { top: 84px; }
.pg-card:disabled { opacity: .75; }

.pg-stage canvas { filter: contrast(1.07) saturate(1.12); }
.pg-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 55%, rgba(25,12,0,.42) 100%); }
.pg-res { font-size: 17px; text-shadow: 0 1px 2px #000; background: rgba(24,15,8,.88); }
.pg-chip { font-size: 14px; font-weight: 700; text-shadow: 0 1px 2px #000; background: rgba(110,24,20,.92); }
.pg-bars b { font-size: 11.5px; }
.pg-card .ic { font-size: 25px; } .pg-card b { font-size: 13.5px; } .pg-card small { font-size: 11.5px; opacity: 1; }
.pg-card { min-width: 92px; }
.pg-tabs button { font-size: 15px; }
