/* Squish Sea (Cleo's Studio, 2026-11-07): the squish room, the slime room and the shelf. */
.room[data-room="slime"] { background: radial-gradient(120% 90% at 50% 45%, #D9A86C, #C48B4E 70%, #B57A40); }
/* when the table painting is smaller than the screen, its edges fade into the wood color around it */
.room[data-room="slime"].is-small .scene { -webkit-mask-image: radial-gradient(closest-side, #000 86%, transparent 100%); mask-image: radial-gradient(closest-side, #000 86%, transparent 100%); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }

.gl { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; }
.gl--fx { z-index: 4; }
.toy-shadow { position: absolute; z-index: 2; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(20, 40, 60, .38), rgba(20, 40, 60, 0)); opacity: 0; }
.room:not([data-room="squish"]) .toy-shadow, .room:not([data-room="squish"]) .toy-fallback, .room:not([data-room="squish"]) .picker { display: none; }
.toy-fallback { position: absolute; z-index: 3; pointer-events: none; transform-origin: 50% 92%; transition: transform 1.6s cubic-bezier(.2, .9, .3, 1.2); }
.toy-fallback.is-squished { transform: scale(1.06, .9); transition: transform .18s ease-out; }
.room:not(.no-gl) .toy-fallback { display: none; }

/* the rooms row: the same round buttons as the other studio games */
.levels .lvl svg path, .levels .lvl svg rect, .levels .lvl svg circle { fill: rgba(255,255,255,.7); stroke: #2E8FB0; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.levels .lvl svg .slm { fill: #F49BBE; stroke: #C2547E; }
.levels .lvl svg .sq { fill: #F59A6E; stroke: #C2663B; }
.levels .lvl svg .sq2 { fill: #BCA6EE; stroke: #7E66C2; }
.levels .lvl img { border-radius: 50%; }

/* the squish room: her squishies along the bottom, to switch between */
.picker { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 12; display: flex; gap: 12px; padding: 8px 12px; border-radius: 40px; background: rgba(255, 255, 255, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.picker[hidden] { display: none; }
.pick { width: 64px; height: 64px; border-radius: 50%; border: 3px solid transparent; padding: 4px; background: rgba(255,255,255,.55); cursor: pointer; display: grid; place-items: center; transition: transform .2s ease; }
.pick img { width: 100%; height: 100%; object-fit: contain; }
.pick.is-on { border-color: #E8B84A; background: #FDF2C5; box-shadow: 0 0 14px rgba(232, 184, 74, .6); transform: scale(1.08); }
.pick:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
@media (max-width: 520px) { .picker { gap: 6px; padding: 6px 8px; max-width: 94vw; flex-wrap: wrap; justify-content: center; } .pick { width: 48px; height: 48px; } }

/* the slime room: color jars on the left, things to mix in on the right (on a phone held up: jars on top, tray below) */
.jars, .tray { position: absolute; z-index: 12; display: flex; flex-direction: column; gap: clamp(8px, 2vh, 18px); top: 50%; transform: translateY(-50%); }
.jars { left: max(14px, env(safe-area-inset-left)); }
.tray { right: max(14px, env(safe-area-inset-right)); padding: 10px; border-radius: 36px; background: rgba(255, 250, 240, .55); box-shadow: 0 8px 24px rgba(80, 50, 20, .18); }
.room:not([data-room="slime"]) .jars, .room:not([data-room="slime"]) .tray, .room:not([data-room="slime"]) .big--done { display: none; }
.cjar { position: relative; width: clamp(54px, 9.5vh, 124px); aspect-ratio: 4 / 5; border: 0; padding: 0; background: none; cursor: pointer; transform-origin: 50% 80%; }
.cjar__lid { position: absolute; left: 14%; right: 14%; top: 0; height: 18%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #FFF6EC, #E9D9C6); border: 2px solid rgba(110, 80, 50, .35); box-sizing: border-box; }
.cjar__body { position: absolute; left: 4%; right: 4%; top: 14%; bottom: 0; border-radius: 28% 28% 34% 34%; overflow: hidden; background: rgba(255, 255, 255, .45); border: 2.5px solid rgba(255, 255, 255, .95); box-shadow: inset 0 0 0 1px rgba(110, 80, 50, .18), 0 6px 14px rgba(80, 50, 20, .25); box-sizing: border-box; }
.cjar__goo { position: absolute; left: 6%; right: 6%; bottom: 6%; top: 22%; border-radius: 40% 40% 30% 30%; }
.cjar__body::after { content: ""; position: absolute; left: 14%; top: 10%; width: 16%; height: 46%; border-radius: 40%; background: rgba(255,255,255,.6); }
.cjar:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; border-radius: 16px; }
.addin { box-sizing: border-box; width: clamp(52px, 9vh, 112px); height: clamp(52px, 9vh, 112px); border-radius: 50%; border: 3px solid #fff; background: radial-gradient(circle at 40% 35%, #FFFDF8, #F3E6D4); box-shadow: 0 6px 14px rgba(80, 50, 20, .22); cursor: pointer; padding: 9px; display: grid; place-items: center; transition: opacity .3s ease; }
.addin svg, .addin img { width: 100%; height: 100%; object-fit: contain; }
.addin:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.tray.is-waiting .addin { opacity: .45; }
.big--done { left: auto; right: max(18px, env(safe-area-inset-right)); top: auto; bottom: max(18px, env(safe-area-inset-bottom)); transform: none; width: clamp(84px, 13vmin, 120px); background: #4FB286; box-shadow: 0 10px 28px rgba(30, 90, 60, .4), inset 0 -6px 0 rgba(0,0,0,.12); z-index: 14; }
.big--done svg { width: 58%; height: 58%; }
@media (min-aspect-ratio: 1/1) { .big--done { right: calc(max(14px, env(safe-area-inset-right)) + clamp(52px, 9vh, 112px) + 46px); } }
@media (max-aspect-ratio: 1/1) {
  .jars { top: calc(max(12px, env(safe-area-inset-top)) + 124px); left: 50%; transform: translateX(-50%); flex-direction: row; gap: 8px; }
  .cjar { width: min(13vw, 64px); }
  .tray { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); right: auto; left: 50%; transform: translateX(-50%); flex-direction: row; gap: 8px; padding: 8px; }
  .addin { width: min(14vw, 62px); height: min(14vw, 62px); }
  .big--done { bottom: calc(max(14px, env(safe-area-inset-bottom)) + min(14vw, 62px) + 34px); right: 16px; width: 84px; }
}

/* her slime going into its jar */
.jar-pop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(40vmin, 300px); z-index: 30; pointer-events: none; }

/* the shelf */
.shelf { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.room:not([data-room="shelf"]) .shelf { display: none; }
.shelf__item { position: absolute; border: 0; padding: 0; background: none; cursor: pointer; pointer-events: auto; transform-origin: 50% 100%; }
.shelf__item:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; border-radius: 16px; }
.shelf__sq img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 6px 6px rgba(80, 50, 20, .25)); }
.shelf__sq.is-shadow img { filter: brightness(0) opacity(.14); }
.shelf__jar.is-empty { pointer-events: none; }
.shelf__item.is-new { animation: shelfnew 1.4s ease-out 2; }
@keyframes shelfnew { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(232,184,74,0)); } 40% { transform: scale(1.12, .92); filter: drop-shadow(0 0 16px rgba(232,184,74,.9)); } 70% { transform: scale(.96, 1.05); } }
@media (prefers-reduced-motion: reduce) { .shelf__item.is-new { animation: none; } .toy-fallback { transition: none; } }

@media (min-width: 1400px) and (min-height: 800px) {
  .picker { zoom: 1.35; }
}

/* the start button: bottom right (bottom middle on a phone held up), so the squishy stays in view */
.big--start { right: max(5vw, env(safe-area-inset-right)); bottom: max(7vh, env(safe-area-inset-bottom)); background: radial-gradient(circle at 40% 35%, #F9B8C8, #E58FA6); }
.big--start::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); animation: halo 2.8s ease-in-out infinite; }
@media (max-aspect-ratio: 1/1) { .big--start { right: 50%; transform: translateX(50%); bottom: max(5vh, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .big--start::before { animation: none; } }
@keyframes halo { 50% { transform: scale(1.08); opacity: .4; } }

/* a phone held sideways (short and wide): the jars and the tray shrink to fit the height, below the top buttons */
@media (min-aspect-ratio: 1/1) and (max-height: 560px) {
  .jars, .tray { top: calc(50% + 28px); gap: 6px; }
  /* at least 48px for little fingers (11/7): the jars wrap into two columns instead of shrinking */
  .jars { flex-wrap: wrap; max-height: calc(100vh - 96px); align-content: flex-start; }
  .cjar { width: max(48px, calc((100vh - 120px) / 7.4)); }
  .addin { width: calc((100vh - 130px) / 5.9); height: calc((100vh - 130px) / 5.9); padding: 6px; }
  .tray { padding: 6px; }
  .big--done { width: 72px; right: calc(max(14px, env(safe-area-inset-right)) + (100vh - 130px) / 5.9 + 34px); }
}
.kbsquish:focus-visible { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); width: auto; height: auto; clip: auto; padding: 8px 16px; border-radius: 20px; background: #fff; outline: 3px solid var(--navy); z-index: 20; }

/* inside the kitchen wall's frame: its hold-to-close button lives at the left edge, halfway down */
@media (min-aspect-ratio: 1/1) { .room.in-frame .jars { left: calc(max(14px, env(safe-area-inset-left)) + 88px); } }
/* held upright (and in one half of two friends): when the squishy picker is showing, the start button sits above it (11/7 evening) */
@media (max-aspect-ratio: 1/1) { .picker:not([hidden]) ~ .big--start { bottom: calc(max(5vh, env(safe-area-inset-bottom)) + 96px); } }
