/* 每日探索電腦版牌桌（>640px）：先從扇形牌陣選 4 張，再一起翻開。手機版樣式在 market-mobile/app-parity-pages.css。 */
@media (min-width: 641px) {
  #viewDiscover .discover-page-head {
    display: none;
  }

  .dd-stage {
    --dd-card-bg: #03111e;
    --dd-card-text: #f5f8fc;
    --dd-card-muted: #b8c8d9;
    --dd-tone: #69d2ff;
    position: relative;
    padding: 40px 0 8px;
  }

  .dd-tone-0 { --dd-tone: #69d2ff; }
  .dd-tone-1 { --dd-tone: #a58aff; }
  .dd-tone-2 { --dd-tone: #e276b5; }
  .dd-tone-3 { --dd-tone: #42ddd2; }

  .dd-date {
    position: absolute;
    top: 16px;
    right: 0;
    left: 0;
    color: var(--text);
    font-family: var(--font-financial, "Manrope", sans-serif);
    font-size: clamp(160px, 20vw, 300px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: center;
    opacity: 0.035;
    pointer-events: none;
    user-select: none;
  }

  body:not(.dark-mode) .dd-date {
    opacity: 0.05;
  }

  .dd-head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    text-align: center;
  }

  .dd-eyebrow {
    margin: 0;
    color: var(--accent);
    font-family: var(--font-financial, "Manrope", sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
  }

  .dd-title {
    margin: 0;
    color: var(--text);
    font-size: 40px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }

  .dd-title em {
    color: var(--accent);
    font-family: var(--font-financial, "Manrope", sans-serif);
    font-style: normal;
  }

  .dd-lede {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
  }

  .dd-capsule {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 6px 0 0;
    padding: 4px 4px 4px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 12px;
  }

  .dd-capsule strong {
    padding: 4px 12px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-financial, "Manrope", sans-serif);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
  }

  .dd-table {
    position: relative;
    overflow: hidden;
    padding-top: 12px;
  }

  .dd-slots {
    --dd-width: calc(var(--dd-count, 4) * 180px + (var(--dd-count, 4) - 1) * 24px);
    display: grid;
    grid-template-columns: repeat(var(--dd-count, 4), minmax(0, 1fr));
    gap: 24px;
    max-width: var(--dd-width);
    margin: 0 auto;
  }

  .dd-slot {
    position: relative;
    aspect-ratio: 1 / 1.58;
    container-type: inline-size;
    border: 1px dashed var(--line);
    border-radius: 12px;
    transition: border-color 180ms ease;
  }

  .dd-slot.is-next {
    border-color: var(--accent);
  }

  .dd-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--faint);
    font-size: 12px;
  }

  .dd-placeholder b {
    font-size: 16px;
  }

  .dd-slot.is-next .dd-placeholder {
    color: var(--accent);
  }

  .dd-card {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--dd-card-text);
    text-align: left;
    perspective: 1200px;
    cursor: pointer;
    transition: transform 200ms ease;
  }

  .dd-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .dd-card.is-revealed .dd-inner {
    transform: rotateY(180deg);
  }

  .dd-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 12px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .dd-back {
    border: 1px solid var(--line);
    background: #0b1120;
    transition: border-color 180ms ease;
  }

  .dd-back img {
    width: 100%;
    height: 100%;
    object-fit: fill;
  }

  .dd-front {
    border: 1px solid color-mix(in srgb, var(--dd-tone) 55%, var(--dd-card-bg));
    background: var(--dd-card-bg);
    transform: rotateY(180deg);
  }

  /* After the flip, drop the 3D layer so resizing or theme changes cannot blank the card. */
  .dd-card.is-settled .dd-inner {
    transform: none;
    transform-style: flat;
    transition: none;
  }

  .dd-card.is-settled .dd-front {
    transform: none;
  }

  .dd-card.is-settled .dd-back {
    display: none;
  }

  .dd-card:not(.is-revealed):hover .dd-back {
    border-color: var(--accent);
  }

  .dd-x {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 2;
    display: grid;
    width: 26px;
    height: 26px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
    color: var(--muted);
    font-size: 14px;
    opacity: 0;
    place-items: center;
    transition: opacity 180ms ease;
  }

  .dd-card:not(.is-revealed):hover .dd-x,
  .dd-card:not(.is-revealed):focus-visible .dd-x {
    opacity: 1;
  }

  .dd-card.is-revealed .dd-x {
    display: none;
  }

  .dd-card.is-selected {
    transform: translateY(-8px);
  }

  .dd-card.is-selected .dd-front {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }

  .dd-slots:has(.dd-card.is-selected) .dd-card.is-revealed:not(.is-selected) .dd-front {
    filter: brightness(0.66) saturate(0.8);
  }

  .dd-card:focus-visible,
  .dd-fan-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
  }

  .dd-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .dd-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, var(--dd-card-bg) 62%);
  }

  .dd-chip {
    position: absolute;
    top: 6cqw;
    right: 6cqw;
    max-width: 88%;
    overflow: hidden;
    padding: 2cqw 4cqw;
    border-radius: 4px;
    background: var(--dd-card-bg);
    font-size: 6.5cqw;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dd-copy {
    position: absolute;
    right: 8cqw;
    bottom: 9cqw;
    left: 8cqw;
    display: flex;
    flex-direction: column;
    gap: 1.5cqw;
  }

  .dd-symbol {
    color: var(--dd-card-muted);
    font-size: 7cqw;
    font-weight: 600;
  }

  .dd-name {
    font-size: 15cqw;
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .dd-label {
    margin-top: 2cqw;
    color: var(--dd-card-muted);
    font-size: 5.5cqw;
  }

  .dd-broker {
    font-size: 7.5cqw;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .dd-amount {
    color: var(--dd-card-muted);
    font-size: 6.5cqw;
  }

  .dd-amount b {
    color: var(--dd-card-text);
    font-size: 11cqw;
    font-weight: 800;
  }

  .dd-bars {
    display: grid;
    gap: 1.8cqw;
    margin-top: 1cqw;
  }

  .dd-bars i {
    display: block;
    height: 2.6cqw;
    border-radius: 2px;
    background: var(--dd-tone);
  }

  .dd-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    margin-top: 24px;
  }

  .dd-message {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
  }

  .dd-message b {
    color: var(--accent);
    font-family: var(--font-financial, "Manrope", sans-serif);
  }

  .dd-primary,
  .dd-secondary {
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }

  .dd-primary {
    background: var(--accent);
    color: var(--bg);
  }

  .dd-secondary {
    border-color: var(--line);
    background: var(--panel-soft);
    color: var(--text);
  }

  .dd-primary:disabled,
  .dd-secondary:disabled {
    cursor: wait;
    opacity: 0.6;
  }

  .dd-lower {
    display: grid;
  }

  .dd-fan,
  .dd-clue {
    grid-area: 1 / 1;
  }

  .dd-fan {
    position: relative;
    height: 260px;
    margin-top: 16px;
  }

  .dd-fan-card {
    --dd-lift: 0px;
    position: absolute;
    top: 24px;
    left: calc(50% - 55px);
    width: 110px;
    height: 174px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transform: rotate(var(--dd-angle, 0deg)) translateY(var(--dd-lift));
    transform-origin: 50% 1000px;
    transition: transform 280ms ease, opacity 300ms ease;
  }

  .dd-fan-card .dd-face {
    border-radius: 8px;
  }

  .dd-fan-card:not(:disabled):hover,
  .dd-fan-card:focus-visible {
    --dd-lift: -28px;
  }

  .dd-fan-card:not(:disabled):hover .dd-back {
    border-color: var(--accent);
  }

  .dd-fan-card:disabled {
    cursor: default;
  }

  .dd-fan-card.is-gone {
    --dd-lift: -60px;
    opacity: 0;
    pointer-events: none;
  }

  .dd-fan.is-full .dd-fan-card:not(.is-gone) {
    cursor: not-allowed;
    opacity: 0.35;
  }

  .dd-fan.is-done {
    height: 0;
    margin-top: 0;
    transition: height 0s 600ms, margin 0s 600ms;
  }

  .dd-fan.is-done .dd-fan-card {
    --dd-lift: 240px;
    opacity: 0;
    pointer-events: none;
    transition: transform 600ms ease-in, opacity 500ms ease;
  }

  .dd-clue {
    display: grid;
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    align-self: start;
    justify-self: center;
    width: min(100%, calc(4 * 180px + 3 * 24px));
    margin: 24px 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    animation: dd-clue-in 400ms ease both;
  }

  .dd-clue[hidden] {
    display: none;
  }

  .dd-clue-id {
    display: grid;
    gap: 4px;
  }

  .dd-clue-id span {
    color: var(--muted);
    font-size: 12px;
  }

  .dd-clue-id strong {
    color: var(--text);
    font-size: 24px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .dd-clue-id small {
    margin-right: 8px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
  }

  .dd-clue-rows {
    display: grid;
    gap: 8px;
  }

  .dd-clue-rows > span,
  .dd-clue-rows p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
  }

  .dd-clue-row {
    display: grid;
    grid-template-columns: minmax(0, 96px) 1fr 52px;
    gap: 12px;
    align-items: center;
    color: var(--text);
    font-size: 13px;
  }

  .dd-clue-row > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dd-clue-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--line);
  }

  .dd-clue-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 4px;
    background: var(--dd-tone);
    transition: width 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .dd-clue-row b {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-align: right;
  }

  .dd-clue-go {
    display: grid;
    gap: 8px;
    justify-items: center;
  }

  .dd-clue-go small {
    color: var(--faint);
    font-size: 12px;
  }

  @keyframes dd-clue-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }

  .dd-hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
  }

  .dd-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(100%, 792px);
    margin: 0 auto 16px;
    padding: 8px 8px 8px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
  }

  .dd-error[hidden] {
    display: none;
  }

  .dd-error p {
    flex: 1 1 auto;
    margin: 0;
    color: var(--text);
    font-size: 13px;
  }

  .dd-error b {
    color: var(--accent);
  }

  .dd-guest,
  .dd-loading {
    display: grid;
    gap: 12px;
    justify-items: center;
    margin: 24px auto 8px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
  }

  .dd-guest p {
    margin: 0;
  }

  .dd-how {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--line-soft);
  }

  .dd-how span {
    color: var(--accent);
    font-family: var(--font-financial, "Manrope", sans-serif);
    font-size: 13px;
    font-weight: 700;
  }

  .dd-how b {
    display: block;
    margin: 4px 0;
    color: var(--text);
    font-size: 17px;
  }

  .dd-how p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
  }

  @media (max-width: 900px) {
    .dd-title {
      font-size: 32px;
    }

    .dd-slots {
      gap: 16px;
    }

    .dd-clue {
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .dd-clue-rows {
      grid-column: 1 / -1;
      grid-row: 2;
    }

    .dd-how {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .dd-card,
    .dd-inner,
    .dd-fan-card,
    .dd-clue-bar i {
      transition: none;
    }

    .dd-clue {
      animation: none;
    }
  }
}
