.ui-doc-shell {
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(9 3 18 / 0.18);
}

.ui-doc-lead {
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.70);
  font-size: 0.875rem;
  line-height: 1.625;
}

.ui-badge,
.ui-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid var(--theme-border);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.80);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
}

.ui-badge { padding: 0.25rem 0.75rem; }
.ui-pill { padding: 0.125rem 0.5rem; }

.ui-note {
  border-radius: 0.5rem;
  border: 1px solid var(--theme-border);
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ui-note-info {
  border-color: rgb(var(--theme-accent-rgb) / 0.30);
  background: rgb(var(--theme-accent-rgb) / 0.10);
  color: var(--theme-accent-faint);
}

.ui-note-warning {
  border-color: rgba(251, 191, 36, 0.30);
  background: rgba(251, 191, 36, 0.10);
  color: #fef3c7;
}

.ui-note-success {
  border-color: rgba(34, 197, 94, 0.30);
  background: rgba(34, 197, 94, 0.10);
  color: #dcfce7;
}

.ui-note-muted {
  border-color: var(--theme-border);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.80);
}

.ui-accordion {
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
}

.ui-accordion-summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.ui-accordion-summary:hover { background: rgba(255, 255, 255, 0.04); }
.ui-accordion-summary::-webkit-details-marker { display: none; }

.ui-accordion-title {
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.ui-accordion-icon {
  color: rgba(255, 255, 255, 0.60);
  transition: transform 150ms ease;
}

details[open] > .ui-accordion-summary .ui-accordion-icon { transform: rotate(180deg); }

.ui-accordion-content {
  padding: 0.25rem 1rem 1rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  line-height: 1.5;
}

.ui-subheading {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
}

.ui-code-block {
  overflow-x: auto;
  border: 1px solid var(--theme-border);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.30);
  padding: 1rem;
  color: rgba(255, 255, 255, 0.80);
  font-size: 0.75rem;
  line-height: 1rem;
}

.ui-code-inline {
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.30);
  padding: 0.125rem 0.375rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
  line-height: 1rem;
}

.ui-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 381px) {
  .ui-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 521px) {
  .ui-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 740px) {
  .ui-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

.ui-page-toolbar {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .ui-page-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.ui-page-title {
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.5;
}

.ui-empty-state {
  border: 1px solid var(--theme-border);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  color: rgba(255, 255, 255, 0.60);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, filter 150ms ease, transform 150ms ease;
}

.ui-btn:disabled,
.ui-btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.60;
}

.ui-btn-sm { min-height: 2.25rem; padding: 0.5rem 0.75rem; }
.ui-btn-md { min-height: 2.5rem; padding: 0.5rem 1rem; }
.ui-btn-lg { min-height: 3rem; padding: 0.75rem 1.5rem; }
.ui-btn-square-sm { width: 2.25rem; height: 2.25rem; padding: 0; }
.ui-btn-square-md { width: 2.5rem; height: 2.5rem; padding: 0; }

.ui-btn-ghost {
  background: rgba(255, 255, 255, 0.10);
  color: var(--theme-text-strong);
}

.ui-btn-ghost:hover { background: rgba(255, 255, 255, 0.20); }

.ui-btn-danger-soft {
  border: 1px solid rgba(244, 63, 94, 0.20);
  background: rgba(244, 63, 94, 0.10);
  color: #fecdd3;
}

.ui-btn-danger-soft:hover { background: rgba(244, 63, 94, 0.15); }

.ui-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 2.5rem;
  border-radius: 0.375rem;
  padding: 0 0.75rem;
  color: #e5e7eb;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 2px rgb(9 3 18 / 0.24);
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.ui-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.60;
}

.ui-mini-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  color: #e5e7eb;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 2px rgb(9 3 18 / 0.24);
}

.ui-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--theme-border);
  background: rgba(0, 0, 0, 0.20);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.ui-icon-action:hover { background: rgba(0, 0, 0, 0.30); }

.ui-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(12px);
  transition: opacity 150ms ease;
}

