/* Panda interface refinement. Loaded after page styles; economy and game physics stay in their own modules. */
body.panda-polished {
  --page-pad: 18px;
  --section-gap: 22px;
  --control-min-height: 46px;
  --radius-card: 16px;
  --radius-control: 12px;
  --ui-shadow: 0 4px 16px rgb(5 35 26 / 8%);
  display: block;
  margin: 0;
  padding: 0 0 92px;
  min-width: 0;
  min-height: 100dvh;
  color: var(--text, #312d2b);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.panda-polished *, .panda-polished *::before, .panda-polished *::after { box-sizing: border-box; }
.panda-polished .page {
  width: 100%; max-width: 480px; height: auto; min-height: 100dvh;
  display: block; margin: 0 auto; border-radius: 0;
  transform: none; overflow: visible; box-shadow: none;
  isolation: isolate;
  zoom: 1;
}
.panda-polished .page::after, .panda-polished .statusbar { display: none; }
.panda-polished .screen {
  display: block; height: auto; min-height: 0; overflow: visible;
  padding-bottom: 24px; zoom: 1;
}
.panda-polished :is(.tabbar, .sheet-scrim, .sheet, .ww-scrim, .ww, .flow, .flow-scrim, .overlay) { zoom: 1; }
.panda-polished main { min-width: 0; padding: 8px var(--page-pad) 28px; gap: var(--section-gap); }
.panda-polished main > * { min-width: 0; }
.panda-polished .promo { min-height: 28px; font-size: 10px; padding: 6px var(--page-pad); }
.panda-polished header.app {
  position: relative; top: auto; min-height: 60px;
  margin: 10px var(--page-pad) 14px; padding: 9px 12px;
  border-radius: 16px; gap: 8px;
  background: var(--neutral-1); border: 1px solid var(--neutral-5);
  box-shadow: 0 2px 8px rgb(5 35 26 / 6%), inset 0 1px 0 white;
}
.panda-polished header.app::before { border-radius: inherit; opacity: .35; }
.panda-polished header.app .brand { display: inline; font-size: 24px; letter-spacing: -.9px; }
.panda-polished header.app .brand-mark { width: 30px; height: 30px; }
.panda-polished header.app .page-title { font-size: 19px; line-height: 1.2; }
.panda-polished header.app .head-right { gap: 4px; min-width: 0; }
.panda-polished header.app .icon-btn, .panda-polished header.app .back {
  width: 38px; height: 38px; min-width: 38px; min-height: 38px;
  border-radius: 12px;
}
.panda-polished header.app .icon-btn svg { width: 19px; height: 19px; }
.panda-polished header.app .cur-btn { min-height: 36px; padding: 6px; border-radius: 10px; }
.panda-polished header.app .head-bal { padding: 7px 8px; min-width: 0; }
.panda-polished .cur-menu { z-index: 90; min-width: 220px; padding: 6px; border-radius: 16px; box-shadow: 0 12px 36px rgb(5 35 26 / 18%); }
.panda-polished .cur-menu button { min-height: 44px; border-radius: 10px; }
.panda-polished .gb-chip { font-size: 9px; letter-spacing: .06em; line-height: 1.35; }
.panda-polished .btn { min-height: 46px; border-radius: 12px; font-size: 14px; padding: 10px 16px; }
.panda-polished .btn:disabled { cursor: not-allowed; }
.panda-polished :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--accent-10, #e35c00); outline-offset: 3px;
}
.panda-polished :is(input, select, textarea) { font-size: 16px; border-radius: 12px; }
.panda-polished .page-intro { display: grid; gap: 5px; margin: 0 0 2px; }
.panda-polished .page-intro h1 { font-family: var(--font-display); font-size: clamp(26px, 7vw, 32px); line-height: 1.1; letter-spacing: -.8px; margin: 0; }
.panda-polished .page-intro p { font-size: 13px; line-height: 1.55; color: var(--text-secondary); max-width: 42ch; margin: 0; }
.panda-polished .sec-head { align-items: center; margin-bottom: 10px; gap: 12px; }
.panda-polished .eyebrow { letter-spacing: .09em; font-size: 10px; }
.panda-polished :is(.sec-head a, .sec-head .more) { min-height: 36px; display: inline-flex; align-items: center; font-size: 12px; }
.panda-polished .stage { border-radius: 20px; padding: 22px 18px 16px; box-shadow: 0 8px 22px rgb(5 35 26 / 15%), inset 0 1px 0 rgb(197 255 231 / 25%); }
.panda-polished .stage .live { font-size: 10px; }
.panda-polished .stage .bal { font-size: clamp(38px, 11vw, 52px); line-height: 1.1; letter-spacing: -1.5px; }
.panda-polished .stage .stage-foot { margin-top: 16px; gap: 8px; }
.panda-polished .duo, .panda-polished .play-cta { min-height: 44px; }
.panda-polished .stat-strip { gap: 8px; }
.panda-polished .stat { border-radius: 14px; padding: 12px 9px 12px 32px; box-shadow: var(--ui-shadow); }
.panda-polished .stat .ic { width: 15px; height: 15px; left: 10px; }
.panda-polished .stat .v { font-family: var(--font-body); font-size: 21px; }
.panda-polished .stat .k { font-size: 9px; letter-spacing: .05em; line-height: 1.35; }
.panda-polished .moment { border-radius: 18px; padding: 16px; box-shadow: 0 4px 14px rgb(5 35 26 / 12%); }
.panda-polished .moment .ready-line { font-size: 25px; }
.panda-polished .moment .sub { font-size: 12px; line-height: 1.55; }
.panda-polished .moment .tik-eb { font-size: 10px; margin-bottom: 4px; }
.panda-polished .moment .stub .lbl { font-size: 9px; }
.panda-polished .champ, .panda-polished .violet-card { border-radius: 18px; box-shadow: var(--ui-shadow); }
.panda-polished .rig-row { grid-template-columns: 78px minmax(0, 1fr) auto; border-radius: 14px; box-shadow: var(--ui-shadow); }
.panda-polished .rig-row .name { font-size: 17px; }
.panda-polished .rig-row .who { padding-top: 12px; }
.panda-polished .rig-row .line { font-size: 11px; }
.panda-polished .rig-row .pacer { padding-bottom: 10px; }
.panda-polished .rig-row .pacer .pk { font-size: 9px; }
.panda-polished .rig-row .earn { font-size: 16px; padding: 5px 7px; }
.panda-polished .choose { min-height: 0; padding: 22px 16px; gap: 18px; border-radius: 20px; }
.panda-polished .choose .hint { font-size: 20px; }
.panda-polished .doors { gap: 14px; }
.panda-polished .door { border-radius: 16px; padding: 18px 14px; min-height: 148px; }
.panda-polished .door .d-name { font-size: 24px; }
.panda-polished .door .d-how { font-size: 13px; line-height: 1.45; }
.panda-polished .prod { grid-template-columns: 78px minmax(0, 1fr); gap: 0; padding: 0; border-radius: 16px; box-shadow: var(--ui-shadow); }
.panda-polished .prod .pic { grid-column: 1; grid-row: 1 / 3; width: 100%; height: 100%; min-height: 170px; margin: 0; border-radius: 16px 0 0 16px; }
.panda-polished .prod .info { padding: 14px 12px; }
.panda-polished .prod .line1 { flex-wrap: wrap; gap: 4px 7px; }
.panda-polished .prod .fine { font-size: 11px; line-height: 1.5; }
.panda-polished .prod .pair { font-size: 17px; gap: 6px; }
.panda-polished .prod .act { grid-column: 2; padding: 0 12px 12px; }
.panda-polished .prod .btn { width: 100%; min-height: 42px; }
.panda-polished .list-row { min-height: 66px; padding: 14px 12px; border-radius: 12px; }
.panda-polished .list-row .meta { line-height: 1.5; }
.panda-polished .rate-strip { gap: 10px; }
.panda-polished .rate { border-radius: 14px; padding: 16px 10px; }
.panda-polished .rate .p { font-size: 29px; }
.panda-polished .rate .k { font-size: 10px; line-height: 1.4; }
.panda-polished .sheet, .panda-polished .ww-dialog, .panda-polished .flow-dialog {
  border-radius: 24px 24px 0 0; max-width: 480px;
}
.panda-polished .sheet-x, .panda-polished .ww-x, .panda-polished .flow-x { min-width: 40px; min-height: 40px; }
.panda-polished .fineprint { font-size: 12px; line-height: 1.6; }
.panda-polished .src { border-radius: 14px; min-height: 72px; }
.panda-polished .note-success { padding: 14px; border-radius: 14px; line-height: 1.55; }
.panda-polished .tabbar {
  position: fixed; left: 50%; right: auto; bottom: 0; transform: translateX(-50%);
  width: min(100%, 480px); z-index: 40;
  padding: 6px 8px max(8px, env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0; background: var(--neutral-1);
  box-shadow: 0 -4px 20px rgb(5 35 26 / 9%);
}
.panda-polished .tabbar::before { opacity: .2; border-radius: inherit; }
.panda-polished .tabbar .inner { gap: 2px; }
.panda-polished .tabbar a { min-width: 0; min-height: 54px; gap: 4px; font-size: 10px; font-weight: 600; border-radius: 12px; color: var(--neutral-12); }
.panda-polished .tabbar a .ic svg { fill: var(--neutral-12); }
.panda-polished .tabbar a .ic { width: 42px; height: 28px; border-radius: 10px; box-shadow: none; }
.panda-polished .tabbar a.active { color: var(--accent-11); }
.panda-polished .tabbar a.active .ic { box-shadow: none; background: var(--accent-3); }
.panda-polished .skip-link { position: fixed; top: 8px; left: 12px; transform: translateY(-200%); z-index: 150; padding: 12px 18px; border-radius: 12px; background: var(--neutral-12); color: var(--neutral-1); }
.panda-polished .skip-link:focus { transform: none; }
.panda-polished.no-tabbar { padding-bottom: 0; }
.panda-polished[data-panda-screen="onboarding"] main { padding-top: 24px; }
.panda-polished[data-panda-screen="onboarding"] .screen { min-height: 100dvh; padding: 28px 22px; }
.panda-polished[data-panda-screen="panda-run"] main { padding: 0; }
/* Keep the canvas dimensions and physical playfield untouched. */
.panda-polished[data-panda-screen="panda-run"] .hud { padding-inline: 14px; }
.panda-polished[data-panda-screen="panda-run"] .ppill { min-height: 44px; }
@media (max-width: 360px) {
  body.panda-polished { --page-pad: 12px; }
  .panda-polished header.app { padding-inline: 8px; gap: 3px; }
  .panda-polished header.app .brand { font-size: 21px; }
  .panda-polished header.app .head-right { gap: 1px; }
  .panda-polished header.app .icon-btn { width: 34px; min-width: 34px; }
  .panda-polished header.app .head-bal .dec { display: none; }
  .panda-polished .prod .pair { font-size: 15px; }
  .panda-polished .rig-row { grid-template-columns: 66px minmax(0, 1fr) auto; }
  .panda-polished .stat { padding-right: 6px; padding-left: 27px; }
  .panda-polished .stat .ic { left: 7px; width: 13px; }
  .panda-polished .stat .v { font-size: 19px; }
  .panda-polished .duo .combo { display: none; }
  .panda-polished .duo .lbl { display: inline; }
  .panda-polished .champ .cbody { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; }
  .panda-polished .champ .avw, .panda-polished .champ .av { width: 42px; height: 42px; }
  .panda-polished .champ .nm { font-size: 17px; }
  .panda-polished .champ .cline { white-space: normal; font-size: 10px; }
  .panda-polished .champ .pair { font-size: 16px; }
}
@media (min-width: 560px) {
  body.panda-polished { padding-top: 24px; }
  .panda-polished .page { min-height: calc(100dvh - 24px); border-radius: 26px 26px 0 0; box-shadow: 0 16px 60px rgb(5 35 26 / 10%); }
  .panda-polished .tabbar { border: 1px solid var(--neutral-5); border-bottom: 0; }
  .panda-polished .screen { padding-top: 4px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .panda-polished :is(.door, .prod, .rig-row) { transition: box-shadow 180ms ease, transform 180ms ease; }
  .panda-polished :is(.door, .prod, .rig-row):hover { box-shadow: 0 8px 24px rgb(5 35 26 / 13%); transform: translateY(-2px); }
  .panda-polished .tabbar a:hover { background: var(--neutral-3); }
}
@media (prefers-reduced-motion: reduce) {
  .panda-polished *, .panda-polished *::before, .panda-polished *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
