/* 달까지 냥냥 - 스티커 다이어리 테마
   파란 천 표지 위에 링 다이어리를 펼치고, 방안지 속지에 게임을 붙이고 손글씨로 꾸민 모양이다. */

:root {
  --cover: #2747a8;
  --cover-dark: #1c3482;
  --stitch: #9fb6ff;
  --paper: #fbfcff;
  --grid: rgba(64, 104, 196, 0.13);
  --ink: #1b2547;
  --pencil: #4a536e;
  --red-pen: #d62f5f;
  --pink: #c41d63;
  --hl-pink: #ffc2dd;
  --hl-mint: #b4efd9;
  --hl-yellow: #ffec8a;
  --postit: #fff2a8;
  --night: #1b1840;
  --hand: 'Gaegu', 'Nanum Pen Script', cursive;
  --scribble: 'Nanum Pen Script', 'Gaegu', cursive;
  --slot-height: min(640px, calc(100svh - 240px));
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-color: var(--stitch) var(--cover-dark);
}

body {
  margin: 0;
  min-height: 100vh;
  /* 표지 천의 결: 가는 가로세로 줄을 겹친다 */
  background-color: var(--cover);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 5px);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 24px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: break-word;
  caret-color: var(--pink);
}

::selection {
  background: var(--hl-yellow);
  color: var(--ink);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

img {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 다이어리 틀 ---------- */

.diary {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 펼친 면 하나: 왼쪽 쪽, 가운데 링, 오른쪽 쪽 */
.spread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  padding: 14px;
  border-radius: 18px;
  /* 표지 가장자리 바느질 선 */
  outline: 2px dashed var(--stitch);
  outline-offset: -7px;
  background: var(--cover-dark);
  box-shadow: 0 22px 44px rgba(8, 16, 48, 0.45);
}

.page {
  position: relative;
  min-width: 0;
  padding: 40px 48px 48px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}

/* 가운데 쪽으로 갈수록 종이가 살짝 휘어 그늘이 진다 */
.page-left {
  border-radius: 8px 0 0 8px;
  box-shadow: inset -28px 0 32px -26px rgba(27, 37, 71, 0.35);
}

.page-right {
  border-radius: 0 8px 8px 0;
  box-shadow: inset 28px 0 32px -26px rgba(27, 37, 71, 0.35);
}

.rings {
  background-color: #d9deea;
  background-image: url("rings.svg");
  background-repeat: repeat-y;
  background-size: 56px 64px;
  background-position: center 24px;
  box-shadow: inset 0 0 14px rgba(27, 37, 71, 0.45);
}

/* ---------- 손글씨 공통 ---------- */

h1,
h2,
h3 {
  font-family: var(--hand);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  font-size: 40px;
  margin-bottom: 14px;
}

/* 형광펜으로 그은 듯 글자 아래쪽 절반만 칠한다 */
.marker {
  padding: 0 0.18em;
  background-image: linear-gradient(transparent 52%, var(--hl-pink) 52%, var(--hl-pink) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.marker-mint {
  background-image: linear-gradient(transparent 52%, var(--hl-mint) 52%, var(--hl-mint) 92%, transparent 92%);
}

.marker-yellow {
  background-image: linear-gradient(transparent 52%, var(--hl-yellow) 52%, var(--hl-yellow) 92%, transparent 92%);
}

.handwriting {
  max-width: 30ch;
  font-size: 28px;
  line-height: 1.55;
}

.handwriting + .handwriting {
  margin-top: 6px;
}

/* 스티커: 흰 테두리 아래로 그림자가 살짝 진다 */
.sticker {
  filter: drop-shadow(0 3px 3px rgba(27, 37, 71, 0.28));
}

.tape {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(27, 37, 71, 0.15));
}

/* ---------- 첫째 쪽: 제목과 게임 ---------- */

#game-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 40px;
}

h1 {
  font-size: 76px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h1 .marker {
  color: var(--pink);
  background-image: linear-gradient(transparent 58%, var(--hl-pink) 58%, var(--hl-pink) 90%, transparent 90%);
  animation: marker-swipe 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.sticker-moon {
  width: 76px;
  height: 76px;
  transform: rotate(14deg);
  margin-top: -6px;
}

.game-row {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

/* 게임 화면을 인화한 사진처럼 흰 테두리로 감싼다 */
.photo {
  position: relative;
  flex: none;
  padding: 12px 12px 14px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow:
    0 2px 3px rgba(27, 37, 71, 0.16),
    0 14px 26px rgba(27, 37, 71, 0.2);
}

.tape-top-left {
  top: -14px;
  left: -34px;
  transform: rotate(-32deg);
}

.tape-top-right {
  top: -12px;
  right: -36px;
  transform: rotate(28deg);
}

/* 게임 자리: 세로 9:16. 시작 전에는 게임의 밤하늘을 그려 둔다. */
#game-slot {
  position: relative;
  width: calc(var(--slot-height) * 9 / 16);
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  border-radius: 2px;
  background-color: var(--night);
  background-image:
    radial-gradient(circle at 18% 14%, #ffffff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 72% 22%, #ffe79a 0 2px, transparent 3px),
    radial-gradient(circle at 40% 36%, #ffffff 0 1px, transparent 2px),
    radial-gradient(circle at 84% 48%, #ffffff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 12% 62%, #ffe79a 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 60% 74%, #ffffff 0 1px, transparent 2px),
    radial-gradient(circle at 30% 88%, #ffffff 0 1.5px, transparent 2.5px),
    linear-gradient(180deg, #14123a 0%, #2b2468 70%, #43307e 100%);
}

/* 게임 화면은 게임 자리를 꽉 채운다.
   손가락 동작은 canvas 안에서만 게임이 받고, 페이지의 스크롤과 확대는 그대로 둔다. */
#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* 시작 단추와 안내 문구를 canvas 위에 놓는다 */
#game-start,
#game-status {
  position: relative;
}

/* 시작 단추: 둥근 분홍 스티커 */
#game-start {
  width: 132px;
  height: 132px;
  border: 6px solid #ffffff;
  border-radius: 50%;
  background: #ff8fc4;
  color: #2a0b1d;
  font-family: var(--hand);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  word-break: keep-all;
  cursor: pointer;
  transform: rotate(-8deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#game-start:hover {
  transform: rotate(-3deg) scale(1.05);
}

#game-start:focus-visible {
  outline: 4px solid var(--hl-yellow);
  outline-offset: 5px;
}

.slot-label {
  padding: 12px 18px;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  background: rgba(20, 18, 58, 0.8);
  color: #ffffff;
  font-size: 22px;
  text-align: center;
}

/* 사진 옆 낙서와 스티커 */
.doodles {
  position: relative;
  flex: 1;
  min-width: 150px;
  min-height: var(--slot-height);
}

.scribble {
  margin-top: 96px;
  font-family: var(--scribble);
  font-size: 40px;
  line-height: 1.05;
  color: var(--red-pen);
  transform: rotate(-6deg);
}

.doodle-arrow {
  margin: 6px 0 0 -24px;
  width: 118px;
  height: auto;
}

.sticker-cat {
  position: absolute;
  left: 4px;
  bottom: 140px;
  width: 132px;
  height: auto;
  transform: rotate(-10deg);
}

.sticker-cloud {
  position: absolute;
  right: 0;
  bottom: 24px;
  width: 112px;
  height: auto;
  transform: rotate(6deg);
}

/* ---------- 둘째 쪽: 소개, 조작법, 게임 정보 ---------- */

#game-about {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.postit {
  position: relative;
  align-self: flex-start;
  max-width: 440px;
  padding: 30px 30px 26px;
  background: var(--postit);
  transform: rotate(1.6deg);
  box-shadow:
    0 1px 2px rgba(27, 37, 71, 0.14),
    0 12px 18px -8px rgba(27, 37, 71, 0.28);
}

.postit h2 {
  margin-bottom: 12px;
}

.tape-postit {
  top: -13px;
  left: 50%;
  margin-left: -48px;
  transform: rotate(-3deg);
}

.controls {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.controls li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.keys {
  display: flex;
  gap: 6px;
  flex: none;
  min-width: 92px;
}

/* 키보드 자판 모양 */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 0 -1px var(--ink), 0 4px 6px rgba(27, 37, 71, 0.18);
}

kbd svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-key {
  width: 42px;
}

/* 다이어리에 인쇄된 정보 칸. 글자는 손으로 채웠다. */
.profile {
  max-width: 460px;
  padding: 22px 26px 18px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #ffffff;
}

.info div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 2px dotted rgba(27, 37, 71, 0.35);
}

.info div:last-child {
  border-bottom: 0;
}

.info dt {
  flex: none;
  width: 110px;
  font-size: 23px;
  color: var(--pencil);
}

.info dd {
  font-size: 30px;
  font-weight: 700;
  color: #2747a8;
}

/* ---------- 점수판 ---------- */

#scoreboard {
  display: flex;
  flex-direction: column;
}

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.board-head h2 {
  margin-bottom: 0;
}

.board-note {
  font-family: var(--scribble);
  font-size: 32px;
  color: var(--red-pen);
  transform: rotate(-3deg);
}

.scores {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.scores li {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 2px 6px;
  border-bottom: 2px dotted rgba(27, 37, 71, 0.28);
}

.scores .rank {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--pencil);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  color: var(--pencil);
}

/* 1, 2, 3등은 금, 은, 동 별 스티커를 붙인다 */
.scores .first .rank,
.scores .second .rank,
.scores .third .rank {
  width: 50px;
  height: 50px;
  border: 0;
  background: center / contain no-repeat;
  color: var(--ink);
  font-size: 19px;
  padding-top: 4px;
  filter: drop-shadow(0 2px 2px rgba(27, 37, 71, 0.25));
}

.scores .first .rank {
  background-image: url("star-gold.svg");
}

.scores .second .rank {
  background-image: url("star-silver.svg");
}

.scores .third .rank {
  background-image: url("star-bronze.svg");
}

.scores .name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.scores .points {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.scores .first .name,
.scores .first .points {
  color: var(--pink);
}

/* 방금 올린 줄은 노란 형광펜으로 긋는다 */
.scores li.just-added {
  background-image: linear-gradient(transparent 18%, var(--hl-yellow) 18%, var(--hl-yellow) 86%, transparent 86%);
  background-repeat: no-repeat;
  animation: marker-swipe 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.scores li.soft {
  display: block;
  padding: 16px 6px;
  color: var(--pencil);
  border-bottom: 0;
}

/* 점수 올리는 방법을 적은 작은 메모 */
.memo {
  position: relative;
  align-self: flex-start;
  margin-top: 32px;
  padding: 18px 22px 18px 26px;
  max-width: 380px;
  background: #e4f7ef;
  border: 2px dashed #3a8f72;
  border-radius: 10px;
  transform: rotate(-1.2deg);
}

.memo h3 {
  font-size: 29px;
  margin-bottom: 4px;
}

.memo p {
  font-size: 25px;
}

.sticker-star {
  position: absolute;
  top: -20px;
  right: -16px;
  transform: rotate(14deg);
}

/* ---------- 댓글 ---------- */

#game-comments h2 {
  margin-bottom: 18px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.field label {
  font-size: 24px;
  font-weight: 700;
  color: var(--pencil);
}

/* 입력 칸은 다이어리에 그어 둔 줄이다 */
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 6px 4px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 26px;
  line-height: 36px;
}

.field textarea {
  resize: vertical;
  /* 여러 줄 칸은 줄 공책처럼 줄을 긋는다 */
  background-image: repeating-linear-gradient(transparent 0 34px, rgba(27, 37, 71, 0.28) 34px 36px);
  background-position: 0 6px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5b6480;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 4px;
  border-radius: 4px;
}

/* 댓글 붙이기: 민트색 라벨 스티커 */
#comment-submit {
  align-self: flex-start;
  min-height: 52px;
  padding: 0 28px;
  border: 3px solid #ffffff;
  border-radius: 14px;
  background: #8fe3c8;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 3px rgba(27, 37, 71, 0.2), 0 8px 14px rgba(27, 37, 71, 0.18);
  transform: rotate(-1.5deg);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#comment-submit:hover {
  transform: rotate(0deg) translateY(-2px);
}

#comment-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

#comment-message {
  font-family: var(--scribble);
  font-size: 28px;
  color: var(--red-pen);
}

/* 댓글 하나하나가 테이프로 붙인 메모지이다 */
.comments {
  list-style: none;
  padding: 0;
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 26px 22px;
}

.comments li {
  position: relative;
  flex: 1 1 220px;
  max-width: 300px;
  padding: 22px 20px 18px;
  background: #ffe0ee;
  box-shadow: 0 1px 2px rgba(27, 37, 71, 0.14), 0 10px 14px -8px rgba(27, 37, 71, 0.28);
  transform: rotate(-1.5deg);
}

.comments li::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 72px;
  height: 22px;
  margin-left: -36px;
  background: url("tape-yellow.svg") center / 100% 100% no-repeat;
}

.comments li:nth-child(3n + 2) {
  background: #dcf5ea;
  transform: rotate(1.2deg);
}

.comments li:nth-child(3n + 2)::before {
  background-image: url("tape-pink.svg");
}

.comments li:nth-child(3n) {
  background: #e3e9ff;
  transform: rotate(-0.6deg);
}

.comments li:nth-child(3n)::before {
  background-image: url("tape-mint.svg");
}

.comment-nickname {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #2747a8;
}

.comment-text {
  font-size: 25px;
  overflow-wrap: anywhere;
}

/* 닉네임 없이 글만 있는 줄은 아직 붙이지 않은 빈 메모지처럼 보인다 */
.comments li:not(:has(.comment-nickname)) {
  background: transparent;
  border: 2px dashed rgba(27, 37, 71, 0.4);
  box-shadow: none;
  color: var(--pencil);
}

.comments li:not(:has(.comment-nickname))::before {
  display: none;
}

.comments li.soft {
  flex-basis: 100%;
  max-width: none;
  padding: 8px 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: var(--pencil);
}

.comments li.soft::before {
  display: none;
}

/* ---------- 이니셜 창 ---------- */

#initials-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 34px 26px 26px;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--hand);
  text-align: center;
  box-shadow: 0 24px 48px rgba(8, 16, 48, 0.5);
}

#initials-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#initials-dialog::backdrop {
  background: rgba(16, 28, 74, 0.72);
}

