:root {
  --ink: #29363a;
  --cream: #fdf2dc;
  --paper: #fffdf7;
  --gold: #e1a43d;
  --gold-light: #f7c763;
  --teal: #007e83;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: #e3d5b8;
  color: var(--ink);
  font-family: "Noto Sans Thai", Tahoma, sans-serif;
}
a { color: inherit; }
.game-site {
  width: min(100%, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
}
.game-header {
  display: flex;
  height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2%;
  background: #fff2cc;
}
.game-header-logo { display: block; width: 228px; height: auto; }
.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(15px, 2.4vw, 34px);
  margin-left: auto;
  margin-right: 0;
}
.top-nav-link {
  position: relative;
  padding: 7px 2px 8px;
  color: #31545d;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}
.top-nav-link:hover,.top-nav-link:focus-visible { color: var(--teal); outline: 0; }
.top-nav-link::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: #d89b2f;
  content: "";
  opacity: 0;
  transform: scaleX(.45);
  transition: opacity 180ms ease, transform 180ms ease;
}
.top-nav-link:hover::after,.top-nav-link:focus-visible::after { opacity: 1; transform: scaleX(1); }
.game-login {
  padding: 6px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg,#12979a,#007e83);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}
.game-hero {
  position: relative;
  display: flex;
  min-height: clamp(390px, 40vw, 560px);
  align-items: center;
  overflow: hidden;
  background: var(--hero-image) center / cover no-repeat;
  isolation: isolate;
}
.game-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,rgba(10,10,8,.9),rgba(10,10,8,.56) 38%,rgba(10,10,8,.12) 76%,rgba(10,10,8,.32));
  content: "";
}
.game-hero-content {
  width: min(660px, 88%);
  margin-left: clamp(28px, 8vw, 112px);
  padding: 48px 0;
  color: #fff8e9;
}
.game-kicker {
  display: inline-block;
  margin: 0 0 11px;
  padding: 5px 13px 6px;
  border: 1px solid rgba(247,199,99,.75);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.3;
}
.game-hero h1 {
  margin: 0;
  color: #fff1c7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 5.7vw, 82px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1;
  text-shadow: 0 4px 10px rgba(0,0,0,.45);
}
.game-hero h1 span {
  display: block;
  color: var(--hero-accent, #f4b845);
  font-family: "Noto Sans Thai", Tahoma, sans-serif;
  font-size: .32em;
  letter-spacing: .04em;
  line-height: 1.5;
}
.game-hero p {
  max-width: 570px;
  margin: 18px 0 0;
  color: rgba(255,249,232,.94);
  font-size: clamp(17px,1.65vw,24px);
  font-weight: 600;
  line-height: 1.6;
  text-shadow: 0 2px 5px rgba(0,0,0,.45);
}
.game-hero-cta {
  display: inline-flex;
  margin-top: 25px;
  align-items: center;
  gap: 11px;
  padding: 10px 23px 11px;
  border-radius: 14px;
  background: linear-gradient(180deg,#ffd45d,#efa62e);
  color: #5b410b;
  box-shadow: 0 5px 0 rgba(65,43,5,.28),0 8px 18px rgba(0,0,0,.2);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
  text-decoration: none;
}
.game-content { padding: clamp(32px,5vw,62px) clamp(22px,6vw,85px) 70px; background: var(--cream); }
.story-layout {
  display: grid;
  width: min(1120px,100%);
  margin: 0 auto;
  grid-template-columns: minmax(0,1.3fr) minmax(270px,.7fr);
  gap: 28px;
  align-items: stretch;
}
.story-card,.feature-card {
  border: 1px solid rgba(205,158,77,.26);
  border-radius: 19px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(147,101,37,.09);
}
.story-card { padding: clamp(23px,3.2vw,40px); }
.section-kicker { margin: 0 0 5px; color: #a3561b; font-size: 15px; font-weight: 800; }
.story-card h2,.feature-card h2 { margin:0; color:#11516a; font-size:clamp(25px,2.8vw,38px); font-weight:900; letter-spacing:-.04em; line-height:1.2; }
.story-card h2 { padding-bottom:10px; border-bottom:2px solid #e4c57a; }
.story-card p { margin:17px 0 0; color:#4f5e60; font-size:clamp(15px,1.15vw,18px); font-weight:500; line-height:1.8; }
.feature-card { padding:clamp(23px,3.2vw,34px); background:linear-gradient(145deg,rgba(255,255,250,.95),rgba(255,245,210,.9)); }
.feature-card h2 { font-size:clamp(22px,2.3vw,30px); }
.feature-list { display:grid; gap:17px; margin:23px 0 0; padding:0; list-style:none; }
.feature-list li { display:grid; grid-template-columns:37px minmax(0,1fr); gap:11px; align-items:start; color:#4f5e60; font-size:15px; line-height:1.55; }
.feature-list strong { display:block; color:#12566d; font-size:16px; font-weight:900; }
.feature-icon { display:grid; width:35px; height:35px; place-items:center; border-radius:50%; background:var(--feature-bg,#fff0d1); color:var(--feature-color,#b06d20); font-size:19px; }
.player-section { width:min(1120px,100%); margin:34px auto 0; padding:clamp(20px,3vw,34px); border-radius:21px; background:linear-gradient(145deg,#061b28,#0c3344); box-shadow:0 12px 28px rgba(11,42,52,.2); }
.player-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:17px; color:#fff4d1; }
.player-heading h2,.player-heading p { margin:0; } .player-heading h2 { font-size:clamp(22px,2.3vw,31px); font-weight:900; line-height:1.25; }
.player-heading p { color:rgba(255,247,225,.7); font-size:14px; font-weight:600; line-height:1.4; text-align:right; }
.game-frame { display:block; width:100%; aspect-ratio:16/9; min-height:420px; border:2px solid rgba(245,193,81,.42); border-radius:12px; background:#06131c; }
.site-footer { padding:25px clamp(28px,3.5vw,55px) 13px; background:radial-gradient(circle at 16% 24%,rgba(28,82,105,.24),transparent 30%),linear-gradient(110deg,#061a27,#0a2737 54%,#061a27); color:rgba(255,248,231,.88); }
.footer-top { display:grid; grid-template-columns:minmax(285px,355px) minmax(0,1fr); gap:clamp(24px,3.5vw,52px); align-items:center; }
.footer-brand { display:flex; flex-direction:column; align-items:center; padding-right:clamp(22px,3vw,44px); border-right:1px solid rgba(224,173,79,.42); text-align:center; }
.footer-nav-area { min-width:0; display:flex; flex-direction:column; justify-content:center; gap:12px; }
.footer-note { margin:0; color:#f6c765; font-size:clamp(16px,1.35vw,20px); font-weight:800; line-height:1.35; }
.footer-note span { display:block; margin-top:4px; color:rgba(255,248,231,.7); font-size:clamp(12px,1vw,15px); font-weight:500; line-height:1.55; }
.footer-logo { display:block; width:min(330px,100%); height:auto; } .footer-tagline { margin:4px 0 0; color:#f3bd5a; font-size:clamp(15px,1.2vw,19px); font-weight:700; line-height:1.3; }
.footer-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.footer-link { display:inline-flex; min-width:0; align-items:center; gap:9px; color:rgba(255,248,231,.92); font-size:clamp(13px,1.2vw,19px); font-weight:600; line-height:1.35; text-decoration:none; }
.footer-icon { display:block; width:26px; height:26px; flex:0 0 26px; object-fit:contain; }
.footer-acceptance { display:flex; align-items:center; gap:11px; margin:2px 0 0; color:rgba(255,248,231,.7); font-size:clamp(12px,1.08vw,17px); font-weight:500; line-height:1.45; }
.footer-acceptance .footer-icon { width:27px; height:27px; flex-basis:27px; } .footer-acceptance a { color:#e4aa43; text-decoration:none; }
.footer-bottom { margin-top:18px; padding-top:17px; border-top:1px solid rgba(224,173,79,.2); color:rgba(255,248,231,.68); font-family:Arial,sans-serif; font-size:clamp(13px,1.1vw,18px); line-height:1.35; text-align:center; }
@media (max-width:1023px) {
  .game-header { height:auto; min-height:74px; flex-wrap:wrap; gap:8px 16px; padding:10px 22px; }
  .game-header-logo { width:clamp(168px,29vw,210px); }
  .game-header .top-nav { order:3; width:100%; justify-content:center; margin:2px 0 0; gap:clamp(22px,6vw,42px); }
  .game-login { padding:6px 18px; font-size:14px; }
  .game-hero { min-height:clamp(440px,62vw,560px); background-position:center center; }
  .game-hero::after { background:linear-gradient(90deg,rgba(10,10,8,.88),rgba(10,10,8,.64) 48%,rgba(10,10,8,.28)); }
  .game-hero-content { width:min(720px,calc(100% - 72px)); margin-left:36px; padding:42px 0; }
  .game-hero h1 { font-size:clamp(43px,7vw,76px); }
  .game-hero p { font-size:clamp(16px,2.1vw,21px); }
  .game-content { padding-right:28px; padding-left:28px; }
  .story-layout { grid-template-columns:minmax(0,1.1fr) minmax(245px,.9fr); gap:18px; }
  .story-card,.feature-card { border-radius:17px; }
  .story-card { padding:26px; }
  .feature-card { padding:26px; }
  .player-section { padding:24px; }
  .game-frame { min-height:clamp(320px,52vw,520px); }
  .footer-top { grid-template-columns:minmax(220px,285px) minmax(0,1fr); gap:24px; }
  .footer-brand { padding-right:22px; }
  .footer-nav { gap:8px; }
}
@media (max-width:760px) {
  .game-header { height:auto; min-height:74px; flex-wrap:wrap; padding:10px 22px; }
  .game-header-logo { width:175px; } .game-header .top-nav { order:3; width:100%; justify-content:center; margin:2px 0 0; gap:28px; }
  .game-login { padding:6px 18px; font-size:14px; } .game-hero-content { margin-left:24px; } .game-hero h1 { font-size:clamp(40px,12vw,64px); }
  .story-layout { grid-template-columns:1fr; } .player-heading { display:block; } .player-heading p { margin-top:6px; text-align:left; }
  .game-content { padding:32px 14px 50px; }
  .player-section { padding:14px; }
  .game-frame { height:clamp(480px,78vh,650px); min-height:0; aspect-ratio:auto; }
  .footer-top { display:block; } .footer-brand { padding:0 0 19px; border-right:0; border-bottom:1px solid rgba(224,173,79,.42); }
  .footer-nav { margin-top:19px; } .footer-acceptance { align-items:flex-start; }
}
@media (max-width:430px) {
  .game-header { padding-right:14px; padding-left:14px; } .game-header-logo { width:150px; } .game-header .top-nav { gap:18px; }
  .footer-nav { grid-template-columns:1fr; justify-items:center; row-gap:13px; }
}

/* Keep the shared game navigation visible while preserving the page's top space. */
:root { --header-offset: 74px; }
html { scroll-padding-top: var(--header-offset); }
.game-site { padding-top: var(--header-offset); }
.game-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 1000;
  width: min(100%, 1440px);
  box-shadow: 0 4px 14px rgba(60, 45, 20, .14);
  isolation: isolate;
  transform: translateX(-50%);
}
@media (max-width: 1023px) {
  :root { --header-offset: 112px; }
}
@media (max-width: 430px) {
  :root { --header-offset: 100px; }
}
