/* Local font files keep result text consistent across both Christmas themes. */
@font-face {
  font-family: 'Christmas Result';
  src: url('/assets/fonts/manrope-regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Christmas Result';
  src: url('/assets/fonts/manrope-bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
/* Festive result cards: decoration never intercepts a game control. */
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .modal-overlay:has(.result-modal:is(.result-modal--lose, .result-modal--win)) {
  background: #031a16b8;
  backdrop-filter: blur(5px);
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .modal:has(.result-modal) {
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  width: min(420px, 100%);
  max-height: calc(100dvh - 32px);
  padding: 24px 22px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #eac986;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 0 0, #b52d454d, transparent 56%),
    radial-gradient(ellipse at 100% 100%, #e6b95320, transparent 58%),
    linear-gradient(155deg, #174d3b, #082c24 60%, #071f1b);
  box-shadow: 0 0 0 4px #e8c77b16, inset 0 1px #fff6d54d, 0 24px 75px #0009;
  scrollbar-width: thin;
  scrollbar-color: #c5a662 #103c2d;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .modal:has(.result-modal)::before {
  content: "";
  display: block;
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 9px;
  border-radius: 26px 26px 0 0;
  background: repeating-linear-gradient(125deg, #fff7e4 0 12px, #bd3045 12px 24px, #fff7e4 24px 30px, #367b54 30px 42px);
  box-shadow: 0 3px 9px #0003;
  pointer-events: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .modal:has(.result-modal)::after {
  content: "";
  position: absolute;
  inset: 12px 0 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    radial-gradient(circle, #fffdf1b3 1.5px, transparent 2px),
    radial-gradient(circle, #fffdf160 1px, transparent 1.8px),
    radial-gradient(circle, #fffdf180 2px, transparent 2.8px);
  background-size: 73px 89px, 43px 67px, 137px 151px;
  background-position: 12px 0, 27px 30px, 60px 45px;
  box-shadow: none;
  animation: christmas-result-snow 14s linear infinite;
  opacity: .65;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal:is(.result-modal--lose, .result-modal--win) {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  text-align: center;
  font-family: 'Christmas Result', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  -webkit-text-size-adjust: 100%;
  --result-icon-snow: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23f2d291%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M12%202v20M3.34%207l17.32%2010M3.34%2017%2020.66%207M9%204l3%203%203-3M9%2020l3-3%203%203M4.5%2010.5l4.1-1.1-1.1-4.1M19.5%2013.5l-4.1%201.1%201.1%204.1M7.5%2018.7l1.1-4.1-4.1-1.1M16.5%205.3l-1.1%204.1%204.1%201.1%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --result-icon-gift: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Crect%20x%3D%224%22%20y%3D%2210%22%20width%3D%2216%22%20height%3D%2211%22%20rx%3D%222%22%20fill%3D%22%23d95367%22%20stroke%3D%22%23ffe1a0%22%20stroke-width%3D%221.4%22%2F%3E%3Crect%20x%3D%222.5%22%20y%3D%227%22%20width%3D%2219%22%20height%3D%225%22%20rx%3D%221.4%22%20fill%3D%22%23bc3b52%22%20stroke%3D%22%23ffe1a0%22%20stroke-width%3D%221.4%22%2F%3E%3Cpath%20d%3D%22M12%207v14M12%207C6%208%204%203%207%202.5%2010%202%2012%207%2012%207Zm0%200c6%201%208-4%205-4.5C14%202%2012%207%2012%207Z%22%20fill%3D%22none%22%20stroke%3D%22%23ffe1a0%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --result-icon-home: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22m3%2011%209-8%209%208M5%2010v11h14V10%22%20fill%3D%22none%22%20stroke%3D%22%23ffe1a0%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%2021v-7h6v7%22%20fill%3D%22%23e6b66b%22%2F%3E%3Cpath%20d%3D%22M16%204v3%22%20fill%3D%22none%22%20stroke%3D%22%23ffe1a0%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --result-icon-tip: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M8%2016c0-2-3-3.2-3-7a7%207%200%201%201%2014%200c0%203.8-3%205-3%207%22%20fill%3D%22%23f5ca6530%22%20stroke%3D%22%23f5d184%22%20stroke-width%3D%221.8%22%2F%3E%3Cpath%20d%3D%22M8%2017h8M9%2020h6M11%2023h2M10%2010l2%202%202-2M12%2012v4%22%20fill%3D%22none%22%20stroke%3D%22%23f5d184%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --result-icon-retry: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4%2010a8%208%200%201%201%20.8%206M4%204v6h6%22%20fill%3D%22none%22%20stroke%3D%22%23fff0c8%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal:is(.result-modal--lose, .result-modal--win)::before {
  content: "MAGIA DE NATAL";
  position: static;
  align-self: center;
  order: -1;
  padding: 7px 34px;
  border: 1px solid #f3d28b66;
  border-radius: 999px;
  color: #ffe8ac;
  background: var(--result-icon-snow) left 12px center / 14px 14px no-repeat,
    var(--result-icon-snow) right 12px center / 14px 14px no-repeat, #07291ee6;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.4;
  animation: none;
  pointer-events: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal:is(.result-modal--lose, .result-modal--win)::after {
  content: "Boas festas!";
  order: 10;
  align-self: center;
  padding: 2px 28px;
  color: #e6d8b3;
  background: var(--result-icon-snow) left center / 16px 16px no-repeat,
    var(--result-icon-gift) right center / 17px 17px no-repeat;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 1.6;
  pointer-events: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--lose .lose-badge,
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .result-win-banner {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  height: clamp(100px, 18dvh, 150px);
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 70%, #eac45d29, transparent 68%);
}
/* Natal V2 renders the original SVG badge. Give its artwork a reserved row
   without changing React's result data, buttons or event handlers. */
html[data-visual-theme="natal-v2"] .result-modal--lose .lose-badge {
  position: relative;
  display: block;
  border: 0;
  animation: none;
}
html[data-visual-theme="natal-v2"] .result-modal--lose .lose-badge svg { display: none; }
html[data-visual-theme="natal-v2"] .result-modal--lose .lose-badge::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  background: url('/images/themes/bubble-natal/santa-lose-3d-v1.png') center / contain no-repeat;
  filter: drop-shadow(0 4px 8px #031f1799);
  pointer-events: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .result-win-banner img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
  margin: 0;
  filter: drop-shadow(0 4px 8px #031f1799);
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .win-note-top {
  margin: 0;
  color: #fff0bf;
  font-family: inherit;
  font-size: clamp(22px, 5.5vw, 26px);
  font-weight: 700;
  line-height: 1.3;
  animation: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .win-note-top::before { content: none; }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--lose h2 { margin: 0; font-family: inherit; font-size: clamp(21px, 5.5vw, 26px); font-weight: 700; line-height: 1.3; letter-spacing: -.025em; text-wrap: balance; text-shadow: 0 2px 6px #031e16; }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--lose .result-value.lose { margin: 0; font-family: inherit; font-size: clamp(36px, 10vw, 46px); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; line-height: 1.2; letter-spacing: -.035em; text-shadow: 0 2px 18px #ff547040; }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .result-value.win {
  margin: 0;
  font-family: inherit;
  font-size: clamp(36px, 10vw, 48px);
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.2;
  letter-spacing: -.035em;
  background: linear-gradient(180deg, #fff4c3, #ffda75 55%, #efb84d);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 9px #f8c44840);
  animation: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .win-note,
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--lose .result-note {
  margin: 0;
  position: relative;
  padding: 13px 15px 13px 44px;
  text-align: left;
  border: 1px solid #e8c67e4d;
  border-radius: 16px;
  color: #fff8e9;
  background: #06281ff2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: normal;
  overflow-wrap: break-word;
  animation: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .win-note::before { content: ""; background-image: var(--result-icon-gift); }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--lose .result-note::before { content: ""; background-image: var(--result-icon-tip); }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal :is(.result-note, .win-note)::before {
  position: absolute;
  top: 15px;
  left: 15px;
  display: block;
  width: 19px;
  height: 19px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal .result-note b {
  color: #ffe29b;
  font-weight: 700;
  white-space: nowrap;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal :is(.result-actions, .win-actions) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 2px 0 0;
  animation: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal :is(.result-actions, .win-actions) .btn {
  width: 100%;
  min-height: 50px;
  padding: 13px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  border-radius: 15px;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal .btn-accent {
  border: 1px solid #ef9b9380;
  background: linear-gradient(180deg, #d84b59, #a0253d);
  color: #fff7e8;
  box-shadow: inset 0 1px #ffe3c94d, 0 4px 0 #601b29, 0 8px 18px #0003;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal.result-modal--win .win-actions .btn-accent {
  border-color: #fff0bc;
  background: linear-gradient(180deg, #ffe9ad, #edc167);
  color: #42290e;
  box-shadow: inset 0 1px #fff8dc, 0 4px 0 #907039, 0 8px 18px #0003;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal .btn-accent::before { content: ""; background-image: var(--result-icon-retry); }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal .btn-ghost::before { content: ""; background-image: var(--result-icon-home); }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .btn-accent::before { background-image: var(--result-icon-gift); }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal .btn::before {
  position: static;
  display: inline-block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal .btn-ghost { border: 1px solid #e8c67e66; background: #082d24e6; color: #fff8e9; }
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal .btn:focus-visible {
  outline: 3px solid #ffe5a2;
  outline-offset: 3px;
}
html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .win-confetti-piece { display: none; }
@keyframes christmas-result-snow {
  to { background-position: 28px 178px, 11px 164px, 78px 196px; }
}
@media (max-height: 700px) {
  html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .modal:has(.result-modal) { padding: 20px 16px 15px; }
  html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal:is(.result-modal--lose, .result-modal--win) { gap: 10px; }
  html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--lose .lose-badge,
  html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .result-modal--win .result-win-banner { height: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  html:is([data-visual-theme="bubble-natal"], [data-visual-theme="natal-v2"]) .modal:has(.result-modal)::after { animation: none; }
}
