/* Day Off demo. Warm beach palette, thick soft outlines, one coral accent. */
:root {
  --ink: #3b2a22; --paper: #fff8ec; --sky1: #f9e3b8; --sky2: #f7c99a; --sea: #5aa6c4; --sand: #f2dfb4;
  --coral: #e8735a; --sun: #f4c34f; --muted: #8a7466;
  --font: "Nunito", ui-rounded, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: #e9d3ae; color: var(--ink); font: 700 16px/1.35 var(--font); overscroll-behavior: none; }
#app { position: relative; max-width: 480px; height: 100%; margin: 0 auto; overflow: hidden; display: flex; flex-direction: column; background: var(--sand); user-select: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
.icon { display: inline-block; vertical-align: middle; flex: none; }

/* HUD */
.hud { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 8px; }
.rating { display: flex; align-items: center; gap: 8px; flex: 1; }
.badge, .money { display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 3px 10px 3px 6px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rating .bar { flex: 1; max-width: 150px; height: 12px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--coral); transform-origin: left; transition: transform .4s; }

/* Scene */
.scene { position: relative; flex: 1; overflow: hidden; }
.sky { position: absolute; inset: 0 0 64% 0; background: linear-gradient(var(--sky1), var(--sky2)); }
.sun { position: absolute; right: 18%; top: 38%; width: 70px; height: 70px; border-radius: 50%; background: var(--sun); border: 3px solid var(--ink); }
.sea { position: absolute; left: 0; right: 0; top: 36%; height: 9%; background: var(--sea); border-top: 3px solid var(--ink); }
.sea svg { position: absolute; bottom: -2px; left: 0; width: 200%; height: 14px; animation: wave 6s linear infinite; }
@keyframes wave { to { transform: translateX(-50%); } }
.sand { position: absolute; left: 0; right: 0; top: 45%; bottom: 0; background: var(--sand); }
.station { position: absolute; left: 3%; top: 39%; width: 44px; height: 40px; background: #e9c08a; border: 3px solid var(--ink); border-radius: 6px 6px 2px 2px; }
.station span { position: absolute; left: 50%; top: -14px; width: 3px; height: 14px; background: var(--ink); }

.stall-wrap { position: absolute; width: 36%; transform: translate(-50%, -70%); z-index: 2; }
.stall-wrap .stall { width: 100%; display: block; }
.stall-wrap.room { filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 4px var(--coral)); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: translate(-50%, -72%) scale(1.04); } }
.shell-bubble { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 2px 9px 2px 5px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -4px); } }
.lot { position: absolute; transform: translate(-50%, -50%); width: 70px; height: 44px; border-radius: 50%; border: 3px dashed var(--ink); background: rgba(255,255,255,.55); font-size: 26px; font-weight: 900; z-index: 3; animation: lotpulse 1s ease-in-out infinite alternate; }
@keyframes lotpulse { to { background: rgba(255,255,255,.9); } }

.guest { position: absolute; width: 92px; transform: translate(-50%, -100%); transition: left 2.6s ease-in-out, top 2.6s ease-in-out; z-index: 4; }
.guest .body { transition: transform .2s; }
.guest .animal { width: 100%; display: block; animation: idle 2.2s ease-in-out infinite; }
@keyframes idle { 50% { transform: translateY(-2px); } }
.guest .tag { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); font-size: 12px; font-weight: 800; white-space: nowrap; color: var(--ink); opacity: .75; }
.bubble { position: absolute; left: 50%; top: -40px; transform: translateX(-50%); width: 48px; height: 44px; border-radius: 18px; background: var(--paper); border: 3px solid var(--ink); display: grid; place-items: center; animation: bob 1.2s ease-in-out infinite; }
.bubble::after { content: ""; position: absolute; bottom: -9px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top: 7px solid var(--ink); }

.invite { position: absolute; left: 0; right: 0; top: 62%; display: grid; place-items: center; z-index: 6; }
.pickbar { position: absolute; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 58px); z-index: 7; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 8px 8px 8px 14px; font-weight: 900; }

/* Bottom bar */
.bottom { position: relative; z-index: 5; display: flex; justify-content: space-around; align-items: center; padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 12px); background: var(--paper); border-top: 3px solid var(--ink); }
.cam { width: 84px; height: 84px; margin-top: -44px; border-radius: 50%; background: var(--coral); border: 4px solid var(--ink); display: grid; place-items: center; box-shadow: 0 4px 0 var(--ink); }
.cam:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.navbtn { width: 56px; height: 56px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); display: grid; place-items: center; }
.navbtn:disabled { opacity: .35; }

/* Buttons */
.btn { border: 3px solid var(--ink); border-radius: 14px; background: var(--paper); padding: 10px 16px; font-weight: 900; box-shadow: 0 3px 0 var(--ink); display: inline-flex; align-items: center; gap: 4px; justify-content: center; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--coral); color: #fff; }
.btn.big { padding: 14px 24px; font-size: 18px; }
.btn:disabled { opacity: .45; }

