/*
 * HD SofT:n selainpelien yhteinen ulkoasu (core/pelit.js rakentaa rungon). Sopimus: pelit/README.md.
 * Vain .hdpeli-alkuiset luokat. Sivu on vaalea, joten tummaa teemaa ei ole. Värit BRANDI.md:stä,
 * fontit sivustolta (Montserrat otsikot ja napit, Inter teksti). Leveys ≥ 1100 px: sivupalkki pelin vieressä,
 * kapeammalla mainosrivi heti pelialueen alla; < 560 px pelialue ulottuu näytön reunasta reunaan.
 */
.hdpeli, .hdpeli-overlay {
  --hdp-bg: #f3f5f7;
  --hdp-surface: #ffffff;
  --hdp-fg: #13212b;
  --hdp-muted: #58585a;
  --hdp-line: #d1d2d4;
  --hdp-primary: #1684b8;
  --hdp-primary-2: #14a5dc;
  --hdp-primary-ink: #ffffff;
  --hdp-okra: #f4ba6c;
  --hdp-okra-dark: #b56219;
  --hdp-shadow: 0 1px 2px rgba(16, 36, 52, .08), 0 6px 24px rgba(16, 36, 52, .08);
  --hdp-font-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --hdp-font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hdp-radius: 14px;
  color: var(--hdp-fg);
  font: 400 16px/1.6 var(--hdp-font-body);
  -webkit-text-size-adjust: 100%;
  text-align: start;
}
.hdpeli *, .hdpeli *::before, .hdpeli *::after,
.hdpeli-overlay *, .hdpeli-overlay *::before, .hdpeli-overlay *::after { box-sizing: border-box; }
.hdpeli [hidden], .hdpeli-overlay[hidden], .hdpeli-overlay [hidden] { display: none !important; }
.hdpeli :focus-visible, .hdpeli-overlay :focus-visible { outline: 3px solid var(--hdp-primary-2); outline-offset: 2px; }
/* Dialogi itse saa kohdistuksen vain teknisesti (napit saavat renkaansa); ilman tätä kosketuslaitteella näkyi sininen reunus. */
.hdpeli-overlay .hdpeli-dialog:focus-visible, .hdpeli-overlay .hdpeli-dialog:focus { outline: none; }
.hdpeli img, .hdpeli-overlay img { max-width: 100%; }

