:root {
  color-scheme: dark;
  --ink: #fff4dc;
  --muted: #b5bfce;
  --gold: #f3cf83;
  --line: rgba(242,232,214,.14);
  --panel: rgba(21,31,51,.89);
  font-family: system-ui,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  background: #131c34;
  color: var(--ink);
  font-size: 14px;
}

button,input,textarea,select {
  font: inherit;
}

button,a,input,textarea,select,summary {
  -webkit-tap-highlight-color: transparent;
}

button,a,summary {
  touch-action: manipulation;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: wait;
}

button,a,input,textarea,select,summary {
  outline-offset: 5px;
}

button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline: 2px solid var(--gold);
}

[hidden] {
  display: none!important;
}

h1,h2,p {
  margin: 0;
}

h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.04em;
}

button,a {
  text-decoration: none;
}

button {
  border: 0;
  background: none;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

label {
  display: block;
  font-size: 12px;
  color: #d9d9dc;
  margin-bottom: 8px;
}

input:not([type=range],[type=checkbox],[type=radio]),textarea,select {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(6,15,31,.4);
  border: 1px solid var(--line);
  border-radius: 12px;
}

textarea {
  resize: none;
  line-height: 1.7;
}

input::placeholder,textarea::placeholder {
  color: #9ea9bc;
}

input[type=range] {
  width: 100%;
  accent-color: var(--gold);
  min-height: 28px;
  margin: 0 0 10px;
  cursor: pointer;
}

input[type=checkbox] {
  accent-color: var(--gold);
  width: 20px;
  height: 20px;
}

select {
  width: auto;
  min-height: 44px;
}

canvas {
  display: block;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px #07101d26;
  backdrop-filter: blur(18px);
}

.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 9px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
  line-height: 1.7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.primary,.secondary {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 650;
  font-size: 13px;
}

.primary {
  background: #f8d9d4;
  color: #19243b;
  box-shadow: 0 3px 15px #e7b36712;
}

.primary:hover {
  background: #ffe9e3;
}

.secondary {
  border: 1px solid var(--line);
  background: #ffffff06;
}

.secondary:hover {
  background: #ffffff10;
}

.wide {
  width: 100%;
}

.wide span {
  margin-left: auto;
}

.icon-button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 24px;
  border-radius: 12px;
}

.icon-button:hover {
  background: #ffffff0b;
}

.text-button {
  min-height: 44px;
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
}

.text-button:hover {
  color: var(--gold);
}

.button-row {
  display: flex;
  gap: 10px;
}

.button-row>* {
  flex: 1;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.panel-heading .eyebrow {
  margin: 0 0 6px;
}

.error {
  color: #ffb8a7;
  font-size: 12px;
  line-height: 1.6;
  min-height: 0;
}

.error:not(:empty) {
  margin-top: 12px;
}

.range-label {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}

.range-label output {
  color: var(--gold);
}

#village,#scene,.vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#scene {
  touch-action: none;
  outline: none;
}

.vignette {
  pointer-events: none;
  background: radial-gradient(ellipse at 55% 42%,transparent 35%,#0a122c52 100%);
}

.boot-note,.fatal {
  position: fixed;
  z-index: 30;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%,600px);
  padding: 18px;
  border-radius: 12px;
  background: #17243d;
  line-height: 1.8;
}

.boot-note {
  opacity: 0;
  animation: boot-message 0s 12s forwards;
  pointer-events: none;
}

@keyframes boot-message {
  to {
    opacity: 1;
  }
}

