:root {
    --ldd-bg: #020814;
    --ldd-bg-2: #06172b;
    --ldd-panel: rgba(5, 18, 38, 0.82);
    --ldd-panel-strong: rgba(7, 23, 48, 0.94);
    --ldd-blue: #16a8ff;
    --ldd-blue-2: #0076ff;
    --ldd-cyan: #35e4ff;
    --ldd-gold: #ffc94a;
    --ldd-gold-2: #ff9f1c;
    --ldd-green: #27f58a;
    --ldd-red: #ff415d;
    --ldd-text: #f5f9ff;
    --ldd-muted: #a6b8d6;
    --ldd-line: rgba(97, 180, 255, 0.28);
    --ldd-line-gold: rgba(255, 200, 74, 0.45);
    --ldd-shadow-blue: 0 0 28px rgba(22, 168, 255, 0.35);
    --ldd-shadow-gold: 0 0 32px rgba(255, 184, 45, 0.35);
    --ldd-radius-xl: 22px;
    --ldd-radius-lg: 16px;
    --ldd-radius-md: 12px;
}

/* ── WordPress full-bleed breakout ──────────────────────────────────────────
   Twenty Twenty-Five (FSE) constrains content width.
   This breaks .ldd-page out to true 100vw regardless of parent constraints.
   html/body overflow-x:hidden prevents horizontal scrollbar from the shift.
   ─────────────────────────────────────────────────────────────────────────── */
html:has(.ldd-page),
body:has(.ldd-page) {
    overflow: hidden;
    height: 100vh;
    margin: 0;
    background: #020814;
}

/* Hide WordPress theme chrome (header/footer/page-title) on dashboard pages
   so .ldd-page can fill the entire viewport — kiosk-style fullscreen.
   Admin bar (#wpadminbar) is NOT hidden — admins still see WP nav at top. */
body:has(.ldd-page) > header,
body:has(.ldd-page) > footer,
body:has(.ldd-page) .wp-site-blocks > header,
body:has(.ldd-page) .wp-site-blocks > footer,
body:has(.ldd-page) header.wp-block-template-part,
body:has(.ldd-page) footer.wp-block-template-part,
body:has(.ldd-page) .wp-block-post-title,
body:has(.ldd-page) .entry-header {
    display: none !important;
}

/* Strip vertical padding/margin from WP content wrappers so dashboard
   sits flush with the viewport top.
   NOTE: `main:not(.ldd-main-grid)` excludes our internal dashboard main —
   only the WP theme's outer <main> gets zeroed out, leaving our inner main
   free to use its own padding. */
body:has(.ldd-page) .wp-site-blocks,
body:has(.ldd-page) main.wp-block-group,
body:has(.ldd-page) main:not(.ldd-main-grid),
body:has(.ldd-page) article,
body:has(.ldd-page) .entry-content,
body:has(.ldd-page) .wp-block-post-content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove padding/max-width from every WordPress wrapper that contains ldd-page */
.is-layout-constrained:has(.ldd-page),
.has-global-padding:has(.ldd-page),
.wp-block-post-content:has(.ldd-page),
.entry-content:has(.ldd-page) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Override WordPress inline rules that would otherwise shift/shrink our fixed page.
   .ldd-page uses position:fixed to pin to viewport, but WP's
   `.is-layout-constrained > *` and `.wp-block-post-content > *` rules apply
   `max-width: var(--wp--style--global--content-size)` and `margin-left/right: auto`
   to all children — including our .ldd-page. Override aggressively. */
.is-layout-constrained > .ldd-page,
.wp-block-post-content > .ldd-page,
.wp-block-post-content-is-layout-constrained > .ldd-page {
    margin: 0 !important;
    max-width: 100vw !important;
    width: 100vw !important;
}

/* Account for WordPress admin bar when logged in */
.ldd-page,
.ldd-page * {
    box-sizing: border-box;
}

/* Pin .ldd-page to the viewport via position:fixed so it doesn't depend on
   any WordPress wrapper's positioning math. This guarantees full-bleed at
   every viewport tier and avoids left-edge clipping when theme containers
   have padding/margin that shifts our calc(50% - 50vw) origin.
   `!important` on width/max-width overrides WP's `is-layout-constrained > *`
   rule which otherwise caps children to --wp--style--global--content-size.
   At admin sessions, leave 32px at top for #wpadminbar.                       */
.ldd-page {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    z-index: 9990;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px;
    color: var(--ldd-text);
    font-family: Inter, "Noto Sans Thai", "Prompt", Arial, sans-serif;
    background:
        radial-gradient(circle at 50% 18%, rgba(0, 119, 255, 0.34), transparent 34%),
        radial-gradient(circle at 12% 18%, rgba(255, 199, 74, 0.12), transparent 28%),
        radial-gradient(circle at 85% 65%, rgba(0, 215, 255, 0.15), transparent 34%),
        linear-gradient(180deg, #020814 0%, #06162c 48%, #020814 100%);
}

body.admin-bar .ldd-page {
    top: 32px !important;
    height: calc(100vh - 32px) !important;
}

.ldd-shell {
    width: min(1920px, 100%);
    margin: 0 auto;
}

/* Header */
.ldd-header {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) auto minmax(620px, 1.35fr);
    align-items: center;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 220, 140, 0.32);
}

.ldd-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ldd-brand-text {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ldd-logo {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    color: var(--ldd-gold);
    font-size: 34px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    flex-shrink: 0;
}

.ldd-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ldd-brand h1 {
    margin: 0;
    font-size: clamp(28px, 2.2vw, 42px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.24);
    white-space: nowrap;
}

.ldd-status-pill,
.ldd-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(39, 245, 138, 0.35);
    color: #39ff9d;
    background: rgba(0, 103, 58, 0.34);
    box-shadow: 0 0 18px rgba(39, 245, 138, 0.16);
    font-weight: 800;
    white-space: nowrap;
}

.ldd-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 999px;
    background: var(--ldd-green);
    box-shadow: 0 0 14px var(--ldd-green);
}

.ldd-header-center {
    display: flex;
    justify-content: center;
}

.ldd-user-pill {
    border-color: rgba(53, 228, 255, 0.5);
    color: #bfeeff;
    background: rgba(0, 72, 142, 0.42);
    box-shadow: 0 0 22px rgba(22, 168, 255, 0.24);
}

.ldd-user-pill strong {
    color: #ffffff;
    letter-spacing: 0.03em;
}

.ldd-user-icon {
    color: var(--ldd-cyan);
}

.ldd-header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    min-width: 0;
}

.ldd-live-controls {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(300px, 0.86fr) minmax(500px, 1.14fr);
    gap: 8px;
    margin: 0;
}

.ldd-control-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(108px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 9px 10px;
    border: 1px solid rgba(53, 228, 255, 0.24);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(9, 28, 58, 0.9), rgba(4, 14, 30, 0.92)),
        rgba(0, 0, 0, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 28px rgba(0, 0, 0, 0.22);
}

.ldd-control-card--activity {
    border-color: rgba(53, 228, 255, 0.54);
    background:
        radial-gradient(circle at 10% 0%, rgba(53, 228, 255, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(10, 38, 78, 0.94), rgba(4, 14, 30, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 22px rgba(22, 168, 255, 0.18);
}

.ldd-control-card--session {
    grid-template-columns: minmax(132px, auto) minmax(0, 1fr);
    border-color: rgba(255, 255, 255, 0.18);
}

.ldd-control-copy {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 4px;
}

.ldd-control-step {
    width: max-content;
    padding: 2px 7px;
    border-radius: 999px;
    color: #031222;
    background: linear-gradient(135deg, var(--ldd-cyan), #83f4ff);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 1000;
}

.ldd-control-card--session .ldd-control-step {
    color: #fdf7d6;
    background: rgba(255, 199, 74, 0.16);
    border: 1px solid rgba(255, 199, 74, 0.28);
}

.ldd-control-copy label {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 1000;
    white-space: nowrap;
}

.ldd-control-copy small {
    color: #9fb8dc;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;
}

.ldd-control-card .ldd-select {
    width: 100%;
    max-width: none;
    min-height: 38px;
    padding: 0 34px 0 12px;
    border-radius: 10px;
    font-size: 13px;
}

.ldd-session-control-row {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.ldd-prepare-session-btn {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(53, 228, 255, 0.5);
    border-radius: 10px;
    color: #dffaff;
    background: linear-gradient(180deg, rgba(0, 119, 210, 0.72), rgba(3, 39, 86, 0.88));
    font: inherit;
    font-size: 12px;
    font-weight: 1000;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(22, 168, 255, 0.18);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ldd-prepare-session-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--ldd-cyan);
    box-shadow: 0 0 22px rgba(53, 228, 255, 0.3);
}

.ldd-prepare-session-btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    filter: grayscale(0.35);
}

.ldd-top-btn {
    min-height: 56px;
    padding: 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(10, 21, 39, 0.72);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.04);
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ldd-top-btn span {
    margin-right: 8px;
}

.ldd-top-btn:hover {
    transform: translateY(-1px);
    border-color: var(--ldd-blue);
    box-shadow: var(--ldd-shadow-blue);
}

.ldd-top-btn-primary {
    border-color: rgba(255, 199, 74, 0.75);
    color: #fff4bf;
}

/* Layout */
.ldd-main-grid {
    display: grid;
    grid-template-columns: 460px minmax(640px, 1fr) 460px;
    gap: 24px;
    padding-top: 22px;
}

.ldd-left-column,
.ldd-center-column,
.ldd-right-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ldd-card,
.ldd-info-card,
.ldd-activity-card,
.ldd-history-card {
    position: relative;
    border: 1px solid var(--ldd-line);
    border-radius: var(--ldd-radius-xl);
    background:
        linear-gradient(180deg, rgba(9, 28, 58, 0.88), rgba(4, 14, 30, 0.88)),
        rgba(0, 0, 0, 0.35);
    box-shadow:
        0 18px 54px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.ldd-card {
    padding: 16px;
}

.ldd-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.ldd-section-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 900;
}

.ldd-count-pill {
    padding: 8px 14px;
    border-radius: 999px;
    color: #d8e9ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

/* Prize list */
.ldd-prize-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ldd-prize-item {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 14px;
    min-height: 154px;
    padding: 16px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.08), transparent 30%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.44), rgba(4, 17, 37, 0.86));
}

.ldd-prize-gold {
    border-color: rgba(255, 202, 74, 0.7);
    box-shadow: inset 0 0 28px rgba(255, 188, 45, 0.13);
}

.ldd-prize-silver {
    border-color: rgba(60, 181, 255, 0.76);
    box-shadow: inset 0 0 28px rgba(46, 162, 255, 0.16);
}

.ldd-prize-bronze {
    border-color: rgba(45, 135, 255, 0.76);
    box-shadow: inset 0 0 28px rgba(45, 135, 255, 0.14);
}

.ldd-medal {
    display: grid;
    place-items: center;
}

.ldd-medal-circle {
    width: 94px;
    height: 94px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 54px;
    font-weight: 1000;
    color: #ffffff;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.65), transparent 24%),
        radial-gradient(circle, #ffcf55 0%, #c17200 68%);
    border: 4px solid rgba(255, 245, 190, 0.65);
    box-shadow: var(--ldd-shadow-gold);
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
}

.ldd-prize-silver .ldd-medal-circle {
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.9), transparent 24%),
        radial-gradient(circle, #f2f8ff 0%, #6a85ac 70%);
    box-shadow: 0 0 28px rgba(139, 204, 255, 0.34);
}

.ldd-prize-bronze .ldd-medal-circle {
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.66), transparent 24%),
        radial-gradient(circle, #ffb463 0%, #9a4d15 70%);
    box-shadow: 0 0 28px rgba(255, 132, 47, 0.32);
}

.ldd-prize-content {
    min-width: 0;
}

.ldd-prize-label {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: 8px;
    color: #1d1700;
    background: linear-gradient(180deg, #ffe07a, #ffb22f);
    font-weight: 900;
    font-size: 16px;
}

.ldd-prize-silver .ldd-prize-label,
.ldd-prize-bronze .ldd-prize-label {
    color: #ffffff;
    background: linear-gradient(180deg, #1aa4ff, #005dff);
}

.ldd-prize-amount {
    margin-top: 8px;
    font-size: 34px;
    font-weight: 1000;
    color: #fff3c4;
    letter-spacing: -0.03em;
}

.ldd-prize-qty {
    color: var(--ldd-muted);
    font-size: 18px;
    font-weight: 700;
}

.ldd-prize-meta {
    display: flex;
    justify-content: space-between;
    margin: 12px 0 8px;
    color: #42ff9b;
    font-weight: 900;
}

.ldd-prize-meta span:last-child {
    color: #ffffff;
}

.ldd-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
}

.ldd-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ldd-blue), var(--ldd-cyan));
    box-shadow: 0 0 16px rgba(53, 228, 255, 0.48);
}

.ldd-prize-gold .ldd-progress span {
    background: linear-gradient(90deg, #ffaf22, #fff07d);
    box-shadow: 0 0 16px rgba(255, 203, 74, 0.55);
}

/* Buttons */
.ldd-secondary-btn {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(4, 14, 30, 0.82);
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ldd-secondary-btn:hover {
    border-color: var(--ldd-cyan);
    box-shadow: var(--ldd-shadow-blue);
}

/* Activity card */
.ldd-activity-card {
    display: grid;
    grid-template-columns: 210px 1fr 230px;
    min-height: 220px;
    overflow: hidden;
    border-color: rgba(46, 154, 255, 0.55);
}

.ldd-activity-image {
    padding: 14px;
}

.ldd-gift-art {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 190px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.85), transparent 12%),
        linear-gradient(135deg, #53c8ff 0%, #fff1ac 48%, #d77b00 100%);
    box-shadow:
        0 0 22px rgba(255, 210, 90, 0.28),
        inset 0 0 20px rgba(255, 255, 255, 0.28);
}

.ldd-gift-art span {
    position: absolute;
}

.ldd-palm {
    top: 8px;
    left: 8px;
    font-size: 46px;
}

.ldd-gold-bars {
    top: 58px;
    left: 58px;
    color: #ffda5e;
    font-size: 70px;
    text-shadow: 0 6px 14px rgba(80, 44, 0, 0.38);
    transform: rotate(-8deg);
}

.ldd-flower {
    right: 22px;
    bottom: 38px;
    font-size: 52px;
    color: #ffffff;
}

.ldd-glasses {
    bottom: 12px;
    left: 22px;
    font-size: 40px;
}

.ldd-activity-detail {
    padding: 28px 24px;
}

.ldd-activity-detail h2 {
    margin: 0 0 24px;
    font-size: 24px;
    font-weight: 1000;
}

.ldd-activity-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.ldd-draw-mode-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 1000;
    line-height: 1.2;
    letter-spacing: 0;
}

.ldd-draw-mode-tag--random {
    color: #9ee7ff;
    background: rgba(53, 228, 255, 0.13);
    border-color: rgba(53, 228, 255, 0.34);
}

.ldd-draw-mode-tag--select {
    color: #ffe08a;
    background: rgba(255, 203, 74, 0.13);
    border-color: rgba(255, 203, 74, 0.34);
}

.ldd-activity-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ldd-activity-stats div {
    display: grid;
    gap: 6px;
    padding-right: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.ldd-activity-stats div:last-child {
    border-right: 0;
}

.ldd-activity-stats span {
    color: var(--ldd-gold);
}

.ldd-activity-stats small {
    color: var(--ldd-muted);
    font-weight: 700;
}

.ldd-activity-stats strong {
    font-size: 22px;
    color: #ffffff;
}

.ldd-activity-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #c7ffe3;
    background: rgba(0, 107, 71, 0.34);
    font-weight: 800;
}

.ldd-activity-status strong {
    color: var(--ldd-green);
}

.ldd-activity-status.is-closed {
    color: #ffd5dc;
    background: rgba(255, 65, 93, 0.24);
    box-shadow: 0 0 18px rgba(255, 65, 93, 0.18);
}

.ldd-activity-status.is-closed .ldd-dot {
    background: var(--ldd-red);
    box-shadow: 0 0 14px var(--ldd-red);
}

.ldd-activity-status.is-closed strong {
    color: #ff9cac;
}

.ldd-live-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 29, 72, 0.26);
}

.ldd-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    color: #ffbcc7;
    background: rgba(255, 65, 93, 0.22);
    font-weight: 1000;
}

.ldd-live-badge span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--ldd-red);
    box-shadow: 0 0 14px var(--ldd-red);
}

.ldd-live-panel p {
    margin: 18px 0 8px;
    color: var(--ldd-muted);
    font-weight: 800;
}

.ldd-countdown {
    font-size: 42px;
    font-weight: 1000;
    letter-spacing: 0.02em;
}

.ldd-time-labels {
    display: flex;
    gap: 22px;
    color: #d8e7ff;
    font-size: 14px;
    font-weight: 700;
}

/* Machine */
.ldd-machine-stage {
    position: relative;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 34px 24px 28px;
    overflow: hidden;
    border-radius: 0 0 var(--ldd-radius-xl) var(--ldd-radius-xl);
}

.ldd-stage-bg {
    position: absolute;
    inset: -14px 0 0;
    background:
        radial-gradient(circle at 50% 48%, rgba(36, 151, 255, 0.52), transparent 25%),
        radial-gradient(ellipse at 50% 65%, rgba(255, 192, 55, 0.22), transparent 30%),
        linear-gradient(180deg, rgba(5, 21, 44, 0.1), rgba(3, 10, 22, 0.7));
    z-index: 0;
}

.ldd-stage-bg::before,
.ldd-stage-bg::after {
    content: "";
    position: absolute;
    top: 12%;
    width: 180px;
    height: 420px;
    border-radius: 999px;
    border: 4px solid rgba(22, 168, 255, 0.28);
    filter: blur(0.2px);
}

.ldd-stage-bg::before {
    left: 8%;
    transform: rotate(-18deg);
}

.ldd-stage-bg::after {
    right: 8%;
    transform: rotate(18deg);
}

.ldd-confetti {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 207, 75, 0.9) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(53, 228, 255, 0.8) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 2px, transparent 3px);
    background-size: 74px 86px, 96px 108px, 130px 124px;
    animation: lddFloat 8s linear infinite;
    opacity: 0.75;
    z-index: 1;
}