/* ---------- runko ---------- */
.hdpeli { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; width: 100%; min-width: 0; }
.hdpeli.is-error { display: block; padding: 16px; background: var(--hdp-surface); border: 1px solid var(--hdp-line); border-radius: var(--hdp-radius); }
.hdpeli-main { min-width: 0; }
.hdpeli-stage { position: relative; isolation: isolate; min-width: 0; }
.hdpeli-stage:focus { outline: none; }
/* Ruudunlukijan ilmoitukset (ctx.announce). left/top 0 ja ei negatiivista marginaalia: RTL-sivulla muuten 1 px ylivuoto. */
.hdpeli { position: relative; }
.hdpeli-sr { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Paneeli pelialueen alareunassa (ui.banner). */
.hdpeli-banner {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2500; width: min(92%, 460px);
  background: rgba(10, 26, 20, .88); color: #fff; border-radius: 12px; padding: 12px 14px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 10px; font-size: 14px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
/* Valintaruutu ei kutistu, kun asetuksen teksti rivittyy (sudokun pitkät asetustekstit). */
.hdpeli-check input { flex: none; }
.hdpeli-banner.is-top { top: 14px; bottom: auto; }
.hdpeli-banner p { margin: 0; flex: 1 1 180px; color: #fff; }
.hdpeli .hdpeli-banner button {
  height: 34px; margin: 0; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .4); background: transparent;
  color: #fff; font: 600 13px/1 var(--hdp-font-display); cursor: pointer;
}
.hdpeli .hdpeli-banner button.is-primary { background: #fff; color: #10301f; border-color: #fff; }
.hdpeli-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3000; }

/* ---------- työkalurivi ---------- */
.hdpeli-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 10px; position: relative; z-index: 20; }
.hdpeli-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hdpeli .hdpeli-btn, .hdpeli-overlay .hdpeli-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; min-width: 40px; margin: 0;
  padding: 0 14px; border-radius: 10px; border: 1px solid var(--hdp-line); background: var(--hdp-surface); color: var(--hdp-fg);
  font: 600 14px/1 var(--hdp-font-display); letter-spacing: 0; text-transform: none; cursor: pointer; box-shadow: none;
  transition: background .15s, border-color .15s; -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.hdpeli .hdpeli-btn:hover:not(:disabled), .hdpeli-overlay .hdpeli-btn:hover:not(:disabled) { border-color: var(--hdp-primary); }
.hdpeli .hdpeli-btn:disabled { opacity: .45; cursor: default; }
.hdpeli .hdpeli-btn.is-primary, .hdpeli-overlay .hdpeli-btn.is-primary { background: var(--hdp-primary); border-color: var(--hdp-primary); color: var(--hdp-primary-ink); }
.hdpeli .hdpeli-btn svg, .hdpeli-overlay .hdpeli-btn svg { width: 18px; height: 18px; flex: none; }
.hdpeli .hdpeli-btn.is-icon { width: 40px; padding: 0; }
.hdpeli .hdpeli-btn.is-pressed { background: rgba(22, 132, 184, .12); border-color: var(--hdp-primary); color: var(--hdp-primary); box-shadow: inset 0 0 0 1px var(--hdp-primary); }
.hdpeli-lbl-short { display: none; }
/* Kapea tila (core fitBar): napit kuvakkeina, kun rivi ei muuten mahdu; ensin muut kuin ensisijainen, sitten kaikki. */
.hdpeli-bar.is-compact .hdpeli-btn.has-icon:not(.is-primary),
.hdpeli-bar.is-compact-all .hdpeli-btn.has-icon { width: 40px; padding: 0; gap: 0; }
.hdpeli-bar.is-compact .hdpeli-btn.has-icon:not(.is-primary) > span,
.hdpeli-bar.is-compact-all .hdpeli-btn.has-icon > span { display: none !important; }
.hdpeli-meters { margin-inline-start: auto; display: flex; gap: 14px; color: var(--hdp-muted); font: 500 14px/1 var(--hdp-font-body); font-variant-numeric: tabular-nums; }
.hdpeli-meter { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.hdpeli-meter svg { width: 16px; height: 16px; flex: none; }
.hdpeli-bar.is-compact-all .hdpeli-meter.has-icon .hdpeli-meter-lbl { display: none; }
.hdpeli-meter b { color: var(--hdp-fg); font-weight: 600; unicode-bidi: isolate; }

/* ---------- asetukset ---------- */
.hdpeli-settings { position: relative; }
.hdpeli-popover {
  position: absolute; inset-inline-end: 0; top: 46px; z-index: 50; width: 260px; max-width: calc(100vw - 24px);
  background: var(--hdp-surface); color: var(--hdp-fg); border: 1px solid var(--hdp-line); border-radius: 12px;
  box-shadow: var(--hdp-shadow); padding: 14px; display: grid; gap: 14px;
}
.hdpeli-setting { display: grid; gap: 8px; }
.hdpeli-popover fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.hdpeli-popover legend { padding: 0; font: 600 12px/1.2 var(--hdp-font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--hdp-muted); margin-bottom: 6px; }
.hdpeli-seg { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); border: 1px solid var(--hdp-line); border-radius: 9px; overflow: hidden; }
.hdpeli-seg label { position: relative; margin: 0; }
.hdpeli-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hdpeli-seg span { display: block; text-align: center; padding: 8px 6px; font-size: 14px; line-height: 1.3; cursor: pointer; }
.hdpeli-seg input:checked + span { background: var(--hdp-primary); color: var(--hdp-primary-ink); font-weight: 600; }
.hdpeli-seg input:focus-visible + span { outline: 3px solid var(--hdp-primary-2); outline-offset: -3px; }
.hdpeli-help { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--hdp-muted); }
.hdpeli-setting.is-disabled { opacity: .5; }
.hdpeli-setting.is-disabled label, .hdpeli-setting.is-disabled span, .hdpeli-setting.is-disabled input { cursor: default; }
.hdpeli-check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; margin: 0; }
.hdpeli-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--hdp-primary); }
.hdpeli .hdpeli-action { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; margin: 0; padding: 8px 10px;
  border: 1px solid var(--hdp-line); border-radius: 9px; background: var(--hdp-surface); color: var(--hdp-fg);
  font: 500 15px/1.3 var(--hdp-font-body); text-align: start; cursor: pointer; }
