:root {
  --bg: #fff8ee;
  --surface: #ffffff;
  --surface-tint: #eef7e8;
  --ink: #2c2430;
  --muted: #655b6b;
  --accent: #23744b;
  --accent-hover: #1b5c3b;
  --accent-lip: #14452c;
  --accent-2: #f4a236;
  --accent-2-soft: #ffe6a8;
  --border: #e5d7c3;
  --border-lip: #d6c3a8;
  --radius: 20px;
  --shadow-sm: 0 4px 0 var(--border-lip), 0 8px 16px rgba(92, 62, 30, 0.06);
  --shadow-md: 0 8px 0 var(--border-lip), 0 18px 36px rgba(92, 62, 30, 0.12);
  --font-display: 'Fredoka', 'Nunito', sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background:
    radial-gradient(circle at 12% 6%, rgba(244, 162, 54, 0.14) 0%, transparent 38%),
    radial-gradient(circle at 88% 10%, rgba(35, 116, 75, 0.12) 0%, transparent 40%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 32%);
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent-hover);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }

p {
  margin: 0 0 16px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow-container {
  max-width: 780px;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: none;
  box-shadow: none;
  border-radius: 0;
  flex-shrink: 0;
}

.brand-mark-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(72, 54, 34, 0.18));
}

.brand-mark-sm {
  width: 34px;
  height: 34px;
}

.brand-mark-sm .brand-mark-img {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.brand-tld {
  color: var(--accent);
  font-size: 0.72em;
  font-weight: 700;
  margin-left: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  border: 2px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-link[aria-current="page"] {
  background: var(--surface-tint);
  border-color: var(--accent);
  color: var(--accent-hover);
  text-decoration: none;
}

.menu-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--border-lip);
  cursor: pointer;
  touch-action: manipulation;
}

.menu-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.nav-drawer {
  margin: 0 0 0 auto;
  width: min(300px, 82vw);
  width: min(300px, 82dvw);
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border: 0;
  border-left: 2px solid var(--border);
  border-radius: 24px 0 0 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: -12px 0 36px rgba(44, 36, 48, 0.18);
}

.nav-drawer[open] {
  display: flex;
  flex-direction: column;
}

.nav-drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px max(24px, env(safe-area-inset-bottom));
}

.nav-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  border: 2px solid var(--border);
  background: var(--bg);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-drawer-link:hover,
.nav-drawer-link.is-active,
.nav-drawer-link[aria-current="page"] {
  background: var(--surface-tint);
  border-color: var(--accent);
  color: var(--accent-hover);
  text-decoration: none;
}

.nav-drawer-link.is-active::after,
.nav-drawer-link[aria-current="page"]::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}

.site-main {
  flex: 1;
}

/* 3D Plush Kawaii Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
  text-decoration: none;
  user-select: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(3px);
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent-lip);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.28), 0 5px 0 var(--accent-lip);
}

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

.btn-primary:active {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 2px 0 var(--accent-lip);
}

.btn-lg {
  min-height: 52px;
  padding: 0 30px;
  font-size: 18px;
  border-radius: 18px;
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: inset 0 2px 0 var(--surface), 0 4px 0 var(--border-lip);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.btn-outline:active {
  box-shadow: 0 1px 0 var(--border-lip);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--ink);
}

.btn-sm {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 14px;
}

.like-btn[data-gf-liked],
.like-btn[aria-pressed="true"] {
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--accent-2);
}

.count-pill {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--ink);
}

/* Hero & Synced Full-Bleed Felt Diorama Stage */
.hero-stage-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20px 0 52px;
}

.hero-stage-section::before,
.hero-stage-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-stage-section::before {
  z-index: -2;
  background-image: var(--hero-bg-img, url('https://img.meldgames.net/s_325x2h2z431n1c/v2-bg-felt-snow-fb.cedd88e431.webp'));
  background-size: cover;
  background-position: center bottom;
  filter: blur(6px) saturate(1.06);
  transform: scale(1.05);
  opacity: var(--hero-img-opacity, 0.56);
  transition: opacity 0.45s ease;
}

