  /* ============ TOKENS ============ */
:root {
  --bg: #fdf6f8;
  --panel: #ffffff;
  --ink: #3b2f45;
  --muted: #7d6f88;
  --line: #f0e1e8;
  --accent: #e58aa8;
  --dahlia: #9a7fc0;
  --hibiscus: #ee7f6d;
  --sakura: #f09bb9;
  --check-bg: #eef8f4;
  --check: #3aa585;
  --shadow: 0 10px 30px rgba(120, 70, 110, .10);
  --side-w: 248px;
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1622; --panel: #2a2133; --ink: #f6eaf1; --muted: #b9a8c4; --line: #3a2e46;
    --check-bg: #243a35; --check: #6fd6b3; --shadow: 0 10px 30px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #1c1622; --panel: #2a2133; --ink: #f6eaf1; --muted: #b9a8c4; --line: #3a2e46;
  --check-bg: #243a35; --check: #6fd6b3; --shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.sr { position: absolute; left: -9999px; }

/* ============ SIDEBAR ============ */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w);
  padding: calc(28px + env(safe-area-inset-top, 0px)) 18px 24px;
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 28px; z-index: 30;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px; text-decoration: none;
  font-weight: 700; color: var(--muted);
  transition: background .25s, color .25s;
}
.nav a svg { width: 22px; height: 22px; flex: none; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { background: var(--accent); color: #fff; }
.nav .ext { margin-left: auto; width: 15px; height: 15px; opacity: .6; }
.side-foot { margin-top: auto; padding: 0 10px; font-size: .85rem; color: var(--muted); }
.side-icons { display: flex; gap: 10px; margin-top: 12px; }
.icon-btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; transition: transform .2s; }
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
#whitelist { scroll-margin-top: 80px; }

.topbar { display: none; }
.scrim { display: none; }

/* ============ LAYOUT ============ */
main { margin-left: var(--side-w); min-height: calc(100vh - 120px); }
.view { display: none; }
.view.active { display: block; animation: fade .6s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.wrap { max-width: 980px; margin: 0 auto; padding: 72px 36px; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
.section-lead { color: var(--muted); max-width: 56ch; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 14px; border-radius: 999px; background: var(--panel); color: var(--accent); box-shadow: var(--shadow); margin-bottom: 14px; }

/* ============ HOME HERO ============ */
.hero {
  position: relative; min-height: 78vh; display: grid; place-items: center;
  overflow: hidden; text-align: center; color: #fff; isolation: isolate;
  background: #f7c6d3;
  background-size: cover; background-position: center;
}
.slides { position: absolute; inset: 0; z-index: -2; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; background-size: cover; background-position: center; }
.slide.on { opacity: 1; }
.slide svg { width: 100%; height: 100%; display: block; }
.dots { position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 2; }
.dots button {
  width: 11px; height: 11px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.55); transition: width .35s, background .35s;
}
.dots button.on { width: 30px; background: #fff; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(70, 30, 70, .30), rgba(70, 30, 70, .08) 55%, rgba(70, 30, 70, .25));
}
.hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--bg) 35%, transparent) 45%, var(--bg) 100%);
}
.hero-inner { padding: 40px 28px 80px; max-width: 720px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.2rem); text-shadow: 0 4px 0 rgba(120, 50, 100, .35); }
.hero p { margin: 14px auto 28px; font-size: 1.2rem; text-shadow: 0 2px 10px rgba(80, 30, 70, .5); }
.petals { position: absolute; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.petals i {
  position: absolute; top: -20px; width: 10px; height: 10px;
  background: #ffd3e2; border-radius: 60% 0 60% 0; opacity: .9;
  animation: drift linear infinite;
}
@keyframes drift {
  to { transform: translate(-120px, 110vh) rotate(540deg); }
}

/* ============ HOME: GAMEMODE PICKER ============ */
.gm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 28px; }
.gm-card {
  --c: var(--accent);
  display: block; text-decoration: none; background: var(--panel); border-radius: 28px; padding: 28px;
  box-shadow: var(--shadow); border-top: 8px solid var(--c); transition: transform .2s;
}
.gm-card:hover { transform: translateY(-3px); }
.gm-card.cozymon { --c: var(--sakura); }
.gm-card.oneblock { --c: var(--check); }
.gm-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.gm-card p { color: var(--muted); font-size: .98rem; }
.gm-card span { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--c); }