.ui-modal-overlay-low { z-index: 120; backdrop-filter: none; }
.ui-modal-overlay-high { z-index: 10000; }

.ui-modal-overlay-soft {
  background: transparent;
  backdrop-filter: none;
}

.ui-modal-shop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(4px);
}

.ui-modal-shop-backdrop-passive {
  pointer-events: none;
}

.ui-modal-panel-sm,
.ui-modal-panel-md {
  width: 100%;
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  background: rgb(var(--theme-bg-rgb) / 0.96);
  box-shadow: 0 10px 15px rgb(9 3 18 / 0.28);
}

.ui-modal-panel-sm { max-width: 24rem; padding: 1.25rem; }
.ui-modal-panel-md { max-width: 28rem; padding: 1.25rem; }

.ui-dialog-panel {
  position: relative;
  width: 100%;
  max-width: 36rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgb(9 3 18 / 0.34);
}

.ui-dialog-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
}

.ui-form-control {
  width: 100%;
  border: 1px solid var(--theme-border);
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.20);
  color: rgb(229, 229, 229);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.ui-form-control:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgb(var(--theme-accent-rgb) / 0.40);
}

.ui-form-control-md { height: 2.5rem; padding: 0 0.75rem; }
.ui-form-control-padded { padding: 0.5rem 0.75rem; }

