/* The Lost Sizzler V10.41 r29 — stable gameplay geometry.
 * Runtime notifications must never change the dimensions of the canvas host.
 * A toast appearing or disappearing is an overlay-only event, preventing
 * ResizeObserver feedback, backing-store reallocations and visible flicker.
 */
body[data-run-active="true"] .ccg-game>.game-area{
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  position:relative!important;
  overflow:hidden!important;
}
body[data-run-active="true"] .ccg-game>.game-area>.canvas-wrap{
  grid-column:1!important;
  grid-row:1!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  position:relative!important;
  overflow:hidden!important;
}
body[data-run-active="true"] .ccg-game>.game-area>.game-message-rail{
  display:contents!important;
}
/* V10.9 deliberately collapses an empty rail with a high-specificity :has()
 * selector.  Retain that idle behaviour, but explicitly outrank it whenever
 * current notification content is visible.  Without these selectors an older
 * deferred stylesheet can hide a live toast even though r29 uses overlay-only
 * notification geometry. */
body[data-run-active="true"] .ccg-game>.game-area>.game-message-rail:has(#pickup-toast.show),
body[data-run-active="true"] .ccg-game>.game-area>.game-message-rail:has(.ccg-rating-rail:not(.hidden)),
body[data-run-active="true"] .ccg-game>.game-area>.game-message-rail:has(.ccg-important-notice.show){
  display:contents!important;
}
body[data-run-active="true"] .ccg-game>.game-area #pickup-toast{
  position:absolute!important;
  top:12px!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  width:min(580px,76%)!important;
  max-width:min(580px,76%)!important;
  height:auto!important;
  min-height:0!important;
  max-height:72px!important;
  margin:0!important;
  transform:translateX(-50%)!important;
  z-index:92!important;
  overflow:hidden!important;
}
body[data-run-active="true"] .ccg-game>.game-area .ccg-rating-rail{
  position:absolute!important;
  top:12px!important;
  left:50%!important;
  width:min(580px,76%)!important;
  transform:translateX(-50%)!important;
  z-index:93!important;
  margin:0!important;
}
@media(max-width:900px),(pointer:coarse){
  body[data-run-active="true"] .ccg-game>.game-area #pickup-toast,
  body[data-run-active="true"] .ccg-game>.game-area .ccg-rating-rail{
    width:min(94%,580px)!important;
    max-width:min(94%,580px)!important;
  }
}

/* Startup menu first-paint contract.
 * v10-41-landing-notification-polish.js historically injected these landing
 * rules after the page had already painted. That let the earlier generic
 * button/menu rules appear for a frame before the intended landing hierarchy
 * replaced them. Keep the visible landing state in blocking CSS so the first
 * frame already matches the runtime-polished state. The runtime layer may
 * still inject the same declarations later for backwards compatibility. */
