/* V5.20 — consistent lottery disclosure controls. Native details behavior preserved. */
@media screen {
html body[data-game] #mainContent#mainContent {
 --ll520-chip:#eaf5fa;--ll520-border:#c7dce8;--ll520-ink:#173b52;
 --ll520-caption:#496779;--ll520-surface:linear-gradient(110deg,#eaf4f8,#fbfdfe);
 --ll520-down:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2320688c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");--ll520-up:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2320688c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
}
html[data-theme="dark"] body[data-game] #mainContent#mainContent {
 --ll520-chip:#203c4e;--ll520-border:#36576c;--ll520-ink:#e8f6ff;
 --ll520-caption:#bad1df;--ll520-surface:linear-gradient(110deg,#203545,#172b39);
 --ll520-down:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bce9fc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");--ll520-up:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bce9fc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details) > summary {box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;list-style:none!important;cursor:pointer!important;position:relative!important;text-align:start!important;transform:none!important;rotate:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details) > summary::marker {content:""!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details) > summary::-webkit-details-marker {display:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details) > summary::before {content:none!important;display:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details) > summary > .lo-tool-toggle {display:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details) > summary::after {content:""!important;display:block!important;box-sizing:border-box!important;position:static!important;inset:auto!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;max-width:36px!important;flex:0 0 36px!important;align-self:center!important;margin:0 0 0 auto!important;padding:0!important;border:1px solid var(--ll520-border)!important;border-radius:11px!important;background:var(--ll520-chip) var(--ll520-down) center / 16px 16px no-repeat!important;mask:none!important;-webkit-mask:none!important;opacity:1!important;transform:none!important;rotate:none!important;transition:none!important;box-shadow:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details)[open] > summary::after {background-image:var(--ll520-up)!important;transform:none!important;rotate:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details) > summary:focus-visible {outline:2px solid #238ab4!important;outline-offset:-3px!important;}
/* Equal card shells and header heights, independent of whether a neighbour opens. */
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule) {box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:none!important;align-self:start!important;height:auto!important;min-height:0!important;padding:0!important;margin:0!important;display:block!important;border:1px solid var(--ll520-border)!important;border-radius:17px!important;overflow:visible!important;background:var(--ll520-surface)!important;box-shadow:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule) > summary {box-sizing:border-box!important;width:100%!important;min-height:72px!important;padding:14px 18px!important;margin:0!important;border:0!important;border-radius:16px!important;background:transparent!important;color:var(--ll520-ink)!important;box-shadow:none!important;font-size:13px!important;font-weight:800!important;line-height:1.4!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule)[open] > summary {border-radius:16px 16px 0 0!important;border-bottom:1px solid var(--ll520-border)!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide) > summary .lo-mini-summary-text {display:flex!important;flex:1 1 auto!important;min-width:0!important;flex-direction:column!important;align-items:flex-start!important;gap:4px!important;transform:none!important;rotate:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide) > summary .lo-mini-summary-text strong {color:var(--ll520-ink)!important;font-size:14px!important;line-height:1.4!important;font-weight:800!important;transform:none!important;rotate:none!important;}
html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide) > summary .lo-mini-summary-text small {color:var(--ll520-caption)!important;font-size:12px!important;line-height:1.4!important;font-weight:500!important;transform:none!important;rotate:none!important;}
html body[data-game] #mainContent#mainContent :is(#gameRuleSource,#draw-schedule)[open] > :not(summary) {margin-inline:18px!important;max-width:calc(100% - 36px)!important;}
html body[data-game] #mainContent#mainContent :is(#gameRuleSource,#draw-schedule)[open] > :last-child {margin-bottom:18px!important;}
html body[data-game] #mainContent#mainContent details.atlas-more-actions > .action-cluster {padding:14px 18px!important;}
html body[data-game] #mainContent#mainContent :is(#historyTools,#checkTools) > summary .lo-tool-copy {flex:1 1 auto!important;min-width:0!important;}
/* Only known pair containers; never rearrange the main workspace or advert slots. */
html body[data-game] #mainContent#mainContent .orbit-game-info-pair,
html body[data-game] #mainContent#mainContent :is(div,section):not(#mainContent):has(> details.atlas-more-actions):has(> details.panel.guide) {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;gap:14px!important;}
@media(max-width:767px) {
 html body[data-game] #mainContent#mainContent .orbit-game-info-pair,
 html body[data-game] #mainContent#mainContent :is(div,section):not(#mainContent):has(> details.atlas-more-actions):has(> details.panel.guide) {grid-template-columns:minmax(0,1fr)!important;gap:12px!important;}
 html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule) > summary {padding:12px 14px!important;min-height:68px!important;}
 html body[data-game] #mainContent#mainContent :is(#ll-accordion-specificity,details.atlas-more-actions,details.panel.guide,#gameRuleSource,#draw-schedule,#historyTools,#checkTools,details.ultra-selection-method,details.ultra-odd-even-help,details.ultra-draw-facts,details.compact-rule-details) > summary::after {width:36px!important;height:36px!important;}
}
}