.hdpeli .hdpeli-action:hover { border-color: var(--hdp-primary); }
.hdpeli .hdpeli-action svg { width: 18px; height: 18px; flex: none; }
.hdpeli-note { font-size: 13px; line-height: 1.45; color: var(--hdp-muted); margin: 0; display: grid; gap: 8px; }
.hdpeli-note .hdpeli-btn { justify-self: start; }

/* ---------- omat mainokset ---------- */
.hdpeli-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.hdpeli-same { background: var(--hdp-surface); border: 1px solid var(--hdp-line); border-radius: var(--hdp-radius); padding: 16px; display: grid; gap: 12px; box-shadow: var(--hdp-shadow); }
.hdpeli-same-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.hdpeli-same-head img { width: 56px; height: 56px; border-radius: 13px; display: block; }
.hdpeli-eyebrow { font: 600 11px/1.25 var(--hdp-font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--hdp-okra-dark); }
.hdpeli .hdpeli-same-title, .hdpeli-overlay .hdpeli-same-title { display: block; margin-top: 2px; font: 700 17px/1.25 var(--hdp-font-display); color: var(--hdp-fg); text-decoration: none; }
.hdpeli .hdpeli-same-title:hover, .hdpeli-overlay .hdpeli-same-title:hover { color: var(--hdp-primary); }
.hdpeli-same p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--hdp-muted); }
.hdpeli-stores { display: flex; flex-wrap: wrap; gap: 8px; }
.hdpeli .hdpeli-store, .hdpeli-overlay .hdpeli-store {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px; text-decoration: none;
  background: var(--hdp-fg); color: #ffffff; font: 600 14px/1 var(--hdp-font-display); white-space: nowrap;
}
.hdpeli .hdpeli-store svg, .hdpeli-overlay .hdpeli-store svg { width: 18px; height: 18px; flex: none; }
.hdpeli .hdpeli-store:hover, .hdpeli-overlay .hdpeli-store:hover { background: var(--hdp-primary); color: var(--hdp-primary-ink); }
.hdpeli .hdpeli-promo, .hdpeli-overlay .hdpeli-promo {
  display: grid; grid-template-rows: auto 1fr; background: var(--hdp-surface); border: 1px solid var(--hdp-line); border-radius: var(--hdp-radius);
  overflow: hidden; color: var(--hdp-fg); text-decoration: none; transition: border-color .15s, transform .15s;
}
.hdpeli .hdpeli-promo:hover, .hdpeli-overlay .hdpeli-promo:hover { border-color: var(--hdp-primary); transform: translateY(-1px); }
.hdpeli-promo-pic { aspect-ratio: 16 / 9; background: var(--hdp-bg); display: grid; place-items: center; overflow: hidden; }
.hdpeli-promo-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hdpeli-promo-pic.is-contain img { object-fit: contain; width: 46%; height: auto; max-height: 78%; border-radius: 18%; }
.hdpeli-promo-body { padding: 12px 14px 14px; display: grid; gap: 4px; align-content: start; }
.hdpeli-promo-body strong { font: 600 15px/1.3 var(--hdp-font-display); }
.hdpeli-promo-body > span { font-size: 14px; line-height: 1.55; color: var(--hdp-muted); }
.hdpeli .hdpeli-promo-cta, .hdpeli-overlay .hdpeli-promo-cta { color: var(--hdp-primary); font: 600 13px/1.2 var(--hdp-font-display); margin-top: 4px; }

/* Mainosrivi heti pelialueen alla (puhelin ja tabletti). */
.hdpeli-strip { display: none; }
.hdpeli-strip-in { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 10px;
  padding: 10px 12px; background: var(--hdp-surface); border: 1px solid var(--hdp-line); border-radius: 12px; color: var(--hdp-fg); text-decoration: none; }