body[data-run-active="false"] #menu>.panel{padding-top:20px!important;padding-bottom:22px!important}
body[data-run-active="false"] #menu .pixel-title-lockup{max-width:980px;margin:0 auto 10px!important;padding:12px 18px 8px!important}
body[data-run-active="false"] #menu .pixel-title-lockup .pixel-title-ccg{opacity:.68!important;transform:scale(.92)}
body[data-run-active="false"] #menu .pixel-title-lockup .pixel-title-quest{opacity:.88!important;letter-spacing:.13em!important}
body[data-run-active="false"] #menu .pixel-title-lockup h2{margin:4px 0 3px!important;line-height:.94!important;filter:drop-shadow(0 8px 18px rgba(0,0,0,.48))}
body[data-run-active="false"] #menu .pixel-title-lockup h2 span,
body[data-run-active="false"] #menu .pixel-title-lockup h2 strong{text-shadow:0 0 18px rgba(108,236,255,.13)!important}
body[data-run-active="false"] #menu .pixel-title-lockup em{margin-top:9px!important;opacity:.86!important;letter-spacing:.18em!important}
body[data-run-active="false"] #menu .menu-blurb{max-width:900px;margin:5px auto 9px!important;color:#c8becf!important;font-size:9.5px!important;line-height:1.48!important}
body[data-run-active="false"] #menu .beta-stage-disclaimer{max-width:960px;margin:7px auto!important;padding:7px 12px!important;border:1px solid rgba(255,216,90,.28)!important;background:rgba(255,216,90,.025)!important;box-shadow:none!important;color:#bdb0c4!important;font-size:8px!important;letter-spacing:.055em!important}
body[data-run-active="false"] #menu .desktop-play-recommendation{max-width:1000px;margin:6px auto 7px!important;padding:7px 11px!important;border-color:rgba(108,236,255,.20)!important;background:rgba(108,236,255,.025)!important;box-shadow:none!important;font-size:8px!important;color:#a99faf!important}
body[data-run-active="false"] #menu .desktop-play-recommendation strong{color:#6cecff!important}
body[data-run-active="false"] #menu .feature-strip{max-width:1120px;margin:10px auto 13px!important;gap:7px!important}
body[data-run-active="false"] #menu .feature-strip>span{position:relative;min-height:64px!important;padding:11px 12px 10px 47px!important;border-color:rgba(185,120,255,.20)!important;background:rgba(10,7,15,.55)!important;box-shadow:none!important;text-align:left!important;color:#9c92a5!important}
body[data-run-active="false"] #menu .feature-strip>span:before{position:absolute;left:13px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:24px;height:24px;border:1px solid rgba(108,236,255,.26);background:#09060e;color:#6cecff;font:900 15px/1 "Courier New",monospace;box-shadow:inset 0 0 12px rgba(108,236,255,.04)}
body[data-run-active="false"] #menu .feature-strip>span:nth-child(1):before{content:"▦"}
body[data-run-active="false"] #menu .feature-strip>span:nth-child(2):before{content:"◆";color:#ffd85a;border-color:rgba(255,216,90,.28)}
body[data-run-active="false"] #menu .feature-strip>span:nth-child(3):before{content:"◈";color:#b978ff;border-color:rgba(185,120,255,.30)}
body[data-run-active="false"] #menu .feature-strip>span b{display:block!important;margin-bottom:4px!important;font-size:9px!important;color:#e6dff0!important;letter-spacing:.08em!important}
body[data-run-active="false"] #menu .menu-config{max-width:760px;margin:9px auto 10px!important;padding:9px 12px!important;border-top:1px solid rgba(185,120,255,.13);border-bottom:1px solid rgba(185,120,255,.13);background:rgba(5,3,9,.28)!important;gap:20px!important}
body[data-run-active="false"] #menu .menu-config .field>span{font-size:7.5px!important;color:#b9a75d!important;letter-spacing:.08em!important}
body[data-run-active="false"] #menu .menu-config input,
body[data-run-active="false"] #menu .menu-config select{min-height:42px!important;border-color:rgba(185,120,255,.34)!important;background:#07050b!important}
body[data-run-active="false"] #menu .mode-select-label{margin:13px 0 8px!important;color:#ff72ef!important;font-size:10px!important;letter-spacing:.14em!important}
body[data-run-active="false"] #menu .game-mode-buttons{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;align-items:stretch!important;margin-top:0!important}
body[data-run-active="false"] #menu .ccg-mode-tier-label{grid-column:1/-1;padding:7px 4px 2px;border-top:1px solid rgba(185,120,255,.13);color:#746b7d;font:800 7px/1.2 "Courier New",monospace;letter-spacing:.16em;text-align:left;text-transform:uppercase}
body[data-run-active="false"] #menu .ccg-mode-tier-label[data-tier="main"]{order:10;border-top:0;color:#bcae72}
body[data-run-active="false"] #menu .ccg-mode-tier-label[data-tier="special"]{order:20;margin-top:2px}
body[data-run-active="false"] #menu .ccg-mode-tier-label[data-tier="other"]{order:30;margin-top:2px}
body[data-run-active="false"] #menu #solo-btn{order:11;grid-column:span 2!important}
body[data-run-active="false"] #menu #continue-save-btn{order:10;grid-column:1/-1!important}
body[data-run-active="false"] #menu #tutorial-zone-btn{order:12;grid-column:span 2!important}
body[data-run-active="false"] #menu #solo-btn{min-height:54px!important;border-width:2px!important;font-size:10.5px!important;box-shadow:0 8px 18px rgba(0,0,0,.20),inset 0 1px rgba(255,255,255,.08)!important}
body[data-run-active="false"] #menu #tutorial-zone-btn{min-height:38px!important;font-size:8.5px!important;opacity:.88;box-shadow:none!important}
body[data-run-active="false"] #menu .secondary-menu{gap:6px!important;padding:8px!important;background:rgba(4,3,8,.28)!important;border-color:rgba(185,120,255,.13)!important}
body[data-run-active="false"] #menu .secondary-menu button,
body[data-run-active="false"] #menu .secondary-menu a{min-height:34px!important;padding:7px 10px!important;font-size:7.5px!important;box-shadow:none!important;filter:saturate(.78)}
@media(max-width:760px){
  body[data-run-active="false"] #menu .game-mode-buttons{grid-template-columns:1fr 1fr!important}
  body[data-run-active="false"] #menu #solo-btn,
  body[data-run-active="false"] #menu #tutorial-zone-btn{grid-column:span 1!important}
  body[data-run-active="false"] #menu .feature-strip{grid-template-columns:1fr!important}
}