.entry {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 5vh 8vw;
  background: linear-gradient(90deg,#0d172b80,transparent 75%);
  overflow: auto;
}

.entry-card {
  width: 370px;
  border-radius: 26px;
  padding: 32px;
}

.entry h1 {
  font-weight: 650;
  font-size: 46px;
  line-height: 1.18;
  letter-spacing: -.07em;
  position: relative;
}

.entry h1>span {
  position: absolute;
  font-size: 40px;
  right: 20px;
  top: 28px;
  color: var(--gold);
  font-weight: 300;
}

.entry-copy {
  margin-top: 18px;
  color: #c4cad3;
  line-height: 1.9;
  font-size: 13px;
}

.avatar-preview {
  margin: 0 auto;
  width: 150px;
  height: 138px;
  object-fit: contain;
}

.entry-options {
  margin: 14px 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.entry-options select {
  width: 100%;
  font-size: 12px;
  padding: 8px;
}

.entry-options label {
  margin-bottom: 6px;
}

.entry-status {
  margin-top: 12px;
}

.entry-caption {
  position: absolute;
  bottom: 5vh;
  right: 7vw;
  font-size: 12px;
  color: #fff1d5b3;
  letter-spacing: .16em;
}

.topbar {
  position: fixed;
  left: 36px;
  right: 36px;
  top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.topbar>* {
  pointer-events: auto;
}

.wordmark {
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.05em;
  white-space: nowrap;
}

.wordmark>span {
  color: var(--gold);
  font-size: 28px;
  vertical-align: middle;
  margin-right: 9px;
}

.wordmark small {
  display: block;
  font-size: 10px;
  letter-spacing: .25em;
  margin-left: 42px;
  margin-top: 1px;
  font-weight: 400;
  color: var(--muted);
}

.stats {
  border-radius: 30px;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
}

.stats strong {
  font-weight: 500;
  color: var(--gold);
}

.divider {
  height: 14px;
  width: 1px;
  background: var(--line);
}

.season-label {
  color: #d8deeb8c;
  font-size: 11px;
  letter-spacing: .13em;
}

.connection-notice {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 6;
}

.wish-panel {
  position: fixed;
  top: 143px;
  left: 36px;
  width: 280px;
  border-radius: 20px;
  padding: 22px;
}

.wish-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  min-height: 44px;
}

.wish-panel summary::-webkit-details-marker {
  display: none;
}

.wish-panel summary strong {
  display: block;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.05em;
}

.wish-panel summary .eyebrow {
  display: block;
  font-size: 9px;
  letter-spacing: .06em;
}

.fold {
  color: var(--muted);
  font-size: 24px;
  font-weight: 200;
}

.wish-panel:not([open]) .fold {
  font-size: 0;
}

.wish-panel:not([open]) .fold::after {
  content: '+';
  font-size: 24px;
}

.wish-panel form {
  margin-top: 20px;
}

.ornament-choices {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 5px;
  margin-bottom: 18px;
}

.ornament-choice {
  position: relative;
  margin: 0;
  text-align: center;
  cursor: pointer;
}

.ornament-choice input {
  position: absolute;
  opacity: 0;
}

.ornament-choice>span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 4px;
  font-size: 10px;
  min-height: 66px;
  background: #ffffff03;
}

.ornament-choice input:checked+span {
  border-color: var(--gold);
  background: #f3cf8312;
  color: var(--gold);
}

.ornament-choice input:focus-visible+span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.input-caption {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin: 8px 0 18px;
}

.side-panel {
  position: fixed;
  right: 30px;
  top: 135px;
  width: 305px;
  padding: 22px;
  border-radius: 20px;
  max-height: calc(100dvh - 260px);
  overflow-y: auto;
  z-index: 5;
}

.wish-card {
  top: 120px;
}

.card-ornament {
  font-size: 62px;
  text-align: center;
  margin: 15px 0 20px;
  filter: drop-shadow(0 5px 20px #e5c37033);
}

.card-text {
  font-size: 22px;
  line-height: 1.7;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.card-author {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  gap: 10px;
  margin: 22px 0;
}

.card-navigation {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 6px;
}

#card-feedback {
  margin-top: 12px;
  color: var(--gold);
  overflow-wrap: anywhere;
}

.bottom-left {
  position: fixed;
  bottom: 30px;
  left: 36px;
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile {
  border-radius: 16px;
  padding: 7px 12px 7px 4px;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  min-height: 70px;
  gap: 7px;
}

.profile canvas {
  width: 56px;
  height: 56px;
}

.profile strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}

.profile small::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a8c7af;
  vertical-align: middle;
  margin-right: 5px;
}

.profile-edit {
  margin-left: auto;
  font-size: 19px;
  color: var(--muted);
}

.chat {
  display: flex;
  border-radius: 13px;
  align-items: center;
}

.chat input {
  border: 0!important;
  background: none!important;
  font-size: 11px;
  padding: 12px!important;
}

.chat button {
  font-size: 20px;
}

.dock {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 22px;
  display: flex;
  padding: 9px 13px;
  gap: 2px;
}

.dock button {
  width: 66px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border-radius: 14px;
}

.dock button:hover,.dock button[aria-expanded=true] {
  background: #f3cf8312;
}

.dock button>span {
  font-size: 24px;
  line-height: 1;
  color: var(--gold);
}

.dock button small {
  font-size: 10px;
  font-weight: 500;
  color: #d9dce3;
}

.corner-tools {
  position: fixed;
  right: 30px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.corner-tools button {
  border-radius: 14px;
  min-width: 46px;
  min-height: 46px;
  padding: 10px 13px;
  font-size: 22px;
}

.corner-tools button span {
  font-size: 10px;
  margin-left: 5px;
  vertical-align: middle;
}

.sound-panel {
  position: fixed;
  right: 30px;
  bottom: 96px;
  width: 270px;
  padding: 20px;
  border-radius: 20px;
  z-index: 6;
}

.sound-panel h2 {
  font-size: 17px;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  margin: 0;
  font-size: 13px;
}

.emote-tray {
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6,56px);
  padding: 10px;
  border-radius: 18px;
  z-index: 5;
}

.emote-tray button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  min-height: 58px;
  padding: 7px 3px;
  border-radius: 10px;
}