.ldd-lottery-machine {
    position: relative;
    width: min(520px, 82%);
    height: 340px;
    z-index: 2;
    display: grid;
    place-items: center;
}

.ldd-machine-glow {
    position: absolute;
    bottom: 36px;
    width: 140%;
    height: 86px;
    border-radius: 999px;
    background:
        radial-gradient(ellipse, rgba(22, 168, 255, 0.65), transparent 63%);
    filter: blur(10px);
}

.ldd-machine-drum {
    position: relative;
    width: 330px;
    height: 245px;
    border-radius: 50%;
    border: 8px solid rgba(160, 221, 255, 0.72);
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.08) 18%, transparent 30%),
        radial-gradient(circle at 50% 70%, rgba(22, 168, 255, 0.42), transparent 40%),
        rgba(2, 12, 30, 0.28);
    box-shadow:
        inset 0 0 42px rgba(255, 255, 255, 0.25),
        0 0 44px rgba(22, 168, 255, 0.65),
        0 16px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
}

.ldd-machine-drum::before,
.ldd-machine-drum::after {
    content: "";
    position: absolute;
    top: 42%;
    width: 34px;
    height: 94px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd96b, #a76000);
    box-shadow: 0 0 22px rgba(255, 195, 70, 0.4);
}

.ldd-machine-drum::before {
    left: -42px;
}

.ldd-machine-drum::after {
    right: -42px;
}

.ldd-ball {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    box-shadow:
        inset -8px -8px 12px rgba(0, 0, 0, 0.22),
        inset 6px 6px 10px rgba(255, 255, 255, 0.75),
        0 8px 14px rgba(0, 0, 0, 0.25);
}

.ldd-ball-gold {
    background: radial-gradient(circle at 32% 28%, #fff6c5, #ffc447 45%, #a86400 100%);
}

.ldd-ball-silver {
    background: radial-gradient(circle at 32% 28%, #ffffff, #d8e9ff 45%, #6682a8 100%);
}

.ldd-ball-blue {
    background: radial-gradient(circle at 32% 28%, #dff7ff, #19a9ff 45%, #0048a8 100%);
}

.b1 { left: 72px; bottom: 56px; }
.b2 { left: 118px; bottom: 48px; }
.b3 { left: 164px; bottom: 54px; }
.b4 { left: 210px; bottom: 50px; }
.b5 { left: 92px; bottom: 96px; }
.b6 { left: 142px; bottom: 100px; }
.b7 { left: 190px; bottom: 92px; }
.b8 { left: 112px; bottom: 136px; }
.b9 { left: 160px; bottom: 142px; }
.b10 { left: 208px; bottom: 130px; }
.b11 { left: 228px; top: 50px; }

.ldd-machine-base {
    position: absolute;
    bottom: 36px;
    width: 540px;
    max-width: 120%;
    height: 72px;
    border-radius: 50%;
    border: 4px solid rgba(22, 168, 255, 0.7);
    background:
        radial-gradient(ellipse, rgba(255, 202, 74, 0.16), transparent 52%),
        rgba(4, 14, 30, 0.85);
    box-shadow:
        inset 0 0 32px rgba(22, 168, 255, 0.42),
        0 0 36px rgba(22, 168, 255, 0.52);
    z-index: -1;
}

.ldd-draw-button {
    position: relative;
    z-index: 4;
    min-width: 480px;
    height: 82px;
    margin-top: -16px;
    border: 1px solid rgba(255, 248, 187, 0.7);
    border-radius: 16px;
    color: #ffffff;
    background:
        linear-gradient(180deg, #ffe17b 0%, #f5a620 48%, #b85e00 100%);
    box-shadow:
        0 0 32px rgba(255, 185, 35, 0.62),
        inset 0 1px 0 rgba(255, 255, 255, 0.52);
    font-size: 34px;
    font-weight: 1000;
    text-shadow: 0 2px 2px rgba(55, 20, 0, 0.28);
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.ldd-draw-button:hover {
    transform: translateY(-2px) scale(1.01);
    filter: brightness(1.08);
}

.ldd-draw-button.is-drawing {
    animation: lddPulseGold 0.8s ease infinite;
}

.ldd-draw-note {
    position: relative;
    z-index: 4;
    margin: 20px 0 0;
    color: #eef7ff;
    font-size: 17px;
    font-weight: 700;
}

/* Info cards */
.ldd-info-card,
.ldd-history-card {
    min-height: 150px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 28px;
}

.ldd-info-icon,
.ldd-history-icon {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--ldd-cyan);
    font-size: 42px;
    background: rgba(0, 136, 255, 0.14);
    box-shadow: 0 0 24px rgba(22, 168, 255, 0.34);
}

.ldd-info-card h3,
.ldd-history-card h3 {
    margin: 0 0 8px;
    color: #5adfff;
    font-size: 20px;
    font-weight: 900;
}

.ldd-info-card p,
.ldd-history-card p {
    margin: 0;
    font-size: 32px;
    font-weight: 1000;
    color: #ffffff;
}

.ldd-info-card small,
.ldd-history-card small {
    display: block;
    margin-top: 4px;
    color: #c6d9f4;
    font-size: 15px;
    font-weight: 700;
}

.ldd-check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #dcecff;
    font-weight: 700;
}

.ldd-check-line span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--ldd-green);
    border: 1px solid var(--ldd-green);
}

.ldd-copy-btn {
    margin-left: auto;
    color: #ffffff;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.ldd-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.ldd-user-coupon-card {
    border-color: rgba(22, 168, 255, 0.56);
}

.ldd-eligible-card {
    align-items: stretch;
    border-color: rgba(0, 255, 196, 0.4);
    background:
        linear-gradient(135deg, rgba(0, 118, 126, 0.26), rgba(7, 23, 48, 0.92)),
        rgba(0, 0, 0, 0.28);
}

.ldd-eligible-card .ldd-info-icon {
    align-self: center;
}

.ldd-eligible-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.ldd-eligible-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.ldd-eligible-head h3 {
    margin-bottom: 4px;
}

.ldd-eligible-percent {
    flex: 0 0 auto;
    padding: 3px 9px;
    border: 1px solid rgba(117, 255, 119, 0.38);
    border-radius: 999px;
    background: rgba(12, 42, 34, 0.7);
    color: #75ff77;
    font-size: 15px;
    line-height: 1.25;
}

.ldd-eligible-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.ldd-eligible-meta span {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid rgba(53, 228, 255, 0.16);
    border-radius: 10px;
    background: rgba(3, 16, 38, 0.42);
    color: #9fc4e6;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.ldd-eligible-meta strong {
    display: block;
    margin-top: 2px;
    color: #ffffff;
    font-size: 14px;
}

.ldd-eligible-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: #c6d9f4;
    font-size: 13px;
    font-weight: 800;
}

.ldd-eligible-progress-head strong {
    color: #ffffff;
    white-space: nowrap;
}

.ldd-green-progress {
    width: 100%;
    flex: 0 0 auto;
    margin-top: 8px;
}

.ldd-green-progress span {
    background: linear-gradient(90deg, #19ffc0, #76ff82);
}

.ldd-arrow {
    margin-left: auto;
    color: #ffffff;
    font-size: 40px;
}

/* Winners */
.ldd-winner-card {
    padding: 16px;
}

.ldd-featured-winner {
    position: relative;
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 28px;
    border: 1px solid rgba(255, 203, 74, 0.78);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 28%, rgba(255, 208, 74, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(49, 31, 3, 0.78), rgba(0, 0, 0, 0.42));
    box-shadow: inset 0 0 34px rgba(255, 196, 58, 0.18), var(--ldd-shadow-gold);
    text-align: center;
}

.ldd-featured-winner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 214, 73, 0.85) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 1px, transparent 2px);
    background-size: 48px 50px, 70px 76px;
    opacity: 0.46;
}

.ldd-crown {
    position: relative;
    z-index: 1;
    color: var(--ldd-gold);
    font-size: 52px;
    line-height: 1;
}

.ldd-avatar {
    position: relative;
    z-index: 1;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border: 4px solid var(--ldd-gold);
    border-radius: 999px;
    color: var(--ldd-gold);
    font-size: 48px;
    background: rgba(255, 199, 74, 0.12);
}

.ldd-featured-name {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    margin: 14px 0 2px;
    padding: 0 12px;
    color: #fff7da;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 0 12px rgba(255, 203, 74, 0.28);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-featured-winner h3 {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    margin: 4px 0 6px;
    padding: 0 12px;
    font-size: 28px;
    font-weight: 1000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-featured-winner p {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    color: #e4ecff;
    font-size: 18px;
}

.ldd-featured-winner span {
    position: relative;
    z-index: 1;
    color: #fff2a8;
    font-size: 18px;
    font-weight: 800;
}

.ldd-featured-winner strong {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
    padding: 0 12px;
    color: #ffdf68;
    font-size: 38px;
    font-weight: 1000;
    text-shadow: 0 0 22px rgba(255, 203, 74, 0.44);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-winner-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.ldd-winner-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    height: 68px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(2, 10, 25, 0.58);
    overflow: hidden;
}

.ldd-winner-info {
    min-width: 0;
}

.ldd-winner-info .ldd-winner-name {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-winner-rank {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 2px solid rgba(81, 188, 255, 0.72);
    color: #ffffff;
    font-size: 22px;
    font-weight: 1000;
    box-shadow: 0 0 18px rgba(22, 168, 255, 0.26);
}

.ldd-winner-info strong {
    display: block;
    font-size: 18px;
    color: #ffffff;
}

.ldd-winner-info span {
    display: block;
    max-width: 100%;
    color: #c4d5ee;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-winner-prize {
    text-align: right;
}

.ldd-winner-prize strong {
    display: block;
    color: #67d7ff;
    font-size: 18px;
    font-weight: 1000;
    line-height: 1.2;
}

.ldd-winner-prize small {
    display: block;
    margin-top: 2px;
    color: #c6d2e6;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.ldd-history-card {
    min-height: 154px;
    border-color: rgba(255, 203, 74, 0.58);
    background:
        linear-gradient(135deg, rgba(85, 54, 0, 0.25), rgba(7, 23, 48, 0.84)),
        rgba(0, 0, 0, 0.28);
}

.ldd-history-icon {
    color: var(--ldd-gold);
    background: rgba(255, 203, 74, 0.12);
    box-shadow: var(--ldd-shadow-gold);
}

.ldd-history-card h3 {
    color: #ffd86a;
}

/* Animations */
@keyframes lddFloat {
    from {
        background-position: 0 0, 0 0, 0 0;
    }
    to {
        background-position: 0 220px, 120px 260px, -80px 240px;
    }
}

@keyframes lddPulseGold {
    0%, 100% {
        box-shadow:
            0 0 32px rgba(255, 185, 35, 0.62),
            inset 0 1px 0 rgba(255, 255, 255, 0.52);
    }
    50% {
        box-shadow:
            0 0 54px rgba(255, 215, 90, 0.9),
            inset 0 1px 0 rgba(255, 255, 255, 0.72);
    }
}

.ldd-page.is-drawing .ldd-ball {
    animation: lddBallShake 0.38s ease-in-out infinite alternate;
}

.ldd-page.is-drawing .b1 { animation-delay: 0.01s; }
.ldd-page.is-drawing .b2 { animation-delay: 0.04s; }
.ldd-page.is-drawing .b3 { animation-delay: 0.07s; }
.ldd-page.is-drawing .b4 { animation-delay: 0.10s; }
.ldd-page.is-drawing .b5 { animation-delay: 0.13s; }
.ldd-page.is-drawing .b6 { animation-delay: 0.16s; }
.ldd-page.is-drawing .b7 { animation-delay: 0.19s; }
.ldd-page.is-drawing .b8 { animation-delay: 0.22s; }
.ldd-page.is-drawing .b9 { animation-delay: 0.25s; }
.ldd-page.is-drawing .b10 { animation-delay: 0.28s; }
.ldd-page.is-drawing .b11 { animation-delay: 0.31s; }

@keyframes lddBallShake {
    from {
        transform: translate(0, 0) rotate(0deg);
    }
    to {
        transform: translate(10px, -10px) rotate(18deg);
    }
}

/* ── Full-HD+ fit-to-viewport layer (≥1800px) ──────────────────────────────
   At ≥1800px the dashboard tries to fill the viewport with no vertical
   scrolling (kiosk-style). 1800 (not 1920) catches real-world 1920 monitors
   where vertical scrollbars eat ~17px and admin bar reduces effective width.
   At smaller widths the smaller-tier media queries below take over and the
   page flows naturally with scrolling.
   ─────────────────────────────────────────────────────────────────────────── */

@media (min-width: 1800px) {

/* Page: exact viewport height, clip overflow */
.ldd-page {
    height: 100vh;
    overflow: hidden;
    padding: 18px 28px;
    min-height: unset;
}

body.admin-bar .ldd-page {
    height: calc(100vh - 32px) !important;
    min-height: unset;
}

/* Shell: full height, flex column to distribute header + grid */
.ldd-shell {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header: fixed size, slightly compact */
.ldd-header {
    flex-shrink: 0;
    padding-bottom: 12px;
}

.ldd-logo {
    width: 65px;
    height: 65px;
    font-size: 28px;
}

.ldd-brand h1 {
    font-size: clamp(22px, 1.8vw, 32px);
    margin-bottom: 0;
}

.ldd-status-pill,
.ldd-user-pill {
    padding: 6px 14px;
    font-size: 14px;
}

.ldd-top-btn {
    min-height: 46px;
    font-size: 15px;
    padding: 0 20px;
}

/* Main grid: fills rest of shell height */
.ldd-main-grid {
    flex: 1;
    min-height: 0;
    align-items: stretch;
    padding-top: 12px;
    padding-bottom: 0;
}

/* All columns: fill grid cell height, clip overflow */
.ldd-left-column,
.ldd-center-column,
.ldd-right-column {
    min-height: 0;
    overflow: hidden;
}

/* ── LEFT COLUMN ───────────────────────────────────────────────── */

/* Prize list card stretches to fill column */
.ldd-prize-list-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.ldd-prize-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.ldd-prize-list-card .ldd-secondary-btn {
    flex-shrink: 0;
}

.ldd-seed-card {
    flex-shrink: 0;
}

.ldd-section-head {
    margin-bottom: 14px;
}

.ldd-section-head h2 {
    font-size: 18px;
}

.ldd-prize-list-card .ldd-prize-list {
    gap: 14px;
    /* Let the scroll area fill the card so there is no empty dark strip below. */
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    /* Shift scrollbar visually rightward — negative margin extends the
       scrollable area past the card's right edge, padding compensates so
       the prize cards stay in their original position. */
    margin-right: -10px;
    padding-right: 14px;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 203, 74, 0.4) rgba(255, 255, 255, 0.04);
}
.ldd-prize-list-card .ldd-prize-list::-webkit-scrollbar         { width: 6px; }
.ldd-prize-list-card .ldd-prize-list::-webkit-scrollbar-track   { background: rgba(255, 255, 255, 0.04); border-radius: 4px; }
.ldd-prize-list-card .ldd-prize-list::-webkit-scrollbar-thumb   { background: rgba(255, 203, 74, 0.4); border-radius: 4px; }

/* Inline "เหลือ X รางวัลในรอบนี้" small line below total-needed */
.ldd-remaining-line {
    display: block;
    margin-top: 4px;
    color: var(--ldd-muted);
    font-size: 14px;
}
.ldd-remaining-line strong {
    color: var(--ldd-gold);
    font-weight: 800;
}

.ldd-count-pill {
    font-size: 14px;
    padding: 5px 11px;
}

/* Compact prize items — fixed height so the list always shows exactly 3 */
.ldd-prize-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 164px;
    min-height: 164px;
    max-height: 164px;
    flex-shrink: 0;
    padding: 14px 16px 22px;
    position: relative;
    overflow: hidden;
}

/* Top row: medal image + text info side by side */
.ldd-prize-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Medal column */
.ldd-medal {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    place-items: unset;
    width: 80px;
}

/* PNG medal image */
.ldd-medal-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

/* Text info column — stacked label / amount / qty with consistent spacing */
.ldd-prize-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.ldd-prize-label {
    font-size: 14px;
    padding: 4px 12px;
    margin-top: 12px;
}

.ldd-prize-amount {
    font-size: 24px;
    margin-top: 0;
    line-height: 1.1;
}

.ldd-prize-qty {
    font-size: 14px;
}

/* Footer: meta + progress bar full width */
.ldd-prize-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ldd-prize-meta {
    margin: 0 0 6px;
    font-size: 14px;
}

.ldd-progress {
    height: 8px;
    margin-bottom: 6px;
}

/* ── CENTER COLUMN ─────────────────────────────────────────────── */

/* Activity card: fixed/compact, does not grow */
.ldd-activity-card {
    grid-template-columns: 185px minmax(0, 1fr) 210px;
    min-height: 128px;
    flex-shrink: 0;
}

.ldd-activity-image {
    padding: 10px;
}

.ldd-gift-art {
    min-height: 0;
}

/* Custom 1:1 photo uploaded by admin — true square, centered in the slot.
   Sized similar to the original gift-art block: ~210px × 210px square. */
.ldd-activity-photo {
    width: 180px;
    height: 180px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    border: 2px solid rgba(255, 203, 74, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto;                                                  /* center inside the image slot */
}

.ldd-activity-detail {
    padding: 12px 18px;
}

.ldd-activity-detail h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.ldd-activity-status-row {
    margin-top: 8px;
}

.ldd-activity-stats {
    gap: 12px;
}

.ldd-activity-stats div {
    gap: 4px;
    padding-right: 12px;
}

.ldd-activity-stats small {
    font-size: 14px;
}

.ldd-activity-stats strong {
    font-size: 17px;
}

.ldd-activity-status {
    padding: 5px 11px;
    font-size: 14px;
}

.ldd-live-panel {
    padding: 14px 18px;
}

.ldd-live-badge {
    padding: 6px 14px;
    font-size: 14px;
}

.ldd-live-panel p {
    margin: 8px 0 4px;
    font-size: 14px;
}

.ldd-session-name {
    font-size: 21px;
    line-height: 1.08;
}

.ldd-countdown {
    font-size: 34px;
}

.ldd-time-labels {
    font-size: 14px;
    gap: 18px;
}

/* Machine stage: fills all remaining center space */
.ldd-machine-stage {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(210px, 1fr) auto auto auto;
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: center;
    gap: 9px;
    padding: 18px 24px 24px;
}

.ldd-stage-bg {
    inset: 0;
    background:
        radial-gradient(circle at 50% 38%, rgba(36, 151, 255, 0.44), transparent 24%),
        radial-gradient(ellipse at 50% 68%, rgba(255, 192, 55, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(5, 21, 44, 0.1), rgba(3, 10, 22, 0.7));
}

.ldd-stage-bg::before,
.ldd-stage-bg::after {
    top: 8%;
    width: 155px;
    height: 360px;
}

.ldd-lottery-machine {
    width: min(440px, 76%);
    height: 218px;
    align-self: center;
    justify-self: center;
    margin: 0;
}

.ldd-machine-glow {
    bottom: 20px;
    width: 118%;
    height: 58px;
}

.ldd-machine-drum {
    transform: scale(0.78);
    transform-origin: center;
}

.ldd-machine-base {
    bottom: 22px;
    transform: scale(0.78);
    transform-origin: center;
}

.ldd-draw-picker {
    width: min(520px, 76%);
    justify-self: center;
    margin: 0;
}

.ldd-prize-select {
    min-height: 48px;
    font-size: 16px;
}

/* Draw button: slightly compact */
.ldd-draw-button {
    min-width: min(390px, 76%);
    justify-self: center;
    height: 54px;
    margin-top: 0;
    font-size: 23px;
}

.ldd-draw-note {
    margin: 1px 0 0;
    font-size: 14px;
    line-height: 1.25;
    text-align: center;
}

.ldd-action-row {
    justify-content: center;
    justify-self: center;
    margin-top: 4px;
    padding-bottom: 8px;
}

.ldd-mini-btn {
    min-height: 36px;
    padding: 0 16px;
    font-size: 14px;
}

/* Bottom info cards: compact, fixed height */
.ldd-bottom-grid {
    flex-shrink: 0;
}

.ldd-info-card,
.ldd-history-card {
    min-height: 88px;
    padding: 14px 20px;
}

.ldd-info-icon,
.ldd-history-icon {
    width: 58px;
    height: 58px;
    font-size: 32px;
}

.ldd-info-card h3,
.ldd-history-card h3 {
    font-size: 16px;
}

.ldd-info-card p,
.ldd-history-card p {
    font-size: 24px;
}

.ldd-info-card small,
.ldd-history-card small {
    font-size: 14px;
}

/* ── RIGHT COLUMN ──────────────────────────────────────────────── */

/* Winner card: stretches to fill column */
.ldd-winner-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Featured winner: grows to fill all available space in the card */
.ldd-featured-winner {
    flex: 1;
    min-height: 0;
    padding: 10px 14px;
}

.ldd-crown {
    font-size: 36px;
}

.ldd-avatar {
    width: 64px;
    height: 64px;
    font-size: 34px;
    border-width: 3px;
}

.ldd-featured-winner .ldd-featured-name {
    margin: 8px 0 2px;
    font-size: 18px;
}

.ldd-featured-winner h3 {
    margin: 4px 0 2px;
    font-size: 24px;
}

.ldd-featured-winner p {
    margin: 0 0 4px;
    font-size: 14px;
}

.ldd-featured-winner span {
    font-size: 14px;
}

.ldd-featured-winner strong {
    margin-top: 2px;
    font-size: 30px;
    text-shadow: 0 0 18px rgba(255, 203, 74, 0.5);
}

/* Winner list: natural height, sits directly above the button */
.ldd-winner-list {
    flex: 0 0 auto;
    overflow: hidden;
    margin-top: 8px;
}

.ldd-winner-row {
    min-height: 52px;
    padding: 7px 12px;
}

.ldd-winner-rank {
    width: 34px;
    height: 34px;
    font-size: 17px;
}

.ldd-winner-info strong {
    font-size: 15px;
}

.ldd-winner-info span {
    font-size: 14px;
}

.ldd-winner-prize strong {
    font-size: 16px;
}

.ldd-winner-prize small {
    font-size: 16px;
}

.ldd-winner-card .ldd-secondary-btn {
    flex-shrink: 0;
    height: 40px;
    font-size: 14px;
    margin-top: 8px;
}

/* History card: compact, fixed */
.ldd-history-card {
    flex-shrink: 0;
}

/* Live admin controls */
.ldd-live-controls {
    display: grid;
    grid-template-columns: minmax(300px, 0.86fr) minmax(500px, 1.14fr);
    justify-content: stretch;
    gap: 8px;
    width: min(980px, 100%);
    margin: 0;
}

.ldd-select {
    min-height: 46px;
    max-width: 260px;
    padding: 0 42px 0 14px;
    border: 1px solid rgba(53, 228, 255, 0.42);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(4, 14, 30, 0.92);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    outline: none;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.04);
}

.ldd-select:focus {
    border-color: var(--ldd-gold);
    box-shadow: var(--ldd-shadow-gold);
}

.ldd-select option {
    color: #07111f;
    background: #ffffff;
}

.ldd-session-name {
    max-width: 100%;
    color: #ffffff;
    font-size: 21px;
    line-height: 1.08;
    font-weight: 1000;
    text-align: center;
}

.ldd-draw-picker {
    position: relative;
    z-index: 4;
    width: min(520px, 76%);
    justify-self: center;
    margin: 0;
}

.ldd-prize-select {
    width: 100%;
    max-width: none;
    min-height: 48px;
    font-size: 16px;
}

.ldd-action-row {
    position: relative;
    z-index: 4;
    display: flex;
    justify-content: center;
    justify-self: center;
    gap: 12px;
    margin-top: 4px;
    padding-bottom: 8px;
}

.ldd-mini-btn {
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    color: #ffffff;
    background: rgba(4, 14, 30, 0.82);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.ldd-mini-btn-primary {
    border-color: rgba(39, 245, 138, 0.48);
    color: #d7ffe9;
    background: rgba(0, 103, 58, 0.34);
}

.ldd-mini-btn:disabled,
.ldd-draw-button:disabled,
.ldd-select:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    filter: grayscale(0.35);
}

@media (max-width: 1180px) {
    .ldd-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .ldd-header-center {
        justify-content: flex-start;
    }
    .ldd-header-actions {
        justify-content: stretch;
    }
    .ldd-live-controls {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .ldd-live-controls {
        grid-template-columns: 1fr;
    }
    .ldd-session-control-row {
        grid-template-columns: 1fr;
    }
    .ldd-prepare-session-btn {
        width: 100%;
    }
}

.ldd-draw-note.is-error {
    color: #ffb9c4;
}

.ldd-draw-note.is-success {
    color: #b8ffd5;
}

.ldd-prize-item.is-complete {
    opacity: 0.72;
}

.ldd-empty-state {
    display: grid;
    min-height: 280px;
    place-items: center;
    margin-top: 64px;
    border: 1px solid var(--ldd-line);
    border-radius: var(--ldd-radius-xl);
    color: #ffffff;
    background: var(--ldd-panel-strong);
    font-size: 24px;
    font-weight: 900;
}

/* ── Seed hash card: fixed height, never expands ─────────────────────────────
   Placed last so it wins the cascade over all .ldd-info-card overrides above. */
.ldd-seed-card {
    height: var(--ldd-seed-h, 128px) !important;
    max-height: var(--ldd-seed-h, 128px) !important;
    overflow: hidden !important;
    align-items: center !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

.ldd-seed-card > div:not(.ldd-info-icon) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ldd-seed-card h3 {
    font-size: 14px !important;
    margin: 0 0 6px !important;
}

.ldd-seed-card p {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    word-break: break-all;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0 0 4px !important;
    color: #7dd8ff;
}

.ldd-seed-card .ldd-check-line {
    font-size: 14px !important;
    margin-top: 4px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-seed-card .ldd-check-line span {
    width: 16px !important;
    height: 16px !important;
    font-size: 14px !important;
}

/* Winner popup */
.ldd-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 8, 20, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: Inter, "Noto Sans Thai", "Prompt", Arial, sans-serif;
}

.ldd-popup-overlay.is-open {
    display: flex;
    animation: lddPopupFade 0.18s ease-out;
}

.ldd-popup-card {
    position: relative;
    width: min(440px, 100%);
    min-height: 400px;
    padding: 36px 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 203, 74, 0.7);
    border-radius: var(--ldd-radius-xl);
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 208, 74, 0.22), transparent 55%),
        linear-gradient(150deg, rgba(40, 26, 4, 0.96), rgba(7, 23, 48, 0.96));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), var(--ldd-shadow-gold);
    color: var(--ldd-text);
    text-align: center;
    animation: lddPopupPop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.ldd-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ldd-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.ldd-popup-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ldd-text);
}

