:root {
  --bg: #f8f9fa;
  --panel: #ffffff;
  --ink: #111111;
  --deep: #1f3a2e;
  --green: #2f5d50;
  --gold: #ffb800;
  --gold-soft: #fff6d8;
  --muted: #68736e;
  --line: #dfe5e1;
  --line-strong: #c7d0ca;
  --danger: #e53935;
  --shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
  --shadow-strong: 0 14px 38px rgba(31, 58, 46, 0.16);
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
}

.playground-world-wrap {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 184, 0, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(31, 58, 46, 0.08), rgba(255, 184, 0, 0.08)),
    #f4f6ef;
  padding: 0 clamp(10px, 2vw, 28px) clamp(10px, 2vw, 28px);
}

.rdrc-world-stage {
  display: grid;
  gap: 12px;
  min-height: calc(100svh - 128px);
  padding-top: clamp(10px, 1.6vw, 18px);
}

.rdrc-world-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(31, 58, 46, 0.08);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 16px;
}

.rdrc-world-topbar strong,
.rdrc-world-topbar span {
  display: block;
}

.rdrc-world-topbar strong {
  color: var(--deep);
  font-size: 22px;
  font-weight: 950;
}

.rdrc-world-topbar span,
.rdrc-world-topbar p {
  color: var(--muted);
  font-weight: 900;
}

.rdrc-world-topbar p {
  margin: 0;
}

.rdrc-world-viewport {
  background: #87b86f;
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(31, 58, 46, 0.18);
  min-height: min(760px, calc(100svh - 214px));
  overflow: hidden;
  position: relative;
}

.rdrc-world-viewport:focus {
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.22), 0 24px 70px rgba(31, 58, 46, 0.18);
  outline: 0;
}