.hero-stage-section::after {
  z-index: -1;
  background: var(--hero-scrim, linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.24) 52%, var(--bg) 100%));
}

.hero-stage-section.is-pastel-mode {
  --hero-img-opacity: 0;
}

.hero-stage-section.is-pastel-mode::after {
  background: var(--hero-pastel-grad, linear-gradient(180deg, #cfecfd 0%, #f2faff 58%, var(--bg) 100%));
}

.hero-stage-section > .container {
  position: relative;
  z-index: 1;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}

.hero-top-row {
  text-align: center;
  margin: 0 auto 18px;
  max-width: 780px;
}

.hero-lead {
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
  max-width: 68ch;
  margin: 0 auto;
}

.meadow-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meadow-tray-col {
  width: 100%;
  max-width: 520px;
}

.diorama-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 30px;
  overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow:
    0 0 0 2px var(--border),
    0 10px 0 var(--border-lip),
    0 24px 48px rgba(72, 54, 34, 0.18);
  background: var(--surface-tint);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html.is-stage-fullscreen,
html.is-stage-fullscreen body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-stage-fullscreen .site-header {
  visibility: hidden;
  pointer-events: none;
}

html.is-stage-fullscreen .hero-stage-section {
  isolation: auto;
  overflow: visible;
  z-index: 1000;
}

html.is-stage-fullscreen .hero-stage-section > .container {
  z-index: auto;
}

.stage-viewport {
  position: relative;
  width: 100%;
}

.diorama-frame:fullscreen,
.diorama-frame:-webkit-full-screen,
.diorama-frame.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: block;
  padding: 0;
  background-color: var(--bg);
  overflow: hidden;
  touch-action: none;
}

.diorama-frame:fullscreen .stage-viewport,
.diorama-frame:-webkit-full-screen .stage-viewport,
.diorama-frame.is-fullscreen .stage-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.meadow-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 520 / 720;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.diorama-frame:fullscreen .meadow-canvas,
.diorama-frame:-webkit-full-screen .meadow-canvas,
.diorama-frame.is-fullscreen .meadow-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

.diorama-frame:fullscreen .glass-hud-top,
.diorama-frame:-webkit-full-screen .glass-hud-top,
.diorama-frame.is-fullscreen .glass-hud-top {
  top: max(10px, calc(env(safe-area-inset-top) + 6px));
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: var(--fs-hud-w, min(calc(100dvw - 16px), 500px));
}

.diorama-frame:fullscreen .floating-hint,
.diorama-frame:-webkit-full-screen .floating-hint,
.diorama-frame.is-fullscreen .floating-hint,
.diorama-frame:fullscreen .wand-banner,
.diorama-frame:-webkit-full-screen .wand-banner,
.diorama-frame.is-fullscreen .wand-banner {
  bottom: max(48px, calc(env(safe-area-inset-bottom) + 32px));
}

.diorama-frame:fullscreen .world-toast,
.diorama-frame:-webkit-full-screen .world-toast,
.diorama-frame.is-fullscreen .world-toast {
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
}

/* Floating Frosted-Glass Capsule HUD */
.glass-hud-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 5;
}

.glass-pill {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(58, 46, 32, 0.12);
}

.glass-pill-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  gap: 8px;
}

.glass-btn-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-pill-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 var(--border-lip);
  transition: transform 0.1s ease, background 0.15s ease;
}

.icon-pill-btn:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.icon-pill-btn:active {
  transform: translateY(1px);
}

.icon-pill-btn.is-on {
  background: var(--surface-tint);
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* Structured Stage Control Dock */
.stage-dock {
  width: 100%;
  max-width: 520px;
  margin: 14px auto 0;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--border);
  box-shadow: 0 4px 0 var(--border-lip), 0 12px 28px rgba(72, 54, 34, 0.08);
}