/* V5.20.1: align expanded card shells and inset their content. */
@media screen {
html body[data-game] #mainContent#mainContent .orbit-game-info-pair > :is(#gameRuleSource,#draw-schedule)[open] > summary + :not(summary) {
 margin-top:16px!important;
}
html body[data-game] #mainContent#mainContent .orbit-game-info-pair > :is(#gameRuleSource,#draw-schedule)[open] > :last-child {
 margin-bottom:18px!important;
}
@media (min-width:768px) {
 html body[data-game] #mainContent#mainContent .orbit-game-info-pair:has(> #gameRuleSource[open]):has(> #draw-schedule[open]) > :is(#gameRuleSource,#draw-schedule),
 html body[data-game] #mainContent#mainContent :is(div,section):not(#mainContent):has(> details.atlas-more-actions[open]):has(> details.panel.guide[open]) > :is(details.atlas-more-actions,details.panel.guide) {
  align-self:stretch!important;
 }
}
}

/* V5.20.2: let the rules card own its background, not each line of copy. */
@media screen {
 html[data-theme] body[data-game] #mainContent#mainContent details.panel.guide[open] > :is(.eyebrow,h3,p,a.reference-link) {
  background:transparent!important;
  box-shadow:none!important;
 }
}

/* V5.20.3: restore readable history import button in both states. */
@media screen {
 html[data-theme] body[data-game].vp-site-studio #mainContent#mainContent #historyTools .action-cluster button#importHistory {
  opacity:1!important;
  color:#fff!important;
  background:linear-gradient(110deg,#175781,#106c77)!important;
  border:1px solid #175781!important;
  text-shadow:none!important;
  box-shadow:none!important;
 }
 html[data-theme] body[data-game].vp-site-studio #mainContent#mainContent #historyTools .action-cluster button#importHistory:hover:not(:disabled):not([aria-disabled="true"]) {
  background:linear-gradient(110deg,#13486d,#0d5963)!important;
 }
 html[data-theme] body[data-game].vp-site-studio #mainContent#mainContent #historyTools .action-cluster button#importHistory:is(:disabled,[aria-disabled="true"]) {
  opacity:1!important;
  color:#486174!important;
  background:#e5eef3!important;
  border:1px solid #c3d6e0!important;
  cursor:not-allowed!important;
 }
 html[data-theme="dark"] body[data-game].vp-site-studio #mainContent#mainContent #historyTools .action-cluster button#importHistory:is(:disabled,[aria-disabled="true"]) {
  color:#b6cfdd!important;
  background:#263c4c!important;
  border-color:#496779!important;
 }
 html[data-theme] body[data-game].vp-site-studio #mainContent#mainContent #historyTools .action-cluster button#importHistory:focus-visible {
  outline:2px solid #238ab4!important;
  outline-offset:2px!important;
 }
}
