:root {
  --bg: #f4f1e8;
  --bg-strong: #e8e1d2;
  --surface: #fffdf7;
  --surface-2: #f7f3ea;
  --ink: #18211d;
  --muted: #69736c;
  --line: #d9d0bd;
  --forest: #173b2f;
  --forest-2: #255d49;
  --amber: #d98b2b;
  --amber-2: #f0b35f;
  --blue: #316f9f;
  --danger: #a33c2f;
  --ok: #2f7a55;
  --shadow: 0 18px 45px rgba(32, 37, 30, 0.12);
  --radius: 8px;
  --radius-sm: 6px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
}

body {
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.home-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(23, 59, 47, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(217, 139, 43, 0.12), transparent 48%),
    var(--bg);
}

.entry-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.entry-main {
  width: min(980px, 100%);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
}

.brand-lockup.compact {
  margin-bottom: 24px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--forest);
  color: #fff9e8;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: var(--shadow);
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
  box-shadow: none;
}

.overline {
  margin: 0 0 6px;
  color: var(--forest-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.entry-main h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.02;
}

.entry-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.entry-tile {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.entry-tile:hover {
  transform: translateY(-3px);
  border-color: var(--forest-2);
}

.entry-tile strong {
  font-size: 1.7rem;
}

.entry-tile span:last-child {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.5;
}

.tile-icon,
.icon-btn svg,
.ghost-btn svg {
  width: 26px;
  height: 26px;
}

.tile-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--forest);
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Neue Hauptseite: dunkler Sternenhimmel wie die alte Referenz, aber edler und tiefer. */
.home-page {
  --home-space: #080a18;
  --home-space-2: #101733;
  --home-glow: #76a6ff;
  --home-cyan: #56d8ff;
  --home-amber: #f0b35f;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
  color: #f4f7ff;
  background:
    radial-gradient(circle at 50% 34%, rgba(88, 128, 255, .24), transparent 16%),
    radial-gradient(circle at 78% 18%, rgba(86, 216, 255, .12), transparent 22%),
    radial-gradient(circle at 16% 78%, rgba(240, 179, 95, .08), transparent 22%),
    linear-gradient(180deg, #080a18 0%, #0a0c1d 46%, #070914 100%);
}

.home-page::before,
.home-page::after,
.entry-shell::before,
.entry-shell::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

.home-page::before {
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(circle, rgba(255,255,255,.88) 0 1px, transparent 1.5px) 6% 18% / 142px 118px,
    radial-gradient(circle, rgba(210,226,255,.72) 0 1px, transparent 1.6px) 42% 10% / 188px 154px,
    radial-gradient(circle, rgba(255,255,255,.55) 0 1px, transparent 1.5px) 71% 32% / 132px 166px,
    radial-gradient(circle, rgba(118,166,255,.7) 0 1.2px, transparent 1.8px) 20% 64% / 210px 180px,
    radial-gradient(circle, rgba(255,255,255,.42) 0 1px, transparent 1.6px) 86% 72% / 170px 136px;
  opacity: .78;
  animation: pfp-home-stars 26s linear infinite;
}

.home-page::after {
  width: min(720px, 72vw);
  height: min(250px, 25vw);
  left: 50%;
  top: 44%;
  z-index: -3;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  background:
    radial-gradient(ellipse at center, rgba(99, 174, 255, .88) 0 5%, rgba(44, 82, 211, .72) 6% 21%, rgba(18, 26, 80, .7) 22% 35%, transparent 36%),
    radial-gradient(ellipse at center, transparent 0 54%, rgba(132, 184, 255, .96) 55% 57%, rgba(26, 70, 214, .78) 58% 61%, transparent 62%);
  box-shadow:
    0 0 42px rgba(91, 145, 255, .7),
    0 0 110px rgba(72, 114, 255, .42),
    inset 0 0 46px rgba(255,255,255,.28);
  filter: saturate(1.15);
  opacity: .82;
}

.entry-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 23%),
    radial-gradient(ellipse at 50% 100%, rgba(45, 93, 118, .18), transparent 46%);
}

.entry-shell::before {
  left: 50%;
  top: 47%;
  z-index: -2;
  width: min(860px, 88vw);
  height: min(250px, 27vw);
  border: 1px solid rgba(124, 159, 245, .55);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  box-shadow:
    0 0 24px rgba(124,159,245,.48),
    inset 0 0 22px rgba(124,159,245,.24);
  opacity: .72;
}

.entry-shell::after {
  inset: auto 0 0 0;
  z-index: -1;
  height: 38%;
  background:
    linear-gradient(rgba(86,216,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86,216,255,.07) 1px, transparent 1px),
    linear-gradient(180deg, transparent, rgba(6, 10, 22, .72));
  background-size: 46px 46px;
  mask-image: linear-gradient(transparent, #000 36%);
  transform: perspective(900px) rotateX(64deg) translateY(42%);
  transform-origin: 50% 100%;
}

.home-page .entry-main {
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
}

.home-page .brand-lockup {
  color: #f4f7ff;
  text-shadow: 0 12px 42px rgba(0,0,0,.42);
}

.home-page .brand-mark {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.36), transparent 26%),
    linear-gradient(145deg, #8fb3ff, #4e6ef2 58%, #273177);
  color: #fff;
  border: 1px solid rgba(190, 211, 255, .58);
  box-shadow:
    0 18px 42px rgba(35, 72, 189, .38),
    0 0 28px rgba(124,159,245,.34);
}

.home-page .overline {
  color: #9dbbff;
}

.home-page .entry-main h1 {
  max-width: 820px;
  color: #f7f9ff;
  text-shadow:
    0 2px 0 rgba(255,255,255,.05),
    0 24px 64px rgba(0,0,0,.46);
}

.home-page .entry-actions {
  perspective: 1300px;
}

.home-page .entry-tile {
  position: relative;
  overflow: hidden;
  color: #f7f9ff;
  background:
    linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.045)),
    rgba(13, 18, 38, .76);
  border-color: rgba(146, 176, 255, .24);
  box-shadow:
    0 28px 80px rgba(0,0,0,.44),
    0 0 0 1px rgba(255,255,255,.055) inset,
    0 -1px 0 rgba(255,255,255,.13) inset;
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  transform: rotateX(4deg) rotateY(-2deg) translateZ(0);
  transform-style: preserve-3d;
}

.home-page .entry-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 12%, rgba(255,255,255,.22), transparent 22%),
    linear-gradient(120deg, transparent 0 42%, rgba(118,166,255,.16) 43% 47%, transparent 48%);
  opacity: .9;
  pointer-events: none;
}

.home-page .entry-tile::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, transparent, var(--home-glow), var(--home-cyan), transparent);
  opacity: .85;
  box-shadow: 0 0 26px rgba(86,216,255,.45);
}

.home-page .entry-tile:hover {
  transform: rotateX(2deg) rotateY(1deg) translateY(-8px) translateZ(22px);
  border-color: rgba(157, 187, 255, .7);
  box-shadow:
    0 36px 94px rgba(0,0,0,.5),
    0 0 44px rgba(96, 143, 255, .22),
    0 0 0 1px rgba(255,255,255,.08) inset;
}

.home-page .entry-tile strong,
.home-page .entry-tile span,
.home-page .entry-tile .tile-icon {
  position: relative;
  z-index: 1;
}

.home-page .entry-tile span:last-child {
  color: rgba(231, 238, 255, .74);
}

.home-page .tile-icon {
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,.28), transparent 28%),
    rgba(124,159,245,.14);
  color: #b9d1ff;
  border: 1px solid rgba(185,209,255,.32);
  box-shadow: 0 14px 28px rgba(0,0,0,.28);
}

.home-page .builder-tile {
  --home-glow: #8fb3ff;
  --home-cyan: #56d8ff;
}

.home-page .player-tile {
  --home-glow: #74f0b3;
  --home-cyan: #9dbbff;
  transform: rotateX(4deg) rotateY(2deg) translateZ(0);
}

.home-page .tts-tile {
  --home-glow: #f0b35f;
  --home-cyan: #8fb3ff;
}

.home-page .trophy-tile {
  --home-glow: #f1bd61;
  --home-cyan: #76d59b;
  transform: rotateX(4deg) rotateY(-2deg) translateZ(0);
}

@keyframes pfp-home-stars {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48px, 32px, 0); }
}

@media (max-width: 760px) {
  .home-page::after {
    top: 31%;
    width: 94vw;
    height: 34vw;
  }

  .entry-shell::before {
    top: 31%;
    width: 112vw;
    height: 36vw;
  }

  .home-page .brand-lockup {
    align-items: flex-start;
  }

  .home-page .entry-actions {
    grid-template-columns: 1fr;
  }

  .home-page .entry-tile,
  .home-page .player-tile {
    min-height: 210px;
    transform: none;
  }

  .home-page .entry-tile:hover {
    transform: translateY(-5px);
  }
}

.app-page {
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0;
  font-size: 2.1rem;
}

.field,
.field-row {
  display: grid;
  gap: 7px;
}

.field {
  margin-bottom: 14px;
}

.field span,
.field-row span,
.section-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(37, 93, 73, 0.14);
}

.primary-btn,
.ghost-btn,
.icon-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.primary-btn {
  background: var(--forest);
  color: #fff9e8;
}

.primary-btn:hover {
  background: var(--forest-2);
}

.primary-btn:disabled,
.ghost-btn:disabled,
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.primary-btn:disabled {
  background: #7f8a82;
}

.ghost-btn,
.icon-btn {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.ghost-btn:hover,
.icon-btn:hover {
  border-color: var(--forest-2);
}

.ghost-btn.small,
.icon-btn.small {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.78rem;
}

.icon-btn.wide {
  width: 100%;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.form-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.danger {
  color: var(--danger);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%),
    var(--forest);
  color: #fff9e8;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 900;
}

.sidebar-actions {
  display: grid;
  gap: 10px;
}

.sidebar-section {
  display: grid;
  gap: 10px;
}

.sidebar .section-label {
  color: rgba(255, 249, 232, 0.62);
}

.adventure-list {
  display: grid;
  gap: 8px;
}

.adventure-list button,
.published-list button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
}

.sidebar .adventure-list button {
  background: rgba(255, 249, 232, 0.1);
  border-color: rgba(255, 249, 232, 0.18);
  color: #fff9e8;
}

.sidebar .adventure-list button .list-meta {
  color: rgba(255, 249, 232, 0.68);
}

.adventure-list button.is-active,
.published-list button:hover {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(37, 93, 73, 0.12);
}

.sidebar .adventure-list button.is-active {
  border-color: rgba(255, 249, 232, 0.65);
  background: rgba(255, 249, 232, 0.18);
  box-shadow: none;
}

.list-title {
  display: block;
  margin-bottom: 5px;
  font-weight: 900;
}

.list-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.nav-item {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 249, 232, 0.76);
  padding: 0 12px;
  text-align: left;
  font-weight: 800;
}