.ldd-popup-rank {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 203, 74, 0.16);
    border: 1px solid rgba(255, 203, 74, 0.45);
    color: var(--ldd-gold);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.ldd-popup-name {
    margin: 0 auto 10px;
    max-width: 100%;
    padding: 0 8px;
    color: #fff7da;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-popup-phone {
    margin: 0 0 10px;
    max-width: 100%;
    padding: 0 8px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff7da;
    text-shadow: 0 0 20px rgba(255, 203, 74, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-popup-coupon {
    margin: 0 0 18px;
    font-size: 15px;
    color: var(--ldd-muted);
}

.ldd-popup-coupon strong {
    color: var(--ldd-text);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ldd-popup-prize {
    margin: 0 0 6px;
    font-size: 16px;
    color: #e4ecff;
}

.ldd-popup-amount {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 900;
    color: var(--ldd-gold);
    text-shadow: 0 0 18px rgba(255, 203, 74, 0.36);
}

.ldd-popup-ok {
    min-width: 140px;
    padding: 10px 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ldd-gold), var(--ldd-gold-2));
    color: #1a0f00;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 159, 28, 0.35);
    transition: transform 0.12s, box-shadow 0.15s;
}

.ldd-popup-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(255, 159, 28, 0.45);
}

@keyframes lddPopupFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lddPopupPop {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 480px) {
    .ldd-popup-card { padding: 28px 20px 22px; }
    .ldd-popup-phone { font-size: 26px; }
    .ldd-popup-amount { font-size: 24px; }
}

.ldd-popup-overlay {
    background:
        radial-gradient(circle at 50% 22%, rgba(255, 203, 74, 0.18), transparent 32%),
        radial-gradient(circle at 18% 78%, rgba(53, 228, 255, 0.12), transparent 28%),
        rgba(1, 7, 18, 0.84);
    backdrop-filter: blur(9px) saturate(1.25);
    -webkit-backdrop-filter: blur(9px) saturate(1.25);
}

.ldd-popup-card {
    width: min(560px, 100%);
    min-height: 500px;
    padding: 34px 40px 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 203, 74, 0.82);
    background:
        radial-gradient(circle at 50% -8%, rgba(255, 232, 145, 0.32), transparent 34%),
        radial-gradient(circle at 12% 14%, rgba(53, 228, 255, 0.15), transparent 30%),
        linear-gradient(150deg, rgba(54, 34, 4, 0.96), rgba(7, 19, 42, 0.98) 54%, rgba(3, 12, 28, 0.98));
    box-shadow:
        0 34px 86px rgba(0, 0, 0, 0.68),
        0 0 54px rgba(255, 203, 74, 0.28),
        inset 0 0 44px rgba(255, 203, 74, 0.08);
    animation: lddPopupPop 0.34s cubic-bezier(0.16, 0.95, 0.24, 1.18), lddPopupGlow 2.6s ease-in-out infinite;
}

.ldd-popup-card::before,
.ldd-popup-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.ldd-popup-card::before {
    inset: -42%;
    background:
        conic-gradient(from 0deg, transparent 0 18deg, rgba(255, 203, 74, 0.16) 24deg, transparent 34deg 70deg, rgba(53, 228, 255, 0.12) 78deg, transparent 88deg);
    opacity: 0.7;
    animation: lddPopupRays 10s linear infinite;
}

.ldd-popup-card::after {
    inset: 0;
    background:
        linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.16) 47%, transparent 58%),
        radial-gradient(circle at 50% 100%, rgba(255, 203, 74, 0.16), transparent 42%);
    mix-blend-mode: screen;
    opacity: 0.75;
    animation: lddPopupShine 2.8s ease-in-out infinite;
}

.ldd-popup-card > * {
    position: relative;
    z-index: 1;
}

.ldd-popup-trophy {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin: 2px auto 10px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.38), transparent 34%),
        linear-gradient(135deg, rgba(255, 203, 74, 0.28), rgba(255, 159, 28, 0.12));
    border: 1px solid rgba(255, 203, 74, 0.46);
    box-shadow: 0 0 34px rgba(255, 203, 74, 0.34);
    font-size: 42px;
    animation: lddPopupFloat 1.9s ease-in-out infinite;
}

.ldd-popup-kicker {
    color: #ffe8a3;
    font-size: clamp(18px, 2.1vw, 22px);
    font-weight: 1000;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ldd-popup-congrats {
    margin: 4px 0 14px;
    color: #ffffff;
    font-size: 28px;
    line-height: 1.18;
    font-weight: 1000;
    text-shadow: 0 0 24px rgba(255, 203, 74, 0.42);
}

.ldd-popup-rank {
    margin-bottom: 10px;
    padding: 8px 22px;
    background: rgba(255, 203, 74, 0.2);
    border-color: rgba(255, 203, 74, 0.64);
    color: #ffe8a3;
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 900;
}

.ldd-popup-name {
    margin-bottom: 8px;
    color: #fff7da;
    font-size: clamp(28px, 4.2vw, 40px);
    line-height: 1.08;
    font-weight: 1000;
    text-shadow: 0 0 26px rgba(255, 203, 74, 0.48);
}

.ldd-popup-phone {
    margin-bottom: 8px;
    font-size: clamp(26px, 3.4vw, 34px);
    color: #f4f9ff;
    text-shadow: 0 0 20px rgba(53, 228, 255, 0.32);
}

.ldd-popup-coupon {
    margin-bottom: 16px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(2, 10, 25, 0.42);
    color: #c7d8ef;
}

.ldd-popup-prize-box {
    width: min(340px, 100%);
    margin: 0 auto 22px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 203, 74, 0.34);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 203, 74, 0.18), transparent 58%),
        rgba(2, 10, 25, 0.42);
    box-shadow: inset 0 0 20px rgba(255, 203, 74, 0.08);
}

.ldd-popup-prize {
    margin-bottom: 4px;
    color: #e9f2ff;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 1000;
    line-height: 1.2;
}

.ldd-popup-amount {
    margin: 0;
    color: #ffd35c;
    font-size: clamp(40px, 4.8vw, 56px);
    line-height: 1.05;
    font-weight: 1000;
    text-shadow: 0 0 24px rgba(255, 203, 74, 0.62);
    animation: lddPopupAmountPulse 1.4s ease-in-out infinite;
}

.ldd-popup-ok {
    min-width: 168px;
    min-height: 48px;
    font-size: 17px;
    box-shadow: 0 10px 28px rgba(255, 159, 28, 0.38), 0 0 24px rgba(255, 203, 74, 0.20);
}

.ldd-popup-spark {
    position: absolute;
    z-index: 1;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ffe27a;
    box-shadow: 0 0 16px rgba(255, 226, 122, 0.9);
    animation: lddPopupSpark 1.6s ease-in-out infinite;
}

.ldd-popup-spark-a { top: 74px; left: 72px; }
.ldd-popup-spark-b { top: 118px; right: 86px; animation-delay: 0.3s; }
.ldd-popup-spark-c { bottom: 128px; left: 96px; animation-delay: 0.65s; }

@keyframes lddPopupGlow {
    0%, 100% { box-shadow: 0 34px 86px rgba(0, 0, 0, 0.68), 0 0 46px rgba(255, 203, 74, 0.24), inset 0 0 44px rgba(255, 203, 74, 0.08); }
    50% { box-shadow: 0 34px 86px rgba(0, 0, 0, 0.68), 0 0 68px rgba(255, 203, 74, 0.40), inset 0 0 54px rgba(255, 203, 74, 0.12); }
}

@keyframes lddPopupRays {
    to { transform: rotate(360deg); }
}

@keyframes lddPopupShine {
    0%, 100% { transform: translateX(-18%); opacity: 0.35; }
    50% { transform: translateX(18%); opacity: 0.85; }
}

@keyframes lddPopupFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.04); }
}

@keyframes lddPopupSpark {
    0%, 100% { transform: scale(0.75); opacity: 0.35; }
    50% { transform: scale(1.7); opacity: 1; }
}

@keyframes lddPopupAmountPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

@media (max-width: 480px) {
    .ldd-popup-card {
        min-height: 460px;
        padding: 30px 18px 24px;
    }
    .ldd-popup-trophy {
        width: 62px;
        height: 62px;
        font-size: 34px;
    }
    .ldd-popup-kicker { font-size: 17px; }
    .ldd-popup-congrats { font-size: 22px; }
    .ldd-popup-rank { font-size: 18px; }
    .ldd-popup-name { font-size: 28px; }
    .ldd-popup-phone { font-size: 24px; }
    .ldd-popup-prize { font-size: 20px; }
    .ldd-popup-amount { font-size: 38px; }
}

/* History card promoted to <a>: keep same look, add interactive states */
a.ldd-history-card {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

a.ldd-history-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 203, 74, 0.78);
    box-shadow: 0 12px 28px rgba(255, 184, 45, 0.22);
}

a.ldd-history-card:hover .ldd-arrow { transform: translateX(3px); }

a.ldd-history-card .ldd-arrow {
    transition: transform 0.15s;
}

a.ldd-history-card.is-disabled {
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

} /* end @media (min-width: 1920px) — Full-HD+ fit layer */

/* ════════════════════════════════════════════════════════════════════════
   Slot Reel display  (replaces legacy lottery machine)
   ──────────────────────────────────────────────────────────────────────── */

/* Generic archive helper — keeps DOM but hidden */
.ldd-archived { display: none !important; }

/* Random draw mode: hide prize picker — server picks the prize automatically */
.ldd-page[data-draw-mode="random"] .ldd-draw-picker {
    display: none !important;
}

