/* ผังเว็บ (ผู้ใช้เลือก 2026-11-19 หลังดูเว็บทางการ ECO, ECO SAKURA และ Nekogame): แถบเมนูบน, ส่วนหัวพร้อมโลโก้ขยับได้,
   ข่าว + ปิดปรับปรุง, เริ่มเล่น 3 ขั้นพร้อมหมี, ส่วนท้าย; หน้าคู่มือและหน้าดาวน์โหลดใช้แถบบนและส่วนท้ายเดียวกัน.
   เว็บห้ามสไตล์ในบรรทัด HTML (Content-Security-Policy) หน้าตาทั้งหมดจึงอยู่ในไฟล์นี้ */

:root {
  --brown: #6b3d1e;
  --cream: #fff4c4;
  --gold-shadow: #e6c461;
  --card: #fffdf6;
  --topbar-h: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
}

/* style.css ตั้ง overflow-x: hidden ที่ html, body ทำให้ body กลายเป็นกล่องเลื่อนเอง แถบเมนูบน (sticky) เลยไม่ติดบนจอ;
   clip ตัดส่วนล้นด้านข้างเหมือนเดิมแต่ไม่สร้างกล่องเลื่อน (เบราว์เซอร์เก่าที่ไม่รู้จัก clip ใช้ hidden ต่อไป) */
@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

/* แถบเมนูบน: โลโก้เล็กซ้าย เมนูกลาง เข้าสู่ระบบ/สมัครขวา (แบบที่ทั้ง 3 เว็บใช้) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 252, 240, 0.92);
  border-bottom: 3px solid #fff;
  box-shadow: 0 4px 0 rgba(230, 196, 97, 0.55), 0 8px 18px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1120px, 94vw);
  min-height: var(--topbar-h);
  margin: 0 auto;
}

.brand img {
  display: block;
  width: 108px;
  height: auto;
  transition: transform 0.25s cubic-bezier(0.3, 1.8, 0.5, 1);
}

.brand:hover img {
  transform: rotate(-3deg) scale(1.06);
}

.mainnav {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 6px;
}

.mainnav a,
.footer-nav a {
  padding: 8px 14px;
  color: var(--brown);
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 15px;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mainnav a:hover,
.mainnav a[aria-current="page"] {
  background: var(--cream);
  transform: translateY(-1px);
}

.topbar-account {
  display: flex;
  gap: 8px;
}

/* ปุ่มเล็กแบบเม็ดยา ใช้ทั้งแถบบนและการ์ด */
.pill {
  display: inline-block;
  padding: 7px 18px;
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 14px;
  text-decoration: none;
  border: 3px solid #fff;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pill:hover {
  transform: translateY(-2px);
}

.pill-light {
  color: var(--brown);
  background: var(--cream);
  box-shadow: 0 3px 0 var(--gold-shadow), 0 6px 10px rgba(0, 0, 0, 0.15);
}

.pill-warm {
  color: #7a2d3f;
  background: #ffd3dc;
  box-shadow: 0 3px 0 #e79aae, 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* ส่วนหัว: เต็มจอใต้แถบบน */
.hero {
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100svh - var(--topbar-h));
}

