:root { --ink: #5B4A4A; --font: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", system-ui, -apple-system, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #4AA6D9; font-family: var(--font); color: var(--ink);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
body { position: fixed; inset: 0; touch-action: none; }
svg { display: block; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; overflow: hidden; }

/* ---------- κουμπιά ---------- */
.round { position: fixed; z-index: 10; width: 68px; height: 68px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.92); box-shadow: 0 6px 16px rgba(30,90,130,.22), inset 0 -3px 0 rgba(0,0,0,.06); transition: transform .15s ease; }
.round:active { transform: scale(.9); }
.round svg { width: 36px; height: 36px; }
#mute { top: calc(18px + env(safe-area-inset-top)); right: calc(18px + env(safe-area-inset-right)); }
#mute .off { display: none; } #mute.is-off .on { display: none; } #mute.is-off .off { display: block; }

#bar { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; gap: clamp(6px, 1.6vmin, 14px); padding: 10px clamp(10px, 2vmin, 18px); border-radius: 50px; background: rgba(255,255,255,.93);
  box-shadow: 0 8px 22px rgba(30,90,130,.28), inset 0 -3px 0 rgba(0,0,0,.05); max-width: calc(100vw - 16px); }
#bar button { --s: clamp(52px, 9.2vmin, 74px); width: var(--s); height: var(--s); border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  transition: transform .15s ease, box-shadow .15s ease; }
#bar button svg { width: 66%; height: 66%; pointer-events: none; }
#bar button:active { transform: scale(.9); }
#bar button.on { box-shadow: 0 0 0 5px #F08A7C; }
#bar [data-tool="food"] { background: #FFE3E9; } #bar [data-tool="bubbles"] { background: #DDF1FB; } #bar [data-tool="fish"] { background: #FFEBD2; }
#bar [data-tool="decor"] { background: #E4F5EA; } #bar [data-tool="light"] { background: #FFF4CF; } #bar [data-tool="sponge"] { background: #FFF0C2; }
#bar button.hint { animation: hint 1.6s ease-in-out infinite; }
#bar button.press, #tray button.press { animation: press .3s ease; }

#tray { position: fixed; z-index: 9; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom) + clamp(70px, 12.4vmin, 96px));
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 12px; border-radius: 34px; background: rgba(255,255,255,.95);
  box-shadow: 0 8px 22px rgba(30,90,130,.28); max-width: calc(100vw - 16px); animation: trayIn .25s ease both; }
#tray[hidden] { display: none; }
#tray button { width: clamp(60px, 10vmin, 82px); height: clamp(60px, 10vmin, 82px); border-radius: 24px; border: 0; padding: 6px; cursor: pointer; background: #EAF6FB; display: grid; place-items: center; }
#tray button svg { width: 100%; height: 100%; pointer-events: none; }
#tray button:active { transform: scale(.92); }

/* ---------- σκηνή ---------- */
.item { cursor: grab; } .item.held { cursor: grabbing; }
.item .inner { transform-box: fill-box; transform-origin: center; transition: transform .15s ease; }
.item.held .inner { transform: scale(1.14) rotate(-5deg); filter: drop-shadow(0 12px 10px rgba(0,0,0,.18)); }
.item.snap { transition: transform .45s cubic-bezier(.3,1.5,.5,1); }
.fish, .crit, .chestG { cursor: pointer; }
.fishArt .tail { transform-box: fill-box; transform-origin: 100% 50%; animation: wag .7s ease-in-out infinite alternate; }
.pulse, .cin { transform-box: fill-box; transform-origin: center; }
.sway { animation: sway 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.pop-in { animation: popin .5s cubic-bezier(.3,1.8,.5,1); transform-box: fill-box; transform-origin: center; }
.particle { animation: pfly 1.2s cubic-bezier(.2,.7,.3,1) forwards; }
.ringA { animation: ringA .8s ease-out forwards; transform-box: fill-box; transform-origin: center; }
.r-pulse { animation: rpulse .5s ease; } .r-spin { animation: rspin .9s ease; } .r-wiggle { animation: rwiggle .6s ease 1; } .r-claw { animation: rclaw .35s ease 2; }
.tent { animation: tent 2.2s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 0; }

@keyframes press { 0% { transform: scale(1); } 40% { transform: scale(.86); } 100% { transform: scale(1); } }
@keyframes hint { 0%,100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-9deg) scale(1.08); } 40% { transform: rotate(9deg) scale(1.08); } 60% { transform: rotate(0) scale(1); } }
@keyframes trayIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes wag { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes popin { 0% { transform: scale(.2); } 100% { transform: scale(1); } }
@keyframes pfly { 0% { transform: translate(0,0) scale(.3) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx),var(--dy)) scale(1) rotate(var(--rot)); opacity: 0; } }
@keyframes ringA { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(3); opacity: 0; } }
@keyframes rpulse { 0%,100% { transform: scale(1); } 40% { transform: scale(1.28,.86); } 70% { transform: scale(.92,1.1); } }
@keyframes rspin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.2); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes rwiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes rclaw { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-24deg) translateY(-6px); } }
@keyframes tent { from { transform: skewX(-6deg); } to { transform: skewX(6deg); } }
@media (prefers-reduced-motion: reduce) { .sway, .tent, .fishArt .tail { animation: none; } }
