/* ==========================================================================
   หีบรายวัน / DAILY STREAK (#/daily) — ดีไซน์ใหม่โทนดำ-แดง ชุดเดียวกับหน้า shop
   (แทนโปสเตอร์สีลูกกวาดเดิม: คลาส cc-daily-* ใน store.css ไม่ถูกใช้แล้ว)
   ใช้ตัวแปร --shop-* จาก shop.css
   ========================================================================== */
.dl-page {
  padding-top: 1.2rem;
}

.dl-page > .cc-back {
  margin-bottom: 0.9rem;
}

.dl-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.6rem;
  border-radius: 16px;
  border: 1px solid var(--shop-line);
  background:
    radial-gradient(ellipse 60% 70% at 100% 0%, rgba(14, 165, 255, 0.2), transparent 65%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(18, 45, 100, 0.25), transparent 70%),
    linear-gradient(180deg, #17151a, #111013);
}

/* ลายเส้นทแยงจาง ๆ ให้พื้นมีมิติ */
.dl-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 14px);
  pointer-events: none;
}

/* ---------- หัว + ตัวนับสตรีค ---------- */
.dl-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.dl-eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--shop-orange-2);
}

.dl-title {
  margin: 0;
  line-height: 1;
}

.dl-title-en {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 6px 26px rgba(0, 0, 0, 0.5);
}

.dl-title-en em {
  font-style: italic;
  /* เผื่อขอบให้ตัวเอียง ไม่งั้น background-clip:text ตัดตัว K ท้าย */
  padding: 0.06em 0.18em 0.06em 0.02em;
  margin-right: -0.16em;
  background: linear-gradient(180deg, var(--shop-orange-2), var(--shop-orange-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 16px rgba(14, 165, 255, 0.4));
}

.dl-sub {
  margin: 0.6rem 0 0;
  max-width: 560px;
  font-size: 0.95rem;
  color: var(--text-2);
}

.dl-badge {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 108px;
  padding: 0.75rem 1rem 0.7rem;
  border-radius: 14px;
  border: 1px solid rgba(14, 165, 255, 0.45);
  background: linear-gradient(180deg, rgba(14, 165, 255, 0.18), rgba(14, 165, 255, 0.05));
  box-shadow: 0 0 28px rgba(14, 165, 255, 0.15);
}

.dl-badge-ic {
  display: grid;
  color: var(--shop-orange-2);
  filter: drop-shadow(0 0 8px rgba(92, 200, 255, 0.7));
}

.dl-badge-ic svg {
  width: 22px;
  height: 22px;
}

.dl-badge-n {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
}

.dl-badge-t {
  font-size: 0.74rem;
  color: var(--text-2);
}

/* ---------- เลย์เอาต์หลัก ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: stretch;
}

.dl-left,
.dl-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.dl-today,
.dl-panel,
.dl-claim-zone,
.dl-quote {
  border-radius: 12px;
  border: 1px solid var(--shop-line);
  background: rgba(10, 10, 12, 0.55);
}

/* ---------- รางวัลวันนี้ ---------- */
.dl-today {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
  padding: 1.2rem 1rem 1.1rem;
  background:
    radial-gradient(circle at 50% 32%, rgba(14, 165, 255, 0.2), transparent 55%),
    rgba(10, 10, 12, 0.55);
}

.dl-today-label {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.dl-today-art {
  display: grid;
  place-items: center;
  min-height: 90px;
  filter: drop-shadow(0 8px 18px rgba(255, 150, 40, 0.25));
}

.dl-today-art img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
}

.dl-today-value {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.2rem 0 0;
}

.dl-today-value strong {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.dl-today-value span {
  font-size: 0.9rem;
  color: var(--text-2);
}

.dl-today-meta,
.dl-today-name {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-2);
}

.dl-today-name {
  color: var(--text-1);
  font-weight: 500;
}

.dl-today-title {
  margin-top: 0.3rem;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 999px;
  color: var(--shop-orange-2);
  border: 1px solid rgba(14, 165, 255, 0.35);
}

.dl-today-stats {
  margin: 0.6rem 0 0;
  font-size: 0.76rem;
  color: var(--text-3);
}

.dl-today-chip {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.dl-today-chip.is-ready {
  color: #fff;
  background: var(--shop-orange);
  border-color: var(--shop-orange);
  box-shadow: 0 0 14px rgba(14, 165, 255, 0.45);
}

.dl-today-chip.is-warn {
  color: #fab219;
  background: rgba(250, 178, 25, 0.12);
  border-color: rgba(250, 178, 25, 0.3);
}

/* ---------- ปุ่มรับ + เลือกตัวละคร + เวลารีเซ็ต ---------- */
.dl-claim-zone {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem;
}

.dl-player {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-1);
}

.dl-player svg {
  flex: none;
  color: var(--shop-orange);
}

.dl-player .cc-select {
  flex: 1;
  min-width: 0;
}

.dl-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-2);
  outline: none;
}

.dl-note.is-warn {
  color: #fab219;
}

.btn.dl-claim {
  position: relative;
  width: 100%;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--shop-orange-2), var(--shop-orange-deep));
  box-shadow: 0 8px 22px rgba(14, 165, 255, 0.3);
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn.dl-claim:not(:disabled):hover {
  filter: brightness(1.08);
}

.btn.dl-claim:not(:disabled):active {
  transform: scale(0.985);
}

.btn.dl-claim:disabled {
  color: var(--text-2);
  background: #232227;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.btn.dl-claim.is-loading {
  color: transparent;
}

.btn.dl-claim.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: dl-spin 0.7s linear infinite;
}

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

.dl-time {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-3);
}

.dl-countdown {
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
}