/* Hide legacy decorative ellipse loops when slot reel is the active display.
   Using :has() so that reverting to lottery machine restores them automatically. */
.ldd-machine-stage:has(.ldd-reel-rack) .ldd-stage-bg::before,
.ldd-machine-stage:has(.ldd-reel-rack) .ldd-stage-bg::after {
    display: none;
}

.ldd-reel-rack {
    --ldd-reel-h: 120px;
    position: relative;
    width: 100%;
    min-height: 210px;
    align-self: stretch;
    justify-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

.ldd-reel-rack-label {
    align-self: center;
    margin-bottom: 4px;
    padding: 6px 22px;
    border-radius: 999px;
    background: rgba(2, 8, 20, 0.96);
    border: 1px solid rgba(255, 203, 74, 0.7);
    color: var(--ldd-gold);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.6px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 22px rgba(255, 203, 74, 0.28);
    z-index: 3;
}

.ldd-reel-row {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1fr;
    gap: 14px;
    align-items: end;
}

.ldd-reel-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ldd-reel-col-label {
    text-align: center;
    color: var(--ldd-cyan);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.ldd-reel {
    position: relative;
    height: var(--ldd-reel-h, 120px);
    overflow: hidden;
    /* Captain America–style chrome ring: silver outer + red stripe inside */
    border: 3px solid #cbd0d7;
    border-radius: 14px;
    background:
        linear-gradient(180deg, #1d3879 0%, #14275e 50%, #0d1d4a 100%);
    box-shadow:
        inset 0 0 0 2px #b50d1e,
        inset 0 0 0 4px #e2e6ec,
        inset 0 0 18px rgba(0, 0, 0, 0.25);
}

.ldd-reel::before,
.ldd-reel::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 18px;
    z-index: 2;
    pointer-events: none;
}

.ldd-reel::before {
    top: 0;
    background: linear-gradient(180deg, rgba(29, 56, 121, 0.7), rgba(29, 56, 121, 0));
}

.ldd-reel::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(13, 29, 74, 0.7), rgba(13, 29, 74, 0));
}

.ldd-reel-pointer {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 3;
    pointer-events: none;
    top: calc(50% - 6px);
}

.ldd-reel-pointer.left {
    left: 0;
    border-style: solid;
    border-width: 6px 0 6px 9px;
    border-color: transparent transparent transparent var(--ldd-gold);
}

.ldd-reel-pointer.right {
    right: 0;
    border-style: solid;
    border-width: 6px 9px 6px 0;
    border-color: transparent var(--ldd-gold) transparent transparent;
}

.ldd-reel-strip {
    will-change: transform;
    transform: translateY(0);
}

.ldd-reel-item {
    height: var(--ldd-reel-h, 120px);
    display: grid;
    place-items: center;
    padding: 0 14px;
    text-align: center;
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldd-reel-item-name  { font-size: 26px; }
.ldd-reel-item-phone {
    font-size: 34px;
    letter-spacing: 1.8px;
    color: #fff7da;
    text-shadow: 0 0 18px rgba(255, 203, 74, 0.5);
}
.ldd-reel-item-prize {
    font-size: 26px;
    color: var(--ldd-green);
    text-shadow: 0 0 16px rgba(39, 245, 138, 0.45);
}
.ldd-reel-item-prize.is-voucher {
    color: #c084ff;
    text-shadow: 0 0 16px rgba(192, 132, 255, 0.45);
}

.ldd-reel.is-locked {
    animation: lddReelLock 0.6s ease-out;
}

@keyframes lddReelLock {
    0%   { box-shadow: inset 0 0 14px rgba(255, 196, 58, 0.16); border-color: rgba(255, 203, 74, 0.6); }
    40%  { box-shadow: inset 0 0 28px rgba(255, 245, 184, 0.55), 0 0 22px rgba(255, 245, 184, 0.5); border-color: #fff7da; }
    100% { box-shadow: inset 0 0 14px rgba(255, 196, 58, 0.16); border-color: rgba(255, 203, 74, 0.6); }
}

/* ────────────────────────────────────────────────────────────────────────
   Captain America frame variant  (.ldd-reel-rack--captain)
   ────────────────────────────────────────────────────────────────────────
   Drop-in modifier — requires `slot-reel-frame.svg` to live next to this
   CSS file. To revert: just remove the `ldd-reel-rack--captain` class
   from the markup; the original chrome rack styling resumes automatically.

   SVG viewBox 1000×230. Reel windows positions (% of viewBox):
     top: 19.13% / height: 61.74% / width: 28%
     left: 4.9% (reel 1) · 36% (reel 2) · 67.1% (reel 3)
   ──────────────────────────────────────────────────────────────────────── */

/* Captain frame extends beyond center column padding into the column gaps.
   Without this override, .ldd-center-column's `overflow: hidden` (set in
   the 1080-fit layer for kiosk clipping) silently clips the wider rack
   back to column width — every previous width tweak above the column
   threshold was visually identical.

   Using `.ldd-page--captain` parent class (set in PHP) for reliable cross-
   browser targeting, avoiding any `:has()` engine quirks. `!important`
   ensures override of the 1080-fit rule with confident specificity. */
.ldd-page--captain .ldd-center-column {
    overflow: visible !important;
}
.ldd-page--captain .ldd-machine-stage {
    overflow: visible !important;
}

.ldd-reel-rack--captain {
    /* SVG provides all decorative chrome — strip the previous styling.
       Use explicit pixels (no aspect-ratio coupling) so width and height
       can be tuned independently. These values target the 1080-fit kiosk
       (≥1800 viewport, center column ~896 wide) — adjust freely.

       --ldd-reel-h overrides the base 120px to match the actual visible
       reel cell height (~70px) inside the captain frame, so reel-items
       don't overflow their cells and content stays vertically centered. */
    --ldd-reel-h: 70px;
    aspect-ratio: unset;
    /* Stretch to fit available cell width, centered horizontally */
    width: 100%;
    max-width: 100%;
    height: 165px;
    margin-left: auto;
    margin-right: auto;
    min-height: 0 !important;
    align-self: center !important;
    justify-self: center !important;
    margin-top: 36px;        /* room for floating LIVE label above */
    padding: 0;
    border: 0;
    /* 100% 100% stretches SVG to fill container — at 1000:195 the squish
       is ~15% but rounded corners stay readable. Reel cell percentages
       (19.13% top / 61.74% height) still align since both SVG content
       and CSS overlay reference the same container. */
    background:
        url("slot-reel-frame.svg") center / 100% 100% no-repeat;
    box-shadow: none;
    display: block;          /* override flex column from base */
}

/* "★ LIVE …" label floats above the SVG frame */
.ldd-reel-rack--captain .ldd-reel-rack-label {
    display: inline-block !important;
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    align-self: auto;        /* clear flex prop from base */
    z-index: 4;
}

/* Replace grid layout with absolute positioning over the SVG windows */
.ldd-reel-rack--captain .ldd-reel-row {
    position: absolute;
    inset: 0;
    display: block;
    grid-template-columns: none;
    gap: 0;
}

.ldd-reel-rack--captain .ldd-reel-col {
    position: absolute;
    /* Aligned exactly with SVG reel windows so the frame wraps cells perfectly:
       SVG inner blue: y=44, h=142 in viewBox 230  →  19.13% / 61.74% */
    top: 19.13%;
    height: 61.74%;
    width: 28%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ldd-reel-rack--captain .ldd-reel-col:nth-child(1) { left:  4.9%; }
.ldd-reel-rack--captain .ldd-reel-col:nth-child(2) { left: 36.0%; }
.ldd-reel-rack--captain .ldd-reel-col:nth-child(3) { left: 67.1%; }

/* Tiny column label sitting at the top inside each reel cell */
.ldd-reel-rack--captain .ldd-reel-col-label {
    flex-shrink: 0;
    padding: 4px 0 0;
    color: #6cb6ff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    text-transform: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Reel becomes transparent — SVG window provides the blue chrome */
.ldd-reel-rack--captain .ldd-reel {
    flex: 1;
    height: auto;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}

/* Edge fade gradients still work but tinted to match SVG dark blue */
.ldd-reel-rack--captain .ldd-reel::before {
    background: linear-gradient(180deg, rgba(5, 29, 82, 0.95), rgba(5, 29, 82, 0));
    height: 12px;
}
.ldd-reel-rack--captain .ldd-reel::after {
    background: linear-gradient(0deg, rgba(5, 29, 82, 0.95), rgba(5, 29, 82, 0));
    height: 12px;
}

/* Pointers no longer needed — SVG provides side accents */
.ldd-reel-rack--captain .ldd-reel-pointer { display: none; }

/* Lock-in flash uses subtler glow over the silver SVG border */
.ldd-reel-rack--captain .ldd-reel.is-locked {
    animation: lddReelLockCaptain 0.6s ease-out;
}

@keyframes lddReelLockCaptain {
    0%   { box-shadow: none; }
    40%  { box-shadow: 0 0 22px rgba(255, 245, 184, 0.7), inset 0 0 18px rgba(255, 245, 184, 0.45); }
    100% { box-shadow: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   Lucky Draw Announcement page  (shortcode: [lucky_draw_announcement])
   ──────────────────────────────────────────────────────────────────────── */

/* Break out of WordPress theme constraints — full-bleed to 100vw */
html:has(.ldda-page),
body:has(.ldda-page) {
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    background: #020814;
}

/* Hide WordPress theme chrome (header/footer/page-title) on announcement
   page — strips everything unrelated, leaves the announcement focused on
   its own content. Admin bar (#wpadminbar) NOT hidden. */
body:has(.ldda-page) > header:not(.avl-topbar),
body:has(.ldda-page) > footer:not(.avl-footer),
body:has(.ldda-page) .wp-site-blocks > header,
body:has(.ldda-page) .wp-site-blocks > footer,
body:has(.ldda-page) header.wp-block-template-part,
body:has(.ldda-page) footer.wp-block-template-part,
body:has(.ldda-page) .wp-block-post-title,
body:has(.ldda-page) .entry-header {
    display: none !important;
}

/* Strip vertical padding/margin from WP wrappers so announcement sits flush */
body:has(.ldda-page) .wp-site-blocks,
body:has(.ldda-page) main,
body:has(.ldda-page) article,
body:has(.ldda-page) .entry-content,
body:has(.ldda-page) .wp-block-post-content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.is-layout-constrained:has(.ldda-page),
.has-global-padding:has(.ldda-page),
.wp-block-post-content:has(.ldda-page),
.entry-content:has(.ldda-page) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Old margin-left:calc(50% - 50vw) trick removed — superseded by
   position:fixed below which doesn't depend on parent positioning. */

.ldda-page,
.ldda-page * { box-sizing: border-box; }

/* Pin .ldda-page to viewport (same approach as .ldd-page) so it doesn't
   depend on WordPress wrapper math — guarantees true fullscreen with no
   bleed of theme background at top/right/bottom. Internal content scrolls. */
.ldda-page {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh !important;
    margin: 0 !important;
    z-index: auto;
    overflow: visible !important;
    padding: 32px 24px 48px;
    color: var(--ldd-text);
    font-family: Inter, "Noto Sans Thai", "Prompt", Arial, sans-serif;
    font-size: 16px;
    background:
        radial-gradient(circle at 50% 12%, rgba(0, 119, 255, 0.32), transparent 40%),
        radial-gradient(circle at 12% 60%, rgba(255, 199, 74, 0.10), transparent 32%),
        linear-gradient(180deg, #020814 0%, #06162c 48%, #020814 100%);
}

body.admin-bar .ldda-page {
    top: auto !important;
    min-height: 100vh !important;
}

/* Override any WP layout-constrained margin auto that would shift the fixed
   element off its top:0/left:0 anchor. */
.is-layout-constrained > .ldda-page,
.wp-block-post-content > .ldda-page {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

body:has(.ldda-page) .entry-content > .avl-footer,
body:has(.ldda-page) .wp-block-post-content > .avl-footer,
body:has(.ldcc-page) .entry-content > .avl-footer,
body:has(.ldcc-page) .wp-block-post-content > .avl-footer {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.ldda-shell {
    width: min(1600px, 96%);
    margin: 0 auto;
}

/* Toolbar (admin-only back button) */
/* (.ldda-toolbar removed — back button now lives inside .ldda-title) */

.ldda-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(53, 228, 255, 0.32);
    background: rgba(2, 10, 25, 0.62);
    color: var(--ldd-cyan);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}

.ldda-back-btn:hover {
    background: rgba(22, 168, 255, 0.18);
    border-color: var(--ldd-cyan);
    color: #ffffff;
    transform: translateX(-2px);
    box-shadow: 0 6px 18px rgba(22, 168, 255, 0.28);
}

.ldda-back-arrow {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.15s;
}

.ldda-back-btn:hover .ldda-back-arrow {
    transform: translateX(-3px);
}

/* Title — compact bar with back button on the left */
.ldda-title {
    position: relative;
    margin: 0 0 22px;
    padding: 14px 24px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(22, 168, 255, 0.18), transparent 60%),
        radial-gradient(circle at 50% 100%, rgba(255, 203, 74, 0.10), transparent 70%);
    border-radius: var(--ldd-radius-lg);
    overflow: hidden;
}

.ldda-title h1 {
    margin: 0 0 4px;
    font-size: 30px;
    font-weight: 1000;
    color: #ffffff;
    text-shadow: 0 0 22px rgba(22, 168, 255, 0.45);
    letter-spacing: 0.5px;
}

.ldda-title .ldda-leaf {
    display: inline;
    margin: 0 6px;
    font-size: 24px;
    color: var(--ldd-gold);
    vertical-align: -2px;
}

.ldda-title-copy,
.ldda-title-line {
    display: inline;
}

.ldda-subtitle {
    margin: 0;
    color: var(--ldd-muted);
    font-size: 14px;
}

/* Back button absolutely positioned at left of title bar (admin-only) */
.ldda-title .ldda-back-btn {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    z-index: 2;
}

.ldda-title .ldda-back-btn:hover {
    transform: translateY(-50%) translateX(-2px);
}

/* Session picker — pill dropdown anchored at the right of the title bar */
.ldda-session-picker {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    color: #cfeaff;
}
.ldda-session-picker label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: rgba(207, 234, 255, 0.7);
    text-transform: uppercase;
    white-space: nowrap;
    padding-left: 4px;
}
.ldda-session-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.ldda-session-picker select {
    min-width: 260px;
    max-width: 360px;
    padding: 10px 38px 10px 18px;          /* room for the chevron on the right */
    border-radius: 999px;                  /* pill button */
    border: 1px solid rgba(53, 228, 255, 0.55);
    background: linear-gradient(135deg, rgba(8, 28, 60, 0.95), rgba(4, 14, 32, 0.95));
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(53, 228, 255, 0.15) inset;
    transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}
.ldda-session-picker select::-ms-expand { display: none; }
.ldda-session-picker select:hover {
    transform: translateY(-1px);
    border-color: var(--ldd-cyan);
    box-shadow: 0 10px 24px rgba(53, 228, 255, 0.28), 0 0 0 1px rgba(53, 228, 255, 0.25) inset;
}
.ldda-session-picker select:focus {
    outline: none;
    border-color: var(--ldd-cyan);
    box-shadow: 0 0 0 3px rgba(53, 228, 255, 0.25);
}
.ldda-session-picker option {
    background: #04122a;
    color: #fff;
}
.ldda-session-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--ldd-cyan);
    font-size: 14px;
    line-height: 1;
}

/* Summary band — 4 columns: activity image+info | stats stack | prize total */
.ldda-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(280px, 1fr);
    gap: 12px;
    align-items: stretch;
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid var(--ldd-line);
    border-radius: var(--ldd-radius-lg);
    background:
        linear-gradient(135deg, rgba(8, 28, 60, 0.85), rgba(4, 14, 32, 0.85));
    box-shadow: 0 0 22px rgba(22, 168, 255, 0.12);
}

.ldda-activity {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 4px 14px;
    border-right: 1px dashed rgba(255, 255, 255, 0.10);
}

.ldda-gift {
    position: relative;
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 30%, rgba(22, 168, 255, 0.55), transparent 65%),
        linear-gradient(135deg, rgba(11, 36, 78, 0.95), rgba(3, 16, 38, 0.95));
    box-shadow: 0 0 28px rgba(22, 168, 255, 0.42), inset 0 0 22px rgba(22, 168, 255, 0.18);
}

.ldda-gift-icon {
    position: relative;
    z-index: 2;
    font-size: 60px;
    filter: drop-shadow(0 4px 10px rgba(255, 203, 74, 0.5));
}

.ldda-gift-pedestal {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(53, 228, 255, 0.5), transparent 70%);
    filter: blur(2px);
}

.ldda-activity-info { min-width: 0; }

.ldda-activity-tag {
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: rgba(22, 168, 255, 0.15);
    border: 1px solid rgba(22, 168, 255, 0.4);
    color: #cfeaff;
    font-size: 12px;
    font-weight: 700;
}

.ldda-activity-info h2 {
    margin: 4px 0 4px;
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}

.ldda-activity-desc {
    margin: 0 0 8px;
    color: var(--ldd-muted);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldda-activity-date {
    margin: 0;
    color: var(--ldd-cyan);
    font-size: 14px;
    font-weight: 700;
}

/* Stats stack — vertical stack of 2 stats */
.ldda-stat-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 4px 14px;
    border-right: 1px dashed rgba(255, 255, 255, 0.10);
}

.ldda-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ldda-stat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(22, 168, 255, 0.18);
    border: 1px solid rgba(22, 168, 255, 0.4);
    font-size: 20px;
}

.ldda-stat-body { min-width: 0; }

.ldda-stat-body span {
    display: block;
    color: var(--ldd-muted);
    font-size: 12px;
}