/* Stage 2 landing milestone.
 * The supported release now presents one stable hierarchy instead of exposing
 * historical runtime-injected tiers that referred to retired modes. The final
 * supported card geometry also matches the retained R55 text-layout owner so a
 * late compatibility pass cannot resize the menu after first paint. */
html body[data-run-active="false"] #menu .ccg-mode-tier-label{display:none!important}
html body[data-run-active="false"] #menu .game-mode-buttons button:not(.hidden){
  box-sizing:border-box!important;
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-height:74px!important;
  padding:28px 12px 24px!important;
  overflow:hidden!important;
  white-space:normal!important;
  text-overflow:clip!important;
  text-align:left!important;
  line-height:1.15!important;
}
html body[data-run-active="false"] #menu #continue-save-btn{
  order:10!important;
  grid-column:1/-1!important;
  min-height:78px!important;
  font-size:10px!important;
}
html body[data-run-active="false"] #menu #solo-btn{
  order:11!important;
  grid-column:span 2!important;
  min-height:82px!important;
  font-size:10.5px!important;
}
html body[data-run-active="false"] #menu #tutorial-zone-btn{
  order:12!important;
  grid-column:span 2!important;
  min-height:70px!important;
  font-size:9px!important;
  margin-top:3px!important;
}
html body[data-run-active="false"] #menu #solo-btn.primary{color:#f5eefb!important}
@media(max-width:900px),(pointer:coarse){
  html body[data-run-active="false"] #menu .game-mode-buttons{grid-template-columns:minmax(0,1fr)!important}
  html body[data-run-active="false"] #menu #continue-save-btn,
  html body[data-run-active="false"] #menu #solo-btn,
  html body[data-run-active="false"] #menu #tutorial-zone-btn{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    min-height:78px!important;
    padding:29px 12px 25px!important;
  }
}


/* R51 FULLSCREEN MESSAGE RAIL — RESERVED BELOW-CANVAS NOTICES */
body[data-run-active="true"] .ccg-game:fullscreen>.game-area{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr) 78px!important;
  gap:6px!important;
  position:relative!important;
  overflow:hidden!important;
  background:#000!important;
}
body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.canvas-wrap{
  grid-column:1!important;
  grid-row:1!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
}
body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.game-message-rail{
  grid-column:1!important;
  grid-row:2!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  width:100%!important;
  height:78px!important;
  min-width:0!important;
  min-height:78px!important;
  padding:6px 8px!important;
  border:1px solid #31283a!important;
  background:#020203!important;
  box-shadow:inset 0 0 18px rgba(108,236,255,.025)!important;
  overflow:hidden!important;
}
body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.game-message-rail>.game-message-context,
body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.game-message-rail>#message,
body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.game-message-rail>#quest-list{
  display:none!important;
}
body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.game-message-rail>#pickup-toast{
  position:static!important;
  inset:auto!important;
  grid-column:1!important;
  grid-row:1!important;
  align-self:stretch!important;
  width:100%!important;
  max-width:none!important;
  min-height:0!important;
  max-height:none!important;
  height:auto!important;
  margin:0!important;
  transform:none!important;
  z-index:1!important;
  overflow:hidden!important;
}
body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.game-message-rail>#ccg-major-notification{
  position:static!important;
  inset:auto!important;
  grid-column:1!important;
  grid-row:1!important;
  align-self:stretch!important;
  width:100%!important;
  max-width:none!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  transform:none!important;
  z-index:2!important;
  overflow:hidden!important;
}
body[data-run-active="true"][data-ccg-major-notification="true"] .ccg-game:fullscreen>.game-area>.game-message-rail>#pickup-toast{
  visibility:hidden!important;
  opacity:0!important;
}
@media(max-width:820px){
  body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.game-message-rail{
    display:grid!important;
  }
}