.ui-textarea {
  min-height: 150px;
  width: 100%;
  resize: none;
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  padding: 0.75rem 3rem 0.75rem 0.75rem;
  color: #f3f4f6;
  background: linear-gradient(to bottom, var(--theme-surface), var(--theme-surface-deep));
  box-shadow: 0 1px 2px rgb(9 3 18 / 0.24);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.ui-textarea::placeholder { color: #6b7280; }
.ui-textarea:focus { outline: none; border-color: rgba(255, 255, 255, 0.15); box-shadow: none; }

.ui-shop-select {
  color-scheme: dark;
  background-color: rgb(var(--theme-bg-rgb) / 0.96);
}

.ui-shop-select option,
.ui-shop-option {
  background-color: var(--theme-surface-2);
  color: var(--theme-text);
}

.ui-shop-select option:checked,
.ui-shop-select option:hover,
.ui-shop-select option:focus {
  background-color: var(--theme-accent-strong);
  color: #ffffff;
}

.ui-list-inline-input,
.ui-list-inline-select {
  min-height: 3rem;
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  background: linear-gradient(to bottom, var(--theme-surface), var(--theme-surface-deep));
  color: var(--theme-text-strong);
  padding: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.ui-list-inline-input {
  min-width: 0;
  flex: 1 1 0%;
}

.ui-list-inline-input::placeholder { color: #6b7280; }

.ui-list-inline-input:focus,
.ui-list-inline-select:focus {
  outline: none;
  border-color: var(--theme-border-strong);
  box-shadow: none;
}

.ui-list-inline-select {
  width: 100%;
  color-scheme: dark;
}

.ui-list-inline-select option {
  background-color: var(--theme-surface-2);
  color: var(--theme-text);
}

.ui-list-inline-submit {
  min-height: 3rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .ui-list-inline-select {
    width: 132px;
    flex: none;
  }

  .ui-list-inline-submit { flex: none; }
}

.ui-search-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(4px);
}

.ui-search-panel {
  width: 100%;
  max-width: 64rem;
  overflow: hidden;
  border: 1px solid var(--theme-border);
  border-radius: 0.375rem;
  background-color: var(--theme-bg);
  background-image: url('/bg.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: 0 25px 50px rgb(9 3 18 / 0.42);
}

.ui-search-filter {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.375rem;
  border: 1px solid var(--theme-border);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.ui-search-filter:focus,
.ui-search-filter:focus-visible {
  outline: none;
  box-shadow: none;
}

.ui-search-filter.is-active-accent {
  border-color: rgb(var(--theme-accent-rgb) / 0.38);
  background: rgb(var(--theme-accent-rgb) / 0.12);
  color: var(--theme-text);
}

.ui-search-filter.is-active-danger {
  border-color: rgb(var(--theme-accent-rgb) / 0.38);
  background: rgb(var(--theme-accent-rgb) / 0.12);
  color: var(--theme-text);
}

.ui-search-filter.is-inactive {
  border-color: var(--theme-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--theme-text-muted);
}

.ui-search-filter.is-inactive:hover { background: rgba(255, 255, 255, 0.10); }
.ui-search-filter.is-active-white { border-color: rgb(var(--theme-accent-rgb) / 0.38); background: rgb(var(--theme-accent-rgb) / 0.12); color: var(--theme-text-strong); }
.ui-search-filter.is-inactive-white { border-color: var(--theme-border); background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.80); }
.ui-search-filter.is-inactive-white:hover { background: rgba(255, 255, 255, 0.10); }

.ui-gallery-card-title {
  border-radius: 0 0 0.75rem 0.75rem;
  background: rgba(255, 255, 255, 0.10);
  padding: 0.5rem;
  color: var(--theme-text-strong);
  font-size: 13px;
  line-height: 1.5;
  min-height: 0;
  transition: background 200ms ease, color 200ms ease;
}

.ui-gallery-card-title p {
  margin: 0;
}

.ui-card-hover-title {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 50;
  border-radius: 0 0 0.75rem 0.75rem;
  background: var(--theme-tooltip);
  padding: 0.5rem;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.50);
  transition: opacity 200ms ease, background 200ms ease;
}

.group:hover .ui-card-hover-title { opacity: 1; }

.ui-gallery-thumb {
  position: relative;
  width: 100%;
  cursor: pointer;
  border-radius: 0.75rem 0.75rem 0 0;
  background: rgba(255, 255, 255, 0.20);
}

.ui-gallery-thumb-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0.75rem 0.75rem 0 0;
}

.ui-gallery-thumb-img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem 0.75rem 0 0;
  background: var(--theme-surface);
  object-fit: contain;
  transition: opacity 300ms ease;
}

.ui-navbar-tooltip {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 50;
  margin-top: 0.5rem;
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: 0.375rem;
  background: var(--theme-tooltip);
  padding: 0.25rem 0.5rem;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1rem;
  opacity: 0;
  box-shadow: 0 10px 15px rgb(9 3 18 / 0.35);
  transition: opacity 150ms ease;
  --tw-ring-color: rgba(0, 0, 0, 0.20);
}

.peer:hover ~ .ui-navbar-tooltip { opacity: 1; }

.ui-navbar-primary {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  gap: 0.5rem;
  border-radius: 0.375rem;
  background: var(--theme-accent);
  padding: 0 1rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgb(9 3 18 / 0.35);
  vertical-align: middle;
}

.ui-navbar-primary:hover { background: color-mix(in oklab, var(--theme-accent) 88%, transparent); }

.ui-navbar-primary.is-loading,
.ui-navbar-icon.is-loading {
  position: relative;
  cursor: progress;
  pointer-events: none;
}

.ui-navbar-primary.is-loading {
  padding-right: 2.25rem;
}

.ui-navbar-primary.is-loading::after,
.ui-navbar-icon.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.625rem;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  transform: translateY(-50%);
  animation: ui-auth-spin 700ms linear infinite;
}

.ui-navbar-icon.is-loading::after {
  right: auto;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ui-navbar-icon.is-loading > svg {
  visibility: hidden;
}

@keyframes ui-auth-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.ui-navbar-icon.is-loading::after {
  animation-name: ui-auth-spin-centered;
}

@keyframes ui-auth-spin-centered {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.ui-navbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.10);
  color: var(--theme-text-strong);
  cursor: pointer;
  transition: background 150ms ease;
}

.ui-navbar-icon:hover { background: rgba(255, 255, 255, 0.20); }

.ui-sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  color: var(--theme-text);
  transition: background-color 150ms ease, color 150ms ease;
}

.ui-sidebar-nav-link:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.ui-sidebar-nav-link.is-active {
  background: var(--theme-accent);
  color: var(--theme-text-strong);
  font-weight: 600;
}

