:root {
  --ink: #24143a;
  --ink-soft: rgba(36, 20, 58, 0.62);
  --accent: #ff3ea5;
  --accent-dark: #8a1f5c;
  --panel: #fffaf3;
  --font: "Jua", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  --kitsch-font: "Black Han Sans", "Jua", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; height: 100%; background: #06061f; }
body {
  font-family: var(--font);
  color: #fff;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }

/* ───────── 밤하늘 ───────── */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 118%, rgba(128, 56, 160, 0.6) 0%, rgba(128, 56, 160, 0) 60%),
    linear-gradient(180deg, #04041a 0%, #10103a 48%, #2b1652 100%);
}
.sky::before, .sky::after {
  content: "";
  position: absolute;
  inset: -30%;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 48% 14%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 78% 30%, #fff 60%, transparent 62%),
    radial-gradient(1.8px 1.8px at 32% 58%, #ffe9b0 60%, transparent 62%),
    radial-gradient(1px 1px at 64% 72%, #fff 60%, transparent 62%),
    radial-gradient(1.3px 1.3px at 90% 84%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 8% 88%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 56% 44%, #cfe8ff 60%, transparent 62%);
  background-size: 280px 280px;
  opacity: 0.85;
  animation: twinkle 3.4s ease-in-out infinite;
}
.sky::after {
  background-size: 360px 360px;
  transform: rotate(14deg);
  opacity: 0.55;
  animation-duration: 5.1s;
  animation-delay: -2.2s;
}
@keyframes twinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.95; } }

/* ───────── 무대 ───────── */
/* 3D 캔버스가 무대 전체를 덮고, 배지·인사말은 그 위에 얹는다(칸을 나누면 달이 잘린다). */
.stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
}
.stage-3d {
  position: absolute;
  inset: 0;
  touch-action: manipulation;
  cursor: pointer;
}

.head {
  position: absolute;
  left: 0; right: 0; top: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: calc(env(safe-area-inset-top) + 18px) 12px 0;
  pointer-events: none;
}
body[data-mode="make"] .head { padding-top: calc(env(safe-area-inset-top) + 22px); }
.message-wrap {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 34px;
  visibility: hidden;
}
/* 인트로(달을 올려다보는 동안) 맨 위에 뜨는 한 줄: "우리가족달로부터 편지가 도착했어요." */
.letter {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.94);
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(6px);
  animation: letter-in 0.7s cubic-bezier(0.2, 1, 0.3, 1) both;
}
@keyframes letter-in { from { opacity: 0; translate: 0 -10px; } to { opacity: 1; translate: 0 0; } }
/* 만들기 화면: 달 이름 아래 내 인사말(받는 화면에선 이 글이 밤하늘을 타고 흘러내린다) */
.preview-note {
  margin: 0;
  max-width: 100%;
  font-size: 14.5px;
  line-height: 1.4;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  word-break: keep-all;
  text-shadow: 0 0 5px rgba(10, 4, 26, 0.95), 0 1px 2px rgba(10, 4, 26, 0.9), 0 3px 14px rgba(0, 0, 0, 0.7);
}
body[data-mode="view"] .preview-note { display: none; }
/* 보낸 사람 서명: 큰 인사말 바로 아래 */
.signature {
  font-weight: 400;
  font-size: clamp(16px, 4.2vw, 26px);
  color: #ffd9a3;
  text-shadow: 0 0 5px rgba(10, 4, 26, 0.95), 0 1px 2px rgba(10, 4, 26, 0.9), 0 3px 14px rgba(0, 0, 0, 0.7);
  animation: pop 0.5s cubic-bezier(0.2, 1.9, 0.35, 1) both;
  animation-delay: 0.45s;
}
body[data-mode="make"] .signature { font-size: clamp(14px, 3.4vw, 20px); }
.message-wrap.show { visibility: visible; }
.message-wrap.show::before, .message-wrap.show::after {
  content: "✨";
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  font-size: 26px;
  animation: twinkle 1.1s ease-in-out infinite;
}
.message-wrap.show::before { left: 0; }
.message-wrap.show::after { right: 0; animation-delay: -0.5s; }

.train {
  display: flex;
  justify-content: center;
}
.train-badge {
  /* 배지는 둥근 본문 글꼴 대신 모던한 산세리프로 — 장식 없이 정보만 전한다 */
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(6px);
}
body[data-mode="make"] .train, body[data-mode="make"] .notes { display: none; }

