:root {
  --bg: #fffaf0;
  --panel: rgba(255, 255, 255, .78);
  --panel-strong: #ffffff;
  --ink: #241707;
  --muted: #725f43;
  --gold: #d9a72e;
  --gold-strong: #b68011;
  --gold-soft: rgba(217, 167, 46, .16);
  --cream: #fff6df;
  --line: rgba(166, 118, 23, .22);
  --shadow: 0 24px 70px rgba(87, 56, 0, .12);
  --radius: 26px;
  --nav-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 222, 121, .46), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(255, 247, 204, .92), transparent 24%),
    linear-gradient(135deg, #fffdf7 0%, #fff4d8 44%, #ffffff 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(120deg, rgba(217, 167, 46, .07) 0 1px, transparent 1px),
    radial-gradient(rgba(190, 136, 25, .14) 1px, transparent 1px);
  background-size: 74px 74px, 30px 30px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.page-shell {
  min-height: 100vh;
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 64px);
  background: rgba(255, 252, 244, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-width: 220px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffe29a, #c48a13);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 24px rgba(185, 127, 11, .22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.brand-text small {
  color: var(--muted);
  margin-top: 4px;
}

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

.nav-link,
.tab-btn,
.view-full-btn,
.nav-toggle {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.nav-link {
  padding: 11px 16px;
  font-weight: 800;
  font-size: .92rem;
}

.nav-link:hover,
.tab-btn:hover,
.view-full-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 167, 46, .55);
  box-shadow: 0 12px 30px rgba(160, 107, 0, .12);
}

.nav-link.active,
.tab-btn.active {
  background: linear-gradient(145deg, #ffe49f, #d7a12a);
  color: #2b1800;
  border-color: rgba(171, 118, 9, .45);
  box-shadow: 0 12px 34px rgba(183, 122, 6, .18);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 10px;
}

.app-view {
  min-height: calc(100vh - var(--nav-h));
  transition: opacity .28s ease, transform .28s ease, filter .28s ease;
}

.app-view.view-fading {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
}

.app-view.view-entering {
  animation: enterView .55s ease both;
}

.hero-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 76px) 0 58px;
}

.hero-copy,
.section-head {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
}

.reveal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hero-copy,
.section-head {
  padding: clamp(24px, 4vw, 42px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-strong);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 900;
  font-size: .76rem;
}

.eyebrow.compact {
  letter-spacing: .14em;
  font-size: .68rem;
  margin-bottom: 8px;
}

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

h1 {
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: .94;
  letter-spacing: -.04em;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.45rem;
}

.lead {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
  margin-bottom: 0;
}

.tab-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

.tab-btn {
  padding: 12px 18px;
  font-weight: 900;
}

.jackpot-grid,
.event-grid,
.promo-layout {
  display: grid;
  gap: 20px;
}

.jackpot-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.jackpot-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
}

.card-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 18% 10%, rgba(255, 210, 91, .22), transparent 32%);
  pointer-events: none;
}

.level-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.level-card {
  position: relative;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 248, 225, .9), rgba(255, 255, 255, .72));
  border: 1px solid rgba(217, 167, 46, .24);
}

.level-label {
  display: block;
  color: var(--gold-strong);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  margin-bottom: 8px;
}

.jackpot-amount {
  display: block;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  color: #2e1d06;
  letter-spacing: -.03em;
}

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

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

.event-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 360px;
}

.event-image {
  position: relative;
  overflow: hidden;
  background: #f8ead0;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.event-card:hover .event-image img {
  transform: scale(1.05);
}

.event-content {
  padding: clamp(22px, 4vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-content p {
  color: var(--muted);
  line-height: 1.65;
}

.gold-chip,
.location-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .82rem;
  background: var(--gold-soft);
  color: #7f5200;
  border: 1px solid rgba(217, 167, 46, .25);
  margin-bottom: 16px;
}

.event-details {
  display: grid;
  gap: 6px;
  margin: 18px 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 246, 223, .72);
  border: 1px solid rgba(217, 167, 46, .18);
}

.event-details strong {
  color: var(--ink);
}

.event-details small {
  color: var(--muted);
  font-weight: 800;
}

