:root {
  color-scheme: dark;
  --bg: #101018;
  --card: #121218;
  --panel: #16161c;
  --ink: #f4f4f6;
  --muted: #b9b9c2;
  --faint: #8d8d98;
  --line: #2a2a32;
  --violet: #b06bff;
  --pink: #ee7cf6;
  --blue: #5c71fe;
  --gold: #f0b040;
  --gradient: linear-gradient(90deg, #7a6cff 0%, #c56bff 46%, #ee7cf6 100%);
  --discord: #313338;
  --discord-deep: #2b2d31;
  --discord-text: #f2f3f5;
  --discord-muted: #949ba4;
  --font: "Montserrat", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

button,
input,
select {
  font-family: inherit;
}

.hero {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: min(72vh, 44rem);
  min-height: 22rem;
  pointer-events: none;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 68%;
}

.hero-wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 12rem;
  display: block;
}

.topbar,
.tagline,
main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 4;
  padding: 1.15rem 0 0;
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
  min-width: 0;
}

.brand {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.logo {
  width: auto;
  height: 4.15rem;
  flex: none;
}

.wordmark {
  margin: 0;
  font-size: 2.05rem;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-shadow: 0 2px 16px rgba(8, 8, 16, 0.65);
}

.wordmark .sets {
  display: inline-block;
  background-image: linear-gradient(
    105deg,
    #5c71fe 0%,
    #8a78ff 8%,
    #ee7cf6 17%,
    #fff4e4 23%,
    #f0b040 29%,
    #ee7cf6 36%,
    #b06bff 43%,
    #5c71fe 50%,
    #8a78ff 58%,
    #ee7cf6 67%,
    #fff4e4 73%,
    #f0b040 79%,
    #ee7cf6 86%,
    #b06bff 93%,
    #5c71fe 100%
  );
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: prism 3.2s linear infinite;
  filter: drop-shadow(0 0 10px rgba(238, 124, 246, 0.28));
}

@keyframes prism {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.domain {
  color: #c9c9d4;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pages {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
  padding: 0.28rem;
  border-radius: 999px;
  background: transparent;
}

.pages::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%),
    rgba(10, 10, 18, 0.96);
  pointer-events: none;
}

.nav-pill {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  border-radius: 999px;
  background: #f4f4f8;
  pointer-events: none;
  opacity: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.pages.is-ready .nav-pill {
  opacity: 1;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-mascot {
  position: absolute;
  z-index: 0;
  bottom: calc(100% - 0.42rem);
  left: 0;
  width: 1.85rem;
  height: auto;
  pointer-events: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.28));
}

.nav-mascot.is-diving {
  animation: mascot-dive 0.32s cubic-bezier(0.4, 0, 0.7, 1) forwards;
}

.nav-mascot.is-rising {
  animation: mascot-rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes mascot-dive {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-50%) translateY(115%); }
}

@keyframes mascot-rise {
  from { transform: translateX(-50%) translateY(115%); }
  to { transform: translateX(-50%) translateY(0); }
}

.flag-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.lang {
  position: relative;
  flex: none;
}

.lang-current,
.lang-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  color: #f4f4f8;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.lang-current {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%),
    rgba(10, 10, 18, 0.96);
  padding: 0.48rem 0.85rem 0.48rem 0.7rem;
}

.lang-current::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  margin-left: 0.15rem;
  border-right: 2px solid #f4f4f8;
  border-bottom: 2px solid #f4f4f8;
  transform: translateY(-0.1rem) rotate(45deg);
}

.lang-current:hover,
.lang-option:hover,
.lang-option[aria-selected="true"] {
  background-color: rgba(255, 255, 255, 0.1);
}

.lang-current:focus-visible,
.lang-option:focus-visible {
  outline: 2px solid #ee7cf6;
  outline-offset: 2px;
}