/* ───────── 롤링페이퍼: 앞서 달린 인사가 밤하늘을 타고 흘러내린다 ───────── */
/* 종이·배경 없이 글씨만. 위에서 나타나 아래로 다 내려가면 다시 위에서 시작한다. */
.notes {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}
.note {
  position: absolute;
  top: 0;
  left: var(--l, auto);
  right: var(--r, auto);
  width: max-content;
  max-width: 44vw;
  margin: 0;
  text-align: var(--align);
  animation: note-fall var(--d) linear infinite;
  animation-delay: var(--delay);
}
.note-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.42;
  color: #fff;
  word-break: keep-all;
  /* 밝은 달 위를 지나가도 읽히게 글자에 어두운 후광을 두른다 */
  text-shadow: 0 0 5px rgba(10, 4, 26, 0.95), 0 1px 2px rgba(10, 4, 26, 0.9), 0 3px 14px rgba(0, 0, 0, 0.7);
}
.note-name {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: #ffd9a3;
  text-shadow: 0 0 5px rgba(10, 4, 26, 0.95), 0 1px 2px rgba(10, 4, 26, 0.9), 0 3px 14px rgba(0, 0, 0, 0.7);
}
/* 강강술래(9명 이상): 인사말이 칸을 골라 나타났다 사라진다 */
.pop-note {
  position: absolute;
  top: var(--y);
  left: var(--l, auto);
  right: var(--r, auto);
  width: max-content;
  max-width: 44vw;
  margin: 0;
  text-align: left;
  animation: note-pop var(--d) ease-in-out both;
}
.pop-note.center { left: 50%; translate: -50% 0; text-align: center; }
.pop-note.right { text-align: right; }
@keyframes note-pop {
  0% { opacity: 0; transform: translateY(8px); }
  12%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-6px); }
}
/* 인사말이 뜨는 구간은 타이틀 아래 ~ 안내 문구 위. 끝까지 내려가면 다시 위에서 시작한다. */
@keyframes note-fall {
  0% { translate: 0 -12dvh; opacity: 0; }
  20%, 72% { opacity: 1; }
  85% { opacity: 0; }
  100% { translate: 0 108dvh; opacity: 0; }
}
.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ───────── 키치 인사말 ───────── */
.kitsch {
  font-family: var(--kitsch-font);
  font-weight: 400;
  font-size: clamp(30px, 8.6vw, 60px);
  line-height: 1.12;
  text-align: center;
  margin: 0;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.35));
  animation: hue 7s linear infinite;
}
body[data-mode="make"] .kitsch { font-size: clamp(22px, 6.2vw, 40px); }
.kitsch .w { display: inline-block; white-space: nowrap; margin: 0 0.14em; }
.kitsch .w.long { white-space: normal; word-break: break-all; }
.kitsch .c {
  display: inline-block;
  color: hsl(var(--h) 100% 64%);
  -webkit-text-stroke: 1.5px #2a0f3a;
  text-shadow: 3px 3px 0 #ff3ea5, 6px 6px 0 #1e0a2e;
  transform-origin: 50% 100%;
  animation: pop 0.62s cubic-bezier(0.2, 1.9, 0.35, 1) both, wave 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 65ms), calc(var(--i) * -110ms);
}
.kitsch.jiggle .c {
  animation: jiggle 0.45s ease-out both, wave 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 12ms), calc(var(--i) * -110ms);
}
@keyframes pop { from { transform: scale(0) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes jiggle { 0% { transform: scale(1.35) rotate(8deg); } 100% { transform: none; } }
@keyframes wave { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -8px; rotate: 3deg; } }
@keyframes hue { to { filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.35)) hue-rotate(360deg); } }

/* ───────── 떨어지는 장식 · 터치 폭죽 ───────── */
.deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.drop {
  position: absolute;
  top: -12%;
  left: var(--x);
  font-size: var(--s);
  opacity: 0.85;
  animation: fall var(--d) linear infinite;
  animation-delay: var(--delay);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
@keyframes fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(26px, 60vh, 0) rotate(180deg); }
  100% { transform: translate3d(-18px, 125vh, 0) rotate(360deg); }
}
.burst {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: 26px;
  pointer-events: none;
  z-index: 3;
  animation: burst 0.9s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}