.tape-dialog {
  top: -16px;
  left: 50%;
  margin-left: -65px;
  transform: rotate(-4deg);
}

#initials-dialog h2 {
  font-size: 36px;
  margin: 0;
}

.dialog-help {
  font-size: 24px;
  color: var(--pencil);
}

.initials-slots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 4px 0;
}

.initial-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* 알파벳 한 글자를 동그란 글자 스티커로 보인다 */
.initial-letter {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 5px #ffffff, 0 4px 10px rgba(27, 37, 71, 0.3);
  transition: background-color 0.2s ease-out;
}

.initial-slot.active .initial-letter {
  background: var(--hl-pink);
  border-color: var(--pink);
}

.initial-step {
  display: grid;
  place-items: center;
  width: 52px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.initial-step svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.initial-step:hover {
  background: var(--postit);
}

#initials-message {
  font-family: var(--scribble);
  font-size: 26px;
  color: var(--red-pen);
}

.initials-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

#initials-cancel,
#initials-confirm {
  min-width: 112px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  font-family: var(--hand);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
}

#initials-confirm {
  border: 3px solid #ffffff;
  background: #ff8fc4;
  color: #2a0b1d;
  box-shadow: 0 2px 3px rgba(27, 37, 71, 0.2), 0 8px 14px rgba(27, 37, 71, 0.2);
}

