/* biome-ignore-all lint/style/noDescendingSpecificity: Recovered route-specific views intentionally override the shared legacy shell by data-view specificity. */
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-regular-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F,
    U+FE2E-FE2F;
}

/* Recovered public homepage, measured against the live Tanggle shell. */
body[data-view="home"] {
  overflow-x: hidden;
  color: #8ba5af;
  background: #072533;
}

body[data-view="home"] .topbar {
  position: fixed;
  z-index: 15;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  min-height: 0;
  margin: 0;
  padding: 0 24px;
  border: 0;
  background: rgb(4 22 37 / var(--header-height-ratio));
  backdrop-filter: blur(8px);
}

body[data-view="home"] .brand-logo {
  display: block;
  width: auto;
  height: max(calc(40px * var(--header-height-ratio)), 32px);
  image-rendering: pixelated;
}

body[data-view="home"] .topbar-actions {
  gap: 8px;
}

body[data-view="home"] .header-pixel-button,
body[data-view="home"] .header-pixel-button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid #244958;
  border-radius: 4px;
  color: #c6d4d8;
  background: #102f3c;
  text-decoration: none;
}

body[data-view="home"] .profile-button {
  width: calc(var(--header-height) * 0.8);
  height: calc(var(--header-height) * 0.8);
  margin-left: 4px;
  color: #fff;
  background: #153544;
  border-radius: 50%;
}

body[data-view="home"] .profile-avatar {
  width: 65%;
  height: 65%;
  border: 0;
  border-radius: 0;
}

body[data-view="home"] .header-pixel-button img {
  width: 20px;
  height: 20px;
}

body[data-view="home"] .header-gallery {
  display: grid;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid #e4b224;
  border-radius: 4px;
  color: #17252c;
  background: #ffd13e;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.language-menu {
  position: fixed;
  z-index: 30;
  top: calc(var(--header-height) + 8px);
  right: 150px;
  width: 132px;
  padding: 6px;
  border: 1px solid #315363;
  border-radius: 4px;
  color: #d8e1e4;
  background: #0b2936;
  box-shadow: 0 12px 30px rgb(0 0 0 / 35%);
}

.language-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 3px;
  text-decoration: none;
}

.language-menu a:hover,
.language-menu a:focus-visible,
.language-menu a[aria-current="page"] {
  color: #ffd13e;
  background: #153746;
}

body[data-view="home"] main {
  width: 100%;
  margin: 0;
  padding: var(--header-height) 0 0;
}

.home-view {
  position: relative;
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  margin-inline: auto;
  padding: 0;
}

.home-hero {
  position: relative;
  display: flex;
  width: 100%;
  height: 205px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 16px;
  overflow: hidden;
  color: #eef4f2;
  background:
    linear-gradient(rgb(0 0 0 / 75%), rgb(0 0 0 / 75%)),
    url("/assets/home/hero.avif") center / cover no-repeat;
}

.home-hero-logo {
  width: auto;
  max-width: calc(100% - 32px);
  height: 100px;
  image-rendering: pixelated;
}

.home-hero h1 {
  max-width: none;
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.home-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 240px);
  justify-content: center;
  gap: 24px;
  min-width: 0;
  margin: 16px auto 0;
  padding: 0;
  border: 0;
}

[data-public-room-control][hidden] {
  display: none;
}

.home-entry-card {
  position: relative;
  display: flex;
  width: 240px;
  height: 240px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  color: #e5ecee;
  background: #153544;
  font: inherit;
  text-align: center;
  text-decoration: none;
  transition: all 0.1s ease-in-out;
}

.home-entry-card > img,
.home-card-copy > img {
  width: 25px;
  height: 25px;
  filter: invert(1);
}

.home-entry-card strong,
.home-card-copy strong {
  font-size: 20px;
  line-height: 1.2;
}

.home-entry-card small,
.home-card-copy small {
  max-width: 180px;
  color: #8ba5af;
  font-size: 16px;
  line-height: 1.1;
}

.home-entry-card:hover,
.home-entry-card:focus-visible {
  z-index: 4;
  color: #ffd13e;
  background-color: #193c4c;
  transform: scale(1.1);
}

.home-live-count {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #b0c2c8;
  font-size: 12px;
}

.home-live-count > span {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ed4c72;
}

.home-live-count > span::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  content: "";
  animation: home-live-ripple 1s linear infinite;
}

@keyframes home-live-ripple {
  0% { opacity: 0.6; transform: scale(0); }
  100% { opacity: 0; transform: scale(2.8); }
}

.home-upload-card {
  border: 2px dashed #3c5a68;
  cursor: pointer;
}

.home-image-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-upload-card:has(.home-image-upload-input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.home-gallery-card {
  isolation: isolate;
}

.home-card-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 5px #061820;
}

.home-marquee {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-inline: 8px;
  opacity: 0.1;
}

.home-gallery-card::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: rgb(7 32 43 / 42%);
}

.home-marquee-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: home-marquee-forward 180s linear infinite;
}

.home-marquee-column img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.home-marquee-reverse {
  animation-name: home-marquee-reverse;
}

@keyframes home-marquee-forward {
  from { transform: translateY(-50%); }
  to { transform: translateY(0); }
}