.flag {
  width: 1.15rem;
  height: 0.76rem;
  flex: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.lang-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 100%;
  margin: 0;
  padding: 0.28rem;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.85rem;
  background: rgba(10, 10, 18, 0.98);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.lang-menu[hidden] {
  display: none;
}

.lang-option {
  width: 100%;
  border-radius: 0.6rem;
  background: transparent;
  padding: 0.48rem 0.65rem;
  text-align: left;
  white-space: nowrap;
}

.pages a {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  color: #e4e4ee;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s ease;
}

.pages a:hover:not([aria-current="page"]) {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.pages a[aria-current="page"],
.pages a[aria-current="page"]:hover {
  background: transparent;
  color: #14141c;
}

.tagline {
  max-width: 52rem;
  margin: 1.6rem auto 4.4rem;
  color: white;
  text-align: center;
}

.tagline-mark {
  position: relative;
  width: 8.4rem;
  height: 8.4rem;
  margin: 0 auto 0.15rem;
  filter: drop-shadow(0 0.75rem 0.85rem rgba(0, 0, 0, 0.38));
}

.tagline-mark > svg,
.mark-glyph svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mark-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.35rem;
  height: 3.35rem;
  transform: translate(-50%, -50%);
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mark-glyph.is-leave {
  opacity: 0;
  transform: translate(calc(-50% - 2.4rem), -50%) scale(0.5);
}

.mark-glyph.is-enter {
  opacity: 0;
  transform: translate(calc(-50% + 2.4rem), -50%) scale(0.5);
  transition: none;
}

.face-mark .eye,
.face-mark .mouth-smile,
.face-mark .mouth-laugh {
  transform-box: fill-box;
  transform-origin: center;
}

.face-mark .eye-l {
  animation: face-laugh 5.2s ease-in-out infinite;
}

.face-mark .eye-r {
  animation: face-wink 5.2s ease-in-out infinite;
}

.face-mark .mouth-smile {
  animation: smile-show 5.2s ease-in-out infinite;
}

.face-mark .mouth-laugh {
  animation: laugh-show 5.2s ease-in-out infinite;
}

@keyframes face-wink {
  0%, 12%, 28%, 40%, 74%, 100% { transform: scaleY(1); }
  17%, 23% { transform: scaleY(0.08); }
  48%, 66% { transform: scaleY(0.14); }
}

@keyframes face-laugh {
  0%, 40%, 74%, 100% { transform: scaleY(1); }
  48%, 66% { transform: scaleY(0.14); }
}

@keyframes smile-show {
  0%, 40%, 74%, 100% { opacity: 1; }
  48%, 66% { opacity: 0; }
}

@keyframes laugh-show {
  0%, 40%, 74%, 100% { opacity: 0; }
  48%, 66% { opacity: 1; }
}

.clock-mark .clock-hand {
  transform-box: view-box;
  transform-origin: center;
}

.clock-mark .hand-hour {
  animation: clock-spin 72s linear infinite;
}

.clock-mark .hand-minute {
  animation: clock-spin 24s linear infinite;
}

.clock-mark .hand-second {
  animation: clock-spin 6s linear infinite;
}

@keyframes clock-spin {
  to { transform: rotate(360deg); }
}

.bubble-mark .typing-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: typing-bounce 1.15s ease-in-out infinite;
}

.bubble-mark .dot-2 {
  animation-delay: 0.15s;
}

.bubble-mark .dot-3 {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {
  0%, 55%, 100% { transform: translateY(0); }
  25% { transform: translateY(-7px); }
}

.tagline-title {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 0 2.2rem;
}

.tagline h1 {
  margin: 0;
  color: white;
  font-size: clamp(2.7rem, 4.8vw, 4.375rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-shadow: 0 0.2rem 1.5rem rgba(0, 0, 0, 0.45);
}

.tagline p {
  max-width: 40rem;
  margin: 0.95rem auto 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.08rem, 1.7vw, 1.625rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.012em;
  text-shadow: 0 0.15rem 1rem rgba(0, 0, 0, 0.4);
}

.spark {
  position: absolute;
  pointer-events: none;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.spark-a {
  top: 0.15rem;
  left: 0;
  width: 1.05rem;
  height: 1.05rem;
  background: #ff6eb4;
}

.spark-b {
  top: -0.7rem;
  right: 0.15rem;
  width: 1.45rem;
  height: 1.45rem;
  background: #ffe14a;
}

.spark-c {
  right: 0.35rem;
  bottom: 0.15rem;
  width: 0.65rem;
  height: 0.65rem;
  background: #7ee7ff;
}

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22.5rem;
  align-items: start;
  gap: 0.75rem;
  width: 100%;
  padding-bottom: 2.5rem;
}

.work,
.preview {
  background: var(--card);
  border-radius: 0.7rem;
  min-width: 0;
}

.work {
  display: flex;
  flex-direction: column;
}

.preview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
}

.preview h2,
.pane h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.steps {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  margin: 0 0.7rem;
  transform: translateY(-0.42rem);
}

.step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.72rem 0.85rem 0.62rem;
  border-radius: 0.45rem 0.45rem 0 0;
  background: #1c1c24;
  color: #d5d5de;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.step svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-short {
  display: none;
}

.step:hover {
  background: #24242e;
}

.step.selected,
.step.selected:hover {
  background: var(--card);
  color: white;
  padding-bottom: 0.78rem;
}

.pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0.95rem 1rem 1rem;
  overflow: auto;
}