.ui-sidebar-mobile-link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  text-align: left;
  color: var(--theme-text);
}

.ui-sidebar-mobile-link:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.ui-sidebar-tag-link {
  display: block;
  width: 100%;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.10);
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  color: rgb(229, 231, 235);
  transition: background-color 150ms ease, color 150ms ease;
}

.ui-sidebar-tag-link:hover {
  background: rgba(255, 255, 255, 0.20);
}

.ui-sidebar-tag-link.is-active {
  background: var(--theme-accent);
  color: #fff;
}

.ui-gallery-badge {
  --ui-gallery-badge-height: 23px;
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: var(--ui-gallery-badge-height);
  border: 1px solid #000;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  transition: filter 200ms ease;
}

.ui-gallery-badge:hover {
  filter: brightness(1.3);
}

.ui-gallery-badge--inline {
  position: static;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-gallery-flag-badge {
  box-sizing: border-box;
  height: 23px;
  overflow: hidden;
}

.ui-gallery-flag-badge img {
  display: block;
  width: auto;
  height: 100%;
}

.ui-gallery-new-badge {
  --ui-gallery-badge-height: 23px;
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: var(--ui-gallery-badge-height);
  border-radius: 0.375rem;
  background: var(--theme-accent);
  padding: 0.25rem 0.5rem;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.ui-entity-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.10);
  color: rgb(229, 231, 235);
  font-size: 0.875rem;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.ui-entity-chip:hover {
  background: rgba(255, 255, 255, 0.20);
}

.ui-entity-chip-count {
  display: flex;
  align-items: center;
  border-left-width: 1px;
  border-radius: 0 0.375rem 0.375rem 0;
  padding: 0.25rem 0.5rem;
  color: rgb(209, 213, 219);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.ui-entity-chip:hover .ui-entity-chip-count {
  color: rgb(229, 231, 235);
}

.ui-entity-chip-border {
  border-color: color-mix(in oklab, white 10%, transparent);
}

.ui-sidebar-shell {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  height: 100vh;
  width: 205px;
  transform: translateX(-100%);
  overflow-y: auto;
  overflow-x: hidden;
  background: rgb(var(--theme-bg-rgb) / 0.90);
  backdrop-filter: blur(12px);
  transition: transform 200ms ease-in-out;
}

@media (min-width: 768px) {
  .ui-sidebar-shell:not(.ui-sidebar-mobile) {
    top: 73px;
    height: calc(100vh - 73px);
    transform: translateX(0);
    border-right: 1px solid color-mix(in oklab, white 5%, transparent);
    background: transparent;
    backdrop-filter: none;
  }

  .ui-sidebar-mobile { display: none; }
}

.ui-sidebar-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 0.75rem;
  text-align: left;
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(9 3 18 / 0.20);
  transition: transform 150ms ease, background 150ms ease;
}

.ui-sidebar-toggle:hover { background: rgba(255, 255, 255, 0.20); }
.ui-sidebar-toggle:active { transform: scale(0.99); }
.ui-sidebar-toggle:focus { outline: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.20); }

.ui-toggle-track {
  position: relative;
  width: 2.25rem;
  height: 1.25rem;
  border: 1px solid var(--theme-border);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.10);
  transition: background 200ms ease, border-color 200ms ease, opacity 200ms ease;
}

.ui-toggle-track::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(9 3 18 / 0.34);
  transition: transform 200ms ease, background 200ms ease;
}

.peer:checked ~ .ui-toggle-track {
  border-color: rgb(var(--theme-accent-rgb) / 0.55);
  background: linear-gradient(to right, var(--theme-accent), var(--theme-accent-soft));
}

.peer:checked ~ .ui-toggle-track::after {
  transform: translate(1rem, -50%);
  background: #fff;
}

.peer:disabled ~ .ui-toggle-track {
  cursor: not-allowed;
  opacity: 0.50;
}

.ui-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.10);
  border-top-color: var(--theme-accent);
  border-radius: 9999px;
  animation: spin 1s linear infinite;
}