@keyframes home-marquee-reverse {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.home-feature-carousel {
  position: relative;
  display: grid;
  width: 100%;
  height: 320px;
  margin: 16px auto 0;
  padding: 0 24px;
  place-items: center;
  border-radius: 3px;
  overflow: hidden;
  background: #061e2c;
  text-align: center;
}

.home-feature-carousel::before,
.home-feature-carousel::after {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 120px;
  pointer-events: none;
  content: "";
}

.home-feature-carousel::before {
  left: 0;
  background: linear-gradient(90deg, #061e2c 0%, rgb(6 30 44 / 90%) 25%, transparent 100%);
}

.home-feature-carousel::after {
  right: 0;
  background: linear-gradient(-90deg, #061e2c 0%, rgb(6 30 44 / 90%) 25%, transparent 100%);
}

.home-feature-slides {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}

.home-feature-slides[data-dragging="true"] {
  cursor: grabbing;
}

.home-feature-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-feature-slides[data-dragging="true"] .home-feature-track {
  transition: none;
}

.home-feature-slides article {
  display: grid;
  min-width: 0;
  max-width: none;
  height: 100%;
  flex: 0 0 100%;
  align-content: center;
  justify-items: center;
  padding: 38px 72px 58px;
  user-select: none;
}

.home-feature-slides h2 {
  margin: 0 0 18px;
  color: #eff4f2;
  font-size: 24px;
}

.home-feature-slides p {
  margin: 0 0 10px;
  color: #8ba5af;
  font-size: 16px;
}

.home-feature-slides small {
  color: #506c78;
  font-size: 14px;
}

.home-feature-support {
  position: relative;
  min-width: 0;
}

.home-feature-bloom {
  position: absolute;
  z-index: -1;
  top: 50%;
  width: 210px;
  max-height: 290px;
  object-fit: contain;
  opacity: 0.62;
  transform: translateY(-50%);
}

.home-feature-bloom-left {
  right: calc(100% - 80px);
}

.home-feature-bloom-right {
  left: calc(100% - 80px);
}

.home-feature-heart {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

body[data-view="home"] .home-feature-subscribe {
  display: inline-flex;
  width: auto;
  min-width: 120px;
  margin-top: 12px;
  padding: 9px 18px;
  color: #34151d;
  background: #f5b6c4;
}

.home-feature-slides a,
.home-footer a {
  color: #d5a929;
  text-decoration: none;
}

.home-feature-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  color: #8ba5af;
  background: transparent;
  transform: translateY(-50%);
}

.home-feature-arrow img {
  width: 22px;
  height: 22px;
}

.home-feature-previous {
  left: 18px;
}

.home-feature-next {
  right: 18px;
}

.home-feature-dots {
  position: absolute;
  bottom: 18px;
  display: flex;
  z-index: 3;
  gap: 0;
}

.home-feature-dot {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #6d8791 0 4px, transparent 4.5px);
}

.home-feature-dot[aria-selected="true"] {
  background: radial-gradient(circle, #d8e1e4 0 4px, transparent 4.5px);
}

.home-feature-pause {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 16px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #294856;
  border-radius: 3px;
  color: #8ba5af;
  background: #061e2c;
  font: inherit;
  font-size: 11px;
}

.home-feature-pause:hover,
.home-feature-pause:focus-visible,
.home-feature-pause[aria-pressed="true"] {
  color: #eff4f2;
  border-color: #6d8791;
}

.home-footer {
  display: flex;
  width: 100%;
  min-height: 174px;
  margin: 16px auto 0;
  padding: 16px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top: 1px dashed #284b59;
  color: #506c78;
  background: #041625;
  text-align: center;
}

.home-footer > img {
  width: auto;
  height: 44px;
  margin: 10px 0 6px;
  image-rendering: pixelated;
}

.pixel-social-icon {
  image-rendering: pixelated;
}

@media (prefers-reduced-motion: reduce) {
  .home-entry-card,
  .home-feature-track {
    transition-duration: 0.001ms;
  }

  .home-live-count > span::before,
  .home-marquee-column {
    animation: none;
  }
}

@media (pointer: coarse) {
  .home-entry-card:hover,
  .home-entry-card:focus-visible {
    transform: none;
  }

  .home-feature-arrow {
    display: none;
  }
}

.home-footer p {
  margin: 0 0 5px;
  font-size: 12px;
}

.home-footer nav {
  display: flex;
  gap: 7px;
  font-size: 12px;
}

.home-footer-socials {
  display: flex;
  gap: 8px;
}

.home-footer-socials a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #284b59;
  border-radius: 4px;
  background: #0d2b38;
}

.home-footer-socials img {
  width: 18px;
  height: 18px;
}

@media (max-width: 720px) {
  body[data-view="home"] .topbar {
    width: 100%;
    min-height: 70px;
    margin: 0;
    padding: 0 8px;
  }

  body[data-view="home"] .brand {
    position: static;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
  }

  body[data-view="home"] .brand-logo {
    width: 32px;
    height: 32px;
  }

  body[data-view="home"] .topbar-actions {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 8px;
  }

  body[data-view="home"] .header-pixel-button,
  body[data-view="home"] .header-gallery {
    height: 32px;
  }

  body[data-view="home"] .profile-button {
    width: 56px;
    height: 56px;
  }

  body[data-view="home"] .profile-avatar {
    width: 65%;
    height: 65%;
  }

  body[data-view="home"] .header-gallery {
    display: grid;
  }

  .home-view {
    width: 100%;
    min-height: calc(100vh - 50px);
    padding: 0;
  }

  .home-hero {
    width: 100%;
    height: 205px;
    margin-inline: 0;
  }

  .home-hero-logo {
    width: auto;
    height: 60px;
  }

  .home-hero h1 {
    margin-top: 0;
    padding-inline: 14px;
    font-size: 14px;
    text-align: center;
  }

  .home-entry-grid {
    grid-template-columns: repeat(2, min(calc(50vw - 4px), 240px));
    gap: 8px;
    margin-top: 16px;
  }

  .home-entry-card {
    width: min(calc(50vw - 4px), 240px);
    height: auto;
    aspect-ratio: 1;
    gap: 5px;
  }

  .home-entry-card strong,
  .home-card-copy strong {
    font-size: 20px;
  }

  .home-entry-card small,
  .home-card-copy small {
    max-width: 160px;
    font-size: 16px;
  }

  .home-upload-card {
    grid-column: 1 / -1;
    width: min(calc(50vw - 4px), 240px);
    height: auto;
    justify-self: center;
    margin-top: 0;
  }

  .home-live-count {
    top: 7px;
    right: 8px;
    font-size: 10px;
  }

  .home-feature-carousel {
    width: 100%;
    min-height: 320px;
    margin-top: 16px;
    padding: 32px 42px 48px;
  }

  .home-feature-slides h2 {
    margin-bottom: 10px;
    font-size: 21px;
  }

  .home-feature-slides p {
    font-size: 14px;
  }

  .home-feature-slides small {
    font-size: 12px;
  }

  .home-feature-previous {
    left: 2px;
  }

  .home-feature-next {
    right: 2px;
  }

  .home-feature-pause {
    right: 6px;
    bottom: 12px;
  }

  .home-footer {
    width: 100%;
    min-height: 150px;
    margin: 16px 0 0;
  }
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-regular-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-regular-greek-ext.woff2") format("woff2");
  unicode-range: U+1F00-1FFF;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-regular-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
    U+03A3-03FF;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-regular-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
    U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
    U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-regular-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-regular-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-bold-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F,
    U+FE2E-FE2F;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-bold-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-bold-greek-ext.woff2") format("woff2");
  unicode-range: U+1F00-1FFF;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-bold-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
    U+03A3-03FF;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-bold-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169,
    U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
    U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-bold-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/fira-sans-bold-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fira Sans Fallback";
  src: local(Arial);
  ascent-override: 91.01%;
  descent-override: 25.79%;
  line-gap-override: 0%;
  size-adjust: 102.74%;
}

:root {
  --header-height: 70px;
  --header-height-ratio: 1;
  --surface-base: #071820;
  --surface-raised: #0a2632;
  --surface-panel: #0c2e3b;
  --surface-input: #123947;
  --border-subtle: #1d4654;
  --border-strong: #37616e;
  --text-primary: #f4f7f5;
  --text-secondary: #9eb1b7;
  --text-muted: #70878f;
  --accent: #ffd34d;
  --accent-strong: #f7bd24;
  --accent-ink: #152029;
  --online: #87d5aa;
  --danger: #ff8e85;
  --focus: #9ee6ff;
  --radius-small: 0.375rem;
  --radius-medium: 0.625rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  font-family: "Fira Sans", "Fira Sans Fallback", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--surface-base);
  color-scheme: dark;
  font-synthesis: none;
}

/* Keep the static HTML shell from briefly exposing the wrong route while the
   browser bundle is loading. The app replaces this neutral splash only after
   it has selected and configured the current route. */
html:not([data-ready="true"]) body > :not(.boot-splash) {
  visibility: hidden;
}

.boot-splash {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.75rem;
  color: #9eb1b7;
  background: #0f1f2e;
  font-size: 0.875rem;
}

html[data-ready="true"] .boot-splash {
  display: none;
}

.boot-splash-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #87d5aa;
  box-shadow: 0 0 0 0.5rem rgb(135 213 170 / 12%);
  animation: boot-pulse 900ms ease-in-out infinite alternate;
}

@keyframes boot-pulse {
  to {
    opacity: 0.45;
    transform: scale(0.78);
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-splash-dot {
    animation: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-base);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgb(24 75 83 / 25%), transparent 28rem),
    var(--surface-base);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

a {
  color: inherit;
}

.landing[hidden],
.room-layout[hidden],
.error-panel[hidden],
.create-options[hidden],
.room-password-field[hidden] {
  display: none;
}

:focus-visible {
  outline: 0.1875rem solid var(--focus);
  outline-offset: 0.1875rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--accent-ink);
  background: var(--accent);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) clamp(1rem, 4vw, 4rem);
  border-bottom: 0.0625rem solid rgb(55 97 110 / 45%);
  background: rgb(7 24 32 / 88%);
  backdrop-filter: blur(0.75rem);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.profile-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  overflow: hidden;
  place-items: center;
  border: 0.0625rem solid var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--text-primary);
  background: var(--surface-raised);
  box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 18%);
}

.profile-button:hover {
  border-color: var(--accent);
  background: var(--surface-panel);
}

.profile-cursor-canvas {
  width: 2.25rem;
  height: 2.25rem;
  image-rendering: pixelated;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-primary);
  text-decoration: none;
}

