@font-face {
  font-family: Unbounded;
  src: url('/fonts/unbounded.woff2') format('woff2');
  font-display: swap;
  font-weight: 100 900;
}
@font-face {
  font-family: Open Sans;
  src: url('/fonts/open-sans.woff2') format('woff2');
  font-display: swap;
  font-weight: 100 900;
}
:root {
  --gold: #ffe3a0;
  --ivory: #fff5de;
  --ink: #201b3c;
  --line: rgba(250, 222, 165, 0.43);
  --glass: rgba(29, 31, 67, 0.9);
  font:
    16px/1.45 'Open Sans',
    system-ui,
    sans-serif;
  color: var(--ivory);
  background: #252c5a;
}
* {
  box-sizing: border-box;
}
body,
main {
  margin: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
main {
  position: relative;
  isolation: isolate;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid #ffe299;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.sky {
  position: absolute;
  inset: 0;
  background-color: #253554;
  background-image: url('/art/northern-sky.webp');
  background-position: center top;
  background-size: max(100%, 830px) 54%;
  background-repeat: no-repeat;
  z-index: -2;
  pointer-events: none;
}
.sky:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #060e2390, #0c183747 30%, #172742b5 53%, transparent 56%);
  pointer-events: none;
}
#world,
#labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#world {
  display: block;
  touch-action: none;
  cursor: grab;
  outline: none;
}
#world:active {
  cursor: grabbing;
}
#labels {
  pointer-events: none;
  overflow: hidden;
}
header {
  position: absolute;
  inset: max(20px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) auto
    max(28px, env(safe-area-inset-left));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
h1 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.23em;
  margin: 0;
  font:
    480 clamp(22px, 3.05vw, 48px) / 1.12 Unbounded,
    sans-serif;
  letter-spacing: -0.067em;
  color: var(--gold);
  text-shadow:
    0 3px 18px #12132f,
    0 1px 3px #212448;
}
h1:after {
  content: '';
  position: absolute;
  width: 72%;
  height: 10px;
  border-bottom: 1.5px solid #f3cd77;
  border-radius: 0 0 75% 42%;
  bottom: -7px;
  right: 3%;
  transform: rotate(-2deg);
  opacity: 0.85;
}
.flake {
  font-family: system-ui, sans-serif;
  font-size: 1.06em;
  font-weight: 400;
  line-height: 1;
}
.corner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.presence,
.round {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 28, 59, 0.82);
  border: 1px solid rgba(215, 211, 244, 0.35);
  border-radius: 30px;
  box-shadow: 0 3px 14px #16183238;
  color: #fff1de;
}
.presence {
  gap: 9px;
  padding: 0.45rem 0.92rem;
  font-size: 0.88rem;
  font-weight: 650;
  min-height: 36px;
}
.presence i,
.who i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b1adbd;
}
.online .presence i {
  background: #8aebbd;
  box-shadow: 0 0 8px #7dad9c;
}
.round {
  width: 36px;
  height: 36px;
  padding: 0;
  font-weight: 750;
}
.round:hover,
.action:hover {
  background: #4a476a;
}
.dock {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(115deg, rgba(36, 38, 77, 0.96), rgba(36, 29, 63, 0.93));
  box-shadow:
    inset 0 0 0 3px #ffffff08,
    0 5px 22px #1713334d;
  backdrop-filter: blur(10px);
}
.identity,
fieldset,
#colors,
.who {
  display: flex;
  align-items: center;
}
.identity {
  gap: 9px;
}
.identity img {
  width: 39px;
  height: 39px;
  object-fit: contain;
}
input {
  background: #191c3c;
  color: var(--ivory);
  border: 1px solid #bab0cd8c;
  border-radius: 22px;
  padding: 0.56rem 0.88rem;
  width: clamp(120px, 13vw, 206px);
  min-height: 39px;
  font-size: 0.92rem;
}
input::placeholder {
  color: #c2bbcf;
}
.field-title {
  font-size: 0.88rem;
  color: #e3d9e9;
}
fieldset {
  border: 0;
  border-left: 1px solid #b9a3bd60;
  padding: 0 0 0 17px;
  margin: 0;
  gap: 9px;
  min-width: 0;
}
#colors {
  gap: 7px;
}
.swatch {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid #e6d9ee65;
  background: var(--swatch);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}
