/* Copyright (c) 2019-2026 Five Squared Interactive. All rights reserved. */

/* The directory's pages, in the look of the original WorldHub site and its
   MyWorlds page: a light gradient with soft colour behind, a frosted bar
   across the top with the wordmark, white rounded cards with a gradient
   title, gradient buttons, and a dark frosted footer. Inter and the primary
   gradient are the brand's. Served same-origin, so the pages' policy needs
   no inline styles and nothing from a CDN. */
/* Hidden is hidden: a class that sets display (.btn, cards) would otherwise
   outrank the browser's own [hidden] rule. */
[hidden] {
  display: none !important;
}
:root {
  --primary: #667eea;
  --primary-deep: #764ba2;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --text: #2b2b3a;
  --muted: #666;
  --line: rgba(0, 0, 0, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 70px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  /* The whole page takes this load's tint (theme.js), as the original's did; the fallbacks are its own pastel. */
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--tint-1, #90caf9) 18%, white) 0%,
    color-mix(in srgb, var(--tint-2, #ce93d8) 18%, white) 50%,
    color-mix(in srgb, var(--tint-3, #ffcc80) 18%, white) 100%
  );
  position: relative;
}
/* The soft glow behind every page, in this load's tint (theme.js picks it, as the original did). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at var(--tint-at-1, 20% 80%), color-mix(in srgb, var(--tint-1, #7877c6) 30%, transparent) 0%, transparent 50%),
    radial-gradient(circle at var(--tint-at-2, 80% 20%), color-mix(in srgb, var(--tint-2, #ff77c6) 30%, transparent) 0%, transparent 50%),
    radial-gradient(circle at var(--tint-at-3, 40% 40%), color-mix(in srgb, var(--tint-3, #78dbff) 30%, transparent) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}
a {
  color: var(--primary-deep);
}

/* The bar across the top. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
  padding: 0.5rem 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.site-header .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
/* The wordmark is wide (about 6:1): set its height only, so it keeps its shape. */
.site-header .brand img {
  height: 38px;
  width: auto;
  max-width: 239px;
  display: block;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-header nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  color: #444;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header nav a:hover {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: var(--primary-deep);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(103, 126, 234, 0.2);
}

/* The page's one white card. */
main {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  flex: 1;
}
.card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: 3rem;
  margin-bottom: 1.5rem;
}
h1 {
  margin: 0 0 0.5rem;
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
}
h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #444;
}
p.lead {
  margin: 0 auto 2rem;
  max-width: 44rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}

/* Fields and buttons. */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input:not([type]),
select,
textarea {
  font: inherit;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: var(--text);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(103, 126, 234, 0.2);
}
input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--primary);
  vertical-align: -0.15rem;
}
textarea {
  min-height: 6rem;
}
button,
.btn {
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  border: none;
  background: var(--primary-gradient);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(103, 126, 234, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(103, 126, 234, 0.4);
}

/* The original's shine: a band of light crosses a button under the pointer. */
button,
.btn,
.world-card-foot a.visit,
.site-header nav a {
  position: relative;
  overflow: hidden;
}
button::before,
.btn::before,
.world-card-foot a.visit::before,
.site-header nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.5s;
  pointer-events: none;
}
button:hover::before,
.btn:hover::before,
.world-card-foot a.visit:hover::before,
.site-header nav a:hover::before {
  left: 100%;
}
button:disabled::before {
  display: none;
}

/* Outlined buttons are glass, and fill with colour under the pointer, as the original's. */
.btn-secondary,
button.delete,
button.share {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--primary-deep);
  border: 1px solid rgba(103, 126, 234, 0.35);
  box-shadow: none;
}
.btn-secondary:hover,
button.delete:hover,
button.share:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 25px rgba(103, 126, 234, 0.3);
}
button.delete {
  color: #c62828;
  border-color: rgba(198, 40, 40, 0.3);
}
button.delete:hover {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #fff;
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}
.btn-small,
button.delete,
button.share {
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 10px;
}
.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