.nav-item.is-active,
.nav-item:hover {
  background: rgba(255, 249, 232, 0.14);
  color: #fff9e8;
}

.builder-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.88);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 440px);
  gap: 18px;
  padding: 18px;
}

.map-panel,
.inspector,
.player-panel,
.task-card,
.inventory-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-panel {
  min-height: 620px;
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto;
  overflow: hidden;
}

.map-toolbar,
.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.map-toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.map-canvas {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background:
    linear-gradient(rgba(23, 59, 47, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 59, 47, 0.12) 1px, transparent 1px),
    #dfe8db;
  background-size: 48px 48px;
}

.map-canvas.real-map {
  min-height: 520px;
  background: #dfe8db;
  isolation: isolate;
}

.map-canvas.real-map::before {
  display: none;
}

.leaflet-container {
  font: inherit;
}

.leaflet-control-attribution {
  font-size: 0.68rem;
}

.zone-map-label {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--forest);
  font-weight: 900;
  text-shadow: 0 1px 0 #fff;
}

.start-marker {
  min-width: 48px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff9e8;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 8px 18px rgba(23, 59, 47, 0.3);
}

.map-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 32% 38%, rgba(49, 111, 159, 0.18), transparent 20%),
    linear-gradient(120deg, transparent 42%, rgba(23, 59, 47, 0.14) 42%, rgba(23, 59, 47, 0.14) 45%, transparent 45%);
  pointer-events: none;
}

.start-pin,
.zone-dot {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.start-pin {
  left: 50%;
  top: 50%;
  min-width: 56px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--forest);
  color: #fff9e8;
  font-size: 0.74rem;
  font-weight: 900;
}

.zone-dot {
  display: grid;
  place-items: center;
  border: 2px solid rgba(23, 59, 47, 0.65);
  background: rgba(217, 139, 43, 0.22);
  color: var(--forest);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
  padding: 8px;
}

.zone-dot.is-active {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(217, 139, 43, 0.2);
}