.hdpeli-strip-in > img { width: 44px; height: 44px; border-radius: 10px; display: block; }
.hdpeli-strip-in.is-promo { grid-template-columns: 78px minmax(0, 1fr) auto; }
.hdpeli-strip-pic { width: 78px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--hdp-bg); display: grid; place-items: center; }
.hdpeli-strip-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hdpeli-strip-pic.is-contain img { width: auto; height: 80%; object-fit: contain; border-radius: 18%; }
.hdpeli-strip-text { min-width: 0; }
.hdpeli-strip-text strong { display: block; font: 600 14px/1.25 var(--hdp-font-display); }
.hdpeli-strip-text span { font-size: 13px; color: var(--hdp-muted); line-height: 1.3; display: block; }
.hdpeli-strip-in.is-promo .hdpeli-strip-text span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hdpeli-strip-in .hdpeli-store { height: 36px; padding: 0 12px; font-size: 13px; }
.hdpeli-strip-cta { color: var(--hdp-primary); font: 700 18px/1 var(--hdp-font-display); padding-inline: 4px; }

/* ---------- dialogit (liitetty bodyyn, ettei sivun transform tai overflow riko niitä) ---------- */
.hdpeli-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(6, 16, 22, .5); display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.hdpeli-dialog { width: min(100%, 420px); max-height: 100%; overflow: auto; background: var(--hdp-surface); color: var(--hdp-fg); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); padding: 22px; display: grid; gap: 16px; animation: hdpeli-pop .32s cubic-bezier(.2, .9, .3, 1.3); outline: none; }
@keyframes hdpeli-pop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.hdpeli-overlay .hdpeli-dialog-title { margin: 0; padding: 0; font: 700 26px/1.2 var(--hdp-font-display); color: var(--hdp-fg); text-wrap: balance; }
.hdpeli-dialog p { margin: 0; color: var(--hdp-muted); font-size: 16px; line-height: 1.55; }
.hdpeli-dialog-body { display: grid; gap: 12px; min-width: 0; }
.hdpeli-dialog-body label { display: grid; gap: 4px; font-size: 14px; }
.hdpeli-dialog-body input, .hdpeli-dialog-body select { font: inherit; padding: 8px 10px; border: 1px solid var(--hdp-line); border-radius: 8px; background: var(--hdp-surface); color: var(--hdp-fg); }
.hdpeli-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.hdpeli-stats div { background: var(--hdp-bg); border-radius: 10px; padding: 10px 8px; text-align: center; min-width: 0; }
.hdpeli-stats dt { font-size: 11px; line-height: 1.3; color: var(--hdp-muted); text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.hdpeli-stats dd { margin: 2px 0 0; font: 700 18px/1.2 var(--hdp-font-display); font-variant-numeric: tabular-nums; }
.hdpeli-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hdpeli-overlay .hdpeli-actions .hdpeli-btn { height: 44px; }
.hdpeli-overlay .hdpeli-promo { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: none; }
.hdpeli-overlay .hdpeli-promo-pic { aspect-ratio: auto; height: 100%; min-height: 84px; }
.hdpeli-overlay .hdpeli-same { box-shadow: none; background: var(--hdp-bg); border-color: transparent; }
.hdpeli-badge { display: inline-block; font: 600 12px/1 var(--hdp-font-display); color: var(--hdp-okra-dark); background: rgba(244, 186, 108, .22);
  padding: 5px 8px; border-radius: 999px; margin-inline-start: 6px; vertical-align: middle; }

/* ---------- jako (pelkät linkit, ei kolmansien osapuolten skriptejä) ---------- */
.hdpeli-share { grid-column: 1 / -1; display: grid; gap: 10px; min-width: 0; padding: 14px 16px; background: var(--hdp-surface);
  border: 1px solid var(--hdp-line); border-radius: var(--hdp-radius); }
.hdpeli .hdpeli-share-title, .hdpeli-overlay .hdpeli-share-title { margin: 0; font: 600 15px/1.3 var(--hdp-font-display); color: var(--hdp-fg); }
.hdpeli-share-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hdpeli .hdpeli-share-btn, .hdpeli-overlay .hdpeli-share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px; margin: 0; padding: 0 14px;
  border: 1px solid var(--hdp-line); border-radius: 10px; background: var(--hdp-surface); color: var(--hdp-fg);
  font: 600 14px/1 var(--hdp-font-display); text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s;
}
.hdpeli .hdpeli-share-btn:hover, .hdpeli-overlay .hdpeli-share-btn:hover { border-color: var(--hdp-primary); }
.hdpeli-share-btn svg { width: 18px; height: 18px; flex: none; }
.hdpeli-share-btn.is-whatsapp svg { color: #1fa855; }
.hdpeli-share-btn.is-facebook svg { color: #1877f2; }
.hdpeli-share-btn.is-x svg { color: #000000; }
.hdpeli-share-btn.is-telegram svg { color: #229ed9; }
.hdpeli-share-btn.is-email svg, .hdpeli-share-btn.is-copy svg, .hdpeli-share-btn.is-native svg { color: var(--hdp-primary); }
.hdpeli .hdpeli-share-btn.is-done, .hdpeli-overlay .hdpeli-share-btn.is-done { border-color: var(--hdp-primary); color: var(--hdp-primary); }
.hdpeli-share-fallback { display: grid; gap: 4px; font-size: 13px; color: var(--hdp-muted); }
.hdpeli-share-fallback input { font: 14px/1.4 var(--hdp-font-body); padding: 8px 10px; border: 1px solid var(--hdp-line); border-radius: 8px; width: 100%; }
/* Dialogissa: vain kuvakkeet (nimi aria-labelissa ja titlessä), ei kehystä. */
.hdpeli-share.is-compact { padding: 0; border: 0; background: none; gap: 8px; }
.hdpeli-overlay .hdpeli-share.is-compact .hdpeli-share-title { font-size: 13px; color: var(--hdp-muted); letter-spacing: .02em; }
.hdpeli .hdpeli-share.is-compact .hdpeli-share-btn, .hdpeli-overlay .hdpeli-share.is-compact .hdpeli-share-btn { width: 40px; padding: 0; gap: 0; }
.hdpeli-share.is-compact .hdpeli-share-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- pelilista [hdsoft_pelit_lista] (palvelimella renderöity) ---------- */
.hdpeli-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.hdpeli-list.is-hub { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.hdpeli-list li { margin: 0; padding: 0; min-width: 0; }
.hdpeli-list a { display: grid; height: 100%; grid-template-rows: auto 1fr; background: #ffffff; border: 1px solid #d1d2d4; border-radius: 14px; overflow: hidden;
  color: #13212b; text-decoration: none; transition: border-color .15s, transform .15s; }
.hdpeli-list a:hover { border-color: #1684b8; transform: translateY(-1px); }
.hdpeli-list img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #1e5c3d; }
.hdpeli-list-body { padding: 12px 14px 14px; display: grid; gap: 4px; align-content: start; }
.hdpeli-list strong { font: 600 16px/1.3 "Montserrat", "Segoe UI", system-ui, sans-serif; }
.hdpeli-list.is-hub strong { font-size: 18px; }
.hdpeli-list-body > span { font: 400 14px/1.5 "Inter", "Segoe UI", system-ui, sans-serif; color: #58585a; }

/* ---------- leveys ---------- */
@media (min-width: 1100px) {
  .hdpeli { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1099px) {
  .hdpeli-strip { display: block; }
  /* Sama peli puhelimeen on jo mainosrivissä; sivupalkin kaksi muuta mainosta tulevat sen alle. */
  .hdpeli-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdpeli-side .hdpeli-same { display: none; }
}
@media (max-width: 559px) {
  .hdpeli { margin-left: calc(-1 * var(--hdp-bleed-left, 0px)); margin-right: calc(-1 * var(--hdp-bleed-right, 0px)); width: auto; gap: 16px; }
  .hdpeli-bar { padding: 0 max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); gap: 6px; }
  .hdpeli-tools { gap: 6px; }
  .hdpeli .hdpeli-btn { padding: 0 11px; }
  .hdpeli .hdpeli-btn.is-icon { padding: 0; }
  .hdpeli-lbl-long { display: none; }
  .hdpeli-lbl-short { display: inline; }
  .hdpeli-meters { gap: 10px; font-size: 13px; }
  .hdpeli-side { padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .hdpeli > .hdpeli-share { margin: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .hdpeli-share-list { gap: 6px; }
  .hdpeli .hdpeli-share-btn { padding: 0 12px; }
  .hdpeli-strip-in { gap: 10px; margin-top: 0; border-radius: 0; border-width: 0 0 1px;
    padding: 10px max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); }
  .hdpeli-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hdpeli-overlay .hdpeli-promo { grid-template-columns: 92px minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .hdpeli-side { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .hdpeli-dialog { animation: none; }
  .hdpeli .hdpeli-promo, .hdpeli .hdpeli-btn, .hdpeli-list a { transition: none; }
}
