@font-face { font-family: Lilita; src: url(fonts/lilita.woff2) format('woff2'); font-display: block; }
@font-face { font-family: Nunito; src: url(fonts/nunito.woff2) format('woff2'); font-weight: 200 1000; font-display: swap; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2a3a1e; overscroll-behavior: none; touch-action: none; position: fixed; inset: 0; }
body { font-family: Nunito, system-ui, sans-serif; color: #3a2210; }
#game { position: fixed; inset: 0; touch-action: none; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
.hidden { display: none !important; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#top { position: absolute; top: calc(env(safe-area-inset-top) + 8px); left: 10px; right: 10px; display: flex; gap: 8px; align-items: center; }
.pill { background: linear-gradient(#fbf0d9, #ecd7ae); border: 2.5px solid #5a3a20; border-radius: 16px; box-shadow: 0 3px 0 #3a2210, 0 6px 14px rgba(0,0,0,.25); }
#coinPill { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 7px; min-width: 132px; transition: transform .08s; }
#coinPill.bump { transform: scale(1.08); }
#coinPill b { font: 23px/1 Lilita; display: block; color: #3a2210; letter-spacing: .3px; }
#coinPill small { font-size: 11px; font-weight: 800; color: #7a5a3a; display: block; margin-top: 1px; }
.coin { width: 30px; height: 30px; border-radius: 50%; display: inline-block; flex: none; background: radial-gradient(circle at 35% 32%, #fff6c0 0 14%, #ffd84a 15% 55%, #e0a010 56% 100%); box-shadow: inset 0 -2px 0 #a8700a, 0 0 0 2px #6a4410; position: relative; }
.coin::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid rgba(170,110,10,.55); }
.coin.sm { width: 16px; height: 16px; box-shadow: inset 0 -1px 0 #a8700a, 0 0 0 1.5px #6a4410; }
.coin.sm::after { inset: 4px; border-width: 1px; }
.mapPill { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 9px 12px; font: 15px Lilita; color: #3a2210; }
.mapPill svg { width: 20px; height: 20px; }
.round { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(#fbf0d9, #ecd7ae); border: 2.5px solid #5a3a20; box-shadow: 0 3px 0 #3a2210; display: grid; place-items: center; }
.round svg { width: 22px; height: 22px; color: #3a2210; }
#muteBtn .x { display: none; } #muteBtn.off .x { display: inline; } #muteBtn.off .w { display: none; }
#goal { position: absolute; top: calc(env(safe-area-inset-top) + 66px); left: 50%; transform: translateX(-50%); background: rgba(40,24,10,.82); color: #fff3d8; font: 15px Lilita; padding: 7px 16px; border-radius: 20px; white-space: nowrap; letter-spacing: .3px; box-shadow: 0 4px 12px rgba(0,0,0,.25); pointer-events: none; max-width: 94vw; overflow: hidden; text-overflow: ellipsis; }
#goal:empty, #goal.empty { display: none; }
#toasts { position: absolute; top: calc(env(safe-area-inset-top) + 104px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: linear-gradient(#fff4d6, #f1d79e); border: 2px solid #5a3a20; border-radius: 14px; padding: 8px 14px; font-weight: 900; font-size: 14px; box-shadow: 0 4px 10px rgba(0,0,0,.25); animation: tin .3s cubic-bezier(.2,1.6,.4,1), tout .4s 2.6s forwards; }
@keyframes tin { from { transform: translateY(-14px) scale(.9); opacity: 0; } }
@keyframes tout { to { opacity: 0; transform: translateY(-8px); } }
#bottom { position: absolute; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 10px); display: flex; flex-direction: column; gap: 8px; }
.plank { position: relative; background: linear-gradient(#b98552, #9a6739 60%, #8a5a33); border: 2.5px solid #4a2c14; border-radius: 16px; box-shadow: inset 0 2px 0 rgba(255,230,190,.45), inset 0 -3px 0 rgba(0,0,0,.18), 0 4px 0 #3a2210, 0 8px 16px rgba(0,0,0,.3); color: #fff3d8; transition: transform .06s, filter .2s; }
.plank:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,230,190,.45), 0 1px 0 #3a2210; }
.plank.big { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; height: 64px; text-align: left; }
.plank.big canvas { width: 52px; height: 52px; background: rgba(40,20,5,.25); border-radius: 12px; flex: none; }
.plank.big .lbl { flex: 1; min-width: 0; } .plank.big b { font: 19px Lilita; display: block; text-shadow: 0 2px 0 rgba(60,30,10,.6); letter-spacing: .3px; }
.plank.big small { font-weight: 800; font-size: 12.5px; opacity: .92; }
.plank .cost { display: flex; align-items: center; gap: 6px; background: #fff3d8; color: #3a2210; font: 18px Lilita; padding: 8px 12px; border-radius: 12px; border: 2px solid #4a2c14; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.plank.can .cost { background: linear-gradient(#c8f07a, #8fd04a); animation: glow 1.2s infinite; }
.plank.cant .cost { opacity: .7; }
@keyframes glow { 50% { box-shadow: 0 0 0 3px rgba(255,240,150,.7), inset 0 -2px 0 rgba(0,0,0,.12); } }
.row { display: flex; gap: 8px; }
.plank.sq { flex: 1; height: 50px; display: flex; align-items: center; justify-content: center; gap: 7px; font: 16px Lilita; letter-spacing: .3px; text-shadow: 0 2px 0 rgba(60,30,10,.6); }
.plank.sq svg { width: 26px; height: 26px; }
.dot { position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: #e8402a; border: 2px solid #fff3d8; display: none; animation: pulse 1s infinite; }
.dot.on { display: block; }
@keyframes pulse { 50% { transform: scale(1.2); } }
/* sheet */
#sheetWrap, #modalWrap { position: fixed; inset: 0; z-index: 10; }
.scrim { position: absolute; inset: 0; background: rgba(20,12,4,.35); }
#sheet { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#fbf0d9, #f1dfb8); border-top: 3px solid #5a3a20; border-radius: 22px 22px 0 0; padding: 10px 14px calc(env(safe-area-inset-bottom) + 16px); box-shadow: 0 -8px 30px rgba(0,0,0,.35); animation: up .22s cubic-bezier(.2,1.2,.4,1); max-height: 78vh; overflow-y: auto; touch-action: pan-y; }
@keyframes up { from { transform: translateY(100%); } }
.grab { width: 44px; height: 5px; border-radius: 3px; background: #c9a878; margin: 0 auto 6px; }
.close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: #e8d2a6; border: 2px solid #5a3a20; font: 16px Lilita; color: #3a2210; }
h2 { font: 24px Lilita; margin: 4px 0 2px; letter-spacing: .3px; color: #3a2210; }
.sub { font-weight: 700; font-size: 14px; color: #7a5a3a; margin-bottom: 10px; }
.stat { display: inline-flex; align-items: center; gap: 5px; background: #e8d2a6; border-radius: 10px; padding: 4px 9px; font-weight: 900; font-size: 13px; margin: 0 4px 6px 0; }
.up { display: flex; align-items: center; gap: 10px; background: #fff8e8; border: 2px solid #d9bd8c; border-radius: 16px; padding: 9px 10px; margin-top: 8px; }
.up .ic { width: 46px; height: 46px; flex: none; border-radius: 12px; background: #e8d2a6; display: grid; place-items: center; }
.up .ic canvas, .up .ic img { width: 40px; height: 40px; }
.up .tx { flex: 1; min-width: 0; } .up .tx b { font: 17px Lilita; display: block; letter-spacing: .2px; } .up .tx small { font-weight: 700; font-size: 12.5px; color: #7a5a3a; }
.buy { min-width: 92px; height: 46px; border-radius: 13px; border: 2.5px solid #4a2c14; background: linear-gradient(#b8e86a, #7cc23a); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 3px 0 #2f5a14; font: 17px Lilita; color: #1f3a0a; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; }
.buy:active { transform: translateY(2px); box-shadow: 0 1px 0 #2f5a14; }
.buy.no { background: linear-gradient(#e0cfae, #cdb68a); box-shadow: 0 3px 0 #8a6a3a; color: #6a4a2a; }
.buy.max { background: #d9c7a3; box-shadow: none; color: #7a5a3a; }
.buy.wide { width: 100%; height: 54px; font-size: 20px; margin-top: 12px; }
/* rings book */
.bookmap { font: 16px Lilita; margin: 12px 0 6px; display: flex; justify-content: space-between; }
.bookmap small { font: 700 12px Nunito; color: #7a5a3a; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.cell { aspect-ratio: 1; background: #e8d2a6; border-radius: 14px; display: grid; place-items: center; position: relative; border: 2px solid #d0b484; }
.cell img { width: 78%; }
.cell.no { background: #d6c19a; } .cell.no span { font: 22px Lilita; color: #b39a6e; }
.cell.yes { background: radial-gradient(#fff6d8, #ecd29a); border-color: #c9a050; }
.bon { font-weight: 800; font-size: 13px; color: #4a6a1a; }
.bonlist { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
/* modal */
#modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, 90vw); background: linear-gradient(#fbf0d9, #f1dfb8); border: 3px solid #5a3a20; border-radius: 24px; padding: 18px 18px 16px; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: pop .3s cubic-bezier(.2,1.5,.4,1); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.7); opacity: 0; } }
#modal h2 { font-size: 26px; }
#modal .big { font: 34px Lilita; color: #3a2210; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0; }
.ringimg { width: 190px; height: 190px; margin: 4px auto; display: block; animation: spinin .7s cubic-bezier(.2,1.3,.4,1); filter: drop-shadow(0 8px 10px rgba(0,0,0,.3)); }
@keyframes spinin { from { transform: rotate(-200deg) scale(.2); } }
.rays { position: relative; }
.rays::before { content: ''; position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px; background: repeating-conic-gradient(rgba(255,220,120,.35) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: rot 8s linear infinite; mask: radial-gradient(#000 30%, transparent 70%); -webkit-mask: radial-gradient(#000 30%, transparent 70%); }
@keyframes rot { to { transform: rotate(360deg); } }
.lines { text-align: left; margin: 10px 0 4px; } .lines div { display: flex; justify-content: space-between; font-weight: 800; padding: 5px 2px; border-bottom: 1px dashed #d0b484; }
.streak { display: flex; gap: 5px; justify-content: center; margin: 10px 0; }
.streak i { width: 34px; height: 40px; border-radius: 9px; background: #e8d2a6; border: 2px solid #d0b484; font: normal 13px Lilita; display: grid; place-items: center; color: #9a7a4a; }
.streak i.on { background: linear-gradient(#ffe27a, #f0b030); border-color: #a8700a; color: #3a2210; }
.chest { width: 120px; height: 96px; margin: 8px auto; position: relative; animation: wob 1.2s infinite; }
@keyframes wob { 0%,100% { transform: rotate(0); } 10% { transform: rotate(-5deg); } 20% { transform: rotate(5deg); } 30% { transform: rotate(0); } }
/* world */
#world { position: fixed; inset: 0; z-index: 8; background: #3a5a2a; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
#worldCv { position: absolute; inset: 0; width: 100%; height: 100%; }
.wtitle { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 0; right: 0; text-align: center; font: 28px Lilita; color: #fff3d8; text-shadow: 0 3px 0 #3a2210, 0 0 12px rgba(0,0,0,.4); pointer-events: none; }
.wclose { top: calc(env(safe-area-inset-top) + 12px); right: 14px; }
.node { position: absolute; transform: translate(-50%, -50%); width: 200px; display: flex; flex-direction: column; align-items: center; }
.node .badge { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(#fff8e0, #e8cf9a); border: 4px solid #5a3a20; box-shadow: 0 5px 0 #3a2210, 0 10px 18px rgba(0,0,0,.35); display: grid; place-items: center; overflow: hidden; position: relative; }
.node .badge img { width: 70px; margin-top: 6px; }
.node.here .badge { border-color: #ffd24a; box-shadow: 0 0 0 4px #5a3a20, 0 0 24px 6px rgba(255,220,100,.7), 0 10px 18px rgba(0,0,0,.35); }
.node.locked .badge img { filter: grayscale(1) brightness(.6); }
.node .lock { position: absolute; inset: 0; display: grid; place-items: center; font: 30px Lilita; color: #fff3d8; text-shadow: 0 2px 0 #3a2210; }
.node .card { margin-top: 8px; background: linear-gradient(#fbf0d9, #ecd7ae); border: 2.5px solid #5a3a20; border-radius: 14px; padding: 6px 10px; text-align: center; box-shadow: 0 3px 0 #3a2210; min-width: 150px; }
.node .card b { font: 16px Lilita; display: block; }
.node .card small { font-weight: 800; font-size: 11.5px; color: #7a5a3a; display: block; line-height: 1.3; }
.node .card .buy { height: 36px; font-size: 14px; margin: 6px auto 2px; min-width: 120px; }
.node { width: 0; height: 0; }
.node .badge { width: 74px; height: 74px; position: absolute; left: -37px; top: -37px; }
.node .badge img { width: 62px; }
.node .card { position: absolute; top: 0; transform: translateY(-50%); margin: 0; width: 168px; }
.node.r .card { left: 46px; } .node.l .card { right: 46px; }
body.s1 .mapIc { display: none; }
body.s1 .mapPill { pointer-events: none; }