.ldda-stat-body strong {
    display: block;
    margin-top: 1px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* Prize total — gold-bordered hero box */
.ldda-prize-total {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 22px;
    border: 1.5px solid rgba(255, 203, 74, 0.65);
    border-radius: 16px;
    background:
        radial-gradient(circle at 80% 30%, rgba(255, 203, 74, 0.22), transparent 65%),
        linear-gradient(135deg, rgba(64, 38, 4, 0.5), rgba(7, 23, 48, 0.55));
    box-shadow: inset 0 0 26px rgba(255, 196, 58, 0.18), 0 0 22px rgba(255, 184, 45, 0.18);
    overflow: hidden;
    text-align: center;
}

.ldda-prize-total-label {
    color: #f7e7be;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.ldda-prize-total-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 2px;
}

.ldda-prize-total-value strong {
    color: var(--ldd-gold);
    font-size: 36px;
    font-weight: 1000;
    text-shadow: 0 0 18px rgba(255, 203, 74, 0.55);
    letter-spacing: 0.5px;
}

.ldda-coin-icon { font-size: 28px; }

.ldda-spark {
    color: #fff2a8;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(255, 245, 184, 0.8);
}

/* Winners table */
.ldda-winners {
    border: 1px solid var(--ldd-line);
    border-radius: var(--ldd-radius-lg);
    background:
        linear-gradient(180deg, rgba(8, 28, 60, 0.78), rgba(4, 14, 32, 0.86));
    overflow: hidden;
}

.ldda-winners-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    background: linear-gradient(90deg, rgba(11, 40, 84, 0.85), rgba(7, 23, 48, 0.85));
    border-bottom: 1px solid var(--ldd-line);
}

.ldda-winners-head h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
    color: var(--ldd-cyan);
}

/* Verification banner — sits between the table head row and the table.
   Two visual states: warning (simulated rows) and success (real rows). */
.ldda-sim-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}
.ldda-sim-banner.is-warning {
    background: linear-gradient(90deg, rgba(255, 165, 50, 0.15), rgba(255, 90, 90, 0.12));
    border-top-color: rgba(255, 165, 50, 0.45);
    border-bottom-color: rgba(255, 165, 50, 0.45);
    color: #ffd86b;
}
.ldda-sim-banner.is-success {
    background: linear-gradient(90deg, rgba(39, 245, 138, 0.14), rgba(53, 228, 255, 0.10));
    border-top-color: rgba(39, 245, 138, 0.45);
    border-bottom-color: rgba(39, 245, 138, 0.45);
    color: #6dffb3;
}
.ldda-sim-banner.is-success .ldda-sim-icon { filter: drop-shadow(0 0 6px rgba(39, 245, 138, 0.55)); }
.ldda-sim-banner.is-success .ldda-sim-text strong { color: #b9ffd6; }
.ldda-sim-banner.is-success .ldda-sim-text small  { color: #92e9c0; opacity: 0.92; }
/* HTML `hidden` attr has lower specificity than the display rule above —
   re-assert it so the banner is invisible until JS shows it. */
.ldda-sim-banner[hidden] { display: none !important; }
.ldda-sim-icon {
    flex-shrink: 0;
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255, 165, 50, 0.6));
}
.ldda-sim-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}
.ldda-sim-text strong {
    color: #ffe1a8;
    font-size: 16px;
    font-weight: 800;
}
.ldda-sim-text small {
    color: #f4cf91;
    font-size: 14px;
    opacity: 0.9;
}
.ldda-sim-reset {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 1px solid rgba(255, 216, 107, 0.6);
    border-radius: 999px;
    background: rgba(255, 216, 107, 0.12);
    color: #ffe1a8;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.ldda-sim-reset:hover {
    background: rgba(255, 216, 107, 0.22);
    border-color: #ffe1a8;
    transform: translateY(-1px);
}
@media (max-width: 720px) {
    .ldda-sim-banner { flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
    .ldda-sim-icon   { align-self: center; }
}

.ldda-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ldda-search input {
    width: 280px;
    height: 36px;
    padding: 0 14px 0 34px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23a6b8d6' viewBox='0 0 16 16'><path d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/></svg>") no-repeat 12px center,
        rgba(2, 10, 25, 0.78);
    color: var(--ldd-text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ldda-search input::placeholder { color: var(--ldd-muted); }

.ldda-search input:focus {
    border-color: var(--ldd-cyan);
    box-shadow: 0 0 0 3px rgba(53, 228, 255, 0.15);
}

.ldda-search-icon { display: none; }

.ldda-search-btn {
    height: 36px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ldd-blue), var(--ldd-blue-2));
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(22, 168, 255, 0.32);
    transition: transform 0.12s, box-shadow 0.15s;
}

.ldda-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(22, 168, 255, 0.42);
}

/* Table */
.ldda-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ldda-table {
    width: 100%;
    border-collapse: collapse;
}

.ldda-table thead th {
    padding: 14px 16px;
    text-align: left;
    color: var(--ldd-muted);
    font-size: 13px;
    font-weight: 700;
    background: rgba(22, 168, 255, 0.08);
    border-bottom: 1px solid var(--ldd-line);
    white-space: nowrap;
}

.ldda-table .ldda-col-rank { width: 70px; text-align: center; }
.ldda-table .ldda-col-prize { text-align: right; white-space: nowrap; }

.ldda-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.12s;
}

.ldda-table tbody tr:hover {
    background: rgba(22, 168, 255, 0.04);
}

.ldda-table tbody td {
    padding: 13px 16px;
    color: var(--ldd-text);
    font-size: 14px;
    vertical-align: middle;
}

.ldda-table .ldda-col-rank {
    text-align: center;
    font-weight: 800;
    color: var(--ldd-text);
}

.ldda-rank-num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(22, 168, 255, 0.12);
    border: 1px solid rgba(22, 168, 255, 0.3);
    color: #cfe6ff;
    font-size: 13px;
    font-weight: 800;
}

.ldda-medal { font-size: 26px; line-height: 1; }

.ldda-table .ldda-col-fullname {
    max-width: 220px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldda-table .ldda-col-phone {
    color: #67d7ff;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

.ldda-table .ldda-col-coupon {
    text-align: center;
}

.ldda-table .ldda-col-coupon code {
    padding: 4px 10px;
    border-radius: 6px;
    background: transparent;
    color: var(--ldd-cyan);
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.ldda-table .ldda-col-prize {
    font-weight: 800;
    font-size: 15px;
    text-align: right;
    white-space: nowrap;
}

.ldda-table .ldda-col-prize.ldda-prize-cash    { color: #27f58a; }
.ldda-table .ldda-col-prize.ldda-prize-voucher { color: #c084ff; }

.ldda-prize-ico {
    display: inline-block;
    margin-right: 4px;
    font-size: 16px;
    vertical-align: -2px;
}

/* Highlight tier rows (subtle) */
.ldda-tier-1 td {
    background: linear-gradient(90deg, rgba(255, 203, 74, 0.12), rgba(255, 203, 74, 0.04) 60%, transparent);
    border-left: 3px solid rgba(255, 203, 74, 0.65);
}
.ldda-tier-1:hover td { background: linear-gradient(90deg, rgba(255, 203, 74, 0.16), rgba(255, 203, 74, 0.06) 60%, transparent); }

.ldda-tier-2 td {
    background: linear-gradient(90deg, rgba(200, 215, 230, 0.10), rgba(200, 215, 230, 0.03) 60%, transparent);
    border-left: 3px solid rgba(200, 215, 230, 0.6);
}
.ldda-tier-2:hover td { background: linear-gradient(90deg, rgba(200, 215, 230, 0.14), rgba(200, 215, 230, 0.05) 60%, transparent); }

.ldda-tier-3 td {
    background: linear-gradient(90deg, rgba(217, 138, 71, 0.12), rgba(217, 138, 71, 0.03) 60%, transparent);
    border-left: 3px solid rgba(217, 138, 71, 0.62);
}
.ldda-tier-3:hover td { background: linear-gradient(90deg, rgba(217, 138, 71, 0.16), rgba(217, 138, 71, 0.05) 60%, transparent); }

.ldda-no-results {
    padding: 36px 16px !important;
    text-align: center;
    color: var(--ldd-muted);
    font-size: 14px;
}

/* Pagination */
.ldda-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 18px 16px 22px;
    flex-wrap: wrap;
}

.ldda-page-btn {
    min-width: 40px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(2, 10, 25, 0.62);
    color: var(--ldd-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.12s;
}

.ldda-page-btn:not(.is-disabled):hover {
    background: rgba(22, 168, 255, 0.16);
    border-color: var(--ldd-blue);
    transform: translateY(-1px);
}

.ldda-page-btn.is-active {
    background: linear-gradient(135deg, var(--ldd-blue), var(--ldd-blue-2));
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(22, 168, 255, 0.4);
    cursor: default;
}

.ldda-page-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Verification Code verification section */
.seed-term-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    text-decoration: underline dotted rgba(53, 228, 255, 0.7);
    text-underline-offset: 3px;
}

.seed-term-tip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translate(-50%, -4px);
    width: max-content;
    max-width: min(300px, calc(100vw - 32px));
    padding: 8px 12px;
    border: 1px solid rgba(53, 228, 255, 0.45);
    border-radius: 8px;
    background: rgba(2, 10, 25, 0.98);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0;
    text-align: center;
    white-space: normal;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 10000;
}

.seed-term-tip::before {
    content: "";
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(53, 228, 255, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 10001;
}

.seed-term-tip:hover::after,
.seed-term-tip:hover::before,
.seed-term-tip:focus-visible::after,
.seed-term-tip:focus-visible::before {
    opacity: 1;
    visibility: visible;
}

.seed-term-tip:hover::after,
.seed-term-tip:focus-visible::after {
    transform: translate(-50%, 0);
}

.ldda-seed {
    margin-top: 22px;
    padding: 22px 24px;
    border: 1px solid var(--ldd-line);
    border-radius: var(--ldd-radius-lg);
    background:
        radial-gradient(circle at 100% 0%, rgba(53, 228, 255, 0.08), transparent 60%),
        linear-gradient(180deg, rgba(8, 28, 60, 0.78), rgba(4, 14, 32, 0.86));
}

.ldda-seed-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 900;
    color: var(--ldd-cyan);
}

.ldda-seed-head p {
    margin: 0 0 18px;
    color: var(--ldd-muted);
    font-size: 13px;
}

.ldda-seed-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ldda-seed-row label {
    display: block;
    margin-bottom: 6px;
    color: #c4d5ee;
    font-size: 13px;
    font-weight: 700;
}

/* Hash / Seed pair — side-by-side cards */
.ldda-seed-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 14px;
    margin-bottom: 18px;
}
@media (max-width: 900px) {
    .ldda-seed-pair { grid-template-columns: minmax(0, 1fr); }
}

.ldda-seed-card {
    padding: 14px 16px;
    border: 1px solid rgba(53, 228, 255, 0.22);
    border-radius: 12px;
    background: rgba(2, 10, 25, 0.45);
}
.ldda-seed-card--seed {
    border-color: rgba(255, 203, 74, 0.32);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(255, 203, 74, 0.06), transparent 70%),
        rgba(2, 10, 25, 0.45);
}
.ldda-seed-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.ldda-seed-step {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ldd-blue), var(--ldd-blue-2));
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}
.ldda-seed-card--seed .ldda-seed-step {
    background: linear-gradient(135deg, #ffcb4a, #ff9b3a);
    color: #1a0e00;
}
.ldda-seed-card-title {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
}
.ldda-seed-card-title strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}
.ldda-seed-card-title small {
    color: var(--ldd-muted);
    font-size: 12px;
}
.ldda-seed-locked {
    padding: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    color: var(--ldd-muted);
    font-size: 13px;
    text-align: center;
}

/* Verify block — separated below the pair */
.ldda-seed-verify-block {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ldda-seed-verify-block h4 {
    margin: 0 0 4px;
    color: var(--ldd-cyan);
    font-size: 15px;
    font-weight: 800;
}
.ldda-seed-verify-block p {
    margin: 0 0 12px;
    color: var(--ldd-muted);
    font-size: 13px;
}

.ldda-seed-display {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.ldda-seed-display code {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(53, 228, 255, 0.25);
    border-radius: 10px;
    background: rgba(2, 10, 25, 0.72);
    color: var(--ldd-cyan);
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 13px;
    word-break: break-all;
    line-height: 1.5;
}

.ldda-seed-copy {
    flex-shrink: 0;
    width: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(2, 10, 25, 0.62);
    color: var(--ldd-text);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.ldda-seed-copy:hover {
    background: rgba(22, 168, 255, 0.16);
    border-color: var(--ldd-blue);
}

.ldda-seed-verify {
    display: flex;
    gap: 8px;
}

.ldda-seed-verify input {
    flex: 1;
    min-width: 0;
    padding: 0 14px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(2, 10, 25, 0.72);
    color: var(--ldd-text);
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ldda-seed-verify input::placeholder { color: var(--ldd-muted); }

.ldda-seed-verify input:focus {
    border-color: var(--ldd-cyan);
    box-shadow: 0 0 0 3px rgba(53, 228, 255, 0.18);
}

.ldda-seed-btn {
    flex-shrink: 0;
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ldd-blue), var(--ldd-blue-2));
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(22, 168, 255, 0.32);
    transition: transform 0.12s, box-shadow 0.15s;
}

.ldda-seed-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(22, 168, 255, 0.42);
}

.ldda-seed-result {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.ldda-seed-result.is-success {
    background: rgba(39, 245, 138, 0.12);
    border: 1px solid rgba(39, 245, 138, 0.4);
    color: #6dffb3;
}

.ldda-seed-result.is-error {
    background: rgba(255, 65, 93, 0.12);
    border: 1px solid rgba(255, 65, 93, 0.4);
    color: #ff8a9e;
}

.ldda-seed-result.is-info {
    background: rgba(53, 228, 255, 0.10);
    border: 1px solid rgba(53, 228, 255, 0.35);
    color: #a3edff;
}

/* Footer note */
.ldda-footer {
    margin-top: 22px;
    padding: 14px 22px;
    text-align: center;
    border: 1px solid var(--ldd-line);
    border-radius: var(--ldd-radius-md);
    background: rgba(22, 168, 255, 0.06);
    color: var(--ldd-muted);
    font-size: 13px;
}

.ldda-footer span { margin-left: 6px; }

.ldda-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--ldd-muted);
    font-size: 16px;
    border: 1px dashed var(--ldd-line);
    border-radius: var(--ldd-radius-md);
}

@media (max-width: 960px) {
    .ldda-summary {
        grid-template-columns: 1fr 1fr;
    }
    .ldda-activity {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.10);
        padding-bottom: 14px;
    }
    .ldda-stat-stack { border-right: 0; }
}

@media (max-width: 640px) {
    .ldda-title h1 { font-size: 26px; }
    .ldda-summary { grid-template-columns: 1fr; padding: 14px; }
    .ldda-activity { border-bottom: 1px dashed rgba(255,255,255,0.10); padding-bottom: 14px; }
    .ldda-stat-stack { border-right: 0; padding: 4px; }
    .ldda-prize-total-value strong { font-size: 28px; }
    .ldda-winners-head { flex-direction: column; align-items: stretch; }
    .ldda-search input { width: 100%; }
    .ldda-search { flex-direction: column; }
    .ldda-search-btn { width: 100%; }
    .ldda-table thead th, .ldda-table tbody td { padding: 10px 10px; font-size: 13px; }
    .ldda-medal { font-size: 22px; }
    .ldda-seed-display, .ldda-seed-verify { flex-direction: column; }
    .ldda-seed-copy { width: 100%; height: 38px; }
}

/* ════════════════════════════════════════════════════════════════════════
   Responsive desktop tiers  (cascade: A < B < C < base)
   ──────────────────────────────────────────────────────────────────────────
   Tier C  ≤1679px : small Full-HD / 17"-15" laptop with chrome shrinking
   Tier B  ≤1439px : 1440 standard laptop, 1536 windows scaling 125%
   Tier A  ≤1279px : 13"-14" laptop, 1366×768
   Tier base       : ≥1920 (handled by min-width:1920 fit layer above)
   ──────────────────────────────────────────────────────────────────────── */

/* ─── Tier C: ≤1679px ──────────────────────────────────────────────── */
@media (max-width: 1679px) {
    .ldd-main-grid {
        grid-template-columns: 420px minmax(0, 1fr) 420px;
        gap: 18px;
    }
    .ldd-page { padding: 20px; }
    .ldd-shell { width: 100%; max-width: none; }
    .ldd-reel-rack { --ldd-reel-h: 100px; min-height: 180px; }
    .ldd-reel-item-name  { font-size: 22px; }
    .ldd-reel-item-phone { font-size: 28px; }
    .ldd-reel-item-prize { font-size: 22px; }

    .ldda-shell { width: min(1440px, 96%); }
    .ldda-title h1 { font-size: 32px; }
    .ldda-activity-info h2 { font-size: 24px; }
    .ldda-prize-total-value strong { font-size: 32px; }
}

/* ─── Tier B: ≤1439px ──────────────────────────────────────────────── */
@media (max-width: 1439px) {
    .ldd-main-grid {
        grid-template-columns: 380px minmax(0, 1fr) 380px;
        gap: 14px;
    }
    .ldd-page { padding: 16px; }
    .ldd-header { gap: 16px; }
    .ldd-brand h1 { font-size: 22px; }
    .ldd-section-head h2 { font-size: 16px; }
    .ldd-prize-list-card,
    .ldd-winner-card,
    .ldd-history-card { padding: 14px; }
    .ldd-reel-rack { min-height: 170px; }
    .ldd-info-card,
    .ldd-history-card { min-height: auto; }

    .ldda-shell { width: min(1280px, 96%); }
    .ldda-title h1 { font-size: 28px; }
    .ldda-activity-info h2 { font-size: 22px; }
    .ldda-prize-total-value strong { font-size: 28px; }
    .ldda-summary { gap: 10px; padding: 14px; }
    .ldda-table .ldda-col-fullname { max-width: 180px; }
}