.ui-spinner-white {
  border-color: rgba(255, 255, 255, 0.30);
  border-top-color: #fff;
}

.ui-modal-overlay.hidden,
.ui-search-modal-overlay.hidden {
  display: none !important;
}

.ui-modal-overlay:not(.hidden),
.ui-search-modal-overlay:not(.hidden) {
  display: flex;
}

.ui-spinner:not(.hidden) {
  display: inline-block;
}

.ui-auth-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #9ca3af;
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}

.ui-auth-tab:hover { color: #fff; }
.ui-auth-tab.is-active { color: #fff; border-bottom: 2px solid var(--theme-accent); }

.ui-auth-input {
  width: 100%;
  border: 1px solid var(--theme-border);
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.10);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: #fff;
}

.ui-auth-input::placeholder { color: #9ca3af; }
.ui-auth-input:focus { outline: none; }

.ui-password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.ui-password-toggle:hover { color: #fff; }

.ui-rule-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 9999px;
}

.ui-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border-radius: 0.25rem;
  background: var(--theme-accent);
  padding: 0.5rem;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.ui-auth-submit:hover { background: color-mix(in oklab, var(--theme-accent) 88%, transparent); }
.ui-auth-submit:disabled { opacity: 0.60; }

.ui-modal-panel-auth {
  position: relative;
  width: 100%;
  max-width: 28rem;
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  background: rgb(var(--theme-bg-rgb) / 0.98);
  padding: 1.5rem;
  box-shadow: 0 10px 15px rgb(9 3 18 / 0.28);
  backdrop-filter: blur(12px);
  transition: opacity 150ms ease;
}

.ui-game-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgb(9 3 18 / 0.24);
  transition: border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.ui-game-card:hover {
  border-color: rgb(var(--theme-accent-rgb) / 0.34);
  box-shadow: 0 0 0 1px rgb(var(--theme-accent-rgb) / 0.25), 0 0 28px rgb(var(--theme-accent-rgb) / 0.18);
}

.ui-quiz-choice-card {
  position: relative;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgb(9 3 18 / 0.24);
  cursor: pointer;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}

.ui-quiz-choice-card:hover { box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35); }
.ui-quiz-choice-card:focus { outline: none; }

.ui-game-glow {
  position: absolute;
  width: 16rem;
  height: 16rem;
  border-radius: 9999px;
  opacity: 0;
  filter: blur(64px);
  pointer-events: none;
  transition: opacity 150ms ease;
}

.ui-game-card:hover .ui-game-glow,
.group:hover .ui-game-glow { opacity: 1; }

.ui-game-glow-top { top: -6rem; right: -6rem; background: rgb(var(--theme-accent-rgb) / 0.18); }
.ui-game-glow-bottom { bottom: -6rem; left: -6rem; background: rgb(var(--theme-accent-rgb) / 0.12); }

.ui-icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--theme-border);
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.25);
}

.ui-icon-tile-lg {
  width: 3rem;
  height: 3rem;
}

.ui-stat-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.20);
  padding: 0.75rem;
}

.ui-caption-xs {
  color: #9ca3af;
  font-size: 11px;
  line-height: 1rem;
}

.ui-stat-value-lg {
  margin-top: 0.25rem;
  color: #f3f4f6;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.75rem;
}

.ui-small-link,
.ui-small-link-accent {
  display: inline-flex;
  align-items: center;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ui-small-link {
  border: 1px solid var(--theme-border);
  background: rgba(0, 0, 0, 0.20);
  color: #e5e7eb;
}

.ui-small-link:hover { background: rgba(0, 0, 0, 0.30); }

.ui-small-link-accent {
  border: 1px solid var(--theme-accent-border-soft);
  background: rgb(var(--theme-accent-rgb) / 0.12);
  color: var(--theme-accent-muted);
}

.ui-small-link-accent:hover { background: rgb(var(--theme-accent-rgb) / 0.15); }

.ui-chip-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--theme-border);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.20);
  padding: 0.25rem 0.625rem;
  color: #e5e7eb;
  font-size: 0.75rem;
  line-height: 1rem;
}

