/* Evernest World website: the game's type system (docs/UI_Draft/typography.html):
   Fredoka gradient titles with a white outline, pastel pills, Nunito body on frosted cards. */
@font-face { font-family: Fredoka; src: url(/assets/fonts/Fredoka.ttf) format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(/assets/fonts/Nunito.ttf) format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --ink: #4f5d7a; --ink2: #6f7c97; --ink3: #9aa4ba; --head: #4b6fd0;
  --pink: #ff8fb1; --pink-d: #e5638d; --sky: #7cc4ff; --sky-d: #4b8fe0; --honey: #ffcd6a; --honey-d: #d9952a;
  --mint: #4fcfb3; --mint-d: #22a892; --lav: #b59cf0; --lav-d: #7f63c9; --coral: #f27466; --coral-d: #c8503f;
  --card: rgba(255,255,255,.78); --card-solid: #fff; --line: rgba(120,140,200,.18);
  --g-common: #5f6e80; --g-uncommon: #2f8a4c; --g-rare: #2668b5; --g-epic: #8240bd; --g-legendary: #c27d00;
  --r-sm: 14px; --r-md: 22px; --r-lg: 30px;
  --sh: 0 10px 30px rgba(120,140,200,.18), inset 0 0 0 2px rgba(255,255,255,.9);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Nunito, system-ui, sans-serif; font-weight: 700; color: var(--ink); line-height: 1.55;
  background: linear-gradient(180deg, #d8efff 0%, #f6e9ff 55%, #ffe6ef 100%) fixed; min-height: 100vh; }
a { color: var(--head); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- display titles ---------- */
.display { font-family: Fredoka, Nunito, sans-serif; font-weight: 700; line-height: 1.04; letter-spacing: .5px; margin: 0;
  background: linear-gradient(180deg, #d9f0ff 0%, #8fd0ff 45%, #3f97ef 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(2px 2px 0 #fff) drop-shadow(-2px -2px 0 #fff)
          drop-shadow(0 6px 0 rgba(75,143,224,.32)) drop-shadow(0 10px 16px rgba(75,143,224,.3)); }
.display.pink { background-image: linear-gradient(180deg, #ffe0ea 0%, #ff9fbf 45%, #f0628f 100%);
  filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(2px 2px 0 #fff) drop-shadow(-2px -2px 0 #fff)
          drop-shadow(0 6px 0 rgba(229,99,141,.32)) drop-shadow(0 10px 16px rgba(229,99,141,.28)); }
.display.honey { background-image: linear-gradient(180deg, #fff1cc 0%, #ffcd6a 45%, #f0a020 100%);
  filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(2px 2px 0 #fff) drop-shadow(-2px -2px 0 #fff)
          drop-shadow(0 6px 0 rgba(217,149,42,.32)) drop-shadow(0 10px 16px rgba(217,149,42,.28)); }
.display.mint { background-image: linear-gradient(180deg, #dcf7ef 0%, #79dcc6 45%, #22a892 100%);
  filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(2px 2px 0 #fff) drop-shadow(-2px -2px 0 #fff)
          drop-shadow(0 6px 0 rgba(34,168,146,.3)) drop-shadow(0 10px 16px rgba(34,168,146,.25)); }
.d1 { font-size: clamp(44px, 8vw, 86px); } .d2 { font-size: clamp(34px, 5vw, 54px); } .d3 { font-size: clamp(26px, 3.4vw, 38px); }

.pill { display: inline-block; font-family: Fredoka, sans-serif; font-weight: 700; color: #fff; font-size: clamp(16px, 2.2vw, 22px); padding: 7px 26px;
  border-radius: 999px; background: linear-gradient(180deg, #ff9cbc, var(--pink)); box-shadow: 0 4px 0 var(--pink-d), inset 0 0 0 3px rgba(255,255,255,.65);
  text-shadow: 0 2px 0 rgba(197,70,110,.45); letter-spacing: .3px; }
.pill.sky { background: linear-gradient(180deg, #9cd6ff, var(--sky)); box-shadow: 0 4px 0 var(--sky-d), inset 0 0 0 3px rgba(255,255,255,.65); text-shadow: 0 2px 0 rgba(60,110,190,.45); }
.pill.honey { background: linear-gradient(180deg, #ffe09a, var(--honey)); box-shadow: 0 4px 0 var(--honey-d), inset 0 0 0 3px rgba(255,255,255,.65); text-shadow: 0 2px 0 rgba(170,100,20,.4); }
.pill.mint { background: linear-gradient(180deg, #8fe6d2, var(--mint)); box-shadow: 0 4px 0 var(--mint-d), inset 0 0 0 3px rgba(255,255,255,.65); text-shadow: 0 2px 0 rgba(20,120,100,.4); }
.pill.small { font-size: 15px; padding: 4px 16px; box-shadow: 0 3px 0 var(--pink-d), inset 0 0 0 2px rgba(255,255,255,.65); }
.pill.sky.small { box-shadow: 0 3px 0 var(--sky-d), inset 0 0 0 2px rgba(255,255,255,.65); }
.pill.mint.small { box-shadow: 0 3px 0 var(--mint-d), inset 0 0 0 2px rgba(255,255,255,.65); }
.pill.honey.small { box-shadow: 0 3px 0 var(--honey-d), inset 0 0 0 2px rgba(255,255,255,.65); }

.frost { background: var(--card); border-radius: var(--r-lg); padding: 24px 28px; box-shadow: var(--sh); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.card { background: rgba(255,255,255,.62); border-radius: var(--r-md); padding: 20px; box-shadow: 0 6px 20px rgba(120,140,200,.12), inset 0 0 0 2px rgba(255,255,255,.85); }
.muted { color: var(--ink2); font-weight: 800; }
.small { font-size: 14px; }

.btn { display: inline-flex; align-items: center; gap: 8px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 18px; border: 0; cursor: pointer;
  padding: 11px 24px; border-radius: 999px; color: #fff; background: linear-gradient(180deg, #ff9cbc, var(--pink)); box-shadow: 0 4px 0 var(--pink-d);
  text-decoration: none !important; transition: transform .08s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--pink-d); }
.btn.sky { background: linear-gradient(180deg, #9cd6ff, var(--sky)); box-shadow: 0 4px 0 var(--sky-d); }
.btn.white { background: #fff; color: var(--head); box-shadow: 0 4px 0 rgba(120,140,200,.35); }
.btn img { width: 26px; height: 26px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(120,140,200,.15); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: Fredoka, sans-serif; font-size: 22px; color: #3d4a6b; text-decoration: none !important; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { font-family: Fredoka, sans-serif; font-weight: 500; font-size: 17px; color: var(--ink); padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a.on { background: rgba(124,196,255,.22); text-decoration: none; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 900; color: var(--ink2); background: #fff;
  padding: 6px 12px; border-radius: 999px; box-shadow: 0 2px 0 rgba(120,140,200,.25); white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c7ccd8; display: inline-block; }
.dot.up { background: #3fcf8e; box-shadow: 0 0 0 4px rgba(63,207,142,.18); }
.dot.down { background: #f27466; }
.menu-btn { display: none; margin-left: auto; background: #fff; border: 0; border-radius: 12px; width: 44px; height: 40px; font-size: 22px; color: var(--ink); cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(86vh, 760px); display: grid; place-items: center; text-align: center; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; background: url(/assets/shots/load_town.jpg) center 40% / cover; }
.hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(216,239,255,.15) 0%, rgba(216,239,255,.05) 45%, rgba(246,233,255,.9) 100%); }
.hero .inner { position: relative; padding: 70px 16px 90px; }
.hero .logo { width: min(520px, 86vw); filter: drop-shadow(0 10px 24px rgba(60,80,140,.25)); }
.hero .tag { margin: 22px 0 26px; }
.hero .lead { max-width: 720px; margin: 0 auto 28px; font-size: clamp(17px, 2.2vw, 20px); }
.hero .ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.spark { position: absolute; color: #fff; font-size: 26px; opacity: .9; text-shadow: 0 2px 6px rgba(75,143,224,.4); }

section.block { padding: 70px 0 20px; }
.sec-head { text-align: center; margin-bottom: 30px; }
.sec-head .pill { margin-top: 14px; }
.sec-head p { max-width: 720px; margin: 16px auto 0; color: var(--ink2); }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.feature { display: flex; flex-direction: column; gap: 6px; }
.feature .ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(180deg, #fff, #f2f7ff);
  box-shadow: 0 4px 0 rgba(120,140,200,.25); margin-bottom: 6px; }
.feature .ic img { width: 48px; height: 48px; }
.feature h3 { font-family: Fredoka, sans-serif; font-weight: 700; color: var(--head); font-size: 22px; margin: 0; }
.feature p { margin: 0; color: var(--ink); font-size: 16px; }
.feature .more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 900; }

/* ---------- screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shots figure { margin: 0; position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/9; cursor: zoom-in;
  box-shadow: 0 8px 22px rgba(80,100,160,.22), inset 0 0 0 3px #fff; background: #dfe9f7; }
.shots figure:first-child { grid-column: span 2; grid-row: span 2; }
.shots img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.shots figure:hover img { transform: scale(1.04); }
.shots figcaption { position: absolute; left: 10px; bottom: 10px; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(30,40,70,.82); display: none; place-items: center; padding: 16px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: min(1400px, 100%); max-height: 88vh; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox .cap { color: #fff; font-family: Fredoka, sans-serif; font-size: 22px; text-align: center; margin-top: 12px; }

/* ---------- items strip ---------- */
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 8px 4px 16px; scrollbar-width: thin; }
.strip .it { flex: 0 0 auto; width: 112px; text-align: center; font-size: 13px; font-weight: 900; color: var(--ink2); }
.strip .it img { width: 96px; height: 96px; display: block; margin: 0 auto 6px; filter: drop-shadow(0 4px 6px rgba(80,100,160,.2)); }

/* ---------- news ---------- */
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.post h3 { font-family: Fredoka, sans-serif; color: var(--head); font-size: 22px; margin: 8px 0 6px; }
.post .meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink2); font-weight: 900; }
.post .body { white-space: pre-line; font-size: 16px; }
.post img.cover { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: 16px; margin-bottom: 6px; }
.empty { text-align: center; color: var(--ink2); padding: 30px; }

/* ---------- status + download ---------- */
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 14px; }
.stat { background: #fff; border-radius: 18px; padding: 14px 18px; min-width: 130px; box-shadow: 0 4px 0 rgba(120,140,200,.2); }
.stat b { display: block; font-family: Fredoka, sans-serif; font-size: 30px; color: var(--head); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--ink2); font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.download { text-align: center; background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,240,247,.85)); }
.download .phone { width: 120px; height: 120px; margin: 0 auto 8px; }

footer.foot { margin-top: 70px; padding: 30px 0 40px; background: rgba(255,255,255,.5); font-size: 14px; color: var(--ink2); }
footer.foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* ---------- wiki ---------- */
.wiki-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; padding-top: 26px; }
.wiki-main { min-width: 0; }
.side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; color: var(--ink); font-weight: 800; font-size: 15px; }
.side a img { width: 26px; height: 26px; }
.side a:hover { background: rgba(255,255,255,.7); text-decoration: none; }
.side a.on { background: #fff; color: var(--head); box-shadow: 0 3px 0 rgba(120,140,200,.22); }
.side h4 { font-family: Fredoka, sans-serif; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink3); margin: 16px 12px 6px; }
.wiki-main h1 { margin: 6px 0 10px; }
.wiki-main h2 { font-family: Fredoka, sans-serif; color: var(--head); font-size: 26px; margin: 34px 0 12px; }
.wiki-main h3 { font-family: Fredoka, sans-serif; color: var(--ink); font-size: 20px; margin: 22px 0 8px; }
.intro { font-size: 17px; max-width: 820px; }
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); background: rgba(255,255,255,.72); box-shadow: var(--sh); }
table.t { border-collapse: collapse; width: 100%; font-size: 15px; }
table.t th { text-align: left; padding: 11px 12px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink2); background: rgba(255,255,255,.7);
  position: sticky; top: 0; white-space: nowrap; }
table.t td { padding: 9px 12px; border-top: 2px solid rgba(240,244,252,.95); vertical-align: middle; }
table.t tr:hover td { background: rgba(255,255,255,.6); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t td.c, table.t th.c { text-align: center; }
table.t th.ic { width: 64px; }
table.t td .ico { display: block; max-width: none; flex: none; }
table.t th, table.t td { vertical-align: middle; }
table.t th:first-child, table.t td:first-child { padding-left: 16px; }
table.t th:last-child, table.t td:last-child { padding-right: 18px; }
table.t td.num .pt, table.t td.num img { vertical-align: -3px; }
.ico { width: 44px; height: 44px; object-fit: contain; display: block; }
.emoji { font-size: 26px; line-height: 1; width: 44px; text-align: center; display: inline-block; }
.petals { white-space: nowrap; }
.petals::before { content: ""; display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; background: url(/assets/kit/petals.png) center/contain no-repeat; }
.roots { white-space: nowrap; } /* Ever Root (premium support currency) */
.roots::before { content: ""; display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; background: url(/assets/kit/roots.png) center/contain no-repeat; }
.grade { font-weight: 900; font-size: 13px; }
.g1 { color: var(--g-common); } .g2 { color: var(--g-uncommon); } .g3 { color: var(--g-rare); } .g4 { color: var(--g-epic); } .g5 { color: var(--g-legendary); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 900; color: var(--ink2); box-shadow: 0 2px 0 rgba(120,140,200,.2); white-space: nowrap; }
.chip.pink { background: #ffe3ec; color: var(--pink-d); } .chip.sky { background: #e2f1ff; color: var(--sky-d); } .chip.mint { background: #dcf7ef; color: var(--mint-d); }
.chip.honey { background: #fff1cc; color: #a8701a; } .chip.lav { background: #efe8ff; color: var(--lav-d); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile .ttl { display: flex; align-items: center; gap: 10px; font-family: Fredoka, sans-serif; font-size: 19px; color: var(--head); }
.tile .ttl img { width: 52px; height: 52px; object-fit: contain; }
.wiki-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.wiki-index a.card { display: flex; gap: 14px; align-items: center; color: var(--ink); text-decoration: none; transition: transform .1s; }
.wiki-index a.card:hover { transform: translateY(-2px); }
.wiki-index a.card img { width: 56px; height: 56px; }
.wiki-index a.card b { display: block; font-family: Fredoka, sans-serif; font-size: 20px; color: var(--head); }
.wiki-index a.card span { font-size: 14px; color: var(--ink2); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.filters input, .filters select { font: inherit; font-weight: 800; color: var(--ink); background: #fff; border: 2px solid #e6ecf7; border-radius: 14px; padding: 9px 12px; min-width: 0; }
.filters input[type=search] { flex: 1 1 240px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--sky); }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 16px 0; }
.note { background: #fff8e1; border-radius: 16px; padding: 12px 16px; font-size: 15px; box-shadow: inset 0 0 0 2px #ffe9a8; }
.kv { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .kv { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.kv b .petals { font-size: inherit; }
.kv b .petals::before { width: 20px; height: 20px; }
.kv div { background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: 0 3px 0 rgba(120,140,200,.18); }
.kv b { display: block; font-family: Fredoka, sans-serif; font-size: 22px; color: var(--head); }
.kv span { font-size: 13px; color: var(--ink2); font-weight: 900; }
.need { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 10px; padding: 2px 8px 2px 4px; margin: 2px; font-size: 13px; box-shadow: 0 2px 0 rgba(120,140,200,.2); white-space: nowrap; }
.need img { width: 24px; height: 24px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }

@media (max-width: 900px) {
  .shots { grid-template-columns: 1fr 1fr; }
  .shots figure:first-child { grid-column: span 2; grid-row: auto; }
  .two { grid-template-columns: 1fr; }
  .wiki-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; display: none; }
  .side.open { display: block; }
  .wiki-toggle { display: inline-flex !important; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: rgba(255,255,255,.96);
    padding: 10px 16px 16px; box-shadow: 0 10px 20px rgba(120,140,200,.2); }
  .nav.open { display: flex; }
  .top .status-chip { display: none; }
  .nav .status-chip { display: inline-flex; align-self: flex-start; }
  .shots { grid-template-columns: 1fr; }
  .shots figure:first-child { grid-column: auto; }
  .frost { padding: 18px; }
  table.t { font-size: 14px; }
  .hide-sm { display: none; }
}
.wiki-toggle { display: none; }