/* ─── Tier A: ≤1279px ──────────────────────────────────────────────── */
@media (max-width: 1279px) {
    .ldd-main-grid {
        grid-template-columns: 340px minmax(0, 1fr) 340px;
        gap: 12px;
    }
    .ldd-page { padding: 14px; }
    .ldd-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    .ldd-brand h1 { font-size: 20px; }
    .ldd-prize-list-card .ldd-section-head h2,
    .ldd-winner-card .ldd-section-head h2 { font-size: 15px; }
    .ldd-reel-rack { --ldd-reel-h: 80px; min-height: 150px; }
    .ldd-reel-item-name  { font-size: 18px; }
    .ldd-reel-item-phone { font-size: 22px; letter-spacing: 1px; }
    .ldd-reel-item-prize { font-size: 18px; }
    .ldd-reel-col-label { font-size: 14px; }
    .ldd-reel-rack-label { font-size: 14px; padding: 4px 14px; letter-spacing: 1.2px; }
    .ldd-draw-button { font-size: 16px; padding: 14px 24px; }
    .ldd-prize-select { font-size: 14px; }

    .ldda-shell { width: min(1180px, 96%); padding: 0 8px; }
    .ldda-title h1 { font-size: 24px; }
    .ldda-summary { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(240px, 0.9fr); }
    .ldda-activity-info h2 { font-size: 20px; }
    .ldda-stat-body strong { font-size: 18px; }
    .ldda-prize-total-value strong { font-size: 24px; }
    .ldda-table thead th { padding: 10px 12px; font-size: 12px; }
    .ldda-table tbody td { padding: 11px 12px; font-size: 13px; }
    .ldda-table .ldda-col-fullname { max-width: 150px; font-size: 13px; }
    .ldda-search input { width: 220px; }
}

/* ════════════════════════════════════════════════════════════════════════
   Announcement page — minimum font 16px
   ──────────────────────────────────────────────────────────────────────────
   Bumps every .ldda-* element that was below 16px up to 16px.
   Uses !important to also override the smaller values set inside the
   tier C/B/A and mobile media queries above. Elements already ≥16px are
   left untouched. */
.ldda-back-btn,
.ldda-subtitle,
.ldda-activity-tag,
.ldda-activity-desc,
.ldda-activity-date,
.ldda-stat-body span,
.ldda-prize-total-label,
.ldda-search input,
.ldda-search-btn,
.ldda-table thead th,
.ldda-table tbody td,
.ldda-rank-num,
.ldda-table .ldda-col-fullname,
.ldda-table .ldda-col-phone,
.ldda-table .ldda-col-coupon code,
.ldda-table .ldda-col-prize,
.ldda-no-results,
.ldda-page-btn,
.ldda-seed-head p,
.ldda-seed-row label,
.ldda-seed-display code,
.ldda-seed-verify input,
.ldda-seed-result,
.ldda-seed-btn,
.ldda-footer {
    font-size: 16px !important;
}

/* Announcement responsive refinement */
.ldda-page {
    --ldda-page-pad: clamp(14px, 2.1vw, 34px);
    --ldda-section-gap: clamp(14px, 1.6vw, 24px);
    --ldda-card-pad: clamp(14px, 1.6vw, 24px);
    height: auto !important;
    min-height: calc(100dvh - var(--avl-topbar-height, 0px)) !important;
    padding: var(--ldda-page-pad);
    overflow: visible !important;
}

body.admin-bar .ldda-page {
    top: 0 !important;
    height: auto !important;
}

.ldda-page,
.ldda-page * {
    min-width: 0;
    letter-spacing: 0;
}

.ldda-shell {
    width: min(1680px, 100%);
    max-width: 100%;
}

.ldda-title,
.ldda-summary,
.ldda-winners,
.ldda-seed,
.ldda-footer {
    max-width: 100%;
}

.ldda-title {
    margin-bottom: var(--ldda-section-gap);
}

.ldda-title h1 {
    line-height: 1.18;
    text-wrap: balance;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-break: anywhere;
}

.ldda-subtitle,
.ldda-activity-desc,
.ldda-seed-head p,
.ldda-seed-verify-block p,
.ldda-footer {
    line-height: 1.55;
}

.ldda-session-picker select {
    width: min(360px, 32vw);
    max-width: 100%;
    text-overflow: ellipsis;
}

.ldda-summary {
    grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.8fr) minmax(280px, 0.9fr);
    gap: var(--ldda-section-gap);
    padding: var(--ldda-card-pad);
}

.ldda-activity-info h2 {
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-break: anywhere;
}

.ldda-winners-head,
.ldda-seed,
.ldda-footer {
    padding: var(--ldda-card-pad);
}

.ldda-search {
    flex: 1 1 460px;
    justify-content: flex-end;
    min-width: 0;
}

.ldda-search input {
    width: min(420px, 100%);
}

.ldda-table-wrap {
    max-width: 100%;
}

@media (max-width: 1920px) {
    .ldda-table-wrap {
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }

    .ldda-table-wrap.is-scrolling,
    .ldda-table-wrap:hover,
    .ldda-table-wrap:focus-within {
        scrollbar-color: rgba(53, 228, 255, 0.38) transparent;
    }

    .ldda-table-wrap::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .ldda-table-wrap::-webkit-scrollbar-track {
        background: transparent;
    }

    .ldda-table-wrap::-webkit-scrollbar-thumb {
        border: 1px solid transparent;
        border-radius: 999px;
        background: transparent;
        background-clip: padding-box;
    }

    .ldda-table-wrap.is-scrolling::-webkit-scrollbar-thumb,
    .ldda-table-wrap:hover::-webkit-scrollbar-thumb,
    .ldda-table-wrap:focus-within::-webkit-scrollbar-thumb {
        border-color: rgba(53, 228, 255, 0.08);
        background: rgba(53, 228, 255, 0.38);
    }

    .ldda-table-wrap::-webkit-scrollbar-thumb:hover {
        background: rgba(53, 228, 255, 0.58);
    }

    .ldda-table-wrap::-webkit-scrollbar-button {
        display: none;
        width: 0;
        height: 0;
    }

    .ldda-table-wrap::-webkit-scrollbar-corner {
        background: transparent;
    }
}

.ldda-table {
    table-layout: fixed;
}

.ldda-table .ldda-col-rank {
    width: 72px;
}

.ldda-table .ldda-col-fullname {
    width: 18%;
}

.ldda-table .ldda-col-phone {
    width: 21%;
}

.ldda-table .ldda-col-coupon {
    width: 27%;
}

.ldda-table .ldda-col-prize {
    width: 22%;
}

.ldda-table .ldda-col-fullname,
.ldda-table .ldda-col-phone,
.ldda-table .ldda-col-coupon code,
.ldda-table .ldda-col-prize,
.ldda-activity-date,
.ldda-seed-display code,
.ldda-seed-verify input {
    overflow-wrap: anywhere;
}

.ldda-seed-pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}

@media (min-width: 1680px) {
    .ldda-title h1 { font-size: 36px; }
    .ldda-activity-info h2 { font-size: 28px; }
    .ldda-prize-total-value strong { font-size: 38px; }
}

@media (max-width: 1180px) {
    .ldda-title {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 12px 16px;
        padding: 18px;
    }

    .ldda-title h1 {
        grid-column: 1 / -1;
        grid-row: 1;
        margin: 0;
        font-size: 28px;
    }

    .ldda-subtitle {
        grid-column: 1 / -1;
        grid-row: 2;
        font-size: 16px !important;
    }

    .ldda-title .ldda-back-btn,
    .ldda-title .ldda-back-btn:hover,
    .ldda-session-picker {
        position: static;
        transform: none;
    }

    .ldda-title .ldda-back-btn {
        grid-column: 1;
        grid-row: 3;
        justify-self: start;
    }

    .ldda-title .ldda-back-btn:hover {
        transform: translateX(-2px);
    }

    .ldda-session-picker {
        grid-column: 2;
        grid-row: 3;
        justify-self: end;
    }

    .ldda-summary {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    }

    .ldda-activity {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
        padding: 0 0 14px;
    }

    .ldda-stat-stack {
        border-right: 0;
        padding-inline: 0;
    }
}

@media (max-width: 760px) {
    .ldda-page {
        --ldda-page-pad: 14px;
        --ldda-section-gap: 14px;
    }

    body.admin-bar .ldda-page {
        top: 0 !important;
        height: auto !important;
    }

    .ldda-title {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px 16px 18px;
        text-align: center;
    }

    .ldda-title h1 {
        grid-column: 1;
        grid-row: 1;
        box-sizing: border-box;
        padding-inline: clamp(42px, 13vw, 58px);
        font-size: clamp(21px, 4.4vw, 24px);
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        white-space: normal !important;
        word-break: break-all !important;
        overflow-wrap: anywhere !important;
        line-break: loose;
    }

    .ldda-subtitle {
        grid-column: 1;
        grid-row: 2;
    }

    .ldda-title .ldda-leaf {
        margin-inline: 3px;
        font-size: 20px;
    }

    /* Back button aligns with the mobile title text while keeping the title centered. */
    .ldda-title .ldda-back-btn {
        position: static;
        top: auto;
        left: auto;
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: center;
        margin-left: -10px;
        width: auto;
        height: 34px;
        padding: 0 11px;
        gap: 5px;
        font-size: 13px !important;
        line-height: 1;
        border-radius: 10px;
        border-color: rgba(53, 228, 255, 0.44);
        background: rgba(2, 10, 25, 0.76);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
        z-index: 3;
    }

    .ldda-title .ldda-back-btn span:not(.ldda-back-arrow) {
        display: none;
    }

    .ldda-title .ldda-back-btn::after {
        content: "กลับ";
        font-size: 13px;
        font-weight: 800;
        line-height: 1;
    }

    .ldda-title .ldda-back-btn .ldda-back-arrow {
        font-size: 16px !important;
    }

    .ldda-title .ldda-back-btn:hover {
        transform: translateY(-1px);
    }

    .ldda-session-picker {
        grid-column: 1;
        grid-row: 3;
        justify-self: stretch;
        align-items: stretch;
        width: 100%;
    }

    .ldda-session-select-wrap,
    .ldda-session-picker select {
        width: 100%;
    }

    .ldda-summary {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .ldda-activity {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
        padding-inline: 0;
    }

    .ldda-gift {
        width: 92px;
        height: 92px;
        border-radius: 18px;
    }

    .ldda-gift-icon {
        font-size: 48px;
    }

    .ldda-activity-info h2,
    .ldda-activity-desc {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .ldda-activity-info h2 {
        font-size: 22px;
    }

    .ldda-stat-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 0;
    }

    .ldda-stat {
        align-items: flex-start;
        padding: 12px;
        border: 1px solid rgba(53, 228, 255, 0.18);
        border-radius: 12px;
        background: rgba(2, 10, 25, 0.34);
    }

    .ldda-prize-total {
        padding: 16px;
    }

    .ldda-prize-total-value strong {
        font-size: 30px;
    }

    .ldda-winners-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ldda-winners-head h3 {
        text-align: center;
    }

    .ldda-search {
        flex: none;
        width: 100%;
        justify-content: stretch;
    }

    .ldda-search input,
    .ldda-search-btn {
        width: 100%;
    }

    .ldda-table-wrap {
        overflow-x: visible;
    }

    .ldda-table,
    .ldda-table tbody,
    .ldda-table tbody tr,
    .ldda-table tbody td {
        display: block;
        width: 100%;
    }

    .ldda-table {
        table-layout: auto;
    }

    .ldda-table thead {
        display: none;
    }

    .ldda-table tbody {
        padding: 12px;
    }

    /* ── Mobile winner card — Compact 2-line layout ─────────────────────
       Row 1 : [rank]  name ......................... PRIZE
       Row 2 : [rank]  037-xxx-4214 ............. E1C0F3B9
       Uses grid-template-areas (declarative placement, dodges browser quirks
       around row/column shorthand on table rows). Rank spans both rows;
       name+prize and phone+coupon mirror left/right within their rows. */
    .ldda-table tbody tr.ldda-row {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "rank name  prize"
            "rank phone coupon";
        column-gap: 8px;
        row-gap: 3px;
        align-items: center;
        margin-bottom: 10px;
        padding: 10px 8px 10px 5px;
        border: 1px solid rgba(97, 180, 255, 0.22);
        border-radius: 14px;
        background: rgba(2, 10, 25, 0.44);
    }

    .ldda-table tbody tr.ldda-row:last-child  { margin-bottom: 0; }
    .ldda-table tbody tr.ldda-row:hover       { background: rgba(22, 168, 255, 0.08); }

    /* Tier accent via the left border (3px stripe) */
    .ldda-tier-1,
    .ldda-tier-2,
    .ldda-tier-3 { border-left-width: 3px !important; }
    .ldda-tier-1 { border-left-color: rgba(255, 203, 74, 0.7) !important; }
    .ldda-tier-2 { border-left-color: rgba(200, 215, 230, 0.7) !important; }
    .ldda-tier-3 { border-left-color: rgba(217, 138, 71, 0.7) !important; }

    .ldda-tier-1 td, .ldda-tier-1:hover td,
    .ldda-tier-2 td, .ldda-tier-2:hover td,
    .ldda-tier-3 td, .ldda-tier-3:hover td {
        background: transparent;
        border-left: 0;
    }

    /* Reset all cells — no border, no padding, no default labels */
    .ldda-table tbody tr.ldda-row td {
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--ldd-text);
        line-height: 1.25;
    }
    .ldda-table tbody tr.ldda-row td::before { content: none !important; }

    /* Rank (medal or number) — left edge, vertically centred across both rows */
    .ldda-table tbody tr.ldda-row .ldda-col-rank {
        grid-area: rank;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-width: 0;
        width: 28px;
    }
    .ldda-medal     { font-size: 24px; }
    .ldda-rank-num  { width: 28px; height: 28px; font-size: 14px; }

    /* Name — row 1 left, hero typography */
    .ldda-table tbody tr.ldda-row .ldda-col-fullname {
        grid-area: name;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        font-size: 16px !important;
        font-weight: 800;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Prize — row 1 right, cash green / voucher purple. Cell fills col 3
       (overriding the desktop width: 22%) so text-align: center actually
       positions the content at the middle of the right-half area. */
    .ldda-table tbody tr.ldda-row .ldda-col-prize {
        grid-area: prize;
        justify-self: stretch;
        width: 100%;
        padding: 0;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        font-size: 16px !important;
        font-weight: 900;
        text-align: center;
        white-space: nowrap;
        line-height: 1.2;
    }
    .ldda-table tbody tr.ldda-row .ldda-prize-ico {
        display: none;
    }

    /* Meta row — phone and coupon both occupy the "meta" area on row 2.
       justify-self pins them to opposite ends; meta area spans cols 2+3 so
       they have full content width with breathing room between. */
    .ldda-table tbody tr.ldda-row .ldda-col-phone,
    .ldda-table tbody tr.ldda-row .ldda-col-coupon {
        align-self: center;
        min-width: 0;
        max-width: none;
        font-size: 14px !important;
        color: var(--ldd-muted);
        font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
        letter-spacing: 0.2px;
        white-space: nowrap;
    }
    .ldda-table tbody tr.ldda-row .ldda-col-phone  { grid-area: phone; justify-self: start; }
    .ldda-table tbody tr.ldda-row .ldda-col-coupon {
        grid-area: coupon;
        justify-self: stretch;
        width: 100%;
        max-width: none;
        overflow: visible;
        text-align: right;
        white-space: nowrap;
    }

    .ldda-table tbody tr.ldda-row .ldda-col-coupon code {
        display: inline;
        max-width: none;
        overflow: visible;
        overflow-wrap: normal;
        word-break: normal;
        text-overflow: clip;
        padding: 0;
        background: transparent;
        border: 0;
        color: #cfeaff;
        font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
        font-size: 14px !important;
        font-weight: 700;
        letter-spacing: 0.3px;
        white-space: nowrap;
    }

    /* ── Top-3 winners (tier-1/2/3) — split the card into two 50/50 halves ─
       Left half  : medal (inline) + name (row 1) + phone (row 2)
       Right half : prize (row 1) + coupon (row 2), centred within the half
       A gradient line marks the visual split; colour matches the tier
       (gold / silver / bronze). */
    .ldda-table tbody tr.ldda-row.ldda-tier-1,
    .ldda-table tbody tr.ldda-row.ldda-tier-2,
    .ldda-table tbody tr.ldda-row.ldda-tier-3 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-template-areas:
            "name  prize"
            "phone coupon" !important;
        column-gap: 0;
        position: relative;
        padding-right: 0;          /* let prize + coupon reach the card's right edge */
    }
    /* Medal overlays inside the left half — vertically centred across both rows */
    .ldda-table tbody tr.ldda-row.ldda-tier-1 .ldda-col-rank,
    .ldda-table tbody tr.ldda-row.ldda-tier-2 .ldda-col-rank,
    .ldda-table tbody tr.ldda-row.ldda-tier-3 .ldda-col-rank {
        grid-area: unset;
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
        justify-self: start;
        z-index: 1;
    }
    /* Push name + phone past the rank badge so the medal stays visible */
    .ldda-table tbody tr.ldda-row.ldda-tier-1 .ldda-col-fullname,
    .ldda-table tbody tr.ldda-row.ldda-tier-1 .ldda-col-phone,
    .ldda-table tbody tr.ldda-row.ldda-tier-2 .ldda-col-fullname,
    .ldda-table tbody tr.ldda-row.ldda-tier-2 .ldda-col-phone,
    .ldda-table tbody tr.ldda-row.ldda-tier-3 .ldda-col-fullname,
    .ldda-table tbody tr.ldda-row.ldda-tier-3 .ldda-col-phone {
        padding-left: 38px;
    }
    /* Centre prize + coupon within the right half for symmetric visual weight */
    .ldda-table tbody tr.ldda-row.ldda-tier-1 .ldda-col-prize,
    .ldda-table tbody tr.ldda-row.ldda-tier-1 .ldda-col-coupon,
    .ldda-table tbody tr.ldda-row.ldda-tier-2 .ldda-col-prize,
    .ldda-table tbody tr.ldda-row.ldda-tier-2 .ldda-col-coupon,
    .ldda-table tbody tr.ldda-row.ldda-tier-3 .ldda-col-prize,
    .ldda-table tbody tr.ldda-row.ldda-tier-3 .ldda-col-coupon {
        justify-self: center;
        text-align: center;
    }
    /* Gradient divider down the middle — colour varies per tier */
    .ldda-table tbody tr.ldda-row.ldda-tier-1::after,
    .ldda-table tbody tr.ldda-row.ldda-tier-2::after,
    .ldda-table tbody tr.ldda-row.ldda-tier-3::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 10px;
        bottom: 10px;
        width: 1px;
        pointer-events: none;
    }
    .ldda-table tbody tr.ldda-row.ldda-tier-1::after {
        background: linear-gradient(
            rgba(255, 203, 74, 0),
            rgba(255, 203, 74, 0.55) 20%,
            rgba(255, 203, 74, 0.55) 80%,
            rgba(255, 203, 74, 0)
        );
    }
    .ldda-table tbody tr.ldda-row.ldda-tier-2::after {
        background: linear-gradient(
            rgba(200, 215, 230, 0),
            rgba(200, 215, 230, 0.55) 20%,
            rgba(200, 215, 230, 0.55) 80%,
            rgba(200, 215, 230, 0)
        );
    }
    .ldda-table tbody tr.ldda-row.ldda-tier-3::after {
        background: linear-gradient(
            rgba(217, 138, 71, 0),
            rgba(217, 138, 71, 0.55) 20%,
            rgba(217, 138, 71, 0.55) 80%,
            rgba(217, 138, 71, 0)
        );
    }

    .ldda-table tbody tr:has(.ldda-no-results) {
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
    }

    /* Compact mobile pagination — all buttons fit one row, square number tiles */
    .ldda-pagination {
        gap: 6px;
        padding: 12px 8px 16px;
        flex-wrap: nowrap;
        justify-content: center;
    }
    .ldda-page-btn {
        flex: 0 0 auto;
        min-width: 32px;
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 8px;
    }
    /* Number buttons (everything between prev and next) — square 32×32 */
    .ldda-page-btn:not(:first-child):not(:last-child) {
        width: 32px;
        padding: 0;
    }
    /* Prev / Next — keep label but trim padding */
    .ldda-page-btn:first-child,
    .ldda-page-btn:last-child {
        padding: 0 10px;
        font-size: 12px;
    }

    .ldda-seed {
        margin-top: var(--ldda-section-gap);
    }

    .ldda-seed-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .ldda-seed-card-head {
        align-items: flex-start;
    }

    .ldda-seed-display,
    .ldda-seed-verify {
        flex-direction: column;
    }

    .ldda-seed-copy,
    .ldda-seed-btn {
        width: 100%;
    }

    .ldda-seed-display code,
    .ldda-seed-verify input,
    .ldda-seed-btn,
    .ldda-seed-result,
    .ldda-footer {
        font-size: 14px !important;
    }

    .ldda-seed-verify input#lddaSeedInput {
        height: 36px !important;
        min-height: 36px;
        max-height: 36px;
        block-size: 36px;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 520px) {
    .ldda-page {
        --ldda-page-pad: 10px;
    }

    .ldda-shell {
        width: calc(100vw - (var(--ldda-page-pad) * 2));
        max-width: calc(100vw - (var(--ldda-page-pad) * 2));
    }

    .ldda-title {
        width: 100%;
        padding: 16px 14px;
        border-radius: 14px;
    }

    .ldda-title h1 {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: clamp(19px, 5vw, 21px);
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        line-break: loose;
    }

    .ldda-title .ldda-back-btn {
        margin-top: clamp(10px, 3vw, 14px);
        margin-left: -8px;
    }

    .ldda-title-copy {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 0 0 100%;
        order: 2;
        min-width: 0;
        line-height: 1.18;
    }

    .ldda-title .ldda-leaf {
        order: 1;
    }

    .ldda-title-line {
        display: block;
    }

    .ldda-title .ldda-leaf {
        display: inline;
        margin-inline: 2px;
        font-size: 0.9em;
        vertical-align: -1px;
    }

    .ldda-subtitle,
    .ldda-session-picker label,
    .ldda-back-btn,
    .ldda-activity-tag,
    .ldda-activity-desc,
    .ldda-activity-date,
    .ldda-stat-body span,
    .ldda-prize-total-label,
    .ldda-search input,
    .ldda-search-btn,
    .ldda-page-btn {
        font-size: 14px !important;
    }

    .ldda-subtitle {
        width: min(100%, 280px);
        margin-inline: auto;
        overflow-wrap: anywhere;
    }

    .ldda-session-picker select {
        min-width: 0;
        padding-block: 9px;
        font-size: 14px;
    }

    .ldda-summary,
    .ldda-winners,
    .ldda-seed {
        border-radius: 14px;
    }

    .ldda-activity-info h2 {
        font-size: 20px;
        max-width: 280px;
        margin-inline: auto;
    }

    .ldda-activity-desc,
    .ldda-activity-date {
        max-width: 280px;
        margin-inline: auto;
    }

    .ldda-stat-stack {
        grid-template-columns: minmax(0, 1fr);
    }

    .ldda-stat {
        align-items: center;
    }

    .ldda-stat-body strong {
        font-size: 20px;
    }

    .ldda-prize-total-value {
        flex-wrap: wrap;
    }

    .ldda-prize-total-value strong {
        font-size: 26px;
    }

    .ldda-winners-head h3,
    .ldda-seed-head h3 {
        font-size: 18px;
    }

    .ldda-table tbody {
        padding: 10px;
    }

    .ldda-table tbody tr.ldda-row {
        grid-template-columns: 26px minmax(0, 1fr) auto;
        padding: 10px 10px 10px 5px;
    }

    .ldda-table tbody tr.ldda-row .ldda-col-rank {
        width: 26px;
    }

    .ldda-medal {
        font-size: 22px;
    }

    .ldda-rank-num {
        width: 26px;
        height: 26px;
        font-size: 14px !important;
    }
}