.pane[hidden] {
  display: none !important;
}

#pane-icons {
  overflow: hidden;
}

.step-lead,
.hint,
.fine,
.strip-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
}

.step-lead,
.hint {
  margin: 0 0 0.8rem;
}

.pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.pane-head .hint {
  margin: 0.3rem 0 0;
}

.assign-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  margin-bottom: 0.8rem;
}

.role-switch {
  display: flex;
  flex: 1;
  gap: 0.4rem;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

#add-role-quick {
  flex: none;
}

.role-chip,
.set-strip button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
  padding: 0.28rem 0.7rem 0.28rem 0.28rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.role-chip.selected,
.set-strip button.selected {
  border-color: rgba(238, 124, 246, 0.75);
  background: rgba(176, 107, 255, 0.16);
}

.role-chip canvas,
.set-strip canvas {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
}

.chip-name {
  font-size: 0.82rem;
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem);
  gap: 0.5rem;
}

.search,
select {
  border: 1px solid #2c2c36;
  border-radius: 0.45rem;
  background: #1b1b22;
  color: var(--ink);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0 0.8rem;
}

.search svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: none;
  stroke: var(--faint);
  stroke-width: 2;
  stroke-linecap: round;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.68rem 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.search input:focus {
  outline: none;
}

.search:focus-within,
select:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

select {
  width: 100%;
  padding: 0.68rem 2rem 0.68rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 700;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%),
    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) 55%, calc(100% - 0.7rem) 55%;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

.count,
.strip-label {
  margin: 0.7rem 0 0.45rem;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 700;
}

.strip-label {
  margin: 0 0 0.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-icons {
  grid-column: 1 / -1;
  margin: 1.2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.shapes,
.glyphs {
  display: grid;
  gap: 0.28rem;
}

.shapes {
  grid-template-columns: repeat(auto-fill, minmax(2.65rem, 1fr));
  margin-bottom: 0.85rem;
}

.glyphs {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  flex: 1;
  min-height: 0;
  align-content: start;
  overflow: auto;
  padding-right: 0.15rem;
}

.shape,
.glyph {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0.12rem;
  border-radius: 0.35rem;
  background: #1c1c24;
}

.shape canvas,
.glyph canvas {
  width: 70%;
  height: 70%;
}

.shape.selected,
.glyph.selected,
.shape.selected:hover,
.glyph.selected:hover {
  background: #26262f;
  box-shadow: inset 0 0 0 1px #f2f2f6;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex: none;
  margin-top: 0.75rem;
}

#page-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.roles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.role-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.role-card.selected {
  border-color: rgba(238, 124, 246, 0.75);
  background: rgba(176, 107, 255, 0.12);
}

.role-card canvas {
  width: 2.6rem;
  height: 2.6rem;
}

.role-fields {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.role-fields input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
}

.pick-symbol {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pink);
  font-size: 0.75rem;
  font-weight: 800;
}

.pick-symbol:hover {
  background: transparent;
  color: white;
}