.rdrc-world-map-large {
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 14% 16%, #74a654 0 7%, transparent 7.2%),
    radial-gradient(circle at 82% 22%, #6fa154 0 6%, transparent 6.2%),
    radial-gradient(circle at 74% 80%, #dccc91 0 10%, transparent 10.2%),
    linear-gradient(135deg, #bad98c, #82b56a 44%, #77aa60);
  background-size: 140px 140px, 140px 140px, auto, auto, auto, auto;
  height: 5000px;
  left: 0;
  position: absolute;
  top: 0;
  transform: translate3d(0, 0, 0);
  width: 5000px;
  will-change: transform;
}

.world-road {
  background: #d9ad67;
  border: 10px solid rgba(131, 91, 44, 0.12);
  box-shadow: inset 0 0 0 8px rgba(255, 246, 214, 0.12);
  position: absolute;
}

.road-main {
  height: 5000px;
  left: 2380px;
  top: 0;
  transform: rotate(34deg);
  transform-origin: 50% 50%;
  width: 420px;
}

.road-cross {
  height: 330px;
  left: 0;
  top: 2680px;
  width: 5000px;
}

.world-plaza {
  background: #dfd39d;
  border: 18px solid rgba(113, 90, 42, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.12);
  height: 740px;
  position: absolute;
  width: 740px;
}

.plaza-rank {
  left: 3370px;
  top: 3130px;
}

.world-water {
  background: linear-gradient(135deg, #4d89c7, #77b8dd);
  border-radius: 55% 45% 50% 40%;
  box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.16);
  height: 620px;
  left: 210px;
  opacity: 0.9;
  position: absolute;
  top: 3700px;
  transform: rotate(-8deg);
  width: 860px;
}

.world-tree {
  background: #557f3e;
  border-radius: 999px;
  box-shadow: 0 14px 0 #426b31, 0 26px 40px rgba(31, 58, 46, 0.24);
  height: 390px;
  position: absolute;
  width: 390px;
}

.tree-1 { left: 720px; top: 560px; }
.tree-2 { left: 3890px; top: 760px; }
.tree-3 { left: 920px; top: 3260px; }
.tree-4 { left: 4140px; top: 2480px; }

.world-lamp {
  background: #20372b;
  border-radius: 999px;
  height: 120px;
  position: absolute;
  width: 18px;
}

.world-lamp::before {
  background: #ffd875;
  border: 4px solid #20372b;
  border-radius: 999px;
  box-shadow: 0 0 38px rgba(255, 216, 117, 0.75);
  content: "";
  height: 54px;
  left: 50%;
  position: absolute;
  top: -46px;
  transform: translateX(-50%);
  width: 54px;
}

.lamp-1 { left: 1840px; top: 2460px; }
.lamp-2 { left: 3100px; top: 2580px; }
.lamp-3 { left: 2730px; top: 1540px; }

.world-building {
  align-items: center;
  background: rgba(255, 252, 242, 0.96);
  border: 4px solid #204331;
  border-radius: 12px;
  box-shadow: 0 26px 48px rgba(31, 58, 46, 0.28);
  color: var(--deep);
  cursor: pointer;
  display: grid;
  gap: 8px;
  height: 260px;
  justify-items: center;
  padding: 58px 24px 24px;
  position: absolute;
  text-align: center;
  width: 350px;
  z-index: 2;
}

.world-building:hover,
.world-building:focus-visible {
  border-color: #d99c00;
  box-shadow: 0 32px 70px rgba(255, 184, 0, 0.32);
  outline: 0;
  transform: translateY(-8px);
}

.world-building strong {
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
}

.world-building em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.building-roof {
  background: #ffb800;
  border: 4px solid #204331;
  border-radius: 10px 10px 2px 2px;
  height: 78px;
  left: 50%;
  position: absolute;
  top: -36px;
  transform: translateX(-50%);
  width: 240px;
}

.building-quiz { left: 760px; top: 850px; }
.building-2048 { left: 1340px; top: 1080px; }
.building-maker { left: 1420px; top: 3560px; }
.building-rank { left: 3480px; top: 2880px; }
.building-profile { left: 2210px; top: 1850px; }
.building-shop { left: 3920px; top: 1700px; }
.building-transaction { left: 590px; top: 2200px; }
.building-news { left: 3060px; top: 760px; }
.building-info { left: 2220px; top: 780px; }
.building-omok { left: 3840px; top: 560px; }
.building-card { left: 2550px; top: 3520px; }

.building-maker .building-roof,
.building-info .building-roof {
  background: #7fc4a1;
}

.building-2048 .building-roof {
  background: #f67b45;
}

.building-rank .building-roof,
.building-shop .building-roof {
  background: #ffd875;
}

.building-omok,
.building-card {
  opacity: 0.78;
}

.world-npc {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--deep);
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: center;
  position: absolute;
  z-index: 3;
}

.world-npc span {
  background: linear-gradient(180deg, #ffe0a8, #c9833e);
  border: 4px solid #20372b;
  border-radius: 999px 999px 10px 10px;
  box-shadow: 0 16px 28px rgba(31, 58, 46, 0.26);
  display: block;
  height: 88px;
  position: relative;
  width: 66px;
}

.world-npc span::before,
.world-npc span::after {
  background: #20372b;
  border-radius: 999px;
  content: "";
  height: 7px;
  position: absolute;
  top: 31px;
  width: 7px;
}

.world-npc span::before { left: 18px; }
.world-npc span::after { right: 18px; }

.world-npc strong {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 950;
  padding: 6px 10px;
}

.npc-guide { left: 2350px; top: 2380px; }
.npc-shop { left: 4280px; top: 2040px; }
.npc-rank { left: 3700px; top: 3850px; }

.world-character {
  align-items: center;
  background: linear-gradient(180deg, #f8d28a, #d48a3d);
  border: 5px solid #20372b;
  border-radius: 999px 999px 10px 10px;
  box-shadow: 0 22px 40px rgba(31, 58, 46, 0.34);
  display: flex;
  height: 94px;
  justify-content: center;
  left: 2480px;
  position: absolute;
  top: 2600px;
  transform: translate(-50%, -100%);
  width: 72px;
  z-index: 8;
}

.world-character::before,
.world-character::after {
  background: #183427;
  border-radius: 999px;
  content: "";
  height: 8px;
  position: absolute;
  top: 31px;
  width: 8px;
}

.world-character::before { left: 20px; }
.world-character::after { right: 20px; }

.world-character span {
  background: #183427;
  border-radius: 999px;
  bottom: 25px;
  height: 7px;
  position: absolute;
  width: 24px;
}

.world-pet {
  background: #f2f7f1;
  border: 4px solid #20372b;
  border-radius: 999px 999px 12px 12px;
  box-shadow: 0 12px 24px rgba(31, 58, 46, 0.22);
  height: 52px;
  left: 2434px;
  position: absolute;
  top: 2624px;
  transform: translate(-50%, -100%);
  width: 48px;
  z-index: 7;
}

.world-toast {
  background: rgba(255, 247, 221, 0.96);
  border: 1px solid #e3b33a;
  border-radius: 8px;
  bottom: 18px;
  color: #6e4a00;
  font-weight: 900;
  left: 18px;
  line-height: 1.45;
  max-width: min(560px, calc(100% - 36px));
  padding: 12px 14px;
  position: absolute;
  z-index: 20;
}

.world-toast.error {
  background: #fff1f1;
  border-color: #f2a1a1;
  color: #a91b1b;
}

.world-window-layer {
  bottom: 18px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 18px;
  width: min(640px, calc(100% - 36px));
  z-index: 18;
}

.world-window {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(31, 58, 46, 0.16);
  border-radius: 10px;
  box-shadow: 0 24px 90px rgba(31, 58, 46, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 100%;
  overflow: hidden;
  pointer-events: auto;
}

.world-room-window {
  bottom: 0;
  left: max(-760px, calc(-100vw + 700px));
  max-height: none;
  min-height: min(720px, calc(100svh - 184px));
  position: absolute;
  right: 0;
  top: 0;
  width: min(1120px, calc(100vw - 72px));
}

.world-room-frame {
  background: #08111f;
  border: 0;
  display: block;
  height: 100%;
  min-height: 620px;
  width: 100%;
}

.world-window[hidden] {
  display: none;
}

.world-window-head {
  align-items: center;
  background: linear-gradient(135deg, #173d2d, #24533f);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.world-window-head strong,
.world-window-head span {
  display: block;
}

.world-window-head strong {
  font-size: 22px;
  font-weight: 950;
}

.world-window-head span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 850;
}

.world-window-head button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  font-weight: 950;
  height: 40px;
  justify-content: center;
  width: 44px;
}

.world-window-body {
  display: grid;
  gap: 14px;
  max-height: 100%;
  overflow: auto;
  padding: 16px;
}

.world-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.world-help {
  color: var(--muted);
  font-weight: 850;
  line-height: 1.55;
  margin: 0;
}

.world-controls {
  align-items: center;
  bottom: 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: absolute;
  right: 18px;
  z-index: 21;
}

.world-window-layer + .world-controls {
  right: min(678px, calc(100% - 146px));
}

.world-controls div {
  display: flex;
  gap: 8px;
}

.world-controls button {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 58, 46, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(31, 58, 46, 0.12);
  color: var(--deep);
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
  height: 44px;
  width: 48px;
}

.rdrc-world-stage .room-list,
.rdrc-world-stage .quiz-stats-list,
.rdrc-world-stage .hall-list {
  max-height: 340px;
  overflow: auto;
}

@media (max-width: 980px) {
  .playground-world-wrap {
    padding-left: 8px;
    padding-right: 8px;
  }

  .rdrc-world-stage {
    min-height: calc(100svh - 106px);
  }

  .rdrc-world-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .rdrc-world-viewport {
    min-height: calc(100svh - 220px);
  }

  .world-window-layer {
    bottom: 82px;
    left: 10px;
    right: 10px;
    top: auto;
    width: auto;
  }

  .world-window {
    max-height: 52svh;
  }

  .world-room-window {
    bottom: 0;
    left: 0;
    max-height: none;
    min-height: 62svh;
    right: 0;
    top: auto;
    width: 100%;
  }

  .world-room-frame {
    min-height: 54svh;
  }

  .world-toast {
    bottom: 78px;
    font-size: 14px;
  }

  .world-window-layer + .world-controls {
    bottom: 16px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

@media (max-width: 640px) {
  .rdrc-world-topbar strong {
    font-size: 18px;
  }

  .rdrc-world-topbar p,
  .rdrc-world-topbar span {
    font-size: 14px;
  }

  .world-window-head strong {
    font-size: 19px;
  }

  .world-window-body {
    padding: 12px;
  }

  .world-panel-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quiz-builder-row {
    grid-template-columns: 1fr;
  }
}

.skip-link {
  background: var(--deep);
  border-radius: 0 0 10px 0;
  color: #fff;
  font-weight: 900;
  left: 0;
  padding: 10px 14px;
  position: fixed;
  top: 0;
  transform: translateY(-120%);
  transition: transform 0.14s ease;
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
  margin: 0;
  overflow-x: hidden;
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 18px rgba(17, 24, 20, 0.06);
  display: flex;
  gap: clamp(12px, 1.8vw, 24px);
  justify-content: space-between;
  min-height: 104px;
  padding: 14px clamp(18px, 3.2vw, 42px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-logo {
  display: block;
  height: 72px;
  max-width: min(250px, 18vw);
  object-fit: contain;
  object-position: left center;
  width: auto;
}

.site-nav {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px clamp(10px, 1vw, 18px);
  justify-content: center;
  margin-left: auto;
  min-width: 0;
}

.site-nav a {
  color: var(--deep);
  font-size: clamp(24px, 1.65vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
}

.site-nav a::after {
  background: var(--gold);
  bottom: 3px;
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.16s ease;
  width: 100%;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.site-nav a.active {
  color: #0f2a20;
}

.scroll-title {
  color: var(--deep);
  display: none;
  flex: 1;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header.compact {
  min-height: 78px;
  box-shadow: 0 6px 22px rgba(17, 17, 17, 0.08);
}

.site-header.compact .brand-logo {
  height: 58px;
}

.site-header.compact .site-nav {
  display: none;
}

.site-header.compact .scroll-title {
  display: block;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.auth-action-button {
  align-items: center;
  background: linear-gradient(135deg, #eaf5f0, #cfe8dc);
  border: 1px solid #a9cdbb;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(31, 58, 46, 0.14);
  color: var(--deep);
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  min-width: 92px;
  padding: 0 16px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
  white-space: nowrap;
}

.auth-action-button:hover,
.auth-action-button.active {
  background: linear-gradient(135deg, var(--deep), var(--green));
  box-shadow: 0 12px 26px rgba(31, 58, 46, 0.24);
  color: #fff;
  transform: translateY(-1px);
}

.icon-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  height: 42px;
  padding: 0;
  position: relative;
  width: 42px;
}

.search-toggle {
  align-items: center;
  background: linear-gradient(135deg, var(--gold), #ff7a1a);
  border: 2px solid #d99d00;
  border-radius: 999px;
  box-shadow: 0 7px 18px rgba(255, 184, 0, 0.38);
  color: #111;
  display: inline-flex;
  gap: 8px;
  height: 48px;
  justify-content: center;
  min-width: 104px;
  padding: 0 18px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  width: auto;
}

.search-toggle:hover {
  box-shadow: 0 10px 24px rgba(255, 122, 26, 0.42);
  transform: translateY(-1px);
}

.search-toggle strong {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.search-toggle .search-icon {
  border: 3px solid currentColor;
  border-radius: 50%;
  display: block;
  flex: 0 0 auto;
  height: 17px;
  position: relative;
  width: 17px;
}

.search-toggle .search-icon::after {
  background: currentColor;
  content: "";
  height: 10px;
  position: absolute;
  right: -7px;
  top: 12px;
  transform: rotate(45deg);
  width: 3px;
}

.menu-toggle {
  display: grid;
  gap: 6px;
  place-content: center;
}

.menu-toggle strong {
  display: none;
}

.menu-toggle span {
  background: var(--ink);
  border-radius: 5px;
  display: block;
  height: 5px;
  transition: transform 0.18s ease, opacity 0.18s ease;
  width: 35px;
}

.menu-toggle.open span:nth-of-type(1) {
  transform: translateY(11px) rotate(45deg);
}

.menu-toggle.open span:nth-of-type(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-of-type(3) {
  transform: translateY(-11px) rotate(-45deg);
}

.scroll-progress {
  background: var(--gold);
  bottom: -2px;
  height: 4px;
  left: 0;
  position: absolute;
  width: 0;
}

.search-panel,
.menu-panel {
  background: rgba(255, 255, 255, 0.985);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  left: 0;
  padding: 34px clamp(18px, 5vw, 64px);
  position: sticky;
  top: 104px;
  z-index: 24;
}

.search-panel form,
.large-search {
  align-items: center;
  border-bottom: 3px solid var(--deep);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 980px;
}

.search-panel input,
.large-search input {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: clamp(24px, 3.4vw, 42px);
  font-weight: 900;
  min-width: 0;
  outline: 0;
  padding: 12px 0 18px;
}

.search-panel button {
  align-items: center;
  background: linear-gradient(135deg, var(--gold), #ff7a1a);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(255, 184, 0, 0.32);
  color: #111;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
}

.menu-panel-inner {
  display: grid;
  gap: 18px 34px;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.menu-panel a {
  border-bottom: 2px solid transparent;
  color: var(--deep);
  font-size: 24px;
  font-weight: 900;
  padding-bottom: 8px;
}

.menu-panel a:hover {
  border-bottom-color: var(--gold);
}

.ad-slot {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 249, 250, 0.96)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(17, 24, 20, 0.06);
  margin: clamp(18px, 3vw, 30px) auto;
  max-width: 1120px;
  min-height: 92px;
  overflow: hidden;
  padding: 12px;
}

.ad-slot > span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 6px;
  text-align: center;
  text-transform: uppercase;
}

.ad-slot-placeholder {
  align-items: center;
  color: var(--muted);
  display: grid;
  justify-items: center;
  min-height: 120px;
  text-align: center;
}

.ad-slot-placeholder strong {
  color: var(--deep);
  font-size: 18px;
  font-weight: 900;
}

.ad-slot-placeholder p {
  font-size: 13px;
  font-weight: 750;
  margin: 0;
}

.news-hero,
.page-title,
.content-band,
.article-page {
  padding-left: clamp(18px, 5vw, 64px);
  padding-right: clamp(18px, 5vw, 64px);
}

.news-hero {
  background:
    linear-gradient(135deg, rgba(31, 58, 46, 0.05), rgba(255, 184, 0, 0.08)),
    var(--bg);
  padding-bottom: clamp(38px, 5vw, 68px);
  padding-top: clamp(34px, 5vw, 64px);
}

.hero-kicker {
  align-items: center;
  border-bottom: 3px solid var(--deep);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 16px;
}

.hero-kicker span {
  background: var(--deep);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  padding: 8px 13px;
}

.hero-kicker strong {
  color: var(--green);
  font-size: clamp(15px, 1.5vw, 22px);
  font-weight: 900;
  text-align: right;
}

.front-grid {
  align-items: start;
  display: grid;
  gap: clamp(24px, 4vw, 52px);
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
}

.lead-story {
  min-height: 330px;
}

.eyebrow,
.meta {
  color: #b86b00;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 10px;
}

.article-meta-actions,
.news-row-meta,
.source-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-meta-actions {
  margin-bottom: 8px;
}

.article-favorite-action {
  margin: 0;
}

.article-favorite-action .favorite-button {
  padding: 8px 12px;
}

.article-meta-actions .meta,
.news-row-meta .meta {
  margin-bottom: 0;
}

.source-actions {
  justify-content: flex-end;
}

.source-filter-button {
  background: #eef6f1;
  border: 1px solid #cfe1d7;
  border-radius: 999px;
  color: var(--deep);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  padding: 8px 12px;
  text-decoration: none;
}

.source-filter-button:hover {
  border-color: var(--gold);
  color: #b86b00;
}

.source-filter-button.small {
  font-size: 12px;
  padding: 6px 9px;
}

.lead-story h1 {
  color: var(--ink);
  font-size: clamp(20px, 3.36vw, 48px);
  line-height: 1.08;
  margin-bottom: 20px;
  max-width: 980px;
}

.story-image-link {
  display: block;
  margin: 18px 0 20px;
  max-width: 760px;
}

.story-image-link img,
.article-thumb img,
.news-row-image img,
.article-image img {
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

[data-fallback-image].image-load-failed {
  display: none;
}

.story-image-link img {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}

.lead-story p:not(.eyebrow) {
  color: #324039;
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.68;
  max-width: 900px;
}

.story-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 900;
  gap: 12px;
  margin: 18px 0;
}

.headline-rail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  padding: 22px;
}

.rail-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rail-title span {
  color: var(--deep);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-title a,
.section-heading a {
  color: var(--green);
  font-weight: 900;
}

.headline-rail article {
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
}

.headline-rail article:last-child {
  border-bottom: 0;
}

.headline-rail h2 {
  color: var(--ink);
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.35;
  margin: 0;
}

.dashboard-strip {
  background: var(--deep);
  color: white;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, 1fr);
  padding: 1px clamp(18px, 5vw, 64px);
}

.live-status-strip {
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px clamp(18px, 5vw, 64px);
  scrollbar-width: thin;
}

.live-status-strip div {
  background: linear-gradient(135deg, #ffffff, #fff8df);
  border-left: 4px solid var(--gold);
  flex: 1 0 190px;
  min-width: 190px;
  padding: 14px 18px;
}

.live-status-strip span {
  color: var(--green);
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.live-status-strip strong {
  color: var(--ink);
  display: block;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 900;
  line-height: 1.1;
  margin-top: 5px;
}

.dashboard-strip div {
  background: #263f34;
  min-width: 0;
  padding: 19px 22px;
}

.dashboard-strip span {
  color: #c9d7d1;
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-strip strong {
  color: var(--gold);
  display: block;
  font-size: clamp(24px, 2.5vw, 38px);
  line-height: 1.1;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.content-band {
  padding-bottom: clamp(34px, 5vw, 68px);
  padding-top: clamp(34px, 5vw, 68px);
}

body:not(.auth-popup) .page-title:not(.auth-page),
.info-mongddang-page .topbar {
  display: none;
}

body:not(.auth-popup) .page-title:not(.auth-page) + .content-band,
.info-mongddang-page .dashboard {
  padding-top: clamp(18px, 3vw, 34px);
}

.page-title {
  background: linear-gradient(135deg, rgba(31, 58, 46, 0.07), rgba(255, 184, 0, 0.1));
  padding-bottom: clamp(17px, 2.5vw, 34px);
  padding-top: clamp(17px, 2.5vw, 34px);
}

.page-title h1,
.section-heading h2 {
  color: var(--ink);
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 900;
  line-height: 1.08;
  margin: 0;
}

.page-title > p:not(.eyebrow):not(.status-pill) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin-top: 12px;
  max-width: 720px;
}

.tool-page-title {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding-bottom: clamp(9px, 1.5vw, 17px);
  padding-top: clamp(10px, 1.5vw, 18px);
}

.tool-page-title .eyebrow {
  font-size: 13px;
  margin-bottom: 0;
}

.tool-page-title h1 {
  font-size: clamp(24px, 2.6vw, 38px);
}

.tool-page-title > p:not(.eyebrow):not(.status-pill) {
  font-size: 16px;
  line-height: 1.45;
  margin-top: 0;
  max-width: 860px;
}

.tool-page-title .inline-favorite {
  margin-top: 4px;
}

.tool-page-title + .content-band {
  padding-top: clamp(24px, 3.5vw, 42px);
}

.tool-page-title + .content-band .lotto-machine {
  margin-top: 0;
}

.compact-page-title {
  display: grid;
  gap: 6px;
  padding-bottom: clamp(12px, 2vw, 24px);
  padding-top: clamp(12px, 2vw, 24px);
}

.compact-page-title h1 {
  font-size: clamp(30px, 3.2vw, 48px);
}

.compact-page-title > p:not(.eyebrow):not(.status-pill) {
  margin-top: 0;
}

.playground-band {
  padding-bottom: clamp(18px, 3vw, 34px);
  padding-top: clamp(18px, 3vw, 34px);
}

.playground-service-grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.playground-service-card {
  background:
    linear-gradient(135deg, rgba(255, 184, 0, 0.12), rgba(255, 255, 255, 0.92)),
    #fff;
  border: 1px solid var(--line);
  border-left: 8px solid var(--gold);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 260px;
  padding: clamp(22px, 3vw, 34px);
}

.playground-service-card h1 {
  color: var(--ink);
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 900;
  line-height: 1.12;
  margin: 18px 0 12px;
}

.playground-service-card p {
  color: var(--muted);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.65;
  margin: 0 0 24px;
}

.playground-service-card.is-disabled {
  opacity: 0.72;
}

.service-badge {
  align-items: center;
  background: #e8eee9;
  border-radius: 999px;
  color: var(--deep);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  min-height: 30px;
  padding: 0 12px;
}

.service-badge.ready {
  background: var(--deep);
  color: #fff;
}

.service-button {
  align-items: center;
  background: var(--gold);
  border: 2px solid #d99c00;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(255, 184, 0, 0.25);
  color: #10140f;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  text-decoration: none;
}

.service-button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

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

  .compact-quiz-lobby {
    grid-template-columns: 1fr;
  }

  .playground-map {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  .playground-service-grid {
    grid-template-columns: 1fr;
  }

  .playground-service-card {
    min-height: 0;
  }

  .world-hud,
  .playground-player-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .world-hud p {
    text-align: left;
  }

  .world-portal {
    min-height: 62px;
    width: 108px;
  }

  .world-portal strong {
    font-size: 16px;
  }

  .world-controls {
    justify-content: center;
  }
}

.playground-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  height: min(78vh, 900px);
  min-height: 620px;
  overflow: hidden;
}

.playground-shell iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.playground-world-wrap {
  background:
    linear-gradient(135deg, rgba(31, 58, 46, 0.08), rgba(255, 184, 0, 0.08)),
    #f7f8f4;
  padding-top: clamp(22px, 3vw, 36px);
}

.playground-world-layout {
  display: grid;
  gap: clamp(18px, 2.5vw, 28px);
}

.playground-map-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: clamp(14px, 2vw, 22px);
}

.world-hud {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.world-hud strong,
.world-hud span {
  display: block;
}

.world-hud strong {
  color: var(--deep);
  font-size: 22px;
  font-weight: 950;
}

.world-hud span,
.world-hud p {
  color: var(--muted);
  font-weight: 800;
}

.world-hud p {
  margin: 0;
  text-align: right;
}

.playground-map {
  aspect-ratio: 16 / 6;
  background:
    linear-gradient(90deg, transparent 49%, rgba(150, 106, 49, 0.18) 49% 54%, transparent 54%),
    linear-gradient(0deg, transparent 45%, rgba(150, 106, 49, 0.18) 45% 54%, transparent 54%),
    radial-gradient(circle at 18% 26%, #5f8f4a 0 8%, transparent 8.5%),
    radial-gradient(circle at 78% 22%, #5f8f4a 0 7%, transparent 7.5%),
    radial-gradient(circle at 84% 76%, #e0d5a8 0 11%, transparent 11.5%),
    linear-gradient(135deg, #b7d58c, #8bb970 48%, #dcb06c 49% 58%, #78a966 59%);
  border: 1px solid #b8c6b4;
  border-radius: 8px;
  min-height: 260px;
  overflow: hidden;
  position: relative;
}

.playground-map:focus {
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.2);
  outline: 0;
}

.world-portal {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(31, 58, 46, 0.3);
  border-radius: 8px;
  color: var(--deep);
  display: grid;
  gap: 2px;
  min-height: 72px;
  padding: 10px 14px;
  position: absolute;
  text-align: center;
  width: 132px;
  z-index: 2;
}

.world-portal strong {
  font-size: 18px;
  font-weight: 950;
}

.world-portal span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.world-portal.is-active,
.world-portal:hover {
  background: var(--gold);
  border-color: #d99c00;
  box-shadow: 0 14px 28px rgba(255, 184, 0, 0.28);
}

.portal-quiz {
  left: 12%;
  top: 18%;
}

.portal-omok {
  right: 16%;
  top: 22%;
}

.portal-card {
  bottom: 12%;
  left: 52%;
}

.world-character {
  align-items: center;
  background: linear-gradient(180deg, #f8d28a, #d48a3d);
  border: 3px solid #2e3a32;
  border-radius: 999px 999px 8px 8px;
  box-shadow: 0 12px 24px rgba(31, 58, 46, 0.28);
  display: flex;
  height: 54px;
  justify-content: center;
  left: 48%;
  position: absolute;
  top: 54%;
  transform: translate(-50%, -50%);
  transition: left 0.16s ease, top 0.16s ease;
  width: 42px;
  z-index: 4;
}

.world-character::before,
.world-character::after {
  background: #183427;
  border-radius: 999px;
  content: "";
  height: 5px;
  position: absolute;
  top: 17px;
  width: 5px;
}

.world-character::before {
  left: 12px;
}

.world-character::after {
  right: 12px;
}

.world-character span {
  background: #183427;
  border-radius: 999px;
  bottom: 14px;
  height: 5px;
  position: absolute;
  width: 14px;
}

.world-controls {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.world-controls div {
  display: flex;
  gap: 8px;
}

.world-controls button {
  background: #edf4f0;
  border: 1px solid #bfd6cc;
  border-radius: 8px;
  color: var(--deep);
  font-size: 18px;
  font-weight: 950;
  height: 42px;
  width: 46px;
}

.playground-game-panel {
  min-width: 0;
}

.playground-game-shell {
  display: grid;
  gap: 18px;
}

.playground-game-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.playground-game-head h1 {
  color: var(--deep);
  font-size: 48px;
  font-weight: 950;
  line-height: 1;
  margin: 0 0 8px;
}

.playground-game-head p {
  color: var(--muted);
  font-weight: 850;
  margin: 0;
}

.playground-game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.playground-game-actions a {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  min-height: 46px;
  padding: 0 16px;
  text-decoration: none;
}

.playground-game-actions .primary-link {
  background: var(--gold);
  border: 2px solid #d99c00;
  color: #10140f;
}

.playground-game-actions .ghost-button {
  background: #edf4f0;
  border: 1px solid #bfd6cc;
  color: var(--deep);
}

.playground-game-frame-wrap {
  background: #fbf8ef;
  border: 1px solid rgba(31, 58, 46, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
  height: min(860px, calc(100svh - 250px));
  min-height: 680px;
  overflow: hidden;
}

.playground-game-frame {
  background: #faf8ef;
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.playground-game-license {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.playground-player-strip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 14px 18px;
}

.playground-player-strip strong,
.playground-player-strip span {
  display: block;
}

.playground-player-strip strong {
  color: var(--deep);
  font-size: 20px;
  font-weight: 950;
}

.playground-player-strip span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.compact-quiz-lobby {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
}

.playground-quiz-wrap {
  background:
    linear-gradient(135deg, rgba(31, 58, 46, 0.05), rgba(255, 184, 0, 0.08)),
    #f7f8f4;
}

.quiz-lobby-grid {
  display: grid;
  gap: clamp(18px, 2.5vw, 28px);
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.quiz-main-stack,
.quiz-side-stack {
  display: grid;
  gap: 18px;
}

.playground-quiz-wrap .quiz-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 2.5vw, 30px);
}

.playground-quiz-wrap .card-title,
.playground-quiz-wrap .card-head,
.room-page-head,
.status-line {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.playground-quiz-wrap .card-title {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.playground-quiz-wrap .card-title span {
  align-items: center;
  background: var(--gold-soft);
  border: 1px solid #e3b33a;
  border-radius: 8px;
  color: #9a6500;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 42px;
}

.playground-quiz-wrap h1,
.playground-quiz-wrap h2 {
  color: var(--ink);
  font-weight: 900;
  line-height: 1.18;
  margin: 0;
}

.playground-quiz-wrap h1 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.playground-quiz-wrap h2 {
  font-size: clamp(20px, 2vw, 28px);
}

.player-login-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-login-actions {
  margin-top: 16px;
}

.side-card-title {
  align-items: center;
  display: flex;
  min-width: 0;
}

.playground-quiz-wrap label {
  color: var(--ink);
  display: grid;
  font-weight: 900;
  gap: 8px;
}

.playground-quiz-wrap input,
.playground-quiz-wrap select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  min-height: 50px;
  padding: 0 14px;
  width: 100%;
}

.playground-quiz-wrap input:focus,
.playground-quiz-wrap select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.16);
  outline: 0;
}

.quiz-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.playground-quiz-wrap button,
.playground-quiz-wrap .primary-link {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 46px;
  padding: 0 16px;
  text-decoration: none;
}

.playground-quiz-wrap .primary-button,
.playground-quiz-wrap .primary-link {
  background: var(--gold);
  border: 2px solid #d99c00;
  color: #10140f;
}

.playground-quiz-wrap .ghost-button,
.icon-edit-button {
  background: #edf4f0;
  border: 1px solid #bfd6cc;
  color: var(--deep);
}

.playground-quiz-wrap .danger-button {
  background: #ef4444;
  color: #fff;
}

.playground-quiz-wrap button:disabled,
.playground-quiz-wrap select:disabled,
.playground-quiz-wrap input:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.playground-quiz-wrap .notice {
  background: #fff7dd;
  border: 1px solid #e3b33a;
  border-radius: 8px;
  color: #6e4a00;
  font-weight: 800;
  line-height: 1.55;
  margin: 18px 0 0;
  padding: 12px 14px;
}

.playground-quiz-wrap .notice.error {
  background: #fff1f1;
  border-color: #f2a1a1;
  color: #a91b1b;
}

.playground-quiz-wrap .notice.compact {
  font-size: 14px;
  margin-top: 12px;
}

.quiz-builder-list {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.quiz-builder-row {
  align-items: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1.3fr) minmax(160px, 0.8fr) auto;
  padding: 12px;
}

.quiz-builder-row > strong {
  align-items: center;
  background: var(--deep);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  margin-bottom: 8px;
  width: 34px;
}

.quiz-builder-row .ghost-button {
  min-height: 50px;
}

.room-list,
.players,
.quiz-stats-list,
.hall-list,
.final-ranking {
  display: grid;
  gap: 10px;
}

.room-item,
.player-row,
.stat-row,
.hall-row,
.ranking-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
  text-align: left;
}

.room-item:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 24px rgba(255, 184, 0, 0.14);
}

.room-item strong,
.player-row strong,
.stat-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.room-item span span,
.player-row span span,
.stat-row em {
  color: var(--muted);
  display: block;
  font-size: 14px;
  font-style: normal;
  margin-top: 4px;
}

.stat-row button {
  background: #f5eeee;
  border: 1px solid #ebc0c0;
  color: #b42323;
  min-height: 38px;
}

.quiz-profile {
  display: grid;
  gap: 14px;
}

.profile-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 184, 0, 0.22), rgba(31, 58, 46, 0.08)),
    #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 16px;
}

.profile-hero strong {
  color: var(--deep);
  font-size: 24px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.profile-hero span {
  background: var(--deep);
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  padding: 8px 12px;
}

.profile-meter {
  background: #e7ece8;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.profile-meter span {
  background: linear-gradient(90deg, var(--gold), #ff7a1a);
  display: block;
  height: 100%;
  min-width: 8%;
}

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

.profile-grid span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.profile-grid strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.profile-grid em,
.profile-equip {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.profile-equip {
  margin: 0;
}

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

.hall-grid h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.hall-row {
  grid-template-columns: 34px minmax(0, 1fr);
}

.hall-row > strong {
  align-items: center;
  background: var(--deep);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.room-page-head {
  margin-bottom: 18px;
}

.room-title-line {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.room-title-line h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.room-code-line {
  color: var(--muted);
  font-weight: 850;
  margin: 8px 0 0;
}

.room-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr);
}

.question-card {
  min-height: 430px;
}

.status-line {
  margin-bottom: 20px;
}

.status-line span,
.progress {
  color: #b87300;
  font-weight: 900;
}

.status-line strong {
  background: var(--deep);
  border-radius: 999px;
  color: #fff;
  min-width: 70px;
  padding: 8px 12px;
  text-align: center;
}

.waiting-panel,
.question-panel,
.result-panel {
  display: grid;
  gap: 16px;
}

.waiting-panel[hidden],
.question-panel[hidden],
.result-panel[hidden],
.playground-quiz-wrap [hidden] {
  display: none !important;
}

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

.choice-button {
  background: #fff;
  border: 1px solid var(--line) !important;
  color: var(--ink);
  min-height: 76px;
  text-align: left;
}

.choice-button.selected {
  border-color: var(--gold) !important;
  background: var(--gold-soft);
}

.choice-button.correct {
  border-color: #1f9d58 !important;
  background: #e9f8ef;
}

.choice-button.wrong {
  border-color: #dc2626 !important;
  background: #fff1f1;
}

.answer-feedback,
.score {
  color: var(--deep);
  font-weight: 900;
}

.host-pill,
.answered-pill {
  background: #e7f2ee;
  border-radius: 999px;
  color: var(--deep);
  display: inline-flex;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  margin-right: 4px;
  padding: 4px 8px;
}

.room-options {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
}

.selected-quiz-name {
  background: #f7faf6;
  border: 1px dashed #bfd6cc;
  border-radius: 8px;
  color: var(--deep);
  font-weight: 900;
  margin: -4px 0 0;
  padding: 10px 12px;
}

.empty {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
}

@media (max-width: 1080px) {
  .quiz-lobby-grid,
  .room-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .player-login-grid,
  .hall-grid,
  .choices,
  .quiz-builder-row {
    grid-template-columns: 1fr;
  }

  .quiz-builder-row > strong {
    margin-bottom: 0;
  }

  .playground-quiz-wrap .card-head,
  .room-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.front-section {
  padding-top: clamp(42px, 6vw, 72px);
}

.muted {
  background: #eef3f1;
}

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

.section-heading span {
  color: var(--deep);
  font-size: 22px;
  font-weight: 900;
}

.article-list {
  display: grid;
  gap: 14px;
}

.article-item,
.news-row,
.region-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.article-item:hover,
.news-row:hover,
.region-card:hover,
.tool-card:hover,
.board-row:hover {
  border-color: rgba(31, 58, 46, 0.26);
  box-shadow: 0 13px 34px rgba(17, 24, 20, 0.10);
  transform: translateY(-1px);
}

.article-item {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 138px minmax(0, 1fr);
  padding: 20px;
}

.source-badge {
  align-items: center;
  background: var(--deep);
  border-radius: 9px;
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  text-align: center;
}

.article-thumb {
  display: block;
}

.article-thumb img {
  aspect-ratio: 4 / 3;
  border-radius: 9px;
}

.article-item h3,
.news-row h3 {
  color: var(--ink);
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.32;
  margin-bottom: 10px;
}

.news-list {
  display: grid;
  gap: 16px;
}

.news-row {
  padding: clamp(20px, 3vw, 30px);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.board-write-button {
  justify-self: start;
  margin-top: 4px;
  text-decoration: none;
}

.compact-board-title {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding-bottom: clamp(24px, 3.6vw, 44px);
  padding-top: clamp(24px, 3.6vw, 44px);
}

.board-hub-band {
  padding-bottom: 30px;
}

.board-community-band,
.board-detail-band {
  padding-top: clamp(22px, 3vw, 38px);
}

.board-community-layout,
.board-detail-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(240px, 310px);
}

.board-detail-layout {
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) minmax(220px, 280px);
}

.board-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 118px;
}

.board-side-card,
.board-category-nav {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.board-stats-card {
  background:
    linear-gradient(135deg, rgba(31, 58, 46, 0.96), rgba(47, 93, 80, 0.95)),
    var(--deep);
  color: #fff;
}

.board-stats-card span,
.board-side-card > span,
.board-side-head span {
  color: #b87300;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}

.board-stats-card span {
  color: rgba(255, 255, 255, 0.72);
}

.board-stats-card strong {
  color: var(--gold);
  display: block;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.board-stats-card em {
  color: rgba(255, 255, 255, 0.82);
  display: block;
  font-style: normal;
  font-weight: 900;
  margin-top: 8px;
}

.board-category-nav {
  display: grid;
  gap: 8px;
}

.board-category-link {
  border: 1px solid transparent;
  border-radius: 12px;
  color: inherit;
  display: grid;
  gap: 3px;
  padding: 12px;
  text-decoration: none;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.board-category-link:hover,
.board-category-link.active {
  background: var(--gold-soft);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.board-category-link span {
  color: #b87300;
  font-size: 12px;
  font-weight: 900;
}

.board-category-link strong {
  color: var(--deep);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.board-category-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.board-prompt-card strong,
.board-feature-card strong,
.board-side-head strong {
  color: var(--deep);
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
}

.board-prompt-card p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
  margin: 8px 0 0;
}

.board-feed {
  min-width: 0;
}

.board-feed-head {
  align-items: end;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.board-feed-head h2 {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.08;
  margin: 0;
}

.section-heading h2 {
  font-size: clamp(30px, 3.7vw, 54px);
}

.board-feed-head .eyebrow {
  margin-bottom: 7px;
}

.board-feed-head > span {
  background: var(--deep);
  border-radius: 999px;
  color: #fff;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  padding: 8px 12px;
}

.board-search-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-bottom: 14px;
  padding: 12px;
}

.board-search-form input {
  border: 1px solid #cfd8d2;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 15px;
}

.board-search-form button,
.board-search-form a {
  align-items: center;
  background: var(--deep);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  text-decoration: none;
}

.board-search-form a {
  background: var(--gold-soft);
  color: var(--deep);
}

.board-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.board-keyword-list a {
  background: #f5fbf2;
  border: 1px solid #c7d9ce;
  border-radius: 999px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 900;
  padding: 7px 10px;
}

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

.board-category-card {
  background:
    linear-gradient(135deg, rgba(255, 184, 0, 0.16), rgba(255, 255, 255, 0) 42%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: inherit;
  display: grid;
  gap: 8px;
  min-height: 220px;
  padding: clamp(20px, 3vw, 30px);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.board-category-card:hover,
.board-category-card.active {
  border-color: var(--gold);
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.board-category-card span {
  color: #b87300;
  font-size: 13px;
  font-weight: 900;
}

.board-category-card strong {
  color: var(--deep);
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 900;
  line-height: 1.15;
}

.board-category-card p {
  color: var(--muted);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.55;
  margin: 0;
}

.board-category-card em {
  align-self: end;
  color: var(--deep);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
  margin-top: 12px;
}

.board-list {
  display: grid;
  gap: 14px;
}

.board-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.board-row:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.board-row-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  padding: 0;
}

.board-row-main {
  color: inherit;
  display: grid;
  gap: 8px;
  padding: clamp(18px, 2.3vw, 24px);
  text-decoration: none;
}

.board-row-author {
  align-items: start;
  display: flex;
  justify-content: flex-end;
  padding: clamp(18px, 2.3vw, 24px);
}

.board-row em,
.comment-row span {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.board-row strong {
  color: var(--ink);
  font-size: clamp(21px, 2vw, 30px);
  font-weight: 900;
  line-height: 1.25;
}

.board-row p {
  color: #3b4842;
  display: -webkit-box;
  line-height: 1.62;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.board-mini-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.board-mini-list a {
  border: 1px solid var(--line);
  border-radius: 11px;
  color: inherit;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  text-decoration: none;
}

.board-mini-list a:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.board-mini-list strong {
  color: var(--ink);
  display: -webkit-box;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.board-mini-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.board-feature-card ul {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.65;
  margin: 8px 0 0;
  padding-left: 18px;
}

.board-detail-band .article-page {
  padding: 0;
}

.board-owner-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.board-owner-actions form {
  margin: 0;
}

.author-activity-button {
  background: #eef6f1;
  border: 1px solid #c7d9ce;
  border-radius: 999px;
  color: var(--deep);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px;
}

.author-activity-button:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.board-detail-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.rich-text-block,
.comment-editor-card,
.board-editor-card,
.board-editor-guide {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.board-content p {
  color: #26332d;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.9;
  margin: 0;
  white-space: pre-wrap;
  word-break: keep-all;
}

.comment-list {
  display: grid;
  gap: 12px;
}

.comment-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.comment-row div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-row strong {
  color: var(--deep);
  font-weight: 900;
}

.comment-row p {
  color: #26332d;
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
  word-break: keep-all;
}

.comment-form {
  margin-top: 20px;
}

.comment-editor-card {
  padding: 20px;
}

.board-activity-modal[hidden] {
  display: none;
}

.board-activity-modal {
  inset: 0;
  position: fixed;
  z-index: 300;
}

.board-activity-backdrop {
  background: rgba(17, 24, 20, 0.58);
  inset: 0;
  position: absolute;
}

.board-activity-card {
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
  display: grid;
  gap: 14px;
  left: 50%;
  max-height: min(760px, calc(100vh - 42px));
  max-width: 860px;
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100vw - 28px), 860px);
}

.board-activity-close {
  align-items: center;
  background: var(--deep);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: grid;
  font-size: 28px;
  font-weight: 700;
  height: 42px;
  line-height: 1;
  place-items: center;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
}

.board-activity-card .eyebrow {
  color: #b87300;
  font-size: 13px;
  font-weight: 900;
  margin: 0;
}

.board-activity-card h2 {
  color: var(--deep);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin: 0;
  padding-right: 46px;
}

.board-activity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.board-activity-tabs button,
.board-activity-pagination button {
  background: #eef6f1;
  border: 1px solid #c7d9ce;
  border-radius: 999px;
  color: var(--deep);
  cursor: pointer;
  font-weight: 900;
  padding: 9px 14px;
}

.board-activity-tabs button.active,
.board-activity-pagination button.active {
  background: var(--gold);
  border-color: #d99d00;
  color: #000;
}

.board-activity-results {
  display: grid;
  gap: 10px;
}

.board-activity-item {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  display: grid;
  gap: 6px;
  padding: 16px;
}

.board-activity-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.board-activity-item strong {
  color: var(--deep);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
}

.board-activity-item p {
  color: #3b4842;
  display: -webkit-box;
  line-height: 1.58;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: pre-wrap;
}

.board-activity-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-top: 4px;
}

.login-required-box {
  background: #fff8df;
  border: 1px solid #f1d27b;
  border-radius: 12px;
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 18px;
}

.login-required-box strong {
  color: var(--deep);
  font-size: 18px;
  font-weight: 900;
}

.login-required-box p {
  color: var(--muted);
  margin: 0;
}

.news-row-image {
  display: block;
  margin-bottom: 16px;
  max-width: 420px;
}

.news-row-image img {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
}

.news-row:hover,
.article-item:hover,
.region-card:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.news-excerpt {
  color: #3b4842;
  display: -webkit-box;
  font-size: 16px;
  line-height: 1.72;
  margin-bottom: 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.region-chip,
.status-pill {
  background: var(--gold-soft);
  border: 1px solid #f1d27b;
  border-radius: 999px;
  color: #6e4300;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  padding: 7px 12px;
}

.region-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.region-card {
  display: grid;
  gap: 7px;
  min-height: 136px;
  padding: 20px;
}

.region-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.region-card strong {
  color: var(--deep);
  font-size: 24px;
  line-height: 1.2;
}

.region-card em {
  color: var(--danger);
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.region-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.transaction-region-section + .transaction-region-section {
  margin-top: 40px;
}

.transaction-region-section h3 {
  color: var(--deep);
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 16px;
}

.compact-regions {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

.compact-regions .region-card {
  min-height: 126px;
}

.transaction-filter {
  display: grid;
  gap: 12px;
  grid-template-columns: 250px minmax(240px, 1fr) auto;
  margin-top: 28px;
  max-width: 900px;
}

.transaction-filter select,
.transaction-filter input {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  min-height: 58px;
  min-width: 0;
  outline: 0;
  padding: 14px 16px;
}

.transaction-filter select:focus,
.transaction-filter input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.2);
}

.transaction-filter button,
.large-search button,
.source-button {
  background: var(--gold);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #000;
  cursor: pointer;
  font-weight: 900;
  padding: 14px 24px;
}

.transaction-filter button {
  min-height: 58px;
}

.period-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.period-actions a {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--deep);
  font-size: 15px;
  font-weight: 900;
  padding: 9px 14px;
}

.period-actions a.active {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}

.search-help {
  color: var(--green);
  font-size: 15px;
  font-weight: 800;
  margin: 14px 0 0;
}

.search-help strong {
  color: var(--deep);
  font-weight: 900;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: auto;
  max-height: min(72vh, 760px);
}

table {
  border-collapse: collapse;
  min-width: 760px;
  overflow: hidden;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: var(--deep);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  background: #fff;
  color: #25312c;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

tbody tr:hover td {
  background: #fff9e8;
}

.transaction-table td:nth-child(3) {
  color: var(--ink);
  font-weight: 900;
}

.transaction-table td:last-child {
  color: var(--danger);
  font-weight: 900;
}

.article-page {
  margin: 0 auto;
  max-width: 1020px;
  padding-bottom: clamp(50px, 6vw, 92px);
  padding-top: clamp(42px, 6vw, 78px);
}

.article-page h1 {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 18px;
  word-break: keep-all;
}

.article-image {
  margin: 24px 0 28px;
}

.article-image.image-load-failed {
  background: #fff8df;
  border: 1px solid #f1d27b;
  border-radius: 12px;
  display: block;
  margin: 14px 0 18px;
  padding: 12px 14px;
}

.article-image.image-load-failed img,
.article-image.image-load-failed figcaption {
  display: none;
}

.image-fallback-message {
  color: #6e4300;
  display: none;
  font-size: 14px;
  font-weight: 900;
  margin: 0;
}

.article-image.image-load-failed .image-fallback-message {
  display: block;
}

.article-image img {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  max-height: 520px;
}

.article-image figcaption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-top: 8px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 0;
}

.article-summary {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 8px solid var(--gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-top: 30px;
  padding: clamp(22px, 3vw, 34px);
}

.article-summary h2 {
  color: var(--deep);
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

.article-summary p {
  color: #26332d;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.82;
  margin: 0;
}

.source-card {
  align-items: center;
  background: var(--deep);
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  color: white;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 28px;
  padding: 24px;
}

.source-card span {
  color: var(--gold);
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 5px;
}

.source-card strong {
  display: block;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.source-card p {
  color: #d8e2dd;
  font-size: 15px;
  margin: 8px 0 0;
}

.source-button {
  flex: 0 0 auto;
}

.related-news {
  margin-top: 46px;
}

.news-list.compact .news-row {
  padding: 18px;
}

.large-search {
  margin-top: 26px;
}

.recent-searches {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-width: 980px;
}

.recent-searches > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

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

.recent-search-chip {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--deep);
  font-size: 14px;
  font-weight: 900;
  padding: 8px 12px;
}

.recent-search-chip:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.18);
}

.tools-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tool-card {
  background: var(--panel);
  border: 2px solid var(--line-strong);
  border-top: 3px solid var(--deep);
  border-left: 8px solid var(--gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  min-height: 180px;
  padding: 24px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.tool-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.tool-card-main {
  display: grid;
  gap: 8px;
}

.tool-card span {
  color: #b86b00;
  font-size: 14px;
  font-weight: 900;
}

.tool-card strong {
  color: var(--deep);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
}

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

.favorite-button,
.auth-form button,
.calculator-form button,
.stamp-controls button {
  background: var(--gold);
  border: 2px solid #d99d00;
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(255, 184, 0, 0.32);
  color: #000;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  padding: 10px 16px;
}

.favorite-button.active {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}

.inline-favorite {
  margin-top: 18px;
}

.auth-form,
.calculator-form,
.board-form,
.comment-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
  max-width: 760px;
}

.board-editor-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
}

.board-editor-card {
  gap: 18px;
  margin-top: 0;
  max-width: none;
  padding: clamp(20px, 3vw, 30px);
}

.board-editor-guide {
  display: grid;
  gap: 10px;
  padding: clamp(20px, 3vw, 28px);
  position: sticky;
  top: 120px;
}

.board-editor-guide span {
  color: #b87300;
  font-size: 13px;
  font-weight: 900;
}

.board-editor-guide strong {
  color: var(--deep);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.25;
}

.board-editor-guide p,
.board-editor-guide li {
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.65;
}

.board-editor-guide p,
.board-editor-guide ul {
  margin: 0;
}

.board-editor-guide ul {
  padding-left: 18px;
}

.inline-check-field {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.inline-check-field button {
  background: var(--deep);
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
}

.field-help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field-help.is-success {
  color: #157347;
}

.field-help.is-error {
  color: var(--danger);
}

.auth-popup .site-header,
.auth-popup .search-panel,
.auth-popup .menu-panel,
.auth-popup .site-footer {
  display: none;
}

.auth-popup main {
  min-height: 100vh;
}

.auth-popup .page-title {
  min-height: 100vh;
  padding: 34px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.auth-links a {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--deep);
  font-weight: 900;
  padding: 9px 13px;
}

.article-title-row {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.article-title-row h1 {
  flex: 1;
}

.danger-button {
  background: var(--danger);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  margin-top: 8px;
  padding: 10px 15px;
  white-space: nowrap;
}

.admin-actions-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-action-card {
  background: var(--panel);
  border: 2px solid var(--line-strong);
  border-left: 8px solid var(--gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  padding: 24px;
}

.admin-action-card span {
  color: #b86b00;
  font-size: 14px;
  font-weight: 900;
}

.admin-action-card strong {
  color: var(--deep);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.admin-action-card p {
  color: var(--muted);
  margin: 0;
}

.admin-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-card-actions form {
  margin: 0;
}

.admin-link-button {
  background: var(--panel);
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  color: var(--deep);
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  justify-content: center;
  padding: 10px 16px;
  text-decoration: none;
}

.admin-link-button:hover {
  border-color: var(--gold);
  color: #b86b00;
}

.task-progress-panel {
  background: #f6fbf8;
  border: 1px solid #cfe1d7;
  border-radius: 10px;
  display: grid;
  gap: 9px;
  padding: 14px;
}

.task-progress-panel.is-idle {
  background: #faf8ef;
}

.task-progress-panel.is-complete {
  border-color: #85c49e;
}

.task-progress-panel.is-failed {
  background: #fff1f1;
  border-color: #f2b9b2;
}

.task-progress-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.task-progress-header span {
  color: #577165;
  font-size: 13px;
  font-weight: 900;
}

.task-progress-header strong {
  color: var(--deep);
  font-size: 18px;
}

.task-progress-meter {
  background: #e6eee9;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.task-progress-meter span {
  background: linear-gradient(90deg, var(--gold), #ff7a1a);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.25s ease;
  width: 0;
}

.task-progress-panel.is-complete .task-progress-meter span {
  background: linear-gradient(90deg, #35a867, #73c77f);
}

.task-progress-panel.is-failed .task-progress-meter span {
  background: var(--danger);
}

.task-progress-panel p {
  color: var(--deep);
  font-size: 14px;
  font-weight: 900;
}

.task-progress-panel small {
  color: var(--muted);
  font-weight: 800;
}

.schedule-panel {
  background: #f6fbf8;
  border: 1px solid #cfe1d7;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
}

.schedule-panel div {
  display: grid;
  gap: 4px;
}

.schedule-panel span {
  color: #577165;
  font-size: 12px;
}

.schedule-panel strong {
  color: var(--deep);
  font-size: 16px;
  line-height: 1.25;
}

.schedule-panel p {
  color: #577165;
  font-size: 13px;
  font-weight: 800;
  grid-column: 1 / -1;
}

.schedule-panel.is-stale {
  background: #fff7e8;
  border-color: #f0b84d;
}

.schedule-panel.is-stale p {
  color: #b86b00;
}

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

.automation-summary article {
  background: #f6fbf8;
  border: 1px solid #cfe1d7;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 16px;
}

.automation-summary.is-stale article {
  background: #fff7e8;
  border-color: #f0b84d;
}

.automation-summary span {
  color: #577165;
  font-size: 13px;
  font-weight: 900;
}

.automation-summary strong {
  color: var(--deep);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.automation-summary p {
  color: #b86b00;
  font-weight: 900;
  margin: 0;
}

.upcoming-runs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.upcoming-runs span,
.log-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 10px;
}

.upcoming-runs span {
  background: #eef6f1;
  color: var(--deep);
}

.log-status.is-success {
  background: #e9f7ef;
  color: #157347;
}

.log-status.is-failed {
  background: #fff1f1;
  color: var(--danger);
}

.admin-log-actions {
  margin-top: 18px;
}

.progress-modal[hidden] {
  display: none;
}

.progress-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 100;
}

.progress-modal-backdrop {
  background: rgba(13, 35, 27, 0.62);
  inset: 0;
  position: absolute;
}

.progress-modal-card {
  background:
    linear-gradient(135deg, rgba(255, 184, 0, 0.16), rgba(255, 255, 255, 0)),
    var(--panel);
  border: 2px solid var(--gold);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  color: var(--ink);
  max-width: 520px;
  padding: 28px;
  position: relative;
  width: min(100%, 520px);
}

.progress-modal-kicker {
  color: #b86b00;
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.progress-modal-card h2 {
  color: var(--deep);
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 8px;
}

.progress-modal-card p {
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 20px;
}

.progress-meter {
  background: #e6eee9;
  border-radius: 999px;
  height: 16px;
  overflow: hidden;
}

.progress-meter span {
  background: linear-gradient(90deg, var(--gold), #ff7a1a);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.18s ease;
  width: 0;
}

.progress-modal-card strong {
  color: var(--deep);
  display: block;
  font-size: 34px;
  font-weight: 900;
  margin-top: 14px;
}

.progress-modal-card small {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin-top: 8px;
}

body.modal-open {
  overflow: hidden;
}

.auth-form label {
  color: var(--deep);
  display: grid;
  font-size: 14px;
  font-weight: 900;
  gap: 7px;
}

.auth-form label span {
  padding-left: 4px;
}

.auth-form input,
.calculator-form input,
.board-form input,
.board-form select,
.board-form textarea,
.comment-form textarea,
.stamp-controls input {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  min-height: 54px;
  outline: 0;
  padding: 12px 14px;
  width: 100%;
}

.board-form textarea,
.comment-form textarea {
  line-height: 1.85;
  resize: vertical;
}

.board-form textarea {
  min-height: 420px;
}

.comment-form textarea {
  min-height: 150px;
}

.board-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--deep) 50%), linear-gradient(135deg, var(--deep) 50%, transparent 50%);
  background-position: calc(100% - 18px) 23px, calc(100% - 12px) 23px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}

.board-form input:focus,
.board-form select:focus,
.board-form textarea:focus,
.comment-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.18);
}

.auth-form input[readonly] {
  background: #edf2ef;
  color: var(--muted);
}

.calculator-form label,
.board-form label,
.comment-form label,
.stamp-controls label {
  color: var(--deep);
  display: grid;
  font-size: 15px;
  font-weight: 900;
  gap: 6px;
}

.board-form button,
.comment-form button {
  background: var(--gold);
  border: 2px solid #d99d00;
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(255, 184, 0, 0.32);
  color: #000;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  padding: 10px 16px;
}

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

.favorite-row {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.result-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 22px;
}

.result-grid div {
  background: var(--deep);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: white;
  padding: 22px;
}

.result-grid span {
  color: #d8e2dd;
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.result-grid strong {
  color: var(--gold);
  display: block;
  font-size: 34px;
  font-weight: 900;
  margin-top: 6px;
}

.ranking-list,
.timeline-list {
  display: grid;
  gap: 12px;
}

.ranking-list a,
.timeline-list article {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  padding: 16px 18px;
}

.ranking-list strong {
  align-items: center;
  background: var(--deep);
  border-radius: 999px;
  color: var(--gold);
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.ranking-list span,
.timeline-list h3 {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  margin: 0;
}

.ranking-list em,
.timeline-list time {
  color: #b86b00;
  font-style: normal;
  font-weight: 900;
}

.stamp-layout {
  display: grid;
  gap: 28px;
  grid-template-columns: 320px minmax(280px, 520px);
}

.stamp-controls {
  display: grid;
  gap: 14px;
}

.stamp-preview {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.stamp-preview canvas {
  display: block;
  height: auto;
  max-width: 100%;
}

.lotto-hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 184, 0, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(31, 58, 46, 0.09), rgba(255, 122, 26, 0.12));
}

.tool-page-title.lotto-hero {
  background: linear-gradient(135deg, rgba(31, 58, 46, 0.06), rgba(255, 184, 0, 0.08));
}

.lotto-machine {
  background:
    linear-gradient(145deg, rgba(31, 58, 46, 0.96), rgba(12, 30, 23, 0.96)),
    var(--deep);
  border: 3px solid var(--gold);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(13, 35, 27, 0.28);
  color: #fff;
  margin: 0 auto;
  max-width: 920px;
  overflow: hidden;
  padding: clamp(24px, 5vw, 44px);
  position: relative;
  text-align: center;
}

.lotto-machine::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  content: "";
  height: 100%;
  left: -40%;
  position: absolute;
  top: 0;
  transform: skewX(-18deg);
  width: 36%;
}

.lotto-machine.drawing::before {
  animation: lottoShine 1.1s ease infinite;
}

.lotto-display {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 18px);
  justify-content: center;
  min-height: 132px;
  padding: 24px;
}

.lotto-ball {
  align-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.18) 21%, transparent 22%),
    linear-gradient(145deg, #f6cf52, #c48a00);
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  box-shadow: inset -8px -10px 16px rgba(0, 0, 0, 0.18), 0 10px 18px rgba(0, 0, 0, 0.2);
  color: #fff !important;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  height: clamp(58px, 8vw, 82px);
  justify-content: center;
  line-height: 1;
  position: relative;
  -webkit-text-stroke: 1px rgba(10, 24, 18, 0.9);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  width: clamp(58px, 8vw, 82px);
}

.lotto-ball.placeholder {
  background: linear-gradient(145deg, #eef3f1, #cbd8d2);
  color: var(--muted);
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.ball-1 { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.95), transparent 22%), linear-gradient(145deg, #ffd84f, #b77e00); }
.ball-2 { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 22%), linear-gradient(145deg, #55b4ff, #075da8); }
.ball-3 { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 22%), linear-gradient(145deg, #ff755f, #c81c0b); }
.ball-4 { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 22%), linear-gradient(145deg, #93a0ad, #303b46); }
.ball-5 { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 22%), linear-gradient(145deg, #70d65c, #137927); }

.lotto-machine.drawing .lotto-ball {
  animation: lottoBounce 0.34s ease infinite alternate;
}

.lotto-pick-analysis {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 184, 0, 0.52);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(31, 58, 46, 0.04), 0 18px 38px rgba(7, 19, 14, 0.18);
  color: var(--deep);
  margin-top: 18px;
  padding: clamp(16px, 3vw, 24px);
  text-align: left;
}

.lotto-pick-analysis.is-empty {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.lotto-pick-analysis-head {
  align-items: end;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.lotto-pick-analysis-head span {
  color: #b87300;
  font-size: 13px;
  font-weight: 900;
}

.lotto-pick-analysis-head strong {
  color: var(--deep);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 950;
}

.lotto-pick-analysis.is-empty .lotto-pick-analysis-head strong,
.lotto-pick-analysis.is-empty .lotto-pick-analysis-head span {
  color: rgba(255, 255, 255, 0.82);
}

.lotto-pick-frequency-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(82px, 1fr));
}

.lotto-pick-frequency-grid > p {
  font-weight: 850;
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
}

.lotto-pick-frequency-card {
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f5faf7);
  border: 1px solid #d9e6df;
  border-radius: 14px;
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 0;
  padding: 12px 8px;
  text-align: center;
}

.lotto-pick-frequency-card .lotto-ball {
  font-size: 24px;
  height: 58px;
  width: 58px;
}

.lotto-pick-frequency-card strong {
  color: #b34b00;
  font-size: 22px;
  font-weight: 950;
}

.lotto-pick-frequency-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.lotto-draw-form {
  margin-top: 26px;
}

.lotto-draw-button {
  background: linear-gradient(135deg, var(--gold), #ff7a1a);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(255, 184, 0, 0.38);
  color: #111;
  cursor: pointer;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 900;
  padding: 16px 34px;
}

.lotto-draw-button:disabled {
  cursor: wait;
  opacity: 0.88;
}

.lotto-note {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  margin-top: 14px;
}

.lotto-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.lotto-action-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.lotto-action-tabs a {
  background: var(--deep);
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  padding: 11px 15px;
}

.lotto-winning-list {
  display: grid;
  gap: 12px;
}

.lotto-winning-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(150px, 0.25fr) 1fr;
  padding: 16px 18px;
}

.lotto-winning-row strong {
  color: var(--deep);
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.lotto-winning-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.winning-balls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lotto-plus {
  color: var(--deep);
  font-size: 24px;
  font-weight: 900;
  margin: 0 2px;
}

.lotto-stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.lotto-stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.lotto-stat-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.lotto-stat-head .lotto-ball {
  font-size: 21px;
  height: 56px;
  width: 56px;
}

.lotto-stat-head strong {
  color: var(--deep);
  font-size: 22px;
  font-weight: 900;
}

.lotto-stat-meter {
  background: #edf2ef;
  border-radius: 999px;
  height: 10px;
  margin: 12px 0;
  overflow: hidden;
}

.lotto-stat-meter i {
  background: linear-gradient(90deg, var(--gold), #ff7a1a);
  display: block;
  height: 100%;
}

.lotto-stat-card details {
  color: var(--deep);
  font-size: 13px;
  font-weight: 900;
}

.lotto-stat-card summary {
  cursor: pointer;
}

.lotto-stat-draws {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: 130px;
  overflow: auto;
}

.lotto-stat-draws a,
.lotto-stat-draws span {
  background: #f5fbf2;
  border: 1px solid #d9e6df;
  border-radius: 8px;
  color: var(--deep);
  padding: 7px 8px;
}

.lotto-stat-draws a span {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0;
}

.lotto-tabs a {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--deep);
  font-weight: 900;
  padding: 10px 15px;
}

.lotto-tabs a.active {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}

.lotto-history {
  display: grid;
  gap: 14px;
}

.lotto-history[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.lotto-history-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(170px, 0.3fr) minmax(230px, max-content);
  justify-content: space-between;
  padding: 18px;
}

.lotto-history-row strong,
.lotto-history-row span {
  display: block;
}

.lotto-history-row strong {
  color: var(--deep);
  font-weight: 900;
}

.lotto-history-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  margin-top: 4px;
}

.lotto-mini-balls {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 64px);
  justify-content: end;
}

.lotto-mini-balls .lotto-ball {
  align-items: center;
  display: flex;
  font-size: 24px;
  height: 64px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0;
  text-align: center;
  width: 64px;
}

.lotto-mini-balls.winning-balls {
  align-items: center;
  display: flex;
  grid-template-columns: none;
  justify-content: flex-end;
}

.lotto-mini-balls.winning-balls .lotto-ball {
  height: 58px;
  width: 58px;
}

@keyframes lottoBounce {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-9px) rotate(3deg); }
}

@keyframes lottoShine {
  from { left: -40%; }
  to { left: 110%; }
}

.short-url-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-top: 28px;
  max-width: 980px;
}

.short-url-form input {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  min-height: 58px;
  min-width: 0;
  outline: 0;
  padding: 14px 16px;
}

.short-url-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.2);
}

.short-url-form button {
  background: var(--gold);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #000;
  cursor: pointer;
  font-weight: 900;
  min-height: 58px;
  padding: 14px 24px;
}

.tool-search-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-bottom: 26px;
  max-width: 900px;
}

.tool-search-form input {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  min-height: 56px;
  min-width: 0;
  outline: 0;
  padding: 13px 16px;
}

.tool-search-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.18);
}

.tool-search-form button {
  background: var(--deep);
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  min-height: 56px;
  padding: 13px 22px;
}

.tool-form-wide {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: 980px;
}

.tool-form-wide button {
  justify-self: start;
}

.tool-note {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  margin-top: 18px;
}

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

.section-heading.compact {
  margin-bottom: 12px;
}

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

.tool-list a,
.glossary-card,
.checklist-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  display: grid;
  gap: 7px;
  padding: 18px;
}

.tool-list a strong {
  color: var(--deep);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.tool-list a span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.interest-search-band {
  background:
    linear-gradient(135deg, rgba(31, 58, 46, 0.07), rgba(255, 184, 0, 0.11)),
    var(--bg);
}

.interest-search-form {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-width: 980px;
  padding: 10px;
}

.interest-search-form input {
  background: #f6faf8;
  border-color: transparent;
  border-radius: 12px;
}

.interest-search-form button {
  background: linear-gradient(135deg, var(--deep), #2f5d50);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(31, 58, 46, 0.2);
}

.interest-keyword-chips {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -10px 0 28px;
  min-height: 34px;
}

.interest-keyword-chip {
  align-items: center;
  background: #fff8df;
  border: 1px solid #f1c85d;
  border-radius: 999px;
  display: inline-flex;
  gap: 5px;
  overflow: hidden;
}

.interest-keyword-chip a {
  color: var(--deep);
  font-size: 14px;
  font-weight: 900;
  padding: 8px 4px 8px 12px;
}

.interest-keyword-chip button {
  align-items: center;
  background: #e53935;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  margin-right: 7px;
  padding: 0;
  width: 22px;
}

.keyword-chip-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.interest-result-list {
  gap: 14px;
}

.tool-list a.interest-result-card {
  border-width: 2px;
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
}

.tool-list a.interest-result-card::before {
  border-radius: 999px;
  content: "";
  height: 10px;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 10px;
}

.tool-list a.news-card {
  background: linear-gradient(135deg, rgba(255, 248, 223, 0.82), rgba(255, 255, 255, 0.96));
  border-color: #ffc44f;
}

.tool-list a.news-card::before {
  background: var(--gold);
}

.tool-list a.transaction-card {
  background: linear-gradient(135deg, rgba(237, 248, 242, 0.9), rgba(255, 255, 255, 0.96));
  border-color: #70b58a;
}

.tool-list a.transaction-card::before {
  background: #2f9d57;
}

.tool-list a.interest-result-card:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.trend-chart {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
  max-width: 980px;
}

.trend-alert {
  background: #fff8df;
  border: 1px solid var(--gold);
  border-left: 6px solid var(--gold);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 5px;
  margin: 18px 0;
  max-width: 980px;
  padding: 16px 18px;
}

.trend-alert.down {
  background: #f4f8ff;
  border-color: #9bb8ef;
  border-left-color: #4568c8;
}

.trend-alert span {
  color: #b87300;
  font-size: 13px;
  font-weight: 900;
}

.trend-alert.down span {
  color: #365da8;
}

.trend-alert strong {
  color: var(--deep);
  font-size: 20px;
  font-weight: 900;
}

.trend-alert p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  margin: 0;
}

.trend-visual-card {
  background:
    linear-gradient(135deg, rgba(31, 58, 46, 0.06), rgba(255, 184, 0, 0.1)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  max-width: 980px;
  padding: clamp(18px, 3vw, 28px);
}

.trend-svg {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: block;
  height: auto;
  min-height: 260px;
  width: 100%;
}

.trend-svg line {
  stroke: #9fb0a7;
  stroke-width: 3;
}

.trend-svg line.grid {
  stroke: #e0e8e3;
  stroke-width: 2;
}

.trend-svg polyline {
  fill: none;
  stroke: #ff9f1a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.trend-svg circle {
  fill: var(--deep);
  stroke: var(--gold);
  stroke-width: 5;
}

.trend-svg text {
  fill: var(--deep);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 900;
}

.trend-svg text.amount {
  font-size: 25px;
}

.trend-svg text.month {
  fill: var(--muted);
  font-size: 21px;
}

.trend-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.trend-range span {
  background: #eef6f1;
  border: 1px solid #c7d9ce;
  border-radius: 999px;
  color: var(--deep);
  font-size: 14px;
  font-weight: 900;
  padding: 7px 11px;
}

.trend-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 82px minmax(120px, 1fr) 130px 58px;
}

.trend-row span,
.trend-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.trend-row strong {
  color: var(--deep);
  font-size: 15px;
  font-weight: 900;
  text-align: right;
}

.trend-bar {
  background: #e6ece8;
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
}

.trend-bar i {
  background: linear-gradient(90deg, var(--gold), #ff7a1a);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.glossary-grid,
.checklist-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.investment-checklist-form {
  max-width: 980px;
}

.checklist-status-board {
  background:
    linear-gradient(135deg, rgba(31, 58, 46, 0.96), rgba(46, 92, 78, 0.96)),
    var(--deep);
  border: 1px solid rgba(255, 184, 0, 0.55);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(17, 24, 20, 0.18);
  color: #fff;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  padding: 18px;
}

.checklist-status-board div:not(.checklist-meter) {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.checklist-status-board span,
.checklist-status-board em {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.checklist-status-board strong {
  color: var(--gold);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 900;
  line-height: 1;
}

.checklist-status-board .status-text {
  color: #fff;
  font-size: clamp(21px, 2vw, 30px);
}

.checklist-meter {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  grid-column: 1 / -1;
  height: 13px;
  overflow: hidden;
}

.checklist-meter i {
  background: linear-gradient(90deg, var(--gold), #ff7a1a);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.18s ease;
}

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

.glossary-card span {
  color: #b87300;
  font-size: 13px;
  font-weight: 900;
}

.glossary-card h2 {
  color: var(--deep);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
}

.glossary-card p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  margin: 0;
}

.checklist-form {
  display: grid;
  gap: 18px;
}

.checklist-item {
  align-items: center;
  cursor: pointer;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 16px 18px;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.checklist-item:has(input:checked) {
  background: #f5fbf2;
  border-color: #afcfae;
  box-shadow: 0 10px 24px rgba(31, 58, 46, 0.08);
}

.checklist-item input {
  accent-color: var(--deep);
  height: 22px;
  margin: 0;
  width: 22px;
}

.checklist-item strong {
  color: var(--deep);
  display: block;
  font-size: 18px;
  font-weight: 900;
}

.checklist-item em {
  color: var(--muted);
  display: block;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.55;
  margin-top: 4px;
}

.checklist-result {
  background: var(--deep);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: #fff;
  display: inline-grid;
  gap: 2px;
  margin-top: 24px;
  min-width: 220px;
  padding: 22px;
}

.checklist-result span {
  color: #d8e2dd;
  font-size: 14px;
  font-weight: 900;
}

.checklist-result strong {
  color: var(--gold);
  font-size: 42px;
  font-weight: 900;
}

.checklist-result em {
  font-style: normal;
  font-weight: 900;
}

.short-result {
  background: var(--deep);
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  color: white;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  max-width: 980px;
  padding: 22px;
}

.short-result span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.short-result .short-open-link {
  color: white;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.short-result small {
  color: #d8e2dd;
  overflow-wrap: anywhere;
}

.copy-row {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.copy-value {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  color: #fff;
  font-size: clamp(18px, 2.1vw, 27px);
  font-weight: 900;
  min-width: 0;
  outline: 0;
  padding: 13px 14px;
  width: 100%;
}

.copy-button {
  background: var(--gold);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  color: #000;
  cursor: pointer;
  font-weight: 900;
  min-height: 48px;
  padding: 10px 16px;
  white-space: nowrap;
}

.copy-button:hover,
.copy-button.copied {
  background: #ffd35a;
}

.copy-button.small {
  border: 1px solid #f1d27b;
  box-shadow: none;
  font-size: 13px;
  min-height: 34px;
  padding: 7px 10px;
}

.table-copy {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 360px;
}

.table-link {
  color: var(--green);
  font-weight: 900;
}

.url-cell {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty {
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
}

.search-empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 8px solid var(--gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--muted);
  display: grid;
  gap: 6px;
  padding: 22px;
}

.search-empty strong {
  color: var(--deep);
  font-size: 20px;
}

.search-empty span {
  font-size: 15px;
}

.notice {
  background: var(--gold-soft);
  border: 1px solid #f1d27b;
  border-radius: 12px;
  color: #5f3a00;
  font-size: 17px;
  font-weight: 900;
  margin: 0 0 18px;
  padding: 14px 16px;
}

.notice.error {
  background: #fff1ef;
  border-color: #f2b9b2;
  color: #9f1d18;
}

.site-footer {
  align-items: start;
  background: var(--deep);
  color: #d8e2dd;
  display: grid;
  gap: 14px 24px;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1fr);
  justify-content: space-between;
  padding: 26px clamp(18px, 5vw, 64px);
}

.site-footer strong {
  color: var(--gold);
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.site-footer span,
.site-footer p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 750;
  margin: 0;
}

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

.site-footer nav a {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 10px;
}

.site-footer p {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .site-nav {
    display: flex;
    flex: 1 0 100%;
    gap: 10px;
    justify-content: flex-start;
    margin-left: 0;
    order: 3;
    overflow-x: auto;
    padding: 2px 0 0;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(31, 58, 46, 0.06);
    flex: 0 0 auto;
    font-size: 20px;
    padding: 9px 14px;
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:nth-of-type(n+6) {
    display: none;
  }

  .site-header,
  .site-header.compact {
    flex-wrap: wrap;
  }

  .site-header.compact .site-nav {
    display: flex;
  }

  .site-header.compact .scroll-title {
    display: none;
  }

  .search-panel,
  .menu-panel {
    top: 146px;
  }

  .menu-toggle {
    align-items: center;
    background: var(--gold-soft);
    border: 1px solid #efb100;
    border-radius: 999px;
    display: inline-flex;
    gap: 8px;
    height: 42px;
    justify-content: center;
    min-width: 92px;
    padding: 0 44px 0 12px;
    position: relative;
    width: auto;
  }

  .menu-toggle strong {
    color: var(--deep);
    display: inline;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
  }

  .menu-toggle span {
    height: 4px;
    position: absolute;
    right: 13px;
    width: 24px;
  }

  .menu-toggle span:nth-of-type(1) {
    top: 12px;
  }

  .menu-toggle span:nth-of-type(2) {
    top: 19px;
  }

  .menu-toggle span:nth-of-type(3) {
    top: 26px;
  }

  .brand-logo {
    height: 72px;
    max-width: min(350px, 58vw);
  }

  .front-grid,
  .board-community-layout,
  .board-detail-layout,
  .transaction-filter,
    .board-category-grid,
    .board-editor-layout,
    .automation-summary,
    .checklist-status-board,
    .short-url-form,
    .tool-search-form,
    .split-results,
    .trend-row,
    .copy-row,
    .lotto-history-row,
    .stamp-layout {
      grid-template-columns: 1fr;
    }

  .trend-row strong {
    text-align: left;
  }

  .dashboard-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .board-sidebar {
    position: static;
  }

  .board-sidebar-left {
    order: 1;
  }

  .board-feed,
  .board-detail {
    order: 2;
  }

  .board-sidebar-right {
    order: 3;
  }

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

  .lotto-mini-balls {
    justify-content: start;
  }

  .lotto-winning-row {
    grid-template-columns: 1fr;
  }

  .lotto-pick-frequency-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .winning-balls {
    justify-content: flex-start;
  }

  .menu-panel-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .board-editor-guide {
    position: static;
  }
}

@media (max-width: 680px) {
  .ad-slot {
    border-radius: 10px;
    margin: 16px 14px;
    min-height: 86px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 96px;
  }

  .brand-logo {
    height: 58px;
    max-width: min(310px, calc(100vw - 36px));
  }

  .header-actions {
    order: 2;
    position: static;
    width: 100%;
  }

  .auth-action-button {
    height: 42px;
    min-width: 74px;
    padding: 0 12px;
  }

  .search-toggle {
    height: 42px;
    min-width: 88px;
    padding: 0 14px;
  }

  .scroll-title {
    max-width: calc(100vw - 130px);
    text-align: left;
  }

  .search-panel,
  .menu-panel {
    top: 136px;
  }

  .site-nav {
    order: 3;
    width: 100%;
  }

  .site-nav a {
    font-size: 17px;
    padding: 8px 12px;
  }

  .site-nav a:nth-of-type(n+4) {
    display: none;
  }

  .lotto-pick-analysis-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .lotto-pick-frequency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-kicker,
  .section-heading,
  .article-title-row,
  .source-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-kicker strong {
    text-align: left;
  }

  .article-item {
    grid-template-columns: 1fr;
  }

  .dashboard-strip,
  .board-category-nav,
  .schedule-panel,
  .inline-check-field {
    grid-template-columns: 1fr;
  }

  .board-search-form {
    grid-template-columns: 1fr;
  }

  .board-feed-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-row {
    grid-template-columns: 1fr;
  }

  .board-row-author {
    justify-content: flex-start;
    padding-top: 0;
  }

  .menu-panel-inner {
    grid-template-columns: 1fr;
  }

  .menu-panel a {
    font-size: 21px;
  }

  .source-button {
    text-align: center;
    width: 100%;
  }
}

/* RDRC World final overrides: keep the playground as a single in-world surface. */
.playground-world-wrap.playground-quiz-wrap {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 184, 0, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(31, 58, 46, 0.08), rgba(255, 184, 0, 0.08)),
    #f4f6ef;
  padding: 0 clamp(10px, 2vw, 28px) clamp(10px, 2vw, 28px);
}

.world-fullscreen-lock {
  overflow: hidden;
}

.playground-world-wrap .rdrc-world-stage {
  min-height: calc(100svh - 126px);
  padding-top: clamp(10px, 1.6vw, 18px);
}

.playground-world-wrap .rdrc-world-viewport {
  min-height: min(820px, calc(100svh - 150px));
}

.playground-world-wrap.is-world-fullscreen {
  background: #07140f;
  inset: 0;
  padding: 10px;
  position: fixed;
  z-index: 9999;
}

.playground-world-wrap.is-world-fullscreen .rdrc-world-stage,
.playground-world-wrap.is-world-fullscreen .rdrc-world-viewport {
  min-height: calc(100svh - 20px);
}

.world-chat-toggle,
.world-fullscreen-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 58, 46, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(31, 58, 46, 0.16);
  color: var(--deep);
  cursor: pointer;
  display: inline-flex;
  font-weight: 950;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  position: absolute;
  top: 14px;
  z-index: 24;
}

.world-chat-toggle {
  left: 14px;
}

.world-fullscreen-toggle {
  right: 14px;
}

.playground-account-menu {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 28;
}

.world-icon-toggle,
.world-control-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(31, 58, 46, 0.2);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(31, 58, 46, 0.16);
  color: var(--deep);
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  font-weight: 950;
  height: 46px;
  justify-content: center;
  min-height: 0;
  padding: 0;
  width: 48px;
}

.world-control-toggle {
  position: absolute;
  right: 72px;
  top: 14px;
  z-index: 28;
}

.world-icon-toggle:hover,
.world-icon-toggle.is-open,
.world-icon-toggle[aria-expanded="true"],
.world-control-toggle:hover,
.world-control-toggle.is-open,
.world-control-toggle[aria-expanded="true"] {
  background: var(--gold);
  border-color: #d99c00;
  color: #11170f;
}

.playground-account-bar {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  max-width: min(520px, calc(100% - 180px));
  position: absolute;
  right: 104px;
  top: 14px;
  z-index: 25;
}

.playground-account-menu .playground-account-bar {
  animation: world-menu-slide 160ms ease-out;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(31, 58, 46, 0.16);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(31, 58, 46, 0.18);
  display: grid;
  gap: 7px;
  max-width: none;
  min-width: 158px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  transform-origin: 90% 0;
}

.playground-account-menu .playground-account-bar[hidden] {
  display: none;
}

.playground-account-bar .account-summary {
  background: rgba(255, 253, 245, 0.96);
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 8px;
  color: var(--deep);
  font-size: 14px;
  font-weight: 950;
  min-height: 42px;
  max-width: 220px;
  overflow: hidden;
  padding: 10px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playground-account-bar button {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(31, 58, 46, 0.2);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 58, 46, 0.14);
  color: var(--deep);
  cursor: pointer;
  display: inline-flex;
  font-weight: 950;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  white-space: nowrap;
}

.playground-account-bar button:hover {
  background: var(--gold);
  border-color: #d99c00;
  color: #11170f;
}

.playground-account-menu .playground-account-bar button,
.playground-account-menu .world-fullscreen-toggle {
  box-shadow: none;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  position: static;
  right: auto;
  top: auto;
  width: 100%;
}

.playground-account-menu .world-fullscreen-toggle {
  display: inline-flex;
}

@keyframes world-menu-slide {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.world-auth-modal,
.world-dashboard-panel,
.world-npc-dialog {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(31, 58, 46, 0.24);
  color: var(--ink);
  overflow: hidden;
  position: absolute;
  right: 14px;
  top: 70px;
  width: min(360px, calc(100% - 28px));
  z-index: 35;
}

.world-auth-modal[hidden],
.world-dashboard-panel[hidden],
.world-npc-dialog[hidden] {
  display: none;
}

.world-auth-card,
.world-dashboard-panel {
  min-width: 0;
}

.world-auth-head,
.world-dashboard-head,
.world-npc-dialog-head {
  align-items: center;
  background: linear-gradient(135deg, #173d2d, #24533f);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.world-auth-head strong,
.world-dashboard-head strong,
.world-npc-dialog-head strong {
  font-size: 18px;
  font-weight: 950;
}

.world-auth-head button,
.world-dashboard-head button,
.world-npc-dialog-head button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.world-auth-form {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.world-auth-form label {
  display: grid;
  gap: 6px;
}

.world-auth-form span {
  color: var(--deep);
  font-size: 13px;
  font-weight: 950;
}

.world-auth-form input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  min-height: 42px;
  padding: 0 12px;
}

.world-auth-form input.masked-game-key {
  -webkit-text-security: disc;
  text-security: disc;
}

.world-auth-form button {
  background: var(--gold);
  border: 2px solid #d99c00;
  border-radius: 8px;
  color: #10140f;
  cursor: pointer;
  font-weight: 950;
  min-height: 42px;
}

.world-auth-message {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  margin: -4px 14px 14px;
}

.world-auth-message.error {
  color: #b21f1f;
}

.world-npc-dialog {
  bottom: 86px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(360px, calc(100% - 126px));
  right: 18px;
  top: auto;
  width: min(380px, calc(100% - 36px));
  z-index: 34;
}

.world-npc-dialog-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.world-npc-dialog-head span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 850;
}

.world-npc-dialog-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.world-npc-dialog-body p {
  color: var(--deep);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
  margin: 0;
}

.world-npc-dialog-body section {
  background: #f5f8f5;
  border: 1px solid rgba(31, 58, 46, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.world-npc-dialog-body section[hidden] {
  display: none;
}

.world-npc-dialog-body b {
  color: var(--deep);
  font-size: 14px;
  font-weight: 950;
}

.world-npc-dialog-body span,
.world-npc-dialog-body small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.world-npc-dialog-body button {
  background: var(--gold);
  border: 2px solid #d99c00;
  border-radius: 8px;
  color: #10140f;
  cursor: pointer;
  font-weight: 950;
  min-height: 40px;
}

.world-npc-dialog-body button[hidden] {
  display: none;
}

.world-dashboard-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(560px, calc(100% - 88px));
}

.world-dashboard-body {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.world-dashboard-body > p,
.world-dashboard-body section p {
  align-items: center;
  background: #f5f8f5;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  padding: 9px 10px;
}

.world-dashboard-body h3 {
  color: var(--deep);
  font-size: 15px;
  font-weight: 950;
  margin: 8px 0 7px;
}

.world-dashboard-body span {
  color: var(--muted);
  font-weight: 850;
  min-width: 0;
}

.world-dashboard-body b {
  color: var(--deep);
  font-weight: 950;
}

.world-dashboard-body em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  grid-column: 1 / -1;
}

.world-chat-toggle:hover,
.world-fullscreen-toggle:hover {
  background: var(--gold);
  border-color: #d99c00;
}

.world-chat-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(31, 58, 46, 0.22);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  left: 14px;
  max-height: min(520px, calc(100% - 86px));
  overflow: hidden;
  position: absolute;
  top: 68px;
  width: min(430px, calc(100% - 28px));
  z-index: 23;
}

.world-chat-servers {
  background: #f4f8f4;
  border-bottom: 1px solid rgba(31, 58, 46, 0.12);
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 8px;
}

.world-chat-servers button {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 7px;
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  min-height: 34px;
  padding: 0 6px;
  white-space: nowrap;
}

.world-chat-servers button.active {
  background: var(--gold);
  border-color: #d99c00;
  color: #10140f;
}

.world-chat-panel[hidden] {
  display: none;
}

.world-chat-head {
  align-items: center;
  background: linear-gradient(135deg, #173d2d, #24533f);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.world-chat-head strong {
  font-size: 20px;
  font-weight: 950;
}

.world-chat-head button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  font-weight: 950;
  height: 36px;
  justify-content: center;
  min-height: 0;
  padding: 0;
  width: 40px;
}

.world-chat-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
}

.world-chat-row {
  background: #f5f8f5;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.world-chat-row strong {
  color: #b36f00;
  font-size: 13px;
  font-weight: 950;
}

.world-chat-row span {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.world-chat-form {
  border-top: 1px solid rgba(31, 58, 46, 0.12);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.world-chat-form input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  min-height: 44px;
  padding: 0 12px;
}

.world-chat-form button {
  background: var(--gold);
  border: 2px solid #d99c00;
  border-radius: 8px;
  color: #10140f;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  min-height: 44px;
  padding: 0 14px;
}

.playground-world-wrap .world-character {
  align-items: center;
  background: linear-gradient(180deg, #f8d28a, #d48a3d);
  border: 5px solid #20372b;
  border-radius: 999px 999px 10px 10px;
  box-shadow: 0 22px 40px rgba(31, 58, 46, 0.34);
  display: flex;
  height: 94px;
  justify-content: center;
  left: 2480px;
  position: absolute;
  top: 2600px;
  transform: translate(-50%, -100%);
  transition: none;
  width: 72px;
  z-index: 8;
}

.playground-world-wrap .world-character::before,
.playground-world-wrap .world-character::after {
  background: #183427;
  border-radius: 999px;
  content: "";
  height: 8px;
  position: absolute;
  top: 31px;
  width: 8px;
}

.playground-world-wrap .world-character::before {
  left: 20px;
}

.playground-world-wrap .world-character::after {
  right: 20px;
}

.playground-world-wrap .world-character span {
  background: #183427;
  border-radius: 999px;
  bottom: 25px;
  height: 7px;
  position: absolute;
  width: 24px;
}

.playground-world-wrap .world-building {
  align-items: center;
  background: rgba(255, 252, 242, 0.96);
  border: 4px solid #204331;
  border-radius: 12px;
  color: var(--deep);
  display: grid;
  gap: 8px;
  height: 260px;
  justify-items: center;
  min-height: 0;
  padding: 58px 24px 24px;
  position: absolute;
  text-align: center;
  width: 350px;
}

.playground-world-wrap .world-npc {
  background: transparent;
  border: 0;
  min-height: 0;
  padding: 0;
}

.playground-world-wrap .world-window-head button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  display: inline-flex;
  font-size: 24px;
  height: 40px;
  justify-content: center;
  min-height: 0;
  padding: 0;
  width: 44px;
}

.playground-world-wrap .world-controls {
  align-items: center;
  bottom: 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: absolute;
  right: min(678px, calc(100% - 146px));
  z-index: 21;
}

.playground-world-wrap .world-controls div {
  display: flex;
  gap: 8px;
}

.playground-world-wrap .world-controls button {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 58, 46, 0.2);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(31, 58, 46, 0.12);
  color: var(--deep);
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
  height: 44px;
  min-height: 0;
  padding: 0;
  width: 48px;
}

.playground-world-wrap .world-controls[data-world-controls-panel] {
  animation: world-menu-slide 160ms ease-out;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 12px;
  bottom: auto;
  box-shadow: 0 18px 44px rgba(31, 58, 46, 0.16);
  display: grid;
  gap: 7px;
  justify-items: center;
  left: auto;
  padding: 8px;
  position: absolute;
  right: 72px;
  top: 68px;
  transform: none;
  z-index: 27;
}

.playground-world-wrap .world-controls[data-world-controls-panel][hidden] {
  display: none;
}

.playground-world-wrap .world-controls[data-world-controls-panel] div {
  display: flex;
  gap: 7px;
}

.playground-world-wrap .world-controls[data-world-controls-panel] button {
  box-shadow: none;
  height: 40px;
  width: 44px;
}

@media (max-width: 980px) {
  .playground-world-wrap.playground-quiz-wrap {
    padding-left: 8px;
    padding-right: 8px;
  }

  .playground-world-wrap .world-controls {
    bottom: 16px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .playground-world-wrap .rdrc-world-viewport {
    min-height: calc(100svh - 132px);
  }

  .playground-game-head {
    align-items: stretch;
    flex-direction: column;
  }

  .playground-game-head h1 {
    font-size: 36px;
  }

  .playground-game-actions {
    justify-content: flex-start;
  }

  .playground-game-frame-wrap {
    height: 760px;
    min-height: 760px;
  }

  .world-chat-toggle,
  .world-fullscreen-toggle {
    min-height: 40px;
    padding: 0 12px;
  }

  .playground-account-bar {
    gap: 5px;
    left: 10px;
    max-width: calc(100% - 116px);
    right: auto;
    top: 62px;
  }

  .playground-account-bar .account-summary {
    max-width: 150px;
    min-height: 38px;
    padding: 8px 10px;
  }

  .playground-account-bar button {
    min-height: 38px;
    padding: 0 10px;
  }

  .world-auth-modal,
  .world-dashboard-panel {
    right: 10px;
    top: 108px;
    width: min(340px, calc(100% - 20px));
  }

  .world-chat-panel {
    max-height: 48svh;
    width: min(390px, calc(100% - 20px));
  }

  .world-chat-servers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Playground compact world: the world itself is the first screen. */
.playground-world-wrap.playground-quiz-wrap {
  --world-height: 1600px;
  --world-width: 2400px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.24)),
    #dfeec9;
  padding: 10px 18px 18px;
}

.playground-world-wrap .rdrc-world-stage {
  min-height: calc(100svh - 132px);
  padding-top: 0;
}

.playground-world-wrap .rdrc-world-viewport {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 184, 0, 0.16), transparent 16%),
    radial-gradient(circle at 82% 26%, rgba(83, 142, 86, 0.22), transparent 15%),
    linear-gradient(135deg, #cfe6a4, #91c579 54%, #79b766);
  border: 2px solid rgba(31, 58, 46, 0.2);
  border-radius: 10px;
  min-height: calc(100svh - 154px);
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.playground-world-wrap .rdrc-world-map-large {
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 247, 183, 0.38), transparent 9%),
    radial-gradient(circle at 82% 66%, rgba(110, 161, 101, 0.24), transparent 11%),
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 96px 96px;
  height: var(--world-height);
  left: 0;
  min-height: var(--world-height);
  position: absolute;
  top: 0;
  transform: translate3d(0, 0, 0);
  transition: none;
  width: var(--world-width);
  will-change: transform;
}

.world-lawn-mark {
  background: rgba(71, 129, 62, 0.28);
  border-radius: 999px;
  position: absolute;
}

.lawn-1 {
  height: 180px;
  left: 5%;
  top: 12%;
  width: 240px;
}

.lawn-2 {
  height: 220px;
  right: 8%;
  top: 16%;
  width: 220px;
}

.lawn-3 {
  height: 250px;
  left: 36%;
  top: 70%;
  width: 300px;
}

.lawn-4 {
  height: 210px;
  left: 70%;
  top: 72%;
  width: 360px;
}

.world-pond {
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.55), transparent 12%),
    linear-gradient(135deg, #7dc7cc, #4a99ad);
  border: 5px solid rgba(47, 112, 116, 0.22);
  border-radius: 52% 48% 44% 56% / 48% 54% 46% 52%;
  box-shadow: inset 0 12px 24px rgba(255, 255, 255, 0.3), 0 16px 30px rgba(31, 58, 46, 0.14);
  position: absolute;
  z-index: 2;
}

.pond-1 {
  height: 170px;
  left: 8%;
  top: 74%;
  width: 260px;
}

.pond-2 {
  height: 130px;
  left: 76%;
  top: 39%;
  width: 220px;
}

.world-grove {
  background:
    radial-gradient(circle at 18% 48%, #4f8a43 0 18px, transparent 19px),
    radial-gradient(circle at 34% 35%, #5f9d50 0 24px, transparent 25px),
    radial-gradient(circle at 52% 50%, #447d3c 0 22px, transparent 23px),
    radial-gradient(circle at 70% 38%, #6cab5c 0 26px, transparent 27px),
    radial-gradient(circle at 86% 55%, #3f7439 0 20px, transparent 21px);
  height: 90px;
  position: absolute;
  width: 230px;
  z-index: 3;
}

.grove-1 {
  left: 8%;
  top: 38%;
}

.grove-2 {
  left: 70%;
  top: 78%;
  transform: scale(1.2);
}

.world-path {
  background: rgba(214, 171, 105, 0.72);
  border: 4px solid rgba(112, 76, 39, 0.12);
  border-radius: 999px;
  position: absolute;
}

.path-main {
  height: 1580px;
  left: 48%;
  top: -80px;
  transform: rotate(28deg);
  width: 80px;
}

.path-cross {
  height: 72px;
  left: 8%;
  top: 58%;
  transform: rotate(-7deg);
  width: 86%;
}

.path-north {
  height: 64px;
  left: 18%;
  top: 25%;
  transform: rotate(6deg);
  width: 62%;
}

.path-east {
  height: 72px;
  left: 63%;
  top: 42%;
  transform: rotate(52deg);
  width: 34%;
}

.world-ambient {
  pointer-events: none;
  position: absolute;
  z-index: 8;
  will-change: transform;
}

.world-ambient img {
  display: block;
  filter: drop-shadow(0 12px 12px rgba(31, 58, 46, 0.22));
  height: auto;
  user-select: none;
  width: 74px;
}

.world-ambient-plane {
  animation: world-plane-flight 32s linear infinite;
  left: -180px;
  top: 110px;
}

.world-ambient-plane img {
  width: 142px;
}

.world-ambient-walker {
  will-change: transform;
}

.world-ambient-walker img {
  width: 62px;
}

.walker-1 {
  left: 28%;
  top: 40%;
}

.walker-2 {
  left: 60%;
  top: 64%;
}

.world-ambient-dog {
  left: 20%;
  top: 68%;
  will-change: transform;
}

.world-ambient-dog img {
  width: 68px;
}

.world-ambient-bird {
  animation: world-bird-drift 12s ease-in-out infinite alternate;
}

.world-ambient-bird img {
  filter: drop-shadow(0 8px 8px rgba(31, 58, 46, 0.18));
  width: 52px;
}

.bird-1 {
  left: 62%;
  top: 21%;
}

.bird-2 {
  animation-delay: -4s;
  animation-duration: 16s;
  left: 31%;
  top: 76%;
}

@keyframes world-plane-flight {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(var(--world-width) + 320px), 180px, 0);
  }
}

@keyframes world-bird-drift {
  0% {
    transform: translate3d(-40px, 4px, 0);
  }
  100% {
    transform: translate3d(80px, -22px, 0);
  }
}

.world-npc-layer {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 11;
}

.world-npc {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: grid;
  justify-items: center;
  min-height: 0;
  padding: 0;
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -82%);
  width: 72px;
  will-change: left, top, transform;
}

.world-npc[hidden] {
  display: none;
}

.world-npc img {
  display: block;
  filter: drop-shadow(0 12px 12px rgba(31, 58, 46, 0.22));
  height: auto;
  transform: scaleX(var(--npc-facing, 1));
  transform-origin: center bottom;
  user-select: none;
  width: 58px;
}

.world-npc-layer .world-npc span {
  box-shadow: none;
  display: initial;
  height: auto;
  position: static;
  width: auto;
}

.world-npc-layer .world-npc span::before,
.world-npc-layer .world-npc span::after {
  content: none;
  display: none;
}

.world-npc-dog img,
.world-npc-cat img,
.world-npc-pigeon img,
.world-npc-bird img {
  width: 64px;
}

.world-npc-bird img {
  width: 48px;
}

.world-npc-name {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 58, 46, 0.14);
  border-radius: 999px;
  color: var(--deep);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  margin-top: -4px;
  max-width: 96px;
  opacity: 0;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.world-npc:hover .world-npc-name,
.world-npc:focus-visible .world-npc-name,
.world-npc.is-player-near .world-npc-name {
  opacity: 1;
  transform: translateY(0);
}

.world-npc-bubble {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(31, 58, 46, 0.14);
  color: var(--deep);
  display: block;
  font-size: 12px;
  font-weight: 900;
  left: 50%;
  line-height: 1.25;
  max-width: 220px;
  min-width: 116px;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  text-align: center;
  top: -18px;
  transform: translate(-50%, -100%);
  white-space: normal;
  z-index: 3;
}

.world-npc-bubble::after {
  background: #fff;
  border-bottom: 1px solid rgba(31, 58, 46, 0.12);
  border-right: 1px solid rgba(31, 58, 46, 0.12);
  bottom: -6px;
  content: "";
  display: block;
  height: 10px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
}

.world-npc-bubble[hidden] {
  display: none;
}

.world-npc-layer .world-npc .world-npc-name,
.world-npc-layer .world-npc .world-npc-action {
  height: auto;
  position: static;
  width: auto;
}

.world-npc-layer .world-npc .world-npc-name::before,
.world-npc-layer .world-npc .world-npc-name::after,
.world-npc-layer .world-npc .world-npc-action::before,
.world-npc-layer .world-npc .world-npc-action::after {
  content: none;
  display: none;
}

.world-npc-layer .world-npc .world-npc-bubble {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(31, 58, 46, 0.14);
  display: block;
  height: auto;
  position: absolute;
  width: max-content;
}

.world-npc-layer .world-npc .world-npc-bubble[hidden] {
  display: none;
}

.world-npc-layer .world-npc .world-npc-bubble::before {
  content: none;
  display: none;
}

.world-npc-layer .world-npc .world-npc-bubble::after {
  background: #fff;
  border-bottom: 1px solid rgba(31, 58, 46, 0.12);
  border-right: 1px solid rgba(31, 58, 46, 0.12);
  bottom: -6px;
  content: "";
  display: block;
  height: 10px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
}

.world-npc-action {
  background: #ffb800;
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(31, 58, 46, 0.16);
  color: #183528;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  margin-top: 4px;
  padding: 5px 9px;
  white-space: nowrap;
}

.world-npc-action[hidden] {
  display: none;
}

.world-npc.is-player-near img {
  filter: drop-shadow(0 0 0 rgba(255, 184, 0, 0.1)) drop-shadow(0 12px 12px rgba(31, 58, 46, 0.22));
}

.world-npc.is-conversing img {
  filter: drop-shadow(0 0 10px rgba(255, 184, 0, 0.34)) drop-shadow(0 12px 12px rgba(31, 58, 46, 0.22));
}

.world-npc.is-wave img {
  animation: npc-wave 900ms ease-in-out infinite alternate;
}

.world-npc.is-rest img {
  animation: npc-rest 1.8s ease-in-out infinite alternate;
}

.world-npc.is-jump img {
  animation: npc-jump 520ms ease-in-out infinite alternate;
}

@keyframes npc-wave {
  from {
    transform: scaleX(var(--npc-facing, 1)) rotate(-3deg);
  }
  to {
    transform: scaleX(var(--npc-facing, 1)) rotate(4deg) translateY(-2px);
  }
}

@keyframes npc-rest {
  from {
    transform: scaleX(var(--npc-facing, 1)) translateY(0);
  }
  to {
    transform: scaleX(var(--npc-facing, 1)) translateY(2px) scale(0.98);
  }
}

@keyframes npc-jump {
  from {
    transform: scaleX(var(--npc-facing, 1)) translateY(0);
  }
  to {
    transform: scaleX(var(--npc-facing, 1)) translateY(-8px);
  }
}

.world-object {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--deep);
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 0;
  padding: 0;
  position: absolute;
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 9;
}

.object-icon {
  align-items: center;
  background: #fffaf0;
  border: 3px solid #204331;
  border-radius: 10px;
  box-shadow: 0 14px 26px rgba(31, 58, 46, 0.18);
  color: #173d2d;
  display: inline-flex;
  font-size: 18px;
  font-weight: 950;
  height: 68px;
  justify-content: center;
  line-height: 1;
  min-width: 68px;
  padding: 0 8px;
}

.world-object-2048 .object-icon {
  background: #ffcf8a;
}

.world-object-shop .object-icon {
  background: #d6f2df;
}

.world-object-ranking .object-icon {
  background: #fff1a8;
}

.world-object.is-near .object-icon,
.world-object:hover .object-icon,
.world-object:focus-visible .object-icon {
  border-color: #d99c00;
  box-shadow: 0 18px 34px rgba(255, 184, 0, 0.34);
  outline: 0;
  transform: translateY(-3px);
}

.object-label {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 58, 46, 0.14);
  border-radius: 999px;
  color: var(--deep);
  display: block;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  padding: 6px 10px;
  white-space: nowrap;
}

.player-avatar {
  align-items: center;
  background: linear-gradient(180deg, #ffd89b, #e98d42);
  border: 4px solid #173d2d;
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(31, 58, 46, 0.32);
  display: flex;
  height: 42px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 72%;
  transform: translate(-50%, -50%);
  width: 42px;
  will-change: left, top, transform;
  z-index: 20;
}

.player-avatar::before,
.player-avatar::after {
  background: #173d2d;
  border-radius: 999px;
  content: "";
  height: 5px;
  position: absolute;
  top: 14px;
  width: 5px;
}

.player-avatar::before {
  left: 11px;
}

.player-avatar::after {
  right: 11px;
}

.player-avatar span {
  background: #173d2d;
  border-radius: 999px;
  bottom: 11px;
  height: 4px;
  position: absolute;
  width: 14px;
}

.player-avatar.is-moving {
  animation: avatar-run-bob 320ms ease-in-out infinite alternate;
  box-shadow: 0 0 0 7px rgba(255, 184, 0, 0.3), 0 14px 28px rgba(31, 58, 46, 0.32);
}

@keyframes avatar-run-bob {
  from {
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    transform: translate(-50%, calc(-50% - 3px)) scale(1.03);
  }
}

.world-avatar-trail {
  animation: avatar-trail-fade 820ms ease-out forwards;
  background:
    radial-gradient(circle at 40% 38%, rgba(255, 223, 150, 0.72), transparent 34%),
    rgba(255, 184, 0, 0.34);
  border: 1px solid rgba(112, 76, 39, 0.16);
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12);
  height: 18px;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, -50%) scale(0.9) rotate(-18deg);
  width: 28px;
  z-index: 18;
}

.world-avatar-trail.alt {
  transform: translate(-50%, -50%) scale(0.86) rotate(18deg);
}

@keyframes avatar-trail-fade {
  0% {
    opacity: 0.74;
    transform: translate(-50%, -50%) scale(0.75) rotate(-18deg);
  }
  45% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.8) rotate(-18deg);
  }
}

.world-avatar-trail.alt {
  animation-name: avatar-trail-fade-alt;
}

@keyframes avatar-trail-fade-alt {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.72) rotate(18deg);
  }
  45% {
    opacity: 0.48;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.7) rotate(18deg);
  }
}

.world-entry-prompt {
  align-items: center;
  background: rgba(255, 247, 221, 0.98);
  border: 1px solid #e3b33a;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(31, 58, 46, 0.2);
  color: #6e4a00;
  display: flex;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  padding: 8px 10px;
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 22;
}

.world-entry-prompt[hidden] {
  display: none;
}

.world-entry-prompt button {
  background: var(--gold);
  border: 1px solid #d99c00;
  border-radius: 8px;
  color: #10140f;
  cursor: pointer;
  font: inherit;
  min-height: 32px;
  padding: 0 10px;
}

.playground-world-wrap .world-window-layer {
  bottom: 86px;
  right: 18px;
  top: 74px;
  width: min(620px, calc(100% - 36px));
}

.playground-world-wrap .world-window:not(.world-room-window) {
  max-height: 100%;
}

.playground-world-wrap .world-window-layer + .world-controls {
  right: 18px;
}

.game-modal {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 10px;
  bottom: 72px;
  box-shadow: 0 24px 90px rgba(31, 58, 46, 0.3);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  left: 50%;
  overflow: hidden;
  position: absolute;
  top: 74px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 36px));
  z-index: 25;
}

.game-modal[hidden] {
  display: none;
}

.game-modal-header {
  align-items: center;
  background: linear-gradient(135deg, #173d2d, #24533f);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}

.game-modal-header strong {
  font-size: 20px;
  font-weight: 950;
}

.game-modal-header button {
  background: var(--gold);
  border: 1px solid #d99c00;
  border-radius: 8px;
  color: #10140f;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  min-height: 38px;
  padding: 0 12px;
}

.game-modal iframe {
  background: #faf8ef;
  border: 0;
  height: 100%;
  min-height: 540px;
  width: 100%;
}

.playground-world-wrap .world-controls {
  bottom: 16px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.playground-world-wrap .world-controls button {
  height: 46px;
  width: 50px;
}

.playground-world-wrap .world-controls[data-world-controls-panel] {
  bottom: auto;
  left: auto;
  right: 72px;
  top: 68px;
  transform: none;
}

.playground-world-wrap .world-controls[data-world-controls-panel] button {
  height: 40px;
  width: 44px;
}

@media (max-width: 700px) {
  .playground-world-wrap.playground-quiz-wrap {
    --world-height: 1120px;
    --world-width: 1580px;
    padding: 8px;
  }

  .playground-world-wrap .rdrc-world-viewport {
    height: calc(100svh - 236px);
    min-height: 500px;
  }

  .playground-world-wrap .rdrc-world-map-large {
    min-height: 100%;
  }

  .world-object-ranking {
    top: 68% !important;
  }

  .object-icon {
    font-size: 15px;
    height: 54px;
    min-width: 54px;
  }

  .object-label {
    font-size: 12px;
    padding: 5px 7px;
  }

  .player-avatar {
    height: 36px;
    width: 36px;
  }

  .world-entry-prompt {
    align-items: stretch;
    flex-direction: column;
    min-width: 150px;
  }

  .playground-world-wrap .world-window-layer {
    bottom: 72px;
    left: 8px;
    right: 8px;
    top: 62px;
    width: auto;
  }

  .game-modal {
    border-radius: 0;
    bottom: 0;
    left: 0;
    top: 0;
    transform: none;
    width: 100%;
  }

  .game-modal iframe {
    min-height: 0;
  }

  .world-chat-toggle,
  .world-fullscreen-toggle {
    min-height: 38px;
    padding: 0 10px;
  }

  .world-chat-panel {
    max-height: 54svh;
    width: min(360px, calc(100% - 16px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .playground-world-wrap .rdrc-world-map-large {
    transition: none;
  }

  .world-ambient,
  .world-npc img,
  .player-avatar.is-moving,
  .world-avatar-trail {
    animation: none !important;
  }

  .world-avatar-trail {
    display: none;
  }
}

.playground-layout.game-mode {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 32%) minmax(0, 68%);
}

.game-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(31, 58, 46, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(31, 58, 46, 0.18);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100svh - 154px);
  overflow: hidden;
}

.game-panel[hidden] {
  display: none;
}

.game-panel-header {
  align-items: center;
  background: linear-gradient(135deg, #173d2d, #24533f);
  color: #fff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.game-panel-header strong {
  font-size: 22px;
  font-weight: 950;
}

.game-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.game-panel-actions button {
  background: var(--gold);
  border: 1px solid #d99c00;
  border-radius: 8px;
  color: #10140f;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  min-height: 40px;
  padding: 0 12px;
}

.game-frame {
  background: #faf8ef;
  border: 0;
  height: calc(100svh - 230px);
  min-height: 620px;
  width: 100%;
}

.mobile-label {
  display: none;
}

.playground-layout.game-mode .rdrc-world-stage {
  min-height: calc(100svh - 154px);
}

.playground-layout.game-mode .rdrc-world-viewport {
  height: calc(100svh - 154px);
  min-height: 620px;
}

.playground-layout.game-mode .rdrc-world-map-large {
  min-height: 100%;
}

.playground-layout.game-mode .object-icon {
  font-size: 14px;
  height: 54px;
  min-width: 54px;
}

.playground-layout.game-mode .object-label {
  font-size: 12px;
  padding: 5px 7px;
}

.playground-layout.game-mode .player-avatar {
  height: 36px;
  width: 36px;
}

.world-object.active .object-icon {
  border-color: #ffb300;
  box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.35), 0 18px 34px rgba(255, 184, 0, 0.34);
  transform: scale(1.08);
}

.playground-layout.game-mode .world-toast {
  max-width: calc(100% - 36px);
}

@media (max-width: 820px) {
  .playground-layout.game-mode {
    display: block;
    background: #dfeec9;
    inset: 0;
    overflow: hidden;
    padding: 8px;
    position: fixed;
    z-index: 9999;
  }

  .playground-layout.game-mode .rdrc-world-stage {
    display: none;
  }

  .playground-layout.game-mode .game-panel {
    border-radius: 8px;
    height: calc(100svh - 16px);
    min-height: 0;
  }

  .playground-layout.game-mode .game-frame {
    height: 100%;
    min-height: 0;
  }

  .game-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .game-panel-actions {
    justify-content: flex-start;
  }

  .desktop-label {
    display: none;
  }

  .mobile-label {
    display: inline;
  }
}

.quiz-school {
  background: #f8fbf7;
  display: grid;
  gap: 14px;
  max-height: 100%;
  overflow: auto;
  padding: 16px;
}

.quiz-school[hidden],
.crossword-game[hidden],
.game-frame[hidden] {
  display: none;
}

.quiz-school-page {
  background: #dfeec9;
  margin: 0;
  min-height: 100svh;
  padding: 12px;
}

.quiz-school-fullscreen {
  border: 1px solid rgba(31, 58, 46, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(31, 58, 46, 0.18);
  min-height: calc(100svh - 24px);
}

.quiz-school-status {
  background: #fff7dd;
  border: 1px solid #e3b33a;
  border-radius: 8px;
  color: #6e4a00;
  font-weight: 900;
  padding: 10px 12px;
}

.quiz-school-status.error {
  background: #fff1f1;
  border-color: #f2a1a1;
  color: #a91b1b;
}

.quiz-auth-panel,
.quiz-user-panel,
.quiz-login-form,
.quiz-panel-head,
.room-create-box,
.ranking-filter {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-login-form[hidden],
.quiz-user-panel[hidden] {
  display: none;
}

.quiz-school label {
  color: var(--deep);
  display: grid;
  flex: 1 1 180px;
  font-weight: 900;
  gap: 6px;
}

.quiz-school label span {
  font-size: 13px;
}

.quiz-school input,
.quiz-school select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  min-height: 42px;
  padding: 0 10px;
}

.quiz-school button {
  background: #edf4f0;
  border: 1px solid #bfd6cc;
  border-radius: 8px;
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  min-height: 42px;
  padding: 0 12px;
}

.quiz-school button:hover {
  background: var(--gold);
  border-color: #d99c00;
}

.quiz-login-form button,
.quiz-actions button:last-child,
.quiz-panel-head button,
.room-create-box button:nth-of-type(1) {
  background: var(--gold);
  border-color: #d99c00;
  color: #10140f;
}

.quiz-user-panel {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  justify-content: space-between;
  padding: 10px 12px;
  width: 100%;
}

.quiz-user-panel strong,
.quiz-user-panel span {
  display: block;
}

.quiz-user-panel strong {
  color: var(--deep);
  font-size: 20px;
  font-weight: 950;
}

.quiz-user-panel span {
  color: var(--muted);
  font-weight: 850;
}

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

.quiz-tabs button {
  background: #fff;
}

.quiz-tabs button.active {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}

.quiz-tab-panel {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.quiz-tab-panel[hidden] {
  display: none;
}

.quiz-help,
.quiz-school .empty {
  color: var(--muted);
  font-weight: 850;
  line-height: 1.5;
  margin: 0;
}

.quiz-title-field {
  flex: none;
  width: 100%;
}

.quiz-builder-list {
  display: grid;
  gap: 12px;
}

.quiz-builder-row {
  background: #f8fbf7;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.quiz-builder-row-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.quiz-builder-row-head strong {
  color: var(--deep);
  font-size: 18px;
  font-weight: 950;
}

.quiz-builder-row-head button {
  min-height: 34px;
}

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

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-play-area,
.room-list,
.quiz-ranking-grid {
  display: grid;
  gap: 10px;
}

.quiz-play-card,
.quiz-result-card,
.quiz-room-card,
.quiz-ranking-grid section {
  background: #f8fbf7;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.quiz-play-card h3,
.quiz-result-card h3,
.quiz-ranking-grid h3 {
  color: var(--deep);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.35;
  margin: 0;
}

.quiz-play-card p,
.quiz-result-card p {
  color: var(--muted);
  font-weight: 850;
  margin: 0;
}

.quiz-result-card strong {
  color: #b36f00;
  font-size: 42px;
  font-weight: 950;
}

.quiz-answer-grid {
  display: grid;
  gap: 8px;
}

.quiz-answer-grid button {
  align-items: center;
  background: #fff;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 50px;
  text-align: left;
}

.quiz-answer-grid b {
  align-items: center;
  background: var(--gold-soft);
  border-radius: 8px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  min-width: 30px;
}

.quiz-answer-grid button.correct {
  background: #e8f7ed;
  border-color: #78bd8b;
}

.quiz-answer-grid button.wrong {
  background: #fff1f1;
  border-color: #f2a1a1;
}

.quiz-answer-result {
  color: var(--deep);
  font-weight: 950;
}

.quiz-room-card strong,
.quiz-room-card span,
.quiz-room-card em {
  display: block;
}

.quiz-room-card strong {
  color: var(--deep);
  font-size: 18px;
  font-weight: 950;
}

.quiz-room-card span,
.quiz-room-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}

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

.ranking-row {
  align-items: center;
  border-bottom: 1px solid rgba(31, 58, 46, 0.1);
  display: grid;
  gap: 8px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 8px 0;
}

.ranking-row b {
  color: #b36f00;
}

.ranking-row span {
  color: var(--deep);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row strong {
  color: var(--ink);
  font-weight: 950;
}

.ranking-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  grid-column: 2 / 4;
}

@media (max-width: 700px) {
  .quiz-tabs,
  .quiz-option-grid,
  .quiz-ranking-grid {
    grid-template-columns: 1fr;
  }

  .quiz-school {
    padding: 12px;
  }
}

/* Compact common chrome */
.site-header,
.site-header.compact {
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 8px 28px;
}

.site-header.compact {
  box-shadow: 0 2px 18px rgba(17, 24, 20, 0.06);
}

.brand-logo,
.site-header.compact .brand-logo {
  height: 48px;
  max-width: 180px;
}

.site-header.compact .site-nav {
  display: flex;
}

.scroll-title,
.site-header.compact .scroll-title,
.scroll-progress {
  display: none !important;
}

.site-nav {
  gap: 0;
}

.site-nav a {
  font-size: 22px;
  line-height: 1.1;
  padding: 6px 13px;
}

.site-nav a + a {
  border-left: 1px solid rgba(20, 60, 45, 0.16);
}

.site-nav a::after {
  bottom: -2px;
  height: 3px;
  left: 13px;
  width: calc(100% - 26px);
}

.header-actions {
  gap: 10px;
  position: relative;
}

.auth-action-button,
.search-toggle {
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
}

.auth-action-button {
  min-width: 88px;
}

.search-toggle {
  min-width: 92px;
}

.menu-toggle {
  height: 42px;
  width: 48px;
}

.menu-toggle span {
  height: 4px;
  width: 30px;
}

.menu-toggle.open span:nth-of-type(1) {
  transform: translateY(10px) rotate(45deg);
}

.menu-toggle.open span:nth-of-type(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.account-panel {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(17, 24, 20, 0.16);
  color: var(--deep);
  display: grid;
  gap: 10px;
  min-width: 240px;
  padding: 14px;
  position: absolute;
  right: 160px;
  top: calc(100% + 10px);
  z-index: 50;
}

.account-panel[hidden] {
  display: none;
}

.account-panel strong {
  font-size: 16px;
  font-weight: 950;
}

.account-panel p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  margin: 0;
}

.account-panel-actions {
  display: flex;
  gap: 8px;
}

.account-panel-actions a {
  align-items: center;
  background: #edf6f1;
  border: 1px solid #c7ded1;
  border-radius: 8px;
  color: var(--deep);
  display: inline-flex;
  font-size: 13px;
  font-weight: 950;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
}

.search-panel,
.menu-panel {
  padding: 12px 28px;
  top: 70px;
}

.menu-panel {
  box-shadow: 0 8px 22px rgba(17, 24, 20, 0.08);
}

.menu-panel-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-panel a {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  color: var(--deep);
  font-size: 16px;
  line-height: 1;
  padding: 10px 14px;
}

.menu-panel a:hover {
  border-color: var(--gold);
}

.site-footer {
  align-items: center;
  background: var(--deep);
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  font-size: 13px;
  font-weight: 850;
  justify-content: center;
  line-height: 1.35;
  min-height: 34px;
  padding: 8px 18px;
  text-align: center;
}

.playground-layout.game-mode {
  min-height: calc(100svh - 104px);
}

.game-panel,
.playground-layout.game-mode .rdrc-world-stage {
  min-height: calc(100svh - 104px);
}

.game-frame,
.playground-layout.game-mode .rdrc-world-viewport {
  height: calc(100svh - 158px);
  min-height: 0;
}

.game-panel {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .site-header,
  .site-header.compact {
    flex-wrap: wrap;
    min-height: 94px;
    padding: 8px 18px;
  }

  .brand-logo,
  .site-header.compact .brand-logo {
    height: 46px;
    max-width: 176px;
  }

  .site-nav {
    flex: 1 0 100%;
    justify-content: flex-start;
    order: 3;
    overflow-x: auto;
    padding-top: 2px;
  }

  .site-nav a {
    font-size: 17px;
    padding: 8px 12px;
  }

  .site-nav a + a {
    border-left: 0;
  }

  .search-panel,
  .menu-panel {
    top: 94px;
  }

  .account-panel {
    right: 0;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-header.compact {
    align-items: stretch;
    min-height: 88px;
  }

  .header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .auth-action-button,
  .search-toggle,
  .menu-toggle {
    min-height: 40px;
  }

  .account-panel {
    left: 0;
    min-width: 0;
    right: 0;
    top: calc(100% + 8px);
  }

  .search-panel,
  .menu-panel {
    padding: 10px 14px;
    top: 88px;
  }

  .menu-panel-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-footer {
    font-size: 13px;
    min-height: 32px;
    padding: 8px 12px;
  }
}

/* Playground quiz school fixed-panel layout */
:root {
  --header-height: 70px;
  --footer-height: 34px;
  --game-panel-header-height: 54px;
}

body.playground-active {
  overflow: hidden;
}

body.playground-active main {
  overflow: hidden;
}

.playground-layout.game-mode {
  gap: 12px;
  height: calc(100svh - var(--header-height) - var(--footer-height));
  min-height: 0;
  overflow: hidden;
}

.playground-layout.game-mode .rdrc-world-stage,
.playground-layout.game-mode .rdrc-world-viewport,
.game-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.game-panel {
  grid-template-rows: var(--game-panel-header-height) minmax(0, 1fr);
}

.game-panel-header {
  min-height: var(--game-panel-header-height);
  padding: 9px 12px;
}

.game-frame {
  height: 100%;
  min-height: 0;
}

.game-panel > .quiz-school {
  height: 100%;
}

.quiz-school {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.quiz-school-status,
.quiz-auth-panel,
.quiz-tabs {
  flex: 0 0 auto;
}

.quiz-login-note {
  background: #fff8e3;
  border: 1px solid rgba(255, 184, 0, 0.42);
  border-radius: 8px;
  color: #744b00;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.4;
  padding: 9px 10px;
}

.quiz-login-note[hidden] {
  display: none;
}

.quiz-school-status {
  padding: 8px 10px;
}

.quiz-auth-panel {
  min-height: 0;
}

.quiz-user-panel {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 10px;
}

.quiz-user-summary {
  min-width: 0;
}

.quiz-user-panel strong {
  font-size: 18px;
}

.quiz-user-panel button {
  min-height: 38px;
}

.quiz-user-panel [data-open-quiz-create] {
  background: var(--gold);
  border-color: #d99c00;
  color: #10140f;
}

.quiz-user-actions.quiz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.quiz-user-actions.quiz-tabs button {
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}

.quiz-user-actions [data-quiz-world-logout] {
  background: #fff;
  border-color: rgba(31, 58, 46, 0.22);
  color: var(--muted);
}

.quiz-tabs button {
  min-height: 38px;
}

.quiz-tab-panel {
  min-height: 0;
}

.quiz-tab-panel.active {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.quiz-tab-panel[data-quiz-panel="make"].active {
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.quiz-create-header {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.quiz-create-header button {
  min-height: 44px;
}

.quiz-title-field {
  min-width: 0;
  width: auto;
}

.quiz-builder-list {
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.quiz-school .question-card {
  background: #f8fbf7;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 10px;
}

.question-number-badge {
  align-items: center;
  align-self: start;
  background: var(--gold-soft);
  border: 1px solid #efc557;
  border-radius: 8px;
  color: #5f3a00;
  display: grid;
  font-size: 12px;
  font-weight: 950;
  justify-items: center;
  min-height: 54px;
  padding: 6px 4px;
  white-space: nowrap;
}

.question-number-badge b {
  color: var(--deep);
  display: block;
  font-size: 20px;
  line-height: 1;
}

.question-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.question-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.15fr 1fr;
  min-width: 0;
}

.question-text-field {
  min-width: 0;
}

.quiz-school textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  height: 96px;
  line-height: 1.45;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

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

.options-grid label {
  min-width: 0;
}

.options-grid .answer-field {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.quiz-school input,
.quiz-school select {
  min-height: 44px;
}

.quiz-play-area {
  min-height: 0;
}

.quiz-play-card-split {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.quiz-question-pane,
.quiz-answer-pane {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.quiz-question-pane {
  align-content: start;
}

.quiz-progress-text {
  color: var(--muted);
  font-weight: 950;
}

.quiz-play-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-play-meta span {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 950;
  padding: 7px 9px;
}

.quiz-answer-pane {
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.quiz-answer-grid {
  min-height: 0;
}

.quiz-answer-grid button {
  min-height: 44px;
}

.room-list,
.quiz-ranking-grid section > div {
  max-height: calc(100svh - 360px);
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.ranking-filter,
.room-create-box,
.quiz-panel-head {
  flex: 0 0 auto;
}

.quiz-ranking-grid {
  min-height: 0;
}

.quiz-ranking-grid section {
  min-height: 0;
  overflow: hidden;
}

.quiz-school-fullscreen {
  height: calc(100svh - 24px);
  min-height: 0;
}

@media (max-width: 820px) {
  body.playground-active {
    overflow: hidden;
  }

  .playground-layout.game-mode {
    height: auto;
  }

  .playground-layout.game-mode .game-panel {
    height: calc(100svh - 16px);
  }

  .quiz-user-panel {
    grid-template-columns: 1fr;
  }

  .quiz-create-header,
  .question-form-grid,
  .quiz-play-card-split,
  .options-grid,
  .quiz-ranking-grid {
    grid-template-columns: 1fr;
  }

  .options-grid .answer-field {
    grid-column: auto;
    grid-row: auto;
  }

  .quiz-school .question-card {
    grid-template-columns: 1fr;
  }

  .question-number-badge {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    min-height: 36px;
    width: max-content;
  }

  .room-list,
  .quiz-ranking-grid section > div {
    max-height: none;
  }
}

/* Quiz create form rebuild: index / main / options */
.quiz-tab-panel[data-quiz-panel="make"].active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-tab-panel[data-quiz-panel="make"] .quiz-help,
.quiz-tab-panel[data-quiz-panel="make"] .quiz-create-header {
  flex: 0 0 auto;
}

.quiz-tab-panel[data-quiz-panel="make"] .quiz-builder-list {
  flex: 1 1 auto;
}

.quiz-school .question-card {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 70px minmax(240px, 1.2fr) minmax(260px, 1fr);
  padding: 14px;
}

.question-index {
  color: var(--deep);
  font-size: 15px;
  font-weight: 950;
  line-height: 42px;
  min-height: 42px;
  white-space: nowrap;
}

.question-main,
.question-options {
  min-width: 0;
}

.question-main {
  display: grid;
  gap: 8px;
}

.question-main .quiz-builder-row-head {
  min-height: 34px;
}

.question-main .quiz-builder-row-head button {
  min-height: 32px;
  padding: 0 10px;
}

.question-main textarea {
  height: 96px;
  min-height: 0;
  resize: none;
}

.question-options {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 80px;
}

.question-options label {
  min-width: 0;
}

.question-options .answer-field {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.question-options input,
.question-options select,
.question-main textarea {
  box-sizing: border-box;
  width: 100%;
}

.question-options input,
.question-options select {
  height: 42px;
  min-height: 42px;
}

@media (max-width: 1100px) {
  .quiz-school .question-card {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .question-options {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .quiz-user-panel {
    grid-template-columns: 1fr;
  }

  .quiz-user-actions.quiz-tabs {
    justify-content: stretch;
  }

  .quiz-user-actions.quiz-tabs button {
    flex: 1 1 130px;
  }

  .quiz-school .question-card {
    grid-template-columns: 1fr;
  }

  .question-index {
    line-height: 1.2;
    min-height: 0;
  }

  .question-options {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .question-options .answer-field {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Crossword game */
.crossword-page {
  background: #dfeec9;
  height: 100svh;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.crossword-game {
  --crossword-cell-size: clamp(20px, calc((100svh - 275px) / 13), 38px);
  background: #f8fbf7;
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 8px;
}

.crossword-game-fullscreen {
  border: 1px solid rgba(31, 58, 46, 0.16);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(31, 58, 46, 0.18);
  height: calc(100svh - 24px);
}

.crossword-status {
  background: #fff7dd;
  border: 1px solid #e3b33a;
  border-radius: 8px;
  color: #6e4a00;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  padding: 5px 8px;
}

.crossword-status.error {
  background: #fff1f1;
  border-color: #f2a1a1;
  color: #a91b1b;
}

.crossword-layout {
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  grid-template-columns: minmax(420px, 0.58fr) minmax(360px, 0.42fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.crossword-board-wrap,
.crossword-side {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 7px;
}

.crossword-board-wrap {
  align-items: center;
  display: flex;
  justify-content: center;
}

.crossword-board {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(var(--crossword-cols), var(--crossword-cell-size));
  max-height: 100%;
  max-width: 100%;
}

.crossword-cell {
  aspect-ratio: 1;
  background: #f9fbf7;
  border: 1px solid rgba(31, 58, 46, 0.28);
  border-radius: 5px;
  position: relative;
}

.crossword-cell.blocked {
  background: #244b3a;
  border-color: #244b3a;
}

.crossword-cell span {
  color: #7a5a00;
  font-size: 9px;
  font-weight: 950;
  left: 3px;
  line-height: 1;
  position: absolute;
  top: 3px;
  z-index: 1;
}

.crossword-cell input {
  background: transparent;
  border: 0;
  color: var(--deep);
  font-size: clamp(16px, calc(var(--crossword-cell-size) * 0.48), 20px);
  font-weight: 950;
  height: 100%;
  outline: 0;
  padding: 8px 2px 1px;
  text-align: center;
  width: 100%;
}

.crossword-cell input.active {
  background: rgba(255, 184, 0, 0.22);
}

.crossword-cell input.correct {
  background: #e8f7ed;
}

.crossword-cell input.wrong {
  background: #fff1f1;
}

.crossword-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.crossword-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crossword-actions button,
.crossword-clues button {
  background: #edf4f0;
  border: 1px solid #bfd6cc;
  border-radius: 8px;
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

.crossword-actions button {
  min-height: 34px;
  padding: 0 10px;
}

.crossword-actions button:first-child {
  background: var(--gold);
  border-color: #d99c00;
  color: #10140f;
}

.crossword-hint-box {
  background: #fff7dd;
  border: 1px solid #e3b33a;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  height: auto;
  min-height: 56px;
  padding: 8px 10px;
}

.crossword-hint-box strong {
  color: var(--deep);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.25;
}

.crossword-hint-box p {
  color: #6e4a00;
  font-weight: 850;
  line-height: 1.5;
  margin: 0;
  overflow: visible;
  white-space: normal;
  word-break: keep-all;
}

.crossword-clues {
  display: grid;
  align-content: start;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.crossword-clues button {
  display: grid;
  gap: 3px;
  height: auto;
  justify-items: start;
  min-height: 0;
  min-height: 56px;
  padding: 9px 10px;
  text-align: left;
  white-space: normal;
}

.crossword-clues button.active {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}

.crossword-clues b {
  font-size: 13px;
  line-height: 1.25;
}

.crossword-clues span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow: visible;
  white-space: normal;
  word-break: keep-all;
}

.world-object-crossword .object-icon {
  background: #fff7dd;
  color: #6e4a00;
}

.playground-ranking[hidden] {
  display: none !important;
}

.playground-ranking {
  background: #f8fbf7;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
}

.ranking-board-grid {
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
}

.ranking-board-grid section {
  background: #fff;
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.ranking-board-grid h3 {
  color: var(--deep);
  flex: 0 0 auto;
  font-size: 17px;
  margin: 0 0 10px;
}

.ranking-board-grid section > div {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.game-panel > .playground-ranking {
  height: calc(100% - 64px);
}

@media (max-width: 820px) {
  .crossword-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .crossword-side {
    max-height: none;
  }

  .crossword-board {
    --crossword-cell-size: clamp(22px, calc((100vw - 56px) / var(--crossword-cols)), 34px);
    grid-template-columns: repeat(var(--crossword-cols), var(--crossword-cell-size));
  }

  .crossword-cell input {
    font-size: 18px;
  }

  .ranking-board-grid {
    grid-template-columns: 1fr;
  }
}