/* Search and its results. */
form.search {
  display: flex;
  gap: 0.5rem;
  max-width: 44rem;
  margin: 0 auto;
}
form.search input {
  border-radius: 50px;
  padding-left: 1.25rem;
}
form.search button {
  border-radius: 50px;
}
ol#results {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
.listing {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.listing:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(103, 126, 234, 0.15);
  border-color: rgba(103, 126, 234, 0.2);
}
.listing.featured {
  border-color: rgba(103, 126, 234, 0.45);
}
.listing-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #333;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.listing-description {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.listing-more {
  font-size: 0.9rem;
  align-self: flex-start;
}

/* MyWorlds: the create form and one card per world. */
form#create {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
form#create label {
  font-weight: 600;
}
form#create select {
  width: auto;
  min-width: 10rem;
}
ul.worlds {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
ul.worlds > li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
ul.worlds > li:hover {
  box-shadow: 0 12px 24px rgba(103, 126, 234, 0.15);
  border-color: rgba(103, 126, 234, 0.2);
}
ul.worlds .world-title {
  flex: 1 0 100%;
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  overflow-wrap: anywhere;
}
ul.worlds a.open {
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
ul.worlds label {
  font-size: 0.9rem;
  color: var(--muted);
}
ul.worlds > li > div {
  flex: 1 0 100%;
}

/* Who can edit a world, inside its card. */
.sharing {
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.4rem;
}
.sharing ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}
.sharing li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}
.sharing li:last-child {
  border-bottom: none;
}
.sharing .who {
  font-weight: 600;
}
.sharing .what {
  flex: 1;
  color: var(--muted);
  font-size: 0.9rem;
}
.sharing form.add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.75rem 0;
}
.sharing form.add input[type="email"] {
  flex: 1 1 12rem;
  width: auto;
  padding: 0.5rem 0.8rem;
}
.sharing form.add label,
.sharing .everyone-row {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Asking to edit, on a world's page. */
.edit-ask {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.edit-ask p {
  color: var(--muted);
}
#open {
  display: inline-block;
  width: fit-content;
  margin: 0;
}
#open[hidden] {
  display: none;
}

#message {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(103, 126, 234, 0.1);
  color: #333;
}
#message[data-kind="error"] {
  background: rgba(220, 53, 69, 0.12);
  color: #a61b29;
}
#message[data-kind="ok"] {
  background: rgba(40, 167, 69, 0.12);
  color: #1e6b33;
}
.legal h2 {
  margin-top: 1.5rem;
}
.legal ul {
  padding-left: 1.4rem;
}

/* The footer bar. */
.site-footer {
  text-align: center;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}
.site-footer p {
  margin: 0 0 0.25rem;
}
.site-footer-links a {
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.site-footer-links a:hover {
  color: #fff;
}

@media (max-width: 40rem) {
  body {
    padding-top: 108px;
  }
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .card {
    padding: 1.75rem 1.25rem;
  }
  h1 {
    font-size: 2.2rem;
  }
  form.search {
    flex-direction: column;
  }
}

/* Signed out, the page's one action sits in the middle, as on the original. */
#signed-out,
#no-sign-in {
  text-align: center;
  padding: 1rem 0;
}

/* ---- The directory's home and search pages, as on worldhub.me ---- */

.icon {
  display: inline-block;
  vertical-align: -0.125em;
}

/* The search pill in the top bar. */
.site-header .nav-search {
  flex: 0 1 20rem;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  padding: 0.15rem 0.25rem 0.15rem 0;
  margin-right: auto;
}
.site-header .nav-search input {
  border: none;
  background: transparent;
  border-radius: 50px;
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
}
.site-header .nav-search input:focus {
  box-shadow: none;
}
.site-header .nav-search button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--primary);
  box-shadow: none;
  display: grid;
  place-items: center;
}
.site-header .nav-search button:hover {
  transform: none;
  background: rgba(103, 126, 234, 0.12);
  box-shadow: none;
}