.role-card input[type="color"] {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.remove {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.55rem;
  background: #d45454;
  color: white;
}

.remove svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.remove:hover {
  background: #e26868;
}

.style-card {
  padding: 0.85rem 0.9rem 1rem;
  border: 1px solid #2a2a32;
  border-radius: 0.45rem;
  background: #1b1b22;
}

.style-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.style-head h3 {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 1rem;
}

.icon-ident {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.icon-ident canvas {
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
}

.icon-ident strong {
  display: block;
  font-size: 1rem;
}

.icon-ident p,
.field-label {
  margin: 0.15rem 0 0;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 700;
}

.field-label {
  margin: 0.85rem 0 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.75rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slider-row {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) 4.4rem;
  align-items: center;
  gap: 0.55rem;
  margin: 0.4rem 0;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input[type="range"] {
  width: 100%;
  accent-color: #7a8cff;
}

.num {
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #12121a;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
}

.swatches {
  display: flex;
  gap: 0.45rem;
}

.swatches input[type="color"],
.border-row input[type="color"] {
  width: 3.5rem;
  height: 2.15rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #12121a;
  cursor: pointer;
}

.swatches input[hidden] {
  display: none;
}

.border-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.border-row label,
.file-btn {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.file-btn {
  width: fit-content;
  margin: 0.2rem 0 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.file-btn input {
  display: none;
}

.file-btn[hidden] {
  display: none !important;
}

.switch {
  position: relative;
  width: 2.5rem;
  height: 1.4rem;
  flex: none;
}

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

.switch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #3a3a46;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.04rem;
  height: 1.04rem;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s ease;
}

.switch input:checked + span {
  background: #3ddc97;
}

.switch input:checked + span::after {
  transform: translateX(1.08rem);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.set-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
}

.set-strip button {
  padding: 0.2rem;
  border-radius: 0.7rem;
}

.set-strip canvas {
  width: 2.15rem;
  height: 2.15rem;
}

.stage {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

.stage-art {
  position: relative;
  width: min(100%, 10.5rem);
  aspect-ratio: 1;
  touch-action: manipulation;
  background-color: #3a3a44;
  background-image:
    linear-gradient(45deg, #4a4a55 25%, transparent 25%, transparent 75%, #4a4a55 75%),
    linear-gradient(45deg, #4a4a55 25%, transparent 25%, transparent 75%, #4a4a55 75%);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px;
  border-radius: 1rem;
}

.stage-art canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
}

.stage-art.can-drag {
  cursor: grab;
  touch-action: none;
}

.stage-art.can-drag:active {
  cursor: grabbing;
}

.swap-glyph {
  z-index: 1;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.swap-glyph.is-leave {
  opacity: 0;
  transform: translateX(-29%) scale(0.5);
}

.swap-glyph.is-enter {
  opacity: 0;
  transform: translateX(29%) scale(0.5);
  transition: none;
}

.stage p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.discord {
  flex: 1;
  min-height: 11rem;
  overflow: auto;
  border-radius: 0.85rem;
  background: var(--discord);
  color: var(--discord-text);
  font-family: "Segoe UI", sans-serif;
}

.msg {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
}

.msg + .msg {
  padding-top: 0.15rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  flex: none;
  border-radius: 50%;
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
}

.msg-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.name {
  font-size: 1.05rem;
  font-weight: 700;
}

.chat-badge {
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.chat-badge canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.msg p {
  margin: 0.28rem 0 0;
  color: var(--discord-text);
  font-size: 1.05rem;
  line-height: 1.45;
}

.msg time {
  color: var(--discord-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

button {
  border: 0;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.55rem 0.75rem;
}

button:hover {
  background: rgba(255, 255, 255, 0.12);
}

button:focus-visible,
.role-card:focus-within,
.search:focus-within,
select:focus-visible,
.shape:focus-visible,
.glyph:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

button.primary,
button.primary:hover {
  background: #6d5efc;
  color: white;
  filter: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

button.primary:disabled {
  filter: none;
}

.download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: auto;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

.glyphs::-webkit-scrollbar,
.discord::-webkit-scrollbar,
.pane::-webkit-scrollbar {
  width: 8px;
}

.glyphs::-webkit-scrollbar-thumb,
.discord::-webkit-scrollbar-thumb,
.pane::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
}

.download svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fine {
  margin: 0;
  color: var(--faint);
  font-size: 0.68rem;
}

.fine a {
  color: inherit;
  font-weight: 700;
}

.select-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  margin: 0.45rem 0;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.avatar-stage {
  display: grid;
  place-items: center;
  padding: 0.4rem 0 0.2rem;
}

.avatar-stage canvas {
  width: min(100%, 13.5rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #111118;
}

.avatar-stage canvas.can-drag {
  cursor: grab;
  touch-action: none;
}

.avatar-stage canvas.can-drag:active {
  cursor: grabbing;
}

.drag-hint {
  margin: 0 0 0.45rem;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
}

.avatar-meta {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.avatar-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.45rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
}

.choice {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0.2rem;
  border-radius: 0.35rem;
  background: #1c1c24;
}

.choice canvas {
  width: 78%;
  height: 78%;
}

.choice.selected,
.choice.selected:hover {
  background: #26262f;
  box-shadow: inset 0 0 0 1px #f2f2f6;
}

.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.swatch {
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.swatch.selected,
.swatch.selected:hover {
  box-shadow: inset 0 0 0 2px #121218, 0 0 0 2px #f4f4f8;
}

#pane-adjust.has-custom .glyph-ink {
  display: none;
}

.file-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.body-file-name {
  margin: 0.55rem 0 0.15rem;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scale-reset,
.scale-reset:hover {
  margin: 0.05rem 0 0.4rem;
  padding: 0.15rem 0;
  background: transparent;
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scale-reset:hover {
  color: var(--ink);
}

.discord .avatar-face {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  flex: none;
}

@media (max-width: 720px) {
  .choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark .sets,
  .pages.is-ready .nav-pill,
  .pages a,
  .nav-mascot,
  .mark-glyph,
  .swap-glyph,
  .face-mark .eye,
  .face-mark .mouth-smile,
  .face-mark .mouth-laugh,
  .clock-mark .clock-hand,
  .bubble-mark .typing-dot {
    animation: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .hero {
    height: 22rem;
  }

  .tagline {
    margin: 1.2rem auto 2.4rem;
  }

  .tagline h1 {
    font-size: 2.2rem;
  }

  .tagline p {
    font-size: 1.08rem;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  .pages {
    flex: 1 1 auto;
    max-width: 100%;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .pages a {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
  }

  .top-tools {
    flex: 1 1 auto;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .lang-current,
  .lang-option {
    font-size: 0.72rem;
  }

  .logo {
    height: 3.1rem;
  }

  .wordmark {
    font-size: 1.45rem;
  }

  .studio {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    padding-bottom: 2rem;
  }

  .work {
    height: auto;
    overflow: visible;
  }

  .preview {
    overflow: visible;
  }

  #pane-icons {
    overflow: visible;
  }

  .glyphs {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-height: 22rem;
    min-height: 10rem;
  }
}

.time-studio .work {
  gap: 0.85rem;
  padding: 1.1rem 1.15rem 1.25rem;
}

.time-studio label.when {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.time-studio input[type="datetime-local"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #101018;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.7rem 0.8rem;
}

.time-row,
.time-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.time-row button[aria-pressed="true"] {
  background: #f4f4f8;
  color: #14141c;
}

.stamp-code {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.75rem 0.8rem;
  border-radius: 0.7rem;
  background: #101018;
  color: #d7d7e2;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
  font-weight: 700;
}

.stamp-code code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.time-note {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

.stamp-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stamp-list li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
}

.stamp-list span {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 800;
}

.stamp-list code {
  overflow: hidden;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stamp-list button,
.time-actions button {
  padding: 0.4rem 0.65rem;
}

.msg .stamp {
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 0.2rem;
}

@media (max-width: 720px) {
  .tagline h1 {
    font-size: 1.9rem;
  }

  .tagline-mark {
    width: 6.4rem;
    height: 6.4rem;
  }

  .mark-glyph {
    width: 2.5rem;
    height: 2.5rem;
  }

  .spark {
    display: none;
  }

  .step-long {
    display: none;
  }

  .step-short {
    display: inline;
  }

  .step svg {
    display: none;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .glyphs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .slider-row {
    grid-template-columns: 3.2rem minmax(0, 1fr) 3.6rem;
  }

  .pager {
    flex-wrap: wrap;
    justify-content: center;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.6rem;
    row-gap: 0.7rem;
    padding-top: 0.75rem;
  }

  .top-tools {
    display: contents;
  }

  .brand {
    min-width: 0;
    gap: 0.45rem;
  }

  .brand-text {
    min-width: 0;
  }

  .logo {
    height: 2.45rem;
  }

  .wordmark {
    max-width: 100%;
    overflow: hidden;
    font-size: 1.15rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .domain {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }

  .lang {
    justify-self: end;
  }

  .lang-menu {
    right: 0;
    left: auto;
  }

  .pages {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    flex: none;
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 0.15rem;
    overflow: visible;
  }

  .nav-mascot {
    display: none;
  }

  .pages a {
    flex: 1 1 calc(50% - 0.2rem);
    justify-content: center;
    min-width: 0;
    padding: 0.55rem 0.45rem;
    font-size: 0.74rem;
    white-space: nowrap;
  }
}

.hook-studio .work {
  gap: 0.75rem;
  padding: 1.1rem 1.15rem 1.25rem;
}

.hook-studio .when {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.hook-studio textarea,
.hook-studio input[type="text"],
.hook-studio input[type="url"],
.hook-studio input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #101018;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.7rem 0.8rem;
}

.hook-studio textarea {
  resize: vertical;
  min-height: 5.5rem;
  font-weight: 600;
  line-height: 1.45;
}

.hook-color {
  display: grid;
  grid-template-columns: 7rem;
  align-items: end;
}

.format-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.format-bar button {
  min-width: 2.3rem;
}

.hook-file {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.hook-file input[type="url"] {
  flex: 1;
  min-width: 0;
}

.hook-pick {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.7rem 0.8rem;
}

.hook-pick:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hook-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hook-picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: -0.35rem 0 0;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
}

.hook-picked span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hook-hint {
  margin: -0.2rem 0 0;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.hook-studio input[type="color"] {
  width: 100%;
  height: 2.6rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #101018;
}

.hook-embed {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 0.7rem;
  max-width: 26rem;
  margin-top: 0.45rem;
  padding: 0.55rem 0.7rem 0.65rem 0;
  border-radius: 0.35rem;
  background: #2b2d31;
}

.hook-bar {
  border-radius: 4px 0 0 4px;
  background: #5865f2;
}

.hook-title {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 1rem;
  font-weight: 700;
}

.hook-copy {
  margin: 0;
  color: #dbdee1;
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.hook-embed strong,
.hook-copy strong,
#preview-content strong {
  font-weight: 800;
}

.hook-studio .discord em {
  font-style: italic;
}

.hook-studio .discord u {
  text-decoration: underline;
}

.hook-studio .discord s {
  text-decoration: line-through;
}

.hook-studio .discord pre {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  background: #1e1f22;
  white-space: pre-wrap;
}

.hook-studio .discord code {
  font-family: Consolas, ui-monospace, monospace;
  font-size: 0.88em;
}

.hook-studio .discord :not(pre) > code {
  padding: 0.05em 0.3em;
  border-radius: 3px;
  background: #1e1f22;
}

.hook-spoiler {
  border-radius: 3px;
  background: #202225;
  color: transparent;
  cursor: pointer;
}

.hook-spoiler:hover,
.hook-spoiler.is-open {
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.hook-embed img {
  display: block;
  max-width: 100%;
  margin-top: 0.55rem;
  border-radius: 0.35rem;
}

#preview-avatar {
  position: relative;
  overflow: hidden;
  background: #5865f2;
}

#preview-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#preview-avatar[data-photo="1"] #preview-letter {
  visibility: hidden;
}

#preview-content {
  margin: 0.28rem 0 0;
  color: var(--discord-text);
  font-size: 1.05rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

#status[data-kind="ok"] {
  color: #57f287;
}

#status[data-kind="bad"] {
  color: #ed4245;
}