.emote-tray button:hover {
  background: #ffffff10;
}

.emote-tray button span {
  font-size: 23px;
  color: var(--gold);
}

.world-caption {
  position: fixed;
  bottom: 138px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: .13em;
  color: #edf0f78c;
  pointer-events: none;
  white-space: nowrap;
}

.joystick {
  display: none;
  position: fixed;
  bottom: 115px;
  left: 28px;
  width: 100px;
  height: 100px;
  border: 1px solid #fff3;
  box-shadow: inset 0 0 35px #0a122744;
  border-radius: 50%;
  touch-action: none;
  background: #f4f1dd08;
}

.joystick span {
  position: absolute;
  left: 28px;
  top: 28px;
  width: 44px;
  height: 44px;
  border: 1px solid #fff4;
  border-radius: 50%;
  background: #edf2ff26;
  pointer-events: none;
}

.modal {
  color: var(--ink);
  border-radius: 24px;
  padding: 26px;
  width: min(460px,calc(100% - 28px));
  max-height: 90dvh;
  overflow-y: auto;
}

.modal::backdrop {
  background: #060d20aa;
  backdrop-filter: blur(7px);
}

.modal .avatar-preview {
  width: 170px;
  height: 150px;
}

.customize-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0 24px;
}

.customize-options select {
  width: 100%;
  padding: 10px;
}

.customize-options .color-field {
  grid-column: 1/-1;
}

.swatches {
  display: flex;
  gap: 9px;
}

.swatch {
  margin: 0;
  position: relative;
  cursor: pointer;
}

.swatch input {
  position: absolute;
  opacity: 0;
}

.swatch span {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #1d2b42;
  box-shadow: 0 0 0 1px var(--line);
}

.swatch input:checked+span {
  box-shadow: 0 0 0 2px var(--gold);
}

.swatch input:focus-visible+span {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.drawer {
  width: min(520px,calc(100% - 28px));
}

.drawer-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0;
}

.wish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55dvh;
  overflow: auto;
}

.wish-list .wish-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  text-align: left;
  background: #ffffff04;
}

.wish-item>span {
  font-size: 27px;
}

.wish-item p {
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.wish-item small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.empty-state {
  padding: 40px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}

.photo-modal {
  width: min(740px,calc(100% - 28px));
}

.photo-modal img {
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
  border-radius: 14px;
  margin-bottom: 20px;
}

#help-dialog p {
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 16px;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 145px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 24px;
  border-radius: 16px;
  text-align: center;
  font-size: 13px;
  max-width: 90%;
  width: max-content;
  pointer-events: none;
}

.zen-hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 40px;
  text-align: center;
  pointer-events: none;
  font-size: 13px;
  letter-spacing: .12em;
  color: #f7ebd3b3;
}

.zen-hint span {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: .04em;
  color: #c6cfe880;
}

body.zen #interface {
  visibility: hidden;
}

body.placing .wish-panel,body.placing .bottom-left,body.placing .dock,body.placing .corner-tools,body.placing .joystick,body.placing .emote-tray {
  display: none!important;
}

@media(min-width:1500px) {
  .wish-panel {
    left: 55px;
    top: 18vh;
  }
  .topbar {
    left: 55px;
    right: 55px;
  }
  .bottom-left {
    left: 55px;
    bottom: 40px;
  }
  .dock {
    bottom: 40px;
  }
  .corner-tools {
    right: 55px;
    bottom: 44px;
  }
}