.content {
  padding-top: 3vh;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-actions .discord-btn {
  min-width: min(240px, 84vw);
}

.discord-btn.download-btn {
  color: #7a2d3f;
  background: #ffd3dc;
  box-shadow: 0 4px 0 #e79aae, 0 8px 14px rgba(0, 0, 0, 0.22);
}

.discord-btn.download-btn:hover {
  box-shadow: 0 7px 0 #e79aae, 0 12px 20px rgba(0, 0, 0, 0.25);
}

/* แถบเนื้อหาใต้ส่วนหัว */
.band {
  padding: 56px 0;
  background: linear-gradient(180deg, #bfe3fb 0%, #e6f4ff 100%);
}

.band-alt {
  background: linear-gradient(180deg, #fff3f6 0%, #fff9ec 100%);
}

.band-inner {
  width: min(1120px, 94vw);
  margin: 0 auto;
}

.band-title,
.card-title,
.page-title {
  margin: 0 0 18px;
  color: var(--brown);
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-weight: 400;
}

.band-title {
  text-align: center;
  font-size: clamp(24px, 3vw, 34px);
}

.card {
  padding: 22px 24px;
  background: var(--card);
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: 0 5px 0 var(--gold-shadow), 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-title {
  font-size: 22px;
}

.empty {
  margin: 6px 0;
  color: #8a6a4f;
  font: 600 15px/1.6 "Mali", sans-serif;
}

/* ข่าว + ปิดปรับปรุง (แบบเว็บทางการ: รายการข่าวมีป้ายประเภทกับวันที่ กล่องปิดปรับปรุงอยู่ข้าง) */
.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 2px dashed #f1e2bd;
  font: 600 15px/1.5 "Mali", sans-serif;
  color: #4a3626;
}

.news-item:last-child {
  border-bottom: 0;
}

.news-tag {
  flex: none;
  min-width: 96px;
  padding: 3px 10px;
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 12px;
  text-align: center;
  border-radius: 999px;
}

.tag-patch { color: #2b3f86; background: #dce6ff; }
.tag-event { color: #7a2d3f; background: #ffd9e1; }
.tag-shop { color: #6b4a00; background: #ffeab0; }
.tag-info { color: #1f5e4a; background: #d4f3e6; }
.tag-maint { color: #5b4a3d; background: #ece3d9; }

.news-title {
  flex: 1;
  min-width: 0;
}

.news-new {
  margin-right: 8px;
  padding: 1px 7px;
  color: #fff;
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 11px;
  background: #ff7e9a;
  border-radius: 999px;
}

.news-date {
  flex: none;
  color: #9a7b5e;
  font-size: 13px;
}

.maint-body p {
  margin: 4px 0;
  color: #4a3626;
  font: 600 15px/1.6 "Mali", sans-serif;
}

.maint-body .maint-title {
  color: var(--brown);
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-weight: 400;
}

/* เริ่มเล่น 3 ขั้น: หมีขั้นละตัว ลอยขึ้นลงเบาๆ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 24px;
  text-align: center;
  background: var(--card);
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: 0 5px 0 var(--gold-shadow), 0 12px 24px rgba(0, 0, 0, 0.12);
}

.step h3 {
  margin: 0;
  color: var(--brown);
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 18px;
  font-weight: 400;
}

.step-bear,
.page-bear {
  width: auto;
  height: 170px;
  animation: bear-bob 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 8px rgba(110, 55, 20, 0.18));
}

.step:nth-child(2) .step-bear { animation-delay: 0.5s; }
.step:nth-child(3) .step-bear { animation-delay: 1s; }

.step:hover .step-bear {
  animation-duration: 0.9s;
}

@keyframes bear-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

.step-no {
  position: absolute;
  top: 14px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 18px;
  background: #ffb56e;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 3px 0 #eaa46a;
}

/* หน้าคู่มือ / ดาวน์โหลด */
.subpage {
  background: linear-gradient(180deg, #bfe3fb 0%, #fff3f6 100%);
}

.page {
  min-height: calc(100vh - var(--topbar-h) - 220px);
  padding: 56px 0;
}

.page-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.page-title {
  font-size: clamp(26px, 3vw, 36px);
}

/* ส่วนท้าย */
.site-footer {
  padding: 30px 0 26px;
  background: #fff8e6;
  border-top: 3px solid #fff;
  box-shadow: 0 -4px 0 rgba(230, 196, 97, 0.55);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(1120px, 94vw);
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  width: 150px;
  height: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.footer-note,
.footer-copy {
  margin: 0;
  color: #8a6a4f;
  font: 600 12px/1.5 "Mali", sans-serif;
  letter-spacing: 0.04em;
}

/* จอเล็ก: เมนูลงไปแถวที่สอง เลื่อนข้างได้; การ์ดเรียงเป็นแถวเดียว */
@media (max-width: 860px) {
  :root {
    --topbar-h: 104px;
  }

  .topbar-inner {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 6px 0;
  }

  .brand img {
    width: 84px;
  }

  .topbar-account {
    margin-left: auto;
  }

  .mainnav {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .mainnav a {
    flex: none;
    padding: 6px 12px;
    font-size: 14px;
  }

  .news-grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-item {
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .news-title {
    flex: 1 0 100%;
    order: 3;
  }

  .band {
    padding: 40px 0;
  }
}

/* หน้าดาวน์โหลด (แบบเว็บ ECO ที่ศึกษา: ไฟล์หลักพร้อมรายละเอียด + กล่องช่วยเหลือ + วิธีติดตั้งเป็นขั้น) */
.page-title-center {
  text-align: center;
}

.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 22px;
}

.download-main {
  display: flex;
  align-items: center;
  gap: 24px;
}

.download-main .page-bear {
  flex: none;
  height: 190px;
}

.dl-tag {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 12px;
  color: #7a2d3f;
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 12px;
  background: #ffd9e1;
  border-radius: 999px;
}

.dl-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}

.dl-facts div {
  padding: 8px 10px;
  background: #fff;
  border: 2px solid #f1e2bd;
  border-radius: 14px;
}

.dl-facts dt {
  color: #9a7b5e;
  font: 600 12px/1.3 "Mali", sans-serif;
}

.dl-facts dd {
  margin: 2px 0 0;
  color: var(--brown);
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 15px;
}

.download-side .pill {
  margin-top: 6px;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  position: relative;
  padding: 18px 18px 18px 64px;
  background: #fff;
  border: 2px solid #f1e2bd;
  border-radius: 18px;
}

.install-steps .step-no {
  top: 16px;
  left: 14px;
}

.install-steps h3 {
  margin: 4px 0 6px;
  color: var(--brown);
  font-family: "Mochiy Pop One", "Mali", sans-serif;
  font-size: 17px;
  font-weight: 400;
}

.install-steps p {
  margin: 0;
  color: #4a3626;
  font: 600 14px/1.6 "Mali", sans-serif;
}

@media (max-width: 860px) {
  .download-grid,
  .install-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .download-main {
    flex-direction: column;
    text-align: center;
  }

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