.brand strong {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.connection-status {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0.75rem rgb(135 213 170 / 55%);
}

main {
  width: min(100% - 2rem, 76rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0;
}

.landing {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.assembly-preview {
  position: relative;
  min-height: 32rem;
  overflow: hidden;
  border: 0.0625rem solid var(--border-subtle);
  border-radius: var(--radius-medium);
  background: #0a1d29;
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 28%);
}

.preview-toolbar {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 0.0625rem solid var(--border-subtle);
}

.preview-toolbar span {
  width: 2rem;
  height: 2rem;
  border: 0.0625rem solid var(--border-strong);
  border-radius: var(--radius-small);
  background: var(--surface-raised);
}

.preview-counter {
  position: absolute;
  top: 4.75rem;
  right: var(--space-4);
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.puzzle-outline {
  position: absolute;
  top: 37%;
  left: 50%;
  width: 34%;
  aspect-ratio: 5 / 3;
  border: 0.125rem solid var(--border-subtle);
  transform: translate(-50%, -50%);
}

.preview-piece {
  position: absolute;
  width: 3.25rem;
  height: 3.25rem;
  border: 0.0625rem solid rgb(255 255 255 / 12%);
  border-radius: 28% 10% 24% 12%;
  background: #4d8792;
  box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 28%);
}

.piece-a { top: 23%; left: 14%; background: #9abbd2; transform: rotate(-7deg); }
.piece-b { top: 19%; right: 17%; background: #d2ad55; transform: rotate(8deg); }
.piece-c { top: 45%; left: 8%; background: #497f70; transform: rotate(5deg); }
.piece-d { top: 49%; right: 9%; background: #9b6c4e; transform: rotate(-5deg); }
.piece-e { bottom: 18%; left: 20%; background: #b3c7ca; transform: rotate(9deg); }
.piece-f { bottom: 15%; right: 22%; background: #3f8295; transform: rotate(-8deg); }
.piece-g { bottom: 26%; left: 44%; background: #6d9363; transform: rotate(4deg); }
.piece-h { top: 29%; left: 43%; background: #d8c981; transform: rotate(-3deg); }

.preview-chat {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: var(--space-4);
  border-top: 0.0625rem solid var(--border-subtle);
  color: var(--text-muted);
  background: #0b2230;
}

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: var(--space-5);
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.lede {
  max-width: 38rem;
  margin-bottom: var(--space-8);
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.session-form {
  max-width: 34rem;
  padding: var(--space-5);
  border: 0.0625rem solid var(--border-subtle);
  border-radius: var(--radius-medium);
  background: rgb(10 38 50 / 82%);
}

label,
legend {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 3rem;
  padding: 0 var(--space-3);
  border: 0.0625rem solid var(--border-strong);
  border-radius: var(--radius-small);
  color: var(--text-primary);
  background: var(--surface-input);
}

input::placeholder {
  color: var(--text-muted);
}

.create-options {
  margin: var(--space-5) 0 0;
  padding: var(--space-5) 0 0;
  border: 0;
  border-top: 0.0625rem solid var(--border-subtle);
}

.field-row {
  display: grid;
  gap: var(--space-4);
}

.difficulty-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: 0;
  border: 0;
}

.difficulty-options legend {
  grid-column: 1 / -1;
  margin: 0;
}

.difficulty-option {
  display: flex;
  gap: var(--space-3);
  min-height: 5.25rem;
  margin: 0;
  padding: var(--space-3);
  border: 0.0625rem solid var(--border-strong);
  border-radius: var(--radius-small);
  background: var(--surface-input);
  cursor: pointer;
}

.difficulty-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.125rem rgb(255 211 77 / 14%);
}

.difficulty-option input {
  width: 1rem;
  min-height: 1rem;
  margin: 0.2rem 0 0;
  accent-color: var(--accent);
}

.difficulty-option span,
.difficulty-option small {
  display: block;
}

.difficulty-option strong {
  color: var(--text-primary);
}

.difficulty-option small {
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.35;
}

.form-note,
.form-status,
.copy-status {
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.form-note {
  margin: var(--space-4) 0;
}

.form-status {
  display: block;
  min-height: 1.25rem;
  margin-top: var(--space-3);
}

.primary-button,
.icon-button {
  min-height: 3rem;
  border: 0;
  border-radius: var(--radius-small);
  font-weight: 850;
}

.primary-button {
  width: 100%;
  padding: 0 var(--space-5);
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 0.5rem 1.5rem rgb(255 211 77 / 14%);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.room-layout {
  display: grid;
  gap: var(--space-5);
}

.room-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 0.0625rem solid var(--border-subtle);
}

.room-header h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.room-stage,
.room-sidebar {
  min-width: 0;
  border: 0.0625rem solid var(--border-subtle);
  border-radius: var(--radius-medium);
  background: var(--surface-raised);
}

.stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-bottom: 0.0625rem solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.stage-toolbar strong {
  color: var(--text-primary);
}

.puzzle-board {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 31rem;
  place-items: center;
  overflow: hidden;
  background: #0f1f2e;
}

.puzzle-board canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.puzzle-board[data-panning="true"] canvas,
.puzzle-board[data-dragging-piece-id] canvas {
  cursor: grabbing;
}

.camera-controls {
  position: absolute;
  z-index: 2;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  min-inline-size: 0;
  gap: var(--space-1);
  margin: 0;
  padding: var(--space-1);
  border: 0.0625rem solid var(--border-subtle);
  border-radius: var(--radius-small);
  background: rgb(7 24 32 / 88%);
  backdrop-filter: blur(0.5rem);
}

.visually-hidden {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.camera-button {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 var(--space-2);
  border: 0.0625rem solid transparent;
  border-radius: var(--radius-small);
  color: var(--text-primary);
  background: transparent;
  font-weight: 850;
  touch-action: manipulation;
}

.camera-button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-input);
}

.camera-fit {
  min-width: 3.5rem;
  color: var(--accent);
}

.board-message {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 50%;
  display: grid;
  max-width: 20rem;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-5);
  text-align: center;
  background: rgb(7 24 32 / 88%);
  transform: translate(-50%, -50%);
}

.puzzle-board[data-status="ready"] .board-message {
  display: none;
}

.connection-recovery {
  position: absolute;
  z-index: 180;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(15 31 46 / 46%);
  backdrop-filter: blur(0.125rem);
}

.connection-recovery[hidden] {
  display: none;
}

.connection-recovery-card {
  width: min(37.5rem, 100%);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 0.0625rem solid var(--border-subtle);
  border-radius: var(--radius-medium);
  color: var(--text-primary);
  text-align: center;
  background: rgb(25 31 38 / 96%);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 28%);
}

.connection-recovery-card h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.connection-recovery-card p {
  margin: 0.5rem 0 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.connection-retry {
  width: auto;
  min-width: 8rem;
  min-height: 2.75rem;
}

.completion-overlay {
  position: fixed;
  z-index: 200;
  right: 50%;
  bottom: 90px;
  width: min(600px, 90vw);
  pointer-events: none;
  transform: translateX(50%);
}

.completion-overlay[hidden] {
  display: none;
}

.completion-card {
  position: relative;
  width: 100%;
  padding: 16px 24px;
  border: 2px solid #2e2e2e;
  border-radius: 6px;
  color: #fff;
  background: rgb(7 37 51 / 70%);
  box-shadow: 0 4px 8px #0003, 0 6px 20px #00000030;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  text-align: center;
  pointer-events: auto;
  animation: completion-slide-up 200ms ease-out;
}

@keyframes completion-slide-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.completion-overlay[data-closing="true"] .completion-card {
  pointer-events: none;
  animation: completion-slide-down 200ms ease-in forwards;
}

@keyframes completion-slide-down {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(100%);
  }
}

.completion-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.completion-card h2 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.completion-statistics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
}

.completion-statistic {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.completion-statistic p {
  flex: 1;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
  text-align: left;
}

.completion-emoji {
  font-size: 32px;
  line-height: 1;
}

.completion-divider {
  align-self: stretch;
  width: 2px;
  margin: 4px 4px 4px 0;
  background: #2e2e2e;
}

.completion-replay {
  min-height: 2.25rem;
  padding: 0.4rem 0.8rem;
  border: 0;
  border-radius: 0.25rem;
  color: #072533;
  background: #ffcf36;
  font: inherit;
  font-weight: 700;
}

.completion-replay:disabled {
  opacity: 0.55;
}

.completion-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 0;
  border-radius: 0.25rem;
  background: #f03e3e;
}

.completion-close:hover {
  background: #e03131;
}

.completion-close img {
  width: 1rem;
  height: 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.78;
}

.board-message span:last-child {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.board-pulse {
  width: 0.75rem;
  height: 0.75rem;
  margin-bottom: var(--space-2);
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 0.5rem rgb(135 213 170 / 12%);
}

.room-sidebar {
  align-self: start;
  padding: var(--space-5);
}

.room-code-block {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 0.0625rem solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.room-code-block strong {
  max-width: 14rem;
  overflow: hidden;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-block {
  padding: var(--space-5) 0;
  border-bottom: 0.0625rem solid var(--border-subtle);
}

.invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
}

.icon-button {
  padding: 0 var(--space-4);
  border: 0.0625rem solid var(--border-strong);
  color: var(--text-primary);
  background: var(--surface-input);
}

.copy-status {
  min-height: 1.25rem;
  margin: var(--space-2) 0 0;
}

.players-panel {
  padding-top: var(--space-5);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.section-heading h2 {
  font-size: 1rem;
}

.section-heading span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.player-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.player-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 3rem;
  padding: var(--space-2) var(--space-3);
  border: 0.0625rem solid var(--border-subtle);
  border-radius: var(--radius-small);
  background: var(--surface-panel);
}

.player-avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
}

.player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.self-label {
  color: var(--text-muted);
  font-size: 0.6875rem;
  text-transform: uppercase;
}

.error-panel {
  max-width: 34rem;
  margin: var(--space-5) 0;
  padding: var(--space-4);
  border: 0.0625rem solid rgb(255 142 133 / 45%);
  border-left: 0.25rem solid var(--danger);
  border-radius: var(--radius-small);
  background: rgb(93 34 35 / 34%);
}

.error-panel p {
  margin: var(--space-2) 0 0;
  color: #ffd2ce;
  line-height: 1.5;
}

@media (min-width: 48rem) {
  .field-row {
    grid-template-columns: 1.6fr 1fr;
  }

  .room-layout {
    grid-template-columns: minmax(0, 1fr) 19rem;
  }

  .room-header {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .landing {
    grid-template-columns: minmax(24rem, 0.9fr) minmax(28rem, 1.1fr);
  }

  .assembly-preview {
    min-height: 39rem;
  }
}

@media (max-width: 35rem) {
  main {
    width: min(100% - 1.25rem, 76rem);
  }

  .topbar {
    padding-inline: var(--space-3);
  }

  .assembly-preview {
    min-height: 24rem;
  }

  .session-form,
  .room-sidebar {
    padding: var(--space-4);
  }

  .room-header {
    align-items: start;
    flex-direction: column;
  }

  .puzzle-board {
    min-height: 23rem;
  }
}

/* Source-matched Tanggle create flow. Measured against the preserved 1280x720 capture. */
body[data-view="create"] {
  min-height: 100dvh;
  overflow: hidden;
  background: #071923;
  font-family: "Fira Sans", "Fira Sans Fallback", Arial, sans-serif;
}

body[data-view="create"]::before,
body[data-view="create"]::after {
  position: fixed;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
}

body[data-view="create"]::before {
  background-image: var(--create-backdrop-image);
  background-position: center;
  background-size: cover;
  filter: blur(4px);
  transform: scale(1.02);
}

body[data-view="create"]::after {
  background: rgb(0 10 15 / 76%);
}

body[data-view="create"] .topbar {
  position: relative;
  z-index: 2;
  filter: blur(2px);
}

body[data-view="create"] main {
  position: fixed;
  z-index: 3;
  inset: 0;
  width: 100%;
  margin: 0;
  padding: 5dvh 1rem;
  overflow: auto;
}

body[data-view="create"] .landing {
  display: block;
  width: min(780px, calc(100vw - 2rem));
  max-height: 90dvh;
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgb(64 107 121 / 30%);
  border-radius: 3px;
  background: #082c3a;
  box-shadow: 0 24px 70px rgb(0 0 0 / 52%);
  transition: width 140ms ease;
}

body[data-view="create"] .landing[data-step="type"],
body[data-view="create"] .landing[data-step="registration"] {
  width: min(620px, calc(100vw - 2rem));
}

body[data-view="create"] .assembly-preview {
  display: none;
}

.create-dialog-header {
  position: relative;
  min-height: 104px;
  padding: 18px 16px 10px;
}

.create-dialog-header > h1 {
  max-width: none;
  margin: 0;
  color: #b6c5ca;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
}

.create-dialog-header > .dialog-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #a9bbc0;
}

.create-dialog-header > .dialog-close:hover {
  border-color: #ffcf36;
}

.create-dialog-header > .dialog-close img {
  width: 17px;
  height: 17px;
  filter: invert(86%) sepia(8%) saturate(240%) hue-rotate(143deg) brightness(91%);
}

.create-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 17px 0 0;
  padding: 0;
  color: #90a5ac;
  list-style: none;
}

.create-progress::before {
  position: absolute;
  width: 22px;
  height: 2px;
  margin-left: -2px;
  background: #31515c;
  content: "";
}

.create-progress li {
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
}

.create-progress li:first-child {
  margin-right: 22px;
}

.create-progress li > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #5c7680;
  border-radius: 50%;
  color: #8fa3aa;
  background: #173c4a;
}

.create-progress li > span img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.create-progress li > span .create-progress-check {
  display: none;
}

.create-progress li strong {
  font-weight: 400;
}

.create-progress li[data-state="current"] > span {
  border-color: #ffcf36;
  color: #d8e1e4;
}

.create-progress li[data-state="complete"] > span {
  border-color: #ffcf36;
  color: #072533;
  background: #ffcf36;
}

.create-progress li[data-state="complete"] > span b {
  display: none;
}

.create-progress li[data-state="complete"] > span .create-progress-check {
  display: block;
  opacity: 1;
}

.create-type-step {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 6px 24px 24px;
}

.create-type-step[hidden],
.create-registration-gate[hidden],
.create-settings-step[hidden] {
  display: none;
}

.create-type-step button {
  min-height: 108px;
  padding: 13px 10px;
  border: 0;
  border-radius: 3px;
  color: #dae4e7;
  background: #123b4a;
  box-shadow: inset 0 0 0 1px rgb(80 124 138 / 8%);
}

.create-type-step button:hover {
  background: #194554;
  box-shadow: inset 0 0 0 1px #ffcf36;
}

.create-type-step strong,
.create-type-step span {
  display: block;
}

.create-type-step strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 500;
}

.create-type-step strong img {
  width: 24px;
  height: 24px;
}

.create-type-step span {
  color: #829aa2;
  font-size: 12px;
  line-height: 1.35;
}

.create-registration-gate {
  padding: 8px 24px 24px;
  text-align: center;
}

.create-registration-gate h2 {
  color: #dbe4e7;
  font-size: 20px;
  font-weight: 500;
}

.create-registration-gate p {
  max-width: 430px;
  margin: 0 auto 20px;
  color: #91a5ac;
  line-height: 1.5;
}

.create-registration-gate button {
  min-width: 96px;
  min-height: 36px;
  border: 0;
  border-radius: 3px;
  color: #072533;
  background: #ffcf36;
  font-weight: 700;
}

body[data-view="create"] .create-settings-step {
  padding: 0 16px 16px;
}

body[data-view="create"] .create-settings-step > .eyebrow,
body[data-view="create"] .create-settings-step > h1,
body[data-view="create"] .create-settings-step > .lede,
body[data-view="create"] .session-form > label[for="display-name"],
body[data-view="create"] #display-name,
body[data-view="create"] .form-note {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-view="create"] .session-form {
  display: flex;
  max-width: none;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-view="create"] .create-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "difficulty players"
    "pieces players"
    "mystery players";
  gap: 0 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

body[data-view="create"] .create-options > legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body[data-view="create"] .difficulty-options,
body[data-view="create"] .piece-count-settings,
body[data-view="create"] .create-switch,
body[data-view="create"] .player-settings {
  background: #062633;
}

body[data-view="create"] .difficulty-options {
  grid-area: difficulty;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 16px 16px 8px;
}

body[data-view="create"] .difficulty-options legend,
.create-section-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  color: #849aa2;
  font-size: 15px;
  font-weight: 400;
  text-align: center;
}

body[data-view="create"] .difficulty-options legend::before,
body[data-view="create"] .difficulty-options legend::after,
.create-section-heading > span {
  height: 2px;
  flex: 1;
  background: repeating-linear-gradient(90deg, #52707a 0 6px, transparent 6px 9px);
  content: "";
}

.create-section-heading h2 {
  margin: 0;
  color: #849aa2;
  font-size: 15px;
  font-weight: 400;
}

body[data-view="create"] .difficulty-option {
  min-height: 32px;
  align-items: center;
  padding: 5px 9px;
  border: 0;
  border-radius: 2px;
  background: #061e2a;
}

body[data-view="create"] .difficulty-option:has(input:checked) {
  background: #416575;
  box-shadow: none;
}

body[data-view="create"] .difficulty-option input {
  width: 0;
  height: 0;
  min-height: 0;
  margin: 0;
  opacity: 0;
}

body[data-view="create"] .difficulty-option strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #d6e1e4;
  font-size: 14px;
  font-weight: 500;
}

body[data-view="create"] .difficulty-option strong img {
  width: 20px;
  height: 20px;
}

body[data-view="create"] .difficulty-option:last-child strong img {
  width: 22px;
  height: 22px;
}

body[data-view="create"] .difficulty-option small {
  display: none;
}

body[data-view="create"] .piece-count-settings {
  display: flex;
  grid-area: pieces;
  flex-direction: column;
  align-items: stretch;
  padding: 6px 16px 4px;
  text-align: center;
}

body[data-view="create"] .piece-count-settings > .create-section-heading {
  display: none;
}

body[data-view="create"] .piece-count-settings > p,
body[data-view="create"] .player-settings > p {
  margin: 0 0 7px;
  color: #8ba0a7;
  font-size: 12px;
  line-height: 1.25;
}

body[data-view="create"] .piece-count-settings > p::first-line,
body[data-view="create"] .player-settings > p::first-line {
  color: #a8b7bc;
}

.piece-count-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: center;
  gap: 16px;
}

.piece-count-controls input[type="range"] {
  min-height: 22px;
  padding: 0;
  border: 0;
  accent-color: #ffcf36;
  background: transparent;
}

.piece-count-controls input[type="number"] {
  min-height: 36px;
  padding: 0 8px;
  color: #9aacb2;
  text-align: center;
  background: #163b49;
}

body[data-view="create"] #crop-preview-open {
  align-self: center;
  min-height: 28px;
  margin: 6px 0 8px;
  padding: 4px 12px;
  border: 0;
  border-radius: 3px;
  color: #082532;
  background: #ffcf36;
  font-size: 12px;
  font-weight: 700;
}

body[data-view="create"] #piece-count-quality,
body[data-view="create"] #piece-grid-output {
  display: block;
  color: #879ba2;
  font-size: 12px;
  line-height: 1.45;
}