.map-hint {
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.inspector {
  min-height: 620px;
  overflow: auto;
}

.save-state {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

#inspector-content {
  padding: 16px;
}

.panel-stack {
  display: grid;
  gap: 16px;
}

.panel-card {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-card:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.panel-card h2 {
  margin: 0;
  font-size: 1.05rem;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px;
}

.compact-row button {
  flex: 1;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.compact-row.is-active {
  border-color: var(--forest-2);
  background: #eef5eb;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #e6efe7;
  color: var(--forest);
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.badge.amber {
  background: #fff2da;
  color: #92580f;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 50;
  transform: translateX(-50%) translateY(18px);
  max-width: min(460px, calc(100vw - 24px));
  border-radius: var(--radius-sm);
  background: var(--forest);
  color: #fff9e8;
  padding: 12px 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.player-page {
  background:
    linear-gradient(180deg, #173b2f 0 260px, var(--bg) 260px),
    var(--bg);
}

.player-shell {
  width: min(540px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px;
}

.player-header {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff9e8;
}

.player-header .brand-mark {
  background: #fff9e8;
  color: var(--forest);
}

.player-header .ghost-btn {
  background: rgba(255, 249, 232, 0.12);
  color: #fff9e8;
  border-color: rgba(255, 249, 232, 0.35);
}

.player-panel,
.task-card,
.inventory-panel,
.player-map-panel,
.dialogue-stage {
  margin-top: 14px;
  padding: 18px;
}

.player-panel h1,
.task-card h1,
.finish-screen h1 {
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  line-height: 1.05;
}

.published-list {
  display: grid;
  gap: 10px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.status-pill {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: #e6efe7;
  color: var(--forest);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
}

.status-pill.amber {
  background: #fff2da;
  color: #8c520c;
}

.task-card {
  margin-top: 10px;
}

.zone-banner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.task-card h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.task-card p {
  color: var(--muted);
  line-height: 1.55;
}

.answer-area {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.player-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.player-map-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.player-map-panel h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.player-map {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #dfe8db;
}

.dialogue-stage {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dialogue-preview-shell {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px;
}

.dialogue-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  padding: 16px;
}

.dialogue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dialogue-speaker {
  font-weight: 900;
}

.dialogue-kind {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dialogue-text {
  margin: 0;
  color: inherit;
  line-height: 1.55;
}

.dialogue-radio {
  background:
    linear-gradient(135deg, #1d2320, #0e1412),
    #141b18;
  color: #d7f8d9;
  border: 1px solid #2d3a34;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.dialogue-radio::before {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 74px;
  height: 28px;
  border-radius: 18px;
  background: repeating-linear-gradient(90deg, #27352f 0 4px, #111917 4px 8px);
  opacity: 0.55;
}

.dialogue-radio .dialogue-kind {
  background: #d7f8d9;
  color: #0e1412;
}

.dialogue-sms {
  background: #eef4f1;
  color: #15211c;
}

.dialogue-sms .dialogue-text {
  display: inline-block;
  max-width: 88%;
  border-radius: 18px 18px 18px 4px;
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(20, 35, 28, 0.12);
}

.dialogue-sms .dialogue-kind {
  background: #dcebe5;
  color: var(--forest);
}

.dialogue-mission {
  background:
    linear-gradient(0deg, rgba(23, 59, 47, 0.08), rgba(23, 59, 47, 0.08)),
    #f6f1de;
  color: #1b211c;
  border: 1px solid #a99466;
}

.dialogue-mission::after {
  content: "TOP SECRET";
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: rgba(163, 60, 47, 0.36);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  transform: rotate(-9deg);
}

.dialogue-mission .dialogue-kind {
  background: var(--danger);
  color: #fff9e8;
}

.dialogue-letter {
  transform-origin: top center;
  animation: unfoldLetter 780ms cubic-bezier(.2,.8,.2,1) both;
  background:
    radial-gradient(circle at 20% 18%, rgba(139, 82, 34, 0.12), transparent 25%),
    linear-gradient(135deg, #f3dfb4, #fff1c9 45%, #e3c184);
  color: #442b17;
  border: 1px solid #b88a49;
  font-family: Georgia, "Times New Roman", serif;
}

.dialogue-letter::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c7513b, #8f241b);
  transform: translateX(-50%);
  opacity: 0.18;
}

.dialogue-letter .dialogue-kind {
  background: #74401f;
  color: #fff1c9;
}

.dialogue-box {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), transparent 34%),
    linear-gradient(135deg, #744a22, #3f2816);
  color: #fff1c9;
  border: 1px solid #27170c;
}

.dialogue-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 38px;
  background: linear-gradient(90deg, transparent 0 46%, rgba(255, 217, 126, 0.4) 46% 54%, transparent 54%);
  border-bottom: 2px solid rgba(0,0,0,0.25);
}

.dialogue-box .dialogue-kind {
  background: #f0b35f;
  color: #3f2816;
}

.dialogue-anime {
  background:
    radial-gradient(circle at 88% 12%, rgba(49, 111, 159, 0.28), transparent 28%),
    linear-gradient(135deg, #fff, #eef7ff);
  color: #142236;
  border: 2px solid #18211d;
  box-shadow: 8px 8px 0 #18211d;
}

.dialogue-anime .dialogue-text {
  font-weight: 700;
}

.dialogue-anime .dialogue-kind {
  background: #316f9f;
  color: #fff;
}

.dialogue-cartoon {
  background: #fff;
  color: #121212;
  border: 3px solid #121212;
  box-shadow: 6px 6px 0 #f0b35f;
}

.dialogue-cartoon::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -18px;
  width: 32px;
  height: 32px;
  background: #fff;
  border-right: 3px solid #121212;
  border-bottom: 3px solid #121212;
  transform: rotate(45deg);
}

.dialogue-cartoon .dialogue-kind {
  background: #f0b35f;
  color: #121212;
}

@keyframes unfoldLetter {
  0% {
    opacity: 0;
    transform: perspective(700px) rotateX(-76deg) scaleY(0.55);
  }
  72% {
    opacity: 1;
    transform: perspective(700px) rotateX(6deg) scaleY(1.02);
  }
  100% {
    opacity: 1;
    transform: perspective(700px) rotateX(0) scaleY(1);
  }
}

.inventory-panel {
  display: grid;
  gap: 14px;
}

.inventory-panel h2 {
  margin: 0;
  font-size: 1.15rem;
}

.inventory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 8px 11px;
  font-size: 0.84rem;
  font-weight: 800;
}

.empty-state {
  color: var(--muted);
  font-size: 0.88rem;
}

.finish-screen {
  min-height: 360px;
  display: grid;
  align-content: center;
}

.tts-page {
  background:
    linear-gradient(180deg, #173b2f 0 220px, var(--bg) 220px),
    var(--bg);
}

.tts-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.tts-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff9e8;
}

.tts-header .brand-mark {
  background: #fff9e8;
  color: var(--forest);
}

.tts-header .ghost-btn {
  background: rgba(255, 249, 232, 0.12);
  color: #fff9e8;
  border-color: rgba(255, 249, 232, 0.35);
}

.tts-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  margin-top: 18px;
}

.tts-editor,
.tts-output {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.tts-editor h1 {
  max-width: 680px;
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.04;
}

.tts-editor textarea {
  min-height: 220px;
  font-size: 1rem;
  line-height: 1.55;
}

.tts-counter {
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.tts-range-field output {
  min-width: 34px;
  display: inline-grid;
  place-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(49, 111, 159, 0.1);
  color: var(--forest);
  font-size: 0.78rem;
  font-weight: 900;
}

.tts-range-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.tts-range-row span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.tts-range-row input {
  width: 100%;
  accent-color: var(--forest-2);
}

.tts-output {
  display: grid;
  align-content: start;
  gap: 14px;
}

.tts-output h2 {
  margin: 0;
  font-size: 1.25rem;
}

.tts-status {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(49, 111, 159, 0.08), transparent),
    var(--surface-2);
  color: var(--forest);
  font-weight: 900;
  text-align: center;
}

.tts-output audio {
  width: 100%;
}

.tts-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.tts-presets button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.tts-presets button:hover {
  border-color: var(--forest-2);
}

.immersive-4d {
  perspective: 1200px;
  background:
    linear-gradient(145deg, rgba(49, 111, 159, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(163, 60, 47, 0.08), transparent 44%),
    var(--bg);
}

.immersive-4d .map-panel,
.immersive-4d .inspector,
.immersive-4d .player-panel,
.immersive-4d .device-shell,
.immersive-4d .tts-editor,
.immersive-4d .tts-output {
  box-shadow:
    0 22px 55px rgba(12, 19, 16, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.immersive-4d .dialogue-card {
  transform: translateZ(0);
  box-shadow:
    0 18px 34px rgba(18, 24, 22, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.ghost-btn.is-active,
.icon-btn.is-active {
  border-color: var(--amber);
  background: #fff2da;
  color: #6b410b;
  box-shadow: 0 0 0 3px rgba(217, 139, 43, 0.18);
}

.builder-page .map-panel {
  grid-template-rows: auto minmax(520px, 1fr) auto;
}

.builder-page .map-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 10px;
}

.address-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) auto;
  gap: 8px;
}

.address-search .primary-btn.small {
  min-height: 40px;
}

.map-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.address-results {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
}

.address-results button {
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.address-results button:hover {
  background: #eaf2f6;
}

.address-results small,
.address-loading {
  color: var(--muted);
  font-size: 0.76rem;
}

.polygon-vertex-label {
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: #fff9e8;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(23, 59, 47, 0.24);
}

.player-page {
  background:
    linear-gradient(180deg, #0d1714 0 310px, transparent 310px),
    linear-gradient(135deg, rgba(49, 111, 159, 0.18), transparent 42%),
    var(--bg);
}

.player-shell {
  width: min(760px, 100%);
}

.wherigo-device {
  margin-top: 14px;
}

.device-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 249, 232, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(145deg, #1d2a25, #09110f 58%, #22352f);
  color: #fff9e8;
  padding: 16px;
  transform-style: preserve-3d;
}

.device-shell::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  pointer-events: none;
}

.device-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
  gap: 12px;
  align-items: start;
}

.device-top h1 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.45rem);
  line-height: 1.06;
}

.device-top .overline {
  color: #91d7bd;
}

.device-top .status-strip {
  margin: 0;
}

.player-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 12px;
}

.player-tab {
  min-height: 42px;
  border: 1px solid rgba(255, 249, 232, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 249, 232, 0.08);
  color: rgba(255, 249, 232, 0.76);
  font-size: 0.78rem;
  font-weight: 900;
}

.player-tab.is-active {
  background: #fff9e8;
  color: var(--forest);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.device-screen {
  position: relative;
  z-index: 1;
  min-height: 540px;
  border: 1px solid rgba(22, 37, 31, 0.78);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 243, 234, 0.94)),
    var(--surface);
  color: var(--ink);
  padding: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.72),
    inset 0 18px 40px rgba(49, 111, 159, 0.08);
}

.player-view {
  display: none;
}

.player-view.is-active {
  display: grid;
  gap: 12px;
}

.player-view .task-card,
.player-view .player-map-panel,
.player-view .inventory-panel,
.player-view .dialogue-stage,
.log-panel {
  margin-top: 0;
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: none;
}

.player-view .dialogue-stage {
  padding: 12px;
}

.player-view .task-card {
  padding: 16px;
}

.player-view .task-card h2 {
  font-size: 1.45rem;
}

.player-map {
  height: 390px;
}

.log-panel {
  border: 1px solid var(--line);
  padding: 18px;
}

.player-log {
  display: grid;
  gap: 8px;
}

.log-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px;
}

.log-row > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff9e8;
  font-weight: 900;
}

.log-row strong,
.log-row small {
  display: block;
}

.log-row small {
  color: var(--muted);
  margin-top: 2px;
}

.log-row.is-active {
  border-color: var(--amber);
  background: #fff7e8;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 0;
  }

  .nav-item {
    text-align: center;
    padding: 0 8px;
  }

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

  .tts-workspace {
    grid-template-columns: 1fr;
  }

  .address-search,
  .device-top {
    grid-template-columns: 1fr;
  }

  .inspector {
    min-height: auto;
  }
}

@media (max-width: 700px) {
  .entry-shell {
    padding: 18px;
  }

  .entry-actions {
    grid-template-columns: 1fr;
  }

  .entry-tile {
    min-height: 190px;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
  }

  .topbar {
    flex-direction: column;
  }

  .toolbar,
  .toolbar > * {
    width: 100%;
  }

  .workspace {
    padding: 10px;
  }

  .map-panel,
  .inspector {
    min-height: 520px;
  }

  .split-fields,
  .status-strip,
  .player-actions {
    grid-template-columns: 1fr;
  }

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

  .player-shell {
    padding: 8px;
  }

  .device-shell {
    border-radius: 12px;
    padding: 10px;
  }

  .device-screen {
    min-height: 500px;
    padding: 10px;
  }

  .player-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-map {
    height: 310px;
  }
}

/* Alpine homepage v20260822 */
.home-page {
  color: #f5f2e8;
  background: #0d1411;
}

.home-page::before,
.home-page::after,
.home-page .entry-shell::before,
.home-page .entry-shell::after {
  content: none;
}

.home-page .entry-shell {
  position: relative;
  min-height: 520px;
  height: min(860px, calc(100svh - 64px));
  display: block;
  overflow: hidden;
  padding: 0;
  color: #fffdf4;
  background:
    linear-gradient(180deg, rgba(5, 9, 7, .55) 0%, rgba(5, 9, 7, .08) 34%, rgba(5, 9, 7, .24) 68%, rgba(5, 9, 7, .72) 100%),
    linear-gradient(90deg, rgba(5, 9, 7, .34), transparent 45%, rgba(5, 9, 7, .12)),
    url('/pfadfinderplus/assets/home-hero-alpine-v2.webp') center center / cover no-repeat;
}

.hero-nav {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(28px, calc((100% - 1320px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  background: rgba(8, 14, 11, .58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fffdf4;
  font-size: 1rem;
  font-weight: 800;
}

.home-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 207, 139, .78);
  border-radius: 6px;
  color: #f0cf8b;
  background: rgba(19, 33, 25, .86);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.hero-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-nav-links a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(255, 253, 244, .86);
  font-weight: 700;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.hero-nav-links a:hover,
.hero-nav-links a:focus-visible {
  color: #fff;
  border-color: rgba(240, 207, 139, .45);
  background: rgba(16, 29, 22, .66);
}

.home-page .entry-main {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 88px 0 72px;
  text-align: center;
  transform: none;
}

.hero-kicker {
  margin: 0 0 14px;
  color: #f0cf8b;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .8);
}

.home-page .entry-main h1 {
  max-width: none;
  margin: 0;
  color: #fffdf4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 76px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 4px 4px rgba(0, 0, 0, .54), 0 18px 46px rgba(0, 0, 0, .56);
}

.home-page .entry-main h1 span {
  color: #f0cf8b;
}

.hero-lead {
  max-width: 660px;
  margin: 20px 0 34px;
  color: rgba(255, 253, 244, .9);
  font-size: 1.12rem;
  line-height: 1.55;
  text-shadow: 0 3px 16px rgba(0, 0, 0, .82);
}

.home-page .entry-actions {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  perspective: none;
}

.home-page .entry-tile,
.home-page .player-tile,
.home-page .map-tile {
  min-height: 88px;
  display: grid;
  grid-template-columns: 52px 1fr 30px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 2px solid rgba(240, 207, 139, .72);
  border-radius: 6px;
  color: #fffdf4;
  text-align: left;
  background: rgba(15, 27, 20, .82);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 255, 255, .07);
  transform: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.home-page .entry-tile::before,
.home-page .entry-tile::after {
  content: none;
}

.home-page .entry-tile:hover,
.home-page .entry-tile:focus-visible {
  border-color: #f6dc9d;
  background: rgba(24, 43, 31, .94);
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, .44), inset 0 0 0 1px rgba(255, 255, 255, .1);
}

.home-page .entry-tile .tile-icon {
  position: static;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(240, 207, 139, .5);
  border-radius: 6px;
  color: #f0cf8b;
  background: rgba(7, 13, 10, .44);
  box-shadow: none;
}

.home-page .entry-tile .tile-icon svg {
  width: 28px;
  height: 28px;
}

.home-page .entry-tile strong {
  position: static;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.home-page .entry-tile .entry-arrow,
.home-page .entry-tile span:last-child {
  position: static;
  color: #f0cf8b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

.hero-next {
  position: absolute;
  left: 50%;
  bottom: 20px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: rgba(255, 253, 244, .86);
  font-size: .82rem;
  font-weight: 800;
  transform: translateX(-50%);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}

.hero-next span {
  color: #f0cf8b;
  font-size: 1.15rem;
}

.improvements-section,
.adventure-map-section {
  scroll-margin-top: 16px;
}

@media (max-width: 760px) {
  .home-page .entry-shell {
    min-height: 560px;
    height: calc(100svh - 48px);
    max-height: 760px;
    background-position: 36% center;
  }

  .hero-nav {
    min-height: 62px;
    padding: 10px 14px;
  }

  .home-brand {
    font-size: .9rem;
  }

  .home-brand-mark {
    width: 40px;
    height: 40px;
  }

  .hero-nav-links {
    display: none;
  }

  .home-page .entry-main {
    width: min(100% - 28px, 520px);
    justify-content: flex-end;
    padding: 80px 0 64px;
  }

  .hero-kicker {
    margin-bottom: 10px;
    font-size: .7rem;
  }

  .home-page .entry-main h1 {
    font-size: 48px;
  }

  .hero-lead {
    max-width: 460px;
    margin: 14px 0 22px;
    font-size: .98rem;
    line-height: 1.45;
  }

  .home-page .entry-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-page .entry-tile,
  .home-page .player-tile,
  .home-page .map-tile {
    min-height: 68px;
    grid-template-columns: 42px 1fr 24px;
    gap: 12px;
    padding: 10px 14px;
    transform: none;
  }

  .home-page .entry-tile .tile-icon {
    width: 42px;
    height: 42px;
  }

  .home-page .entry-tile .tile-icon svg {
    width: 23px;
    height: 23px;
  }

  .home-page .entry-tile strong {
    font-size: 1.25rem;
  }

  .hero-next {
    bottom: 10px;
    white-space: nowrap;
  }
}

@media (max-width: 380px), (max-height: 650px) {
  .home-page .entry-shell {
    min-height: 520px;
  }

  .home-page .entry-main {
    padding-top: 70px;
    padding-bottom: 56px;
  }

  .home-page .entry-main h1 {
    font-size: 40px;
  }

  .hero-lead {
    margin: 10px 0 16px;
    font-size: .9rem;
  }

  .home-page .entry-tile,
  .home-page .player-tile,
  .home-page .map-tile {
    min-height: 60px;
  }

  .hero-next {
    font-size: .74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .entry-tile {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Reference-inspired Builder / Player skin */
.reference-login {
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 58, 237, 0.18), transparent 32%),
    radial-gradient(circle at 82% 86%, rgba(59, 130, 246, 0.16), transparent 34%),
    #0f1021;
  color: #ffffff;
}

.reference-login-card {
  width: min(420px, 100%);
  border-color: rgba(255, 255, 255, 0.1);
  background: #17182d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.login-logo {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #ffffff;
  font-size: 2.2rem;
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.32);
}

.login-brand {
  margin: 0;
  color: #ffffff;
  font-size: 1.85rem;
  line-height: 1.12;
}

.login-brand span,
.viewmode-logo {
  color: #a855f7;
}

.login-sub {
  margin: 10px 0 22px;
  color: rgba(255, 255, 255, 0.62);
}

.reference-login .field {
  text-align: left;
}

.reference-login .field span {
  color: rgba(255, 255, 255, 0.66);
}

.reference-login input {
  border-color: rgba(255, 255, 255, 0.14);
  background: #101125;
  color: #ffffff;
}

.reference-login input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}

.reference-login .primary-btn,
.reference-player .primary-btn,
.reference-builder .primary-btn {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #ffffff;
}

.reference-login .primary-btn:hover,
.reference-player .primary-btn:hover,
.reference-builder .primary-btn:hover {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
}

.login-step {
  display: grid;
  gap: 14px;
}

.login-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  border: 1px solid rgba(124, 159, 245, 0.25);
  border-radius: 8px;
  background: rgba(124, 159, 245, 0.1);
  padding: 10px 14px;
  text-align: left;
}

.login-actions {
  display: grid;
  grid-template-columns: auto 1fr;
}

.reference-builder {
  background: #101125;
}

.reference-builder .app-shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  background: #101125;
}

.reference-builder .sidebar {
  min-height: auto;
  display: grid;
  grid-template-columns: auto auto minmax(230px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #17182d;
  color: #ffffff;
  padding: 12px 16px;
}

.reference-builder .brand-row .brand-mark {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #ffffff;
}

.reference-builder .sidebar-actions {
  min-width: 170px;
}

.reference-builder .sidebar-section {
  min-width: 0;
}

.reference-builder .sidebar .section-label {
  display: none;
}

.reference-builder .adventure-list {
  max-height: 62px;
  overflow: auto;
}

.reference-builder .sidebar .adventure-list button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 9px 10px;
}

.reference-builder .sidebar-nav {
  display: grid;
  grid-template-columns: repeat(8, minmax(96px, 1fr));
  gap: 7px;
  margin-top: 0;
  overflow-x: auto;
}

.reference-builder .nav-item {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #22243b;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.reference-builder .nav-item.is-active,
.reference-builder .nav-item:hover {
  border-color: rgba(168, 85, 247, 0.8);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(168, 85, 247, 0.95));
  color: #ffffff;
}

.reference-builder .builder-main {
  background: #f3f5fb;
}

.reference-builder .topbar {
  background: #ffffff;
}

.reference-builder .topbar .overline,
.reference-builder .inspector .overline,
.reference-builder .map-hint {
  color: #6d28d9;
}

.reference-builder .map-panel,
.reference-builder .inspector,
.reference-builder .panel-card {
  border-color: #d8dbea;
  background: #ffffff;
}

.reference-builder .map-toolbar {
  background: #ffffff;
}

.reference-builder .ghost-btn.is-active,
.reference-builder .icon-btn.is-active {
  border-color: #8b5cf6;
  background: #f0ebff;
  color: #5b21b6;
}

.compact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compact-heading h2 {
  margin: 0;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.78rem;
  font-weight: 900;
}

.file-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.file-stats p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px;
}

.flow-list {
  display: grid;
  gap: 10px;
}

.flow-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px;
}

.flow-step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #17182d;
  color: #ffffff;
  font-weight: 900;
}

.flow-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.link-button {
  border: 0;
  background: transparent;
  color: #5b21b6;
  padding: 0;
  font-weight: 900;
  text-align: left;
}

.reference-player {
  background: #0f1021;
}

.viewmode-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at 24% 20%, rgba(124, 58, 237, 0.2), transparent 30%),
    #0f1021;
  color: #ffffff;
  text-align: center;
}

