:root{color-scheme:dark;--gold:#ffe27a;--green:#71f5aa;--deep:#061d16;--panel:#071c16e8}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,system-ui,sans-serif;color:#fff7d2;background:#04130f}
body{min-height:100vh;background:linear-gradient(#031a1280,#020d09c7),url('/assets/treasure-hunt-v2/ui/background.png?v=2') center/cover fixed no-repeat;overflow-x:hidden}
.th-app{width:min(100%,760px);min-height:100vh;margin:auto;padding:6px 10px 8px;overflow-x:clip}
.th-header{height:68px;display:grid;grid-template-columns:42px 1fr 42px;align-items:center}.th-title{display:block;width:min(420px,72vw);height:66px;margin:auto;object-fit:contain;filter:drop-shadow(0 4px 8px #000)}.th-home{display:grid;place-items:center;width:38px;height:38px;border:1px solid #d8b453;border-radius:50%;background:#071b14cc;color:var(--gold);font-size:22px;text-decoration:none}
.th-cabinet{position:relative;width:min(100%,calc((100vh - 270px)*.81));min-width:330px;aspect-ratio:3/4;margin:0 auto}.th-frame{position:absolute;z-index:4;inset:0;filter:drop-shadow(0 0 10px #20d58c55)}.th-frame-art{position:absolute;z-index:5;inset:0;width:100%;height:100%;pointer-events:none}.th-grid{position:absolute;z-index:3;left:9%;right:9%;top:8%;bottom:8%;display:grid;grid-template-columns:repeat(3,1fr);gap:3px;overflow:hidden;background:#071b14;border-radius:10px;box-shadow:inset 0 0 34px #000}
.th-reel{position:relative;overflow:hidden;border-inline:1px solid #d7ad4c66;background:linear-gradient(#06251d,#0d4b37 48%,#061a15)}.th-strip{height:100%;display:grid;grid-template-rows:repeat(4,1fr)}.th-reel-symbol{display:grid;place-items:center;min-height:0;overflow:hidden;border-bottom:1px solid #e9c65c2e;background:radial-gradient(circle,#175b42 0,#092d23 58%,#041510 100%)}.th-reel-symbol img{display:block;width:92%;height:92%;object-fit:contain;filter:drop-shadow(0 4px 5px #000b)}.th-reel.is-spinning .th-reel-symbol img{animation:th-reel-spin .12s linear infinite;filter:blur(3px) saturate(.72)}.th-reel.is-landing .th-reel-symbol img{animation:th-reel-land .56s cubic-bezier(.16,.84,.28,1.04)}.th-reel-symbol.is-winning{z-index:4;animation:th-win .7s ease-in-out infinite alternate;box-shadow:inset 0 0 22px #fff3a5,0 0 20px #5cffbc}.th-reel-symbol.is-winning img{animation:th-symbol .6s ease-in-out infinite alternate}.th-lock-layer{position:absolute;z-index:5;inset:0;display:grid;grid-template-rows:repeat(4,1fr);pointer-events:none}.th-row-lock{display:grid;place-items:center}.th-row-lock.is-locked{background:#00130ba8;color:#ffe391;font-weight:900;font-size:clamp(10px,2vw,14px);letter-spacing:.08em;text-shadow:0 2px 4px #000}@keyframes th-reel-spin{from{transform:translateY(-30%) scale(.92)}to{transform:translateY(30%) scale(.92)}}@keyframes th-reel-land{from{transform:translateY(-42%) scale(.94);filter:blur(2px)}to{transform:translateY(0) scale(1);filter:none}}@keyframes th-win{to{filter:brightness(1.3)}}@keyframes th-symbol{to{transform:scale(1.1);filter:drop-shadow(0 0 10px #fff4a5)}}
.th-tier-rail{position:absolute;z-index:9;left:-22%;top:8%;bottom:8%;width:23%;display:grid;grid-template-rows:repeat(4,1fr);gap:3px;pointer-events:none}.th-tier-badge{align-self:center;padding:6px 4px;border:1px solid #d9b451;border-radius:8px;background:linear-gradient(#123f2fef,#031b15f5);text-align:center;box-shadow:inset 0 1px #fff0a84a,0 3px 8px #000b}.th-tier-badge b,.th-tier-badge em{display:block;line-height:1;font-style:normal}.th-tier-badge b{color:#8fffd0;font:900 clamp(7px,1.5vw,11px) Georgia,serif;letter-spacing:.04em}.th-tier-badge em{margin-top:3px;color:#ffe28a;font-size:clamp(8px,1.6vw,12px);font-weight:900}.th-tier-badge.is-locked{filter:saturate(.38) brightness(.62)}
.th-side{position:absolute;z-index:2;object-fit:contain;pointer-events:none;filter:drop-shadow(0 9px 11px #000b)}.th-side-chest{right:-30%;bottom:0;width:46%;height:45%}.th-message{position:absolute;z-index:8;left:50%;bottom:2.5%;transform:translateX(-50%);min-width:52%;padding:5px 13px;border:1px solid #b58a32;border-radius:999px;background:#031711e8;color:#ffe486;text-align:center;font:900 clamp(8px,1.7vw,12px) Georgia,serif;letter-spacing:.08em}
.th-status{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:4px auto 0;width:min(100%,660px)}.th-status>div{padding:7px 5px;border:1px solid #967232;border-radius:11px;background:var(--panel);text-align:center;box-shadow:inset 0 1px #fff4a329}.th-status small{display:block;color:#bda66d;font-size:8px;letter-spacing:.15em}.th-status strong{color:#ffe58a;font-size:14px}.th-status .th-win strong,.th-status .th-multiplier strong{color:#7effc3}
.th-controls{display:grid;grid-template-columns:minmax(210px,1fr) 88px 82px;align-items:center;gap:7px;width:min(100%,660px);margin:6px auto 0;padding:7px;border:1px solid #86662e;border-radius:15px;background:#041710ed}.th-controls button{cursor:pointer}.th-bet{height:64px;display:grid;grid-template-columns:70px 1fr 70px;align-items:center;border:1px solid #b68d3b;border-radius:13px;background:#020f0b}.th-bet button,.th-spin{position:relative;border:0;background:none;padding:0;min-width:0;filter:drop-shadow(0 4px 6px #000b)}.th-bet button{height:70px}.th-bet button img,.th-spin img{display:block;width:100%;height:100%;object-fit:contain}.th-bet button b{position:absolute;left:50%;bottom:0;transform:translateX(-50%);padding:1px 4px;border:1px solid #b68d3b;border-radius:999px;background:#03251fee;color:#fff0a1;font-size:8px;white-space:nowrap}.th-bet strong{text-align:center;color:#fff1ad;font-size:18px}.th-spin{display:block;width:88px;height:76px}.th-auto{height:52px;border:1px solid #b58b39;border-radius:12px;background:linear-gradient(#174d37,#071f17);color:#ffe58a}.th-auto b,.th-auto small{display:block}.th-auto small{font-size:8px}.th-auto.active{border-color:#6effbd;box-shadow:0 0 13px #55efa470;color:#baffd7}button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:620px){.th-app{padding:4px 6px}.th-header{height:54px;grid-template-columns:34px 1fr 34px}.th-title{height:52px;width:min(250px,70vw)}.th-home{width:32px;height:32px}.th-cabinet{width:min(78vw,390px);min-width:0}.th-tier-rail{left:-12%;width:20%}.th-tier-badge{padding:4px 2px}.th-side-chest{right:-14%;width:36%}.th-status{margin-top:2px}.th-status>div{padding:5px 2px}.th-status strong{font-size:12px}.th-controls{grid-template-columns:minmax(176px,1fr) 62px 60px;gap:3px;padding:4px}.th-bet{height:54px;grid-template-columns:56px 1fr 56px}.th-bet button{height:58px}.th-bet strong{font-size:13px}.th-spin{width:62px;height:58px}.th-auto{height:46px;font-size:11px}}
