@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;
}
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: #b2b3d8;
  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, rgba(10, 15, 48, 0.15), transparent 25%);
  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;
}
.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;
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  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;
}
#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;
}
#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;
}
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;
  }
  h1 {
    font-size: clamp(17px, 5vw, 27px);
  }
  .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: fit-content;
    max-width: calc(100% - 20px);
    display: grid;
    grid-template-columns: minmax(0, max-content) max-content;
    gap: 8px 12px;
    padding: 10px 13px;
    border-radius: 22px;
  }
  #entry .identity {
    grid-column: 1;
    gap: 5px;
  }
  .identity img {
    width: 31px;
    height: 31px;
  }
  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;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    max-width: calc(100% - 128px);
  }
  #play .who {
    display: none;
  }
  #play .action,
  #play .gold {
    font-size: 0.86rem;
    padding: 8px 11px;
  }
  #play kbd,
  #help-tip {
    display: none;
  }
}
@media (max-height: 480px) {
  #entry,
  .dock {
    bottom: 9px;
  }
  header {
    top: 8px;
  }
  #stick {
    width: 74px;
    bottom: 12px;
  }
}
