/* 펭귄 택배 대작전: 말랑한 장난감 UI */
:root {
  --ink: #233354;
  --ink2: #5a6a8c;
  --cream: #fffaf0;
  --snow: #ffffff;
  --sky: #5cc0f4;
  --sky2: #2f8fe3;
  --gold: #ffcf3f;
  --gold2: #f5a81d;
  --red: #ef5350;
  --green: #4fc98a;
  --head: "Bagel Fat One", "Jua", sans-serif;
  --ui: "Jua", "Noto Sans KR", sans-serif;
  --body: "Noto Sans KR", system-ui, sans-serif;
  --sat: env(safe-area-inset-top);
  --sab: env(safe-area-inset-bottom);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #7cc8f2;
  color: var(--ink);
  font-family: var(--body);
}
.hidden {
  display: none !important;
}
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 62%, rgba(20, 40, 90, 0.2) 100%);
  z-index: 1;
}

/* ---------- 공통 작은 그림 ---------- */
.fish-i {
  display: inline-block;
  width: 1.32em;
  height: 0.86em;
  vertical-align: -0.04em;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 20'%3E%3Cpath d='M1 10C6 2 16 1 23 8l7-6c-1 5-1 11 0 16l-7-6C16 19 6 18 1 10z' fill='%23ffc42e' stroke='%23c97b0a' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle cx='8' cy='8.500' r='1.700' fill='%23553204'/%3E%3C/svg%3E");
}
.star-i {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.600l2.900 6.200 6.800.8-5 4.600 1.300 6.700L12 17l-6 3.400 1.300-6.700-5-4.600 6.800-.8z' fill='%23ffd338' stroke='%23c97b0a' stroke-width='1.600' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- 말랑 단추 ---------- */
.toy-btn {
  appearance: none;
  position: relative;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font: 400 19px var(--ui);
  color: var(--ink);
  background: linear-gradient(#fffefa, #eaf2fb);
  box-shadow: 0 5px 0 #b8cbe3, 0 10px 18px rgba(30, 60, 110, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.9);
  padding: 13px 20px;
  transition: transform 0.08s, box-shadow 0.08s;
}
.toy-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #b8cbe3, 0 4px 8px rgba(30, 60, 110, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.9);
}
.toy-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.toy-btn.play {
  background: linear-gradient(#ffe36b, #ffb72c);
  color: #5b3203;
  box-shadow: 0 7px 0 #c97b0a, 0 14px 24px rgba(180, 90, 0, 0.32), inset 0 3px 0 rgba(255, 255, 255, 0.72);
}
.toy-btn.play:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #c97b0a, 0 5px 10px rgba(180, 90, 0, 0.3), inset 0 3px 0 rgba(255, 255, 255, 0.72);
}
.toy-btn.small {
  font-size: 21px;
  padding: 14px 20px;
  width: 100%;
}
.toy-btn.sub {
  font-size: 16px;
  padding: 11px 14px;
}

/* ---------- 첫 화면 ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.title-main {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: calc(max(14px, var(--sat)) + 44px) 16px calc(14px + var(--sab));
}
body.pd #title h1.logo {
  font-family: var(--head) !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.98;
  font-weight: 400 !important;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 8px 10px rgba(16, 60, 120, 0.38));
  animation: logoIn 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
.logo span {
  display: block;
  -webkit-text-stroke: 9px #1d4f92;
  paint-order: stroke fill;
}
.logo .l1 {
  font-size: clamp(44px, 12.5vw, 72px);
  color: #fff;
  text-shadow: 0 5px 0 #1d4f92;
  transform: rotate(-2deg);
}
.logo .l2 {
  font-size: clamp(58px, 17.5vw, 100px);
  background: linear-gradient(#fff3a0 15%, #ffc62e 60%, #ff9d1e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  filter: drop-shadow(0 0 0 #1d4f92) drop-shadow(0 2px 0 #1d4f92) drop-shadow(2px 0 0 #1d4f92) drop-shadow(-2px 0 0 #1d4f92) drop-shadow(0 -2px 0 #1d4f92) drop-shadow(0 6px 0 #1d4f92);
  transform: rotate(1.5deg);
  margin-top: 2px;
  padding: 0 6px;
}
@keyframes logoIn {
  from {
    transform: scale(0.6) translateY(-20px);
    opacity: 0;
  }
}
.title-prog {
  margin: 2px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font: 400 15px var(--ui);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(30, 60, 110, 0.18);
}
.title-prog svg {
  width: 16px;
  height: 16px;
  color: #f5b21d;
}
.title-prog small {
  font-size: 12px;
  color: var(--ink2);
  margin-right: 6px;
}
.title-prog small:only-child {
  margin-right: 0;
  font-size: 13.5px;
}
.title-gap {
  flex: 1;
  min-height: min(42vh, 330px);
}
.toy-btn.play#start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(82%, 320px);
  padding: 15px 22px 17px;
  font: 400 34px var(--head);
  letter-spacing: 0.02em;
  animation: playPulse 1.4s ease-in-out infinite;
}
.play-i {
  width: 0;
  height: 0;
  border-left: 22px solid #5b3203;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}
@keyframes playPulse {
  50% {
    transform: scale(1.035);
  }
}
.title-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(100%, 400px);
  margin-top: 6px;
}
.round-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px 7px;
  border-radius: 20px;
  background: linear-gradient(#fffefa, #e7f0fa);
  box-shadow: 0 4px 0 #b8cbe3, 0 8px 14px rgba(30, 60, 110, 0.2), inset 0 2px 0 #fff;
  font: 400 13px var(--ui);
  color: var(--ink);
}
.round-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #b8cbe3, inset 0 2px 0 #fff;
}
.ic {
  display: block;
  width: 30px;
  height: 30px;
  background: no-repeat center / contain;
}
.ic-map {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 3c-6 0-10 4.500-10 10 0 7 10 16 10 16s10-9 10-16c0-5.500-4-10-10-10z' fill='%23ef5350' stroke='%23a82a28' stroke-width='2'/%3E%3Ccircle cx='16' cy='13' r='4' fill='%23fff'/%3E%3C/svg%3E");
}
.ic-hat {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6 19c0-7 4-12 10-12s10 5 10 12z' fill='%23ef5350' stroke='%23a82a28' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M3 22c0-2 2-3 4-3h18c2 0 4 1 4 3s-2 3-4 3H7c-2 0-4-1-4-3z' fill='%23fff' stroke='%23a82a28' stroke-width='2'/%3E%3Crect x='13' y='11' width='6' height='5' rx='1' fill='%23ffd24a' stroke='%23a82a28' stroke-width='1.500'/%3E%3C/svg%3E");
}
.ic-cup {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M9 4h14v9c0 4-3 7-7 7s-7-3-7-7z' fill='%23ffd24a' stroke='%23b67508' stroke-width='2'/%3E%3Cpath d='M9 7H4c0 5 2 8 6 8M23 7h5c0 5-2 8-6 8' fill='none' stroke='%23b67508' stroke-width='2.400'/%3E%3Cpath d='M14 20h4v4h3v3H11v-3h3z' fill='%23f5a81d' stroke='%23b67508' stroke-width='1.800'/%3E%3C/svg%3E");
}
.ic-snd {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M5 12h5l8-6v20l-8-6H5z' fill='%235cc0f4' stroke='%23215e96' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M22 11c2 3 2 7 0 10M25 8c3.500 5 3.500 11 0 16' fill='none' stroke='%23215e96' stroke-width='2.400' stroke-linecap='round'/%3E%3C/svg%3E");
}
.ic-lock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 11V8a5 5 0 0 1 10 0v3h1.500v10h-13V11zm2.500 0h5V8a2.500 2.500 0 0 0-5 0z' fill='%23fff' stroke='%23233354' stroke-width='1.200'/%3E%3C/svg%3E");
}
.home-link {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(20, 50, 100, 0.6);
}

/* ---------- 머리줄 ---------- */
.panel-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(max(10px, var(--sat))) 12px 8px;
}
.panel-head h2 {
  margin: 0;
  font: 400 22px var(--head);
  color: #fff;
  -webkit-text-stroke: 5px #1d4f92;
  paint-order: stroke fill;
}
.back-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(#fffefa, #e7f0fa);
  box-shadow: 0 3px 0 #b8cbe3;
  font: 400 15px var(--ui);
  color: var(--ink);
}
.head-stars {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font: 400 16px var(--ui);
  box-shadow: 0 2px 8px rgba(30, 60, 110, 0.2);
}
.head-stars svg {
  width: 17px;
  height: 17px;
  color: #f5b21d;
}
.head-stars small {
  color: var(--ink2);
  font-size: 12px;
}