.viewmode-logo {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
}

.viewmode-screen h1 {
  margin: 0;
  font-size: clamp(1.45rem, 6vw, 2rem);
}

.viewmode-screen p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
}

.viewmode-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
}

.viewmode-btn {
  min-width: 150px;
  min-height: 58px;
  border-radius: 12px;
  font-size: 1.05rem;
}

.reference-player .player-page,
.reference-player.player-page {
  background:
    linear-gradient(180deg, #0f1021 0 330px, #15172a 330px),
    #15172a;
}

.reference-player .player-header {
  color: #ffffff;
}

.reference-player .player-header .brand-mark {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #ffffff;
}

.reference-player .player-panel,
.reference-player .task-card,
.reference-player .inventory-panel,
.reference-player .player-map-panel,
.reference-player .dialogue-stage {
  border-color: rgba(255, 255, 255, 0.1);
  background: #20223a;
  color: #ffffff;
}

.reference-player .browse-panel {
  display: grid;
  gap: 14px;
}

.browse-topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.browse-topbar h1 {
  margin: 0;
  font-size: clamp(1.5rem, 7vw, 2.25rem);
}

.player-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.player-search-bar input {
  border-color: rgba(255, 255, 255, 0.12);
  background: #111326;
  color: #ffffff;
}

.search-hint {
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.84rem;
  line-height: 1.45;
}

.reference-player .published-list button {
  border-color: rgba(255, 255, 255, 0.1);
  background: #15172a;
  color: #ffffff;
}

.reference-player .published-list button:hover {
  border-color: rgba(168, 85, 247, 0.75);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.16);
}

.reference-player .published-list .list-meta,
.reference-player .form-note,
.reference-player .task-card p,
.reference-player .log-row small {
  color: rgba(255, 255, 255, 0.62);
}

.reference-player .device-shell {
  background: linear-gradient(145deg, #20223a, #0f1021 62%, #2d1d47);
}

.reference-player .device-screen {
  background: #111326;
  color: #ffffff;
}

.reference-player .player-view .task-card,
.reference-player .player-view .player-map-panel,
.reference-player .player-view .inventory-panel,
.reference-player .player-view .dialogue-stage,
.reference-player .log-panel {
  background: #20223a;
  color: #ffffff;
}

.reference-player .zone-banner,
.reference-player .inventory-chip,
.reference-player .log-row {
  border-color: rgba(255, 255, 255, 0.1);
  background: #15172a;
  color: #ffffff;
}

@media (max-width: 1100px) {
  .reference-builder .sidebar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .reference-builder .sidebar-actions,
  .reference-builder .sidebar-section {
    min-width: 0;
  }

  .reference-builder .sidebar-nav {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }
}

@media (max-width: 700px) {
  .reference-builder .sidebar {
    padding: 10px;
  }

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

  .player-search-bar,
  .file-stats {
    grid-template-columns: 1fr;
  }

  .viewmode-actions {
    width: min(330px, 100%);
  }

  .viewmode-btn {
    width: 100%;
  }
}

/* Homepage adventure map */
html {
  scroll-behavior: smooth;
}

.home-page .entry-shell {
  min-height: calc(100svh - 64px);
}

.home-page .map-tile {
  --home-glow: #f3c969;
  --home-cyan: #73e2ae;
  transform: rotateX(4deg) rotateY(2deg) translateZ(0);
  grid-column: 1 / -1;
  min-height: 220px;
}

.adventure-map-section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 72px 32px 96px;
  color: #f5f8f2;
  background:
    linear-gradient(180deg, rgba(8, 10, 24, .2), rgba(7, 18, 16, .94) 18%),
    linear-gradient(110deg, #0b1c18, #10241d 48%, #111827);
  border-top: 1px solid rgba(115, 226, 174, .22);
  box-shadow: 0 -24px 80px rgba(0, 0, 0, .32);
}

.adventure-map-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.adventure-map-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.adventure-map-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.adventure-map-section .overline {
  color: #82e8b7;
}

.adventure-map-count {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #d8f7e7;
  border: 1px solid rgba(115, 226, 174, .32);
  border-radius: 6px;
  background: rgba(13, 47, 37, .76);
  font-size: .86rem;
  font-weight: 800;
}

.adventure-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: stretch;
}

.adventure-map-frame {
  position: relative;
  min-width: 0;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(180, 216, 198, .3);
  border-radius: 8px;
  background: #15201b;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .38);
}

#adventure-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
  background: #d8e5d0;
}

.adventure-map-status {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 28px;
  color: #dcebe3;
  background: rgba(9, 25, 20, .9);
  font-weight: 750;
  text-align: center;
}

.adventure-map-status[hidden] {
  display: none;
}

.adventure-map-status.is-message {
  background: rgba(9, 25, 20, .84);
}

.adventure-map-list {
  max-height: 600px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding-right: 5px;
  scrollbar-color: #477862 rgba(255, 255, 255, .05);
}

.adventure-map-item {
  padding: 20px;
  border: 1px solid rgba(180, 216, 198, .22);
  border-radius: 8px;
  background: rgba(249, 252, 247, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.adventure-map-item h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.adventure-map-meta {
  margin-bottom: 10px;
  color: #8de4b9;
  font-size: .78rem;
  font-weight: 800;
}

.adventure-map-item p {
  margin: 0;
  color: rgba(232, 242, 236, .72);
  font-size: .9rem;
  line-height: 1.5;
}

.adventure-map-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.adventure-map-actions button,
.adventure-map-actions a,
.adventure-popup a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 6px;
  font-size: .84rem;
  font-weight: 850;
  transition: transform .16s ease, background-color .16s ease;
}

.adventure-map-actions button {
  color: #dcf7e9;
  border: 1px solid rgba(115, 226, 174, .32);
  background: rgba(27, 76, 56, .6);
}

.adventure-map-actions a,
.adventure-popup a {
  color: #152018;
  border: 1px solid #f2c45f;
  background: #f2c45f;
}

.adventure-map-actions button:hover,
.adventure-map-actions a:hover,
.adventure-popup a:hover {
  transform: translateY(-2px);
}

.adventure-pin-wrapper {
  border: 0;
  background: transparent;
}

.adventure-pin {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #172018;
  background: linear-gradient(145deg, #ffe293, #e9ad35);
  border: 3px solid #fff7d8;
  border-radius: 50% 50% 50% 10px;
  box-shadow: 0 10px 24px rgba(23, 47, 35, .42), 0 0 0 5px rgba(115, 226, 174, .2);
  transform: rotate(-45deg);
}

.adventure-pin b {
  font-size: .92rem;
  transform: rotate(45deg);
}

.adventure-popup {
  color: #18211d;
}

.adventure-popup article + article {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d6ddda;
}

.adventure-popup strong {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}

.adventure-popup p {
  margin: 8px 0;
  color: #55625c;
  font-size: .82rem;
  line-height: 1.45;
}

.adventure-popup-meta {
  margin-bottom: 10px;
  color: #28704d;
  font-size: .76rem;
  font-weight: 800;
}

.adventure-popup a {
  min-height: 34px;
  color: #172018;
}

.adventure-map-section .leaflet-control-zoom a {
  color: #173b2f;
}

.adventure-map-section .leaflet-control-attribution {
  color: #40524a;
  background: rgba(255, 255, 255, .86);
}

@media (max-width: 900px) {
  .adventure-map-layout {
    grid-template-columns: 1fr;
  }

  .adventure-map-list {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 700px) {
  .home-page .entry-shell {
    min-height: auto;
    padding-bottom: 48px;
  }

  .home-page .map-tile {
    transform: none;
  }

  .home-page .trophy-tile {
    grid-column: auto;
    min-height: 190px;
    transform: none;
  }

  .adventure-map-section {
    padding: 48px 16px 72px;
  }

  .adventure-map-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .adventure-map-frame,
  #adventure-map {
    min-height: 500px;
  }

  .adventure-map-list {
    grid-template-columns: 1fr;
  }
}

/* Public improvements */
.improvements-section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 64px 32px 72px;
  color: #f8f6ef;
  background:
    linear-gradient(100deg, rgba(240, 179, 95, .1), transparent 38%),
    linear-gradient(180deg, #151728, #111522);
  border-top: 1px solid rgba(240, 179, 95, .24);
  border-bottom: 1px solid rgba(115, 226, 174, .18);
}

.improvements-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.improvements-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.improvements-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.improvements-section .overline {
  color: #f0c16d;
}

.improvements-live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(247, 242, 227, .76);
  font-size: .84rem;
  font-weight: 750;
}

.improvements-live span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #69e29e;
  box-shadow: 0 0 14px rgba(105, 226, 158, .8);
}