@media (max-width: 360px) {
    .ldda-title h1 {
        font-size: 18px;
        flex-wrap: wrap;
        gap: 0 6px;
    }

    .ldda-title-copy {
        flex: 0 0 100%;
        order: 2;
    }

    .ldda-title .ldda-leaf {
        order: 1;
    }

    .ldda-prize-total-value strong {
        font-size: 23px;
    }
}

@media (max-width: 768px) {
    .ldda-page {
        --ldda-page-pad: 14px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .ldda-shell {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ════════════════════════════════════════════════════════════════════════
   Customer coupon-check page  ([lucky_draw_check_coupon])
   ──────────────────────────────────────────────────────────────────────── */

/* Break out of WordPress theme constraints — full-bleed to 100vw */
html:has(.ldcc-page),
body:has(.ldcc-page) {
    overflow-x: hidden;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 12%, rgba(0, 119, 255, 0.30), transparent 42%),
        radial-gradient(circle at 14% 60%, rgba(255, 199, 74, 0.10), transparent 32%),
        linear-gradient(180deg, #020814 0%, #06162c 48%, #020814 100%) !important;
    background-attachment: fixed !important;
}

/* Neutralize any ancestor backgrounds that might paint over the body gradient */
body:has(.ldcc-page) .wp-site-blocks,
body:has(.ldcc-page) main,
body:has(.ldcc-page) article,
body:has(.ldcc-page) .entry-content,
body:has(.ldcc-page) .wp-block-post-content {
    background: transparent !important;
}

/* Hide WordPress theme chrome on check-coupon page */
body:has(.ldcc-page) > header:not(.avl-topbar),
body:has(.ldcc-page) > footer:not(.avl-footer),
body:has(.ldcc-page) .wp-site-blocks > header,
body:has(.ldcc-page) .wp-site-blocks > footer,
body:has(.ldcc-page) header.wp-block-template-part,
body:has(.ldcc-page) footer.wp-block-template-part,
body:has(.ldcc-page) .wp-block-post-title,
body:has(.ldcc-page) .entry-header {
    display: none !important;
}

body:has(.ldcc-page) .wp-site-blocks,
body:has(.ldcc-page) main,
body:has(.ldcc-page) article,
body:has(.ldcc-page) .entry-content,
body:has(.ldcc-page) .wp-block-post-content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.is-layout-constrained:has(.ldcc-page),
.has-global-padding:has(.ldcc-page),
.wp-block-post-content:has(.ldcc-page),
.entry-content:has(.ldcc-page) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

body:has(.ldcc-page) .grecaptcha-badge {
    left: auto !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: calc(124px + env(safe-area-inset-bottom)) !important;
    transform: translateX(calc(100% - 42px)) !important;
    transform-origin: right bottom !important;
    opacity: 0.58 !important;
    transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease !important;
    z-index: 2147483647 !important;
}

body:has(.ldcc-page) .grecaptcha-badge:hover,
body:has(.ldcc-page) .grecaptcha-badge:focus-within {
    transform: translateX(0) !important;
    opacity: 1 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34) !important;
}

.ldcc-page,
.ldcc-page * { box-sizing: border-box; }

.ldcc-page {
    /* Fluid scaling tokens — every child sizes off these so the page
       breathes smoothly from 320px → 4K without per-breakpoint overrides. */
    --ldcc-pad-x: clamp(12px, 3.2vw, 32px);
    --ldcc-pad-y: clamp(16px, 3.5vw, 40px);
    --ldcc-gap: clamp(12px, 2vw, 22px);
    --ldcc-card-pad: clamp(14px, 2.4vw, 24px);
    --ldcc-radius: clamp(12px, 1.4vw, 18px);
    --ldcc-fs-base: clamp(13px, 1.3vw, 16px);
    --ldcc-fs-small: clamp(11px, 1.05vw, 13px);
    --ldcc-fs-h1: clamp(20px, 3.4vw, 28px);
    --ldcc-fs-h3: clamp(15px, 1.5vw, 18px);

    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: var(--ldcc-pad-y) var(--ldcc-pad-x) calc(var(--ldcc-pad-y) + 64px);
    color: var(--ldd-text);
    font-family: Inter, "Noto Sans Thai", "Prompt", Arial, sans-serif;
    font-size: var(--ldcc-fs-base);
    background:
        radial-gradient(circle at 50% 12%, rgba(0, 119, 255, 0.30), transparent 42%),
        radial-gradient(circle at 14% 60%, rgba(255, 199, 74, 0.10), transparent 32%),
        linear-gradient(180deg, #020814 0%, #06162c 48%, #020814 100%);
    overflow-x: hidden;
    overflow-y: visible;
    z-index: auto;
}

.ldcc-shell {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--ldcc-gap);
}

/* Title */
.ldcc-title {
    text-align: center;
    padding: clamp(14px, 2vw, 22px) clamp(12px, 2vw, 20px);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(22, 168, 255, 0.18), transparent 60%),
        radial-gradient(circle at 50% 100%, rgba(255, 203, 74, 0.10), transparent 70%);
    border-radius: var(--ldcc-radius);
}
.ldcc-title h1 {
    margin: 0 0 6px;
    font-size: var(--ldcc-fs-h1);
    font-weight: 1000;
    line-height: 1.25;
    color: #ffffff;
    text-shadow: 0 0 22px rgba(22, 168, 255, 0.4);
}
.ldcc-subtitle {
    margin: 0;
    color: var(--ldd-muted);
    font-size: var(--ldcc-fs-base);
    line-height: 1.45;
}

.ldcc-activity-switcher {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr);
    align-items: center;
    gap: 10px 14px;
    padding: 12px 14px;
    border: 1px solid rgba(53, 228, 255, 0.26);
    border-radius: 14px;
    background: rgba(2, 10, 25, 0.52);
}
.ldcc-activity-switcher label {
    color: var(--ldd-cyan);
    font-size: var(--ldcc-fs-small);
    font-weight: 900;
    white-space: nowrap;
}
.ldcc-activity-select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 42px 0 14px;
    border: 1px solid rgba(53, 228, 255, 0.38);
    border-radius: 10px;
    background: rgba(2, 10, 25, 0.82);
    color: #ffffff;
    font: inherit;
    font-size: var(--ldcc-fs-base);
    outline: none;
}
.ldcc-activity-select:focus {
    border-color: var(--ldd-cyan);
    box-shadow: 0 0 0 3px rgba(53, 228, 255, 0.16);
}

/* Activity card */
.ldcc-activity {
    padding: var(--ldcc-card-pad);
    border: 1px solid var(--ldd-line);
    border-radius: var(--ldcc-radius);
    background:
        radial-gradient(ellipse at 80% 0%, rgba(53, 228, 255, 0.10), transparent 60%),
        linear-gradient(135deg, rgba(8, 28, 60, 0.85), rgba(4, 14, 32, 0.85));
}
.ldcc-activity-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.ldcc-activity-tag {
    display: inline-block;
    grid-column: 1;
    justify-self: start;
    padding: 4px 14px;
    border-radius: 8px;
    background: rgba(22, 168, 255, 0.16);
    border: 1px solid rgba(22, 168, 255, 0.4);
    color: #cfeaff;
    font-size: var(--ldcc-fs-base);
    font-weight: 700;
    line-height: 1.4;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.ldcc-activity-status {
    grid-column: 3;
    justify-self: end;
    color: var(--ldd-muted);
    font-size: var(--ldcc-fs-base);
    white-space: nowrap;
}
/* Colour the status value (เปิดรับสมัคร / ปิดรับสมัคร / …) by activity state */
.ldcc-status-value         { font-weight: 700; }
.ldcc-status-active        { color: var(--ldd-green); }   /* เปิดรับสมัคร */
.ldcc-status-closed        { color: var(--ldd-red);   }   /* ปิดรับสมัคร */
.ldcc-activity h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 900;
    line-height: 1.3;
}
.ldcc-activity-desc {
    margin: 0 0 12px;
    color: var(--ldd-muted);
    font-size: var(--ldcc-fs-base);
    line-height: 1.5;
}
.ldcc-activity-stats {
    display: grid;
    /* Explicit step layout: 1 → 2 → 4 cols. auto-fit was tempting but with 4
       items it produced ugly 3+1 wraps in the 600–900px range. Stepped
       breakpoints guarantee items always pair up evenly. */
    grid-template-columns: 1fr;
    gap: clamp(8px, 1.4vw, 12px);
    margin-top: 12px;
}
@media (min-width: 420px) {
    .ldcc-activity-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
    .ldcc-activity-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ldcc-stat {
    padding: clamp(8px, 1.2vw, 12px) clamp(10px, 1.4vw, 14px);
    border-radius: 12px;
    background: rgba(2, 10, 25, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.ldcc-stat span {
    display: block;
    color: var(--ldd-muted);
    font-size: var(--ldcc-fs-small);
    line-height: 1.4;
}
.ldcc-stat strong {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: clamp(15px, 1.6vw, 18px);
    font-weight: 900;
    line-height: 1.25;
    word-break: break-word;
}
.ldcc-stat-prize {
    border-color: rgba(255, 203, 74, 0.45);
    background:
        radial-gradient(circle at 80% 30%, rgba(255, 203, 74, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(64, 38, 4, 0.45), rgba(7, 23, 48, 0.55));
}
.ldcc-stat-prize span { color: #f7e7be; }
.ldcc-stat-prize strong { color: var(--ldd-gold); text-shadow: 0 0 14px rgba(255, 203, 74, 0.45); }

/* Prize list */
.ldcc-prizes {
    padding: var(--ldcc-card-pad);
    border: 1px solid var(--ldd-line);
    border-radius: var(--ldcc-radius);
    background: linear-gradient(180deg, rgba(8, 28, 60, 0.78), rgba(4, 14, 32, 0.86));
}
.ldcc-prizes h3 {
    margin: 0 0 12px;
    color: var(--ldd-cyan);
    font-size: var(--ldcc-fs-h3);
    font-weight: 900;
}
.ldcc-prize-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 10px);
}
.ldcc-prize-item {
    position: relative;
    display: grid;
    grid-template-columns: clamp(40px, 5vw, 56px) minmax(0, 1fr) auto;
    gap: clamp(10px, 1.4vw, 14px);
    align-items: center;
    padding: clamp(10px, 1.4vw, 12px) clamp(12px, 1.6vw, 16px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 10, 25, 0.55);
}
.ldcc-prize-item.ldcc-prize-rank-1 {
    border-color: rgba(255, 203, 74, 0.55);
    background: linear-gradient(90deg, rgba(255, 203, 74, 0.10), rgba(255, 203, 74, 0.02) 60%, transparent), rgba(2, 10, 25, 0.55);
}
.ldcc-prize-item.ldcc-prize-rank-2 {
    border-color: rgba(200, 215, 230, 0.55);
    background: linear-gradient(90deg, rgba(200, 215, 230, 0.10), rgba(200, 215, 230, 0.02) 60%, transparent), rgba(2, 10, 25, 0.55);
}
.ldcc-prize-item.ldcc-prize-rank-3 {
    border-color: rgba(217, 138, 71, 0.55);
    background: linear-gradient(90deg, rgba(217, 138, 71, 0.10), rgba(217, 138, 71, 0.02) 60%, transparent), rgba(2, 10, 25, 0.55);
}
.ldcc-prize-medal {
    font-size: clamp(24px, 3vw, 36px);
    text-align: center;
    line-height: 1;
    position: relative;
    z-index: 1;
}
.ldcc-prize-info {
    min-width: 0;
    padding-right: clamp(96px, 14vw, 150px);
    position: relative;
    z-index: 1;
}
.ldcc-prize-info strong {
    display: block;
    color: var(--ldd-cyan);
    font-size: var(--ldcc-fs-base);
    font-weight: 900;
    line-height: 1.3;
}
.ldcc-prize-info span {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-size: var(--ldcc-fs-base);
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.ldcc-prize-count {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    justify-self: center;
    z-index: 2;
}
.ldcc-prize-count strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(53, 228, 255, 0.28);
    background: rgba(53, 228, 255, 0.12);
    color: #eafcff;
    font-size: var(--ldcc-fs-small);
    font-weight: 900;
    line-height: 1.2;
}
.ldcc-prize-value {
    position: relative;
    z-index: 1;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}
.ldcc-prize-value strong {
    display: block;
    color: var(--ldd-green);
    font-size: clamp(15px, 1.8vw, 20px);
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 0 14px rgba(39, 245, 138, 0.32);
}
.ldcc-prize-value small {
    display: block;
    margin-top: 2px;
    color: var(--ldd-muted);
    font-size: var(--ldcc-fs-small);
    line-height: 1.3;
}

/* Phone lookup form */
.ldcc-lookup {
    padding: var(--ldcc-card-pad);
    border: 1px solid rgba(53, 228, 255, 0.3);
    border-radius: var(--ldcc-radius);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(53, 228, 255, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(8, 28, 60, 0.85), rgba(4, 14, 32, 0.92));
}
.ldcc-lookup h3 {
    margin: 0 0 12px;
    color: var(--ldd-cyan);
    font-size: var(--ldcc-fs-h3);
    font-weight: 900;
}
.ldcc-form {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1.2vw, 12px);
    align-items: stretch;
}
.ldcc-input {
    flex: 1 1 220px;
    min-width: 0;
    height: clamp(44px, 5vw, 52px);
    padding: 0 clamp(14px, 1.6vw, 18px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(2, 10, 25, 0.72);
    color: var(--ldd-text);
    font-size: clamp(15px, 1.5vw, 18px);
    font-family: inherit;
    letter-spacing: 0.5px;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.ldcc-input::placeholder {
    color: var(--ldd-muted);
    font-size: clamp(13px, 1.2vw, 15px);
    letter-spacing: 0;
}
.ldcc-input:focus {
    border-color: var(--ldd-cyan);
    box-shadow: 0 0 0 3px rgba(53, 228, 255, 0.18);
}
.ldcc-btn {
    flex: 0 0 auto;
    min-width: clamp(110px, 14vw, 140px);
    height: clamp(44px, 5vw, 52px);
    padding: 0 clamp(20px, 2vw, 28px);
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ldd-blue), var(--ldd-blue-2));
    color: #fff;
    font-size: clamp(14px, 1.3vw, 16px);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(22, 168, 255, 0.32);
    transition: transform 0.12s, box-shadow 0.15s;
}
.ldcc-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(22, 168, 255, 0.42);
}
.ldcc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Result */
.ldcc-result {
    margin-top: clamp(12px, 1.6vw, 16px);
    padding: clamp(12px, 1.6vw, 16px) clamp(14px, 1.8vw, 20px);
    border-radius: 12px;
    font-size: var(--ldcc-fs-base);
    line-height: 1.5;
    text-align: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.ldcc-result.is-clickable {
    cursor: pointer;
    overflow: hidden;
    position: relative;
}
.ldcc-result.is-clickable::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(39, 245, 138, 0.12) 50%, transparent 80%);
    transform: translateX(-100%);
    transition: transform 0.55s ease;
    pointer-events: none;
}
.ldcc-result.is-clickable:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 10px 32px rgba(39, 245, 138, 0.4), 0 0 0 1px rgba(39, 245, 138, 0.5);
    border-color: rgba(39, 245, 138, 0.8);
    background: rgba(39, 245, 138, 0.18);
}
.ldcc-result.is-clickable:hover::after {
    transform: translateX(100%);
}
.ldcc-result-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: 100%;
    white-space: nowrap;
}