.dl-countdown.is-ready {
  color: #34d399;
}

.dl-reset-at {
  color: var(--text-3);
}

/* ---------- รางวัล 7 วัน ---------- */
.dl-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1rem 1.1rem;
}

.dl-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.dl-h2 {
  margin: 0;
  padding-left: 0.7rem;
  border-left: 3px solid var(--shop-orange);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
}

.dl-panel-cycle {
  font-size: 0.78rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
}

.dl-track {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0 0.2rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, 1.35fr);
  gap: 0.55rem;
}

.dl-track:focus-visible {
  outline: 2px solid var(--shop-orange);
  outline-offset: 3px;
  border-radius: 8px;
}

.dl-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 132px;
  padding: 0.75rem 0.3rem 0.7rem;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--shop-line);
  background: #18171b;
  transition: border-color 0.15s ease;
}

.dl-day-n {
  font-size: 0.74rem;
  color: var(--text-3);
}

.dl-day-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
}

.dl-day-img {
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.dl-day-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dl-coins {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.dl-label {
  font-size: 0.7rem;
  color: var(--text-3);
  line-height: 1.2;
}

/* รับแล้ว: ติ๊กเขียว พื้นจาง */
.dl-day.is-done {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.08), #18171b);
}

.dl-day.is-done .dl-day-icon {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}

/* วันนี้: กรอบแดงเรือง */
.dl-day.is-today {
  border: 1.5px solid var(--shop-orange);
  background: linear-gradient(180deg, rgba(14, 165, 255, 0.16), #1a171b);
  box-shadow: 0 0 0 3px rgba(14, 165, 255, 0.12), 0 10px 26px rgba(14, 165, 255, 0.18);
}

.dl-day.is-today .dl-day-icon {
  color: #fff;
  background: var(--shop-orange);
}

.dl-day.is-today .dl-day-n {
  color: var(--text-1);
}

.dl-day.is-today .dl-today-chip {
  top: -0.6rem;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  color: #fff;
  background: var(--shop-orange);
  border-color: var(--shop-orange);
}

/* วันที่ 7: รางวัลใหญ่ โทนทอง */
.dl-day.is-big {
  border-color: rgba(250, 178, 25, 0.45);
  background:
    radial-gradient(circle at 50% 30%, rgba(250, 178, 25, 0.2), transparent 65%),
    #1b1916;
}

.dl-day.is-big .dl-day-icon {
  width: 48px;
  height: 48px;
  color: #fab219;
  background: rgba(250, 178, 25, 0.14);
}

.dl-day.is-big .dl-coins {
  font-size: 1.3rem;
  color: #ffd166;
}

.dl-day.is-big.is-today {
  border-color: #fab219;
  box-shadow: 0 0 0 3px rgba(250, 178, 25, 0.15), 0 10px 26px rgba(250, 178, 25, 0.2);
}

.dl-day.is-off {
  opacity: 0.45;
}

/* ความคืบหน้ารอบนี้ */
.dl-progress {
  margin-top: 1rem;
}

.dl-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.dl-progress-fill {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--shop-orange-deep), var(--shop-orange-2));
  box-shadow: 0 0 12px rgba(14, 165, 255, 0.5);
  transition: width 0.4s ease;
}

.dl-progress small {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-3);
}

/* ---------- คำคม + ปุ่มแชร์ ---------- */
.dl-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--shop-orange);
}

.dl-quote-text {
  margin: 0;
  font-weight: 600;
  color: #fff;
}

.dl-quote-en {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-3);
}

.dl-share {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--shop-line);
  border-radius: 8px;
  cursor: pointer;
}

.dl-share:hover {
  border-color: rgba(14, 165, 255, 0.4);
}

/* ---------- ยังไม่ผูกตัวละคร + ประวัติ ---------- */
.dl-notlinked {
  margin-top: 1.1rem;
}

.dl-recent {
  margin-top: 1.1rem;
  padding: 1.1rem 1.3rem;
  border-radius: 12px;
  border: 1px solid var(--shop-line);
  background: #141417;
}

.dl-recent .dl-h2 {
  margin-bottom: 0.8rem;
}

.dl-history {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dl-history li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--shop-line);
  font-size: 0.88rem;
  color: var(--text-1);
}

.dl-history li:first-child {
  border-top: 0;
}

.dl-history li > svg {
  color: #34d399;
}

.dl-history li > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-history li > strong {
  font-family: var(--font-display);
  color: #fff;
}

.dl-history-empty {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- จอกลาง / มือถือ ---------- */
@media (max-width: 980px) {
  .dl-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dl-left {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .dl-banner {
    padding: 1.1rem;
    border-radius: 12px;
  }

  .dl-hero {
    gap: 0.8rem;
  }

  .dl-badge {
    min-width: 84px;
    padding: 0.55rem 0.7rem;
  }

  .dl-badge-n {
    font-size: 1.7rem;
  }

  .dl-left {
    display: flex;
  }

  /* แถบ 7 วันเลื่อนข้างบนจอแคบ (JS เลื่อนวันนี้มากลางให้เอง) */
  .dl-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 0.7rem 2px 0.3rem;
    margin: 0 -2px;
  }

  .dl-track::-webkit-scrollbar {
    display: none;
  }

  .dl-day {
    flex: 0 0 86px;
    min-height: 120px;
    scroll-snap-align: center;
  }

  .dl-day.is-big {
    flex-basis: 108px;
  }

  .dl-share {
    margin-left: 0;
  }

  .dl-history li {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .dl-history li > small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.dl-claim.is-loading::after {
    animation-duration: 2s;
  }

  .dl-progress-fill {
    transition: none;
  }
}