.dock-drawer-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.drawer-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--border-lip);
  transition: transform 0.1s ease, border-color 0.15s ease, color 0.15s ease;
}

.drawer-trigger-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.drawer-trigger-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--border-lip);
}

.drawer-badge {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--accent-hover);
  white-space: nowrap;
  flex-shrink: 0;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(44, 36, 48, 0.42);
  backdrop-filter: blur(3px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.stage-drawer {
  margin: 0 0 0 auto;
  width: min(410px, 92vw);
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border: 0;
  border-left: 2px solid var(--border);
  border-radius: 24px 0 0 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: -12px 0 36px rgba(44, 36, 48, 0.16);
}

.stage-drawer[open] {
  display: flex;
  flex-direction: column;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.drawer-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.drawer-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.drawer-close-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px 24px;
}

.drawer-sub {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.dock-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dock-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dock-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

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

.world-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--border-lip);
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.world-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1.5px solid rgba(44, 36, 48, 0.18);
}

.world-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.world-pill:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.world-pill.is-active {
  background: var(--accent);
  border-color: var(--accent-lip);
  color: var(--surface);
  box-shadow: 0 2px 0 var(--accent-lip);
}

.world-pill.is-active .world-swatch {
  border-color: rgba(255, 255, 255, 0.88);
}

.world-pill.is-locked {
  border-style: dashed;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  opacity: 0.78;
  cursor: not-allowed;
  box-shadow: none;
}

.dock-style-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.segmented-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  gap: 3px;
}

.style-chip {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.style-chip:hover {
  color: var(--ink);
}

.style-chip.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(72, 54, 34, 0.12);
}

.jar-toggle-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--border-lip);
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.jar-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
}

.jar-toggle-btn.is-active {
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--accent-2);
}

.dock-footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dock-actions .btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 12px;
}

.world-toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-2-soft);
  color: var(--ink);
  border: 2px solid var(--accent-2);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(60, 40, 20, 0.22);
  z-index: 8;
  white-space: nowrap;
}

.world-toast-btn {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.glass-score-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.glass-score-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.glass-sparkle {
  font-size: 16px;
}

.glass-score-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.glass-next-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  border-left: 1.5px solid var(--border);
}

.glass-next-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.glass-next-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(60, 40, 20, 0.2));
}

/* 10-Tier Evolution Ribbon inside sky */
.glass-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  gap: 2px;
}

.ribbon-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
  filter: grayscale(1) opacity(0.45);
}

.ribbon-icon.is-found {
  filter: none;
  opacity: 1;
  transform: scale(1.06);
}

.ribbon-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 4 Cozy Power-Up Buttons */
.powerup-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.power-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(120, 100, 75, 0.22);
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}

.power-btn:hover:not(:disabled) {
  background: var(--surface);
  transform: translateY(-1px);
}

.power-btn:active:not(:disabled) {
  transform: translateY(2px);
}

.power-btn.is-active {
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
}

.power-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.power-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
}

.floating-hint,
.wand-banner {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  bottom: 64px;
  width: max-content;
  max-width: calc(100% - 28px);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 12px rgba(60, 40, 20, 0.14);
  pointer-events: none;
  white-space: normal;
  text-align: center;
  z-index: 4;
}

.wand-banner {
  background: var(--accent-2-soft);
  border-color: var(--accent-2);
}

.tray-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 248, 238, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.cover-card {
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 8px 0 var(--border-lip), 0 18px 34px rgba(92, 62, 30, 0.16);
  padding: 26px 24px;
  max-width: 340px;
  text-align: center;
}

.cover-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-hover);
  background: var(--surface-tint);
  border: 2px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.cover-title {
  font-size: 30px;
  margin-bottom: 8px;
}

.cover-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
}

.tray-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.tray-controls-group,
.tray-engage-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.best-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  box-shadow: 0 3px 0 var(--border-lip);
}