/* ============ ABOUT + TEAM ============ */
.join-card { background: var(--panel); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.team { margin-top: 32px; display: flex; flex-direction: column; gap: 32px; }
.team-row { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 32px; }
.team-row .member { width: 170px; }
.member { background: var(--panel); border-radius: 26px; padding: 26px 20px; text-align: center; box-shadow: var(--shadow); }
.member svg { width: 84px; height: 84px; image-rendering: pixelated; margin-bottom: 14px; border-radius: 20px; background: transparent; }
.member h3 { font-size: 1.15rem; }
.member span { display: inline-block; margin-top: 6px; font-size: .85rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.about-card { margin-top: 28px; background: var(--panel); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); max-width: 760px; display: grid; gap: 14px; color: var(--muted); }
.about-card strong { color: var(--ink); }
.about-card .btn { justify-self: start; }

/* ============ STORE ============ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 44px; align-items: stretch; }
.plan {
  --c: var(--accent);
  position: relative;
  background: var(--panel); border-radius: 34px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.plan.dahlia { --c: var(--dahlia); }
.plan.hibiscus { --c: var(--hibiscus); }
.plan.sakura { --c: var(--sakura); }
.plan-head { background: linear-gradient(180deg, var(--c) 0%, var(--c) 60%, var(--panel) 100%); color: #fff; text-align: center; padding: 38px 20px 70px; }
.plan-head h3 { font-size: 1.6rem; }
.plan-price { font-family: var(--font-display); font-size: 3.4rem; font-weight: 500; margin-top: 18px; line-height: 1; }
.plan-price small { font-size: 1rem; font-weight: 400; opacity: .85; }
.plan-body { padding: 0 28px 30px; display: flex; flex-direction: column; flex: 1; }
.plan-body h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; text-align: center; margin: 0 0 18px; }
.perks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; line-height: 1.4; }
.perks li::before {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 8px; margin-top: -1px;
  background: var(--check-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233aa585' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat;
}
.buy {
  margin-top: auto; align-self: center; text-decoration: none; cursor: pointer; border: 0;
  background: var(--c); color: #fff; font: inherit; font-weight: 700;
  padding: 12px 44px; border-radius: 999px; transition: transform .2s, filter .2s;
}
.buy:hover { transform: translateY(-2px); filter: brightness(1.05); }
.store-note { margin-top: 30px; color: var(--muted); font-size: .92rem; text-align: center; }
.view.active .plan { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.view.active .plan:nth-child(2) { animation-delay: .12s; }
.view.active .plan:nth-child(3) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* store page: falling petals */
#store { position: relative; overflow: hidden; isolation: isolate; }
#store .petals { z-index: 0; }
#store .petals i { background: #f6a3c1; }
#store .wrap { position: relative; z-index: 1; }

/* buy popup */
.modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 20px; background: rgba(40, 20, 50, .55); }
.modal.open { display: grid; }
.modal-card { background: var(--panel); border-radius: 28px; padding: 30px; max-width: 480px; width: 100%; box-shadow: var(--shadow); }
.modal-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.modal-card ol { margin: 14px 0 22px; padding-left: 22px; display: grid; gap: 8px; }
.modal-card .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* accepted payments */
.pay { margin-top: 44px; text-align: center; }
.pay h3 { font-size: 1.15rem; margin-bottom: 14px; }
.pay-list { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pay-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 999px; padding: 8px 18px 8px 8px; box-shadow: var(--shadow); font-weight: 700; }
.pay-chip i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 600 1rem var(--font-display); font-style: normal; }
.pay-chip img { height: 34px; width: auto; border-radius: 50%; }