body[data-view="create"] #piece-count-quality {
  order: 5;
}

body[data-view="create"] #piece-grid-output {
  order: 6;
}

body[data-view="create"] .create-switch {
  display: flex;
  grid-area: mystery;
  gap: 10px;
  min-height: 64px;
  align-items: center;
  margin: 0;
  padding: 4px 16px 12px;
}

body[data-view="create"] .create-switch input {
  width: 21px;
  height: 21px;
  min-height: 21px;
  padding: 0;
  accent-color: #ffcf36;
}

body[data-view="create"] .create-switch strong,
body[data-view="create"] .create-switch small {
  display: block;
}

body[data-view="create"] .create-switch strong {
  color: #9fb0b5;
  font-size: 13px;
  font-weight: 400;
}

body[data-view="create"] .create-switch small {
  margin-top: 4px;
  color: #6f8790;
  font-size: 11px;
  font-weight: 400;
}

body[data-view="create"] .player-settings {
  display: block;
  grid-area: players;
  min-height: 363px;
  padding: 16px;
}

body[data-view="create"] .player-settings > label {
  margin: 0 0 6px;
  color: #a2b2b7;
  font-size: 13px;
  font-weight: 400;
}

.number-stepper {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
}

.number-stepper button,
.number-stepper input {
  min-height: 36px;
  border: 1px solid #355d6b;
  border-radius: 0;
  color: #9fb0b5;
  background: #163b49;
  text-align: center;
}

.number-stepper button {
  padding: 0;
}

.room-password-field {
  display: grid;
  gap: 5px;
}

.room-password-field > label {
  margin-top: 12px;
  color: #a2b2b7;
  font-size: 13px;
  font-weight: 400;
}

.room-password-field > input {
  min-height: 36px;
}

.room-password-field > small {
  display: block;
  color: #718890;
  font-size: 10px;
  line-height: 1.3;
}

body[data-view="create"] #session-submit {
  align-self: center;
  width: auto;
  min-width: 89px;
  min-height: 36px;
  margin-top: 8px;
  padding: 0 17px;
  border-radius: 3px;
  font-size: 12px;
}

body[data-view="create"] .form-status {
  align-self: center;
  margin-top: 4px;
  text-align: center;
}

.crop-preview-dialog {
  width: min(780px, calc(100vw - 2rem));
  max-height: 90dvh;
  padding: 18px 16px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgb(64 107 121 / 35%);
  border-radius: 3px;
  color: #9fb0b5;
  background: #072533;
  box-shadow: 0 24px 70px rgb(0 0 0 / 60%);
}

.crop-preview-dialog::backdrop {
  background: rgb(0 10 15 / 72%);
  backdrop-filter: blur(3px);
}

.crop-preview-dialog > h2 {
  margin: 0 0 38px;
  font-size: 16px;
  font-weight: 400;
}

.crop-preview-dialog > .dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
}

.crop-preview-dialog > .dialog-close img {
  width: 16px;
  height: 16px;
}

.crop-preview-image-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-left: -1px;
  border: 1px dashed #bfcdd1;
  background: #061e2a;
  touch-action: none;
}

.crop-preview-image-wrap > img {
  display: block;
  width: 100%;
  max-height: 414px;
  object-fit: contain;
}

.crop-selection {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 2px solid #f4f8f9;
  outline: 1px solid rgb(4 18 25 / 72%);
  box-shadow: 0 0 0 9999px rgb(4 18 25 / 55%);
  cursor: move;
  touch-action: none;
}

.crop-selection:focus-visible {
  outline: 3px solid #ffcf36;
  outline-offset: 2px;
}

.crop-preview-grid {
  position: absolute;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-image:
    repeating-linear-gradient(
      to right,
      transparent 0 calc(100% / var(--crop-columns) - 1px),
      rgb(17 47 62 / 48%) calc(100% / var(--crop-columns) - 1px) calc(100% / var(--crop-columns))
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0 calc(100% / var(--crop-rows) - 1px),
      rgb(17 47 62 / 48%) calc(100% / var(--crop-rows) - 1px) calc(100% / var(--crop-rows))
    );
  pointer-events: none;
}

.crop-selection > button[data-crop-handle] {
  position: absolute;
  width: 12px;
  height: 12px;
  min-height: 0;
  padding: 0;
  border: 1px solid #072533;
  border-radius: 0;
  background: #f4f8f9;
  transform: translate(-50%, -50%);
}