.best-pill strong {
  color: var(--ink);
}

.share-msg {
  font-size: 14px;
  color: var(--accent-hover);
  font-weight: 800;
}

/* HUD Side Column */
.meadow-hud-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hud-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.hud-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.muted-small {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

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

.ladder-progress {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-hover);
  background: var(--surface-tint);
  border: 2px solid var(--border);
  padding: 2px 10px;
  border-radius: 999px;
}

.critter-ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.critter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--bg);
  opacity: 0.62;
  transition: transform 0.15s ease, opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.critter-chip.is-found {
  opacity: 1;
  background: var(--surface);
  border-color: var(--accent-2);
  box-shadow: 0 3px 0 var(--accent-2-soft);
}

.critter-portrait {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: grayscale(0.9);
  transition: filter 0.25s ease;
}

.critter-chip.is-found .critter-portrait {
  filter: none;
}

.critter-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.critter-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.critter-pts {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.board-tabs {
  display: inline-flex;
  padding: 2px;
  border-radius: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  gap: 2px;
}

.board-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.board-tab.is-active {
  background: var(--surface);
  color: var(--accent-hover);
  box-shadow: 0 1px 4px rgba(72, 54, 34, 0.1);
}

.board-me-bar {
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
}

.board-me-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.board-me-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.board-name-input {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  font-family: var(--font-body);
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
}

.board-edit-btn,
.board-save-btn {
  padding: 2px 9px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.board-save-btn {
  background: var(--accent);
  border-color: var(--accent-lip);
  color: var(--surface);
}

.mini-board-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-board-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1.5px solid transparent;
  font-size: 13px;
  font-weight: 700;
}

.mini-board-row.is-me {
  background: var(--surface-tint);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.board-rank-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.board-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.board-rank-badge.is-top1 {
  color: #b45309;
}

.board-rank-badge.is-top2 {
  color: #4b5563;
}

.board-rank-badge.is-top3 {
  color: #9a3412;
}

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

.board-my-rank {
  margin: -4px 0 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface-tint);
  border: 1.5px dashed var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-board-empty {
  font-size: 13px;
  color: var(--muted);
}

.hud-tip-text {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Sections */
.section {
  padding: 52px 0;
}

.section-head {
  margin-bottom: 24px;
}

.muted-note {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* More Games Strip */
.games-strip-section {
  background: var(--surface-tint);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.games-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.game-link-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, border-color 0.15s ease, box-shadow 0.14s ease;
}

.game-link-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 7px 0 var(--border-lip), 0 14px 24px rgba(35, 116, 75, 0.12);
  text-decoration: none;
}

.game-card-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid var(--border);
  margin-bottom: 14px;
  background: var(--bg);
}

.game-card-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-hover);
  background: var(--surface-tint);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.game-card-title {
  font-size: 22px;
  margin-bottom: 8px;
}

.game-card-desc {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  flex: 1;
  margin-bottom: 16px;
}

.game-card-cta {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-hover);
}

/* Steps */
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.step-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  background: var(--accent-2-soft);
  border: 2px solid var(--accent-2);
  box-shadow: 0 3px 0 var(--accent-2);
  margin-bottom: 12px;
}

.step-card p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* Editorial split */
.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.85fr);
  gap: 32px;
  align-items: start;
}

.prose-col {
  max-width: 70ch;
}

.prose-col h2 {
  margin-top: 32px;
}

.prose-col h2:first-child {
  margin-top: 0;
}

.prose-col h3 {
  margin-top: 24px;
}

.prose-col ul,
.prose-col ol {
  padding-left: 22px;
  margin: 0 0 16px;
}

.prose-col li {
  margin-bottom: 8px;
}

.prose-col table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
}

.prose-col th,
.prose-col td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.prose-col th {
  background: var(--surface-tint);
  font-weight: 800;
}

.facts-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.facts-list {
  margin: 12px 0 0;
}

.facts-list dt {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 12px;
}

.facts-list dd {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink);
}

