/* Prism draw page: clean white cards on the off-white ground. The title
   card sets the prize in a soft well beside its name and its facts, the
   clock in a filled accent panel; the ticket machine and the prize list
   are white cards; the draw itself turns in a clear glass sphere, a thin
   ring of the spectrum round it, each drawn ball dropping down a glass
   chute into its slot, then the numbers set on a row of white tiles.
   Builds on the plugin's own page styles. */
@import url("../../../views/detail.css");
@import url("../_balls.css");

.lot-page { background: transparent !important; }

/* ── The title card ── */
.psm-tc .lottery-hero-frame {
  position: relative; overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.psm-tc .lottery-hero-frame::before { content: ''; position: absolute; z-index: 0; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; pointer-events: none; background: radial-gradient(closest-side, var(--psm-accent-soft), transparent); }
.psm-tc .lottery-hero-frame::after { display: none; }
/* The prize in a soft well, a small prism in the state's colour at its corner */
.psm-tc .lh-media {
  position: relative; z-index: 1;
  border-radius: calc(var(--radius) - 6px); margin: .75rem; overflow: hidden; padding: 0;
  background: radial-gradient(70% 60% at 50% 40%, var(--psm-accent-soft), transparent 70%), var(--paper-3);
}
.psm-tc__square {
  position: absolute; z-index: 3; top: 14px; inset-inline-start: 14px; width: 18px; height: 18px; pointer-events: none;
  background: var(--psm-live);
  -webkit-mask: var(--psm-prism-solid) center / contain no-repeat; mask: var(--psm-prism-solid) center / contain no-repeat;
}
.psm-tc[data-state="upcoming"] .psm-tc__square { background: var(--psm-accent); }
.psm-tc[data-state="ended"] .psm-tc__square { background: var(--psm-good); }
.psm-tc .lh-media img { position: relative; z-index: 1; border-radius: inherit; }
/* A broken picture is removed (data-px-img="remove"): its well goes and
   the card runs full width, as with no picture at all */
.psm-tc .lh-media:not(:has(img)) { display: none; }
@media (min-width: 768px) { .psm-tc .lh-frame.lh-has-image:not(:has(.lh-media img)) { grid-template-columns: minmax(0, 1fr); } }
.psm-tc .lh-body { position: relative; z-index: 1; padding-bottom: 1.6rem; }
.psm-tc .lh-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; }
.psm-tc .lh-chip, .psm-tc .lh-chip-soft {
  padding: .26rem .75rem; border: 0; border-radius: 999px;
  font: 600 12px/1.3 var(--font-ui); letter-spacing: .02em;
  color: var(--ink-2); background: var(--paper-3);
}
.psm-tc .lh-title {
  margin-top: .7rem;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1.02;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  color: var(--ink); background: none; -webkit-text-fill-color: currentColor;
  overflow-wrap: normal; word-break: normal; hyphens: manual; text-wrap: balance;
}
html:is(:lang(ar), :lang(ur), :lang(bn), :lang(zh)) .psm-tc .lh-title { letter-spacing: 0; line-height: 1.25; }
.psm-tc .lh-desc { color: var(--ink-soft); }
/* Facts on small pale wells */
.psm-tc .lh-facts { gap: .55rem; }
.psm-tc .lh-fact { position: relative; background: var(--paper-3); border: 0; border-radius: var(--radius-md); box-shadow: none; }
.psm-tc .lh-fact-label { color: var(--ink-soft); font-family: var(--font-ui); font-weight: 500; letter-spacing: .02em; }
.psm-tc .lh-fact-value { font-family: var(--font-num); font-weight: 600; font-size: 1.2rem; letter-spacing: -.01em; color: var(--ink); overflow-wrap: normal; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: .35rem; }
/* The clock in a filled accent panel */
.psm-tc .lh-fact-countdown { background: var(--psm-accent); box-shadow: 0 10px 24px -12px var(--psm-accent-glow); }
.psm-tc .lh-fact-countdown .lh-fact-label { color: var(--psm-on-accent); opacity: .85; }
.psm-tc .lh-fact-countdown .lh-fact-value { color: var(--psm-on-accent); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.psm-tc .lh-fact-countdown.psm-final { background: var(--psm-bad); }
html.dark .psm-tc .lh-fact-countdown.psm-final .lh-fact-value, html.dark .psm-tc .lh-fact-countdown.psm-final .lh-fact-label { color: #0d0f17; }
.psm-tc .psm-coin { width: 1.2rem; height: 1.2rem; }
.psm-tc .lh-foot { gap: .5rem .7rem; }
.psm-tc .lh-foot .lh-progress { flex: 1 1 8rem; }
@media (max-width: 639px) { .psm-tc .lh-foot > .lh-when:first-child { flex-basis: 100%; } }
.psm-tc .lh-when { color: var(--ink-soft); font-family: var(--font-ui); font-weight: 500; font-size: 12.5px; }
/* Sold share: a slim rounded bar filling with the accent */
.psm-tc .lh-progress { position: relative; height: 8px; border-radius: 999px; overflow: hidden; background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--rule); }
.psm-tc .lh-progress span { border-radius: inherit; background: linear-gradient(90deg, var(--theme-400), var(--psm-accent)); }

/* ── The ticket machine ── */
.lot-page .ticket-machine-shell { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.lot-page .ticket-machine-shell::before { display: none; }
.lot-page .ticket-machine-frame { background: transparent; }
.lot-page .status-chip {
  border: 0; border-radius: 999px; background: var(--psm-accent-soft); color: var(--psm-accent-text);
  padding: .26rem .75rem; font-family: var(--font-ui); font-weight: 600; letter-spacing: .02em;
  box-shadow: none;
}
.lot-page .status-chip > span:last-child { white-space: normal; overflow: visible; text-overflow: clip; }
/* The state as a small dot in its colour */
.psm-status-button { width: 8px; height: 8px; flex-shrink: 0; border-radius: 999px; background: var(--psm-accent); }
.psm-status-button--live { background: var(--psm-live); box-shadow: 0 0 0 3px rgba(229, 72, 77, .2); }
.psm-status-button--upcoming { background: var(--psm-accent); }
.psm-status-button--ended { background: var(--psm-good); }
.lot-page .ticket-machine-frame h2.font-display { font-family: var(--font-display); font-weight: 700 !important; letter-spacing: -.01em; }
.lot-page .meta-pill { border-radius: 999px; border: 0; background: var(--paper-3); color: var(--ink); font-weight: 600; box-shadow: none; transition: box-shadow .2s ease, transform .15s ease; }
.lot-page button.meta-pill:hover { box-shadow: inset 0 0 0 1px var(--psm-accent-line); }
.lot-page button.meta-pill:active { transform: scale(.97); }
.lot-page #ticketBadge { background: var(--psm-accent) !important; color: var(--psm-on-accent) !important; box-shadow: none !important; }
/* The tray under the numbers: a pale well with a slot for each */
.psm-tm-rack { background: var(--paper-3) !important; border: 1px solid var(--rule) !important; border-radius: var(--radius-md) !important; box-shadow: none; }
.psm-tm-note { background: var(--psm-accent-soft) !important; border: 0 !important; border-radius: 999px !important; box-shadow: none; }
.psm-tm-note span { color: var(--psm-accent-text) !important; }

/* ── State panels beside the machine ── */
.lot-page .state-card { position: relative; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.lot-page .state-card::before { display: none; }
.lot-page #desktopPurchaseSection h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.psm-state-label { display: flex; justify-content: center; }
.psm-state-art { width: 150px; margin: 0 auto; }
.psm-state-art svg { display: block; width: 100%; height: auto; }
.psm-stamp--done { color: var(--psm-good); }
/* Waiting for the result: the timer turning on a white card */
.psm-standby { background: var(--paper-2) !important; }
.psm-standby__set { display: flex; justify-content: center; }
.psm-standby__timer { width: 40px; color: var(--psm-accent); }
.psm-standby__svg { display: block; width: 100%; height: auto; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .psm-standby__svg { animation: psm-turn 3.2s cubic-bezier(.6, 0, .3, 1) infinite; }
}
@keyframes psm-turn { 0%, 70% { transform: none; } 100% { transform: rotate(180deg); } }
/* Drawn: the winning balls, then the same numbers on small tiles */
.psm-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; justify-items: center; }
.psm-result__rack { width: fit-content !important; max-width: 100%; padding: 8px 14px; border-radius: 999px; background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--rule); }
.psm-result__card, .psm-draw__stand { position: relative; display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px; padding: 0; max-width: 100%; }
.psm-result__cell, .psm-cell {
  position: relative; display: grid; place-items: center; min-width: 2.3rem; height: 2.6rem; padding: 0 .35rem;
  font: 600 1.15rem/1 var(--font-num); font-variant-numeric: tabular-nums; color: var(--ink);
  border-radius: var(--radius-sm); background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--rule), 0 2px 6px -3px rgba(16, 18, 28, .15);
}
/* Each tile's colour as a thin bar along its foot */
.psm-result__cell::before, .psm-cell::before { content: ''; position: absolute; left: 25%; right: 25%; bottom: 5px; height: 3px; border-radius: 3px; background: var(--px-ball-1); }
.psm-result__cell:nth-child(6n+2)::before, .psm-cell:nth-child(6n+2)::before { background: var(--px-ball-2); }
.psm-result__cell:nth-child(6n+3)::before, .psm-cell:nth-child(6n+3)::before { background: var(--px-ball-3); }
.psm-result__cell:nth-child(6n+4)::before, .psm-cell:nth-child(6n+4)::before { background: var(--px-ball-4); }
.psm-result__cell:nth-child(6n+5)::before, .psm-cell:nth-child(6n+5)::before { background: var(--px-ball-5); }
.psm-result__cell:nth-child(6n+6)::before, .psm-cell:nth-child(6n+6)::before { background: var(--px-ball-6); }
@media (prefers-reduced-motion: no-preference) {
  .psm-result__cell { animation: psm-tick .35s ease-out both; animation-delay: calc(.2s + var(--i) * .1s); }
}