.promo-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  align-items: start;
}

.leaderboard-preview,
.promo-info {
  padding: clamp(22px, 4vw, 34px);
}

.preview-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.view-full-btn {
  text-decoration: none;
  padding: 12px 16px;
  font-weight: 900;
  white-space: nowrap;
}

.leaderboard-meta {
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 14px;
}

.mini-table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(217, 167, 46, .22);
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: rgba(255,255,255,.58);
}

.mini-table th,
.mini-table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(217, 167, 46, .16);
}

.mini-table th {
  color: #3a2507;
  background: linear-gradient(145deg, #fff3c7, #f3c75f);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .8rem;
}

.mini-table td {
  font-weight: 900;
  font-size: 1rem;
}

.rank-pill {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #d8a02a, #8d5800);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36);
}

.promo-info p,
.promo-info li {
  color: var(--muted);
  line-height: 1.65;
}

.promo-info ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.loading-card,
.error-card {
  padding: 30px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
  color: var(--muted);
  font-weight: 800;
  border-top: 1px solid var(--line);
}

@keyframes enterView {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 860px) {
  :root {
    --nav-h: auto;
  }

  .site-header {
    position: sticky;
    min-height: 72px;
    align-items: center;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .brand-text small {
    display: none;
  }

  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0 4px;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    text-align: center;
  }

  .hero-section {
    width: min(100% - 22px, 1180px);
    padding-top: 24px;
  }

  .event-grid,
  .promo-layout {
    grid-template-columns: 1fr;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-image {
    min-height: 250px;
  }

  .preview-top {
    flex-direction: column;
  }

  .view-full-btn {
    width: 100%;
    text-align: center;
  }

  .site-footer {
    width: min(100% - 22px, 1180px);
    flex-direction: column;
    text-align: center;
  }
}

@media (min-width: 1200px) {
  .hero-section {
    padding-top: clamp(48px, 5vw, 82px);
  }
}

.one-page {
  min-height: calc(100vh - var(--nav-h));
}

.nav-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.snap-section {
  scroll-margin-top: calc(var(--nav-h) + 14px);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.reveal-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .snap-section {
    min-height: auto;
    scroll-margin-top: 92px;
    justify-content: flex-start;
  }
}

/* v3 jackpot viewport fit patch */
.jackpot-view {
  min-height: auto;
  justify-content: flex-start;
  padding-top: clamp(26px, 3.8vw, 46px);
}

.jackpot-view .hero-copy {
  max-width: 760px;
  margin-bottom: 20px;
  padding: clamp(20px, 3vw, 32px);
}

.jackpot-view h1 {
  font-size: clamp(2rem, 4.6vw, 4.1rem);
}

.jackpot-view .lead {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.jackpot-view .tab-row {
  margin-top: 20px;
}

.jackpot-grid {
  width: min(900px, 100%);
  margin: 0 auto;
}

.jackpot-card {
  padding: clamp(18px, 2.8vw, 28px);
}

.jackpot-card h2 {
  margin-bottom: 8px;
}

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

.level-card {
  padding: clamp(16px, 2vw, 22px);
}

.jackpot-amount {
  font-size: clamp(1.55rem, 3.3vw, 2.65rem);
}

@media (max-width: 760px) {
  .level-grid {
    grid-template-columns: 1fr;
  }

  .jackpot-view h1 {
    font-size: clamp(2rem, 12vw, 3.3rem);
  }
}

/* v4 dynamic card visibility fix */
.jackpot-grid .reveal-card,
.event-grid .reveal-card,
.promo-layout .reveal-card {
  opacity: 1;
  transform: translateY(0);
}

.jackpot-grid {
  margin-top: 18px;
}

/* v5 mobile promo leaderboard fix */
@media (max-width: 760px) {
  .promotion-view .section-head {
    padding: 22px 18px;
  }

  .promotion-view h1 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .promo-layout {
    gap: 16px;
  }

  .leaderboard-preview,
  .promo-info {
    padding: 18px 14px;
    border-radius: 22px;
    overflow: hidden;
  }

  .leaderboard-meta {
    font-size: .92rem;
    line-height: 1.35;
  }

  .mini-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
  }

  .mini-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  .mini-table th,
  .mini-table td {
    padding: 11px 6px;
    font-size: .86rem;
    white-space: nowrap;
  }

  .mini-table th {
    font-size: .68rem;
    letter-spacing: .03em;
  }

  .mini-table th:nth-child(1),
  .mini-table td:nth-child(1) {
    width: 23%;
  }

  .mini-table th:nth-child(2),
  .mini-table td:nth-child(2) {
    width: 37%;
  }

  .mini-table th:nth-child(3),
  .mini-table td:nth-child(3) {
    width: 40%;
  }

  .rank-pill {
    min-width: 30px;
    height: 30px;
    font-size: .86rem;
  }

  .promo-info p,
  .promo-info li {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

@media (max-width: 390px) {
  .mini-table th,
  .mini-table td {
    padding: 10px 4px;
    font-size: .8rem;
  }

  .mini-table th {
    font-size: .62rem;
  }

  .rank-pill {
    min-width: 28px;
    height: 28px;
  }
}

/* v8 section header alignment patch */
.hero-copy,
.section-head {
  width: 100%;
  max-width: none;
}

.jackpot-view .hero-copy {
  width: min(900px, 100%);
  max-width: none;
}

.events-view .section-head,
.promotion-view .section-head {
  width: 100%;
  max-width: none;
}

.events-view .event-grid,
.promotion-view .promo-layout,
.jackpot-view .jackpot-grid {
  width: 100%;
}

@media (min-width: 861px) {
  .events-view .section-head,
  .promotion-view .section-head {
    padding-left: clamp(28px, 4vw, 52px);
    padding-right: clamp(28px, 4vw, 52px);
  }
}

@media (max-width: 860px) {
  .hero-copy,
  .section-head,
  .jackpot-view .hero-copy {
    width: 100%;
  }
}

/* v9 jackpot header alignment final patch */
.jackpot-view .hero-copy {
  width: 100%;
  max-width: none;
}

@media (min-width: 861px) {
  .jackpot-view .hero-copy {
    padding-left: clamp(28px, 4vw, 52px);
    padding-right: clamp(28px, 4vw, 52px);
  }
}

/* v10 translation selector */
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(160, 107, 0, .08);
}

.lang-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-width: 38px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .78rem;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  color: var(--ink);
  border-color: rgba(217, 167, 46, .3);
}

.lang-btn.active {
  background: linear-gradient(145deg, #ffe49f, #d7a12a);
  color: #2b1800;
  border-color: rgba(171, 118, 9, .38);
}

html[lang="th"] body,
html[lang="lo"] body,
html[lang="zh"] body,
html[lang="ko"] body,
html[lang="ja"] body {
  font-family: Arial, "Noto Sans Thai", "Noto Sans Lao", "Noto Sans CJK SC", "Noto Sans KR", "Noto Sans JP", "Microsoft YaHei", "Malgun Gothic", "Yu Gothic", "Tahoma", sans-serif;
}

html[lang="th"] .eyebrow,
html[lang="lo"] .eyebrow,
html[lang="zh"] .eyebrow,
html[lang="ko"] .eyebrow,
html[lang="ja"] .eyebrow,
html[lang="th"] .mini-table th,
html[lang="lo"] .mini-table th,
html[lang="zh"] .mini-table th,
html[lang="ko"] .mini-table th,
html[lang="ja"] .mini-table th {
  letter-spacing: .05em;
}

@media (max-width: 860px) {
  .language-switch {
    order: 2;
    margin-left: auto;
    max-width: calc(100vw - 160px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .language-switch::-webkit-scrollbar {
    display: none;
  }

  .lang-btn {
    min-width: 34px;
    height: 32px;
    padding: 0 8px;
    font-size: .72rem;
  }

  .nav-toggle {
    order: 3;
  }

  .main-nav {
    order: 4;
  }
}

@media (max-width: 480px) {
  .language-switch {
    max-width: calc(100vw - 132px);
    gap: 3px;
    padding: 4px;
  }

  .lang-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    font-size: .68rem;
  }
}


/* v11 language dropdown with flags */
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(160, 107, 0, .08);
}

.lang-label {
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
}

.lang-select {
  border: none;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  font-size: .88rem;
  outline: none;
  cursor: pointer;
  padding-right: 8px;
  min-width: 96px;
}

.lang-select option {
  color: #1f160a;
}

@media (max-width: 860px) {
  .language-switch {
    order: 2;
    margin-left: auto;
    max-width: calc(100vw - 156px);
    padding: 5px 8px;
  }

  .lang-select {
    min-width: 82px;
    font-size: .8rem;
  }

  .nav-toggle {
    order: 3;
  }

  .main-nav {
    order: 4;
  }
}

@media (max-width: 480px) {
  .language-switch {
    max-width: calc(100vw - 126px);
    gap: 6px;
    padding: 5px 8px;
  }

  .lang-label {
    font-size: .9rem;
  }

  .lang-select {
    min-width: 74px;
    font-size: .76rem;
  }
}

/* v12 promotion coming soon + custom language dropdown flags */
.coming-soon-card {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 52px);
  text-align: center;
}

.coming-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  background: linear-gradient(145deg, #ffe49f, #d7a12a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 18px 40px rgba(183,122,6,.22);
}

.coming-soon-card p {
  color: var(--muted);
  line-height: 1.7;
}

.language-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.lang-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  min-width: 104px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(160,107,0,.08);
}

.lang-caret {
  color: var(--muted);
  margin-left: auto;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 136px;
  padding: 7px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 48px rgba(80,50,0,.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
}

.language-switch.open .lang-menu {
  display: grid;
  gap: 4px;
}

.lang-option {
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.lang-option:hover,
.lang-option.active {
  background: var(--gold-soft);
}

.flag-icon {
  width: 24px;
  height: 16px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(90,60,0,.18);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  background: #ddd;
}

/* CSS-drawn simplified flags, no emoji dependency */
.flag-us {
  background:
    linear-gradient(90deg, #315399 0 42%, transparent 42%),
    repeating-linear-gradient(to bottom, #b22234 0 7.69%, #fff 7.69% 15.38%);
}
.flag-cn {
  background: #de2910;
  position: relative;
}
.flag-cn::before {
  content: "★";
  color: #ffde00;
  position: absolute;
  left: 3px;
  top: -2px;
  font-size: 9px;
}
.flag-th {
  background: linear-gradient(to bottom, #a51931 0 16%, #fff 16% 32%, #2d2a4a 32% 68%, #fff 68% 84%, #a51931 84%);
}
.flag-la {
  background:
    radial-gradient(circle at 50% 50%, #fff 0 20%, transparent 21%),
    linear-gradient(to bottom, #ce1126 0 25%, #002868 25% 75%, #ce1126 75%);
}
.flag-kr {
  background:
    radial-gradient(circle at 50% 50%, #cd2e3a 0 28%, transparent 29%),
    linear-gradient(135deg, transparent 0 47%, #0047a0 47% 53%, transparent 53%),
    #fff;
}
.flag-jp {
  background: radial-gradient(circle at 50% 50%, #bc002d 0 31%, transparent 32%), #fff;
}

@media (max-width: 860px) {
  .language-switch {
    order: 2;
    margin-left: auto;
    max-width: none;
  }

  .lang-select-btn {
    min-width: 86px;
    height: 40px;
    padding: 0 10px;
  }

  .nav-toggle {
    order: 3;
  }

  .main-nav {
    order: 4;
  }
}

@media (max-width: 480px) {
  .lang-select-btn {
    min-width: 78px;
    height: 38px;
    gap: 6px;
    padding: 0 9px;
    font-size: .78rem;
  }

  .flag-icon {
    width: 22px;
    height: 15px;
  }
}

/* v13 real SVG flag icons */
.flag-icon {
  width: 26px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 3px;
  overflow: hidden;
  object-fit: cover;
  border: 1px solid rgba(90,60,0,.18);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  background: #fff;
}

.lang-option .flag-icon {
  width: 28px;
  height: 19px;
}

@media (max-width: 480px) {
  .flag-icon {
    width: 24px;
    height: 17px;
  }

  .lang-option .flag-icon {
    width: 26px;
    height: 18px;
  }
}