.crop-selection > button[data-crop-handle="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.crop-selection > button[data-crop-handle="n"] { top: 0; left: 50%; cursor: ns-resize; }
.crop-selection > button[data-crop-handle="ne"] { top: 0; left: 100%; cursor: nesw-resize; }
.crop-selection > button[data-crop-handle="e"] { top: 50%; left: 100%; cursor: ew-resize; }
.crop-selection > button[data-crop-handle="se"] { top: 100%; left: 100%; cursor: nwse-resize; }
.crop-selection > button[data-crop-handle="s"] { top: 100%; left: 50%; cursor: ns-resize; }
.crop-selection > button[data-crop-handle="sw"] { top: 100%; left: 0; cursor: nesw-resize; }
.crop-selection > button[data-crop-handle="w"] { top: 50%; left: 0; cursor: ew-resize; }

.crop-preview-warning {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  margin: 0;
  padding: 8px 12px;
  border-radius: 3px;
  color: #fff;
  background: rgb(146 40 40 / 92%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.crop-piece-settings {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  text-align: center;
}

.crop-piece-settings .piece-count-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 101px;
  gap: 8px;
  align-items: center;
}

.crop-piece-settings .piece-count-controls > span[aria-hidden="true"] {
  color: #8299a1;
  font-size: 11px;
}

.crop-piece-number {
  display: grid;
  grid-template-columns: 28px 1fr;
  min-height: 36px;
  border: 1px solid #355d6b;
  background: #163b49;
}

.crop-piece-number img {
  width: 15px;
  height: 15px;
  margin: auto;
}

.crop-piece-number input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.crop-piece-settings output {
  display: block;
  color: #8299a1;
  font-size: 13px;
  text-align: center;
}

.crop-preview-dialog > p {
  margin: 20px 0 12px;
  color: #8299a1;
  font-size: 13px;
  text-align: center;
}

.crop-preview-dialog > .primary-button {
  display: block;
  width: auto;
  min-width: 110px;
  min-height: 36px;
  margin: 16px auto 0;
}

.image-preview-status {
  position: fixed;
  z-index: 18;
  top: 4.25rem;
  left: 50%;
  max-width: min(28rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d9aa27;
  border-radius: 3px;
  color: #f4f8f9;
  background: #0b2f3d;
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 45%);
  font-size: 0.8rem;
  transform: translateX(-50%);
}

.image-preview-status[hidden] {
  display: none;
}

@media (max-width: 700px) {
  body[data-view="create"] main {
    padding: 1rem 0.625rem;
  }

  body[data-view="create"] .landing,
  body[data-view="create"] .landing[data-step="type"],
  body[data-view="create"] .landing[data-step="registration"] {
    width: 100%;
    max-height: calc(100dvh - 2rem);
  }

  .create-type-step {
    grid-template-columns: 1fr;
  }

  body[data-view="create"] .create-options {
    grid-template-columns: 1fr;
    grid-template-areas: "difficulty" "pieces" "mystery" "players";
  }

  body[data-view="create"] .player-settings {
    min-height: 220px;
  }

  .crop-preview-dialog {
    width: calc(100vw - 1.25rem);
  }
}

/* Recovered Tanggle room chrome. Measured from the preserved production room. */
body[data-view="room"] {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #0f1f2e;
  font-family: "Fira Sans", "Fira Sans Fallback", Arial, sans-serif;
}

body[data-view="room"] .topbar {
  display: none;
}

body[data-view="room"] main {
  width: 100vw;
  height: 100dvh;
  margin: 0;
  padding: 0;
}

body[data-view="room"] .room-layout {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #0f1f2e;
}

body[data-view="room"] .room-stage {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: #0f1f2e;
}

body[data-view="room"] .puzzle-board {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #0f1f2e;
}

body[data-view="room"] .puzzle-board[data-background="deep-sea"] {
  background: linear-gradient(145deg, #061722 0%, #0d3446 55%, #123f50 100%);
}

body[data-view="room"] .puzzle-board[data-background="sea-glass"] {
  background: linear-gradient(145deg, #08262e 0%, #15545d 52%, #4f7d79 100%);
}

body[data-view="room"] .puzzle-board[data-background="violet"] {
  background: linear-gradient(145deg, #17182c 0%, #34304f 55%, #5a4665 100%);
}

body[data-view="room"] .puzzle-board[data-background="sunset"] {
  background: linear-gradient(145deg, #1d2635 0%, #654551 55%, #a26a58 100%);
}

.room-taskbar {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 50%;
  display: flex;
  max-width: calc(100vw - 1rem);
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
  transition: top 150ms ease-in-out;
  transform: translateX(-50%);
}

.room-taskbar[data-opened="false"] {
  top: -3rem;
}

.taskbar-surface {
  display: flex;
  max-width: calc(100vw - 1rem);
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  overflow-x: auto;
  pointer-events: auto;
  border-right: 0.0625rem solid #263847;
  border-bottom: 0.0625rem solid #263847;
  border-left: 0.0625rem solid #263847;
  border-radius: 0 0 0.5rem 0.5rem;
  background: rgb(7 37 51 / 85%);
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 12%);
  backdrop-filter: blur(0.75rem);
  scrollbar-width: none;
}

.taskbar-surface::-webkit-scrollbar {
  display: none;
}

.taskbar-logo,
.taskbar-button {
  display: grid;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  place-items: center;
  padding: 0;
  border: 0.0625rem solid #294657;
  border-radius: 0.25rem;
  color: #fff;
  background: rgb(8 43 58 / 76%);
}

.taskbar-logo {
  text-decoration: none;
}

.taskbar-logo img {
  width: 1.75rem;
  height: 1.75rem;
  image-rendering: pixelated;
  object-fit: contain;
}

.taskbar-button img,
.overlay-close img,
.taskbar-collapse img {
  width: 1.125rem;
  height: 1.125rem;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.taskbar-button:hover:not(:disabled),
.taskbar-button[aria-expanded="true"] {
  border-color: #426579;
  background: #0d3547;
}

.taskbar-button:disabled {
  opacity: 0.45;
}

.taskbar-divider {
  width: 0.125rem;
  height: 1.75rem;
  flex: 0 0 0.125rem;
  background: #263847;
}

.taskbar-collapse {
  display: grid;
  width: 2.5rem;
  height: 1.25rem;
  place-items: center;
  padding: 0;
  pointer-events: auto;
  border: 0.0625rem solid #263847;
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  color: #fff;
  background: rgb(7 37 51 / 90%);
  backdrop-filter: blur(0.25rem);
}

.taskbar-collapse img {
  width: 0.75rem;
  height: 0.75rem;
  transition: transform 150ms ease-in-out;
}

.room-taskbar[data-opened="false"] .taskbar-collapse img {
  transform: rotate(180deg);
}

.room-sidebar {
  position: absolute;
  z-index: 6;
  top: 0.5rem;
  right: 0.5rem;
  min-width: 11rem;
  max-width: min(20rem, calc(100vw - 1rem));
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  text-align: right;
  text-shadow:
    -0.0625rem -0.0625rem 0 #000,
    0.0625rem -0.0625rem 0 #000,
    -0.0625rem 0.0625rem 0 #000,
    0.0625rem 0.0625rem 0 #000;
  transition: top 150ms ease-in-out;
}

.players-panel {
  padding: 0;
}

.players-score-open {
  display: none;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: auto;
  place-items: center;
  padding: 0;
  border: 0.0625rem solid #294657;
  border-radius: 0.25rem;
  background: rgb(7 37 51 / 85%);
}

.players-score-open img {
  width: 1.125rem;
  height: 1.125rem;
  filter: brightness(0) invert(1);
}

.room-sidebar[data-opened="false"] .players-panel {
  display: none;
}

.room-sidebar[data-opened="false"] .players-score-open {
  display: grid;
}

.room-sidebar .section-heading {
  justify-content: flex-end;
  gap: 0.375rem;
  margin-bottom: 0.6875rem;
}

.room-sidebar .section-heading h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.room-sidebar .section-heading span {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.player-list {
  gap: 0.125rem;
}

.player-item {
  display: flex;
  min-height: auto;
  justify-content: flex-end;
  gap: 0.375rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.75rem;
  line-height: 1.25;
}

.player-avatar {
  display: none;
}

.player-name {
  color: inherit;
}

.player-display {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.25rem;
}

.player-identity-ornament {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  object-fit: contain;
  image-rendering: pixelated;
  user-select: none;
}

.player-score {
  color: inherit;
}

.self-label {
  display: none;
}

.players-hidden,
.players-total {
  margin: 0.625rem 0 0;
  color: #d3d9dc;
  font-size: 0.6875rem;
}

.players-hidden[hidden] {
  display: none;
}

.players-modal {
  position: fixed;
  z-index: 250;
  inset: 0;
  display: block;
  overflow: hidden;
  padding: 5dvh 1rem;
  background: rgb(0 0 0 / 55%);
}

.players-modal[hidden] {
  display: none;
}

.players-modal-card {
  width: min(38.75rem, calc(100vw - 2rem));
  max-height: 90dvh;
  margin: 0 auto;
  overflow: auto;
  padding: 1rem;
  border: 0.0625rem solid #3c5a68;
  border-radius: 0.5rem;
  color: #fff;
  background: #072533;
  box-shadow: 0 1rem 4rem rgb(0 0 0 / 45%);
}

.players-modal-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.players-modal-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.players-status-heading {
  margin: 0 0 0.5rem;
  color: #828282;
  font-size: 0.875rem;
  line-height: 1;
}

.players-offline-heading {
  margin-top: 1rem;
}

.players-modal-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.players-modal-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-height: 4.5rem;
  padding: 0.75rem;
  border-radius: 0.25rem;
  background: #25262b;
  transition: transform 100ms, box-shadow 100ms;
}

.players-modal-item:hover {
  z-index: 2;
  transform: scale(1.025);
  box-shadow: 0 0 0.75rem rgb(0 0 0 / 30%);
}

@media (pointer: coarse) {
  .players-modal-item:hover {
    transform: none;
  }
}

.players-modal-avatar {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: #373a40;
}

.players-modal-avatar img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  image-rendering: pixelated;
  user-select: none;
}

.players-modal-person {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.25rem;
}

.players-modal-name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.5rem;
}

.players-modal-tier-badge,
.players-modal-network {
  flex: 0 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
  user-select: none;
}

.players-modal-tier-badge {
  width: 1.5rem;
  height: auto;
}

.players-modal-network {
  width: 1.125rem;
  height: 1.125rem;
}

.players-modal-person strong {
  overflow: hidden;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.05;
  text-overflow: ellipsis;
}

.players-modal-person small {
  color: #d3d9dc;
  font-size: 0.75rem;
  line-height: 1;
}

.overlay-close {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  place-items: center;
  padding: 0;
  border: 0.0625rem solid #294657;
  border-radius: 0.25rem;
  color: #fff;
  background: rgb(7 37 51 / 85%);
}

.overlay-close img {
  width: 0.875rem;
  height: 0.875rem;
}

.room-sidebar .overlay-close img {
  width: 0.75rem;
  height: 0.75rem;
}

.room-details,
.image-preview {
  position: absolute;
  z-index: 7;
  top: 4rem;
  left: 50%;
  width: min(22rem, calc(100vw - 1rem));
  padding: 1rem;
  border: 0.0625rem solid #263847;
  border-radius: 0.5rem;
  background: rgb(7 37 51 / 94%);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 32%);
  backdrop-filter: blur(0.75rem);
  transform: translateX(-50%);
}

.room-details[hidden],
.image-preview[hidden],
.room-sidebar[hidden] {
  display: none;
}

.room-details .room-code-block {
  padding-bottom: 0.75rem;
}

.room-control {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 0;
  border-top: 0.0625rem solid #263847;
  border-bottom: 0.0625rem solid #263847;
  cursor: pointer;
}

.room-control input {
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  accent-color: #31b7dc;
}

.room-control span {
  display: grid;
  gap: 0.25rem;
}

.room-control strong,
.room-control small {
  line-height: 1.35;
}

.room-control small {
  color: #a8bac4;
}

.room-details .invite-block {
  padding: 0.75rem 0 0;
  border: 0;
}

.image-preview {
  width: min(28rem, calc(100vw - 1rem));
  padding: 0;
  overflow: hidden;
}

.image-preview header {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
}

.image-preview > img,
.image-preview > canvas {
  display: block;
  width: 100%;
  max-height: min(60dvh, 28rem);
  object-fit: contain;
  background: #0f1f2e;
}

.image-preview > canvas[hidden] {
  display: none;
}

.room-chat {
  position: absolute;
  z-index: 6;
  bottom: 0.5rem;
  left: 0.5rem;
  pointer-events: auto;
}

.chat-open,
.chat-close,
.chat-send {
  display: grid;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  place-items: center;
  padding: 0;
  border: 0.0625rem solid #294657;
  border-radius: 0.25rem;
  color: #fff;
  background: rgb(7 37 51 / 90%);
}

.chat-open img,
.chat-close img,
.chat-send img {
  width: 1rem;
  height: 1rem;
  filter: brightness(0) invert(1);
}

.chat-compose {
  display: none;
}

@media (max-width: 45rem) {
  .room-sidebar {
    top: 4rem;
    opacity: 0.78;
  }

  .taskbar-surface {
    gap: 0.375rem;
    padding: 0.5rem;
  }

  .taskbar-logo,
  .taskbar-button {
    width: 1.875rem;
    height: 1.875rem;
    min-width: 1.875rem;
  }

  .room-taskbar[data-opened="false"] {
    top: -2.625rem;
  }

  .room-chat {
    width: calc(100% - 2.75rem);
    max-width: 22rem;
    right: auto;
    bottom: 0.25rem;
    left: 0.25rem;
  }

  .room-chat[data-opened="true"] .chat-open {
    display: none;
  }

  .room-chat[data-opened="true"] .chat-compose {
    display: flex;
    position: relative;
    gap: 0.25rem;
  }

  .room-chat[data-opened="false"] .chat-open {
    display: grid;
  }

  .chat-compose input {
    min-height: 2.25rem;
    flex: 1;
    min-width: 0;
    padding-inline: 0.75rem 2.5rem;
    border-color: #294657;
    color: #9aa8b2;
    background: rgb(7 37 51 / 92%);
    opacity: 1;
  }

  .chat-send,
  .chat-close {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
  }

  .chat-send {
    position: absolute;
    top: 0;
    right: 2.5rem;
    border-color: transparent;
    background: transparent;
  }

  .chat-send:disabled {
    opacity: 0.5;
  }
}

@media (max-width: 600px) {
  .completion-card {
    padding: 12px 16px;
  }

  .completion-card h2 {
    font-size: 1.2rem;
  }

  .completion-statistic p {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .completion-card,
  .completion-overlay[data-closing="true"] .completion-card {
    animation: none;
  }
}

/* Recovered Tanggle profile shell and cursor collection. */
.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 0 24px;
  border-bottom: 1px solid rgb(55 97 110 / 35%);
  background: rgb(4 22 37 / var(--header-height-ratio));
  backdrop-filter: blur(8px);
}

.brand {
  height: 100%;
}

.brand-logo {
  display: block;
  width: auto;
  height: max(calc(40px * var(--header-height-ratio)), 32px);
  image-rendering: pixelated;
}

.topbar-actions {
  height: 100%;
  gap: 8px;
}

.header-pixel-button,
.profile-button {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  overflow: visible;
  place-items: center;
  border: 1px solid #1d4654;
  border-radius: 4px;
  color: #dbe8eb;
  background: #071f2b;
  box-shadow: none;
}

.header-pixel-button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

#language-menu-open {
  border-color: transparent;
  background: transparent;
}

.header-pixel-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.header-gallery {
  display: grid;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid #e4b224;
  border-radius: 4px;
  color: #17252c;
  background: #ffd13e;
  font-family: "Fira Sans", "Fira Sans Fallback", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.profile-button {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-button:hover {
  border-color: transparent;
  background: rgb(23 69 83 / 55%);
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border: 1px solid #37616e;
  border-radius: 2px;
  object-fit: cover;
  image-rendering: pixelated;
}

.profile-cursor-canvas {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  pointer-events: none;
  display: none;
}

html[data-tanggle-cursor] body {
  cursor: var(--tanggle-cursor-default);
}

html[data-tanggle-cursor]
  :where(
    a[href],
    button:not(:disabled),
    [role="button"]:not([aria-disabled="true"]),
    [role="menuitem"]:not([aria-disabled="true"]),
    input[type="button"]:not(:disabled),
    input[type="submit"]:not(:disabled),
    input[type="reset"]:not(:disabled),
    label[for],
    select:not(:disabled),
    summary
  ) {
  cursor: var(--tanggle-cursor-pointer);
}

html[data-tanggle-cursor]
  :where(
    a[href],
    button:not(:disabled),
    [role="button"]:not([aria-disabled="true"]),
    [role="menuitem"]:not([aria-disabled="true"]),
    input[type="button"]:not(:disabled),
    input[type="submit"]:not(:disabled),
    input[type="reset"]:not(:disabled),
    label[for],
    select:not(:disabled),
    summary
  ):active,
html[data-tanggle-cursor] .home-feature-slides[data-dragging="true"] {
  cursor: var(--tanggle-cursor-grabbing);
}

main {
  padding-top: calc(var(--header-height) + clamp(2rem, 6vw, 5rem));
}

.profile-menu {
  width: 154px;
  max-height: calc(100dvh - var(--header-height) - 8px);
  inset: var(--header-height) 24px auto auto;
  margin: 0;
  padding: 4px;
  overflow: auto;
  border: 1px solid #1d4654;
  border-radius: 3px;
  color: #edf4f5;
  background: #061c27;
  box-shadow: 0 8px 24px rgb(0 0 0 / 45%);
  font-family: "Fira Sans", "Fira Sans Fallback", Arial, sans-serif;
}

.profile-menu::backdrop {
  background: transparent;
}

.profile-menu-section + .profile-menu-section {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid #173b49;
}

.profile-menu-heading {
  margin: 0;
  padding: 2px 8px 1px;
  color: #66818c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.profile-menu-item {
  display: flex;
  width: 100%;
  height: 35px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.profile-menu-item svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  image-rendering: pixelated;
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
  color: #fff;
  background: #123947;
}

.profile-menu-item[aria-disabled="true"] {
  cursor: not-allowed;
  color: #70878f;
}

.profile-page[hidden] {
  display: none;
}

body[data-view="collection"],
body[data-view="account"] {
  background: #0f1f2e;
  font-family: "Fira Sans", "Fira Sans Fallback", Arial, sans-serif;
}

body[data-view="collection"] main,
body[data-view="account"] main {
  width: min(calc(100% - 32px), 1120px);
  padding-top: calc(var(--header-height) + 24px);
}

.profile-identity {
  display: flex;
  height: 140px;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  overflow: hidden;
  border-right: 2px solid #1d4654;
  border-bottom: 2px solid #1d4654;
  border-left: 2px solid #1d4654;
  background: #0b2230;
}

.profile-identity > img {
  width: 119px;
  height: 119px;
  object-fit: cover;
  image-rendering: pixelated;
}

.profile-identity p,
.profile-identity h1 {
  margin: 0;
}

.profile-identity p {
  color: #9eb1b7;
  font-size: 13px;
}

.profile-identity h1 {
  max-width: none;
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.profile-content {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  padding-top: 16px;
}

.profile-sidebar {
  align-self: start;
  position: sticky;
  top: 66px;
}

.profile-sidebar nav {
  display: grid;
  overflow: hidden;
  border: 1px solid #1d4654;
  background: #0a2632;
}

.profile-sidebar a,
.profile-sidebar span {
  min-height: 42px;
  padding: 11px 14px;
  border-bottom: 1px solid #173b49;
  color: #c9d5d8;
  font-size: 13px;
  text-decoration: none;
}

.profile-sidebar :last-child {
  border-bottom: 0;
}

.profile-sidebar [aria-current="page"] {
  color: #ffd22e;
  background: #123947;
}

.profile-sidebar span[aria-disabled="true"] {
  color: #637b84;
}

.collection-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid #1d4654;
  background: #0a2632;
}

.collection-panel h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.collection-panel > p {
  margin-bottom: 18px;
  color: #9eb1b7;
  font-size: 13px;
  line-height: 1.45;
}

.account-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid #1d4654;
  background: #0a2632;
}

.account-panel h2,
.account-panel h3 {
  margin: 0 0 8px;
}

.account-panel > p,
.account-card > p {
  color: #9eb1b7;
  font-size: 13px;
  line-height: 1.45;
}

.account-loading {
  min-height: 80px;
  padding-top: 24px;
  text-align: center;
}

.account-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.account-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border: 1px solid #1d4654;
  background: #071f2b;
}

.account-card label {
  margin-top: 6px;
  color: #dce8ea;
  font-size: 12px;
  font-weight: 700;
}

.account-card input {
  min-height: 40px;
  border: 1px solid #315968;
  border-radius: 2px;
  color: #edf4f5;
  background: #0c3040;
}

.account-card small {
  color: #78919a;
  font-size: 11px;
}

.account-card .primary-button {
  margin-top: 10px;
}

.account-registered {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #315968;
  background: #071f2b;
}

.account-registered dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 18px 0;
}

.account-registered dt {
  color: #78919a;
}

.account-registered dd {
  margin: 0;
  color: #ffd22e;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-saved-puzzles {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #315968;
}

.account-saved-puzzles > p {
  color: #78919a;
  font-size: 12px;
}

.account-saved-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.account-saved-list li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #244b5a;
  background: #0b2a37;
}

