#gameDialog {
  --panel-paper: #fff5d9;
  --panel-light: #fffbea;
  --panel-ink: #402532;
  --panel-muted: #6d504c;
  --panel-edge: #603344;
  --panel-burgundy: #79364b;
  --panel-gold: #efbc57;
  box-sizing: border-box;
  padding: 0;
  width: min(620px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90vh, 850px);
  max-height: min(90dvh, 850px);
  overflow: auto;
  overscroll-behavior: contain;
  margin: auto;
  background: var(--panel-paper);
  color: var(--panel-ink);
  border: 3px solid var(--panel-edge);
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px #faf4ce, 2px 3px 0 #361726, 0 12px 56px #30152463;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  text-align: start;
}
#gameDialog *, #gameDialog *::before, #gameDialog *::after { box-sizing: border-box; }
#gameDialog::backdrop { background: #2b1521b0; }
#gameDialog:focus { outline: none; }
#gameDialog button, #gameDialog input { font: inherit; }
#gameDialog :focus-visible { outline: 3px solid #1a63ad; outline-offset: 2px; }
#gameDialog h2:focus { outline: none; }
#gameDialog .gp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 2px solid var(--panel-edge);
  background: #f6d181;
  box-shadow: inset 0 2px 0 #fff1bb;
}
#gameDialog .gp-head h2 { margin: 0; min-width: 0; font: 400 24px/1.14 var(--pix); font-synthesis: none; overflow-wrap: anywhere; color: var(--panel-ink); flex: 1; }
#gameDialog .gp-icon { width: 24px; height: 24px; display: inline-grid; flex: 0 0 auto; align-items: center; justify-items: center; color: inherit; }
#gameDialog .gp-icon:empty { display:none; }
#gameDialog .gp-icon svg { display: block; width: 100%; height: 100%; }
#gameDialog .gp-close {
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0; flex: 0 0 auto;
  background: var(--panel-light); border: 2px solid var(--panel-edge); border-radius: 3px;
  color: var(--panel-ink); font-size: 24px; font-weight: 750; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 0 var(--panel-edge);
}
#gameDialog .gp-body { padding: 20px; display: grid; gap: 16px; }
#gameDialog .gp-body p, #gameDialog .gp-body h3, #gameDialog .gp-body ul, #gameDialog .gp-body dl, #gameDialog .gp-body dd { margin: 0; }
#gameDialog .gp-body h3 { font-size: 17px; line-height: 1.25; font-weight: 750; color: var(--panel-ink); }
#gameDialog .gp-intro { color: var(--panel-ink); line-height: 1.42; }
#gameDialog .gp-note, #gameDialog .gp-fine { color: var(--panel-muted); }
#gameDialog .gp-fine { font-size: 13px; }
#gameDialog .gp-note {
  padding: 9px 12px;
  background: #faeac3; border-left: 4px solid #c58e37;
}
#gameDialog .gp-feedback { padding: 9px 12px; border: 1px solid #bd807b; background: #f7e2d2; color: #773842; border-radius: 3px; }
#gameDialog .gp-feedback.gp-error { background: #fbe1cd; border-color: #ba7b58; color: #7d3322; }
#gameDialog .gp-grid, #gameDialog .gp-list { display: grid; gap: 9px; }
#gameDialog .gp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#gameDialog .gp-sku { display: flex; flex-direction: column; min-width: 0; }
#gameDialog .gp-sku .gp-product { flex: 1; }
#gameDialog .gp-source { align-self: flex-start; padding: 5px 3px 0; color: #79394c; font-size: 12px; text-underline-offset: 2px; }
#gameDialog .gp-product {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center; gap: 9px; min-height: 70px; padding: 7px 9px;
  background: var(--panel-light); color: var(--panel-ink); border: 2px solid #b6a784; border-radius: 4px;
  cursor: pointer; text-align: start;
}
#gameDialog .gp-product:has(input:checked) { border-color: #984c61; background: #fae7d7; box-shadow: inset 0 0 0 1px #c58a82; }
#gameDialog .gp-product:has(input:focus-visible) { outline: 3px solid #1a63ad; outline-offset: 2px; }
#gameDialog .gp-product:has(input:disabled) { background: #f3ead0; color: #696755; cursor: default; }
#gameDialog .gp-product img {
  width: 42px; height: 46px; object-fit: contain; display: block;
  border: 1px solid #e0d5ba; border-radius: 3px; background: #fff;
}
#gameDialog .gp-product input { width: 17px; height: 17px; margin: 0; accent-color: var(--panel-burgundy); cursor: inherit; }
#gameDialog .gp-product b { display: block; line-height: 1.2; font-size: 16px; overflow-wrap: anywhere; }
#gameDialog .gp-product small { display: block; margin-top: 3px; color: var(--panel-muted); font-size: 13px; line-height: 1.25; }
#gameDialog .gp-product.gp-nophoto { grid-template-columns: minmax(0, 1fr) auto; }
#gameDialog .gp-info { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; }
#gameDialog .gp-info strong { color: #79364b; }
#gameDialog .gp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#gameDialog .gp-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 8px 15px; border: 2px solid #324435; border-radius: 4px;
  box-shadow: inset 0 2px 0 #779676, 0 2px 0 #263a2d; color: #fff8e3; background: var(--panel-burgundy);
  font-weight: 750; line-height: 1.2; cursor: pointer;
}
#gameDialog .gp-button.gp-secondary { background: #f5dda3; color: #4d332d; box-shadow: inset 0 2px 0 #fff3c5, 0 2px 0 #55513c; }
#gameDialog button:enabled:hover { filter: brightness(1.06); }
#gameDialog .gp-button:active:enabled, #gameDialog .gp-close:active { transform: translateY(1px); }
#gameDialog .gp-button:disabled { color: #706e60; background: #e1dbc7; border-color: #9f9c89; box-shadow: inset 0 1px 0 #f4efdf; cursor: default; }
#gameDialog .gp-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid #b8ac8c; border-radius: 3px; overflow: hidden; background: #f4e8c8; }
#gameDialog .gp-stats > div { display: flex; flex-direction: column; justify-content: flex-start; padding: 10px; border: 1px solid #d6c8a5; }
#gameDialog .gp-stats dt { color: var(--panel-muted); font-size: 12px; }
#gameDialog .gp-stats dd { color: var(--panel-ink); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#gameDialog .gp-help-list { padding-inline-start: 20px; display: grid; gap: 8px; }
#gameDialog .gp-section { display: grid; gap: 8px; }
#gameDialog .gp-section + .gp-section { padding-top: 12px; border-top: 1px solid #d1c39e; }
#gameDialog .gp-day { padding: 10px 12px; border: 1px solid #b8ac8c; border-radius: 4px; background: var(--panel-light); }
#gameDialog .gp-day summary { cursor: pointer; font-weight: 700; }
#gameDialog .gp-day[open] > summary { margin-bottom: 10px; }
#gameDialog .gp-day .gp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#gameDialog .gp-target { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #ddcfae; }
#gameDialog .gp-target label { flex: 1; font-weight: 650; }
#gameDialog .gp-target label small { display: block; font-size: 12px; font-weight: 400; color: var(--panel-muted); }
#gameDialog .gp-target input { width: 60px; min-height: 38px; padding: 5px; border-radius: 3px; background: var(--panel-light); color: var(--panel-ink); border: 1px solid #93876d; }
#gameDialog .gp-target button { min-height: 38px; padding: 6px 10px; }
#gameDialog .gp-table { width: 100%; border-spacing: 0; }
#gameDialog .gp-table td, #gameDialog .gp-table th { padding: 4px 3px; text-align: right; border-bottom: 1px solid #ddcfae; font-size: 14px; font-variant-numeric: tabular-nums; }
#gameDialog .gp-table th:first-child, #gameDialog .gp-table td:first-child { text-align: left; }
@media (max-width: 580px) {
  #gameDialog { width: calc(100vw - 20px); max-height: 92vh; max-height: 92dvh; }
  #gameDialog .gp-head { padding: 10px 13px; }
  #gameDialog .gp-body { padding: 13px; gap: 12px; }
  #gameDialog .gp-close { width: 42px; height: 42px; }
  #gameDialog .gp-grid { grid-template-columns: 1fr; }
  #gameDialog .gp-product { min-height: 54px; }
  #gameDialog .gp-product img { height: 37px; }
}
@media (max-width: 380px) {
  #gameDialog .gp-stats, #gameDialog .gp-day .gp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #gameDialog .gp-button { flex-grow: 1; }
}

#gameDialog #sharedLeaderboard { display: grid; gap: 9px; }

#gameDialog .gp-head{background:#692c40;color:#fff0d1;box-shadow:inset 0 2px #995269}#gameDialog .gp-head h2{color:#fff0d1}