/* The hero. */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2.5rem 1.25rem 3.5rem;
  /* See-through, so the page's tint shows behind the hero as on the original. */
  background: linear-gradient(135deg, color-mix(in srgb, var(--tint-1, #e8eaf6) 12%, transparent) 0%, color-mix(in srgb, var(--tint-2, #f3e5f5) 12%, transparent) 50%, color-mix(in srgb, var(--tint-3, #ede7f6) 12%, transparent) 100%);
}
.hero-float {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(103, 126, 234, 0.18);
}
/* The original's floating icons: each drifts up, turns half round and back, on its own beat. */
.hero-float .icon {
  position: absolute;
  width: 3rem;
  height: 3rem;
  animation: float-icon 6s ease-in-out infinite;
}
.hero-float span:nth-child(1) .icon { top: 10%; left: 5%; animation-delay: 0s; }
.hero-float span:nth-child(2) .icon { top: 15%; right: 10%; width: 2.5rem; height: 2.5rem; animation-delay: 2s; }
.hero-float span:nth-child(3) .icon { bottom: 25%; left: 8%; width: 2rem; height: 2rem; animation-delay: 4s; }
.hero-float span:nth-child(4) .icon { bottom: 20%; right: 5%; width: 2.8rem; height: 2.8rem; animation-delay: 1s; }
@keyframes float-icon {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}
/* MyWorlds and About float theirs around the title at the top of the page's card, as the original's did. */
main.myworlds > .card,
main.legal > .card {
  position: relative;
}
.card > .hero-float {
  inset: 0 0 auto 0;
  height: 12rem;
}
.card > .hero-float .icon {
  animation-duration: 8s;
}
@media (prefers-reduced-motion: reduce) {
  .hero-float .icon {
    animation: none;
  }
}
h1.hero-title {
  position: relative;
  font-size: 3rem;
  font-weight: 800;
  margin: 0.5rem 0 1.25rem;
  color: #333;
  background: none;
  -webkit-text-fill-color: #333;
}
.hero-lead {
  position: relative;
  max-width: 38rem;
  margin: 0 auto;
  font-size: 1.15rem;
  color: #555;
}
.hero-ctas {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}
.btn-hero,
.btn-hero-secondary {
  border-radius: 50px;
  padding: 0.85rem 2rem;
}
.btn-hero-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: #333;
  border: 2px solid rgba(118, 75, 162, 0.25);
  box-shadow: none;
}
.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

/* Sections of the home page. */
main.home {
  max-width: 72rem;
}
main.home h2 {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 3rem 0 1.75rem;
}
main.home h2 .star {
  color: #f5b301;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  text-align: center;
}
.how-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(103, 126, 234, 0.35);
}
.how-step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  color: #333;
}
.how-step p {
  margin: 0 auto;
  max-width: 18rem;
  color: var(--muted);
}

/* World cards. */
.world-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
/* Liquid glass, as the original's cards: translucent, blurred, and a shine
   that crosses a card under the pointer. */
