@charset "UTF-8";
:root {
  --paper: #f6f3ec;
  --ink: #253f34;
  --muted: #5d7064;
  --wine: #873e42;
  --line: #dcded3;
  --serif: "Noto Serif KR", Georgia, serif;
  --sans:
    "Hyerok Sans", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: #122c34;
  font-synthesis: none;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
canvas:focus-visible {
  outline: 3px solid #d3b572;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
button {
  color: inherit;
}
button svg {
  pointer-events: none;
}
.full {
  width: 100%;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.5px;
  font-weight: 700;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
}
.button-primary {
  background: #315446;
  color: #fff8e8;
}
.button-primary:hover {
  background: #254236;
}
.button-outline {
  background: transparent;
  border-color: #cbd3c4;
}
.button-small {
  min-height: 44px;
  padding: 10px 15px;
}
.text-button {
  border: 0;
  background: transparent;
  font-size: 12px;
  padding: 10px 0;
  min-width: 44px;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hud-button,
.hud-square {
  border: 1px solid #ffffff35;
  background: #f9f5e9ed;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 20px #081b2520;
}
.hud-square {
  width: 44px;
  padding: 0;
  font-size: 21px;
}
.accent {
  background: #e7be74;
  color: #28382f;
  border-color: #e7be74;
}
.world-shell {
  height: 100svh;
  height: 100dvh;
  min-height: min(400px, 100dvh);
  position: relative;
  overflow: hidden;
  background: #182f3a;
}
.world-stage {
  position: absolute;
  inset: 0;
}
.world-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
.world-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  pointer-events: none;
  color: #fff9e9;
  background: linear-gradient(#102a3e55, transparent);
}
.world-header > * {
  pointer-events: auto;
}
.world-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  letter-spacing: 1.7px;
  font-weight: 800;
  text-shadow: 0 2px 10px #123b4b;
}
.brand-icon {
  font-size: 42px;
  line-height: 1;
  font-weight: 400;
  color: #f1cc8b;
}
.world-brand small {
  display: block;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 2px;
  margin-top: 4px;
}
.header-actions {
  display: flex;
  gap: 10px;
}
.room-card {
  position: absolute;
  top: 109px;
  left: 32px;
  max-width: 320px;
  padding: 18px 20px;
  background: #102c3bd6;
  border: 1px solid #d8e7e224;
  backdrop-filter: blur(14px);
  color: #fff9e9;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 8px 40px #05213224;
}
.room-kicker {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  color: #bad3ca;
  margin-bottom: 10px;
}
.live-dot {
  width: 6px;
  height: 6px;
  background: #c5b28b;
  border-radius: 50%;
}
.live-dot.connected {
  background: #a0db9e;
  box-shadow: 0 0 8px #b4e2ab88;
}
.room-card h1 {
  font-size: 19px;
  margin: 0 0 7px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.room-card > p {
  font-size: 11px;
  line-height: 1.7;
  margin: 0 0 12px;
  color: #cfdbd3;
  overflow-wrap: anywhere;
}
.room-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: #cfdbd3;
}
.room-meta button {
  background: none;
  color: inherit;
  border: 0;
  min-height: 44px;
  min-width: 32px;
  padding: 0;
  pointer-events: auto;
}
.room-meta button:last-child {
  font-size: 16px;
}
.welcome-panel {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translateY(-40%);
  width: 360px;
  padding: 32px;
  border: 1px solid #ffffff42;
  border-radius: 22px;
  color: #fff9e9;
  background: linear-gradient(145deg, #183a46ef, #1c3e43d6);
  backdrop-filter: blur(16px);
  box-shadow: 0 25px 80px #08272b55;
}
.welcome-panel .eyebrow {
  color: #e5c68c;
  font-size: 9px;
  letter-spacing: 2px;
  margin-bottom: 19px;
}
.welcome-panel h2 {
  font: 500 35px/1.55 var(--serif);
  letter-spacing: -1.5px;
  margin: 0 0 17px;
  word-break: keep-all;
}
.welcome-panel > p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.9;
  color: #d1dfd6;
  margin-bottom: 27px;
}
.welcome-panel .button {
  background: #eacb94;
  color: #243c34;
  justify-content: space-between;
}
.welcome-secondary {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #e7ede3;
  font-size: 12px;
  margin-top: 8px;
}
.public-stats {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #ffffff30;
  text-align: center;
}
.public-stats p {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 20px;
  margin: 0 0 5px;
  font-size: 11px;
}
.public-stats strong {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #eacb94;
}
.public-stats small {
  display: block;
  color: #c0d0c5;
  font-size: 9px;
}
.view-controls {
  position: absolute;
  right: 28px;
  top: 115px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.view-controls button {
  background: #12323cb8;
  color: #edf2df;
  border-color: #ffffff24;
  backdrop-filter: blur(8px);
}
.world-toolbar {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  background: #faf7eeef;
  border: 1px solid #ffffff70;
  box-shadow: 0 10px 35px #06223230;
  border-radius: 19px;
  backdrop-filter: blur(15px);
}
.world-toolbar button {
  position: relative;
  min-width: 63px;
  height: 61px;
  background: none;
  border: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.world-toolbar button:hover {
  background: #e9e9da;
}
.world-toolbar button > span {
  font-size: 23px;
  line-height: 1.1;
}
.world-toolbar small {
  font-size: 10px;
  white-space: nowrap;
}
.world-toolbar i {
  height: 28px;
  width: 1px;
  background: #d9ddcf;
  margin: 0 4px;
}
.world-toolbar b {
  position: absolute;
  top: 1px;
  right: 5px;
  border-radius: 10px;
  background: #98504b;
  color: white;
  padding: 2px 5px;
  font-size: 9px;
}
.world-footer {
  position: absolute;
  bottom: 15px;
  left: 32px;
  right: 32px;
  color: #dfebe7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  text-shadow: 0 1px 5px #0b313a;
}
.world-footer button {
  padding: 7px 0;
  background: none;
  border: 0;
  color: inherit;
  font-size: 10px;
}
.context-action {
  position: absolute;
  bottom: 145px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #ead2a2;
  border-radius: 30px;
  padding: 12px 24px;
  min-height: 44px;
  background: #ffedc8ee;
  box-shadow: 0 4px 25px #173b3333;
  color: #284637;
  font-size: 13px;
  font-weight: 700;
}
.placement-bar {
  position: absolute;
  left: 50%;
  bottom: 140px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  width: max-content;
  background: #183b39ee;
  border: 1px solid #a9c2a948;
  border-radius: 15px;
  padding: 16px 20px;
  color: #fff5df;
  box-shadow: 0 8px 35px #0b282f44;
}
.placement-bar p {
  font-size: 12px;
  text-align: center;
  margin: 0 0 12px;
}
.placement-bar > div {
  display: flex;
  gap: 8px;
}
.placement-bar .hud-button {
  font-size: 11px;
  padding: 10px 12px;
}
.world-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #173640;
  color: #f4e5c7;
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.3s;
}
.world-loading p {
  font-size: 12px;
  letter-spacing: 2px;
  margin-top: 22px;
}
.loading-star {
  font-size: 40px;
  animation: breathe 2s ease-in-out infinite;
}
.world-fallback {
  position: absolute;
  inset: 0;
  background: #bac8c6;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.world-fallback img {
  width: min(700px, 100%);
  max-height: 70vh;
  object-fit: contain;
}
.fallback-help {
  position: absolute;
  bottom: 140px;
  width: min(460px, calc(100% - 40px));
  max-height: calc(100% - 240px);
  overflow: auto;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  background: #faf7ec;
  padding: 20px;
  border-radius: 12px;
}
.fallback-help h2 { font-size: 16px; margin: 0 0 8px; }
.fallback-help p { margin: 10px 0; }
.fallback-help code { display: block; font-size: 12px; overflow-wrap: anywhere; }
.fallback-help .field-note { margin-bottom: 0; }
.joystick {
  display: none;
  position: absolute;
  bottom: 150px;
  left: 25px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #173c4330;
  border: 1px solid #ffffff50;
  touch-action: none;
  user-select: none;
}
.joystick span {
  position: absolute;
  left: 29px;
  top: 29px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #faf5e3a0;
  box-shadow: 0 3px 15px #23484325;
  border: 1px solid #ffffff88;
  pointer-events: none;
}
.joystick small {
  position: absolute;
  bottom: -19px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ecf2e8;
  font-size: 8px;
  letter-spacing: 2px;
  pointer-events: none;
}
.chat-panel {
  position: absolute;
  right: 28px;
  bottom: 140px;
  width: 300px;
  border: 1px solid #ffffff70;
  border-radius: 16px;
  background: #fbf8f0;
  box-shadow: 0 10px 60px #072a3940;
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.chat-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px 0 18px;
  font-size: 12px;
}
.chat-panel header button {
  background: none;
  border: 0;
  font-size: 22px;
  width: 40px;
  height: 40px;
}
.chat-notice {
  font-size: 9px;
  padding: 0 18px;
  color: #5d7064;
  margin: 0 0 8px;
}
.chat-panel ol {
  list-style: none;
  padding: 0 18px;
  margin: 0;
  min-height: 100px;
  max-height: 220px;
  overflow: auto;
  overscroll-behavior: contain;
}
.chat-panel li {
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
.chat-panel li strong {
  font-size: 10px;
  display: block;
  color: #5d7064;
  margin-bottom: 2px;
}
.chat-panel form {
  display: flex;
  gap: 8px;
  margin: 12px;
  background: #ecefe2;
  padding: 5px;
  border-radius: 10px;
}
.chat-panel input {
  font-size: 16px;
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  padding: 5px 8px;
  color: var(--ink);
}
.chat-panel form button {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #365c48;
  color: #fff;
  font-size: 20px;
}
.player-label,
.speech-bubble {
  position: absolute;
  pointer-events: none;
  white-space: nowrap;
  font-size: 11px;
  color: #fffaf0;
  background: #183e49c9;
  padding: 5px 10px;
  border: 1px solid #ffffff38;
  border-radius: 20px;
  box-shadow: 0 2px 7px #152e3a15;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.speech-bubble {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 200px;
  border-radius: 12px;
  background: #fff8e7;
  color: #294438;
  padding: 10px 14px;
  line-height: 1.5;
}
.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.gift-card {
  background: #edf0e3;
  border: 1px solid #dfe4d3;
  border-radius: 10px;
  min-height: 110px;
  padding: 13px;
  text-align: left;
}
.gift-card > span {
  display: block;
  font-size: 28px;
  margin-bottom: 10px;
}
.gift-card strong {
  display: block;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.gift-card small {
  display: block;
  color: #5f7059;
  font-size: 10px;
  margin-top: 6px;
}
.people-list {
  list-style: none;
  margin: 15px 0;
  padding: 0;
}
.people-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.people-list i {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.people-list small {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
  color: var(--muted);
}
.avatar-preview {
  text-align: center;
  background: #e9eee0;
  border-radius: 14px;
  padding: 20px;
  margin: 18px 0;
  font-size: 55px;
}
.help-keys {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 15px;
  font-size: 12px;
  line-height: 1.8;
}
.help-keys dt {
  font-weight: 700;
}
.help-keys dd {
  margin: 0;
  color: var(--muted);
}
@keyframes breathe {
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}
.modal {
  padding: 0;
  border: 1px solid #e4e3d7;
  border-radius: 16px;
  color: var(--ink);
  background: #faf8f1;
  width: min(500px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-shadow: 0 25px 100px #18362630;
}
.modal::backdrop {
  background: #172f285e;
  backdrop-filter: blur(7px);
}
.modal-close {
  position: sticky;
  display: block;
  top: 12px;
  margin: 12px 12px -56px auto;
  z-index: 2;
  background: #faf8f1f5;
  border: 0;
}
.modal-banner {
  height: 155px;
  background: url("/assets/christmas/winter-story.webp") center 53% / cover;
}
.modal-body {
  padding: 32px 34px 34px;
}
.modal-body .eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  margin-bottom: 12px;
}
.modal h2 {
  font-size: 27px;
  line-height: 1.45;
  margin-bottom: 12px;
}
.modal-intro {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0 0 25px;
}
.form-field {
  margin-bottom: 20px;
}
.email-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 12px;
  line-height: 1.7;
  cursor: pointer;
}
.email-choice input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0;
  accent-color: var(--ink);
}
.email-choice small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.email-settings {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.email-address,
#mail-delivery-status,
.email-settings + .owner-actions {
  overflow-wrap: anywhere;
}
.form-field > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.headwear-field {
  border: 0;
  padding: 0;
  min-width: 0;
}
.headwear-field legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
.headwear-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.headwear-option {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 5px 5px 9px;
  border: 1px solid #d6dccf;
  border-radius: 10px;
  background: #fffdf8;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.headwear-option input {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--ink);
}
.headwear-option img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
}
.headwear-option:has(input:checked) {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  background: #edf0e6;
}
.headwear-option:focus-within {
  outline: 2px solid #7c8f73;
  outline-offset: 3px;
}
.optional {
  font-weight: 400;
  color: #687563;
  font-size: 10px;
  margin-left: 5px;
}
.input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d6dccf;
  background: #fffdf8;
  color: var(--ink);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}
.input::placeholder {
  color: #687563;
}
.input:focus {
  border-color: #7c8f73;
  outline: 2px solid #bbc7af77;
  outline-offset: 0;
}
textarea.input {
  resize: vertical;
  min-height: 135px;
}
.field-note {
  font-size: 10px;
  color: #626f61;
  line-height: 1.65;
  margin: 7px 0 0;
}
.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 5px 3px;
}
.swatch {
  position: relative;
  width: 30px;
  height: 30px;
  border: 3px solid #faf8f1;
  border-radius: 50%;
  outline: 1px solid transparent;
}
.swatch[aria-pressed="true"] {
  outline: 1.5px solid var(--ink);
}
.swatch[aria-pressed="true"]:after {
  content: "✓";
  color: white;
  font-size: 12px;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-shadow: 0 1px 3px #555;
}
.modal .button.full {
  width: 100%;
  margin-top: 5px;
}
.form-error {
  font-size: 12px;
  color: #a13f42;
  line-height: 1.8;
  background: #f4e8df;
  padding: 10px 12px;
  border-radius: 5px;
  margin: 15px 0;
}
.privacy-note {
  display: flex;
  align-items: start;
  gap: 7px;
  font-size: 10px;
  line-height: 1.8;
  color: #626f61;
  margin: 16px 0 0;
}
.decor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}
.decor-option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  min-height: 112px;
  border: 1px solid #dce0d4;
  border-radius: 8px;
  background: #fdfbf4;
  color: #64745c;
  font-size: 11px;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.decor-option > span {
  font-size: 35px;
  line-height: 1.2;
}
.decor-option[aria-pressed="true"] {
  border-color: #8b9b77;
  background: #eaf0e1;
  color: var(--ink);
  box-shadow: 0 0 0 1px #8b9b77;
}
.selected-decor {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  background: #edf0e5;
  border-radius: 8px;
  margin: 22px 0;
}
.selected-decor > span {
  font-size: 30px;
}
.selected-decor strong {
  font-size: 12px;
  display: block;
}
.selected-decor small {
  font-size: 10px;
  color: #5f7059;
  display: block;
  margin-top: 6px;
}
.photo-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 83px;
  border: 1px dashed #c8cfbc;
  border-radius: 8px;
  color: #5f7059;
  background: #f3f3e9;
  font-size: 12px;
  cursor: pointer;
}
.photo-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.photo-upload:focus-within {
  outline: 2px solid #a5b48e;
  outline-offset: 3px;
}
.photo-upload > span:first-child {
  font-size: 22px;
}
.photo-preview {
  max-width: 100%;
  max-height: 180px;
  display: block;
  border-radius: 6px;
  margin: 12px auto 4px;
}
.photo-remove {
  display: block;
  margin: 0 auto;
  font-size: 10px;
}
.character-count {
  text-align: right;
  font-size: 10px;
  color: #687563;
  margin-top: 7px;
}
.share-card {
  background: #e9eedf;
  border-radius: 10px;
  padding: 26px;
  text-align: center;
  margin: 20px 0;
}
.share-card .share-house {
  font-size: 44px;
  display: block;
  margin-bottom: 12px;
}
.share-card h3 {
  font: 500 20px var(--serif);
  margin: 0 0 9px;
}
.share-card p {
  font-size: 12px;
  line-height: 1.8;
  color: #5f7059;
  margin: 0;
}
.copy-row {
  display: flex;
  gap: 8px;
}
.copy-row .input {
  min-width: 0;
  font-size: 16px;
}
.copy-row .button {
  flex-shrink: 0;
  gap: 0;
}
.key-box {
  background: #f0ece1;
  border: 1px solid #e1dbca;
  padding: 17px;
  border-radius: 8px;
  margin-top: 24px;
}
.key-box h3 {
  font-size: 12px;
  margin: 0 0 8px;
}
.key-box p {
  font-size: 10px;
  line-height: 1.8;
  color: #676957;
  margin: 0 0 12px;
}
.key-box button {
  font-size: 11px;
}
.key-value {
  font-size: 10px;
  word-break: break-all;
  font-family: monospace;
  user-select: all;
  background: #fffdf5;
  padding: 9px;
  border-radius: 4px;
  margin: 10px 0;
  color: #6d785e;
}
.letter-head {
  padding: 10px 0 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.letter-ornament {
  font-size: 52px;
  display: block;
  text-align: center;
  margin: 10px 0 22px;
}
.letter-head h2 {
  font-size: 23px;
}
.letter-date {
  color: #687563;
  font-size: 10px;
}
.letter-message {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2.2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 100px;
}
.letter-photo {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
  margin: 25px auto 10px;
  border: 7px solid #fff;
  box-shadow: 0 4px 15px #49553618;
  transform: rotate(-2deg);
}
.letter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.danger {
  color: #a15251;
}
.owner-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  max-width: calc(100% - 36px);
  width: max-content;
  padding: 14px 22px;
  background: #284538;
  color: #fcf8ee;
  border-radius: 8px;
  z-index: 100;
  font-size: 12px;
  line-height: 1.7;
  box-shadow: 0 4px 22px #142c2633;
  text-align: center;
}
.privacy-copy p,
.privacy-copy li {
  font-size: 12px;
  color: #6d7967;
  line-height: 1.9;
}
.privacy-copy h3 {
  font-size: 14px;
  margin-top: 24px;
}
.privacy-copy ul {
  padding-left: 20px;
}
.noscript {
  padding: 30px;
  text-align: center;
  background: #f1e8d6;
}
.error-state {
  padding: 40px 0;
}
.error-state p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.toast {
  bottom: 135px;
  pointer-events: none;
}
.input {
  font-size: 16px;
}
.modal-close {
  border: 0;
  box-shadow: none;
}
.swatch {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}
.modal .modal-intro {
  font-size: 13px;
}
.modal h2 {
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding-right: 18px;
}
.modal .field-note,
.modal .privacy-note {
  font-size: 11px;
}
.modal-body .eyebrow {
  padding-right: 20px;
}
.modal:focus {
  outline: none;
}
@media (pointer: coarse) {
  .joystick {
    display: block;
  }
  #scene-hint {
    font-size: 0;
  }
  #scene-hint:after {
    content: "바닥을 눌러 이동 · 드래그로 둘러보기";
    font-size: 9px;
  }
}
@media (max-width: 760px) {
  .world-header {
    padding: 16px;
  }
  .world-brand {
    font-size: 12px;
    gap: 7px;
    letter-spacing: 1px;
  }
  .brand-icon {
    font-size: 30px;
  }
  .world-brand small {
    font-size: 5px;
    letter-spacing: 1.3px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions button {
    padding: 9px 11px;
    font-size: 11px;
    min-height: 44px;
  }
  .room-card {
    top: 81px;
    left: 18px;
    padding: 13px 15px;
    max-width: calc(100% - 90px);
    border-radius: 13px;
  }
  .room-card h1 {
    font-size: 15px;
    max-width: 220px;
  }
  .room-card > p {
    display: none;
  }
  .room-kicker {
    font-size: 9px;
    margin-bottom: 7px;
  }
  .room-meta {
    font-size: 9px;
    gap: 6px;
  }
  .view-controls {
    top: 85px;
    right: 16px;
  }
  .view-controls .hud-square {
    width: 44px;
    min-height: 44px;
    font-size: 19px;
  }
  .welcome-panel {
    left: 22px;
    top: auto;
    bottom: 148px;
    transform: none;
    width: min(330px, calc(100% - 44px));
    padding: 25px;
  }
  .welcome-panel h2 {
    font-size: 28px;
    line-height: 1.5;
  }
  .welcome-panel .eyebrow {
    margin-bottom: 12px;
  }
  .welcome-panel > p:not(.eyebrow) {
    font-size: 11px;
    margin-bottom: 18px;
  }
  .world-toolbar {
    bottom: 64px;
    padding: 5px;
    gap: 0;
    border-radius: 16px;
    max-width: calc(100% - 24px);
  }
  .world-toolbar button {
    min-width: 45px;
    height: 58px;
  }
  .world-toolbar button > span {
    font-size: 22px;
  }
  .world-toolbar small {
    font-size: 9px;
  }
  .world-toolbar i {
    margin: 0 2px;
  }
  .world-footer {
    bottom: 8px;
    left: 18px;
    right: 18px;
    font-size: 8px;
  }
  .world-footer button {
    font-size: 9px;
  }
  .world-footer #scene-hint {
    max-width: 70%;
    font-size: 8px;
  }
  .context-action {
    bottom: 148px;
    padding: 10px 18px;
    font-size: 12px;
    max-width: calc(100% - 40px);
  }
  .chat-panel {
    right: 16px;
    bottom: 148px;
    width: min(300px, calc(100% - 32px));
  }
  .chat-panel ol {
    max-height: 170px;
  }
  .placement-bar {
    bottom: 148px;
    padding: 13px;
    max-width: calc(100% - 24px);
  }
  .placement-bar p {
    font-size: 11px;
    line-height: 1.5;
  }
  .placement-bar > div {
    gap: 5px;
  }
  .placement-bar .hud-button {
    font-size: 10px;
    padding: 8px 9px;
    min-height: 42px;
  }
  .joystick {
    bottom: 155px;
    left: 22px;
    width: 90px;
    height: 90px;
  }
  .joystick span {
    left: 24px;
    top: 24px;
  }
  .modal-body {
    padding: 29px 23px;
  }
  .modal h2 {
    font-size: 23px;
  }
  .modal-banner {
    height: 120px;
  }
  .decor-grid {
    gap: 8px;
  }
  .decor-option {
    min-height: 90px;
    font-size: 10px;
  }
  .decor-option > span {
    font-size: 28px;
  }
  .toast {
    bottom: 116px;
    font-size: 11px;
    padding: 11px 16px;
  }
  .player-label {
    font-size: 10px;
  }
  .speech-bubble {
    font-size: 11px;
    max-width: 160px;
  }
  .fallback-help {
    bottom: 130px;
    padding: 16px;
  }
  .world-stage canvas {
    height: 100%;
  }
}
@media (max-height: 650px) {
  .welcome-panel {
    top: 50%;
    bottom: auto;
    transform: translateY(-40%);
    left: 24px;
    padding: 20px;
    width: 300px;
    max-width: calc(100% - 48px);
  }
  .welcome-panel h2 {
    font-size: 24px;
    margin-bottom: 10px;
  }
  .welcome-panel > p:not(.eyebrow) {
    margin-bottom: 10px;
  }
  .welcome-panel .eyebrow {
    display: none;
  }
  .welcome-panel .button {
    min-height: 42px;
  }
  .welcome-secondary {
    min-height: 36px;
  }
  .public-stats {
    margin-top: 8px;
    padding-top: 8px;
  }
  .room-card {
    top: 80px;
  }
  .room-card > p {
    display: none;
  }
  .chat-panel ol {
    max-height: 100px;
  }
  .world-toolbar {
    bottom: 64px;
  }
  .world-footer {
    bottom: 8px;
  }
  .modal {
    max-height: calc(100dvh - 24px);
  }
}
@media (max-height: 450px) {
  .welcome-panel {
    top: 75px;
    transform: none;
    max-height: calc(100dvh - 112px);
    overflow-y: auto;
  }
  .welcome-panel h2 { font-size: 20px; line-height: 1.3; }
  .welcome-panel:has(#public-stats:not([hidden])) > #hero-description { display: none; }
  .welcome-secondary { margin-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.header-actions .hud-button,
.placement-bar .hud-button {
  color: var(--ink);
}
.world-footer {
  color: #314c54;
  text-shadow: 0 1px 4px #ffffff66;
  gap: 12px;
}
.world-footer button,
.world-footer a {
  font-weight: 600;
}
.world-footer #scene-hint {
  background: #f8f5e7b5;
  padding: 5px 8px;
  border-radius: 5px;
}

#privacy-button,
.company-link {
  background: #f8f5e7d9;
  border-radius: 5px;
  padding: 5px 8px;
  min-height: 44px;
}
.company-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .world-footer #scene-hint { display: none; }
  .company-link { margin-left: 0; }
}

.world-shell:has(#welcome-panel:not([hidden])) .joystick,
.world-shell:has(#placement-bar:not([hidden])) .joystick {
  display: none;
}
@media (pointer: coarse) {
  .world-footer #scene-hint { font-size: 0; }
}
.world-shell:has(#scene-fallback:not([hidden])) #scene-hint { font-size: 10px; }
.world-shell:has(#scene-fallback:not([hidden])) #scene-hint:after { display: none; }
@media (pointer: coarse) and (max-height: 450px) and (min-width: 480px) {
  .joystick { width: 76px; height: 76px; bottom: 74px; left: 20px; }
  .joystick span { width: 32px; height: 32px; top: 21px; left: 21px; }
}

/* The landing card owns the first visit; world controls appear after entering. */
.world-shell:has(#welcome-panel:not([hidden])) .room-card,
.world-shell:has(#welcome-panel:not([hidden])) .world-toolbar,
.world-shell:has(#placement-bar:not([hidden])) .world-toolbar { display: none; }
.welcome-panel { max-height: calc(100dvh - 180px); overflow-y: auto; }
.selected-decor > div { min-width: 0; overflow-wrap: anywhere; }
.share-card h3 { overflow-wrap: anywhere; }
.chat-panel { display: flex; flex-direction: column; max-height: calc(100dvh - 164px); }
.chat-panel header, .chat-notice, .chat-panel form { flex-shrink: 0; }
.chat-panel ol { flex: 1 1 auto; }
.chat-panel header button, .chat-panel form button { width: 44px; height: 44px; }
.world-shell:has(#chat-panel:not([hidden])) .joystick { display: none; }
@media (max-width: 760px) {
  .world-shell:has(#welcome-panel:not([hidden])) .view-controls { flex-direction: row; top: 80px; }
  .welcome-panel {
    top: auto; bottom: 64px; left: 16px; transform: none;
    width: min(360px, calc(100% - 32px)); max-height: calc(100dvh - 208px);
  }
  .world-toolbar small { font-size: 10px; }
  .help-keys { grid-template-columns: 62px minmax(0, 1fr); gap: 14px 12px; word-break: keep-all; }
  .letter-footer { gap: 12px; font-size: 12px; }
}
@media (max-height: 650px) {
  .chat-panel ol { min-height: 0; }
}
@media (max-height: 450px) {
  .welcome-panel { top: 76px; bottom: auto; max-height: calc(100dvh - 140px); }
  .world-shell:has(#welcome-panel:not([hidden])) .view-controls { flex-direction: column; }
  .room-card { top: 76px; padding: 8px 12px; }
  .room-kicker { display: none; }
  .room-card h1 { font-size: 14px; margin-bottom: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .view-controls { top: 80px; }
  .world-shell:has(#placement-bar:not([hidden])) .room-card { display: none; }
}
@media (max-height: 450px) {
  .world-shell:has(#scene-fallback:not([hidden])) .room-card { padding: 0 12px; }
  .world-shell:has(#scene-fallback:not([hidden])) .room-card h1 { display: none; }
}