.ldcc-count-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 1.4;
    white-space: nowrap;
}
.ldcc-count-hint {
    display: inline-block;
    font-size: clamp(12px, 1.1vw, 14px);
    opacity: 0.85;
    letter-spacing: 0.3px;
    transition: opacity 0.18s, letter-spacing 0.18s;
}
.ldcc-result.is-clickable:hover .ldcc-count-hint {
    opacity: 1;
    letter-spacing: 0.8px;
}
.ldcc-winner-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: clamp(12px, 1.1vw, 14px);
    font-weight: 800;
    white-space: nowrap;
}
.ldcc-winner-summary.is-winner {
    background: rgba(255, 203, 74, 0.16);
    border: 1px solid rgba(255, 203, 74, 0.44);
    color: #ffe08a;
}
.ldcc-winner-summary.is-none {
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.30);
    color: #d4deee;
}
.ldcc-winner-summary strong {
    font-size: 1.15em;
    margin: 0 3px;
}

@media (max-width: 640px) {
    .ldcc-result-line {
        flex-wrap: wrap;
        gap: 8px;
        white-space: normal;
    }
    .ldcc-count-text {
        flex-wrap: wrap;
        justify-content: center;
        white-space: normal;
    }
}
.ldcc-result.is-success {
    background: rgba(39, 245, 138, 0.12);
    border: 1px solid rgba(39, 245, 138, 0.4);
    color: #6dffb3;
}
.ldcc-result.is-empty {
    background: rgba(255, 203, 74, 0.10);
    border: 1px solid rgba(255, 203, 74, 0.32);
    color: #ffd86b;
}
.ldcc-result.is-error {
    background: rgba(255, 65, 93, 0.12);
    border: 1px solid rgba(255, 65, 93, 0.4);
    color: #ff8a9e;
}
.ldcc-result strong {
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 1000;
    margin: 0 4px;
    text-shadow: 0 0 14px currentColor;
}

/* Footer note — now used to display the seed hash for the active activity */
.ldcc-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1vw, 10px);
    text-align: center;
    padding: clamp(10px, 1.4vw, 14px) clamp(12px, 1.8vw, 20px) clamp(14px, 1.8vw, 18px);
    border-radius: var(--ldd-radius-md);
    background: rgba(22, 168, 255, 0.06);
    border: 1px solid var(--ldd-line);
    color: var(--ldd-muted);
    font-size: var(--ldcc-fs-base);
    line-height: 1.5;
}
.ldcc-seed-label {
    color: #cfeaff;
    font-weight: 700;
    white-space: nowrap;
}
.ldcc-seed-code {
    display: inline-block;
    max-width: 100%;
    padding: 4px clamp(8px, 1.2vw, 12px);
    border-radius: 6px;
    background: rgba(2, 10, 25, 0.85);
    border: 1px solid rgba(53, 228, 255, 0.45);
    color: var(--ldd-cyan);
    font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
    font-size: clamp(12px, 1.2vw, 15px);
    letter-spacing: 1px;
    word-break: break-all;
    overflow-wrap: anywhere;
}
.ldcc-seed-note {
    color: var(--ldd-muted);
    font-size: 13px;
    font-style: italic;
}

/* Info-icon tooltip in front of the Verification Code label */
.ldcc-seed-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(53, 228, 255, 0.15);
    border: 1px solid rgba(53, 228, 255, 0.55);
    color: var(--ldd-cyan);
    font-size: 12px;
    font-weight: 900;
    font-style: italic;
    cursor: help;
    transition: background 0.15s, border-color 0.15s;
}
.ldcc-seed-tip:hover,
.ldcc-seed-tip:focus {
    background: rgba(53, 228, 255, 0.28);
    border-color: var(--ldd-cyan);
    outline: none;
}
.ldcc-seed-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-11px);   /* anchor near the icon so the box extends rightward, not off-screen */
    width: max-content;
    max-width: min(360px, calc(100vw - 32px));
    padding: 10px 14px;
    border-radius: 8px;
    background: #0a1f3e;
    border: 1px solid rgba(53, 228, 255, 0.4);
    color: #e6f3ff;
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 10;
}
.ldcc-seed-tip::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(53, 228, 255, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 10;
}
.ldcc-seed-tip:hover::after,
.ldcc-seed-tip:hover::before,
.ldcc-seed-tip:focus::after,
.ldcc-seed-tip:focus::before {
    opacity: 1;
    visibility: visible;
}

/* Copy icon button after the hash */
.ldcc-seed-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid rgba(53, 228, 255, 0.45);
    background: rgba(2, 10, 25, 0.85);
    color: var(--ldd-cyan);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.ldcc-seed-copy:hover {
    background: rgba(53, 228, 255, 0.18);
    border-color: var(--ldd-cyan);
    transform: translateY(-1px);
}
.ldcc-seed-copy:focus {
    outline: 2px solid rgba(53, 228, 255, 0.5);
    outline-offset: 2px;
}
.ldcc-empty {
    padding: clamp(24px, 4vw, 40px) clamp(16px, 2vw, 24px);
    text-align: center;
    color: var(--ldd-muted);
    font-size: var(--ldcc-fs-base);
    line-height: 1.5;
    border: 1px dashed var(--ldd-line);
    border-radius: var(--ldd-radius-md);
}

.ldcc-announce-btn {
    position: static;
    grid-column: 2;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: clamp(9px, 1.2vw, 12px) clamp(14px, 1.8vw, 22px);
    border-radius: 999px;
    background: linear-gradient(135deg, #ffcb4a, #ff9b3a);
    color: #1a0e00;
    font-size: clamp(13px, 1.3vw, 16px);
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 10px 28px rgba(255, 155, 58, 0.45), 0 0 0 2px rgba(255, 235, 180, 0.35) inset;
    transition: transform 0.15s, box-shadow 0.15s;
    max-width: 100%;
}
.ldcc-announce-btn:hover {
    transform: translateY(-2px);
    color: #1a0e00;
    box-shadow: 0 14px 34px rgba(255, 155, 58, 0.6), 0 0 0 2px rgba(255, 235, 180, 0.55) inset;
}
.ldcc-announce-btn:focus-visible {
    outline: 3px solid rgba(255, 235, 180, 0.7);
    outline-offset: 3px;
}

/* ── Desktop ≥1280px: locked single-screen layout (no page scroll) ─────────
   On large laptops & desktops we want everything to fit one viewport so the
   lookup CTA is always in view. Prizes list scrolls internally when long. */
@media (min-width: 1280px) {
    .ldcc-page {
        padding: 32px 24px 16px;
    }
    .ldcc-shell {
        max-width: 1100px;
        height: auto;
        max-height: none;
        gap: 12px;
    }

    .ldcc-title    { padding: 14px 16px 10px; }
    .ldcc-title h1 { font-size: 22px; margin: 0 0 2px; }

    .ldcc-activity        { padding: 14px 18px; }
    .ldcc-activity-head   { margin-bottom: 8px; }
    .ldcc-activity-tag    { padding: 6px 16px; }
    .ldcc-activity-switcher { padding: 10px 14px; }
    .ldcc-activity-desc   { margin: 0 0 8px; }
    .ldcc-activity-stats  { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; }

    /* Prizes — sized for exactly 3 items; scroll inside the list when there are more */
    .ldcc-prizes {
        padding: 14px 18px;
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
    }
    .ldcc-prizes h3 { font-size: 16px; margin: 0 0 8px; }
    .ldcc-prize-list {
        gap: 6px;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
    .ldcc-prize-item  { padding: 8px 14px; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; }
    .ldcc-prize-medal { font-size: 24px; }

    /* Lookup — hero card with locked height */
    .ldcc-lookup {
        flex: 0 0 240px;
        height: 240px;
        padding: 28px 36px;
        border: 2px solid rgba(53, 228, 255, 0.55);
        border-radius: 22px;
        background:
            radial-gradient(ellipse at 50% 0%, rgba(53, 228, 255, 0.22), transparent 60%),
            radial-gradient(ellipse at 50% 100%, rgba(255, 203, 74, 0.10), transparent 65%),
            linear-gradient(180deg, rgba(10, 32, 70, 0.94), rgba(4, 14, 32, 0.96));
        box-shadow: 0 0 50px rgba(53, 228, 255, 0.28), 0 14px 32px rgba(0, 0, 0, 0.5);
        overflow: hidden;
    }
    .ldcc-lookup h3 {
        margin: 0 0 18px;
        font-size: 24px;
        text-align: center;
        text-shadow: 0 0 22px rgba(53, 228, 255, 0.5);
    }
    .ldcc-form  { gap: 14px; flex-wrap: nowrap; }
    .ldcc-input { height: 60px; font-size: 22px; padding: 0 22px; }
    .ldcc-input::placeholder { font-size: 18px; }
    .ldcc-btn   { height: 60px; min-width: 160px; font-size: 20px; }
    .ldcc-result {
        margin-top: 14px;
        padding: 14px 18px;
        font-size: 17px;
    }
    .ldcc-result strong { font-size: 22px; }
    .ldcc-footer { padding: 8px 20px 14px; }
}

/* ── ≤480px: mobile — input/button stack, tighter rhythm ──────────────── */
@media (max-width: 480px) {
    .ldcc-page {
        padding-bottom: var(--ldcc-pad-y);
    }
    .ldcc-activity-switcher {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
    .ldcc-form     { flex-direction: column; }
    .ldcc-input,
    .ldcc-btn      { width: 100%; flex: 0 0 auto; }
    .ldcc-btn      { min-width: 0; }

    /* Activity head: keep tag and status on their own lines for clarity */
    .ldcc-activity-head    { gap: 6px; }
    .ldcc-activity-status  { white-space: normal; }

    /* Prize item: shrink the medal column, lean the value column left for balance */
    .ldcc-prize-item {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        grid-template-areas:
            "medal info  value"
            "medal count value";
        gap: 6px 10px;
        padding: 10px 12px;
    }
    .ldcc-prize-medal      { grid-area: medal; }
    .ldcc-prize-info       { grid-area: info; padding-right: 0; }
    .ldcc-prize-count      { grid-area: count; position: static; transform: none; justify-self: start; text-align: left; }
    .ldcc-prize-count strong { min-width: 0; padding: 4px 8px; }
    .ldcc-prize-value      { text-align: right; }

    .ldcc-announce-btn     { font-size: 13px; padding: 9px 16px; gap: 6px; }
}

@media (max-width: 720px) {
    .ldcc-activity-head {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
    }

    .ldcc-activity-tag,
    .ldcc-activity-status,
    .ldcc-announce-btn {
        grid-column: auto;
        justify-self: center;
    }
}

@media (max-width: 768px) {
    .ldcc-page {
        --ldcc-pad-x: 14px;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

/* ── ≤375px: tiny mobile (iPhone SE-class) — stack medal above content ── */
@media (max-width: 375px) {
    .ldcc-prize-item {
        grid-template-columns: 32px minmax(0, 1fr) auto;
        grid-template-areas:
            "medal info  value"
            "medal count value";
        gap: 8px 10px;
    }
    .ldcc-prize-medal { grid-area: medal; text-align: left; font-size: 22px; }
    .ldcc-prize-info  { grid-area: info; }
    .ldcc-prize-count { grid-area: count; justify-self: start; text-align: left; }
    .ldcc-prize-value { grid-area: value; }

    .ldcc-footer { font-size: 12px; }
}

/* ── Coupon popup modal ────────────────────────────────────────── */
.ldcc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 16px);
}
.ldcc-modal-box {
    background: #0d1a3a;
    border: 1px solid rgba(255, 203, 74, 0.4);
    border-radius: clamp(10px, 1.2vw, 14px);
    width: min(720px, 100%);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.ldcc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: clamp(12px, 1.6vw, 16px) clamp(14px, 1.8vw, 20px);
    border-bottom: 1px solid rgba(255, 203, 74, 0.2);
    font-size: clamp(13px, 1.3vw, 15px);
    font-weight: 700;
    color: #facc15;
    flex-shrink: 0;
}
.ldcc-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}
.ldcc-modal-copy {
    background: rgba(255, 203, 74, 0.12);
    border: 1px solid rgba(255, 203, 74, 0.4);
    color: #facc15;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 6px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.ldcc-modal-copy:hover {
    background: rgba(255, 203, 74, 0.22);
    border-color: rgba(255, 203, 74, 0.7);
}
.ldcc-modal-copy.is-copied {
    background: rgba(39, 245, 138, 0.15);
    border-color: rgba(39, 245, 138, 0.5);
    color: #6dffb3;
}
.ldcc-modal-close {
    background: none;
    border: none;
    color: #9bb0d4;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.ldcc-modal-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ldcc-modal-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: clamp(10px, 1.4vw, 12px) clamp(14px, 1.8vw, 20px);
    border-top: 1px solid rgba(255, 203, 74, 0.2);
    flex-shrink: 0;
}
.ldcc-page-btn {
    background: rgba(255, 203, 74, 0.1);
    border: 1px solid rgba(255, 203, 74, 0.3);
    color: #facc15;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.ldcc-page-btn:hover:not(:disabled) {
    background: rgba(255, 203, 74, 0.2);
    border-color: rgba(255, 203, 74, 0.6);
}
.ldcc-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.ldcc-page-info {
    font-size: 13px;
    color: #9bb0d4;
}
.ldcc-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: clamp(10px, 1.4vw, 12px) clamp(14px, 1.8vw, 20px) clamp(14px, 1.8vw, 20px);
}
.ldcc-modal-body::-webkit-scrollbar { width: 6px; }
.ldcc-modal-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.ldcc-modal-body::-webkit-scrollbar-thumb { background: rgba(255,203,74,0.4); border-radius: 3px; }
.ldcc-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(12px, 1.2vw, 14px);
    color: #e2eaf7;
}
.ldcc-modal-table thead th {
    padding: 8px 10px;
    text-align: left;
    color: #9bb0d4;
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ldcc-modal-table tbody tr:hover { background: rgba(255,255,255,0.04); }
.ldcc-modal-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
}
.ldcc-modal-no { color: #9bb0d4; width: 32px; text-align: center; }
.ldcc-modal-code code {
    background: rgba(255,203,74,0.12);
    color: #facc15;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: clamp(11px, 1.1vw, 13px);
    letter-spacing: 0.5px;
    word-break: break-all;
}
.ldcc-modal-date {
    color: #9bb0d4;
    font-size: clamp(11px, 1vw, 12px);
    white-space: nowrap;
}
.ldcc-modal-prize {
    min-width: 190px;
    white-space: nowrap;
}
.ldcc-modal-prize small {
    display: block;
    margin-top: 3px;
    color: #9bb0d4;
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.ldcc-winner-badge,
.ldcc-loser-badge,
.ldcc-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: clamp(11px, 1vw, 12px);
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}
.ldcc-winner-badge {
    background: linear-gradient(135deg, rgba(255, 203, 74, 0.24), rgba(39, 245, 138, 0.12));
    border: 1px solid rgba(255, 203, 74, 0.56);
    color: #ffe08a;
}
.ldcc-loser-badge {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #cbd5e1;
}
.ldcc-pending-badge {
    background: rgba(53, 228, 255, 0.12);
    border: 1px solid rgba(53, 228, 255, 0.32);
    color: #9df4ff;
}

/* ── Modal mobile tweaks ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ldcc-modal-actions   { gap: 6px; }
    .ldcc-modal-copy      { padding: 5px 10px; font-size: 12px; }
    .ldcc-modal-pagination { font-size: 12px; }
    .ldcc-page-btn        { padding: 5px 10px; font-size: 12px; }
    .ldcc-modal-table thead th { padding: 6px 8px; }
    .ldcc-modal-table td  { padding: 8px 6px; }
    .ldcc-modal-prize     { min-width: 120px; }
}