/* R51 regression guard: ordinary reports belong in a compact rail below the
 * dungeon. They must never reclaim the canvas as a modal-style overlay. */
@media(min-width:821px){
  .v102-game-area{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr) 74px!important;
    gap:0!important;
  }
  .v102-game-area .canvas-wrap{grid-column:1!important;grid-row:1!important}
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail{
    grid-column:1!important;grid-row:2!important;display:block!important;
    height:74px!important;min-height:74px!important;max-height:74px!important;
    padding:0!important;border:0!important;border-top:1px solid #553b68!important;overflow:hidden!important;
  }
  .v102-game-area .game-message-context,.v102-game-area #message,.v102-game-area #quest-list{display:none!important}
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast{
    position:static!important;inset:auto!important;transform:none!important;display:grid!important;
    grid-template-columns:48px minmax(0,1fr)!important;grid-template-rows:1fr!important;align-items:center!important;gap:11px!important;
    width:100%!important;min-width:0!important;max-width:none!important;
    height:73px!important;min-height:73px!important;max-height:73px!important;
    margin:0!important;padding:7px 14px!important;opacity:.38!important;visibility:visible!important;pointer-events:none!important;
    border:0!important;border-left:3px solid var(--gold)!important;border-bottom:0!important;
    background:#0a060d!important;box-shadow:none!important;text-align:left!important;overflow:hidden!important;
  }
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast.show{opacity:1!important;background:#110b12!important}
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast .pickup-toast-icon{grid-column:1!important;grid-row:1!important;align-self:center!important;justify-self:center!important;margin:0!important}
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast .pickup-toast-copy{grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;width:100%!important}
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast b,
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast span{width:100%!important;text-align:left!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;-webkit-line-clamp:unset!important}
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #ccg-major-notification[data-visible="true"]{
    display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;grid-template-rows:1fr!important;align-items:center!important;gap:11px!important;
    width:100%!important;height:73px!important;min-height:73px!important;max-height:73px!important;margin:0!important;padding:7px 14px!important;overflow:hidden!important
  }
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #ccg-major-notification[data-visible="true"] .major-icon{grid-column:1!important;grid-row:1!important;align-self:center!important;justify-self:center!important;margin:0!important}
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #ccg-major-notification[data-visible="true"] .major-copy{grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;width:100%!important}
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #ccg-major-notification[data-visible="true"] .major-copy b,
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #ccg-major-notification[data-visible="true"] .major-copy span{width:100%!important;text-align:left!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  body[data-run-active="true"][data-ccg-major-notification="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast{
    display:none!important;visibility:hidden!important;opacity:0!important
  }
}

/* Short landscape viewports still keep the message rail below the dungeon,
 * but cannot spare the full desktop 74–78px without crushing gameplay. */
@media(min-width:821px) and (max-height:500px){
  .v102-game-area{
    grid-template-rows:minmax(0,1fr) 20px!important;
  }
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail{
    box-sizing:border-box!important;
    height:20px!important;min-height:20px!important;max-height:20px!important;
    padding:0!important;
  }
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast{
    box-sizing:border-box!important;
    height:19px!important;min-height:19px!important;max-height:19px!important;
    padding:1px 8px!important;display:flex!important;flex-direction:row!important;
    align-items:center!important;justify-content:flex-start!important;gap:8px!important;
    white-space:nowrap!important;
  }
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast b{
    width:auto!important;flex:0 0 auto!important;font-size:9px!important;line-height:1!important;
    white-space:nowrap!important;
  }
  body[data-run-active="true"] .ccg-game .v102-game-area .game-message-rail #pickup-toast span{
    width:auto!important;min-width:0!important;flex:1 1 auto!important;margin:0!important;
    font-size:7.5px!important;line-height:1!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:ellipsis!important;display:block!important;
  }
  body[data-run-active="true"] .ccg-game:fullscreen>.game-area{
    grid-template-rows:minmax(0,1fr) 20px!important;
  }
  body[data-run-active="true"] .ccg-game:fullscreen>.game-area>.game-message-rail{
    height:20px!important;min-height:20px!important;max-height:20px!important;
    padding:1px 4px!important;
  }
}