.account-saved-list img {
  width: 72px;
  height: 54px;
  border: 1px solid #315968;
  object-fit: cover;
  background: #061c27;
}

.account-saved-list strong,
.account-saved-list small,
.account-saved-list time {
  display: block;
}

.account-saved-list small {
  margin-top: 4px;
  color: #8fa5ad;
}

.account-saved-list time {
  margin-top: 3px;
  color: #6f8993;
  font-size: 11px;
}

.account-saved-list a {
  padding: 8px 10px;
  color: #17252c;
  background: #ffd13e;
  font-weight: 700;
  text-decoration: none;
}

.account-saved-more {
  display: block;
  margin: 12px auto 0;
}

.account-preferences {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #315968;
  background: #071f2b;
}

.account-preferences[hidden] {
  display: none;
}

.account-preferences > p {
  margin: 0;
  color: #9eb1b7;
  font-size: 12px;
  line-height: 1.45;
}

.account-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  align-items: center;
}

.account-preference-row label,
.account-preference-toggle strong {
  color: #dce8ea;
  font-size: 13px;
  font-weight: 700;
}

.account-preference-row output {
  min-width: 3ch;
  color: #ffd22e;
  text-align: right;
}

.account-preference-row input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #ffd22e;
}

.account-preference-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 44px;
  cursor: pointer;
}