/* Winners: each on a white card, the place on a round accent badge */
.lot-page .sw-section-header, .psm-draw .sw-section-header { background: transparent; border: 0; border-radius: 0; padding: 0; }
.lot-page .sw-section-label, .psm-draw .sw-section-label { color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.lot-page .sw-winner-card, .psm-draw .sw-winner-card {
  position: relative; overflow: hidden;
  background: var(--paper-2) !important; border: 1px solid var(--rule) !important; border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow) !important;
  color: var(--ink);
}
.lot-page .sw-winner-card::before, .psm-draw .sw-winner-card::before { content: ''; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 3px; background: var(--psm-accent-line); }
.lot-page .sw-winner-card.rank-gold::before, .psm-draw .sw-winner-card.rank-gold::before { background: var(--psm-accent); }
.lot-page .sw-winner-name, .psm-draw .sw-winner-name { color: var(--ink) !important; font-family: var(--font-ui); font-weight: 600; }
.lot-page .sw-prize-pill, .psm-draw .sw-prize-pill { background: var(--psm-accent-soft) !important; color: var(--psm-accent-text) !important; border: 0 !important; border-radius: 999px !important; }
.lot-page .sw-place, .pl-place.psm-pl-place, .psm-steptile {
  --c: var(--psm-accent); --t: var(--psm-on-accent);
  display: grid; place-items: center; flex-shrink: 0; border-radius: 999px;
  background: var(--c); color: var(--t); box-shadow: none;
}
.lot-page .sw-place { width: 1.95rem; height: 1.95rem; font: 600 .85rem/1 var(--font-num); }
.lot-page .rank-silver .sw-place, .lot-page .rank-bronze .sw-place { --c: var(--psm-accent-soft); --t: var(--psm-accent-text); }
.psm-draw .sw-rank-badge { background: var(--psm-accent-soft) !important; color: var(--psm-accent-text) !important; border: 0 !important; border-radius: 999px !important; font-family: var(--font-num); font-weight: 600; }
.psm-draw .rank-gold .sw-rank-badge { background: var(--psm-accent) !important; color: var(--psm-on-accent) !important; }
.lot-page .sw-avatar-initials, .psm-draw .sw-avatar-initials { background: var(--psm-accent-soft) !important; color: var(--psm-accent-text) !important; }
.lot-page .sw-match-num b { color: var(--psm-accent-text); font-family: var(--font-num); font-weight: 600; font-size: 1.1em; }
.psm-draw .sw-balls-label { color: var(--ink-soft) !important; }
.lot-page .sw-show-more-btn, .psm-draw .sw-show-more-btn { border-radius: 999px; border: 1px solid var(--rule); background: var(--paper-2); color: var(--ink); font-weight: 600; box-shadow: none; }
.lot-page .sw-show-more-btn:hover, .psm-draw .sw-show-more-btn:hover { border-color: var(--psm-accent-line); color: var(--psm-accent-text); }