@keyframes burst {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25) rotate(var(--r)); opacity: 0; }
}

/* ───────── 받은 화면 버튼 ───────── */
.tap-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  pointer-events: none;
  z-index: 5;
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.view-actions {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 0 12px;
  z-index: 5;
}
/* 나도 달에 들어가기 / 새로운 달 생성하기 — 장식 없는 모던 버튼 */
.action {
  flex: 1 1 0;
  min-width: 0;
  max-width: 230px;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding: 14px 10px;
  border-radius: 14px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  transition: transform 0.12s ease, background 0.12s ease;
}
.action:active { transform: translateY(1px); background: rgba(255, 255, 255, 0.2); }
.action.primary {
  color: #14122a;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.action.primary:active { background: #ece9ff; }
.ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 16px;
  backdrop-filter: blur(6px);
}
.ghost.small { padding: 8px 12px; font-size: 14px; }
.panel .ghost { color: var(--ink); border-color: rgba(36, 20, 58, 0.25); background: rgba(36, 20, 58, 0.06); }

.notice {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 24px;
  font-size: 17px;
  line-height: 1.5;
  background: rgba(6, 6, 31, 0.55);
}
.notice h2 { margin: 0; font-size: 22px; font-weight: 400; }
.notice p { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 15px; }
.notice .action { margin-top: 10px; flex: none; min-width: 200px; }

/* ───────── 만들기 패널 ───────── */
.panel {
  position: relative;
  z-index: 2;
  flex: none;
  max-height: 56dvh;
  overflow-y: auto;
  background: var(--panel);
  color: var(--ink);
  border-radius: 22px 22px 0 0;
  padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}
