/* ---------- Derpy's Dumplings: a night-market food stall ---------- */
.derpy-area { display: flex; flex-direction: column; box-shadow: inset 0 0 0 4px #ffffff22;
  background: radial-gradient(ellipse at 50% 100%, #ff9f1c55, transparent 55%), linear-gradient(180deg, #160b3d, #3a1a6e 45%, #8a2f7a 80%, #c2457a); }
.dd-stars { position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(2px 2px at 8% 30%, #fff, transparent), radial-gradient(2px 2px at 26% 22%, #ffe9a8, transparent), radial-gradient(2px 2px at 44% 34%, #fff, transparent), radial-gradient(3px 3px at 66% 26%, #fff, transparent), radial-gradient(2px 2px at 86% 36%, #ffe9a8, transparent), radial-gradient(2px 2px at 92% 18%, #fff, transparent);
  animation: dd-twinkle 3s ease-in-out infinite; }
.dd-moon { position: absolute; right: 7%; top: 19%; width: clamp(40px, 6vw, 70px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fffbe6, #ffe8a0); box-shadow: 0 0 40px 10px #ffe8a055; pointer-events: none; }
.dd-glow { position: absolute; left: 50%; bottom: 0; width: 120%; height: 60%; translate: -50% 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, #ffcf3a44, transparent 60%); animation: dd-warm 3s ease-in-out infinite alternate; }

/* striped awning with a scalloped edge */
.dd-awning { position: absolute; left: 0; right: 0; top: 0; height: clamp(26px, 4.5vh, 42px); z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(90deg, #ff4a5a 0 46px, #fff6e6 46px 92px); filter: drop-shadow(0 5px 0 #0003); }
.dd-awning::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 16px;
  background: radial-gradient(circle at 23px 0, #ff4a5a 15px, transparent 16px) 0 0 / 92px 16px repeat-x, radial-gradient(circle at 69px 0, #fff6e6 15px, transparent 16px) 0 0 / 92px 16px repeat-x; }

/* lanterns hanging from a sagging string */
.dd-string { position: absolute; left: 2%; right: 2%; top: clamp(40px, 6.5vh, 58px); z-index: 1; display: flex; justify-content: space-between; pointer-events: none; }
.dd-lantern { --sag: 10px; position: relative; width: clamp(26px, 3.6vw, 40px); aspect-ratio: .82; top: var(--sag, 10px); border-radius: 45%;
  background: radial-gradient(circle at 40% 35%, #fff8, transparent 40%), var(--c);
  box-shadow: 0 0 22px 4px color-mix(in srgb, var(--c) 70%, transparent), inset 0 -6px 0 #0002;
  transform-origin: 50% -16px; animation: dd-sway 2.6s ease-in-out calc(var(--i) * -.4s) infinite alternate; }
.dd-lantern::before, .dd-lantern::after { content: ''; position: absolute; left: 25%; right: 25%; height: 12%; background: #4a2412; border-radius: 3px; }
.dd-lantern::before { top: -8%; } .dd-lantern::after { bottom: -8%; }
.dd-lantern b { position: absolute; left: 50%; bottom: -36%; width: 3px; height: 30%; translate: -50% 0; background: #ffcf3a; border-radius: 2px; }
.dd-lantern:nth-child(even) { --sag: 22px; } .dd-lantern:nth-child(odd) { --sag: 6px; }
.dd-lantern:nth-child(4) { --sag: 30px; } .dd-lantern:first-child, .dd-lantern:last-child { --sag: 0px; }

.dd-play { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding: clamp(60px, 9vh, 90px) 12px 0; }
.dd-top { display: flex; align-items: center; gap: 20px; }
.dd-top .pic-card { animation: pop-in .45s cubic-bezier(.2, 1.5, .4, 1); }

.dd-scene { display: flex; flex-direction: column; align-items: center; width: 100%; }
.dd-derpy { --dsz: clamp(170px, 33vh, 380px); position: relative; width: var(--dsz); aspect-ratio: 1; margin-bottom: calc(var(--dsz) * -.13); z-index: 1; }
.dd-derpy.dd-happy { animation: dd-happy .9s ease-in-out; }
.dd-tiger { --fat: 1; position: relative; width: 100%; height: 100%; transform-origin: 50% 100%; transform: scale(var(--fat)); filter: drop-shadow(0 8px 14px #0006); }
.dd-tiger > svg { width: 100%; height: 100%; display: block; }
.dd-cheek { position: absolute; top: 50%; width: 26%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 55%, #ff9fc066 0 22%, transparent 38%), radial-gradient(circle at 42% 38%, #e4f2ff, #7db6ff 50%, #7db6ff00 71%);
  opacity: 0; scale: .2; transition: opacity .15s, scale .25s cubic-bezier(.2, 1.8, .4, 1); }
.dd-cheek.l { left: 17%; } .dd-cheek.r { right: 17%; }
.dd-derpy.full .dd-cheek { opacity: 1; scale: 1; }
.dd-stink { position: absolute; left: 50%; top: 18%; width: 46%; height: 34%; translate: -50% 0; opacity: 0; pointer-events: none; }
.dd-stink b { position: absolute; bottom: 0; width: 10px; height: 100%; border-radius: 10px; border: 5px solid #7be35a; border-width: 0 5px 0 0; }
.dd-stink b:nth-child(1) { left: 10%; } .dd-stink b:nth-child(2) { left: 45%; height: 120%; } .dd-stink b:nth-child(3) { left: 80%; }
.dd-derpy.yuck .dd-stink { opacity: 1; animation: dd-stink .6s ease-in-out infinite alternate; }
.dd-derpy.yuck .dd-tiger > svg { filter: hue-rotate(-60deg) saturate(1.3); transition: filter .2s; }

/* the wooden counter and the bamboo steamer on it */
.dd-counter { position: relative; z-index: 2; width: min(100%, 680px); padding: 0 0 clamp(14px, 2.4vh, 26px); display: flex; justify-content: center;
  background: linear-gradient(180deg, transparent 0 34%, #a8662e 34% 40%, #8a4e1f 40% 90%, #6a3a14 90%); border-radius: 0 0 20px 20px; }
.dd-steamer { position: relative; width: min(100%, 520px); }
.dd-basket { position: relative; display: flex; justify-content: center; gap: clamp(4px, 2vw, 22px); padding: clamp(18px, 3vh, 30px) clamp(10px, 3vw, 30px) clamp(14px, 2vh, 22px);
  border-radius: 50% / 34%; background: radial-gradient(ellipse at 50% 40%, #f7e2a8, #e2bd6a 60%, #c89442);
  box-shadow: inset 0 0 0 7px #b07c34, inset 0 0 0 12px #e9c97c, 0 10px 0 #7a4e1c, 0 16px 24px #0005; }
.dd-lid { position: absolute; left: 50%; top: -18%; width: 92%; height: 50%; translate: 0 0; transform: translate(-50%, 0); z-index: 3; pointer-events: none; border-radius: 50% 50% 40% 40% / 70% 70% 30% 30%;
  background: repeating-linear-gradient(90deg, #d9ae5c 0 10px, #c89442 10px 12px); box-shadow: inset 0 -8px 0 #b07c34, 0 6px 10px #0004; }

.dd-dump { position: relative; width: clamp(92px, 14vw, 140px); aspect-ratio: 10 / 9; animation: dd-in .5s cubic-bezier(.2, 1.6, .4, 1) calc(.35s + var(--i) * .1s) backwards, dd-wobble 2.4s ease-in-out calc(var(--i) * -.7s) infinite; transform-origin: 50% 95%; }
.dd-dump svg, .dd-fly svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 0 #0002); }
.dd-dump span, .dd-fly span { position: relative; display: grid; place-items: center; height: 100%; padding-top: 26%; font-size: clamp(36px, 5.4vw, 54px); font-weight: 700; color: #6a2a14; line-height: 1; }
.dd-dump::before { content: ''; position: absolute; left: 50%; bottom: 82%; width: 18px; height: 40px; translate: -50% 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, #ffffffaa, transparent 70%); filter: blur(3px); animation: dd-steam 2.2s ease-out calc(var(--i) * -.6s) infinite; }
.dd-dump:active { scale: .92; }
.dd-dump.hint { animation: pulse 1s ease-in-out infinite; }
.dd-dump.hint svg { filter: drop-shadow(0 0 14px var(--gold)) drop-shadow(0 0 4px #fff); }
.dd-dump.shake { animation: shake .4s; }
.dd-fly { position: absolute; z-index: 6; pointer-events: none; }
.dd-heart { position: absolute; z-index: 6; font-size: clamp(28px, 4vw, 40px); pointer-events: none; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }

.splash-word.dd-nom { color: #ffe03a; -webkit-text-stroke-color: #2f4bd6; z-index: 7; }
.splash-word.dd-bleh { color: #8cf06a; -webkit-text-stroke-color: #2a5a14; z-index: 7; }
.splash-word.dd-burp { color: #fff; -webkit-text-stroke-color: #ff4fa3; font-size: clamp(54px, 9vw, 96px); z-index: 7; }

@keyframes dd-twinkle { 50% { opacity: .5; } }
@keyframes dd-warm { to { opacity: .6; } }
@keyframes dd-sway { from { rotate: -7deg; } to { rotate: 7deg; } }
@keyframes dd-in { from { transform: translateY(-60px) scale(.3); opacity: 0; } }
@keyframes dd-wobble { 0%, 100% { scale: 1 1; } 50% { scale: 1.04 .96; } }
@keyframes dd-steam { 0% { translate: -50% 10px; scale: .6; opacity: 0; } 30% { opacity: .9; } 100% { translate: -30% -50px; scale: 1.6 1.2; opacity: 0; } }
@keyframes dd-happy { 20% { rotate: -6deg; translate: 0 -10px; } 45% { rotate: 6deg; translate: 0 0; } 70% { rotate: -3deg; translate: 0 -6px; } }
@keyframes dd-stink { to { translate: -50% -8px; } }

/* wide screens: the picture beside Derpy, so he can be bigger */
@media (orientation: landscape) and (min-width: 700px) {
  .dd-play { flex-direction: row; gap: clamp(20px, 4vw, 60px); }
  .dd-top { flex-direction: column; }
  .dd-scene { width: auto; flex: 0 1 640px; }
  .dd-derpy { --dsz: clamp(170px, 42vh, 340px); }
}
@media (max-height: 640px) { .dd-play { padding-top: 54px; } }