/* ── The prize list ── */
.lot-page .pl-card { position: relative; overflow: hidden; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.lot-page .pl-card::before { display: none; }
.lot-page .pl-head { position: relative; }
.pl-head-icon.psm-pl-finish { width: 64px; height: auto; border: 0; background: none; }
.psm-pl-finish__art { display: block; width: 100%; height: auto; }
.lot-page .pl-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.lot-page .pl-row { background: transparent; border: 0; border-bottom: 1px solid var(--rule-soft); border-radius: 0; transition: background .2s ease; }
.lot-page .pl-row:hover { background: var(--paper-3); }
.lot-page .pl-row-top { background: linear-gradient(90deg, var(--psm-accent-soft), transparent 75%) !important; }
[dir="rtl"] .lot-page .pl-row-top { background: linear-gradient(270deg, var(--psm-accent-soft), transparent 75%) !important; }
.pl-place.psm-pl-place { width: 2.1rem; height: 2.1rem; }
.pl-place.psm-pl-place > span { font: 600 .9rem/1 var(--font-num); }
.pl-place.psm-pl-place--2, .pl-place.psm-pl-place--3 { --c: var(--psm-accent-soft); --t: var(--psm-accent-text); }
.pl-place.psm-pl-place:not(.psm-pl-place--1):not(.psm-pl-place--2):not(.psm-pl-place--3) { --c: var(--paper-3); --t: var(--ink-2); }
.lot-page .pl-name { font-weight: 600; color: var(--ink); }
.lot-page .pl-match { color: var(--ink-soft); }
/* What it takes: a row of dots, as many filled as numbers to match */
.psm-pl-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: .35rem; }
.psm-pl-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--rule); }
.psm-pl-dots i.is-on { background: var(--psm-accent); }
.lot-page .pl-value { font-family: var(--font-num); font-weight: 600; font-size: 1.05rem; color: var(--ink); overflow-wrap: normal; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── How it works ── */
.psm-howto { position: relative; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius) !important; box-shadow: var(--shadow); }
.psm-howto::before { display: none; }
.psm-howto__steps { list-style: none; margin: 0; padding: .4rem .6rem .8rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; }
.psm-howto__step { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem; }
.psm-steptile { width: 32px; height: 32px; }
.psm-steptile > span { font: 600 .9rem/1 var(--font-num); }
.psm-steptile[data-b="2"], .psm-steptile[data-b="3"] { --c: var(--psm-accent-soft); --t: var(--psm-accent-text); }
.psm-howto__title { display: block; font-weight: 600; font-size: .9rem; line-height: 1.25; color: var(--ink); }
.psm-howto__desc { display: block; margin-top: .2rem; font-size: .8rem; line-height: 1.45; color: var(--ink-soft); }