.swatch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.swatch:has(:checked) {
  border-color: #ffdc84;
  outline: 1px solid #ffcf78;
  outline-offset: 2px;
  box-shadow: 0 0 7px #ffcd8975;
}
.swatch:has(:checked):after {
  content: '';
  height: 7px;
  width: 3px;
  border: solid #271932;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg) translateY(-1px);
  pointer-events: none;
}
.swatch:has(:focus-visible) {
  outline: 2px solid white;
  outline-offset: 3px;
}
.gold,
.action {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0.55rem 1.1rem;
  min-height: 40px;
  line-height: 1.2;
  font-weight: 750;
  white-space: nowrap;
}
.gold {
  border-color: #ffe1a6;
  background: linear-gradient(130deg, #ffe8b5, #eab16a);
  box-shadow:
    inset 0 0 0 2px #ffffff30,
    0 1px 9px #daa4643b;
  color: #422c35;
}
.gold:hover {
  background: linear-gradient(125deg, #fff2ce, #f6c381);
}
.gold span[aria-hidden] {
  font-size: 1.13em;
  margin-left: 0.32em;
}
.action {
  background: #34334f;
  color: #fff1df;
}
#carry:enabled {
  border-color: #8ecab6;
  background: #284b49;
}
#carry:enabled:hover {
  background: #315d56;
}
#play button:disabled {
  cursor: default;
}
.who {
  gap: 8px;
  max-width: 190px;
}
.who strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who i {
  width: 10px;
  height: 10px;
  flex: none;
}
kbd {
  font:
    600 0.71rem/1.3 'Open Sans',
    sans-serif;
  display: inline-block;
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 5px;
  opacity: 0.78;
}
button kbd {
  margin-left: 4px;
}
#help-tip {
  position: absolute;
  bottom: max(36px, env(safe-area-inset-bottom));
  left: 22px;
  padding: 5px 10px;
  background: #282643ba;
  border-radius: 12px;
  font-size: 0.75rem;
  color: #f6ebf6;
}
#help-tip span {
  opacity: 0.72;
}
.name-tag {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #27233dcc;
  color: #fff5e5;
  border-radius: 20px;
  border: 1px solid #f4dfc77d;
  line-height: 1.25;
  box-shadow: 0 2px 6px #20293b43;
}
.name-tag.me {
  border-color: #ffdc83;
  color: #fff0c9;
}
.tag-text {
  display: block;
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.name-tag[data-dance] {
  border-color: #ffda8f;
}
.name-tag[data-dance="rock"] { border-color: #eac1ff; }
.name-tag[data-dance]::before,
.name-tag[data-dance]::after {
  content: '♪';
  position: absolute;
  bottom: 82%;
  left: -3px;
  color: #ffdc84;
  font: bold 18px/1 system-ui, sans-serif;
  text-shadow: 0 1px 3px #201735, 0 0 7px #ffc55c;
  animation: singing-note var(--note-period, 2s) ease-out infinite;
}
.name-tag[data-dance]::after {
  content: '♫';
  left: auto;
  right: -5px;
  color: #adfae2;
  animation-delay: calc(-.5 * var(--note-period, 2s));
}
@keyframes singing-note {
  0% { opacity: 0; transform: translateY(3px) scale(.7) rotate(-12deg); }
  22% { opacity: 1; }
  70% { opacity: .95; }
  100% { opacity: 0; transform: translate(4px, -19px) scale(1.05) rotate(12deg); }
}
@media (prefers-reduced-motion: reduce) {
  .name-tag[data-dance]::before, .name-tag[data-dance]::after { animation: none; }
}
#stick {
  display: none;
  position: absolute;
  bottom: max(26px, env(safe-area-inset-bottom));
  left: max(15px, env(safe-area-inset-left));
  width: 92px;
  aspect-ratio: 1;
  border: 1px solid #ffebbf92;
  border-radius: 50%;
  background: #292c5096;
  touch-action: none;
}
#stick span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  position: absolute;
  left: calc(50% - 17px);
  top: calc(50% - 17px);
  border: 1px solid #ffe4afc4;
  background: #e6d0b4ad;
}
#entry-error {
  position: absolute;
  bottom: calc(100% + .55rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: .65rem .95rem;
  border: 1px solid #e6b682;
  border-radius: .85rem;
  color: #fff1dc;
  background: #382637;
  text-align: center;
  line-height: 1.35;
}
#notice {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 16px;
  max-width: 90%;
  text-align: center;
  border-radius: 20px;
  background: #242545d9;
  font-size: 0.88rem;
}
dialog {
  width: min(415px, calc(100% - 30px));
  max-height: 85dvh;
  border-radius: 22px;
  background: #282643;
  color: var(--ivory);
  border: 1px solid var(--line);
  padding: 26px;
  box-shadow: 0 15px 80px #121127aa;
}
dialog::backdrop {
  background: #15142e83;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font:
    510 1.4rem/1.3 Unbounded,
    sans-serif;
  color: var(--gold);
  margin: 0 40px 14px 0;
}
.close {
  float: right;
}
.round svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#audio-button .sound-off, #audio-button.muted .sound-on { display: none; }
#audio-button.muted .sound-off { display: block; }
#world.over-toy { cursor: pointer; }
#sound-panel, #gallery {
  background: radial-gradient(ellipse at top right, #334756, transparent 60%), #19273a;
  border-color: #a68a5c;
  box-shadow: inset 0 0 0 4px #f4d6980a, 0 15px 80px #090e22a6;
}
.mute-line, .level {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 620;
}
.mute-line { margin: 20px 0; }
#sound-panel input { accent-color: #f4c571; }
#sound-panel input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 0; }
.level { justify-content: space-between; }
.level output { color: var(--gold); font-variant-numeric: tabular-nums; }
.chorus-status {
  display: flex;
  gap: .65em;
  align-items: center;
  padding-top: .8em;
  border-top: 1px solid #e0be8254;
}
.chorus-status > :first-child { color: var(--gold); font-size: 1.25em; }
.chorus-status strong { display: block; margin-bottom: .25em; color: #ffdc9b; }
.chorus-status strong[hidden] { display: none; }
#chorus-members { color: #dfdff2; font-size: .9em; }
#sound-panel input[type=range] {
  width: 100%;
  min-height: 26px;
  margin: 3px 0 11px;
  padding: 0;
}
#gallery-list { display: grid; gap: 8px; }
#gallery-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #dac29452;
  border-radius: 12px;
  background: #304150;
  color: var(--ivory);
  font-weight: 700;
  padding: 6px 12px 6px 6px;
  text-align: left;
  overflow-wrap: anywhere;
}
#gallery-list button:hover { background: #425557; }
#gallery-list img { border-radius: 9px; }
#painting { margin: 18px 0; text-align: center; }
.ornament-frame {
  position: relative;
  width: min(100%, 300px, max(150px, 48dvh));
  margin: auto;
}
#turntable {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  border-radius: 16px;
  border: 1px solid #d6b8797a;
  background: radial-gradient(circle at 44% 44%, #356155, #0a231f);
  touch-action: none;
  user-select: none;
}
#turntable:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#turntable[data-state=ready] { cursor: grab; }
#turntable.dragging { cursor: grabbing; }
#portrait, #globe { display: block; width: 100%; height: 100%; position: absolute; inset: 0; pointer-events: none; }
#reset-angle { position: absolute; bottom: 8px; right: 8px; font-size: 1.3rem; }
#painter { display: block; color: #ffe0a8; font-weight: 750; margin-top: 10px; overflow-wrap: anywhere; }
#rotation-hint { display: block; margin: 4px auto 0; max-width: 30ch; color: #ddd8ca; font-size: .82rem; }
#retry-art { margin-top: 8px; }
dialog p,
dd {
  font-size: 0.92rem;
  color: #e4dfe9;
}
dt {
  font-weight: 700;
  color: var(--gold);
  margin: 10px 0 2px;
}
dd {
  margin: 0;
}
dl {
  margin: 0;
}
@media (max-width: 950px) {
  #help-tip {
    display: none;
  }
  .dock {
    gap: 12px;
  }
}
@media (max-width: 620px) {
  header {
    inset: max(15px, env(safe-area-inset-top)) 12px auto;
    align-items: center;
    flex-wrap: wrap;
  }
  .corner { margin-left: auto; }
  h1 {
    font-size: clamp(16px, 4.3vw, 25px);
  }
  .presence {
    padding: 0.33rem 0.65rem;
    font-size: 0.75rem;
    min-height: 32px;
    gap: 5px;
  }
  .round {
    width: 32px;
    height: 32px;
  }
  .corner {
    gap: 5px;
  }
  #entry {
    width: min(360px, calc(100% - 20px));
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 10px 13px;
    border-radius: 22px;
  }
  #entry .identity {
    grid-column: 1;
    min-width: 0;
    gap: 5px;
  }
  #nick {
    width: 100%;
    min-width: 0;
  }
  .identity img {
    width: 31px;
    height: 31px;
    flex: none;
  }
  #gallery h2 { font-size: clamp(1.05rem, 4.65vw, 1.4rem); }
  input {
    width: 125px;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 16px;
  }
  fieldset {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: center;
    padding: 2px 0 1px;
    border: 0;
  }
  .swatch {
    width: 24px;
    height: 24px;
  }
  #colors {
    gap: 10px;
  }
  #join {
    grid-column: 2;
    grid-row: 1;
    padding: 0.4rem 0.75rem;
    min-height: 36px;
  }
  .dock {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}
@media (pointer: coarse), (max-width: 620px) {
  #stick:not([hidden]) {
    display: block;
  }
  #play {
    left: auto;
    right: max(13px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    transform: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    width: min(248px, calc(100% - 128px));
  }
  #play #carry {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  #play .who {
    display: none;
  }
  #play .action,
  #play .gold {
    font-size: 0.86rem;
    min-height: 44px;
    padding: 5px 7px;
    white-space: normal;
  }
  #play kbd,
  #help-tip {
    display: none;
  }
}
@media (max-height: 480px) {
  #entry,
  .dock {
    bottom: 9px;
  }
  header {
    top: 8px;
  }
  #stick {
    width: 74px;
    bottom: 12px;
  }
}
