:root { --treasure-game-gold:#f2c14e; --treasure-game-cream:#fffaf0; --treasure-game-success:#5ee6a8; }
.treasure-game-overlay,.treasure-game-hud,.treasure-game-toast,.treasure-game-confetti { box-sizing:border-box; font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; caret-color:transparent; cursor:default; -webkit-user-select:none; user-select:none; }
.treasure-game-overlay { position:fixed; inset:0; z-index:2147483000; display:grid; place-items:center; padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); background:radial-gradient(circle at 50% 20%,rgba(20,81,110,.65),rgba(3,13,24,.86)); backdrop-filter:blur(8px); opacity:0; visibility:hidden; transition:.22s ease; }
.treasure-game-overlay.is-visible { opacity:1; visibility:visible; }
.treasure-game-dialog { box-sizing:border-box; width:min(92vw,560px); max-height:min(90vh,720px); overflow-y:auto; padding:clamp(24px,5vw,42px); color:var(--treasure-game-cream); text-align:center; background:linear-gradient(145deg,rgba(12,48,70,.98),rgba(5,24,40,.98)); border:1px solid rgba(242,193,78,.45); border-radius:24px; box-shadow:0 24px 80px rgba(0,0,0,.5); transform:translateY(12px) scale(.98); transition:transform .25s ease; }
.treasure-game-overlay.is-visible .treasure-game-dialog { transform:none; }
.treasure-game-emblem { display:block; margin-bottom:10px; font-size:clamp(44px,10vw,68px); filter:drop-shadow(0 5px 10px rgba(0,0,0,.3)); }
.treasure-game-title { margin:0 0 14px; color:var(--treasure-game-gold); font-size:clamp(25px,6vw,36px); line-height:1.1; }
.treasure-game-copy { margin:0 auto 20px; max-width:46ch; color:rgba(255,255,255,.88); font-size:clamp(15px,3vw,18px); line-height:1.55; }
.treasure-game-list { display:grid; gap:9px; margin:18px auto 25px; padding:0; max-width:280px; list-style:none; text-align:left; }
.treasure-game-list li { padding:10px 14px; background:rgba(255,255,255,.07); border-radius:11px; }
.treasure-game-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.treasure-game-button { min-height:48px; padding:12px 21px; color:#092036; font:inherit; font-weight:800; letter-spacing:.035em; text-transform:uppercase; cursor:pointer; background:linear-gradient(135deg,#ffe08a,var(--treasure-game-gold)); border:0; border-radius:999px; box-shadow:0 8px 24px rgba(242,193,78,.23); }
.treasure-game-button:hover { filter:brightness(1.07); transform:translateY(-1px); }
.treasure-game-button:focus-visible { outline:3px solid #fff; outline-offset:3px; }
.treasure-game-button--secondary { color:#fff; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.32); box-shadow:none; }
.treasure-game-hud { position:fixed; z-index:2147482000; top:max(14px,env(safe-area-inset-top)); right:max(14px,env(safe-area-inset-right)); min-width:178px; padding:12px 14px; color:#fff; background:rgba(5,24,40,.88); border:1px solid rgba(242,193,78,.55); border-radius:15px; box-shadow:0 10px 30px rgba(0,0,0,.28); backdrop-filter:blur(6px); }
.treasure-game-hud[hidden] { display:none; }
.treasure-game-hud.is-pulsing { animation:treasure-game-pulse .55s ease; }
.treasure-game-score { color:var(--treasure-game-gold); font-size:15px; font-weight:850; }
.treasure-game-timer { display:flex; align-items:center; justify-content:center; gap:7px; margin:-4px -5px 10px; padding:8px; color:#fff; font-size:20px; font-weight:900; letter-spacing:.08em; background:linear-gradient(135deg,rgba(82,182,232,.24),rgba(94,230,168,.18)); border-radius:10px; }
.treasure-game-timer.is-urgent { color:#ffdf72; animation:treasure-game-timer-alert 1s ease infinite; }
.treasure-game-items { display:grid; gap:5px; margin-top:8px; font-size:12px; color:rgba(255,255,255,.82); }
.treasure-game-item { display:flex; justify-content:space-between; gap:15px; }
.treasure-game-identity { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:18px 0; text-align:left; }
.treasure-game-identity label { color:#fff; font-size:13px; font-weight:750; }
.treasure-game-identity input { box-sizing:border-box; display:block; width:100%; min-height:46px; margin-top:6px; padding:10px 12px; color:#092036; font:inherit; caret-color:#092036; cursor:text; -webkit-user-select:text; user-select:text; background:#fff; border:2px solid transparent; border-radius:11px; outline:none; }
.treasure-game-identity input:focus { border-color:var(--treasure-game-gold); box-shadow:0 0 0 3px rgba(242,193,78,.2); }
.treasure-game-form-error { grid-column:1/-1; margin:0; color:#ffdf72; font-size:13px; font-weight:750; text-align:center; }
.treasure-game-form-error[hidden] { display:none; }
.treasure-game-panorama-control--locked { visibility:hidden!important; opacity:0!important; pointer-events:none!important; }
.treasure-game-quiz { display:grid; grid-template-columns:repeat(2,minmax(100px,1fr)); gap:12px; margin:22px auto 14px; max-width:360px; }
.treasure-game-quiz button { min-height:58px; color:#fff; font:inherit; font-size:20px; font-weight:900; cursor:pointer; background:linear-gradient(145deg,#17688d,#0b3954); border:2px solid rgba(255,255,255,.2); border-radius:14px; box-shadow:0 7px 16px rgba(0,0,0,.2); transition:transform .16s ease,background .16s ease,border-color .16s ease; }
.treasure-game-quiz button:hover:not(:disabled),.treasure-game-quiz button:focus-visible { transform:translateY(-2px); border-color:var(--treasure-game-gold); outline:none; }
.treasure-game-quiz button.is-wrong { color:#fff; background:#a33c47; border-color:#ff9b9b; animation:treasure-game-shake .3s ease; }
.treasure-game-quiz button.is-correct { color:#082c20; background:var(--treasure-game-success); border-color:#fff; transform:scale(1.05); }
.treasure-game-quiz button:disabled { cursor:default; opacity:.72; }.treasure-game-quiz button.is-correct:disabled { opacity:1; }
.treasure-game-quiz-feedback { min-height:24px; margin:8px 0 0; color:#ffdf72; font-weight:750; }
.treasure-game-certificate { position:relative; overflow:hidden; padding:clamp(22px,5vw,38px); color:#102846; background:radial-gradient(circle at top,#fff 0,#fff9df 48%,#f5e7ba 100%); border:8px double #e3ad32; border-radius:18px; box-shadow:inset 0 0 0 2px #fff,0 14px 40px rgba(0,0,0,.3); }
.treasure-game-certificate::before,.treasure-game-certificate::after { content:""; position:absolute; width:130px; height:130px; background:linear-gradient(135deg,#52b6e8,#5ee6a8); border-radius:50%; opacity:.12; }
.treasure-game-certificate::before { top:-65px; left:-50px; }.treasure-game-certificate::after { right:-50px; bottom:-70px; }
.treasure-game-certificate-stars { color:#e3ad32; font-size:22px; letter-spacing:.25em; }
.treasure-game-certificate-icon { margin:5px 0; font-size:50px; }
.treasure-game-certificate-kicker { margin:0; color:#47708b; font-size:12px; font-weight:900; letter-spacing:.2em; text-transform:uppercase; }
.treasure-game-certificate-title { margin:6px 0 15px; color:#0b3954; font-size:clamp(27px,6vw,42px); line-height:1; text-transform:uppercase; }
.treasure-game-certificate-copy { margin:8px auto; max-width:46ch; line-height:1.45; }
.treasure-game-certificate-name { display:inline-block; margin:8px 0 12px; padding:0 18px 6px; color:#c48612; font-size:clamp(25px,6vw,38px); font-weight:900; border-bottom:2px solid #e3ad32; }
.treasure-game-certificate-seal { display:grid; place-items:center; width:92px; height:92px; margin:15px auto 8px; color:#fff; font-size:10px; font-weight:900; line-height:1.25; background:linear-gradient(145deg,#0b76a0,#0b3954); border:5px solid #f2c14e; border-radius:50%; box-shadow:0 5px 12px rgba(0,0,0,.22); transform:rotate(-5deg); }
.treasure-game-certificate-date { margin:10px 0 0; color:#47708b; font-size:12px; }
.treasure-game-certificate-actions { margin-top:16px; }
.treasure-game-toast { position:fixed; z-index:2147483500; top:42%; left:50%; padding:10px 18px; color:#092036; font-weight:900; letter-spacing:.06em; pointer-events:none; background:var(--treasure-game-gold); border-radius:999px; box-shadow:0 10px 35px rgba(0,0,0,.4); animation:treasure-game-toast 1.05s ease both; }
.treasure-game-confetti { position:fixed; inset:0; z-index:2147483400; overflow:hidden; pointer-events:none; }
.treasure-game-confetti-piece { position:absolute; top:-20px; width:9px; height:16px; border-radius:2px; animation:treasure-game-fall 1.8s ease-in forwards; }
@keyframes treasure-game-pulse { 50% { transform:scale(1.06); box-shadow:0 0 28px rgba(94,230,168,.45); } }
@keyframes treasure-game-timer-alert { 50% { background-color:rgba(255,90,70,.35); transform:scale(1.03); } }
@keyframes treasure-game-shake { 25%,75% { transform:translateX(-5px); } 50% { transform:translateX(5px); } }
@keyframes treasure-game-toast { 0% { opacity:0; transform:translate(-50%,20px) scale(.85); } 25%,70% { opacity:1; transform:translate(-50%,0); } 100% { opacity:0; transform:translate(-50%,-25px); } }
@keyframes treasure-game-fall { to { transform:translate3d(var(--treasure-game-drift),105vh,0) rotate(620deg); opacity:0; } }
@media (max-width:520px) { .treasure-game-hud { top:max(9px,env(safe-area-inset-top)); right:max(9px,env(safe-area-inset-right)); min-width:150px; padding:9px 11px; } .treasure-game-score { font-size:13px; } .treasure-game-timer { font-size:17px; } .treasure-game-dialog { border-radius:19px; } .treasure-game-actions { flex-direction:column; } .treasure-game-button { width:100%; } .treasure-game-identity { grid-template-columns:1fr; } .treasure-game-form-error { grid-column:1; } }
@media (max-height:500px) and (orientation:landscape) { .treasure-game-dialog { padding:18px 24px; } .treasure-game-emblem { display:none; } .treasure-game-copy { margin-bottom:10px; } .treasure-game-list { margin:8px auto 12px; grid-template-columns:repeat(2,1fr); max-width:400px; } }
@media (prefers-reduced-motion:reduce) { .treasure-game-overlay,.treasure-game-dialog,.treasure-game-hud,.treasure-game-toast,.treasure-game-confetti-piece { animation:none!important; transition:none!important; } }
@page { size:A4 landscape; margin:8mm; }
@media print {
  html,body { width:281mm; height:194mm; margin:0!important; padding:0!important; overflow:hidden!important; background:#fff!important; }
  body > *:not(.treasure-game-overlay) { display:none!important; }
  .treasure-game-overlay { position:static!important; inset:auto!important; display:flex!important; align-items:center; justify-content:center; width:281mm; height:194mm; padding:0!important; opacity:1!important; visibility:visible!important; background:#fff!important; backdrop-filter:none!important; }
  .treasure-game-dialog { width:281mm!important; max-width:none!important; height:194mm!important; max-height:none!important; margin:0!important; padding:0!important; overflow:visible!important; background:transparent!important; border:0!important; border-radius:0!important; box-shadow:none!important; transform:none!important; }
  .treasure-game-certificate { box-sizing:border-box!important; display:flex!important; flex-direction:column; justify-content:center; width:281mm!important; height:194mm!important; min-height:0!important; margin:0!important; padding:14mm 22mm!important; color:#102846!important; background:radial-gradient(circle at top,#fff 0,#fff9df 48%,#f5e7ba 100%)!important; border:3mm double #e3ad32!important; border-radius:6mm!important; box-shadow:inset 0 0 0 1mm #fff!important; -webkit-print-color-adjust:exact!important; print-color-adjust:exact!important; }
  .treasure-game-certificate,.treasure-game-certificate *,.treasure-game-certificate::before,.treasure-game-certificate::after { visibility:visible!important; -webkit-print-color-adjust:exact!important; print-color-adjust:exact!important; }
  .treasure-game-certificate-title { font-size:34pt!important; }
  .treasure-game-certificate-name { font-size:28pt!important; }
  .treasure-game-certificate-copy { max-width:190mm; font-size:13pt; }
  .treasure-game-certificate-actions { display:none!important; }
}