.world-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.world-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
  z-index: 1;
  pointer-events: none;
}
.world-card:hover::before {
  left: 100%;
}
.world-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: var(--glass-shadow), 0 20px 40px rgba(103, 126, 234, 0.2);
  border-color: rgba(103, 126, 234, 0.3);
}
@media (prefers-reduced-motion: reduce) {
  .world-card,
  .world-card::before,
  .myworld-card-open,
  .myworld-card-open::before {
    transition: none;
  }
  .world-card:hover,
  .myworld-card-open:hover {
    transform: none;
  }
}
.world-card-picture {
  height: 190px;
  background: #b3cae4;
}
.world-card-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.world-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--primary-gradient);
  color: rgba(255, 255, 255, 0.75);
  font-size: 3.5rem;
}
.world-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
}
.world-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.world-card-head time {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
}
.world-card-body {
  flex: 1;
  padding: 0.9rem 1.1rem 0.4rem;
}
.world-card-text {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: #555;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.world-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.world-card-tags.centered {
  justify-content: center;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #6c757d;
  color: #fff;
}
.tag-more {
  background: transparent;
  color: #444;
}
.world-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.1rem 1rem;
}
.world-card-actions {
  display: flex;
}
.btn-card {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(103, 126, 234, 0.35);
  background: #fff;
  color: var(--primary);
  text-decoration: none;
  box-shadow: none;
  border-radius: 0;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-card:hover {
  background: var(--primary-gradient);
  color: #fff;
  transform: none;
  box-shadow: none;
}
.world-card-actions .btn-card:first-child {
  border-radius: 8px 0 0 8px;
}
.world-card-actions .btn-card:last-child {
  border-radius: 0 8px 8px 0;
}
.world-card-actions .btn-card:only-child {
  border-radius: 8px;
}
.world-card-actions .btn-card + .btn-card {
  border-left: none;
}
.btn-card.visit {
  color: #198754;
  border-color: rgba(25, 135, 84, 0.4);
}
.btn-icon {
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  color: #0dcaf0;
  border-color: rgba(13, 202, 240, 0.4);
}
.btn-icon.copied {
  background: #0dcaf0;
  color: #fff;
}
.more-row {
  text-align: center;
  margin-top: 1.75rem;
}

/* Building your own, and WebVerse. */
.build-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem;
}
.build-card {
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.build-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.build-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}
.build-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;
}
.build-card p {
  color: #555;
  margin: 0 0 1.25rem;
}
.build-link,
.webverse-download {
  display: inline-block;
  border-radius: 50px;
  padding: 0.55rem 1.5rem;
  font-weight: 600;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--primary);
  text-decoration: none;
  transition: all 0.25s ease;
}
.build-link:hover,
.webverse-download:hover {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}
.webverse-promo {
  margin: 3rem auto 1rem;
  max-width: 56rem;
  padding: 2rem;
  border-radius: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  text-align: center;
}
main.home .webverse-promo h2 {
  margin: 0 0 0.5rem;
}
.webverse-lead {
  color: #555;
  margin: 0 0 1.25rem;
}
.webverse-benefits {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-weight: 500;
}
.webverse-platforms {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #777;
}

/* The search page. */
main.search-page {
  max-width: 72rem;
}
.search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.search-bar input {
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}
.search-bar button {
  white-space: nowrap;
  border-radius: 14px;
}
.result-count {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.empty {
  text-align: center;
  color: var(--muted);
}
.pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0 0.5rem;
}
.pager button,
.pager .page-gap {
  font: inherit;
  padding: 0.45rem 0.85rem;
  border: 1px solid #dee2e6;
  margin-left: -1px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--primary-deep);
  border-radius: 0;
  box-shadow: none;
}
.pager button:first-child {
  border-radius: 8px 0 0 8px;
}
.pager button:last-child {
  border-radius: 0 8px 8px 0;
}
.pager button:hover {
  transform: none;
  box-shadow: none;
  background: rgba(103, 126, 234, 0.08);
}
.pager button.current {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
}
.pager button:disabled {
  color: #aaa;
  cursor: default;
  background: #fff;
}

/* A world's own page. */
.world-picture {
  margin: -3rem -3rem 2rem;
  height: 320px;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: #b3cae4;
}
.world-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 48rem) {
  .site-header .nav-search {
    display: none;
  }
  h1.hero-title {
    font-size: 2.2rem;
  }
  .world-picture {
    margin: -1.75rem -1.25rem 1.5rem;
    height: 200px;
  }
}

/* ---- The account menu in the top bar ---- */
.account {
  position: relative;
  margin-left: 0.5rem;
}
.account-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: #0dcaf0;
  border: 1px solid rgba(13, 202, 240, 0.35);
  box-shadow: none;
}
.account-button:hover {
  transform: none;
  background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
  color: #fff;
  box-shadow: none;
}
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 14rem;
  padding: 0.4rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(31, 38, 135, 0.25);
  z-index: 20;
}
.account-menu .menu-who {
  padding: 0.5rem 0.75rem 0.35rem;
  font-weight: 700;
  color: #333;
}
.account-menu .menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #333;
  font: inherit;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}
.account-menu .menu-item:hover {
  transform: none;
  box-shadow: none;
  background: rgba(103, 126, 234, 0.1);
  color: var(--primary-deep);
}
.account-menu .menu-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0.35rem 0;
}