/* ============ WHITELIST STEPS ============ */
.about-text .section-lead { max-width: 60ch; }
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  background: var(--panel); border-radius: 28px; padding: 66px 26px 28px; box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step); position: absolute; top: 22px; left: 26px;
  width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
}
.steps h3 { font-size: 1.2rem; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: .98rem; }
.steps p a { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--accent); }
.steps p a[hidden] { display: none; }
.step-actions { margin-top: 28px; }
.btn {
  display: inline-block; text-decoration: none; cursor: pointer; border: 0;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700;
  padding: 13px 30px; border-radius: 999px; transition: transform .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn.ghost { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* ============ RULES + VOTE ============ */
.rules { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: rule; max-width: 760px; }
.rules li {
  counter-increment: rule; display: flex; gap: 18px; align-items: flex-start;
  background: var(--panel); border-radius: 22px; padding: 20px 24px; box-shadow: var(--shadow);
}
.rules li::before {
  content: counter(rule); flex: none; width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center; background: var(--bg); color: var(--accent);
  font-family: var(--font-display); font-weight: 600;
}
.rules h3 { font-size: 1.1rem; margin-bottom: 2px; }
.rules p { color: var(--muted); font-size: .96rem; }
.votes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; margin-top: 36px; }
.vote { background: var(--panel); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.vote h3 { font-size: 1.2rem; }
.vote p { color: var(--muted); font-size: .96rem; margin-bottom: 14px; }
.vote .btn { align-self: flex-start; margin-top: auto; }

/* ============ WORD LOGO + HEADS ============ */
.hero h1 { line-height: 0; }
.word-logo { display: block; margin: 0 auto; width: min(520px, 82vw); height: auto; filter: drop-shadow(0 5px 0 rgba(120, 50, 100, .3)); }
.member img.head { width: 84px; height: 84px; image-rendering: pixelated; border-radius: 20px; background: transparent; margin-bottom: 14px; }

/* ============ MOD LIST ============ */
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 36px; }
.mode { background: var(--panel); border-radius: 28px; box-shadow: var(--shadow); padding: 22px; }
.mode .ico {
  border-radius: 18px; display: grid; place-items: center;
  background: var(--bg); background: color-mix(in srgb, var(--p) 24%, var(--panel)); width: 52px; height: 52px; margin-bottom: 14px;
}
.mode .ico svg { width: 28px; height: 31px; image-rendering: pixelated; display: block; }
.mode h3 { font-size: 1.12rem; margin-bottom: 6px; }
.mode p { color: var(--muted); font-size: .94rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips span { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }

/* ============ FAQ + SERIES ============ */
.faqs { display: grid; gap: 14px; margin-top: 32px; max-width: 820px; }
details.faq { background: var(--panel); border-radius: 22px; box-shadow: var(--shadow); padding: 0 24px; }
details.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  font-family: var(--font-display); font-weight: 500; font-size: 1.1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--accent); flex: none; transition: transform .25s; }
details.faq[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 0 22px; color: var(--muted); font-size: .98rem; }
details.faq[open] .faq-body { animation: fade .4s ease both; }
.faq-body p { margin: 0 0 10px; }
.faq-body ul, .faq-body ol { margin: 8px 0 0; padding-left: 22px; }
.faq-body li { margin-bottom: 6px; }
.faq-body code { background: var(--bg); color: var(--ink); padding: 2px 8px; border-radius: 8px; font-size: .9em; }
.faq-body img.ref { max-width: 100%; border-radius: 16px; margin: 4px 0 14px; display: block; }
.series { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; align-items: start; }
.series-col { background: var(--panel); border-radius: 28px; padding: 24px; box-shadow: var(--shadow); overflow: hidden; }
.series-col h3 { font-size: 1.25rem; margin-bottom: 12px; }
.series-col table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.series-col th { text-align: left; font-size: .85rem; color: var(--muted); padding: 8px; border-bottom: 2px solid var(--line); }
.series-col td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.series-col tbody tr:last-child td { border-bottom: 0; }
.series-col td:last-child { font-weight: 700; }

/* ============ IMAGE PLACEHOLDER ============ */
.ph {
  border: 2px dashed var(--line); border-radius: 16px; background: var(--bg);
  min-height: 130px; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: .88rem; font-weight: 700; padding: 14px; margin: 4px 0 14px;
}
.ph svg { width: 30px; height: 30px; margin: 0 auto 4px; display: block; opacity: .6; }

/* ============ GALLERY ============ */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 36px; }
.shot { margin: 0; background: var(--panel); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.shot figcaption { padding: 12px 18px 16px; color: var(--muted); font-size: .92rem; }
.shot .ph { margin: 0; border: 0; border-radius: 0; aspect-ratio: 16 / 10; }
.hero.cat-hero { min-height: 40vh; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(30, 15, 40, .85); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: min(1100px, 100%); max-height: 88vh; border-radius: 18px; }

/* ============ SPAWN + LEGENDARY CARDS ============ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 28px; }
.scard { background: var(--panel); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.scard-head { background: var(--c, var(--accent)); color: #fff; padding: 16px 20px; }
.scard-head h3 { font-size: 1.15rem; }
.scard-body { padding: 16px 20px 20px; display: grid; gap: 12px; }
.scard-group h4 { margin: 0 0 6px; font-family: var(--font-body); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .82rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.tag.cond { background: var(--check-bg); color: var(--check); border-color: transparent; }
.tag.block { background: #fff0dc; color: #b06a1a; border-color: transparent; }
:root[data-theme="dark"] .tag.block { background: #3b2d1c; color: #f2b46b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.block { background: #3b2d1c; color: #f2b46b; } }
.scard.paradox { --c: var(--dahlia); }
.scard.ultra { --c: var(--hibiscus); }
.scard.legend { --c: var(--sakura); }
.scard-empty { color: var(--muted); font-size: .9rem; }

/* ============ NAV DROPDOWNS ============ */
.nav-parent {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 16px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--muted); text-align: left;
  transition: background .25s, color .25s;
}
.nav-parent svg { width: 22px; height: 22px; flex: none; }
.nav-parent:hover { background: var(--bg); color: var(--ink); }
.nav-group.has-active > .nav-parent { color: var(--accent); }
.nav-parent .chev { margin-left: auto; width: 16px; height: 16px; transition: transform .25s; }
.nav-group.open .chev { transform: rotate(180deg); }
.subnav { display: none; flex-direction: column; gap: 4px; margin: 4px 0 4px 22px; padding-left: 12px; border-left: 2px solid var(--line); }
.nav-group.open .subnav { display: flex; }
.nav .subnav a { padding: 9px 14px; font-size: .95rem; }
.subnav .sub-label { margin: 8px 14px 2px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .75; }