#initials-cancel {
  border: 2px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
}

#initials-confirm:disabled,
#initials-cancel:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 키보드 초점은 분홍 펜 테두리로 보인다 */
#comment-submit:focus-visible,
.initial-step:focus-visible,
#initials-cancel:focus-visible,
#initials-confirm:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

#game-canvas:focus-visible {
  outline: 3px solid var(--hl-yellow);
  outline-offset: -3px;
}

/* 형광펜을 왼쪽에서 오른쪽으로 긋는 움직임 */
@keyframes marker-swipe {
  from {
    background-size: 0% 100%;
  }
  to {
    background-size: 100% 100%;
  }
}

/* ---------- 좁은 화면 ---------- */

/* 태블릿: 첫째 면의 낙서 칸을 줄인다 */
@media (max-width: 1100px) {
  .page {
    padding: 36px 32px 40px;
  }

  h1 {
    font-size: 64px;
  }

  .doodles {
    min-width: 110px;
  }
}

/* 휴대폰과 좁은 창: 쪽을 위아래로 쌓고, 링은 두 쪽 사이에 가로로 놓는다 */
@media (max-width: 860px) {
  :root {
    --slot-height: min(560px, calc(100svh - 230px));
  }

  body {
    font-size: 22px;
  }

  .diary {
    padding: 10px 10px 32px;
    gap: 22px;
  }

  .spread {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
    border-radius: 14px;
    outline-offset: -5px;
  }

  .page {
    padding: 22px 18px 30px;
  }

  .page-left {
    border-radius: 8px 8px 0 0;
    box-shadow: inset 0 -24px 28px -24px rgba(27, 37, 71, 0.35);
  }

  .page-right {
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 24px 28px -24px rgba(27, 37, 71, 0.35);
  }

  .rings {
    height: 44px;
    background-image: url("rings-h.svg");
    background-repeat: repeat-x;
    background-size: 56px 44px;
    background-position: 14px center;
  }

  #game-banner {
    margin-bottom: 14px;
  }

  h1 {
    font-size: 50px;
  }

  .sticker-moon {
    width: 54px;
    height: 54px;
  }

  h2 {
    font-size: 30px;
  }

  .game-row {
    justify-content: center;
  }

  .photo {
    padding: 9px 9px 11px;
  }

  #game-slot {
    /* 휴대폰 너비 안에 들어오도록 너비로도 막는다 */
    width: min(calc(var(--slot-height) * 9 / 16), calc(100vw - 92px));
  }

  .tape-top-left {
    left: -22px;
    width: 84px;
    height: 24px;
  }

  .tape-top-right {
    right: -22px;
    width: 84px;
    height: 24px;
  }

  /* 낙서는 사진 오른쪽 아래 귀퉁이에 고양이 스티커만 남긴다 */
  .doodles {
    position: absolute;
    right: 6px;
    bottom: 14px;
    min-width: 0;
    min-height: 0;
    flex: none;
    pointer-events: none;
  }

  .game-page {
    position: relative;
  }

  .scribble,
  .doodle-arrow,
  .sticker-cloud {
    display: none;
  }

  .sticker-cat {
    position: static;
    width: 76px;
  }

  #game-about {
    gap: 30px;
  }

  .handwriting {
    font-size: 25px;
  }

  .postit {
    padding: 26px 20px 20px;
    transform: rotate(1deg);
  }

  .controls li {
    align-items: flex-start;
  }

  .keys {
    min-width: 0;
  }

  .profile {
    padding: 16px 18px 12px;
  }

  .info dt {
    width: 96px;
    white-space: nowrap;
  }

  .scores li {
    grid-template-columns: 46px 1fr auto;
    gap: 10px;
  }

  .scores .name {
    font-size: 25px;
  }

  .scores .points {
    font-size: 24px;
  }

  .comments li {
    flex-basis: 100%;
    max-width: none;
  }
}

/* 움직임을 줄여 달라고 한 사용자에게는 형광펜과 단추 움직임을 끈다 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