/* ---------- 월드 선택 ---------- */
.worlds {
  display: flex;
  flex-direction: column;
}
.world-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 10px;
  text-align: center;
}
.world-text h2 {
  margin: 0;
  font: 400 clamp(30px, 9vw, 42px) var(--head);
  color: #fff;
  -webkit-text-stroke: 6px #1d4f92;
  paint-order: stroke fill;
}
.world-text p {
  margin: 2px 0 4px;
  font: 400 14.5px var(--ui);
  color: #fff;
  text-shadow: 0 1px 4px rgba(10, 30, 70, 0.9);
}
.world-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.world-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.world-dots i.on {
  background: var(--gold);
  transform: scale(1.25);
}
.world-dots i.off {
  background: rgba(20, 30, 60, 0.42);
}
.arrow {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(#fffefa, #e7f0fa);
  box-shadow: 0 4px 0 #b8cbe3, 0 6px 12px rgba(20, 50, 100, 0.25);
  font: 400 34px/1 var(--ui);
  color: var(--ink);
}
.arrow:disabled {
  opacity: 0.35;
}
.world-lock {
  display: none;
  align-self: center;
  margin-top: 12vh;
}
.worlds.locked .world-lock {
  display: block;
}
.world-lock .ic {
  width: 74px;
  height: 74px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}
.worlds.locked #game {
  filter: grayscale(0.4);
}
.stage-sheet {
  margin-top: auto;
  padding: 14px 12px calc(12px + var(--sab));
  background: linear-gradient(rgba(255, 255, 255, 0.94), #fff);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(20, 50, 100, 0.25);
}
.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.st {
  appearance: none;
  position: relative;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-height: 74px;
  padding: 7px 3px 6px;
  border-radius: 16px;
  background: linear-gradient(#f4fbff, #d7ecfb);
  box-shadow: 0 4px 0 #9fc4e4;
  color: var(--ink);
}
.st:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #9fc4e4;
}
.st > b {
  font: 400 19px/1 var(--head);
}
.st-name {
  font: 400 11.5px/1.15 var(--ui);
  color: var(--ink2);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}
.mini {
  display: flex;
  gap: 1px;
}
.mini i {
  width: 14px;
  height: 14px;
  color: #cfdbe9;
}
.mini i.on {
  color: #f5b21d;
}
.mini svg {
  display: block;
  width: 100%;
  height: 100%;
}
.st.done {
  background: linear-gradient(#fffbe0, #ffe99b);
  box-shadow: 0 4px 0 #e0b23d;
}
.st.boss {
  outline: 3px solid #ef5350;
  outline-offset: -3px;
}
.st.lock {
  background: #e4e9f1;
  box-shadow: 0 3px 0 #c1ccd9;
  color: #9dabbf;
  cursor: default;
  justify-content: center;
}
.st.lock:active {
  transform: none;
}
.st-lock svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ---------- 꾸미기 ---------- */
.costume {
  display: flex;
  flex-direction: column;
}
.costume-drag {
  flex: 1;
  min-height: 34vh;
  touch-action: none;
  cursor: grab;
}
.costume-sheet {
  padding: 10px 10px calc(12px + var(--sab));
  background: linear-gradient(rgba(255, 255, 255, 0.94), #fff);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(20, 50, 100, 0.25);
}
.note {
  margin: 0 0 8px;
  text-align: center;
  font: 500 12.5px var(--body);
  color: var(--ink2);
}
.costume-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  max-width: 620px;
  margin: 0 auto;
}
.cos {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-height: 84px;
  padding: 7px 3px;
  border-radius: 16px;
  background: linear-gradient(#f4fbff, #d7ecfb);
  box-shadow: 0 4px 0 #9fc4e4;
  color: var(--ink);
}
.cos b {
  font: 400 15px var(--ui);
}
.cos small {
  font: 500 10.5px/1.15 var(--body);
  color: var(--ink2);
  min-height: 2.3em;
}
.price {
  margin-top: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff;
  font: 400 13px var(--ui);
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.cos.own .price {
  background: #d7f4e2;
  color: #208a56;
}
.cos.on {
  background: linear-gradient(#fffbe0, #ffe99b);
  box-shadow: 0 4px 0 #e0b23d;
}
.cos.on .price {
  background: var(--gold2);
  color: #fff;
}

/* ---------- 기록 ---------- */
.records {
  background: linear-gradient(rgba(70, 150, 220, 0.5), rgba(40, 100, 180, 0.72));
  padding-bottom: calc(18px + var(--sab));
}
.rec-card {
  margin: 8px 12px;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 0 #b8cbe3, 0 10px 20px rgba(20, 50, 100, 0.2);
}
.rec-card h3 {
  margin: 0 0 8px;
  font: 400 16px var(--ui);
}
.rec-total {
  display: flex;
  gap: 6px;
  text-align: center;
  margin-bottom: 7px;
}
.rec-total > div {
  flex: 1;
}
.rec-total small {
  display: block;
  font: 500 11.5px var(--body);
  color: var(--ink2);
}
.rec-total b {
  font: 400 19px var(--ui);
}
.bar {
  height: 9px;
  border-radius: 6px;
  background: #e0e9f4;
  overflow: hidden;
}
.bar.big {
  height: 13px;
  margin-bottom: 9px;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #5cc0f4, #4fc98a);
}
.rw {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font: 400 13.5px var(--ui);
}
.rw small {
  font: 500 11px var(--body);
  color: var(--ink2);
}
.rw.off {
  opacity: 0.5;
}
.rec-fun {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.rec-fun > div {
  padding: 6px 2px;
  text-align: center;
  border-radius: 12px;
  background: #eef6fd;
}
.rec-fun small {
  display: block;
  font: 500 10.5px var(--body);
  color: var(--ink2);
}
.rec-fun b {
  font: 400 18px var(--ui);
}
.rec-fun em {
  font: 500 10px var(--body);
  font-style: normal;
  margin-left: 1px;
}
.records > .toy-btn {
  display: block;
  margin: 10px auto;
}
#rec-rank {
  margin: 8px 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
}

/* ---------- 설정 ---------- */
.modal {
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 36, 80, 0.46);
  padding: 18px;
}
.modal-card {
  width: min(360px, 100%);
  padding: 16px 18px 18px;
  border-radius: 24px;
  background: var(--cream);
  box-shadow: 0 7px 0 #b8cbe3, 0 16px 36px rgba(10, 30, 70, 0.4);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-card h2 {
  margin: 0;
  text-align: center;
  font: 400 24px var(--head);
}
.modal-card label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 400 16px var(--ui);
}
.rng input {
  flex: 1;
  height: 30px;
  accent-color: var(--sky2);
}
.sel select {
  flex: 1;
  height: 40px;
  padding: 0 8px;
  border-radius: 12px;
  border: 2px solid #c9d8ea;
  background: #fff;
  font: 400 15px var(--ui);
  color: var(--ink);
}
.sw input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sw i {
  position: relative;
  width: 62px;
  height: 34px;
  border-radius: 999px;
  background: #c9d3e0;
  transition: background 0.14s;
}
.sw i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.14s;
}
.sw input:checked + i {
  background: var(--green);
}
.sw input:checked + i::after {
  transform: translateX(28px);
}

/* ---------- 플레이 화면 ---------- */
body:not(.in-play) .hud,
body:not(.in-play) .touch-ui,
body:not(.in-play) .wobble,
body:not(.in-play) .tip,
body:not(.in-play) .banner {
  display: none;
}
body:not(.in-game) .floats {
  display: none;
}
.hud {
  position: absolute;
  z-index: 4;
  top: max(8px, var(--sat));
  left: 58px;
  right: 58px;
  max-width: 560px;
  margin: 0 auto;
  pointer-events: none;
}
.hud-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hud-stage {
  flex: none;
  padding: 3px 9px;
  border-radius: 12px;
  background: linear-gradient(#ffe36b, #ffb72c);
  box-shadow: 0 3px 0 #c97b0a;
  font: 400 16px/1.2 var(--head);
  color: #5b3203;
}
.hud-track {
  position: relative;
  flex: 1;
  height: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 2px 3px rgba(30, 60, 110, 0.3), 0 2px 5px rgba(20, 50, 100, 0.25);
}
.hud-fill {
  position: absolute;
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: 0;
  max-width: calc(100% - 6px);
  border-radius: 6px;
  background: linear-gradient(90deg, #5cc0f4, #4fc98a);
}
.hud-dots i {
  position: absolute;
  top: 4px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #7fa6cc;
}
.hud-peng {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 30px;
  margin: -17px 0 0 -14px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 30'%3E%3Cpath d='M14 3C7 3 2 10 2 18c0 7 5 11 12 11s12-4 12-11C26 10 21 3 14 3z' fill='%233c4e74' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M14 11c-2-3-7-3-8 1-1 3 0 5 0 7 0 5 4 8 8 8s8-3 8-8c0-2 1-4 0-7-1-4-6-4-8-1z' fill='%23fffdf7'/%3E%3Cellipse cx='9' cy='15' rx='2.800' ry='3.200' fill='%23141019'/%3E%3Cellipse cx='19' cy='15' rx='2.800' ry='3.200' fill='%23141019'/%3E%3Ccircle cx='8' cy='13.800' r='1.100' fill='%23fff'/%3E%3Ccircle cx='18' cy='13.800' r='1.100' fill='%23fff'/%3E%3Cellipse cx='14' cy='18' rx='2.400' ry='1.600' fill='%23ff9d24'/%3E%3Cellipse cx='6.500' cy='19' rx='2' ry='1.300' fill='%23ff9aa8'/%3E%3Cellipse cx='21.500' cy='19' rx='2' ry='1.300' fill='%23ff9aa8'/%3E%3Cpath d='M7 6c2-4 12-4 14 0-5-1-9-1-14 0z' fill='%23e5352d'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}
.hud-home {
  position: absolute;
  right: -5px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -13px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 12L12 3l10 9h-3v9H5v-9z' fill='%23ffd24a' stroke='%23a06a08' stroke-width='1.800' stroke-linejoin='round'/%3E%3Crect x='10' y='14' width='4' height='7' fill='%23c2583e'/%3E%3C/svg%3E");
}
.hud-time {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 0 #b8cbe3;
  font: 400 16px/1.2 var(--ui);
  min-width: 56px;
  justify-content: center;
}
.hud-time i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8d3e2;
}
.hud-time.par i {
  background: var(--green);
}
.hud-time .low {
  color: var(--red);
  animation: lowT 0.5s infinite alternate;
}
@keyframes lowT {
  to {
    transform: scale(1.14);
  }
}
.hud.express .hud-stage {
  background: linear-gradient(#ff8a6a, #ef5350);
  color: #fff;
  box-shadow: 0 3px 0 #a82a28;
}
.hud-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
.hud-boxes {
  display: flex;
  gap: 4px;
}
body.ending .hud-row,
body.ending .wobble {
  display: none;
}
.pk {
  position: relative;
  width: 44px;
  height: 18px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  box-shadow: 0 2px 0 #b8cbe3;
}
.pk::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, #d8a765 42%, #f2e1b8 42%, #f2e1b8 58%, #d8a765 58%);
  box-shadow: 0 0 0 1px #8a5e36;
}
.pk i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8ae0a8, #4fc98a);
}
.pk.bad i {
  background: linear-gradient(90deg, #ffc27a, #ff8a5a);
}
.pk.lost {
  animation: pkLost 0.4s infinite alternate;
}
@keyframes pkLost {
  to {
    transform: scale(1.14);
    box-shadow: 0 0 0 2px var(--red);
  }
}
.hud-num {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  font: 400 14px/1.3 var(--ui);
  box-shadow: 0 2px 0 #b8cbe3;
}
.hud-power {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 5px;
}
.pw {
  padding: 1px 8px;
  border-radius: 9px;
  font: 400 12.5px/1.4 var(--ui);
  color: #fff;
  background: #5a7fb0;
}
.pw.b {
  background: #f5a81d;
}
.pw.m {
  background: #ef5350;
}
.pw.s {
  background: #3aa5f5;
}
.pw.w {
  background: #2fb6c9;
}
.wobble {
  position: absolute;
  z-index: 4;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 400 15px var(--ui);
  opacity: 0;
  transition: opacity 0.1s;
  pointer-events: none;
}
.wobble.on {
  opacity: 0.92;
  animation: wob 0.2s infinite alternate;
}
@keyframes wob {
  from {
    transform: translate(-54%, -50%) rotate(-5deg);
  }
  to {
    transform: translate(-46%, -50%) rotate(5deg);
  }
}
.tip {
  position: absolute;
  z-index: 5;
  top: calc(max(8px, var(--sat)) + 62px);
  left: 50%;
  transform: translate(-50%, -8px) scale(0.92);
  max-width: min(92%, 460px);
  width: max-content;
  padding: 9px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 0 #b8cbe3, 0 8px 18px rgba(20, 50, 100, 0.26);
  font: 400 16.5px/1.3 var(--ui);
  text-align: center;
  opacity: 0;
  transition: opacity 0.16s, transform 0.2s cubic-bezier(0.2, 1.5, 0.4, 1);
  pointer-events: none;
}
.tip.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.tip kbd {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 7px;
  background: #e9f1fa;
  box-shadow: 0 2px 0 #b8cbe3;
  font: 400 13px var(--ui);
}
.floats {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.float {
  position: absolute;
  transform: translate(-50%, -50%);
  font: 400 21px/1 var(--head);
  color: #fff;
  -webkit-text-stroke: 5px #1d4f92;
  paint-order: stroke fill;
  white-space: nowrap;
  animation: floatUp 1.1s cubic-bezier(0.2, 1.3, 0.4, 1) forwards;
}
.float.big {
  font-size: 32px;
}
.float.sm {
  font-size: 16px;
}
.float.good {
  color: #ffe36b;
  -webkit-text-stroke-color: #a65a00;
}
.float.bad {
  color: #ffdede;
  -webkit-text-stroke-color: #b3262a;
}
@keyframes floatUp {
  0% {
    transform: translate(-50%, -30%) scale(0.5);
    opacity: 0;
  }
  18% {
    transform: translate(-50%, -60%) scale(1.14);
    opacity: 1;
  }
  32% {
    transform: translate(-50%, -66%) scale(1);
  }
  100% {
    transform: translate(-50%, -150%) scale(1);
    opacity: 0;
  }
}
.banner {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: min(92%, 440px);
  padding: 10px 14px 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 0 #b8cbe3, 0 12px 24px rgba(20, 50, 100, 0.3);
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
.banner.on {
  animation: bannerIn 2s ease both;
}
@keyframes bannerIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.7);
  }
  9% {
    opacity: 1;
    transform: translateX(-50%) scale(1.04);
  }
  14% {
    transform: translateX(-50%) scale(1);
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-14px);
  }
}
.b-stage {
  padding: 0 10px;
  border-radius: 9px;
  background: linear-gradient(#ffe36b, #ffb72c);
  font: 400 14px var(--head);
  color: #5b3203;
}
.banner b {
  font: 400 26px var(--head);
}
.banner small {
  font: 400 14.5px/1.25 var(--ui);
  color: var(--ink2);
}
.banner em {
  font: 400 13px var(--ui);
  font-style: normal;
  color: #c2571f;
}

/* ---------- 터치 조작 ---------- */
.touch-ui {
  display: none;
}
body.touch.in-play:not(.ending) .touch-ui {
  display: block;
}
.joy-zone {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 0;
  width: 54%;
  height: 58%;
  touch-action: none;
}
.joy {
  position: absolute;
  left: 92px;
  bottom: auto;
  top: calc(100% - 104px - var(--sab));
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.72), 0 4px 12px rgba(20, 50, 100, 0.2);
  pointer-events: none;
}
.joy i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  background: linear-gradient(#fffefa, #dbe9f7);
  box-shadow: 0 5px 0 #a9bfda, 0 8px 12px rgba(20, 50, 100, 0.3);
}
.joy.active {
  background: rgba(255, 255, 255, 0.46);
}
.joy.hint {
  animation: joyHint 0.75s ease-in-out infinite alternate;
}
.joy.hint i {
  animation: knobHint 0.75s ease-in-out infinite alternate;
}
@keyframes joyHint {
  to {
    box-shadow: inset 0 0 0 4px var(--gold), 0 0 18px var(--gold);
  }
}
@keyframes knobHint {
  to {
    transform: translateY(-30px);
  }
}
.tc {
  appearance: none;
  position: absolute;
  z-index: 4;
  border: 0;
  border-radius: 50%;
  touch-action: none;
  cursor: pointer;
  font: 400 16px var(--ui);
  color: var(--ink);
  background: linear-gradient(#fffefa, #dbe9f7);
  box-shadow: 0 6px 0 #a9bfda, 0 10px 16px rgba(20, 50, 100, 0.32), inset 0 2px 0 #fff;
}
.tc.down {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #a9bfda, 0 4px 8px rgba(20, 50, 100, 0.3), inset 0 2px 0 #fff;
}
.tc-jump {
  right: 20px;
  bottom: calc(26px + var(--sab));
  width: 94px;
  height: 94px;
  font-size: 19px;
  background: linear-gradient(#a8e4ff, #5cc0f4);
  color: #fff;
  text-shadow: 0 1px 2px #1d5f9c;
  box-shadow: 0 7px 0 #2f8fc9, 0 11px 18px rgba(20, 50, 100, 0.34), inset 0 3px 0 rgba(255, 255, 255, 0.6);
}
.tc-jump.down {
  box-shadow: 0 2px 0 #2f8fc9, inset 0 3px 0 rgba(255, 255, 255, 0.6);
}
.tc-dash {
  right: 124px;
  bottom: calc(36px + var(--sab));
  width: 72px;
  height: 72px;
  background: linear-gradient(#ffe36b, #ffb72c);
  color: #5b3203;
  box-shadow: 0 6px 0 #c97b0a, 0 10px 16px rgba(120, 70, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
.tc-dash.down {
  box-shadow: 0 2px 0 #c97b0a, inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
.tc-grab {
  right: 46px;
  bottom: calc(136px + var(--sab));
  width: 66px;
  height: 66px;
  background: linear-gradient(#b8f0c9, #4fc98a);
  color: #fff;
  text-shadow: 0 1px 2px #1a7a4e;
  box-shadow: 0 5px 0 #2a9b63, inset 0 2px 0 rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.12s, transform 0.14s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.tc-grab.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.tc.pulse {
  animation: tcPulse 0.5s ease-in-out infinite alternate;
}
@keyframes tcPulse {
  to {
    transform: scale(1.15);
    filter: brightness(1.15) drop-shadow(0 0 12px #fff);
  }
}

/* ---------- 결과 ---------- */
.sheet {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 10px calc(10px + var(--sab));
}
.res-card {
  width: min(430px, 100%);
  margin: 26vh auto 0;
  padding: 11px 16px 15px;
  border-radius: 26px;
  background: var(--cream);
  box-shadow: 0 7px 0 #b8cbe3, 0 16px 34px rgba(10, 30, 70, 0.38);
  text-align: center;
  animation: cardIn 0.42s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
@keyframes cardIn {
  from {
    transform: translateY(60px) scale(0.86);
    opacity: 0;
  }
}
.res-stage {
  margin: 0;
  font: 400 13.5px var(--ui);
  color: var(--ink2);
}
.res-card h2 {
  margin: 0;
  font: 400 30px/1.15 var(--head);
}
.res-stars {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 1px 0 2px;
}
.res-stars i {
  width: 50px;
  height: 50px;
  background: #e6e0cd;
  clip-path: polygon(50% 2%, 63% 35%, 98% 38%, 71% 60%, 80% 95%, 50% 76%, 20% 95%, 29% 60%, 2% 38%, 37% 35%);
}
.res-stars i:nth-child(2) {
  transform: translateY(-5px) scale(1.14);
}
.res-stars i.on {
  background: linear-gradient(#ffe88a, #f5a81d);
  animation: starIn 0.34s cubic-bezier(0.2, 1.7, 0.4, 1);
}
@keyframes starIn {
  from {
    scale: 0.15;
    rotate: -30deg;
  }
}
.res-score {
  margin: 0 0 5px;
  font: 400 15px var(--ui);
}
.res-score b {
  font: 400 30px var(--head);
  color: #c2571f;
}
.res-score em {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font: 400 12.5px var(--ui);
  font-style: normal;
}
.res-rows {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.res-rows > div {
  padding: 3px 4px 4px;
  border-radius: 12px;
  background: #f2ecdc;
}
.res-rows dt {
  font: 500 11px var(--body);
  color: var(--ink2);
}
.res-rows dd {
  display: inline;
  margin: 0;
  font: 400 17px var(--ui);
}
.res-rows span {
  margin-left: 4px;
  font: 500 10.5px var(--body);
  color: var(--ink2);
}
.res-rows span.ok {
  color: #208a56;
}
.res-hint {
  min-height: 0;
  margin: 6px 0 4px;
  font: 500 12.5px/1.35 var(--body);
  color: var(--ink2);
}
.res-hint:empty {
  display: none;
}
.res-unlock {
  margin: 4px 0;
  padding: 3px 8px;
  border-radius: 10px;
  background: #ffe99b;
  font: 400 14px var(--ui);
  color: #6a4404;
}
.res-card .toy-btn.play {
  margin-top: 8px;
}
.res-btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.res-btns .toy-btn {
  flex: 1;
}
.fail-card {
  margin-top: 46vh;
}
.fail-card .toy-btn.sub {
  margin-top: 11px;
  width: 100%;
}
.fail-card h2 {
  font-size: 26px;
}

/* ---------- 일시정지 · 알림 ---------- */
body.pd .today-pause-btn {
  top: max(8px, var(--sat));
  left: 10px;
  min-width: 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  background: linear-gradient(#fffefa, #dbe9f7);
  box-shadow: 0 4px 0 #a9bfda, 0 6px 10px rgba(20, 50, 100, 0.25);
  z-index: 9;
}
body.pd .today-pause-btn::before {
  content: "";
  display: block;
  width: 14px;
  height: 16px;
  margin: 0 auto;
  border-left: 5px solid var(--ink);
  border-right: 5px solid var(--ink);
}
body.pd .today-pause-overlay {
  z-index: 30;
}
body.pd .today-pause-overlay .today-pause-actions {
  width: min(280px, 86%);
}
body.pd .today-pause-overlay .today-pause-resume {
  background: linear-gradient(#ffe36b, #ffb72c);
  color: #5b3203;
  box-shadow: 0 5px 0 #c97b0a;
  font-family: var(--ui);
}
body.pd .today-pause-overlay .today-pause-home {
  font-family: var(--ui);
  font-weight: 400;
}
body.pd .today-mute-btn {
  top: max(8px, var(--sat)) !important;
  right: 10px !important;
  z-index: 9;
}
.toast {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: 18%;
  transform: translate(-50%, 10px);
  padding: 8px 16px;
  border-radius: 14px;
  background: rgba(20, 36, 70, 0.92);
  color: #fff;
  font: 400 15px var(--ui);
  opacity: 0;
  transition: opacity 0.14s, transform 0.14s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.veil {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: #eaf6ff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s;
}
.veil.on {
  opacity: 1;
}

/* ---------- 불러오기 ---------- */
.boot {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#8fd6f8, #d9f2ff 55%, #ffffff);
}
.boot-box {
  width: min(320px, 82%);
  text-align: center;
}
.boot-logo {
  margin: 10px 0 12px;
  font: 400 28px var(--head);
  color: #1d4f92;
}
.load-bar {
  height: 16px;
  padding: 3px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 0 #b8cbe3;
}
.load-bar b {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 6px;
  background: linear-gradient(90deg, #5cc0f4, #4fc98a);
  transition: width 0.25s;
}
.load-t {
  margin: 10px 0 0;
  font: 400 14.5px var(--ui);
  color: #2b5a92;
}
.boot-peng {
  position: relative;
  width: 112px;
  height: 128px;
  margin: 0 auto;
  animation: pengWaddle 0.62s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}
.boot-peng i {
  position: absolute;
  display: block;
}
.boot-peng .b {
  left: 8px;
  top: 24px;
  width: 96px;
  height: 98px;
  border-radius: 50% 50% 47% 47% / 56% 56% 44% 44%;
  background: #3c4e74;
  box-shadow: inset -5px -7px 0 rgba(0, 0, 0, 0.12);
}
.boot-peng .bl {
  left: 18px;
  top: 52px;
  width: 76px;
  height: 66px;
  border-radius: 50%;
  background: #fffdf7;
}
.boot-peng .fa {
  left: 21px;
  top: 40px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 34px 0 0 #fffdf7;
}
.boot-peng .e1,
.boot-peng .e2 {
  top: 56px;
  width: 18px;
  height: 21px;
  border-radius: 50%;
  background: #14121c;
  box-shadow: inset 5px 5px 0 -2px #fff;
  animation: bootBlink 2.2s infinite;
}
.boot-peng .e1 {
  left: 28px;
}
.boot-peng .e2 {
  left: 66px;
}
.boot-peng .be {
  left: 49px;
  top: 70px;
  width: 14px;
  height: 9px;
  border-radius: 50%;
  background: #ff9d24;
}
.boot-peng .bl::before,
.boot-peng .bl::after {
  content: "";
  position: absolute;
  top: 24px;
  width: 13px;
  height: 8px;
  border-radius: 50%;
  background: #ff9aa8;
}
.boot-peng .bl::before {
  left: 2px;
}
.boot-peng .bl::after {
  right: 2px;
}
.boot-peng .fl,
.boot-peng .fr {
  top: 116px;
  width: 26px;
  height: 11px;
  border-radius: 50%;
  background: #ff9620;
}
.boot-peng .fl {
  left: 24px;
}
.boot-peng .fr {
  left: 62px;
}
.boot-peng .pk {
  left: 30px;
  top: 0;
  width: 52px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(90deg, #d8a765 42%, #f2e1b8 42%, #f2e1b8 58%, #d8a765 58%);
  box-shadow: 0 3px 0 #a87a3c;
  animation: bootBox 0.62s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}
@keyframes pengWaddle {
  from {
    transform: rotate(-6deg);
  }
  to {
    transform: rotate(6deg);
  }
}
@keyframes bootBox {
  from {
    transform: rotate(9deg) translateX(3px);
  }
  to {
    transform: rotate(-9deg) translateX(-3px);
  }
}
@keyframes bootBlink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  96% {
    transform: scaleY(0.1);
  }
}
.fallback {
  position: absolute;
  inset: 0;
  z-index: 61;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: #eaf6ff;
  font: 500 16px var(--body);
}

/* ---------- 소개 글 ---------- */
.seo-about {
  background: rgba(255, 255, 255, 0.96);
  margin: 10px 12px 18px;
  border-radius: 18px;
}

/* ---------- 키가 작은 폰 ---------- */
@media (orientation: portrait) and (max-height: 700px) {
  .title-main {
    gap: 7px;
    padding-top: calc(max(8px, var(--sat)) + 40px);
    padding-bottom: 8px;
  }
  .title-gap {
    min-height: 30vh;
  }
  .logo .l1 {
    font-size: 40px;
  }
  .logo .l2 {
    font-size: 54px;
  }
  .toy-btn.play#start-btn {
    padding: 10px 18px 12px;
    font-size: 28px;
  }
  .round-btn {
    padding: 5px 2px;
  }
  .home-link {
    display: none;
  }
  .st {
    min-height: 64px;
  }
}

/* ---------- 폰 눕힘 · 넓은 화면 ---------- */
@media (orientation: landscape) and (max-height: 560px) {
  .title-main {
    padding-top: 8px;
    gap: 6px;
    align-items: flex-end;
    padding-right: 26px;
    padding-top: 6px;
  }
  body.pd #title .logo {
    margin-right: 46px;
  }
  body.pd #title h1.logo {
    align-items: flex-end;
  }
  .logo .l1 {
    font-size: 30px;
  }
  .logo .l2 {
    font-size: 42px;
  }
  .title-gap {
    min-height: 0;
  }
  .toy-btn.play#start-btn {
    width: 260px;
    font-size: 26px;
    padding: 9px 16px 11px;
  }
  .title-menu {
    width: 340px;
  }
  .round-btn {
    padding: 4px 2px;
  }
  .ic {
    width: 22px;
    height: 22px;
  }
  .home-link {
    display: none;
  }
  .worlds {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
  }
  .worlds .panel-head {
    width: 100%;
    padding-bottom: 2px;
  }
  .world-hero {
    width: 42%;
  }
  .world-text h2 {
    font-size: 24px;
  }
  .stage-sheet {
    width: 58%;
    margin: 0;
    border-radius: 22px 0 0 0;
    padding: 8px;
  }
  .stage-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .st {
    min-height: 58px;
    padding: 3px;
  }
  .world-lock {
    display: none !important;
  }
  .costume {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .costume .panel-head {
    width: 100%;
  }
  .costume-drag {
    width: 40%;
    flex: none;
    min-height: 0;
  }
  .costume-sheet {
    width: 60%;
    border-radius: 22px 0 0 0;
    overflow-y: auto;
    max-height: calc(100vh - 64px);
  }
  .res-card {
    margin: 4px 0 0 auto;
    width: min(390px, 56%);
    padding: 6px 12px 9px;
  }
  .res-card h2 {
    font-size: 22px;
  }
  .res-stars i {
    width: 34px;
    height: 34px;
  }
  .res-score b {
    font-size: 22px;
  }
  .res-card .toy-btn.play {
    padding: 8px;
    font-size: 17px;
    margin-top: 5px;
  }
  .res-btns {
    margin-top: 7px;
  }
  .res-btns .toy-btn {
    padding: 7px;
    font-size: 14px;
  }
  .fail-card {
    margin-top: 8vh;
  }
  .sheet {
    justify-content: flex-start;
  }
  .joy-zone {
    height: 72%;
    width: 44%;
  }
  .joy {
    top: calc(100% - 88px - var(--sab));
    left: 92px;
  }
  .tc-jump {
    width: 84px;
    height: 84px;
    bottom: 18px;
  }
  .tc-dash {
    width: 66px;
    height: 66px;
    right: 112px;
    bottom: 24px;
  }
  .tc-grab {
    right: 30px;
    bottom: 112px;
    width: 58px;
    height: 58px;
  }
  .banner {
    top: 22%;
  }
}
@media (min-width: 900px) and (min-height: 600px) {
  .stage-grid {
    max-width: 680px;
    grid-template-columns: repeat(5, 1fr);
  }
  .costume-list {
    grid-template-columns: repeat(5, 1fr);
  }
  .title-gap {
    min-height: 44vh;
  }
  .title-main {
    padding-top: 22px;
  }
  .res-card {
    margin-top: auto;
  }
  .sheet {
    justify-content: center;
    align-items: flex-end;
    padding-right: 7vw;
  }
  .rec-card,
  .records > .toy-btn,
  #rec-rank {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }
}
