.daily-start-overlay.hidden,
.daily-rack-branding.hidden,
.daily-unavailable-banner.hidden,
.daily-target.hidden,
.daily-status.hidden,
.daily-primary-action.hidden {
  display: none !important;
}

/* Daily Challenge is a full-page event skin. The shared gameplay components
   stay intact, but the color field continues behind the rack and lower panels. */
body.daily-challenge-table {
  background:
    radial-gradient(circle at -4% 35%, rgba(237, 180, 72, 0.24) 0 12rem, transparent 12.2rem),
    radial-gradient(circle at 102% 12%, rgba(232, 119, 82, 0.22) 0 16rem, transparent 16.2rem),
    radial-gradient(circle at 78% 102%, rgba(66, 141, 123, 0.13) 0 19rem, transparent 19.2rem),
    linear-gradient(135deg, #fffdf6 0%, #fbf1e1 52%, #f9e5d8 100%);
  background-attachment: fixed;
}

body.daily-challenge-table .app-shell {
  position: relative;
  isolation: isolate;
}

body.daily-challenge-table #game-view {
  position: relative;
  isolation: isolate;
}

body.daily-challenge-table #game-view::before {
  content: "";
  position: absolute;
  inset: -0.8rem;
  z-index: -2;
  border-radius: 34px;
  background:
    radial-gradient(ellipse at 8% 18%, rgba(244, 173, 57, 0.2) 0 12%, transparent 12.2%),
    radial-gradient(ellipse at 3% 72%, rgba(117, 160, 112, 0.14) 0 10%, transparent 10.2%),
    radial-gradient(ellipse at 95% 16%, rgba(226, 103, 67, 0.2) 0 15%, transparent 15.2%),
    radial-gradient(ellipse at 64% 106%, rgba(242, 194, 92, 0.16) 0 18%, transparent 18.2%),
    linear-gradient(135deg, rgba(255, 252, 241, 0.82), rgba(250, 232, 213, 0.78));
  box-shadow: 0 24px 60px rgba(109, 72, 42, 0.08);
  pointer-events: none;
}

body.daily-challenge-table #game-view::after {
  content: "";
  position: absolute;
  inset: -0.8rem;
  z-index: -1;
  border-radius: 34px;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(75, 105, 96, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 105, 96, 0.055) 1px, transparent 1px);
  background-size: 92px 92px;
  pointer-events: none;
}

body.daily-challenge-table.rack-unframed .hero-hand-panel,
body.daily-challenge-table.rack-unframed .board-hand-slot .hero-hand-panel,
body.daily-challenge-table.rack-unframed .hero-hand-panel.charleston-actions-first {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.daily-challenge-table #hand-card-panel,
body.daily-challenge-table #draw-panel,
body.daily-challenge-table #turn-lane-panel {
  border-color: rgba(113, 126, 108, 0.2);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 16px 38px rgba(100, 69, 42, 0.08);
  backdrop-filter: blur(12px);
}

body.daily-challenge-game .daily-target-name-pill {
  cursor: default;
  pointer-events: none;
}

.daily-rack-branding {
  position: absolute;
  top: clamp(0.45rem, 1.1cqw, 0.75rem);
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.55rem, 1.1cqw, 0.9rem);
  max-width: calc(100% - 28rem);
  color: #17395a;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.daily-rack-sun {
  color: #f3a524;
  font-size: clamp(1.15rem, 2.3cqw, 1.75rem);
  line-height: 1;
  filter: drop-shadow(0 3px 7px rgba(203, 111, 24, 0.22));
}