.panel-head h2 { margin: 0; font-size: 20px; font-weight: 400; }
.panel-head p { margin: 2px 0 10px; color: var(--ink-soft); font-size: 14px; }
.join-note {
  margin: 0 0 10px !important;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff1f7;
  color: var(--ink) !important;
  font-size: 13.5px !important;
  line-height: 1.5;
}
.join-note a { color: var(--accent); }
.row { margin: 12px 0; }
.face-row { display: flex; gap: 14px; align-items: center; }
.face-btn {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px dashed rgba(36, 20, 58, 0.35);
  background: #f2c7a8;
  padding: 0;
}
.face-btn canvas { width: 100%; height: 100%; border-radius: 50%; display: block; }
.face-btn.has-face { border-style: solid; border-color: var(--accent); }
.face-badge {
  position: absolute;
  right: -4px; bottom: -4px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.face-badge svg { display: block; }
.moon-field { display: flex; align-items: center; gap: 8px; }
.moon-field input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(36, 20, 58, 0.18);
  background: #fff;
  font-size: 18px;
  color: var(--ink);
  outline: none;
}
.moon-field input:focus { border-color: var(--accent); }
.moon-suffix { flex: none; font-size: 18px; color: var(--ink); }
.face-copy { min-width: 0; }
.face-copy strong { display: block; font-size: 16px; font-weight: 400; }
.hint { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.link-btn { background: none; border: 0; padding: 4px 0 0; color: var(--accent); font-size: 13px; text-decoration: underline; }
.link-btn.center { display: block; margin: 6px auto 0; padding: 6px 0; font-size: 13.5px; }
.field-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; }
#textInput {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(36, 20, 58, 0.18);
  background: #fff;
  font-size: 18px;
  color: var(--ink);
  outline: none;
}
#textInput:focus { border-color: var(--accent); }
/* 달 이름 · 이름표 · 인사말은 각각 한 줄씩(사용자 요청) */
#nameInput {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(36, 20, 58, 0.18);
  background: #fff;
  font-size: 18px;
  color: var(--ink);
  outline: none;
}
#nameInput:focus { border-color: var(--accent); }
#nameInput::placeholder, #textInput::placeholder, .moon-field input::placeholder { color: rgba(36, 20, 58, 0.34); font-size: 15px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 6px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: rgba(36, 20, 58, 0.06);
  color: var(--ink);
  font-size: 14px;
}
.chip[aria-checked="true"] { border-color: var(--accent); background: #fff; }
.chip .sw {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: conic-gradient(var(--c1) 0 33%, var(--c2) 0 66%, var(--c3) 0);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.chip .sw.rainbow { background: conic-gradient(#ff6464, #ffe36e, #a6ec6a, #6de8c9, #8fd3ff, #c19bff, #ff7cc0, #ff6464); }
.actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; margin-top: 16px; }
.actions.stack { grid-template-columns: 1fr; }
.actions.compose { grid-template-columns: 1fr 1.5fr; }
.actions.compose .secondary { padding: 15px 10px; font-size: 16px; white-space: nowrap; }
.kakao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fee500;
  color: #191919;
  border: 0;
  padding: 15px 16px;
  border-radius: 16px;
  font-size: 18px;
  box-shadow: 0 5px 0 #c9b400;
}
.kakao:active { transform: translateY(3px); box-shadow: 0 2px 0 #c9b400; }
.kakao[disabled] { opacity: 0.6; }
.kakao-mark {
  width: 22px; height: 20px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: #191919;
  position: relative;
}
.kakao-mark::after {
  content: "";
  position: absolute;
  left: 4px; bottom: -3px;
  border: 5px solid transparent;
  border-top: 7px solid #191919;
  border-left-width: 2px;
}
.primary { font-size: 16.5px; }
.primary {
  background: linear-gradient(135deg, #ff3ea5, #ff8a3d);
  color: #fff;
  border: 0;
  padding: 15px 16px;
  border-radius: 16px;
  font-size: 18px;
  box-shadow: 0 5px 0 var(--accent-dark);
}
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-dark); }
.primary[disabled] { opacity: 0.6; }
.secondary {
  background: #fff;
  color: var(--ink);
  border: 2px solid rgba(36, 20, 58, 0.18);
  padding: 15px 16px;
  border-radius: 16px;
  font-size: 17px;
}
.fine { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); line-height: 1.5; text-align: center; }

/* ───────── 공유 시트: 카카오톡 · 다른 앱 · 링크 복사 ───────── */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(6, 6, 31, 0.62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-card {
  width: min(100%, 440px);
  background: var(--panel);
  color: var(--ink);
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(env(safe-area-inset-bottom) + 14px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  animation: sheet-in 0.25s ease-out;
}
.sheet-card h3 { margin: 0; font-size: 19px; font-weight: 400; }
.sheet-sub { margin: -4px 0 4px; font-size: 13.5px; color: var(--ink-soft); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ───────── 얼굴 자르기 ───────── */
.crop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(6, 6, 31, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.crop-sheet { width: min(100%, 380px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.crop-title { margin: 0; font-size: 17px; }
.crop-view {
  position: relative;
  width: min(82vw, 320px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.crop-view canvas { width: 100%; height: 100%; display: block; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; }
.crop-mask::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 88%; height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(6, 6, 31, 0.64);
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.crop-zoom { display: flex; align-items: center; gap: 10px; width: min(82vw, 320px); }
.crop-zoom input { flex: 1; accent-color: var(--accent); }
.crop-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; width: min(82vw, 320px); }
.crop .secondary { color: #fff; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }

/* ───────── 토스트 ───────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 24px);
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: #fff;
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.25s ease-out;
}
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

body[data-still="1"] .tap-hint, body[data-still="1"] .view-actions, body[data-still="1"] .deco { display: none !important; }

/* ───────── 넓은 화면: 패널을 오른쪽 기둥으로 ───────── */
@media (min-width: 900px) {
  .sheet { align-items: center; }
  .sheet-card { border-radius: 22px; }
  body[data-mode="make"] { flex-direction: row; }
  body[data-mode="make"] .panel {
    width: 400px;
    max-height: none;
    height: 100%;
    border-radius: 0;
    padding-top: 26px;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  }
  body[data-mode="make"] .kitsch { font-size: clamp(28px, 3.4vw, 52px); }
  .note, .pop-note { max-width: 320px; }
  .note-text { font-size: 17px; }
  .note-name { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .drop, .kitsch .c, .kitsch, .tap-hint { animation-duration: 0.01s !important; animation-iteration-count: 1 !important; }
  /* 움직임을 줄인 기기에선 흘러내리지 않고 제자리에 펼쳐 둔다 */
  .note { animation: none; opacity: 1; top: var(--rest); }
  .pop-note { animation: none; opacity: 1; }
}
