/* Keep the supplied game isolated from the shop's Bootstrap styles. */
:root {
  --bg: #161819;
  --panel: #202323;
  --panel-2: #303434;
  --line: #515959;
  --muted: #b2bcbc;
  --navy: #202323;
  --slate: #393d3d;
}
body { background: var(--bg); }
a { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
[hidden] { display: none !important; }
.publisher-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px max(14px, env(safe-area-inset-left));
  background: #fff;
  color: #1b1c1e;
}
.publisher-brand { display: flex; align-items: center; gap: 9px; font-weight: 900; text-decoration: none; }
.publisher-brand span { display: grid; place-items: center; width: 32px; height: 32px; background: #e90060; color: #fff; border-radius: 6px; font-size: 14px; }
.publisher-links { display: flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 8px 16px; }
.publisher-links > * { max-width: 100%; overflow-wrap: anywhere; }
.publisher-links a, .publisher-links button { padding: 8px 0; font-size: 14px; font-weight: 700; text-decoration: none; }
.publisher-links button { background: transparent; color: #ca0053; cursor: pointer; }
.publisher-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; padding: 20px 14px calc(110px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
.app { min-height: 65vh; padding-bottom: 16px; }
.topbar { background: #161819f5; }
.brand { padding: 0; background: none; border-radius: 0; box-shadow: none; gap: 10px; }
.brand > div:last-child { min-width: 0; }
.logo { width: 44px; height: 44px; border-radius: 50%; background: #060808; border: 2px solid #fff; box-shadow: none; }
.logo span { display: grid; place-items: center; background: #fff; color: #111; width: 24px; height: 24px; border-radius: 50%; font-size: 16px; }
h1 { white-space: normal; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; }
.section { padding: 16px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.section-head { flex-wrap: wrap; }
.section-head > * { min-width: 0; max-width: 100%; }
.pill { white-space: normal; text-align: center; }
.btn, .input, .select, .player-row, .history-row, .ranking-row, .switch-line, .stat, .action-btn { border-radius: 8px; }
.btn.primary { background: #28dd85; box-shadow: none; }
.input, .select { min-width: 0; background: #1c2020; }
.player-row, .history-row, .ranking-row, .switch-line { background: var(--panel); }
.player-row { flex-direction: column; gap: 14px; }
.player-main, .player-title { width: 100%; }
.player-name { font-size: 1.15rem; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.player-actions { position: static; display: flex; justify-content: center; flex-wrap: wrap; width: 100%; }
.player-actions .btn { flex-basis: 100%; font-size: 14px; padding: 8px; }
.mini-action { width: 38px; height: 38px; border-radius: 6px; }
.current-card { background: #202323; border-radius: 8px; box-shadow: none; }
.current-name { font-size: 3.5rem; line-height: 1.1; }
.current-title .hearts { font-size: 2.5rem; max-width: 100%; }
.elimination-box h2 { font-size: 2.5rem; }
.current-title { min-width: 0; }
.bottom-actions { padding-bottom: max(14px, env(safe-area-inset-bottom)); background: #161819f5; }
.order-item, .history-row > div, .ranking-row > div { min-width: 0; overflow-wrap: anywhere; }
.order-item::before { flex-shrink: 0; }
.stat { background: #151818; }
.performance-track { background: #0b1010; }
.share-dialog { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; width: min(480px, calc(100% - 28px)); max-height: 90dvh; overflow: auto; }
.share-dialog::backdrop { background: #000b; }
.share-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.share-dialog label { display: block; margin-bottom: 8px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.share-actions .btn { flex: 1; text-decoration: none; }
.share-dialog [role=status] { min-height: 24px; color: var(--muted); }
.storage-warning, .game-noscript { padding: 14px; border-left: 3px solid var(--warning); margin-bottom: 16px; }
.game-consent { max-width: 820px; margin: 0 auto; padding: 20px 14px; border-bottom: 1px solid var(--line); }
.game-consent p { margin: 10px 0; line-height: 1.5; }
.game-consent [role=status]:empty { display: none; }
.publisher-footer button { background: none; color: inherit; text-decoration: underline; padding: 0; cursor: pointer; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result-actions > * { min-width: 0; flex: 1 1 150px; text-decoration: none; overflow-wrap: anywhere; }
.saved-result { padding: 16px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 14px; overflow-wrap: anywhere; }
.saved-result h3 { font-size: 1rem; }
.result-ranking { padding-left: 24px; margin: 0; }
.result-ranking li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.result-ranking strong { display: block; overflow-wrap: anywhere; }
.result-ranking span { color: var(--muted); font-size: 14px; }
.result-dialog { width: min(640px, calc(100% - 28px)); }
.result-image { display: block; width: 100%; height: auto; border: 1px solid var(--line); margin: 12px 0; }
.result-dialog textarea { resize: vertical; display: block; margin-bottom: 16px; font: inherit; line-height: 1.5; }
.result-dialog .result-actions { margin-bottom: 12px; }
.result-qr { display: block; width: 296px; max-width: 100%; height: auto; aspect-ratio: 1; margin: 16px auto; background: #fff; }
.result-dialog [data-result-copy-link] { margin: 12px 0; }
.public-result { max-width: 820px; margin: 0 auto; padding: 24px 16px; }
.public-result h1 { font-size: 2rem; }
.public-result p { line-height: 1.5; }
.public-result .section { margin-top: 20px; }
.public-result-link { overflow-wrap: anywhere; display: block; margin: 16px 0; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.profile-tabs label { display: flex; align-items: center; gap: 6px; }
.profile-form, [data-profile-active] { display: grid; gap: 14px; margin-bottom: 16px; }
.profile-form label { margin: 0; }
.profile-form label span { display: block; margin-bottom: 6px; }
.profile-form .input { width: 100%; }
.profile-notice { padding: 12px; border: 1px solid #f59e0b; border-radius: 8px; background: #2a2112; color: #fde68a; line-height: 1.4; }
.profile-pin-form, .profile-reset { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #181b1b; }
.profile-reset summary { cursor: pointer; font-weight: 800; }
.profile-reset .profile-form { margin: 14px 0 0; }
.check-label strong { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.check-card input { flex: 0 0 22px; }
.nickname-form { margin: 16px 0; }
.player-statistics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 24px 0; }
.player-statistics dt { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.player-statistics dd { margin: 6px 0 0; font-size: 1.75rem; font-weight: 800; }
.player-games { list-style: none; padding: 0; }
.player-games a { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.player-games a strong { flex-basis: 100%; }
.ranking-row { flex-wrap: wrap; }
.ranking-row > div:first-child { flex: 1 1 180px; }
.ranking-row .delta { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .publisher-bar { gap: 4px 10px; }
  .publisher-brand { font-size: 14px; }
  .publisher-links { gap: 12px; }
  .publisher-links a, .publisher-links button { font-size: 13px; }
  .topbar { gap: 8px; }
  .brand { gap: 6px; }
  .brand .logo { display: none; }
  .toolbar { gap: 5px; }
  .toolbar .select { padding-inline: 6px; }
  .current-name { font-size: 2.75rem; }
  .grid.two { grid-template-columns: minmax(0, 1fr); }
  .check-card { padding: 8px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