/* ── Login gate: a white card over a frosted page ── */
.lot-page .lg-veil { background: color-mix(in srgb, var(--paper) 70%, transparent); backdrop-filter: blur(8px); }
.lot-page .lg-card { position: relative; overflow: hidden; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.lot-page .lg-card::before { display: none; }
.lot-page .lg-icon.psm-lg-start { width: 88px; height: auto; margin: .4rem 0 .5rem; border: 0; border-radius: 0; background: none; box-shadow: none; }
.psm-lg-start__art { display: block; width: 100%; height: auto; }
.lot-page .lg-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.lot-page .lg-btn { border-radius: 999px; }
.lot-page .lg-btn-primary { background: var(--btn-face), var(--btn-bg); color: var(--btn-ink); box-shadow: var(--btn-shadow); }
.lot-page .lg-btn-ghost { background: var(--paper-2); color: var(--ink); border: 1px solid var(--rule); box-shadow: none; }

/* Mobile buy bar: frosted glass */
#mobilePurchaseNav { background: var(--psm-glass) !important; -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 -10px 30px -18px rgba(16, 18, 28, .35) !important; border-top: 1px solid var(--rule) !important; }
#mobilePurchaseNav .draw-button { border-radius: 999px !important; font-family: var(--font-ui); font-weight: 600; box-shadow: inset 0 0 0 1px var(--rule) !important; border: 0 !important; }

/* Picked tickets: rows of smooth balls in the spectrum */
.lot-page .ticket-preview-ball { border: 0 !important; box-shadow: 0 2px 6px -2px rgba(16, 18, 28, .35), inset 0 1px 0 rgba(255, 255, 255, .3) !important; }
.lot-page .ticket-preview-ball > div:first-child:not(:last-child) { display: none; }
.lot-page .ticket-preview-ball.from-yellow-300 { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%), var(--px-ball-3) !important; }
.lot-page .ticket-preview-ball.from-blue-400 { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%), var(--px-ball-5) !important; }
.lot-page .ticket-preview-ball.from-pink-400 { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%), var(--px-ball-1) !important; }
.lot-page .ticket-preview-ball.from-green-400 { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%), var(--px-ball-4) !important; }
.lot-page .ticket-preview-ball.from-orange-400 { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%), var(--px-ball-2) !important; }
.lot-page .ticket-preview-ball.from-gray-400, .lot-page .ticket-preview-ball.from-yellow-400 { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%), var(--px-ball-6) !important; }
.lot-page .ticket-preview-ball > div:last-child { font-family: var(--font-num); font-weight: 600; border: 0 !important; color: #ffffff !important; background: transparent !important; }

/* ── The draw: a clear glass sphere ── */
.psm-draw {
  background: radial-gradient(900px 600px at 50% -160px, var(--psm-accent-soft), transparent 70%), var(--paper) !important;
  color: var(--ink);
}
.psm-draw::before { display: none; }
.psm-draw .draw-overlay-content { position: relative; z-index: 1; }
.psm-draw__live { display: inline-flex; align-items: center; gap: .6rem; }
.psm-draw__title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(2rem, 5.4vw, 3rem); line-height: 1.04; color: var(--ink); overflow-wrap: normal; text-wrap: balance; }
html:is(:lang(ar), :lang(ur), :lang(bn), :lang(zh)) .psm-draw__title { letter-spacing: 0; line-height: 1.25; }
.psm-draw__sub { font-size: .95rem; color: var(--ink-soft); }
/* The hopper on top: a small glass prism */
.psm-draw__machine { width: 250px; }
.psm-draw__neck { position: relative; z-index: 2; display: block; width: 46px; height: 30px; margin: 0 auto -6px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: linear-gradient(160deg, rgba(255, 255, 255, .9), var(--theme-200) 45%, var(--theme-400)); }
html.dark .psm-draw__neck { background: linear-gradient(160deg, rgba(255, 255, 255, .5), var(--theme-300) 45%, var(--theme-600)); }
.psm-draw__lid { display: none; }
/* The sphere, seen whole: a thin spectrum ring round clear glass */
.psm-draw__bowl { width: 230px; height: 230px; overflow: hidden; border-radius: 50%; padding: 3px; background: conic-gradient(from 200deg, var(--px-ball-1), var(--px-ball-2), var(--px-ball-3), var(--px-ball-4), var(--px-ball-5), var(--px-ball-6), var(--px-ball-1)); box-shadow: 0 24px 50px -24px rgba(var(--psm-accent-rgb), .55); }
.psm-draw__felt {
  position: absolute; inset: 4px; border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 38%), radial-gradient(circle at 50% 60%, var(--paper-2), color-mix(in srgb, var(--theme-100) 60%, var(--paper-2)) 88%);
  box-shadow: inset 0 -10px 24px rgba(var(--psm-accent-rgb), .14), inset 0 6px 14px rgba(255, 255, 255, .6);
  opacity: .97; transition: opacity .6s ease;
}
html.dark .psm-draw__felt { background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 38%), radial-gradient(circle at 50% 60%, #1b1f2e, #10131d 88%); box-shadow: inset 0 -10px 24px rgba(var(--psm-accent-rgb), .2); }
.psm-draw--on .psm-draw__felt { opacity: 1; }
#drawTumblingBalls { inset: 14px !important; border-radius: 50%; overflow: hidden; }
#drumCageSVG { stroke: var(--psm-accent); opacity: .55 !important; }
/* A highlight across the glass, over the balls */
.psm-draw__rim { position: absolute; inset: 4px; border-radius: 50%; pointer-events: none; background: radial-gradient(60% 26% at 40% 14%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%); }
html.dark .psm-draw__rim { background: radial-gradient(60% 26% at 40% 14%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%); }
/* The glass chute under the sphere and the slim stand it rests on */
.psm-draw__foot { position: relative; height: 44px; margin-top: -14px; display: flex; flex-direction: column; align-items: center; }
.psm-draw__stem { position: relative; z-index: 2; width: 20px; height: 26px; border-radius: 0 0 8px 8px; background: linear-gradient(90deg, var(--theme-200), rgba(255, 255, 255, .9) 45%, var(--theme-300)); box-shadow: inset 0 0 0 1px rgba(var(--psm-accent-rgb), .25); }
html.dark .psm-draw__stem { background: linear-gradient(90deg, var(--theme-700), rgba(255, 255, 255, .25) 45%, var(--theme-600)); }
.psm-draw__base { width: 170px; height: 8px; margin-top: 6px; border-radius: 999px; background: var(--ink); opacity: .12; }
.psm-draw__label { font: 600 12px/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
html:is(:lang(ar), :lang(ur), :lang(bn), :lang(zh), :lang(ru), :lang(el)) .psm-draw__label { letter-spacing: 0; text-transform: none; font-size: 13px; }
/* The tray: a pale rounded well with a slot for every number */
.psm-draw__rack { border-radius: 999px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); }
.psm-draw__rack:empty { display: none; }
.psm-spot { border-radius: 50%; background: var(--paper-3); box-shadow: inset 0 2px 4px rgba(16, 18, 28, .12); }
.psm-spot.is-filled { background: none; box-shadow: none; }
/* A drawn ball: a smooth sphere in its colour, the figure in white */
.psm-disc { position: relative; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 42%), var(--c, var(--px-ball-5)); box-shadow: 0 4px 10px -4px rgba(16, 18, 28, .45); }
.psm-disc > span { font-family: var(--font-num); font-weight: 600; font-variant-numeric: tabular-nums; color: #ffffff; }
/* The row of white tiles the numbers are set on */
.psm-cell { color: color-mix(in srgb, var(--ink) 25%, transparent); }
.psm-cell.is-set { color: var(--ink); animation: psm-tick .35s ease-out; }
/* While it waits: a slim bar filling */
.psm-draw__meter { position: relative; height: 8px; border-radius: 999px; overflow: hidden; background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--rule); }
#drawSuspenseBar { background: linear-gradient(90deg, var(--theme-300), var(--psm-accent)); border-radius: 999px; }
.psm-draw__meter-label { font: 500 12px/1.3 var(--font-ui); letter-spacing: .04em; color: var(--ink-soft); }
/* Small prisms lighting in turn */
.psm-draw__dot { width: 10px; height: 10px; background: var(--px-ball-1); -webkit-mask: var(--psm-prism-solid) center / contain no-repeat; mask: var(--psm-prism-solid) center / contain no-repeat; }
.psm-draw__dot:nth-child(5n+2) { background: var(--px-ball-3); }
.psm-draw__dot:nth-child(5n+3) { background: var(--px-ball-4); }
.psm-draw__dot:nth-child(5n+4) { background: var(--px-ball-5); }
.psm-draw__dot:nth-child(5n+5) { background: var(--px-ball-6); }
.psm-draw__note { border-radius: var(--radius-md); background: var(--paper-2); border: 1px solid var(--rule); box-shadow: var(--shadow); color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  #drumCageSVG { animation: none !important; }
  [id^="tmbl-"] { animation: none !important; }
  .psm-cell.is-set { animation: none; }
  .psm-draw__dot { animation: none !important; }
}
@media (max-width: 479px) {
  .psm-draw__machine { width: 210px; }
  .psm-draw__bowl { width: 190px; height: 190px; }
  .psm-draw__base { width: 130px; }
}

/* Phones: seven numbers stay on one row */
@media (max-width: 479px) {
  .psm-result__rack { padding: 6px 8px; }
  .psm-result__cell, .psm-cell { min-width: 1.95rem; height: 2.3rem; font-size: 1.05rem; padding: 0 .2rem; }
}

/* After the draw the sphere steps back (.psm-draw--done, set when the
   result shows) so the heading, the numbers and the first winners fit the
   screen together */
#drawMachineWrap { transform-origin: 50% 0; transition: transform .6s cubic-bezier(.3, .8, .3, 1), margin .6s cubic-bezier(.3, .8, .3, 1); }
.psm-draw--done #drawMachineWrap { transform: scale(.5); margin-bottom: -150px; }
.psm-draw--done .psm-draw__sub { margin-bottom: 1rem; }
.psm-draw--done .psm-draw__live { margin-bottom: .75rem; }
@media (max-width: 479px) {
  .psm-draw--done #drawMachineWrap { margin-bottom: -130px; }
}
@media (max-height: 760px) {
  .psm-draw--done #drawMachineWrap { transform: scale(.4); margin-bottom: -180px; }
}
@media (prefers-reduced-motion: reduce) { #drawMachineWrap { transition: none; } }