/* Overlays */
.overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(59,42,34,.45); opacity: 0; transition: opacity .2s; }
.overlay.in { opacity: 1; }
.sheet { width: 100%; max-width: 420px; background: var(--paper); border: 4px solid var(--ink); border-radius: 22px; padding: 20px 18px; transform: translateY(12px); transition: transform .2s; text-align: center; position: relative; }
.overlay.in .sheet { transform: none; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
h2 { margin: 6px 0 4px; font-size: 22px; font-weight: 900; }
.say-face { width: 110px; margin: -70px auto 0; background: var(--paper); border: 4px solid var(--ink); border-radius: 50%; overflow: hidden; }
.say-face .animal { display: block; width: 100%; }
.say-name { font-weight: 900; font-size: 18px; margin-top: 6px; }
.say-line { font-weight: 700; font-size: 17px; line-height: 1.45; margin: 10px 4px 0; }
.ng-kind { color: var(--muted); font-weight: 800; font-size: 14px; display: flex; gap: 4px; align-items: center; justify-content: center; flex-wrap: wrap; }
.x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 28px; line-height: 1; padding: 4px 8px; }
.toast { position: absolute; left: 50%; bottom: 120px; transform: translate(-50%, 20px); z-index: 30; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 16px; font-weight: 800; opacity: 0; transition: all .25s; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }

