/* Shared visual language for the lottery and invite modules. */
.reward-float-stack{position:fixed;left:18px;bottom:22px;z-index:120;display:grid;gap:10px}
.reward-float{position:relative;display:flex;align-items:center;gap:7px;min-width:108px;padding:10px 13px;border:1px solid rgba(255,255,255,.58);border-radius:16px;color:#fff;font:700 13px/1.2 system-ui,"Microsoft YaHei",sans-serif;cursor:pointer;box-shadow:0 12px 28px rgba(56,20,106,.24),inset 0 1px rgba(255,255,255,.3);transition:transform .2s ease,box-shadow .2s ease;backdrop-filter:blur(12px)}
.reward-float:hover{transform:translateY(-3px);box-shadow:0 17px 32px rgba(56,20,106,.3),0 0 0 3px rgba(255,255,255,.15)}
.reward-float span{font-size:19px;line-height:1}.reward-float b{font-weight:800}.reward-float em{position:absolute;right:-5px;top:-7px;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#ef4444;color:#fff;font:800 11px/18px system-ui;text-align:center;font-style:normal;border:2px solid #fff}.reward-float-lottery{background:linear-gradient(135deg,#7c3aed,#c026d3)}.reward-float-invite{background:linear-gradient(135deg,#0f766e,#0891b2)}
.reward-overlay{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:18px;background:rgba(22,8,42,.54);backdrop-filter:blur(8px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility .2s ease}.reward-overlay.is-open{opacity:1;visibility:visible;pointer-events:auto}
.reward-modal{position:relative;width:min(420px,100%);max-height:min(720px,calc(100vh - 36px));overflow:auto;padding:28px 24px 24px;border:1px solid rgba(255,255,255,.68);border-radius:24px;background:linear-gradient(155deg,rgba(255,255,255,.96),rgba(247,240,255,.93));color:#24123e;box-shadow:0 28px 80px rgba(24,8,45,.35);transform:translateY(10px) scale(.98);transition:transform .24s ease}.reward-overlay.is-open .reward-modal{transform:translateY(0) scale(1)}
.reward-close{position:absolute;right:13px;top:10px;width:34px;height:34px;border:0;border-radius:50%;background:rgba(93,49,139,.08);color:#5d318b;font-size:25px;line-height:1;cursor:pointer}.reward-eyebrow{margin:0 0 6px;color:#7c3aed;font-size:11px;font-weight:900;letter-spacing:1.8px;text-transform:uppercase}.reward-modal h2{margin:0;font-size:26px;letter-spacing:0}.reward-subtitle{margin:6px 0 18px;color:#6b5a7c;font-size:13px;line-height:1.6}.reward-stat{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border:1px solid rgba(124,58,237,.14);border-radius:14px;background:rgba(255,255,255,.72)}.reward-stat span{color:#6b5a7c;font-size:13px}.reward-stat strong{color:#6d28d9;font-size:24px}.reward-prizes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0;padding:0;list-style:none}.reward-prize{display:flex;align-items:center;gap:8px;min-width:0;padding:9px;border:1px solid rgba(124,58,237,.11);border-radius:11px;background:rgba(255,255,255,.7)}.reward-prize-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:9px;background:#f3e8ff;font-size:18px}.reward-prize-name{overflow:hidden;color:#493361;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.reward-primary,.reward-secondary,.reward-qualify{min-height:44px;border-radius:12px;padding:0 16px;border:0;font:800 14px/1 system-ui,"Microsoft YaHei",sans-serif;cursor:pointer;transition:filter .2s ease,transform .2s ease}.reward-primary{width:100%;background:linear-gradient(135deg,#6d28d9,#c026d3);color:#fff;box-shadow:0 10px 22px rgba(109,40,217,.24)}.reward-primary:hover,.reward-secondary:hover,.reward-qualify:hover{filter:brightness(1.05);transform:translateY(-1px)}.reward-primary:disabled{opacity:.55;cursor:not-allowed;transform:none}.reward-secondary{flex:1;background:#fff;color:#5b2b88;border:1px solid rgba(109,40,217,.18)}.reward-result{margin:13px 0;padding:14px;border-radius:14px;background:linear-gradient(135deg,#fff7ed,#fef3c7);color:#713f12;text-align:center}.reward-result-icon{font-size:38px;line-height:1;margin-bottom:6px}.reward-result strong{display:block;font-size:17px}.reward-result p{margin:5px 0 0;font-size:12px;line-height:1.5}.invite-progress{padding:14px;border:1px solid rgba(13,148,136,.18);border-radius:14px;background:linear-gradient(135deg,rgba(236,253,245,.9),rgba(236,254,255,.78))}.invite-progress>div:first-child{display:flex;justify-content:space-between;align-items:center;color:#38645d;font-size:12px}.invite-progress strong{color:#0f766e;font-size:18px}.invite-track{height:9px;margin:10px 0 8px;overflow:hidden;border-radius:99px;background:#ccfbf1}.invite-track i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#0f766e,#06b6d4);transition:width .35s ease}.invite-progress p{margin:0;color:#4d706a;font-size:12px}.reward-field{display:block;margin:15px 0 10px;color:#6b5a7c;font-size:12px;font-weight:700}.reward-field input{display:block;width:100%;margin-top:7px;padding:12px;border:1px solid rgba(109,40,217,.18);border-radius:10px;background:#fff;color:#493361;font:12px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace}.reward-actions{display:flex;gap:8px}.reward-qualify{width:100%;margin-top:10px;background:#0f766e;color:#fff}.reward-toast{position:fixed;left:50%;bottom:22px;z-index:180;max-width:min(420px,calc(100vw - 32px));padding:11px 16px;border-radius:11px;background:#24123e;color:#fff;font:700 13px/1.4 system-ui,"Microsoft YaHei",sans-serif;box-shadow:0 12px 28px rgba(0,0,0,.2);transform:translate(-50%,12px);opacity:0;visibility:hidden;transition:opacity .2s ease,transform .2s ease,visibility .2s ease}.reward-toast.is-visible{opacity:1;visibility:visible;transform:translate(-50%,0)}.reward-toast[data-kind="error"]{background:#991b1b}.reward-toast[data-kind="success"]{background:#065f46}
@media(max-width:560px){.reward-float-stack{left:12px;bottom:14px;gap:7px}.reward-float{min-width:96px;padding:9px 10px;font-size:12px}.reward-modal{padding:25px 17px 18px;border-radius:19px}.reward-modal h2{font-size:23px}.reward-prizes{gap:6px}.reward-prize{padding:8px 6px}.reward-actions{flex-direction:column}.reward-secondary{flex:auto;width:100%}.reward-toast{bottom:14px}}
@media(prefers-reduced-motion:reduce){.reward-float,.reward-modal,.reward-overlay,.invite-track i,.reward-primary,.reward-secondary,.reward-qualify{transition:none}}

/* Keep reward feedback above the page and all persistent floating controls. */
.reward-toast{z-index:1200}
.reward-lock{overflow:hidden}

/* Snapshot-inspired reward skin. The markup stays API-driven and intentionally
   uses local CSS/emoji only, so the controls remain usable offline. */
.reward-float-stack{position:static;display:contents}
.reward-overlay{padding:18px 16px 18px 18px}
.reward-float{position:fixed;z-index:1060;width:52px;height:52px;min-width:52px;padding:0;border-radius:50%;display:grid;place-items:center;gap:0;overflow:visible;border:1px solid rgba(255,255,255,.72);font-size:22px;line-height:1;background:#211238;box-shadow:0 8px 24px rgba(20,8,40,.35),inset 0 1px rgba(255,255,255,.28);transform:translateZ(0);animation:reward-float-bob 2.6s ease-in-out infinite}
.reward-float b{position:absolute;top:calc(100% + 7px);left:50%;transform:translateX(-50%);color:#fff;font-size:11px;line-height:1;white-space:nowrap;text-shadow:0 1px 4px rgba(20,8,40,.7);font-weight:800}
.reward-float span{position:relative;z-index:1;font-size:24px;line-height:1;filter:drop-shadow(0 2px 3px rgba(0,0,0,.25))}
.reward-float em{z-index:3;right:-4px;top:-5px;border-width:2px;box-shadow:0 3px 10px rgba(239,68,68,.36)}
.reward-float-lottery{left:20px;bottom:84px;background:radial-gradient(circle at 32% 24%,#50316e 0,#24133c 54%,#11091e 100%);border-color:rgba(245,215,110,.72);box-shadow:0 8px 24px rgba(37,13,63,.42),0 0 30px rgba(245,215,110,.18),inset 0 1px rgba(255,255,255,.2)}
.reward-float-lottery::after{content:"";position:absolute;inset:-8px;border-radius:50%;border:1px solid rgba(245,215,110,.35);box-shadow:0 0 22px rgba(245,215,110,.25);animation:reward-ring 2.4s ease-in-out infinite;pointer-events:none}
.reward-float-invite{right:20px;bottom:84px;background:linear-gradient(135deg,#7c3aed,#c026d3 55%,#f97316);border-color:rgba(255,255,255,.72);box-shadow:0 8px 24px rgba(124,58,237,.34),0 0 28px rgba(236,72,153,.22),inset 0 1px rgba(255,255,255,.42);animation-delay:-1.1s}
.reward-float-invite::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:1px solid rgba(255,255,255,.42);animation:reward-ring 2.8s ease-in-out infinite reverse;pointer-events:none}
.reward-float:hover{transform:translateY(-3px) scale(1.07);filter:brightness(1.08)}
.reward-float:focus-visible{outline:3px solid rgba(255,255,255,.9);outline-offset:3px}
@keyframes reward-float-bob{0%,100%{translate:0 0}50%{translate:0 -4px}}
@keyframes reward-ring{0%,100%{opacity:.35;transform:scale(.96)}50%{opacity:.9;transform:scale(1.12)}}

.reward-overlay#lotteryOverlay{background:radial-gradient(ellipse at center,rgba(42,20,75,.86),rgba(8,4,22,.96));backdrop-filter:blur(10px)}
.lottery-modal{width:min(392px,100%);max-width:min(392px,100%);min-height:min(770px,calc(100vh - 36px));max-height:min(770px,calc(100vh - 36px));padding:22px 18px 18px;border-radius:26px;background:linear-gradient(160deg,#10091f 0%,#1b1034 34%,#2c194a 64%,#160b2b 100%);border:1px solid rgba(245,215,110,.28);color:#fff;box-shadow:0 30px 84px rgba(0,0,0,.58),0 0 56px rgba(147,51,234,.25),inset 0 1px rgba(255,255,255,.1);overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
.lottery-modal::-webkit-scrollbar{width:0;height:0}
.lottery-modal::before{content:"";position:absolute;inset:-55%;background:conic-gradient(from 0deg,transparent,rgba(245,215,110,.09),transparent 28%,rgba(236,72,153,.08),transparent 58%,rgba(147,51,234,.1),transparent 82%);animation:lottery-glow-rotate 13s linear infinite;pointer-events:none}
.lottery-modal::after{content:"";position:absolute;top:0;left:18%;right:18%;height:2px;background:linear-gradient(90deg,transparent,#f5d76e,#ff6b9d,#f5d76e,transparent);opacity:.8;filter:blur(.5px);pointer-events:none}
.lottery-modal>*{position:relative;z-index:1}
.lottery-modal .reward-close{position:absolute;z-index:4;top:13px;right:13px;left:auto;width:32px;height:32px;border:1px solid rgba(245,215,110,.28);background:rgba(0,0,0,.28);color:rgba(255,255,255,.75)}
.lottery-modal .reward-close:hover{background:rgba(245,215,110,.16);color:#ffe66b;transform:rotate(90deg)}
.lottery-heading{text-align:center;padding-top:3px}.lottery-modal h2{font-size:24px;letter-spacing:2px;background:linear-gradient(180deg,#ffe66b,#f5d76e 48%,#d4af37);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-shadow:0 0 18px rgba(245,215,110,.3);filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}.lottery-modal .reward-subtitle{margin:4px 0 10px;color:rgba(245,215,110,.64);font-size:11px;letter-spacing:1px}
.lottery-chest-wrap{height:136px;display:grid;place-items:center;margin:0 auto 7px;position:relative}.lottery-chest-wrap::before{content:"";position:absolute;width:170px;height:120px;border-radius:50%;background:radial-gradient(circle,rgba(245,215,110,.28),rgba(147,51,234,.14) 45%,transparent 72%);animation:lottery-chest-glow 2.4s ease-in-out infinite;pointer-events:none}.lottery-chest{position:relative;width:132px;height:101px;padding:0;border:0;background:transparent;cursor:pointer;filter:drop-shadow(0 10px 16px rgba(0,0,0,.42));animation:lottery-chest-bob 2.6s ease-in-out infinite}.lottery-chest:focus{outline:0}.lottery-chest-body,.lottery-chest-lid{position:absolute;display:block;left:50%;transform:translateX(-50%);background:linear-gradient(145deg,#8b6914,#d4af37 54%,#8b6914);box-shadow:inset 0 2px rgba(255,255,255,.34),inset 0 -4px rgba(0,0,0,.2)}.lottery-chest-body{bottom:0;width:118px;height:67px;border-radius:7px 7px 11px 11px}.lottery-chest-body::before{content:"";position:absolute;left:50%;top:50%;width:38px;height:33px;transform:translate(-50%,-50%);border-radius:5px;background:linear-gradient(145deg,#ffe66b,#d4af37);box-shadow:0 2px 7px rgba(0,0,0,.28)}.lottery-chest-body::after{content:"";position:absolute;left:50%;top:50%;width:9px;height:9px;transform:translate(-50%,-50%);border-radius:50%;background:#24133c;box-shadow:inset 0 1px 3px rgba(0,0,0,.6)}.lottery-chest-lid{top:9px;width:130px;height:42px;border-radius:11px 11px 4px 4px;transform:translateX(-50%);transform-origin:bottom center;z-index:2}.lottery-chest-lid::after{content:"";position:absolute;bottom:-2px;left:0;right:0;height:8px;background:linear-gradient(145deg,#ffe66b,#d4af37);border-radius:0 0 2px 2px}.lottery-chest span{position:absolute;z-index:3;left:50%;top:55%;transform:translate(-50%,-50%);font-size:34px;opacity:.05;filter:drop-shadow(0 4px 12px rgba(245,215,110,.7))}.lottery-chest.is-opening{animation:lottery-chest-shake .13s ease-in-out infinite}.lottery-chest.is-opening .lottery-chest-lid{animation:lottery-lid-open .75s cubic-bezier(.22,1,.36,1) forwards}.lottery-chest.is-opening span{animation:lottery-gift-pop .9s cubic-bezier(.22,1,.36,1) .28s forwards}
@keyframes lottery-chest-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}@keyframes lottery-chest-shake{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg)}}@keyframes lottery-lid-open{to{transform:translateX(-50%) rotateX(-108deg)}}@keyframes lottery-gift-pop{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}60%{opacity:1;transform:translate(-50%,-90%) scale(1.24)}100%{opacity:1;transform:translate(-50%,-75%) scale(1)}}@keyframes lottery-chest-glow{0%,100%{opacity:.55;transform:scale(.96)}50%{opacity:1;transform:scale(1.08)}}@keyframes lottery-glow-rotate{to{transform:rotate(360deg)}}
.lottery-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:0 0 8px}.lottery-stat{padding:9px 4px 8px;border:1px solid rgba(245,215,110,.2);border-radius:10px;background:rgba(10,5,30,.45);text-align:center}.lottery-stat strong{display:block;color:#ffe66b;font-size:20px;line-height:1.1}.lottery-stat span{display:block;margin-top:4px;color:rgba(255,255,255,.58);font-size:10px}.lottery-bonus-note{margin:0 0 10px;color:rgba(245,215,110,.62);font-size:10px;text-align:center}.lottery-bonus-note b{color:#ffe66b}.lottery-prize-label{margin:0 0 7px;color:rgba(245,215,110,.76);font-size:11px;font-weight:800;letter-spacing:1px}.lottery-modal .reward-prizes{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 12px}.lottery-modal .reward-prize{display:flex;flex-direction:column;justify-content:center;gap:4px;min-height:57px;padding:6px 4px;border:1px solid rgba(245,215,110,.14);border-radius:9px;background:rgba(255,255,255,.065);text-align:center}.lottery-modal .reward-prize-icon{width:auto;height:auto;flex:none;background:transparent;font-size:21px}.lottery-modal .reward-prize-name{max-width:100%;color:rgba(255,255,255,.72);font-size:10px;text-align:center}.lottery-modal .reward-primary{background:linear-gradient(135deg,#d4af37,#f5d76e 48%,#ec4899);color:#24133c;box-shadow:0 8px 22px rgba(212,175,55,.2)}.lottery-modal .reward-primary:disabled{background:linear-gradient(135deg,#66562b,#7b6d43);color:rgba(255,255,255,.65)}.lottery-modal .reward-result{margin:0 0 11px;border:1px solid rgba(245,215,110,.3);background:linear-gradient(135deg,rgba(245,215,110,.14),rgba(236,72,153,.12));color:#ffeab0}.lottery-modal .reward-result p{color:rgba(255,255,255,.76)}
.lottery-modal .reward-prize-empty{grid-column:1/-1;min-height:38px;color:rgba(255,255,255,.54);font-size:11px}

.invite-modal{width:min(382px,100%);padding:0;border-radius:22px;background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.7);box-shadow:0 26px 72px rgba(45,16,75,.3);overflow:hidden;color:#1f2937}.invite-modal::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:conic-gradient(from 0deg,transparent,rgba(124,58,237,.55),rgba(236,72,153,.55),rgba(249,115,22,.55),transparent);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;animation:invite-border-spin 7s linear infinite}.invite-modal .reward-close{top:14px;right:14px;z-index:5;width:29px;height:29px;border:1px solid rgba(255,255,255,.34);background:rgba(0,0,0,.2);color:#fff;font-size:21px}.invite-header{position:relative;display:flex;align-items:center;gap:11px;padding:20px 19px 18px;background:linear-gradient(120deg,#7c3aed,#9333ea 28%,#c026d3 55%,#ec4899 78%,#f97316);color:#fff;overflow:hidden}.invite-header::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 2px,rgba(255,255,255,.045) 2px 4px);pointer-events:none}.invite-header::after{content:"";position:absolute;right:-54px;top:-76px;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,rgba(255,220,150,.22),transparent 67%);pointer-events:none}.invite-header>*{position:relative;z-index:1}.invite-header-icon{display:grid;place-items:center;flex:none;width:39px;height:39px;border:1px solid rgba(255,255,255,.35);border-radius:11px;background:rgba(255,255,255,.2);font-size:23px;font-weight:900;box-shadow:0 4px 12px rgba(0,0,0,.14)}.invite-kicker{margin:0 0 2px;color:rgba(255,255,255,.78);font-size:10px;letter-spacing:.7px}.invite-kicker span{margin-left:4px;padding:2px 6px;border-radius:99px;background:#fcd34d;color:#422006;font-size:8px;font-weight:900;letter-spacing:.4px}.invite-header h2{margin:0;color:#fff;font-size:20px;line-height:1.15;letter-spacing:0}.invite-header>div:last-child>p:last-child{margin:4px 0 0;color:rgba(255,255,255,.75);font-size:11px}.invite-body{position:relative;padding:15px 16px 17px}.invite-card{padding:14px;border:1px solid rgba(124,58,237,.09);border-radius:14px;background:rgba(249,247,255,.82);box-shadow:0 3px 14px rgba(124,58,237,.06)}.invite-card-title{display:flex;align-items:center;gap:10px}.invite-card-title>span{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#f5d76e,#d4af37,#b8860b);font-size:20px;box-shadow:0 4px 12px rgba(212,175,55,.28)}.invite-card-title small{display:block;margin-bottom:2px;color:#9ca3af;font-size:10px}.invite-card-title strong{display:block;color:#1f2937;font-size:15px;line-height:1.25}.invite-card-desc{margin:10px 0 13px;color:#6b7280;font-size:11px;line-height:1.5}.invite-modal .invite-progress{padding:0;border:0;background:transparent}.invite-modal .invite-progress>div:first-child{color:#4b5563;font-size:12px}.invite-modal .invite-progress strong{color:#1f2937;font-size:15px}.invite-modal .invite-progress strong b:first-child{color:#ec4899;text-shadow:0 0 12px rgba(236,72,153,.3)}.invite-modal .invite-progress strong i{margin:0 3px;color:#d1d5db;font-style:normal}.invite-modal .invite-progress strong small{margin-left:2px;color:#9ca3af;font-size:10px;font-weight:600}.invite-modal .invite-track{height:8px;margin:8px 0 7px;background:#f3f0f9}.invite-modal .invite-track i{background:linear-gradient(90deg,#7c3aed,#ec4899,#f97316);box-shadow:0 0 10px rgba(236,72,153,.28)}.invite-modal .invite-progress p{color:#38bdf8;font-size:11px}.invite-modal .reward-field{margin:14px 0 9px;color:#6b7280}.invite-modal .reward-field input{margin-top:6px;border-color:#e5e7eb;background:rgba(255,255,255,.72);color:#4b5563}.invite-modal .reward-actions{gap:8px}.invite-modal .reward-actions .reward-primary{width:auto;flex:1;background:linear-gradient(135deg,#7c3aed,#ec4899,#f97316);box-shadow:0 5px 15px rgba(124,58,237,.22)}.invite-modal .reward-secondary{flex:1;color:#7c3aed;border-color:rgba(124,58,237,.3);background:rgba(255,255,255,.82)}.invite-modal .reward-qualify{margin-top:9px;background:linear-gradient(135deg,#f97316,#ec4899);box-shadow:0 6px 18px rgba(249,115,22,.22)}
@keyframes invite-border-spin{to{transform:rotate(360deg)}}
@media(max-width:560px){.reward-float-lottery{left:14px;bottom:78px}.reward-float-invite{right:14px;bottom:78px}.reward-float{width:48px;height:48px;min-width:48px}.reward-float span{font-size:21px}.lottery-modal{padding:20px 14px 15px;border-radius:21px}.lottery-modal .reward-prizes{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.lottery-modal .reward-prize{min-height:53px;padding:5px 2px}.lottery-modal .reward-prize-icon{font-size:19px}.lottery-modal .reward-prize-name{font-size:9px}.invite-header{padding:18px 16px 16px}.invite-body{padding:13px 13px 15px}}
@media(prefers-reduced-motion:reduce){.reward-float,.reward-float::before,.reward-float::after,.lottery-modal::before,.lottery-chest,.lottery-chest-wrap::before,.invite-modal::before{animation:none}}

/* Neutralize legacy clone chest dimensions that share these class names. */
.lottery-chest-wrap{width:170px!important;height:136px!important;z-index:2}
.lottery-chest-wrap::before{inset:auto!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;width:170px!important;height:120px!important;transform:translate(-50%,-50%)!important;z-index:-1!important}

/* Screenshot layout: three compact columns and a quiet record entry below the CTA. */
.lottery-modal .reward-prizes{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:13px}
.lottery-modal .reward-prizes{margin:15px 0 14px;padding:12px 10px 10px;border:1px solid rgba(245,215,110,.19);border-radius:14px;background:rgba(9,4,27,.34)}
.lottery-modal .reward-prize{min-width:0;min-height:78px;padding:8px 4px;transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease}
.lottery-modal .reward-prize.is-highlighted{border-color:rgba(255,230,107,.92);background:linear-gradient(145deg,rgba(245,215,110,.22),rgba(236,72,153,.16));box-shadow:0 0 0 1px rgba(245,215,110,.18),0 0 18px rgba(245,215,110,.22);transform:translateY(-2px)}
.lottery-modal .reward-prize-icon{display:grid;place-items:center;width:31px;height:31px;margin:0 auto;background:rgba(255,255,255,.05);border-radius:8px;font-size:22px;line-height:1;object-fit:contain}
.lottery-modal img.reward-prize-icon{padding:3px}
.lottery-history-toggle{display:block;margin:11px auto 0;padding:4px 10px;border:0;background:transparent;color:rgba(255,255,255,.48);font:600 12px/1.3 system-ui,"Microsoft YaHei",sans-serif;cursor:pointer;transition:color .18s ease}
.lottery-history-toggle:hover,.lottery-history-toggle:focus-visible{color:#ffe66b}
.lottery-history-toggle:focus-visible{outline:2px solid rgba(255,230,107,.65);outline-offset:3px;border-radius:5px}
.lottery-history{margin-top:10px;padding:11px 10px 9px;border:1px solid rgba(245,215,110,.2);border-radius:12px;background:rgba(9,4,27,.45)}
.lottery-history-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;color:rgba(255,255,255,.78);font-size:11px}
.lottery-history-heading button{width:24px;height:24px;padding:0;border:1px solid rgba(245,215,110,.25);border-radius:7px;background:rgba(255,255,255,.06);color:#ffe66b;font-size:16px;line-height:1;cursor:pointer}
.lottery-history-heading button:hover{background:rgba(245,215,110,.16)}
.lottery-history-list{display:grid;gap:5px;max-height:160px;margin:0;padding:0;overflow:auto;list-style:none}
.lottery-history-item{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 4px;border-bottom:1px solid rgba(255,255,255,.07)}
.lottery-history-item:last-child{border-bottom:0}
.lottery-history-icon{display:grid;place-items:center;flex:none;width:25px;height:25px;border-radius:7px;background:rgba(255,255,255,.08);font-size:16px;line-height:1;object-fit:contain}
.lottery-history-detail{display:grid;min-width:0;gap:2px}
.lottery-history-detail strong{overflow:hidden;color:rgba(255,255,255,.82);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.lottery-history-detail small{overflow:hidden;color:rgba(255,255,255,.44);font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.lottery-history-empty{margin:6px 0 3px;color:rgba(255,255,255,.44);font-size:10px;text-align:center}
.lottery-modal img.reward-result-icon{display:block;width:42px;height:42px;margin:0 auto 6px;object-fit:contain;border-radius:9px}
.lottery-modal .lottery-stats{margin:0 0 17px;padding:12px 3px 10px;border:1px solid rgba(245,215,110,.2);border-radius:14px;background:rgba(9,4,27,.42)}
.lottery-modal .lottery-stat{position:relative;padding:2px 4px 1px;border:0;border-radius:0;background:transparent}
.lottery-modal .lottery-stat + .lottery-stat::before{content:"";position:absolute;left:0;top:5px;bottom:5px;width:1px;background:rgba(245,215,110,.22)}
.lottery-modal [data-lottery-draw]{min-height:49px;border-radius:13px;font-size:15px;letter-spacing:1px}
.lottery-modal .lottery-chest-wrap{height:170px!important;margin:25px auto 7px}
.lottery-modal .lottery-chest-wrap::before{width:210px!important;height:150px!important}
.lottery-modal .lottery-chest{width:172px;height:125px;top:-12px}
.lottery-modal .lottery-chest-body{width:164px;height:78px}
.lottery-modal .lottery-chest-lid{width:172px;height:57px;top:10px}
.lottery-modal .lottery-chest-body::before{width:50px;height:41px}
.lottery-modal .lottery-chest-body::after{width:11px;height:11px}
@media(max-width:560px){
  .lottery-modal{padding:20px 20px 15px}
  .lottery-modal .reward-prizes{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px;padding:13px 10px 10px}
  .lottery-modal .reward-prize{min-height:78px;padding:6px 2px}
  .lottery-modal .reward-prize-icon{width:28px;height:28px;font-size:19px}
  .lottery-modal .reward-prize-name{font-size:9px}
  .lottery-modal .lottery-chest-wrap{height:170px!important}
  .lottery-modal .lottery-chest{width:172px;height:125px;top:-12px}
  .lottery-modal .lottery-chest-body{width:164px;height:78px}
  .lottery-modal .lottery-chest-lid{width:172px;height:57px}
  .lottery-modal .lottery-chest-body::before{width:50px;height:41px}
  .lottery-history-list{max-height:132px}
 }

/* Invite panel additions: values are hydrated by rewards.js from the public
   invite settings endpoint. Keep the card readable when a long admin value is
   supplied on a narrow phone. */
.invite-modal{
  isolation:isolate;
  max-height:min(760px,calc(100vh - 24px));
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-width:none;
}
.invite-modal::-webkit-scrollbar{width:0;height:0}
.invite-modal .invite-header{z-index:1;padding-right:62px}
.invite-modal .invite-close{
  position:absolute;
  z-index:20;
  top:12px;
  right:12px;
  left:auto;
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid rgba(255,255,255,.78);
  border-radius:50%;
  background:rgba(94,28,90,.56);
  color:#fff;
  font-size:25px;
  font-weight:500;
  line-height:1;
  box-shadow:0 5px 16px rgba(68,15,72,.3),inset 0 1px rgba(255,255,255,.26);
  text-shadow:0 1px 3px rgba(0,0,0,.25);
  cursor:pointer;
  transition:background .2s ease,transform .2s ease,box-shadow .2s ease;
}
.invite-modal .invite-close:hover,
.invite-modal .invite-close:focus-visible{
  background:rgba(82,18,77,.82);
  box-shadow:0 7px 20px rgba(68,15,72,.42),0 0 0 3px rgba(255,255,255,.24);
  transform:rotate(90deg) scale(1.04);
}
.invite-modal .invite-close span{display:block;line-height:1;pointer-events:none}
.invite-modal .invite-header-icon [data-lucide],
.invite-modal .invite-gift-icon [data-lucide],
.invite-modal .reward-action-icon,
.reward-float-icon{display:inline-flex;align-items:center;justify-content:center;line-height:1}
.invite-modal .invite-header-icon [data-lucide] svg,
.invite-modal .invite-gift-icon [data-lucide] svg,
.invite-modal .reward-action-icon svg,
.reward-float-icon svg{width:1em;height:1em;stroke:currentColor;stroke-width:2;fill:none}
.invite-modal .invite-gift-icon{
  display:grid;
  place-items:center;
  flex:none;
  width:40px;
  height:40px;
  border-radius:11px;
  background:linear-gradient(145deg,#f6dc76,#d4af37 58%,#b8860b);
  color:#fff;
  font-size:22px;
  box-shadow:0 5px 14px rgba(212,175,55,.3),inset 0 1px rgba(255,255,255,.42);
}
.invite-modal .invite-card-title>div{min-width:0}
.invite-modal .invite-card-title strong{overflow-wrap:anywhere}
.invite-modal .invite-reward-pill{
  display:inline-block;
  max-width:100%;
  margin-top:7px;
  padding:5px 12px;
  border-radius:99px;
  background:var(--invite-reward-color,#d4af37);
  color:#fff;
  font-size:12px;
  font-weight:900;
  line-height:1.15;
  letter-spacing:.3px;
  overflow-wrap:anywhere;
  box-shadow:0 4px 12px color-mix(in srgb,var(--invite-reward-color,#d4af37) 32%,transparent),inset 0 1px rgba(255,255,255,.36);
  text-shadow:0 1px 2px rgba(0,0,0,.18);
}
.invite-modal .invite-card-desc{overflow-wrap:anywhere;word-break:break-word}
.invite-modal .invite-reward-note{
  display:block;
  margin:8px 0 0;
  color:#8b7a99;
  font-size:10px;
  line-height:1.45;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.invite-modal .reward-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}
.invite-modal .reward-action-icon{font-size:18px;flex:0 0 auto}
.invite-modal .reward-action-icon svg{width:18px;height:18px}
.invite-modal .invite-header-icon [data-lucide] svg{width:24px;height:24px}
@media(max-width:560px){
  .invite-modal{max-height:calc(100vh - 18px);border-radius:20px}
  .invite-modal .invite-close{top:10px;right:10px;width:36px;height:36px}
  .invite-modal .invite-header{padding-right:56px}
  .invite-modal .invite-card-title{align-items:flex-start}
  .invite-modal .invite-gift-icon{width:38px;height:38px}
  .invite-modal .invite-reward-pill{font-size:11px;padding:5px 10px}
  .invite-modal .reward-actions{flex-direction:column}
  .invite-modal .reward-actions button{width:100%;min-height:46px}
 }

/* Retry control is only revealed when the invite API cannot return a token. */
.invite-link-field{display:flex;align-items:flex-end;gap:8px;min-width:0}
.invite-link-field .reward-field{flex:1 1 auto;min-width:0}
.invite-retry{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;margin:0 0 9px;padding:0;border:1px solid rgba(124,58,237,.24);border-radius:11px;background:rgba(255,255,255,.84);color:#7c3aed;cursor:pointer;transition:background .2s ease,transform .2s ease}
.invite-retry:hover,.invite-retry:focus-visible{background:#f3e8ff;transform:translateY(-1px)}
.invite-retry:disabled{opacity:.55;cursor:wait;transform:none}
.invite-retry svg{width:18px;height:18px}
@media(max-width:560px){.invite-retry{flex-basis:40px;width:40px;height:40px;margin-bottom:9px}}