/* ---- Dark mode, as the original site's ---- */
html[data-theme="dark"] {
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --text: #f1f1f5;
  --muted: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.12);
  color-scheme: dark;
}
html[data-theme="dark"] body {
  color: var(--text);
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
}
html[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at var(--tint-at-1, 20% 80%), color-mix(in srgb, var(--tint-1, #7877c6) 20%, transparent) 0%, transparent 50%),
    radial-gradient(circle at var(--tint-at-2, 80% 20%), color-mix(in srgb, var(--tint-2, #ff77c6) 20%, transparent) 0%, transparent 50%),
    radial-gradient(circle at var(--tint-at-3, 40% 40%), color-mix(in srgb, var(--tint-3, #78dbff) 20%, transparent) 0%, transparent 50%);
}
html[data-theme="dark"] a {
  color: #bb86fc;
}
/* The wordmark is dark grey: lightened on the dark page, as the original does. */
html[data-theme="dark"] .site-header .brand img {
  filter: brightness(2);
}
html[data-theme="dark"] .site-header nav a {
  color: rgba(255, 255, 255, 0.85);
}
html[data-theme="dark"] .site-header nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .site-header .nav-search {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
html[data-theme="dark"] .site-header .nav-search input {
  color: #fff;
}
html[data-theme="dark"] .site-header .nav-search button {
  color: #a8b5ff;
}
html[data-theme="dark"] .account-menu {
  background: rgba(30, 30, 50, 0.97);
  border-color: var(--line);
}
html[data-theme="dark"] .account-menu .menu-who,
html[data-theme="dark"] .account-menu .menu-item {
  color: #f1f1f5;
}
html[data-theme="dark"] .account-menu .menu-item:hover {
  background: rgba(187, 134, 252, 0.15);
  color: #fff;
}
html[data-theme="dark"] .card {
  background: rgba(30, 30, 45, 0.6);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] h1 {
  background: linear-gradient(135deg, #bb86fc 0%, #03dac6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
html[data-theme="dark"] h3,
html[data-theme="dark"] .how-step h3,
html[data-theme="dark"] .build-card h3,
html[data-theme="dark"] .world-card-title,
html[data-theme="dark"] .listing-title,
html[data-theme="dark"] ul.worlds .world-title,
html[data-theme="dark"] .sharing .who {
  color: #f1f1f5;
}
html[data-theme="dark"] .hero {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(22, 33, 62, 0.9) 50%, rgba(15, 15, 35, 0.9) 100%);
}
html[data-theme="dark"] h1.hero-title {
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
html[data-theme="dark"] .hero-lead,
html[data-theme="dark"] .build-card p,
html[data-theme="dark"] .webverse-lead,
html[data-theme="dark"] .world-card-text,
html[data-theme="dark"] .listing-description {
  color: rgba(255, 255, 255, 0.8);
}
html[data-theme="dark"] .btn-hero-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
html[data-theme="dark"] .world-card,
html[data-theme="dark"] .listing,
html[data-theme="dark"] ul.worlds > li {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .world-card-head {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .tag-more {
  color: rgba(255, 255, 255, 0.75);
}
html[data-theme="dark"] .btn-card,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] button.delete,
html[data-theme="dark"] button.share,
html[data-theme="dark"] .pager button,
html[data-theme="dark"] .pager .page-gap {
  background: rgba(255, 255, 255, 0.06);
  color: #a8b5ff;
  border-color: rgba(168, 181, 255, 0.35);
}
html[data-theme="dark"] .btn-card.visit {
  color: #6fdc9b;
  border-color: rgba(111, 220, 155, 0.4);
}
html[data-theme="dark"] .pager button.current {
  background: linear-gradient(135deg, #bb86fc 0%, #6b5fd3 100%);
  color: #fff;
}
html[data-theme="dark"] .pager button:disabled {
  color: rgba(255, 255, 255, 0.35);
}
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input:not([type]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .search-bar input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
html[data-theme="dark"] .build-link,
html[data-theme="dark"] .webverse-download {
  color: #a8b5ff;
}
html[data-theme="dark"] .webverse-platforms {
  color: rgba(255, 255, 255, 0.65);
}
html[data-theme="dark"] .site-footer {
  background: rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] #message {
  background: rgba(187, 134, 252, 0.12);
  color: #f1f1f5;
}

/* ---- A card's one Visit, as the original site's home cards had ---- */
.world-card-title a {
  color: inherit;
  text-decoration: none;
}
.world-card-title a:hover {
  color: var(--primary-deep);
}
.world-card-foot {
  padding: 0.75rem 1.1rem 1.1rem;
}
.world-card-foot a.visit {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.45rem 1.25rem;
  border-radius: 25px;
  border: 1px solid rgba(103, 126, 234, 0.45);
  color: var(--primary);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.world-card-foot a.visit:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(103, 126, 234, 0.3);
}
html[data-theme="dark"] .world-card-foot a.visit {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
html[data-theme="dark"] .world-card-foot a.visit:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}
html[data-theme="dark"] .world-card-title a:hover {
  color: #bb86fc;
}

/* ---- MyWorlds, as the original: world tiles and a Create World tile ---- */
.login-required {
  text-align: center;
  padding: 2rem 1rem 1rem;
}
.login-required .lock {
  font-size: 4rem;
  color: #f5b301;
  margin-bottom: 1rem;
}
.login-required h2 {
  margin: 0 0 0.75rem;
}
.myworlds-grid {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.myworld-card {
  width: 220px;
  height: 180px;
}
.myworld-card-open {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #333;
  text-decoration: none;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.myworld-card-open::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s;
  pointer-events: none;
}
.myworld-card-open:hover::before {
  left: 100%;
}
.myworld-card-open:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--glass-shadow), 0 20px 40px rgba(103, 126, 234, 0.2);
  border-color: rgba(103, 126, 234, 0.3);
}
.myworld-card-open:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}
.myworld-card-open:disabled::before {
  display: none;
}
.limit-info {
  text-align: center;
  color: var(--muted, rgba(0, 0, 0, 0.6));
  margin: 0 0 1.25rem;
}
.limit-info.at-limit {
  color: #c62828;
  font-weight: 600;
}
.review-link {
  display: table;
  margin: 0 auto 1rem;
}
.review-note {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(244, 143, 177, 0.15);
  overflow-wrap: anywhere;
}
.review-note.muted {
  background: rgba(103, 126, 234, 0.08);
}
.list-world-card .myworld-card-open {
  border: 2px dashed rgba(103, 126, 234, 0.4);
}
.list-world-card .myworld-card-icon {
  color: #667eea;
}
.crumb {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
.review-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
.review-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.review-actions .reason {
  flex: 1 1 100%;
  order: -1;
  min-width: 0;
}
.myworld-card-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  color: #f48fb1;
}
.myworld-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  overflow-wrap: anywhere;
}
.myworld-card-subtitle {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
}
.create-world-card .myworld-card-open {
  background: transparent;
  border: 2px dashed rgba(103, 126, 234, 0.4);
  box-shadow: none;
}
/* Clear and dashed at rest; under the pointer they turn to glass and glow, as the world tiles do. */
.create-world-card .myworld-card-open:hover,
.list-world-card .myworld-card-open:hover {
  border-color: rgba(103, 126, 234, 0.6);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow), 0 20px 40px rgba(103, 126, 234, 0.2);
}
.create-world-card .myworld-card-open:disabled:hover {
  background: transparent;
  box-shadow: none;
}
.create-world-card .myworld-card-icon {
  color: #666;
}

/* The dialogs, frosted as the original's. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 20, 40, 0.45);
  backdrop-filter: blur(4px);
}
.modal[hidden] {
  display: none;
}
.modal-box {
  width: min(44rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.modal-world-icon {
  font-size: 1.8rem;
  color: var(--primary);
}
.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
}
.modal-body {
  padding: 1.5rem;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
}
.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.input-group input {
  flex: 1;
}
.listed-row {
  display: block;
  margin-bottom: 1rem;
  color: var(--muted);
}
.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.25);
}
.btn-success {
  background: linear-gradient(135deg, #20c997 0%, #198754 100%);
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.25);
}
.modal-foot .delete {
  margin-right: auto;
}

html[data-theme="dark"] .myworld-card-open {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .myworld-card-title,
html[data-theme="dark"] .modal-title {
  color: #fff;
}
html[data-theme="dark"] .myworld-card-subtitle {
  color: rgba(255, 255, 255, 0.5);
}
html[data-theme="dark"] .create-world-card .myworld-card-open {
  background: transparent;
  border-color: rgba(187, 134, 252, 0.4);
}
html[data-theme="dark"] .create-world-card .myworld-card-icon {
  color: rgba(255, 255, 255, 0.6);
}
html[data-theme="dark"] .modal-box {
  background: rgba(30, 30, 50, 0.92);
  border-color: var(--line);
}

/* Who made a world, on its card. */
.world-card-creator {
  flex: 0 1 auto;
  max-width: 45%;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A tag leads to the worlds that share it. */
a.tag {
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
a.tag:hover {
  background: var(--primary-deep);
  color: #fff;
  transform: translateY(-1px);
}

/* The search page: how many, the tag chosen, and the order. */
.search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}
.search-meta .result-count {
  margin: 0;
}
.active-tag {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.active-tag .tag-clear {
  padding: 0 0.45rem;
  line-height: 1.4;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: none;
}
.search-meta .sort {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.search-meta .sort select {
  width: auto;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
}

/* A world's page: the picture large, then everything about it. */
.world-detail .world-picture {
  height: clamp(220px, 45vw, 440px);
}
.world-detail-body {
  text-align: center;
}
.world-creator {
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 500;
}
.world-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
}
.world-actions .visit-world {
  font-size: 1.15rem;
  padding: 0.95rem 2.75rem;
}
.world-listed {
  font-size: 0.85rem;
  margin: 0.25rem 0 1rem;
}
.world-feature {
  margin: 0.5rem 0 1rem;
}

/* MyWorlds, grouped by where a world came from. */
.world-group + .world-group {
  margin-top: 1.5rem;
}
.world-group-heading {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #444;
}
.myworld-card-picture {
  display: block;
  width: 100%;
  height: 92px;
  margin-bottom: 0.6rem;
  border-radius: 10px;
  overflow: hidden;
  background: #b3cae4;
}
.myworld-card-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.myworld-card-open:has(.myworld-card-picture) {
  padding: 0.75rem 0.75rem 1rem;
  justify-content: flex-start;
}

/* Where a world stands, as a coloured badge. */
.badge {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}
.badge-private {
  background: rgba(108, 117, 125, 0.15);
  color: #495057;
}
.badge-waiting {
  background: rgba(255, 193, 7, 0.22);
  color: #8a6100;
}
.badge-listed {
  background: rgba(25, 135, 84, 0.15);
  color: #146c43;
}
.badge-rejected {
  background: rgba(220, 53, 69, 0.15);
  color: #b02a37;
}
html[data-theme="dark"] .badge-private {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}
html[data-theme="dark"] .badge-waiting {
  color: #ffd75e;
}
html[data-theme="dark"] .badge-listed {
  color: #75d6a5;
}
html[data-theme="dark"] .badge-rejected {
  color: #ff8a95;
}
html[data-theme="dark"] .world-group-heading {
  color: rgba(255, 255, 255, 0.9);
}

/* The name on listed worlds, and a world's picture, chosen in MyWorlds. */
.creator-form {
  max-width: 28rem;
  margin: 0 auto 1.25rem;
}
.creator-form .input-group input {
  flex: 1;
}
.picture-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.picture-choose input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.edit-elsewhere {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

/* A world's templates in its dialog: a list with pictures, and a form to add one. */
.templates {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.templates-heading {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.template-list {
  list-style: none;
  margin: 0.75rem 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.template-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.template-picture {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: var(--primary-deep);
  background: rgba(103, 126, 234, 0.08);
}
.template-label {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.template-trigger {
  grid-column: 2 / 4;
}
.add-template {
  display: grid;
  gap: 0.6rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px dashed rgba(103, 126, 234, 0.4);
}
.template-field {
  display: grid;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.template-trigger-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem;
}
.template-loop {
  font-size: 0.85rem;
  color: var(--muted);
}
.add-template button[type="submit"] {
  justify-self: start;
}