@media(max-width:1100px) {
  .season-label {
    display: none;
  }
  .bottom-left {
    width: 200px;
    left: 22px;
  }
  .wish-panel {
    left: 22px;
    width: 255px;
    padding: 18px;
  }
  .corner-tools {
    right: 20px;
    bottom: 125px;
    flex-direction: column;
    align-items: flex-end;
  }
  .corner-tools button {
    padding: 8px 12px;
  }
  .corner-tools button span {
    display: none;
  }
  .topbar {
    left: 22px;
    right: 22px;
  }
  .side-panel {
    right: 22px;
    width: 280px;
  }
  .dock button {
    width: 60px;
  }
  .stats {
    margin-left: auto;
  }
  .sound-panel {
    right: 76px;
    bottom: 140px;
  }
}

@media(pointer:coarse) {
  .joystick {
    display: block;
  }
  .bottom-left {
    bottom: 240px;
  }
  .chat {
    display: none;
  }
  .world-caption {
    display: none;
  }
}

@media(max-width:650px) {
  .topbar {
    left: 16px;
    right: 16px;
    top: max(14px,env(safe-area-inset-top));
  }
  .wordmark {
    font-size: 16px;
  }
  .wordmark>span {
    font-size: 23px;
    margin-right: 4px;
  }
  .wordmark small {
    font-size: 8px;
    margin-left: 29px;
    letter-spacing: .16em;
  }
  .stats {
    padding: 10px 12px;
    font-size: 10px;
    gap: 8px;
  }
  .stats .divider {
    height: 12px;
  }
  .wish-panel {
    left: 14px;
    top: 82px;
    width: 235px;
    padding: 13px 16px;
  }
  .wish-panel summary strong {
    font-size: 17px;
  }
  .wish-panel summary .eyebrow {
    font-size: 8px;
  }
  .wish-panel form {
    margin-top: 13px;
  }
  .ornament-choices {
    gap: 6px;
    margin-bottom: 12px;
  }
  .ornament-choice>span {
    padding: 6px 2px;
    min-height: 56px;
  }
  .wish-panel textarea {
    font-size: 12px;
    padding: 10px;
  }
  .input-caption {
    font-size: 9px;
    margin-bottom: 12px;
  }
  .bottom-left {
    bottom: auto;
    top: 83px;
    left: auto;
    right: 14px;
    width: auto;
  }
  .profile {
    padding: 0;
    min-height: 48px;
    width: 48px;
    border-radius: 50%;
  }
  .profile canvas {
    width: 46px;
    height: 46px;
  }
  .profile>span {
    display: none;
  }
  .chat {
    display: none;
  }
  .dock {
    bottom: max(14px,env(safe-area-inset-bottom));
    width: calc(100% - 28px);
    justify-content: space-around;
    padding: 6px;
    border-radius: 19px;
  }
  .dock button {
    width: 19%;
    min-height: 55px;
    gap: 5px;
  }
  .dock button>span {
    font-size: 22px;
  }
  .dock button small {
    font-size: 9px;
  }
  .corner-tools {
    right: 14px;
    bottom: 100px;
    gap: 7px;
  }
  .corner-tools button {
    min-height: 44px;
    min-width: 44px;
    padding: 8px;
    border-radius: 13px;
  }
  .joystick {
    width: 96px;
    height: 96px;
    left: 23px;
    bottom: 106px;
  }
  .joystick span {
    left: 26px;
    top: 26px;
  }
  .emote-tray {
    bottom: 93px;
    grid-template-columns: repeat(6,1fr);
    width: calc(100% - 28px);
    padding: 7px;
    z-index: 8;
  }
  .emote-tray button {
    font-size: 10px;
  }
  .world-caption {
    display: none;
  }
  .side-panel {
    top: auto;
    bottom: 90px;
    left: 14px;
    right: 14px;
    width: auto;
    padding: 20px;
    max-height: calc(100dvh - 170px);
  }
  .wish-card {
    max-height: 65dvh;
  }
  .wish-card .card-ornament {
    float: left;
    font-size: 42px;
    margin: 0 16px 10px 0;
  }
  .card-text {
    font-size: 19px;
  }
  .card-author {
    clear: both;
    margin: 18px 0;
  }
  .sound-panel {
    right: 67px;
    bottom: 100px;
    width: 250px;
  }
  .connection-notice {
    top: 63px;
    font-size: 10px;
    padding: 7px 14px;
    white-space: nowrap;
  }
  .entry {
    padding: 25px 18px;
    align-items: center;
    justify-content: center;
    background: #0d172b60;
  }
  .entry-card {
    width: min(360px,100%);
    padding: 24px;
  }
  .entry h1 {
    font-size: 38px;
  }
  .entry-copy {
    font-size: 12px;
    margin-top: 12px;
  }
  .entry .avatar-preview {
    height: 105px;
    width: 115px;
  }
  .entry-caption {
    display: none;
  }
  .entry-options {
    margin: 12px 0 15px;
  }
  .modal {
    padding: 20px;
    border-radius: 21px;
  }
  .customize-options {
    gap: 10px;
  }
  .swatches {
    gap: 5px;
  }
  .swatch span {
    width: 40px;
    height: 40px;
  }
  .toast {
    bottom: 95px;
    font-size: 12px;
  }
  body.placing .side-panel {
    bottom: 14px;
    max-height: 55dvh;
  }
  body.placing .side-panel input[type=range] {
    margin-bottom: 0;
    min-height: 22px;
  }
  body.placing .range-label {
    margin-top: 7px;
  }
  body.placing .panel-heading {
    margin-bottom: 5px;
  }
}