/* ============ TOOLBAR (search + filters) ============ */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input, .toolbar select {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; box-shadow: var(--shadow);
}
.search input { width: 100%; padding-left: 42px; }
.toolbar select { cursor: pointer; max-width: 100%; }
.search input:focus, .toolbar select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.result-count { margin-top: 14px; color: var(--muted); font-size: .9rem; }
.empty { margin-top: 28px; padding: 28px; background: var(--panel); border-radius: 22px; box-shadow: var(--shadow); color: var(--muted); text-align: center; }
.group-title { display: flex; align-items: baseline; gap: 12px; margin: 48px 0 0; }
.group-title:first-child { margin-top: 36px; }
.group-title small { font-family: var(--font-body); font-size: .9rem; font-weight: 700; color: var(--muted); }

/* ============ LEGENDARY PICKER ============ */
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; max-height: 250px; overflow-y: auto; padding: 4px; }
.pick {
  font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow);
  transition: transform .15s, background .2s, color .2s;
}
.pick:hover { transform: translateY(-2px); }
.pick.dotted::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.pick.has::before { background: var(--check); }
.pick[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: transparent; }
.pick[aria-pressed="true"]::before { background: #fff; }
.legend-key { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: .85rem; color: var(--muted); }
.legend-key span { display: inline-flex; align-items: center; gap: 7px; }
.legend-key i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.legend-key i.has { background: var(--check); }
.detail { margin-top: 28px; background: var(--panel); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 80px; }
.detail.hint { padding: 30px; color: var(--muted); text-align: center; }
.detail-head { background: var(--sakura); color: #fff; padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.detail-head h3 { font-size: 1.5rem; }
.badge { font-size: .8rem; font-weight: 700; padding: 4px 14px; border-radius: 999px; background: rgba(255,255,255,.28); }
.detail-body { padding: 24px 28px 28px; display: grid; gap: 6px; }
.detail-body > p { color: var(--muted); margin-bottom: 8px; }
.detail-body strong { color: var(--ink); }
.detail-body .scard-group { margin-top: 10px; }

/* ============ TOAST ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 999px;
  font-weight: 700; transition: .3s; z-index: 95;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ NEWS ============ */
.news { display: grid; gap: 22px; margin-top: 28px; }
.post { display: grid; grid-template-columns: 260px 1fr; background: var(--panel); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.post:not(:has(.post-img)) { grid-template-columns: 1fr; }
.post.pinned { border-left: 8px solid var(--accent); }
.post-img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; display: block; }
.post-body { padding: 24px 28px 26px; }
.post-body h3 { font-size: 1.4rem; margin: 6px 0 10px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; font-weight: 700; color: var(--muted); }
.post-meta .pin { background: var(--accent); color: #fff; padding: 2px 10px; border-radius: 999px; }
.post-text { color: var(--muted); }
.post-text p { margin: 0 0 10px; }
.post-text p:last-child { margin-bottom: 0; }
.post-text a { color: var(--accent); font-weight: 700; }
.post-text img { max-width: 100%; border-radius: 14px; }
.news-more { margin-top: 18px; }

/* ============ ONEBLOCK TOGGLE ============ */
html.no-oneblock [data-oneblock] { display: none !important; }
html.no-oneblock .gm-grid { grid-template-columns: 1fr; max-width: 480px; }

/* ============ ADMIN EXTRAS ============ */
.word-fallback { display: block; line-height: 1.1; }
.form label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.form label.check input { width: auto; }
.form .preview { max-height: 160px; object-fit: contain; image-rendering: auto; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .plans { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; }
  .series { grid-template-columns: 1fr; }
  .gm-grid { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .post-img { max-height: 240px; }
}
@media (max-width: 820px) {
  main { margin-left: 0; padding-top: 64px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; top: 0; left: 0; right: 0; z-index: 25;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 18px 10px;
    background: var(--panel); border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; }
  .topbar .brand-mark { width: 32px; height: 32px; }
  .menu-btn { border: 0; background: var(--bg); color: var(--ink); width: 42px; height: 42px; border-radius: 14px; cursor: pointer; display: grid; place-items: center; }
  .menu-btn svg { width: 22px; height: 22px; }
  .sidebar { transform: translateX(-100%); transition: transform .3s ease; box-shadow: var(--shadow); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(40, 20, 50, .45); z-index: 28; }
  .wrap { padding: 52px 20px; }
  .hero { min-height: 70vh; }
  .team-row { gap: 18px; }
  .team-row .member { width: calc(50% - 9px); min-width: 140px; }
  }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .petals { display: none; }
}

/* =====================================================
   PAGES BUILT FROM BLOCKS
   ===================================================== */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--panel); padding: 10px 16px; border-radius: 12px; }
.skip:focus { left: 12px; }
#page { outline: none; }
.page-loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: 8px; }
.page-loading span { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.page-loading span:nth-child(2) { animation-delay: .15s; }
.page-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 50% { transform: scale(.5); opacity: .4; } }
body.ready #page > .wrap, body.ready #page > .blk { animation: fade .5s ease both; }