.sidebar-game-links {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-game-links a {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 3px 0 var(--border-lip);
}

.sidebar-game-links a:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  text-decoration: none;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
}

.faq-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 4px 0 var(--border-lip);
}

.faq-item summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* Comments */
.comments-section {
  border-top: 2px solid var(--border);
}

.comment-form {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 720px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.comment-form-row {
  margin-bottom: 12px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
}

.field-label input,
.field-label textarea {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--ink);
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-msg {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-hover);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

.comments-empty {
  display: none;
  color: var(--muted);
  font-size: 15px;
}

[data-gf-comments][data-gf-empty] .comments-empty {
  display: block;
}

.comment-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 3px 0 var(--border-lip);
}

.comment-card[data-gf-owner] {
  border-color: var(--accent);
  background: var(--surface-tint);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 14px;
}

.owner-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--surface);
  background: var(--accent);
  padding: 2px 10px;
  border-radius: 999px;
}

.comment-time {
  color: var(--muted);
  font-size: 12px;
}

.comment-text {
  margin: 0 0 8px;
  font-size: 15px;
}

.text-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-hover);
  cursor: pointer;
}

.comment-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 3px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Tool stage container */
.tool-stage-wrap {
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 22px;
}

.tool-engage-bar {
  margin-top: 18px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 52px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 8px;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--muted);
  max-width: 52ch;
  margin: 0;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom p {
  margin: 0;
}

/* Mobile responsive */
@media (max-width: 860px) {
  .editorial-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .games-strip,
  .steps-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 6px 0;
    gap: 10px;
  }
  .site-nav {
    display: none;
  }
  .menu-toggle-btn {
    display: inline-flex;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .brand-mark-img {
    width: 32px;
    height: 32px;
  }
  .brand-name {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }
  .hero-stage-section {
    padding: 10px 0 32px;
  }
  .hero-top-row {
    margin-bottom: 10px;
  }
  h1 {
    font-size: 21px;
    line-height: 1.2;
    margin-bottom: 4px;
  }
  h2 {
    font-size: 22px;
  }
  .hero-lead {
    font-size: 13px;
    line-height: 1.4;
  }
  .diorama-frame {
    border-radius: 22px;
  }
  .glass-hud-top {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 5px;
  }
  .glass-pill-main {
    padding: 4px 8px;
    gap: 6px;
  }
  .icon-pill-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
    touch-action: manipulation;
  }
  .glass-score-val {
    font-size: 20px;
  }
  .glass-next-label {
    font-size: 12px;
  }
  .glass-next-img {
    width: 28px;
    height: 28px;
  }
  .powerup-row {
    gap: 6px;
  }
  .power-btn {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
    gap: 4px;
    touch-action: manipulation;
  }
  .power-lbl {
    display: none;
  }
  .power-cnt {
    min-width: 18px;
    height: 18px;
    font-size: 12px;
  }
  .floating-hint,
  .wand-banner {
    bottom: 48px;
    font-size: 13px;
    padding: 5px 12px;
  }
  .stage-dock {
    padding: 12px;
    margin-top: 10px;
  }
  .world-pill {
    min-height: 40px;
  }
  .drawer-trigger-btn {
    padding: 0 8px;
    gap: 5px;
    font-size: 13px;
    white-space: nowrap;
  }
  .stage-drawer {
    margin: auto 0 0;
    width: 100%;
    height: auto;
    max-height: 82dvh;
    border-left: 0;
    border-top: 2px solid var(--border);
    border-radius: 24px 24px 0 0;
  }
  .dock-footer-row {
    flex-direction: column;
    align-items: stretch;
  }
  .dock-actions {
    width: 100%;
    justify-content: center;
  }
  .dock-actions .btn-sm {
    flex: 1 1 auto;
  }
}

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

@media (max-width: 340px) {
  .critter-ladder {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .dock-drawer-row {
    grid-template-columns: 1fr;
  }
}