/* New guest */
.ng-art { width: 70%; margin: 0 auto; }
.ng-art .animal { width: 100%; animation: arrive .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes arrive { from { transform: scale(.4); opacity: 0; } }
.ng-name input, .namevillage input { width: 80%; margin-top: 10px; font: 900 22px var(--font); text-align: center; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 8px; }
.newguest .btn, .namevillage .btn { margin-top: 16px; }

/* Developing */
.dev-overlay .sheet { background: none; border: 0; }
.polaroid { background: #fff; border: 3px solid var(--ink); border-radius: 6px; padding: 12px 12px 0; width: 260px; margin: 0 auto; transform: rotate(-3deg); }
.polaroid .pic { aspect-ratio: 1; background: #ddd center/cover; border: 2px solid var(--ink); }
.polaroid .caption { padding: 10px 2px 12px; font-weight: 800; }
.developing .pic { animation: develop 1.8s ease-out both; }
@keyframes develop { from { filter: brightness(2.2) sepia(1) blur(3px); } to { filter: none; } }

/* Review and star */
.stars { display: inline-flex; gap: 4px; margin-top: 8px; }
.stars .off { opacity: .2; }
.stars .on { animation: pop .4s cubic-bezier(.3,1.8,.5,1) both; }
.stars .on:nth-child(2) { animation-delay: .15s; } .stars .on:nth-child(3) { animation-delay: .3s; }
@keyframes pop { from { transform: scale(0); } }
.rv-what { color: var(--muted); font-weight: 800; margin-top: 8px; }
.gain { display: inline-flex; align-items: center; gap: 4px; margin: 10px 0 4px; font-weight: 900; color: var(--coral); }
.review .btn { display: flex; margin: 8px auto 0; }
.bigstar { position: relative; width: 96px; margin: 0 auto; animation: pop .5s cubic-bezier(.3,1.8,.5,1); }
.bigstar b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; padding-top: 8px; }
.newstar p { margin: 4px 0; }

/* Cards */
.card .say-face { margin-top: 0; width: 96px; }
.friend { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 12px; font-weight: 800; color: var(--muted); }
.friend .bar { width: 140px; height: 12px; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.acts span { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px 3px 5px; font-size: 14px; }
.hosts { display: flex; gap: 14px; justify-content: center; margin: 8px 0; }
.hosts div { width: 76px; font-size: 13px; }
.hosts .animal { width: 76px; display: block; border: 3px solid var(--ink); border-radius: 50%; background: #fff; }

/* Activities */
.act-overlay { padding: 0; place-items: stretch; background: var(--paper); }
.act-overlay .sheet { max-width: none; border: 0; border-radius: 0; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px); display: flex; flex-direction: column; background: var(--paper); }
.act { flex: 1; display: flex; flex-direction: column; }
.act-head { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.act-title { font-size: 26px; font-weight: 900; }
.act-with { color: var(--muted); font-weight: 800; }
.timer { height: 10px; border: 3px solid var(--ink); border-radius: 999px; margin: 10px 0; overflow: hidden; background: #fff; }
.timer i { display: block; height: 100%; background: var(--sun); transform-origin: left; }
.act-body { flex: 1; position: relative; display: flex; flex-direction: column; }

.feed-guest { width: 220px; margin: auto; }
.feed-guest .animal { width: 100%; }
.feed-row { display: flex; gap: 12px; justify-content: center; margin-top: auto; margin-bottom: 30px; }
.snack { width: 96px; height: 96px; border-radius: 22px; border: 3px solid var(--ink); background: #fff; box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; transition: transform .3s, opacity .3s; }
.snack.eaten { transform: translateY(-160px) scale(.3); opacity: 0; }
.snack.refused { transform: rotate(-12deg); opacity: .5; }
.happy { animation: hop .4s 2; } @keyframes hop { 50% { transform: translateY(-14px); } }
.shake { animation: shake .4s; } @keyframes shake { 25% { transform: translateX(-10px) rotate(-4deg); } 75% { transform: translateX(10px) rotate(4deg); } }

.pet-area { flex: 1; position: relative; display: grid; place-items: center; touch-action: none; }
.pet-guest { position: relative; width: 92%; transform-origin: bottom center; }
.pet-guest .animal { width: 100%; }
.pet-guest.lean { animation: lean .5s; } @keyframes lean { 50% { transform: rotate(-3deg) scaleY(.96); } }
.fur { position: absolute; width: 34%; top: 47%; left: 26%; pointer-events: none; }
.hearts span { position: absolute; top: 30%; animation: float .9s ease-out forwards; pointer-events: none; }
@keyframes float { to { transform: translateY(-80px); opacity: 0; } }

.scoop-area { flex: 1; position: relative; overflow: hidden; touch-action: none; }
.scoop-watch { position: absolute; left: 0; bottom: 10px; width: 34%; }
.scoop-watch .animal { width: 100%; }
.cone { position: absolute; left: 50%; bottom: 40px; width: 70px; height: 90px; margin-left: -35px; background: #e9b26a; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.dropper { position: absolute; top: 4px; left: 0; width: 54px; height: 54px; }
.ball, .scoop { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--ink); }
.ball { background: #f7a6b6; }
.scoop { position: absolute; }
.scoop.fall { transition: transform .5s ease-in; transform: translate(60px, 200px) rotate(60deg); }

.surf-area { flex: 1; position: relative; overflow: hidden; background: linear-gradient(#bfe3ef, #8fc9dd); border: 3px solid var(--ink); border-radius: 18px; touch-action: none; }
.wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 40%; animation: wave 2.4s linear infinite; }
.rider { position: absolute; left: 50%; bottom: 26%; width: 170px; transform-origin: 50% 100%; transform: translateX(-50%); }
.rider-guest .animal { width: 130px; display: block; margin: 0 auto -8px; }
.board { width: 170px; height: 18px; border-radius: 50%; background: var(--coral); border: 3px solid var(--ink); }
.rider.wipeout { transition: all .6s; bottom: -40%; opacity: 0; }

.sun-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.towel { position: relative; width: 92%; padding: 20px 10px; background: repeating-linear-gradient(90deg, #f7a6b6 0 24px, #fff 24px 48px); border: 3px solid var(--ink); border-radius: 14px; }
.lying { width: 76%; margin: 0 auto; transition: transform .25s; }
.lying .animal { width: 100%; transform: scaleY(.8); }
.tan { position: absolute; inset: 0; border-radius: 11px; mix-blend-mode: multiply; pointer-events: none; }
.meter { position: relative; width: 80%; height: 22px; border: 3px solid var(--ink); border-radius: 999px; background: linear-gradient(90deg, #fff 0 55%, #f3c46a 55% 80%, #f28a9a 80%); }
.meter i { position: absolute; top: -8px; width: 6px; height: 34px; margin-left: -3px; background: var(--ink); border-radius: 3px; }
.flip { font-size: 22px; padding: 16px 48px; }

/* Golden Hour */
.golden-overlay { padding: 0; place-items: stretch; }
.golden-overlay .sheet { max-width: none; border: 0; border-radius: 0; background: #2d1f1a; padding: calc(env(safe-area-inset-top, 0px) + 16px) 14px calc(env(safe-area-inset-bottom, 0px) + 18px); display: flex; }
.golden { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.viewfinder { position: relative; width: 100%; flex: 1; border-radius: 12px; overflow: hidden; }
.sunset, .sunset-bg { background: linear-gradient(#f6a65a, #f7c77a 45%, #5aa6c4 45%, #5aa6c4 58%, #f2dfb4 58%); }
.sunset { position: absolute; inset: 0; }
.crew { position: absolute; left: 0; right: 0; bottom: 18%; display: flex; justify-content: center; align-items: flex-end; flex-wrap: wrap; gap: 2px; padding: 0 6px; }
.member { position: relative; width: 26%; max-width: 120px; }
.member .front { position: absolute; inset: auto 10% 0 10%; opacity: 0; transition: opacity .12s; }
.member .side { transition: opacity .12s; }
.member.looking .front { opacity: 1; } .member.looking .side { opacity: 0; }
.member .animal { width: 100%; display: block; }
.corners { position: absolute; inset: 12px; border: 3px dashed rgba(255,255,255,.7); border-radius: 8px; pointer-events: none; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .35s; } @keyframes flash { from { opacity: .9; } }
.shots { display: flex; gap: 8px; } .shots span { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--paper); } .shots span.used { background: transparent; }
.shutter { width: 84px; height: 84px; border-radius: 50%; background: var(--paper); border: 5px solid var(--sun); display: grid; place-items: center; }
.goldenresult .polaroid { width: 100%; max-width: 330px; transform: rotate(-2deg); }
.polaroid.group .pic { position: relative; aspect-ratio: 4/3; background: linear-gradient(#f6a65a, #f7c77a 45%, #5aa6c4 45%, #5aa6c4 58%, #f2dfb4 58%); }
.polaroid.group .crew { bottom: 10%; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