.ui-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--theme-accent-border-soft);
  border-radius: 0.75rem;
  background: rgb(var(--theme-accent-rgb) / 0.12);
  color: var(--theme-accent-muted);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease;
}

.ui-help-btn:hover { background: rgb(var(--theme-accent-rgb) / 0.15); }

.ui-stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.20);
  padding: 0.5rem 0.75rem;
}

.ui-navbar-coin {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  gap: 0.5rem;
  overflow: visible;
  border-radius: 0.375rem;
  padding: 0 0.75rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.ui-navbar-coin.is-active {
  background: var(--theme-accent);
  color: #fff;
  box-shadow: 0 1px 3px rgb(9 3 18 / 0.35);
}

.ui-navbar-coin.is-idle {
  background: rgba(255, 255, 255, 0.10);
  color: var(--theme-text-strong);
}

.ui-navbar-coin.is-active:hover { background: color-mix(in oklab, var(--theme-accent) 88%, transparent); }
.ui-navbar-coin.is-idle:hover { background: rgba(255, 255, 255, 0.20); }

.ui-dashboard-hero {
  border: 1px solid var(--theme-border-soft);
  border-radius: 1rem;
  background:
    radial-gradient(520px 220px at 12% 0%, rgb(var(--theme-accent-rgb) / 0.12), transparent 70%),
    linear-gradient(135deg, var(--theme-surface), var(--theme-bg));
  padding: 1.5rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 18px 45px rgb(9 3 18 / 0.22);
}

.peer:checked ~ .peer-checked\:bg-theme-accent-strong {
  background: linear-gradient(to right, var(--theme-accent), var(--theme-accent-soft)) !important;
}

.peer:checked ~ .peer-checked\:after\:bg-theme-accent-muted::after {
  background-color: #fff !important;
}

.ui-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid color-mix(in oklab, white 5%, transparent);
  background-color: var(--theme-bg);
  background-image: url('/assets/svg/bg.svg');
  background-repeat: no-repeat;
  background-position: top;
  background-size: cover;
}

@media (min-width: 768px) {
  .ui-site-header { z-index: 50; }
}

.ui-btn.hidden {
  display: none !important;
}

.ui-taxonomy-card-action {
  border-radius: 0.375rem;
  background-color: var(--theme-surface-2);
  padding: 0.25rem 0.5rem;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  transition: filter 200ms ease;
}

.ui-taxonomy-card-action:hover {
  filter: brightness(1.3);
}

.ui-taxonomy-count-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 2h12a2 2 0 0 1 2 2v12h-2V4H8V2Zm-4 6h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2Zm0 2v10h10V10H4Zm8.6 7.1H5.4l2.2-2.8 1.6 1.9 1.4-1.6 2 2.5ZM11 12.8a1.2 1.2 0 1 1-2.4 0 1.2 1.2 0 0 1 2.4 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 2h12a2 2 0 0 1 2 2v12h-2V4H8V2Zm-4 6h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2Zm0 2v10h10V10H4Zm8.6 7.1H5.4l2.2-2.8 1.6 1.9 1.4-1.6 2 2.5ZM11 12.8a1.2 1.2 0 1 1-2.4 0 1.2 1.2 0 0 1 2.4 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#navbarSearchBox.is-loading {
  cursor: progress;
}

#navbarSearchBox.is-loading::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  animation: ui-search-spin 700ms linear infinite;
}

#navbarSearchBox.is-loading > svg {
  visibility: hidden;
}

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

.ui-sidebar-shell {
  transform: translateX(0);
}

.ui-sidebar-shell.-translate-x-full {
  transform: translateX(-100%);
}

@media (min-width: 768px) {
  .ui-sidebar-shell:not(.ui-sidebar-mobile) {
    transform: translateX(0) !important;
  }
}

@media (min-width: 768px) {
  #sidebar.ui-sidebar-shell:not(.ui-sidebar-mobile) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
}