.daily-rack-branding strong {
  font-family: "Merriweather Sans", sans-serif;
  font-size: clamp(0.8rem, 1.55cqw, 1.18rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.daily-rack-brand-divider {
  width: 1px;
  height: 1.55rem;
  background: rgba(50, 75, 88, 0.25);
}

.daily-rack-branding time {
  color: #718087;
  font-family: "Merriweather Sans", sans-serif;
  font-size: clamp(0.68rem, 1.05cqw, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* The pre-start prompt is a modal layer over a fully prepared table preview. */
.daily-start-overlay {
  position: absolute;
  inset: -0.35rem;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 4.5vh, 3.5rem) 1rem 2rem;
  box-sizing: border-box;
  border-radius: 30px;
  background: rgba(255, 251, 242, 0.18);
  backdrop-filter: blur(1.5px);
}

.daily-rack-intro {
  width: min(820px, calc(100% - 1rem));
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.3rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: clamp(28px, 4vw, 42px);
  background: rgba(255, 253, 247, 0.96);
  box-shadow:
    0 32px 84px rgba(70, 48, 32, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  text-align: center;
  backdrop-filter: blur(16px);
}

.daily-kicker {
  display: block;
  color: #a5513e;
  font-family: "Merriweather Sans", sans-serif;
  font-size: clamp(0.72rem, 1.15vw, 0.92rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.daily-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.58rem auto 0.72rem;
}

.daily-rack-intro h1 {
  margin: 0;
  color: #0b5350;
  font-family: "Merriweather", serif;
  font-size: clamp(2.4rem, 5.5vw, 4.35rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.daily-intro-copy {
  display: grid;
  gap: 0.16rem;
  margin: 0 auto;
  color: #4e5553;
  font-family: "Merriweather Sans", sans-serif;
  font-size: clamp(0.9rem, 1.65vw, 1.15rem);
  font-weight: 700;
  line-height: 1.48;
}

.daily-date {
  display: none;
}

.daily-tile-showcase {
  position: relative;
  width: min(22rem, 72vw);
  height: clamp(10rem, 22vw, 13rem);
  margin: clamp(1rem, 2.4vw, 1.55rem) auto clamp(1.05rem, 2.5vw, 1.6rem);
}

.daily-showcase-tile {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  width: clamp(5.4rem, 11vw, 7.4rem);
  height: auto;
  filter: drop-shadow(0 12px 11px rgba(74, 50, 31, 0.18));
  transform-origin: 50% 92%;
}

.daily-showcase-tile-left {
  z-index: 1;
  transform: translateX(-108%) rotate(-9deg) translateY(0.45rem);
}

.daily-showcase-tile-center {
  z-index: 3;
  width: clamp(6.2rem, 13vw, 8.5rem);
  transform: translateX(-50%);
}

.daily-showcase-tile-right {
  z-index: 2;
  transform: translateX(8%) rotate(9deg) translateY(0.45rem);
}

.daily-tile-shadow {
  position: absolute;
  right: 5%;
  bottom: 0;
  left: 5%;
  height: 1.4rem;
  border-radius: 50%;
  background: rgba(100, 77, 55, 0.13);
  filter: blur(8px);
}

.daily-target {
  display: grid;
  grid-template-columns: auto 1px minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 1.8rem);
  width: calc(100% + clamp(0rem, 2vw, 1.4rem));
  margin: 0 50% 1rem;
  padding: clamp(0.85rem, 1.9vw, 1.25rem) clamp(1rem, 2.8vw, 2rem);
  box-sizing: border-box;
  border-radius: 20px;
  color: #123e36;
  background: linear-gradient(100deg, rgba(244, 238, 225, 0.95), rgba(248, 244, 236, 0.85));
  transform: translateX(-50%);
}

.daily-target-label {
  color: #49443f;
  font-family: "Merriweather Sans", sans-serif;
  font-size: clamp(0.68rem, 1.05vw, 0.83rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.daily-target-divider {
  align-self: stretch;
  min-height: 2.4rem;
  background: rgba(130, 103, 76, 0.42);
}

.daily-target-pattern {
  min-width: 0;
  font-family: "Merriweather Sans", sans-serif;
  font-size: clamp(1.12rem, 2.8vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.daily-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 4.35rem;
  margin: 0 auto 1rem;
  padding: 0.85rem 1.2rem;
  box-sizing: border-box;
  border: 1px solid rgba(76, 145, 133, 0.13);
  border-radius: 18px;
  color: #17554f;
  background: linear-gradient(100deg, rgba(227, 240, 235, 0.82), rgba(241, 245, 237, 0.9));
  font: 800 clamp(0.88rem, 1.55vw, 1.08rem)/1.4 "Merriweather Sans", sans-serif;
}

.daily-rack-intro[data-daily-state="loading"] .daily-status::before {
  content: "";
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  border: 4px solid rgba(18, 126, 113, 0.16);
  border-top-color: #13998c;
  border-radius: 50%;
  animation: daily-status-spin 760ms linear infinite;
}

.daily-primary-action {
  width: min(100%, 500px);
  min-height: 3.35rem;
  border: 0;
  border-radius: 999px;
  color: #fffdf8;
  background: linear-gradient(100deg, #bd5a3e, #d06f4d);
  box-shadow: 0 13px 24px rgba(166, 76, 51, 0.22);
  font-family: "Merriweather", serif;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.daily-primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(166, 76, 51, 0.28);
}

.daily-primary-action:focus-visible {
  outline: 3px solid rgba(10, 122, 108, 0.34);
  outline-offset: 3px;
}

.daily-primary-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.daily-one-attempt-note {
  margin: 0.9rem auto 0;
  color: #716b66;
  font: 700 clamp(0.76rem, 1.2vw, 0.9rem)/1.4 "Merriweather Sans", sans-serif;
}

@keyframes daily-status-spin {
  to { transform: rotate(360deg); }
}

.daily-unavailable-banner {
  position: absolute;
  top: 34%;
  left: 50%;
  z-index: 8;
  width: min(680px, calc(100% - 2rem));
  margin: 0;
  padding: 1.05rem 1.4rem;
  box-sizing: border-box;
  border: 1px solid rgba(151, 113, 76, 0.22);
  border-radius: 18px;
  color: #403a35;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 16px 36px rgba(74, 50, 31, 0.14);
  font: 700 clamp(0.9rem, 1.6vw, 1.1rem)/1.4 "Merriweather", serif;
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
}

body.daily-challenge-preview #next-action-panel,
body.daily-challenge-preview .hand-sort-utility,
body.daily-challenge-preview .tile-style-utility,
body.daily-challenge-preview #right-declare-slot,
body.daily-challenge-preview #turn-lane-panel,
body.daily-challenge-preview #next-action-primary-actions,
body.daily-challenge-preview #right-table-preview,
body.daily-challenge-preview #charleston-inline-actions,
body.daily-challenge-preview #draw-result-panel,
body.daily-challenge-preview .action-center-secondary,
body.daily-challenge-preview #table-location-status,
body.daily-challenge-preview #charleston-guidance-banner {
  display: none !important;
}

body.daily-challenge-preview .hero-hand-panel,
body.daily-challenge-preview .board-hand-slot .hero-hand-panel,
body.daily-challenge-preview .hero-hand-panel.charleston-actions-first {
  grid-template-areas: "rack";
  grid-template-rows: minmax(250px, 1fr);
}

body.daily-challenge-preview .rack-stage {
  min-height: 250px;
}

body.daily-challenge-preview #hand-card-panel,
body.daily-challenge-preview #draw-panel {
  pointer-events: none;
}

body.daily-challenge-preview #draw-panel.daily-charleston-preview {
  display: grid !important;
  align-content: start;
  min-height: 0;
}

body.daily-challenge-preview #draw-panel.daily-charleston-preview .right-strategy-panel {
  display: grid !important;
  align-content: start;
  min-height: 0;
}

body.daily-challenge-preview #draw-panel.daily-charleston-preview #strategy-title {
  margin-top: 0.35rem;
}

body.daily-challenge-preview #hand-card-panel .digitized-card {
  min-height: 0;
}

.daily-target-preview-callout {
  min-height: 0;
  border-color: rgba(0, 130, 117, 0.24);
  background: linear-gradient(145deg, rgba(237, 248, 244, 0.96), rgba(255, 253, 248, 0.9));
}

.daily-target-preview-callout .pinned-primary-pattern {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.daily-target-preview-note {
  margin: 0.6rem 0 0;
  color: #746c65;
  font: 400 0.78rem/1.4 "Merriweather", serif;
}

body.daily-challenge-preview:not(.daily-challenge-preview-ready) .board-bottom-grid {
  display: none !important;
}

body.daily-challenge-preview:not(.daily-challenge-preview-ready) #game-view.board-layout {
  grid-template-rows: minmax(0, 1fr);
}

body.daily-challenge-preview:not(.daily-challenge-preview-ready) .board-hand-slot,
body.daily-challenge-preview:not(.daily-challenge-preview-ready) .board-hand-slot .hero-hand-panel {
  height: 100%;
  min-height: 320px;
}

@media (max-width: 899px) {
  .daily-rack-branding {
    max-width: calc(100% - 20rem);
  }

  .daily-rack-branding strong {
    letter-spacing: 0.09em;
  }

  .daily-start-overlay {
    position: fixed;
    inset: 0;
    align-items: center;
    overflow-y: auto;
    padding: 1rem;
    border-radius: 0;
    background: rgba(250, 241, 225, 0.62);
    backdrop-filter: blur(5px);
  }

  .daily-rack-intro {
    margin: auto;
  }

  body.daily-challenge-preview .rack-stage {
    min-height: 265px;
  }
}

@media (max-width: 560px) {
  .daily-rack-branding {
    top: 2.6rem;
    max-width: calc(100% - 1rem);
  }

  .daily-rack-intro {
    width: 100%;
    padding: 1.6rem 1rem 1.25rem;
    border-radius: 22px;
  }

  .daily-rack-intro h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .daily-intro-copy {
    font-size: 0.83rem;
  }

  .daily-tile-showcase {
    height: 8.15rem;
    margin-block: 0.85rem 1rem;
  }

  .daily-showcase-tile {
    width: 4.2rem;
  }

  .daily-showcase-tile-center {
    width: 4.85rem;
  }

  .daily-target {
    grid-template-columns: 1fr;
    gap: 0.38rem;
    width: 100%;
    margin-inline: 0;
    padding: 0.85rem;
    transform: none;
  }

  .daily-target-divider {
    width: 2.5rem;
    min-height: 1px;
    margin: 0 auto;
  }

  .daily-target-pattern {
    font-size: 1.15rem;
  }

  .daily-unavailable-banner {
    top: 42%;
    width: calc(100% - 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .daily-primary-action,
  .daily-rack-intro[data-daily-state="loading"] .daily-status::before {
    transition: none;
    animation: none;
  }
}