@media(max-height:700px) and (min-width:651px) {
  .entry-card {
    padding: 23px;
  }
  .entry h1 {
    font-size: 36px;
  }
  .entry .avatar-preview {
    height: 85px;
    width: 95px;
  }
  .entry-copy {
    margin-top: 10px;
  }
  .entry-options {
    margin: 10px 0;
  }
  .wish-panel {
    top: 100px;
  }
  .wish-panel form {
    margin-top: 12px;
  }
  .ornament-choices {
    margin-bottom: 12px;
    gap: 5px;
  }
  .ornament-choice>span {
    min-height: 54px;
    padding: 5px;
  }
  .bottom-left {
    bottom: 18px;
  }
  .dock {
    bottom: 18px;
  }
  .world-caption {
    display: none;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior: auto!important;
    transition: none!important;
  }
  .boot-note {
    animation: boot-message 0s 12s forwards;
  }
}

@media(max-width:650px) {
  body:has(#wish-panel[open]) .joystick,body:has(#wish-card:not([hidden])) .joystick,body:has(#wish-card:not([hidden])) .corner-tools,body:has(#emote-tray:not([hidden])) .joystick {
    display: none;
  }
  .wish-panel[open] {
    max-height: calc(100dvh - 185px);
    overflow-y: auto;
  }
}

.card-ornament canvas {
  margin: 0 auto;
}

.ornament-thumbnail {
  flex-shrink: 0;
}

.color-field legend {
  font-size: 12px;
  color: #d9d9dc;
  margin-bottom: 10px;
}

@media(max-width:650px) {
  .card-ornament canvas {
    width: 48px!important;
    height: 48px!important;
  }
}

/* Fifteen ornament choices remain reachable on small and short viewports. */
.wish-panel {
  max-height: calc(100dvh - 255px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.ornament-choice > span {
  min-height: 58px;
  font-size: 8px;
  overflow-wrap: anywhere;
}
.quality-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
}
.quality-row select {
  width: auto;
  padding: 6px 9px;
}
.ceremony-notice {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  padding: 18px 30px;
  border-radius: 24px;
  color: #ffe8b5;
  text-align: center;
  pointer-events: none;
}
.ceremony-notice strong { display: block; font-size: clamp(28px,5vw,60px); }
.ceremony-notice small { display: block; margin-top: 7px; font-size: 16px; }
@media (max-width: 650px) {
  .wish-panel { width: min(300px,calc(100vw - 28px)); max-height: calc(100dvh - 190px); }
}

#wish-card, #customize-dialog .panel-heading {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22160%22%20height%3D%2212%22%20viewBox%3D%220%200%20160%2012%22%3E%3Cpath%20fill%3D%22%23111726%22%20d%3D%22M0%200h160v12H0z%22%2F%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23c89c50%22%20stroke-width%3D%221%22%20d%3D%22M0%207Q20%201%2040%207T80%207T120%207T160%207%22%2F%3E%3Cg%20fill%3D%22%23b64b52%22%3E%3Cpath%20d%3D%22M15%206Q18%200%2025%202Q23%207%2015%206M55%207Q60%2012%2067%209Q63%205%2055%207M95%206Q98%200%20105%202Q103%207%2095%206M135%207Q140%2012%20147%209Q143%205%20135%207%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%23d9b86b%22%3E%3Cpath%20d%3D%22M30%206Q32%202%2036%203Q35%206%2030%206M70%207Q73%2011%2077%209Q75%206%2070%207M110%206Q112%202%20116%203Q115%206%20110%206M150%207Q153%2011%20157%209Q155%206%20150%207%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-size: 160px 8px;
  background-repeat: repeat-x;
  background-position: top center;
}