.improvements-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.improvement-item,
.improvements-empty {
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.improvements-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: rgba(236, 239, 247, .62);
  text-align: center;
}

.improvement-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.improvement-status {
  padding: 5px 8px;
  border-radius: 5px;
  color: #201c12;
  background: #f0c16d;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.improvement-item.status-soon .improvement-status {
  color: #102018;
  background: #79e1aa;
}

.improvement-item.status-improvement .improvement-status {
  color: #102036;
  background: #8dc5ff;
}

.improvement-item.status-in_progress .improvement-status {
  color: #111b26;
  background: #84c7ff;
}

.improvement-item.status-done .improvement-status {
  color: #fff;
  background: #477862;
}

.improvement-item time {
  color: rgba(229, 234, 244, .5);
  font-size: .75rem;
}

.improvement-item h3 {
  margin: 0 0 9px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.improvement-item p {
  margin: 0;
  color: rgba(229, 234, 244, .7);
  font-size: .9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Chat and support */
.support-launcher {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.support-launch-button {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  background: #245a45;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .36);
  font-size: .88rem;
  font-weight: 850;
}

.support-launch-button.has-unread {
  border-color: #fff;
  box-shadow:
    0 0 0 3px rgba(114, 217, 165, .28),
    0 14px 34px rgba(0, 0, 0, .36);
}

.support-launch-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  color: #fff;
  border: 2px solid #101a17;
  border-radius: 13px;
  background: #c73b46;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .32);
  font-size: .72rem;
  font-weight: 950;
  line-height: 1;
}

.support-launch-badge[hidden] {
  display: none;
}

.support-launch-button.error {
  color: #281e12;
  background: #f0b35f;
}

.support-launch-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.support-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: end;
  padding: 18px;
  background: rgba(5, 8, 16, .62);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.support-dialog-backdrop[hidden] {
  display: none;
}

.support-dialog-open {
  overflow: hidden;
}

.support-dialog {
  width: min(460px, 100%);
  max-height: min(760px, calc(100svh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #edf4f0;
  border: 1px solid rgba(150, 201, 177, .28);
  border-radius: 8px;
  background: #101a17;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.support-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.support-dialog-header .overline {
  color: #83dfb1;
}

.support-dialog-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.support-dialog-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  color: #dceae3;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  font-size: 1.7rem;
  line-height: 1;
}

.support-create-form {
  display: grid;
  gap: 13px;
  overflow: auto;
  padding: 18px 20px 10px;
}

.support-create-form[hidden],
.support-conversation[hidden] {
  display: none;
}

.support-create-form label {
  display: grid;
  gap: 6px;
}

.support-create-form label[hidden] {
  display: none;
}

.support-create-form label > span {
  color: #a9c1b5;
  font-size: .78rem;
  font-weight: 800;
}

.support-create-form input,
.support-create-form textarea,
.support-reply-form textarea {
  width: 100%;
  color: #f4f8f6;
  border: 1px solid rgba(158, 195, 178, .25);
  border-radius: 6px;
  outline: none;
  background: #182520;
}

.support-create-form input {
  min-height: 44px;
  padding: 10px 12px;
}

.support-create-form input[type="file"] {
  padding: 7px;
  color: #b9cec3;
}

.support-create-form input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  padding: 5px 10px;
  color: #122019;
  border: 0;
  border-radius: 5px;
  background: #72d9a5;
  font-weight: 850;
}

.support-image-field small,
.support-reply-tools small {
  color: #8fa99d;
  font-size: .7rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.support-create-form textarea,
.support-reply-form textarea {
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.45;
}

.support-create-form input:focus,
.support-create-form textarea:focus,
.support-reply-form textarea:focus {
  border-color: #72d9a5;
  box-shadow: 0 0 0 3px rgba(114, 217, 165, .13);
}

.support-submit,
.support-reply-form button {
  min-height: 44px;
  color: #122019;
  border: 0;
  border-radius: 6px;
  background: #72d9a5;
  font-weight: 900;
}

.support-conversation {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 20px;
}

.support-thread-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.support-thread-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.support-thread-summary strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-thread-summary span {
  width: max-content;
  color: #8de4b9;
  font-size: .74rem;
  font-weight: 850;
}

.support-thread-summary span.is-closed {
  color: #efb975;
}

.support-thread-summary button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #d9e7e0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  font-size: .76rem;
  font-weight: 800;
}

.support-messages {
  min-height: 180px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 14px 2px;
}

.support-message {
  width: min(86%, 340px);
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 7px;
}

.support-message.is-user {
  align-self: flex-end;
  background: #234d3d;
}

.support-message.is-admin {
  align-self: flex-start;
  background: #242b42;
}

.support-message-meta {
  margin-bottom: 5px;
  color: rgba(230, 240, 235, .58);
  font-size: .69rem;
  font-weight: 800;
}

.support-message p {
  margin: 0;
  color: #f3f7f5;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-message-code {
  width: max-content;
  max-width: 100%;
  display: block;
  margin: 7px 0 0;
  padding: 5px 8px;
  overflow-wrap: anywhere;
  color: #ffe7a6;
  border: 1px solid rgba(255, 218, 128, .24);
  border-radius: 5px;
  background: rgba(10, 14, 22, .34);
  font: 800 .74rem/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.support-message-image-link {
  display: block;
  margin-top: 9px;
}

.support-message-image {
  width: min(100%, 320px);
  max-height: 290px;
  display: block;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  background: #0c1210;
}

.support-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 9px;
  padding: 12px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.support-reply-tools {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.support-reply-tools > input[type="text"] {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: #f4f8f6;
  border: 1px solid rgba(158, 195, 178, .25);
  border-radius: 6px;
  outline: none;
  background: #182520;
}

.support-file-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  color: #d9e7e0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 850;
}

.support-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.support-reply-tools small {
  grid-column: 1 / -1;
}

.support-dialog-status {
  min-height: 29px;
  padding: 7px 20px 10px;
  color: #8de4b9;
  font-size: .77rem;
}

.support-dialog-status.is-error {
  color: #ffaf9f;
}

@media (max-width: 900px) {
  .improvements-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .improvements-section {
    padding: 48px 16px 56px;
  }

  .improvements-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .improvements-list {
    grid-template-columns: 1fr;
  }

  .support-launcher {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .support-launch-button {
    min-height: 44px;
    padding: 9px 12px;
  }

  .support-dialog-backdrop {
    align-items: end;
    padding: 0;
  }

  .support-dialog {
    width: 100%;
    max-height: 92svh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .support-reply-form {
    grid-template-columns: 1fr;
  }

  .support-reply-tools {
    grid-template-columns: 1fr;
  }

  .support-reply-tools small {
    grid-column: auto;
  }
}

/* Keep the alpine hero rules after the legacy homepage additions. */
.home-page .entry-shell {
  min-height: 520px;
  height: min(860px, calc(100svh - 64px));
  padding: 0;
}

.home-page .map-tile {
  min-height: 88px;
  grid-column: auto;
  transform: none;
}

@media (max-width: 760px) {
  .home-page .entry-shell {
    min-height: 560px;
    height: calc(100svh - 48px);
    max-height: 760px;
    padding: 0;
  }

  .home-page .map-tile {
    min-height: 68px;
  }

  .support-launcher {
    gap: 8px;
  }

  .support-launch-button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 50%;
  }

  .support-launch-button > span:not(.support-launch-badge) {
    display: none;
  }

  .support-launch-button svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 380px), (max-height: 650px) {
  .home-page .entry-shell {
    min-height: 520px;
  }

  .home-page .map-tile {
    min-height: 60px;
  }
}

/* Standalone adventure map */
.adventure-map-page {
  min-height: 100vh;
  color: #f5f8f2;
  background: #0b1c18;
}

.map-page-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px max(24px, calc((100% - 1240px) / 2));
  border-bottom: 1px solid rgba(240, 207, 139, .22);
  background: #0d1813;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .22);
}

.map-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-page-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(240, 207, 139, .42);
  border-radius: 6px;
  color: #fffdf4;
  font-weight: 800;
  background: rgba(255, 255, 255, .04);
}

.map-page-actions .map-player-link {
  color: #172018;
  border-color: #f0cf8b;
  background: #f0cf8b;
}

.adventure-map-page .standalone-map {
  min-height: calc(100svh - 72px);
  padding-top: 44px;
  border-top: 0;
  box-shadow: none;
}

.adventure-map-page .adventure-map-header h1 {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.4rem;
  line-height: 1;
  letter-spacing: 0;
}

@media (max-width: 700px) {
  .map-page-nav {
    min-height: 64px;
    padding: 10px 12px;
  }

  .map-page-nav .home-brand > span:last-child {
    display: none;
  }

  .map-page-actions {
    gap: 7px;
  }

  .map-page-actions a {
    min-height: 40px;
    padding: 0 12px;
    font-size: .86rem;
  }

  .adventure-map-page .standalone-map {
    min-height: calc(100svh - 64px);
    padding-top: 34px;
  }

  .adventure-map-page .adventure-map-header h1 {
    font-size: 2.35rem;
  }

  .adventure-map-page .adventure-map-frame,
  .adventure-map-page #adventure-map {
    min-height: 54svh;
  }
}

/* Calendar-controlled homepage typography */
html[data-season="winter"] {
  --season-title: #f7fbff;
  --season-accent: #b9e7ff;
  --season-border: rgba(185, 231, 255, .72);
  --season-hover: #e7f7ff;
  --season-font: "Palatino Linotype", Palatino, Georgia, serif;
  --season-shadow: 0 4px 4px rgba(0, 0, 0, .62), 0 0 18px rgba(123, 205, 246, .58), 0 18px 46px rgba(0, 0, 0, .56);
}

html[data-season="spring"] {
  --season-title: #fffdf5;
  --season-accent: #ffc2d7;
  --season-border: rgba(255, 194, 215, .72);
  --season-hover: #ffe2ec;
  --season-font: "Segoe Print", "Bradley Hand", cursive;
  --season-shadow: 0 4px 4px rgba(0, 0, 0, .62), 0 0 18px rgba(255, 154, 191, .42), 0 18px 46px rgba(0, 0, 0, .56);
}

html[data-season="summer"] {
  --season-title: #fffdf0;
  --season-accent: #ffd45d;
  --season-border: rgba(255, 212, 93, .76);
  --season-hover: #ffe89a;
  --season-font: "Trebuchet MS", "Segoe UI", sans-serif;
  --season-shadow: 0 4px 4px rgba(0, 0, 0, .62), 0 0 20px rgba(255, 196, 48, .48), 0 18px 46px rgba(0, 0, 0, .56);
}

html[data-season="autumn"] {
  --season-title: #fff8e8;
  --season-accent: #eda54b;
  --season-border: rgba(237, 165, 75, .76);
  --season-hover: #f7c47f;
  --season-font: Georgia, "Times New Roman", serif;
  --season-shadow: 0 4px 4px rgba(0, 0, 0, .64), 0 0 18px rgba(202, 105, 38, .46), 0 18px 46px rgba(0, 0, 0, .58);
}

html[data-season="halloween"] {
  --season-title: #fff5df;
  --season-accent: #ff8b2d;
  --season-border: rgba(255, 139, 45, .82);
  --season-hover: #ffb45f;
  --season-font: Copperplate, "Copperplate Gothic Light", Georgia, serif;
  --season-shadow: 0 4px 3px rgba(0, 0, 0, .82), 0 0 20px rgba(255, 91, 24, .62), 0 18px 48px rgba(0, 0, 0, .72);
}

html[data-season] .home-page .entry-main h1 {
  color: var(--season-title);
  font-family: var(--season-font);
  letter-spacing: 0;
  text-shadow: var(--season-shadow);
}

html[data-season] .home-page .entry-main h1 span,
html[data-season] .home-page .hero-kicker,
html[data-season] .home-page .home-brand-mark,
html[data-season] .home-page .entry-tile .tile-icon,
html[data-season] .home-page .entry-tile .entry-arrow,
html[data-season] .home-page .hero-next span {
  color: var(--season-accent);
}

html[data-season] .home-page .home-brand-mark,
html[data-season] .home-page .entry-tile,
html[data-season] .home-page .entry-tile .tile-icon {
  border-color: var(--season-border);
}

html[data-season] .home-page .home-brand > span:last-child,
html[data-season] .home-page .entry-tile strong {
  font-family: var(--season-font);
  letter-spacing: 0;
}

html[data-season] .home-page .hero-kicker {
  letter-spacing: 0;
}

html[data-season] .home-page .entry-tile:hover,
html[data-season] .home-page .entry-tile:focus-visible {
  border-color: var(--season-hover);
}

@media (prefers-reduced-motion: no-preference) {
  html[data-season] .home-page .entry-main h1,
  html[data-season] .home-page .entry-main h1 span {
    transition: color .35s ease, text-shadow .35s ease;
  }
}

/* Seasonal title art */
html[data-season="winter"] {
  --season-title-fill: linear-gradient(180deg, #ffffff 0%, #eefaff 48%, #8fd6f5 100%);
  --season-accent-fill: linear-gradient(180deg, #f8fdff 0%, #a9e6ff 55%, #66bce9 100%);
  --season-stroke: rgba(220, 246, 255, .72);
  --season-panel: rgba(12, 35, 47, .84);
  --season-ornament:
    radial-gradient(circle at 18% 50%, #ffffff 0 3%, transparent 4%),
    radial-gradient(circle at 50% 25%, #d8f5ff 0 4%, transparent 5%),
    radial-gradient(circle at 78% 65%, #ffffff 0 3%, transparent 4%),
    linear-gradient(60deg, transparent 47%, rgba(190, 235, 255, .92) 48% 52%, transparent 53%),
    linear-gradient(-60deg, transparent 47%, rgba(190, 235, 255, .92) 48% 52%, transparent 53%);
}

html[data-season="spring"] {
  --season-title-fill: linear-gradient(180deg, #fffdf5 0%, #f5ffe7 48%, #78c77e 100%);
  --season-accent-fill: linear-gradient(180deg, #ffe9f1 0%, #ffb6cf 58%, #ed7fa7 100%);
  --season-stroke: rgba(224, 255, 213, .7);
  --season-panel: rgba(18, 43, 25, .84);
  --season-ornament:
    radial-gradient(ellipse at 14% 66%, #73bd6f 0 10%, transparent 11%),
    radial-gradient(ellipse at 31% 27%, #a8d97e 0 10%, transparent 11%),
    radial-gradient(circle at 51% 64%, #ffc1d7 0 7%, #fff2f7 8% 11%, transparent 12%),
    radial-gradient(ellipse at 71% 30%, #78c77e 0 10%, transparent 11%),
    radial-gradient(ellipse at 88% 68%, #b4df84 0 10%, transparent 11%),
    linear-gradient(164deg, transparent 47%, #78af68 48% 52%, transparent 53%);
}

html[data-season="summer"] {
  --season-title-fill: linear-gradient(180deg, #fffef0 0%, #fff19a 52%, #f2ad28 100%);
  --season-accent-fill: linear-gradient(180deg, #fff8a8 0%, #ffd34f 52%, #f1a71d 100%);
  --season-stroke: rgba(255, 242, 158, .72);
  --season-panel: rgba(33, 50, 21, .84);
  --season-ornament:
    radial-gradient(circle at 18% 58%, #ffd34f 0 7%, #fff3a0 8% 11%, transparent 12%),
    radial-gradient(ellipse at 35% 29%, #82bc62 0 10%, transparent 11%),
    radial-gradient(circle at 55% 60%, #fff5a8 0 6%, #f3b42c 7% 10%, transparent 11%),
    radial-gradient(ellipse at 73% 28%, #6da653 0 10%, transparent 11%),
    radial-gradient(circle at 88% 64%, #ffd34f 0 7%, #fff3a0 8% 11%, transparent 12%),
    linear-gradient(166deg, transparent 47%, #6b9f52 48% 52%, transparent 53%);
}

html[data-season="autumn"] {
  --season-title-fill: linear-gradient(180deg, #fff9e9 0%, #f5d28c 50%, #bd632c 100%);
  --season-accent-fill: linear-gradient(180deg, #ffd98b 0%, #e9923c 52%, #a94724 100%);
  --season-stroke: rgba(255, 220, 158, .68);
  --season-panel: rgba(40, 29, 17, .86);
  --season-ornament:
    radial-gradient(ellipse at 13% 61%, #d68135 0 11%, transparent 12%),
    radial-gradient(ellipse at 30% 27%, #e2ad4b 0 10%, transparent 11%),
    radial-gradient(ellipse at 50% 67%, #aa4827 0 11%, transparent 12%),
    radial-gradient(ellipse at 70% 26%, #d89036 0 10%, transparent 11%),
    radial-gradient(ellipse at 88% 64%, #edbd59 0 11%, transparent 12%),
    linear-gradient(164deg, transparent 47%, #a96134 48% 52%, transparent 53%);
}

html[data-season="halloween"] {
  --season-title-fill: linear-gradient(180deg, #fff0cf 0%, #ff9a37 50%, #a9321b 100%);
  --season-accent-fill: linear-gradient(180deg, #ffc05e 0%, #ff782c 52%, #9f201a 100%);
  --season-stroke: rgba(255, 144, 58, .72);
  --season-panel: rgba(22, 13, 19, .9);
  --season-ornament:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 8px, rgba(255, 146, 65, .48) 9px 10px),
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 157, 77, .64) 0 2deg, transparent 3deg 29deg);
}

html[data-season] .home-page .entry-main h1 {
  position: relative;
  z-index: 1;
  padding-inline: 18px;
  color: var(--season-title);
  filter: none;
  text-shadow: none;
}

html[data-season] .home-page .entry-main h1::before,
html[data-season] .home-page .entry-main h1::after {
  content: "";
  position: absolute;
  top: 50%;
  z-index: -1;
  width: 96px;
  height: 42px;
  background: var(--season-ornament);
  background-repeat: no-repeat;
  opacity: .96;
  pointer-events: none;
}

html[data-season] .home-page .entry-main h1::before {
  right: calc(100% + 14px);
  transform: translateY(-50%) rotate(-7deg);
}

html[data-season] .home-page .entry-main h1::after {
  left: calc(100% + 14px);
  transform: translateY(-50%) scaleX(-1) rotate(-7deg);
}

html[data-season] .home-page .entry-main h1,
html[data-season] .home-page .entry-main h1 span {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-season] .home-page .entry-main h1 {
  background-image: var(--season-title-fill);
  -webkit-text-stroke: 1px var(--season-stroke);
}

html[data-season] .home-page .entry-main h1 span {
  background-image: var(--season-accent-fill);
  -webkit-text-stroke: 1px var(--season-stroke);
}

html[data-season] .home-page .entry-tile {
  background: var(--season-panel);
}

html[data-season] .home-page .entry-tile strong,
html[data-season] .home-page .home-brand > span:last-child {
  color: var(--season-title);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .58);
}

html[data-season="spring"] .home-page .entry-main h1 {
  font-weight: 800;
}

html[data-season="halloween"] .home-page .entry-main h1 {
  filter: none;
}

@media (max-width: 1100px) {
  html[data-season] .home-page .entry-main h1::before,
  html[data-season] .home-page .entry-main h1::after {
    width: 62px;
    height: 34px;
  }

  html[data-season] .home-page .entry-main h1::before {
    right: calc(100% + 4px);
  }

  html[data-season] .home-page .entry-main h1::after {
    left: calc(100% + 4px);
  }
}

@media (max-width: 760px) {
  html[data-season] .home-page .entry-main h1 {
    padding-inline: 0;
  }

  html[data-season] .home-page .entry-main h1::before,
  html[data-season] .home-page .entry-main h1::after {
    top: auto;
    bottom: -14px;
    width: 54px;
    height: 20px;
  }

  html[data-season] .home-page .entry-main h1::before {
    right: 50%;
    transform: rotate(-5deg);
  }

  html[data-season] .home-page .entry-main h1::after {
    left: 50%;
    transform: scaleX(-1) rotate(-5deg);
  }
}

/* Seasonal atmosphere and animated lettering */
.season-atmosphere {
  position: absolute;
  inset: 72px 0 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.season-atmosphere i {
  --x: 5%;
  --delay: -2s;
  --duration: 14s;
  --size: 12px;
  --drift: 42px;
  --spin: 280deg;
  position: absolute;
  top: -12%;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * .68);
  display: block;
  opacity: 0;
  will-change: transform, opacity;
}

.season-atmosphere i:nth-child(1) { --x: 4%; --delay: -3s; --duration: 15s; --size: 13px; --drift: 58px; --spin: 300deg; }
.season-atmosphere i:nth-child(2) { --x: 12%; --delay: -10s; --duration: 18s; --size: 9px; --drift: -32px; --spin: -250deg; }
.season-atmosphere i:nth-child(3) { --x: 21%; --delay: -6s; --duration: 13s; --size: 15px; --drift: 38px; --spin: 420deg; }
.season-atmosphere i:nth-child(4) { --x: 30%; --delay: -14s; --duration: 19s; --size: 10px; --drift: -55px; --spin: -360deg; }
.season-atmosphere i:nth-child(5) { --x: 39%; --delay: -8s; --duration: 16s; --size: 12px; --drift: 46px; --spin: 320deg; }
.season-atmosphere i:nth-child(6) { --x: 47%; --delay: -1s; --duration: 17s; --size: 8px; --drift: -28px; --spin: -300deg; }
.season-atmosphere i:nth-child(7) { --x: 55%; --delay: -12s; --duration: 20s; --size: 14px; --drift: 60px; --spin: 450deg; }
.season-atmosphere i:nth-child(8) { --x: 64%; --delay: -5s; --duration: 14s; --size: 10px; --drift: -44px; --spin: -270deg; }
.season-atmosphere i:nth-child(9) { --x: 72%; --delay: -16s; --duration: 21s; --size: 13px; --drift: 35px; --spin: 390deg; }
.season-atmosphere i:nth-child(10) { --x: 79%; --delay: -9s; --duration: 16s; --size: 8px; --drift: -58px; --spin: -340deg; }
.season-atmosphere i:nth-child(11) { --x: 86%; --delay: -4s; --duration: 18s; --size: 15px; --drift: 47px; --spin: 430deg; }
.season-atmosphere i:nth-child(12) { --x: 92%; --delay: -13s; --duration: 15s; --size: 10px; --drift: -34px; --spin: -260deg; }
.season-atmosphere i:nth-child(13) { --x: 34%; --delay: -18s; --duration: 22s; --size: 9px; --drift: 72px; --spin: 510deg; }
.season-atmosphere i:nth-child(14) { --x: 68%; --delay: -11s; --duration: 19s; --size: 12px; --drift: -68px; --spin: -460deg; }
.season-atmosphere i:nth-child(15) { --x: 8%; --delay: -20s; --duration: 23s; --size: 11px; --drift: 86px; --spin: 560deg; }
.season-atmosphere i:nth-child(16) { --x: 25%; --delay: -4s; --duration: 21s; --size: 8px; --drift: -74px; --spin: -520deg; }
.season-atmosphere i:nth-child(17) { --x: 44%; --delay: -15s; --duration: 18s; --size: 14px; --drift: 67px; --spin: 480deg; }
.season-atmosphere i:nth-child(18) { --x: 59%; --delay: -7s; --duration: 24s; --size: 9px; --drift: -82px; --spin: -590deg; }
.season-atmosphere i:nth-child(19) { --x: 76%; --delay: -19s; --duration: 20s; --size: 12px; --drift: 75px; --spin: 540deg; }
.season-atmosphere i:nth-child(20) { --x: 96%; --delay: -2s; --duration: 22s; --size: 10px; --drift: -64px; --spin: -500deg; }

html[data-season="winter"] .season-atmosphere i {
  height: var(--size);
  border-radius: 50%;
  background: #eefbff;
  box-shadow: 0 0 10px rgba(173, 226, 255, .9);
}

html[data-season="winter"] .season-atmosphere i::before,
html[data-season="winter"] .season-atmosphere i::after {
  content: "";
  position: absolute;
  top: 46%;
  left: -35%;
  width: 170%;
  height: 1px;
  background: rgba(231, 249, 255, .9);
}

html[data-season="winter"] .season-atmosphere i::after {
  transform: rotate(90deg);
}

html[data-season="spring"] .season-atmosphere i,
html[data-season="autumn"] .season-atmosphere i,
html[data-season="summer"] .season-atmosphere i {
  border-radius: 100% 0 100% 0;
  transform-origin: 50% 50%;
}

html[data-season="spring"] .season-atmosphere i {
  background: #81c975;
  box-shadow: inset 1px 0 rgba(255, 255, 255, .35);
}

html[data-season="spring"] .season-atmosphere i:nth-child(3n),
html[data-season="spring"] .season-atmosphere i:nth-child(3n + 1) {
  border-radius: 70% 45% 70% 45%;
  background: #f7a9c6;
}

html[data-season="summer"] .season-atmosphere i {
  width: calc(var(--size) * .42);
  height: calc(var(--size) * 1.35);
  border-radius: 70% 20% 70% 20%;
  background: #ffd35a;
  box-shadow: 0 0 7px rgba(255, 207, 70, .52);
}

html[data-season="summer"] .season-atmosphere i:nth-child(even) {
  background: #8ebd61;
  box-shadow: none;
}

html[data-season="autumn"] .season-atmosphere i {
  background: #d87b31;
  box-shadow: inset 1px 0 rgba(255, 220, 140, .28);
}

html[data-season="autumn"] .season-atmosphere i:nth-child(3n) { background: #e3af48; }
html[data-season="autumn"] .season-atmosphere i:nth-child(3n + 1) { background: #a74327; }

html[data-season="halloween"] .season-atmosphere i {
  width: calc(var(--size) * 1.65);
  height: var(--size);
  background: #120d14;
  clip-path: polygon(0 30%, 18% 42%, 28% 20%, 43% 45%, 50% 32%, 57% 45%, 72% 20%, 82% 42%, 100% 30%, 89% 64%, 73% 53%, 58% 76%, 50% 58%, 42% 76%, 27% 53%, 11% 64%);
  filter: drop-shadow(0 2px 2px rgba(255, 101, 35, .48));
}

html[data-season="halloween"] .season-atmosphere i:nth-child(3n) {
  width: calc(var(--size) * .58);
  height: calc(var(--size) * 1.3);
  border-radius: 70% 20% 70% 20%;
  background: #ff7d2d;
  clip-path: none;
  filter: drop-shadow(0 0 6px rgba(255, 76, 22, .7));
}

html[data-season] .home-page .entry-main h1 span {
  position: relative;
  display: inline-block;
}

html[data-season] .home-page .entry-main h1 span::after {
  content: "";
  position: absolute;
  top: -17px;
  right: -31px;
  width: 50px;
  height: 29px;
  background: var(--season-ornament);
  background-repeat: no-repeat;
  opacity: .96;
  pointer-events: none;
  transform: rotate(13deg);
}

@keyframes season-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -70px, 0) rotate(0deg);
  }
  12% { opacity: .72; }
  82% { opacity: .62; }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 104vh, 0) rotate(var(--spin));
  }
}

@keyframes season-title-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes season-ornament-sway {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -4px; }
}

@media (prefers-reduced-motion: no-preference) {
  .season-atmosphere i {
    animation: season-fall var(--duration) linear var(--delay) infinite;
  }

  html[data-season] .home-page .entry-main h1,
  html[data-season] .home-page .entry-main h1 span {
    background-size: 180% 100%;
    animation: season-title-shimmer 7s ease-in-out infinite;
  }

  html[data-season] .home-page .entry-main h1::before,
  html[data-season] .home-page .entry-main h1::after,
  html[data-season] .home-page .entry-main h1 span::after {
    animation: season-ornament-sway 3.4s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .season-atmosphere {
    display: none;
  }
}

@media (max-width: 760px) {
  .season-atmosphere {
    top: 64px;
  }

  .season-atmosphere i:nth-child(n + 9) {
    display: none;
  }

  html[data-season] .home-page .entry-main h1 span::after {
    top: -8px;
    right: -4px;
    width: 34px;
    height: 20px;
  }
}

/* Living letterforms: roots, branches, blossoms and seasonal foliage */
html[data-season="winter"] {
  --nature-branch: #d5eef8;
  --nature-leaf: #f5fdff;
  --nature-leaf-alt: #91d5ee;
  --nature-bloom: #ffffff;
  --nature-glow: rgba(151, 221, 249, .72);
}

html[data-season="spring"] {
  --nature-branch: #7b5735;
  --nature-leaf: #7ed070;
  --nature-leaf-alt: #b6e383;
  --nature-bloom: #ffb4d0;
  --nature-glow: rgba(255, 162, 199, .62);
}

html[data-season="summer"] {
  --nature-branch: #76582a;
  --nature-leaf: #75af50;
  --nature-leaf-alt: #b6d467;
  --nature-bloom: #ffd74f;
  --nature-glow: rgba(255, 214, 75, .64);
}

html[data-season="autumn"] {
  --nature-branch: #704125;
  --nature-leaf: #d86d2f;
  --nature-leaf-alt: #e7b145;
  --nature-bloom: #b93e24;
  --nature-glow: rgba(221, 120, 45, .62);
}

html[data-season="halloween"] {
  --nature-branch: #1b1218;
  --nature-leaf: #fb7628;
  --nature-leaf-alt: #8e2b22;
  --nature-bloom: #ffbb43;
  --nature-glow: rgba(255, 89, 26, .78);
}

html[data-season] .home-page .entry-shell,
html[data-season] .home-page .hero-nav,
html[data-season] .home-page .hero-lead,
html[data-season] .home-page .hero-next,
html[data-season] .home-page .improvements-header h2,
html[data-season] .home-page .improvements-header .overline {
  font-family: var(--season-font);
}

html[data-season] .home-page .entry-main h1 {
  display: block;
  width: min(100%, 1020px);
  overflow: visible;
  color: var(--season-title);
  background-image: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}

html[data-season] .home-page .entry-main h1 .title-word {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  background-image: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: initial;
  -webkit-text-stroke: 0;
}

html[data-season] .home-page .entry-main h1 .title-primary {
  --title-letter-fill: var(--season-title-fill);
  color: var(--season-title);
}

html[data-season] .home-page .entry-main h1 .title-accent {
  --title-letter-fill: var(--season-accent-fill);
  margin-left: .12em;
  color: var(--season-accent);
}

.title-letter {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: inline-block;
  min-width: .08em;
  margin-inline: .008em;
  color: inherit;
  font: inherit;
  font-style: normal;
  line-height: inherit;
  background-image: var(--title-letter-fill);
  background-size: 180% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .52));
  transform-origin: 50% 85%;
}

.title-letter:nth-child(3n + 1) { transform: rotate(-1.4deg) translateY(1px); }
.title-letter:nth-child(3n + 2) { transform: rotate(.9deg) translateY(-1px); }
.title-letter:nth-child(3n) { transform: rotate(-.4deg); }

.title-letter::before,
.title-letter::after {
  content: "";
  position: absolute;
  z-index: -1;
  display: block;
  pointer-events: none;
}

.nature-root::after {
  left: 26%;
  bottom: -.08em;
  width: 62%;
  height: .24em;
  background:
    linear-gradient(58deg, transparent 43%, var(--nature-branch) 45% 51%, transparent 53%) 0 0 / 42% 100%,
    linear-gradient(-56deg, transparent 43%, var(--nature-branch) 45% 51%, transparent 53%) 100% 0 / 42% 100%,
    linear-gradient(79deg, transparent 46%, var(--nature-branch) 48% 52%, transparent 54%) 50% 0 / 38% 100%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .42));
}

.nature-sprout::before,
.nature-leaf::before {
  top: -.08em;
  right: -.12em;
  width: .38em;
  height: .3em;
  background:
    radial-gradient(ellipse at 20% 70%, var(--nature-leaf) 0 27%, transparent 30%),
    radial-gradient(ellipse at 77% 34%, var(--nature-leaf-alt) 0 25%, transparent 28%),
    linear-gradient(145deg, transparent 46%, var(--nature-branch) 48% 53%, transparent 55%);
  transform: rotate(9deg);
  filter: drop-shadow(0 0 5px var(--nature-glow));
}

.nature-leaf::before {
  top: 42%;
  right: -.18em;
  transform: rotate(28deg) scale(.88);
}

.nature-bloom::after {
  top: -.12em;
  left: 43%;
  width: .27em;
  height: .27em;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff7b8 0 16%, transparent 18%),
    radial-gradient(circle at 50% 8%, var(--nature-bloom) 0 24%, transparent 27%),
    radial-gradient(circle at 92% 50%, var(--nature-bloom) 0 24%, transparent 27%),
    radial-gradient(circle at 50% 92%, var(--nature-bloom) 0 24%, transparent 27%),
    radial-gradient(circle at 8% 50%, var(--nature-bloom) 0 24%, transparent 27%);
  filter: drop-shadow(0 0 7px var(--nature-glow));
}

.nature-branch::after {
  left: 10%;
  top: 48%;
  width: 86%;
  height: .09em;
  border-radius: 999px;
  background: var(--nature-branch);
  box-shadow: .18em -.08em 0 -.035em var(--nature-leaf), .48em .07em 0 -.035em var(--nature-leaf-alt);
  transform: rotate(-24deg);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .48));
}

.nature-tree::before {
  left: 47%;
  top: 10%;
  width: .08em;
  height: 78%;
  border-radius: 70% 30% 55% 45%;
  background: linear-gradient(90deg, var(--nature-branch), color-mix(in srgb, var(--nature-branch) 55%, white));
  transform: rotate(2deg);
}

.nature-tree::after {
  left: 0;
  top: -.17em;
  width: 1em;
  height: .48em;
  background:
    radial-gradient(ellipse at 15% 65%, var(--nature-leaf) 0 19%, transparent 21%),
    radial-gradient(ellipse at 38% 28%, var(--nature-leaf-alt) 0 20%, transparent 22%),
    radial-gradient(ellipse at 61% 30%, var(--nature-leaf) 0 22%, transparent 24%),
    radial-gradient(ellipse at 85% 66%, var(--nature-leaf-alt) 0 19%, transparent 21%),
    linear-gradient(165deg, transparent 46%, var(--nature-branch) 48% 52%, transparent 54%);
  filter: drop-shadow(0 0 7px var(--nature-glow));
}

.nature-sun::after {
  inset: 14% -5% auto auto;
  width: .45em;
  height: .45em;
  border: .035em solid var(--nature-bloom);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--nature-glow), inset 0 0 6px var(--nature-glow);
  transform: rotate(12deg);
}

.nature-wreath::after {
  inset: 10% -8% 5%;
  border: .055em dotted var(--nature-leaf-alt);
  border-radius: 48% 52% 46% 54%;
  box-shadow: 0 0 9px var(--nature-glow);
  transform: rotate(-11deg);
}

.nature-label,
.nature-label span {
  overflow: visible;
}

.nature-label i {
  position: relative;
  display: inline-block;
  color: inherit;
  font: inherit;
  font-style: normal;
}

.nature-label i:nth-child(3n + 1) { transform: rotate(-1deg); }
.nature-label i:nth-child(3n) { transform: rotate(.8deg); }

.nature-label .nature-u {
  width: auto;
  margin-inline: .015em;
  color: var(--nature-leaf);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  -webkit-text-fill-color: var(--nature-leaf);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .58), 0 0 5px var(--nature-glow);
}

.nature-label .nature-u::before,
.nature-label .nature-u::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.nature-label .nature-u::before {
  display: none;
}

.nature-label .nature-u::after {
  top: -.02em;
  left: -.18em;
  width: 1.05em;
  height: .36em;
  background:
    radial-gradient(ellipse at 13% 58%, var(--nature-leaf) 0 16%, transparent 18%),
    radial-gradient(ellipse at 42% 24%, var(--nature-leaf-alt) 0 16%, transparent 18%),
    radial-gradient(ellipse at 76% 58%, var(--nature-leaf) 0 16%, transparent 18%),
    linear-gradient(168deg, transparent 47%, var(--nature-branch) 49% 53%, transparent 55%);
  filter: drop-shadow(0 0 5px var(--nature-glow));
}

html[data-season="winter"] .nature-bloom::after,
html[data-season="winter"] .nature-tree::after {
  filter: grayscale(.35) drop-shadow(0 0 8px var(--nature-glow));
}

html[data-season="halloween"] .nature-bloom::after {
  border-radius: 44% 44% 52% 52%;
  background: radial-gradient(circle at 38% 42%, #181016 0 9%, transparent 11%), radial-gradient(circle at 64% 42%, #181016 0 9%, transparent 11%), var(--nature-bloom);
  clip-path: polygon(50% 0, 87% 18%, 100% 56%, 75% 100%, 25% 100%, 0 56%, 13% 18%);
}

@keyframes nature-letter-breathe {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}

@keyframes nature-leaf-wave {
  0%, 100% { rotate: -3deg; }
  50% { rotate: 7deg; }
}

@media (prefers-reduced-motion: no-preference) {
  .title-letter:nth-child(odd) { animation: nature-letter-breathe 4.8s ease-in-out infinite; }
  .title-letter:nth-child(even) { animation: nature-letter-breathe 5.6s ease-in-out -2s infinite reverse; }
  .title-letter::before,
  .title-letter::after { animation: nature-leaf-wave 3.8s ease-in-out infinite; }
  .nature-label .nature-u::after { animation: nature-leaf-wave 3.8s ease-in-out infinite; }
}

@media (max-width: 760px) {
  html[data-season] .home-page .entry-main h1 .title-word::after {
    opacity: .72;
  }

  .nature-leaf::before,
  .nature-sprout::before,
  .nature-branch::after {
    transform: scale(.72) rotate(-18deg);
  }
}

/* Full-bleed Three.js depth layer and carved title treatment */
html[data-season] .home-page .entry-shell {
  perspective: 1100px;
  perspective-origin: 50% 43%;
}

.season-3d-scene {
  position: absolute;
  inset: 72px 0 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.season-3d-scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: .86;
  filter: saturate(1.08) drop-shadow(0 9px 9px rgba(0, 0, 0, .34));
}

html[data-season] .home-page .season-atmosphere { z-index: 2; }
html[data-season] .home-page .entry-main { z-index: 3; }
html[data-season] .home-page .hero-nav { z-index: 4; }

html[data-season] .home-page .entry-main h1 {
  --title-tilt-x: 0deg;
  --title-tilt-y: 0deg;
  transform: rotateX(var(--title-tilt-x)) rotateY(var(--title-tilt-y)) translateZ(22px);
  transform-style: preserve-3d;
  transition: transform 180ms ease-out;
}

html[data-season] .home-page .entry-main h1 .title-word {
  transform: translateZ(16px);
  transform-style: preserve-3d;
}

.title-letter {
  filter: none;
}

.title-letter:nth-child(3n + 1),
.title-letter:nth-child(3n + 2),
.title-letter:nth-child(3n) { transform: none; }

.title-letter::before,
.title-letter::after {
  display: none;
}

@media (max-width: 760px) {
  .season-3d-scene { top: 64px; }
  .season-3d-scene canvas { opacity: .7; }

  html[data-season] .home-page .entry-main h1 {
    transform: rotateX(calc(var(--title-tilt-x) * .45)) rotateY(calc(var(--title-tilt-y) * .45)) translateZ(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-season] .home-page .entry-main h1 {
    transform: translateZ(12px);
    transition: none;
  }
}

/* Distinct seasonal weather paths */
@keyframes spring-breeze {
  0% { opacity: 0; transform: translate3d(-24px, -12vh, 0) rotate(-30deg) scale(.7); }
  14% { opacity: .84; }
  42% { transform: translate3d(var(--drift), 38vh, 0) rotate(170deg) scale(1); }
  72% { opacity: .72; transform: translate3d(-18px, 72vh, 0) rotate(310deg) scale(.88); }
  100% { opacity: 0; transform: translate3d(var(--drift), 108vh, 0) rotate(520deg) scale(.64); }
}

@keyframes summer-firefly {
  0% { opacity: 0; transform: translate3d(0, 108vh, 0) scale(.45); }
  18% { opacity: .36; }
  35% { opacity: 1; transform: translate3d(var(--drift), 72vh, 0) scale(1.12); }
  58% { opacity: .3; transform: translate3d(-18px, 46vh, 0) scale(.72); }
  78% { opacity: .92; transform: translate3d(var(--drift), 20vh, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(0, -16vh, 0) scale(.5); }
}

@keyframes autumn-tumble {
  0% { opacity: 0; transform: translate3d(0, -14vh, 0) rotate(-40deg) scale(.72); }
  12% { opacity: .9; }
  30% { transform: translate3d(var(--drift), 26vh, 0) rotate(150deg) scale(1); }
  57% { transform: translate3d(-26px, 57vh, 0) rotate(390deg) scale(.86); }
  79% { opacity: .82; transform: translate3d(var(--drift), 82vh, 0) rotate(610deg) scale(1.04); }
  100% { opacity: 0; transform: translate3d(-12px, 110vh, 0) rotate(820deg) scale(.7); }
}

html[data-season="spring"] .season-atmosphere i:nth-child(5n) {
  width: calc(var(--size) * 1.5);
  height: calc(var(--size) * .8);
  border-radius: 50% 10% 50% 10%;
  background: linear-gradient(135deg, #ffb2d0 0 46%, #fff2a8 48% 52%, #8fd276 54% 100%);
  box-shadow: 0 0 8px rgba(255, 190, 220, .58);
}

html[data-season="summer"] .season-atmosphere i {
  width: calc(var(--size) * .62);
  height: calc(var(--size) * .62);
  border-radius: 50%;
  background: #fff06a;
  box-shadow: 0 0 5px #fff6a5, 0 0 14px rgba(255, 213, 55, .92), 0 0 28px rgba(255, 183, 28, .52);
}

html[data-season="summer"] .season-atmosphere i:nth-child(even) {
  background: #d7ff77;
  box-shadow: 0 0 5px #eaffaa, 0 0 16px rgba(164, 225, 70, .82);
}

@media (prefers-reduced-motion: no-preference) {
  html[data-season="spring"] .season-atmosphere i {
    animation: spring-breeze var(--duration) ease-in-out var(--delay) infinite;
  }

  html[data-season="summer"] .season-atmosphere i {
    animation: summer-firefly var(--duration) ease-in-out var(--delay) infinite;
  }

  html[data-season="autumn"] .season-atmosphere i {
    animation: autumn-tumble var(--duration) ease-in-out var(--delay) infinite;
  }
}