.account-preference-toggle span,
.account-preference-toggle small {
  display: block;
}

.account-preference-toggle small {
  margin-top: 3px;
  color: #78919a;
  font-size: 11px;
  font-weight: 400;
}

.account-preference-toggle input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: #ffd22e;
}

.account-preferences-status {
  min-height: 18px;
}

.account-preferences-status[data-state="error"] {
  color: #ff9c96;
}

.account-preferences-status[data-state="success"] {
  color: #84dfb4;
}

@media (max-width: 560px) {
  .account-saved-list li {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .account-saved-list img {
    width: 64px;
    height: 48px;
  }

  .account-saved-list a {
    grid-column: 1 / -1;
    text-align: center;
  }
}

.account-status {
  min-height: 22px;
  margin: 14px 0 0;
}

.account-status[data-state="error"] {
  color: #ff9c96;
}

.account-status[data-state="success"] {
  color: #84dfb4;
}

.cursor-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 120px);
  justify-content: center;
  gap: 12px;
}

.cursor-collection-card {
  position: relative;
  display: grid;
  width: 120px;
  height: 120px;
  overflow: visible;
  place-items: center;
  border: 3px solid #173b49;
  border-radius: 0;
  background: #071c27;
  transition: transform 100ms ease, filter 100ms ease;
}

.cursor-collection-card[data-owned="true"] {
  border-color: #526b74;
}

.cursor-collection-card.cursor-rarity-epic[data-owned="true"] {
  border-color: #b779ff;
}

.cursor-collection-card.cursor-rarity-legendary[data-owned="true"] {
  border-color: #ffb846;
}

.cursor-collection-card.cursor-rarity-mythic[data-owned="true"] {
  border-color: #00ffca;
}

.cursor-collection-card[data-selected="true"] {
  filter: drop-shadow(0 0 6px rgb(255 255 255 / 88%));
}

.cursor-collection-preview {
  width: 86px;
  height: 86px;
  image-rendering: pixelated;
}

.cursor-collection-card[data-owned="false"] .cursor-collection-preview {
  filter: grayscale(1) brightness(0.48);
  opacity: 0.72;
}

.cursor-collection-state {
  position: absolute;
  right: 5px;
  bottom: 4px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.cursor-collection-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9eb1b7;
  text-shadow: 0 2px 4px #000;
}

.cursor-collection-lock svg {
  width: 20px;
  height: 20px;
}

.cursor-collection-use {
  position: absolute;
  inset: 0;
  border: 0;
  color: transparent;
  background: transparent;
}

.cursor-collection-use:hover,
.cursor-collection-use:focus-visible {
  color: #071820;
  background: rgb(255 210 46 / 82%);
  font-size: 12px;
  font-weight: 700;
}

.cursor-collection-info {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: #ffd22e;
  background: transparent;
  opacity: 0;
}

.cursor-collection-info svg {
  width: 20px;
  height: 20px;
}

.cursor-collection-card:hover .cursor-collection-info,
.cursor-collection-info:focus-visible {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .cursor-collection-info {
    opacity: 1;
  }
}

body[data-view="gallery"],
body[data-view="puzzle-detail"],
body[data-view="content"] {
  color: #8ba5af;
  background: #072533;
}

body[data-view="gallery"] .topbar,
body[data-view="puzzle-detail"] .topbar,
body[data-view="content"] .topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  min-height: 50px;
  padding: 0 max(calc((100vw - 1200px) / 2), 16px);
  border-bottom: 1px solid #294856;
  background: #061e2c;
}

body[data-view="gallery"] main,
body[data-view="puzzle-detail"] main,
body[data-view="content"] main {
  width: 100%;
  margin: 0;
  padding: 0;
}

body[data-view="gallery"] .header-gallery,
body[data-view="puzzle-detail"] .header-gallery,
body[data-view="content"] .header-gallery {
  color: #17252c;
}

body[data-view="gallery"] .profile-button,
body[data-view="puzzle-detail"] .profile-button,
body[data-view="content"] .profile-button {
  width: calc(var(--header-height) * 0.8);
  height: calc(var(--header-height) * 0.8);
  margin-left: 4px;
  border-radius: 50%;
  background: #153544;
}

body[data-view="gallery"] .profile-avatar,
body[data-view="puzzle-detail"] .profile-avatar,
body[data-view="content"] .profile-avatar {
  width: 65%;
  height: 65%;
  border: 0;
  border-radius: 0;
}

.gallery-view,
.puzzle-detail-view,
.content-view {
  min-height: calc(100vh - 50px);
  padding-bottom: 64px;
}