/* spacing between blocks: sections start with a heading */
.blk + .blk { margin-top: 28px; }
.blk + .blk-heading { margin-top: 72px; }
.blk > :first-child { margin-top: 0; }
.heading.center { text-align: center; }
.heading.center .section-lead { margin-inline: auto; }
.hero-title { font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.1 !important; text-shadow: 0 4px 0 rgba(120, 50, 100, .35); }
.blk-hero .hero:not(.cat-hero) { min-height: 78vh; }

/* rich text written in the staff site */
.prose { color: var(--muted); max-width: 70ch; }
.prose > * + * { margin-top: 12px; }
.prose strong, .prose b { color: var(--ink); }
.prose a { color: var(--accent); font-weight: 700; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 0; }
.prose li + li { margin-top: 6px; }
.prose code, .step-text code, .rule-text code { background: var(--bg); color: var(--ink); padding: 2px 8px; border-radius: 8px; font-size: .9em; }
.prose img, .faq-body img, .step-text img, .post-text img { max-width: 100%; height: auto; border-radius: 16px; display: block; margin: 8px 0 14px; }
.about-card.prose { max-width: 760px; margin-top: 0; }
.step-text, .rule-text { color: var(--muted); font-size: .98rem; }
.step-text p + p, .rule-text p + p, .faq-body p + p { margin-top: 10px; }
.ph { display: none; }

.pic { margin: 0; max-width: 760px; }
.pic.wide { max-width: 100%; }
.pic.full { max-width: none; margin-inline: -36px; }
.pic img { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: var(--shadow); }
.pic.full img { border-radius: 0; }
.pic figcaption { margin-top: 10px; color: var(--muted); font-size: .92rem; text-align: center; }
.gallery.small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-top: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }
.gm-card span::after { content: " ›"; }
.plan.moss { --c: var(--check); }
.not-found { text-align: center; min-height: 60vh; display: grid; place-content: center; gap: 14px; }
.not-found .section-lead { margin-inline: auto; }
.member svg.head { width: 84px; height: 84px; border-radius: 20px; margin-bottom: 14px; }
.vote button.btn { align-self: flex-start; margin-top: auto; }
.lightbox img[src=""] { display: none; }
@media (max-width: 820px) {
  .pic.full { margin-inline: -20px; }
  .blk + .blk-heading { margin-top: 56px; }
}

/* ============ FOOTER ============ */
.site-footer { margin-left: var(--side-w); border-top: 1px solid var(--line); background: var(--panel); }
.footer-inner { max-width: 980px; margin: 0 auto; padding: 28px 36px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-text { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.footer-text p:first-child { color: var(--ink); font-weight: 700; }
.socials { display: flex; gap: 10px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--bg); border: 1px solid var(--line); transition: transform .2s, color .2s, border-color .2s; }
.socials a:hover { transform: translateY(-2px); color: var(--accent); border-color: var(--accent); }
.socials svg { width: 20px; height: 20px; }
@media (max-width: 820px) {
  .site-footer { margin-left: 0; }
  .footer-inner { padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); flex-direction: column; text-align: center; }
}