.gallery-heading {
  position: relative;
  z-index: 0;
  padding: 32px max(calc((100vw - 1185px) / 2), 16px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(rgb(3 16 22 / 75%), rgb(3 16 22 / 75%)),
    url("/assets/home/hero.avif") center / cover no-repeat;
}

.gallery-heading h1 {
  max-width: none;
  margin: 0;
  font-size: 34px;
  line-height: 1.3;
}

.gallery-heading p {
  max-width: none;
  margin: 0;
  color: #eef3f4;
  line-height: 1.55;
}

.breadcrumbs {
  display: flex;
  max-width: 1185px;
  min-height: 19px;
  align-items: center;
  gap: 8px;
  margin: 24px auto 12px;
  overflow-x: auto;
  color: #8ba5af;
  font-size: 12px;
  line-height: 1.55;
  white-space: nowrap;
}

.breadcrumbs a {
  color: #ffc818;
  text-decoration: none;
}

.breadcrumbs img {
  display: block;
  width: 20px;
  height: 20px;
}

.gallery-categories {
  position: relative;
  display: flex;
  box-sizing: border-box;
  max-width: 1185px;
  max-height: 160px;
  margin: 0 auto;
  padding: 16px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 3px solid #294856;
  border-radius: 4px;
  background: #061e2c;
  transition: max-height 400ms ease;
}

.gallery-categories:has(.gallery-more-categories:not([hidden])) {
  max-height: 420px;
}

.gallery-categories > a,
.gallery-more-categories > a {
  display: inline-flex;
  min-height: 46px;
  padding: 8px 12px;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  color: #c7d3d8;
  background: #153544;
  text-decoration: none;
}

.gallery-categories > a:hover,
.gallery-categories > a:focus-visible,
.gallery-more-categories > a:hover,
.gallery-more-categories > a:focus-visible {
  color: #ffc818;
  background: #294856;
}

.gallery-categories a[aria-disabled="true"] {
  color: #6f858e;
  background: #102c39;
  cursor: not-allowed;
  opacity: 0.62;
}

.gallery-categories a[aria-disabled="true"]:hover,
.gallery-categories a[aria-disabled="true"]:focus-visible {
  color: #6f858e;
  background: #102c39;
}

.gallery-categories img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.gallery-more-categories {
  display: contents;
}

.gallery-more-categories[hidden] {
  display: none;
}

.gallery-categories-legend {
  position: absolute;
  top: -12px;
  left: 50%;
  margin: 0;
  padding: 0 8px;
  color: #8ba5af;
  background: #072533;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  transform: translateX(-50%);
}

.gallery-show-more {
  display: block;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  margin: -3px auto -32px;
  padding: 7px;
  border: 0;
  border-radius: 0 0 4px 4px;
  color: #17252c;
  background: #ffc502;
  font-weight: 700;
}

.gallery-show-more img {
  display: block;
  width: 18px;
  height: 18px;
  color: #17252c;
  transform: rotate(180deg);
}

.gallery-show-more.is-expanded img {
  transform: rotate(0deg);
}

.gallery-toolbar {
  display: flex;
  max-width: 1185px;
  min-height: 55px;
  margin: 10px auto 8px;
  justify-content: flex-end;
  align-items: flex-start;
}

.gallery-sort-field {
  display: grid;
  width: 180px;
  gap: 2px;
}

.gallery-sort-field label {
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.gallery-toolbar select {
  box-sizing: border-box;
  height: 36px;
  min-height: 36px;
  border: 1px solid #294856;
  border-radius: 4px;
  color: #d6e0e3;
  background: #153544;
}

.gallery-status {
  max-width: 1185px;
  margin: 0 auto 12px;
  color: #9fb3ba;
}

.gallery-status:empty {
  display: none;
}

.gallery-puzzle-grid {
  position: relative;
  display: block;
  padding: 0;
  list-style: none;
  max-width: 1185px;
  margin: 0 auto;
}

.gallery-puzzle-card {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #061e2c;
}

.gallery-puzzle-card a {
  position: relative;
  display: block;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}

.gallery-puzzle-card img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 150px;
  object-fit: cover;
  filter: brightness(90%);
  transition: filter 150ms ease, transform 150ms ease;
}

.gallery-puzzle-card span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 28px 10px 10px;
  opacity: 0;
  background: linear-gradient(transparent, rgb(0 0 0 / 82%));
  font-size: 14px;
  transition: opacity 150ms ease;
}

.gallery-puzzle-card a:hover img,
.gallery-puzzle-card a:focus-visible img {
  filter: brightness(100%);
  transform: scale(1.1);
}

.gallery-puzzle-card a:hover span,
.gallery-puzzle-card a:focus-visible span {
  opacity: 1;
}

.puzzle-detail-layout {
  display: flex;
  max-width: 1200px;
  min-height: 520px;
  margin: 8px auto 0;
  gap: 16px;
}

.puzzle-detail-image {
  width: calc(100% - 256px);
  height: min(69dvh, 720px);
  border-radius: 6px;
  object-fit: contain;
  background: #061e2c;
}

.puzzle-detail-info {
  width: 240px;
  flex: 0 0 240px;
}

.puzzle-detail-info section {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 4px;
  background: #153544;
}

.puzzle-detail-info h2 {
  margin: 0 0 8px;
  color: #eef3f4;
  font-size: 18px;
}

.puzzle-detail-info ul,
.puzzle-detail-info dl,
.puzzle-detail-info p {
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.puzzle-detail-info ul {
  padding-left: 18px;
}

.puzzle-detail-info dt {
  color: #5e7b86;
}

.puzzle-detail-info dd {
  margin: 0 0 6px;
}

.puzzle-detail-start {
  display: grid;
  min-height: 48px;
  place-items: center;
  text-decoration: none;
}

.content-view {
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 24px;
}

.content-view h1 {
  max-width: none;
  color: #eef3f4;
}

.public-puzzles-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid #294856;
  border-radius: 6px;
  color: #8ba5af;
  background: #061e2c;
}

.public-puzzles-dialog::backdrop {
  background: rgb(1 12 17 / 70%);
}

.public-puzzles-dialog h2 {
  color: #eef3f4;
}

.public-puzzles-dialog .dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #294856;
  border-radius: 4px;
  background: #153544;
}

.public-puzzles-dialog .dialog-close img {
  width: 16px;
  height: 16px;
}

.create-loading-overlay {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(2 15 22 / 84%);
  backdrop-filter: blur(6px);
}

.create-loading-overlay[hidden] {
  display: none;
}

.create-loading-card {
  display: grid;
  width: min(520px, 100%);
  justify-items: center;
  gap: 18px;
  color: #eef4f2;
  text-align: center;
}

.create-loading-card > img {
  width: min(257px, 70vw);
  height: auto;
  image-rendering: pixelated;
}

.create-loading-card > strong {
  font-size: 24px;
}

.create-loading-card > span {
  min-height: 22px;
  color: #8ba5af;
  font-size: 14px;
}

.create-loading-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 1px solid #355765;
  border-radius: 1px;
  background: #061e2c;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 30%);
}

.create-loading-track > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #d6a918, #ffd13e);
  box-shadow: 0 0 12px rgb(255 209 62 / 55%);
  transition: width 220ms ease-out;
}

.board-background-picker {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #294657;
  border-radius: 4px;
}

.board-background-picker legend {
  padding-inline: 5px;
  color: #eef4f2;
  font-weight: 700;
}

.board-background-picker p {
  margin: 0;
  color: #8ba5af;
  font-size: 12px;
}

.board-background-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.board-background-options button {
  width: 46px;
  height: 38px;
  padding: 3px;
  border: 1px solid #426579;
  border-radius: 4px;
  background: #071b27;
}

.board-background-options button[aria-pressed="true"] {
  border-color: #ffd13e;
  box-shadow: 0 0 0 2px rgb(255 209 62 / 25%);
}

.board-background-options span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: #0f1f2e;
}

[data-board-background="deep-sea"] span {
  background: linear-gradient(145deg, #061722, #123f50);
}

[data-board-background="sea-glass"] span {
  background: linear-gradient(145deg, #08262e, #4f7d79);
}

[data-board-background="violet"] span {
  background: linear-gradient(145deg, #17182c, #5a4665);
}

[data-board-background="sunset"] span {
  background: linear-gradient(145deg, #1d2635, #a26a58);
}

@media (hover: none), (pointer: coarse) {
  .gallery-puzzle-card a:hover img,
  .gallery-puzzle-card a:focus-visible img {
    transform: none;
  }

  .gallery-puzzle-card span {
    opacity: 1;
  }
}

@media (max-width: 840px) {
  .gallery-categories,
  .gallery-toolbar,
  .gallery-puzzle-grid,
  .puzzle-detail-layout {
    margin-right: 16px;
    margin-left: 16px;
  }

  .gallery-categories {
    gap: 6px;
  }

  .gallery-categories > a,
  .gallery-more-categories > a {
    padding: 6px;
    font-size: 13px;
  }

  .gallery-categories img {
    width: 24px;
    height: 24px;
  }

}

@media (max-width: 600px) {
  .gallery-heading {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .gallery-toolbar {
    grid-template-columns: 1fr;
  }

  .gallery-toolbar label {
    margin-bottom: -6px;
  }

  .puzzle-detail-layout {
    flex-direction: column-reverse;
  }

  .puzzle-detail-image,
  .puzzle-detail-info {
    width: 100%;
    flex-basis: auto;
  }

  .puzzle-detail-image {
    height: auto;
  }
}

@media (hover: hover) and (pointer: fine) {
  .cursor-collection-card:hover {
    z-index: 3;
    transform: scale(1.1);
  }

  .cursor-collection-card:hover .cursor-collection-preview {
    transform: scale(1.6);
  }
}

.cursor-collection-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: #9eb1b7;
  font-size: 12px;
}

.cursor-info-dialog {
  width: min(420px, calc(100vw - 24px));
  padding: 24px;
  border: 1px solid #37616e;
  border-radius: 3px;
  color: #f4f7f5;
  background: #071c27;
  box-shadow: 0 18px 56px rgb(0 0 0 / 62%);
}

.cursor-info-dialog::backdrop {
  background: rgb(2 13 19 / 72%);
}

.cursor-info-dialog > .overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.cursor-info-dialog h2 {
  margin: 0 36px 8px 0;
  font-size: 24px;
}

.cursor-info-description {
  color: #c9d5d8;
}

.cursor-info-details {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
}

.cursor-info-details div {
  display: grid;
  gap: 3px;
}

.cursor-info-details dt {
  color: #70878f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cursor-info-details dd {
  margin: 0;
  color: #edf4f5;
  font-size: 13px;
  line-height: 1.45;
}

#cursor-info-rarity {
  text-transform: capitalize;
}

@media (max-width: 841px) {
  .profile-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-sidebar {
    position: static;
  }

  .profile-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .topbar {
    padding-inline: 12px;
  }

  .header-gallery {
    display: grid;
  }

  .profile-menu {
    right: 12px;
  }

  body[data-view="collection"] main,
  body[data-view="account"] main {
    width: calc(100% - 16px);
    padding-top: calc(var(--header-height) + 8px);
  }

  .profile-identity {
    height: 100px;
    gap: 12px;
    padding: 12px;
  }

  .profile-identity > img {
    width: 70px;
    height: 70px;
  }

  .profile-identity h1 {
    font-size: 26px;
  }

  .profile-content {
    gap: 8px;
    padding-top: 8px;
  }

  .profile-sidebar nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-sidebar span[aria-disabled="true"] {
    display: none;
  }

  .collection-panel {
    padding: 12px;
  }

  .account-panel {
    padding: 12px;
  }

  .account-auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cursor-collection-grid {
    grid-template-columns: repeat(auto-fill, 110px);
  }

  .cursor-collection-card {
    width: 110px;
    height: 110px;
  }

  .cursor-collection-info {
    opacity: 1;
  }
}
