/* ============================================================
   FineDining365 — Design System
   Dark editorial theme · gold accent · Thai-first typography
   ============================================================ */

:root {
  --bg:            #08080a;
  --bg-elev:       #0f0f13;
  --surface:       #14141a;
  --surface-2:     #1b1b22;
  --line:          rgba(255, 255, 255, 0.085);
  --line-strong:   rgba(255, 255, 255, 0.16);

  --gold:          #c9a55c;
  --gold-bright:   #e7cf95;
  --gold-deep:     #8c6f34;

  --text:          #eeebe5;
  --text-soft:     #b8b3a9;
  --text-mute:     #7d786f;

  --danger:        #d9534f;
  --ok:            #5aa469;

  --serif: 'Noto Serif Thai', 'Cormorant Garamond', Georgia, serif;
  --sans:  'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --wrap: 1240px;
  --radius: 2px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
}

::selection { background: var(--gold); color: #0b0b0d; }

/* --- scrollbar --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a33; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* ============================================================
   Layout primitives
   ============================================================ */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: 780px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.section { padding: 76px 0; }
.section + .section { padding-top: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: clamp(22px, 3vw, 30px); }
.section-head .sub { color: var(--text-mute); font-size: 13px; margin-top: 4px; }
.section-head .more {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap; padding-bottom: 4px;
  border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
.section-head .more:hover { border-color: var(--gold); }

.divider-orn {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; color: var(--gold-deep); margin: 8px 0 0;
}
.divider-orn::before, .divider-orn::after {
  content: ''; height: 1px; width: 70px;
  background: linear-gradient(90deg, transparent, var(--gold-deep));
}
.divider-orn::after { background: linear-gradient(270deg, transparent, var(--gold-deep)); }

/* ============================================================
   Header
   ============================================================ */

.topbar {
  background: #050506;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar .socials { display: flex; gap: 18px; }
.topbar a:hover { color: var(--gold); }

.masthead {
  position: sticky; top: 0; z-index: 90;
  background: rgba(8, 8, 10, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 78px;
}
.logo { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.logo .mark {
  font-family: var(--serif); font-size: 27px; font-weight: 700;
  letter-spacing: 0.02em; color: var(--text);
}
.logo .mark b { color: var(--gold); font-weight: 700; }
.logo .tag {
  font-size: 8.5px; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--text-mute); margin-top: 6px; padding-left: 2px;
}

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.nav a {
  position: relative; padding: 9px 11px; font-size: 13px; font-weight: 500;
  color: var(--text-soft); white-space: nowrap; transition: color .25s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 11px; right: 11px; bottom: 3px;
  height: 1px; background: var(--gold); transform: scaleX(0);
  transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--gold-bright); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  color: var(--text-soft); cursor: pointer; border-radius: var(--radius);
  transition: all .25s var(--ease);
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.burger { display: none; }

/* search overlay */
.search-pop {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(4, 4, 6, 0.95); backdrop-filter: blur(8px);
  padding-top: 18vh;
}
.search-pop.open { display: block; }
.search-pop form { max-width: 680px; margin-inline: auto; padding-inline: 24px; }
.search-pop input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--gold-deep);
  color: var(--text); font-family: var(--serif); font-size: clamp(22px, 5vw, 38px);
  padding: 14px 4px; outline: none;
}
.search-pop input::placeholder { color: #4a463f; }
.search-pop .hint { color: var(--text-mute); font-size: 12px; margin-top: 16px; letter-spacing: .1em; }

/* ============================================================
   Hero
   ============================================================ */

.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1px; background: var(--line); }

.hero-main {
  position: relative; min-height: 560px; display: flex; align-items: flex-end;
  padding: 44px; background: var(--bg-elev); overflow: hidden;
}
.hero-main .bg, .hero-side .bg {
  position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%;
  transition: transform 1.4s var(--ease); z-index: 0;
}
.hero-main:hover .bg, .hero-side:hover .bg { transform: scale(1.05); }
.hero-main::after, .hero-side::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(6,6,8,.96) 4%, rgba(6,6,8,.55) 45%, rgba(6,6,8,.15) 100%);
}
.hero-main .inner, .hero-side .inner { position: relative; z-index: 2; }
.hero-main h1 {
  font-size: clamp(30px, 4.1vw, 50px); margin: 14px 0 12px; max-width: 17ch;
}
.hero-main p { color: var(--text-soft); max-width: 56ch; margin: 0 0 18px; }

.hero-side-col { display: grid; grid-template-rows: 1fr 1fr; gap: 1px; }
.hero-side {
  position: relative; min-height: 279px; display: flex; align-items: flex-end;
  padding: 28px; background: var(--bg-elev); overflow: hidden;
}
.hero-side h3 { font-size: clamp(17px, 1.6vw, 21px); margin-top: 10px; max-width: 22ch; }

/* ============================================================
   Cards
   ============================================================ */

.grid { display: grid; gap: 34px 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { display: flex; flex-direction: column; }
.card-media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--surface); margin-bottom: 16px;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease), filter .5s var(--ease);
  filter: saturate(0.92);
}
.card:hover .card-media img { transform: scale(1.06); filter: saturate(1.05); }
.card-media::after {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  pointer-events: none;
}

.chip {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: rgba(6,6,8,.82); backdrop-filter: blur(6px);
  border: 1px solid var(--gold-deep); color: var(--gold-bright);
  font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 10px;
}
.chip-rating {
  left: auto; right: 12px; border-color: var(--line-strong); color: var(--text);
  letter-spacing: .05em;
}

.card h3 {
  font-size: 19px; margin-bottom: 8px;
  transition: color .25s var(--ease);
}
.card:hover h3 { color: var(--gold-bright); }
.card p { color: var(--text-mute); font-size: 14px; margin: 0 0 12px; }

.meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; letter-spacing: .06em; color: var(--text-mute);
  margin-top: auto;
}
.meta .dot { width: 3px; height: 3px; background: var(--gold-deep); border-radius: 50%; }
.meta .place { color: var(--gold); }

/* horizontal list card */
.list-item {
  display: grid; grid-template-columns: 120px 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }
.list-item .card-media { aspect-ratio: 1; margin: 0; }
.list-item h3 { font-size: 16px; }
.list-item .rank {
  font-family: var(--serif); font-size: 30px; color: var(--gold-deep);
  line-height: 1; width: 34px; flex: none;
}

/* ============================================================
   Category rail / ribbon
   ============================================================ */

.cat-ribbon { border-block: 1px solid var(--line); background: var(--bg-elev); }
.cat-ribbon .wrap { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.cat-ribbon .wrap::-webkit-scrollbar { display: none; }
.cat-ribbon a {
  flex: 1 0 auto; min-width: 128px; padding: 20px 16px; text-align: center;
  border-right: 1px solid var(--line); transition: background .3s var(--ease);
}
.cat-ribbon a:first-child { border-left: 1px solid var(--line); }
.cat-ribbon a:hover { background: var(--surface); }
.cat-ribbon .en {
  display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 5px;
}
.cat-ribbon .th { font-family: var(--serif); font-size: 15px; }

/* ============================================================
   Article page
   ============================================================ */

.article-hero { position: relative; height: min(70vh, 620px); overflow: hidden; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 2%, rgba(8,8,10,.65) 50%, rgba(8,8,10,.3) 100%);
}
.article-head {
  position: relative; z-index: 2; margin-top: -190px; padding-bottom: 34px;
  text-align: center;
}
.article-head h1 { font-size: clamp(28px, 4.4vw, 52px); margin: 16px auto 18px; max-width: 20ch; }
.article-head .lede { color: var(--text-soft); font-size: 17px; max-width: 62ch; margin-inline: auto; }
.byline {
  display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .08em; color: var(--text-mute);
}

.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 60px; padding-bottom: 80px; }

.prose { font-size: 17.5px; line-height: 1.95; color: #dcd8d0; }
.prose > * + * { margin-top: 1.3em; }
.prose h2 {
  font-size: 27px; margin-top: 2.2em; padding-top: .6em;
  border-top: 1px solid var(--line);
}
.prose h3 { font-size: 21px; margin-top: 1.9em; color: var(--gold-bright); }
.prose p { margin: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--gold-bright); font-style: italic; }
.prose a { color: var(--gold); border-bottom: 1px solid var(--gold-deep); }
.prose a:hover { color: var(--gold-bright); }
.prose ul, .prose ol { padding-left: 1.3em; margin-block: 1.2em; }
.prose li { margin-bottom: .55em; }
.prose li::marker { color: var(--gold-deep); }
.prose blockquote {
  border-left: 2px solid var(--gold); padding: 6px 0 6px 26px; margin-block: 1.8em;
  font-family: var(--serif); font-size: 22px; line-height: 1.6; color: var(--gold-bright);
  font-style: italic;
}
.prose img { margin-block: 2em; width: 100%; }
.prose figcaption, .prose .caption {
  font-size: 12.5px; color: var(--text-mute); text-align: center; margin-top: -1.4em;
  letter-spacing: .04em;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.4em; }
.prose code {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 7px; font-size: .88em; font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--gold-bright);
}

/* video embeds */
.video-embed {
  position: relative; margin-block: 2em; background: #000;
  border: 1px solid var(--line); aspect-ratio: 16 / 9;
}
.video-embed iframe, .video-embed video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.video-embed.video-file { aspect-ratio: auto; }
.video-embed.video-file video { position: static; height: auto; max-height: 70vh; background: #000; }

/* first-letter flourish */
.prose > p:first-of-type::first-letter {
  font-family: var(--serif); float: left; font-size: 66px; line-height: .82;
  padding: 6px 12px 0 0; color: var(--gold);
}

/* ============================================================
   Location block
   ============================================================ */

.locbox {
  border: 1px solid var(--line); background: var(--surface);
  margin-block: 44px; overflow: hidden;
}
.locbox-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.locbox-head h3 { font-size: 20px; }
.locbox-head .eyebrow { margin-bottom: 5px; }

#map, .map-canvas {
  height: 320px; width: 100%; background: var(--surface-2);
  filter: grayscale(0.35) contrast(1.06) brightness(0.82);
}
.leaflet-container { background: #101015 !important; font-family: var(--sans) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: #14141a !important; color: var(--text) !important;
  border: 1px solid var(--gold-deep); border-radius: 2px !important;
}
.leaflet-popup-content { margin: 12px 14px !important; font-size: 13px; }
.leaflet-control-attribution { background: rgba(0,0,0,.6) !important; color: #666 !important; }
.leaflet-control-attribution a { color: #888 !important; }
.leaflet-bar a {
  background: #14141a !important; color: var(--gold) !important;
  border-color: var(--line-strong) !important;
}

.loc-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border-top: 1px solid var(--line);
}
.loc-fact { padding: 18px 24px; border-right: 1px solid var(--line); }
.loc-fact:last-child { border-right: 0; }
.loc-fact .k {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 6px;
}
.loc-fact .v { font-size: 14.5px; color: var(--text); }
.loc-fact .v a { color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  padding: 12px 22px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  border: 1px solid var(--gold); color: var(--gold); background: transparent;
  border-radius: var(--radius); transition: all .3s var(--ease);
}
.btn:hover { background: var(--gold); color: #0a0a0c; }
.btn-solid { background: var(--gold); color: #0a0a0c; }
.btn-solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn-ghost { border-color: var(--line-strong); color: var(--text-soft); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--gold); }
.btn-sm { padding: 8px 14px; font-size: 11px; }

/* ============================================================
   Share
   ============================================================ */

.share-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 22px 0; border-block: 1px solid var(--line); margin-block: 42px;
}
.share-bar .label {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-mute); margin-right: 6px;
}
.share-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--text-soft); cursor: pointer;
  background: transparent; border-radius: var(--radius);
  transition: all .28s var(--ease);
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.share-btn svg { width: 17px; height: 17px; fill: currentColor; }

/* sticky rail */
.rail { position: sticky; top: 100px; align-self: start; }
.rail-block { border: 1px solid var(--line); padding: 22px; margin-bottom: 26px; background: var(--bg-elev); }
.rail-block h4 {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-weight: 600;
}

/* ============================================================
   Comments
   ============================================================ */

.comments { padding-bottom: 90px; }
.comment {
  display: grid; grid-template-columns: 46px 1fr; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.avatar {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--gold-deep);
  color: var(--gold); font-family: var(--serif); font-size: 19px; border-radius: 50%;
}
.comment .who { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.comment .who b { font-size: 14.5px; font-weight: 600; }
.comment .who time { font-size: 11.5px; color: var(--text-mute); letter-spacing: .06em; }
.comment .body { color: var(--text-soft); font-size: 15px; line-height: 1.75; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field { display: block; }
.field span {
  display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 7px;
}
input[type=text], input[type=email], input[type=url], input[type=number],
input[type=password], input[type=search], textarea, select {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font-family: var(--sans); font-size: 15px;
  padding: 12px 14px; border-radius: var(--radius); outline: none;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); background: var(--surface-2); }
textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }

.note { font-size: 12.5px; color: var(--text-mute); }
.flash {
  padding: 13px 16px; border: 1px solid var(--gold-deep); background: rgba(201,165,92,.08);
  color: var(--gold-bright); font-size: 14px; margin-bottom: 18px;
}
.flash.err { border-color: var(--danger); background: rgba(217,83,79,.1); color: #f0a5a3; }

/* ============================================================
   Newsletter / Footer
   ============================================================ */

.newsletter {
  border-block: 1px solid var(--line); background: var(--bg-elev);
  padding: 70px 0; text-align: center;
}
.newsletter h2 { font-size: clamp(24px, 3.4vw, 36px); margin: 14px 0 10px; }
.newsletter p { color: var(--text-mute); max-width: 52ch; margin: 0 auto 26px; }
.newsletter form { display: flex; gap: 10px; max-width: 480px; margin-inline: auto; flex-wrap: wrap; }
.newsletter input { flex: 1 1 240px; }

/* ============================================================
   Contact band (above the footer)
   ============================================================ */

.contact-band {
  position: relative;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(201, 165, 92, 0.07), transparent 62%),
    #0a0a0d;
  border-top: 1px solid var(--line);
  padding: 76px 0 70px;
}
.contact-band::before {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: min(420px, 70%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.contact-head { text-align: center; margin-bottom: 44px; }
.contact-head h2 { font-size: clamp(24px, 3.2vw, 34px); margin: 12px 0 0; }

.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.contact-card {
  background: #0d0d11; padding: 32px 30px;
  transition: background .4s var(--ease);
}
.contact-card:hover { background: #121218; }

.contact-card .ck {
  display: block; font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.contact-card h3 { font-size: 21px; line-height: 1.45; }
.contact-card h3 em { font-style: normal; color: var(--gold-bright); }
.contact-card .latin {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: .1em;
  color: var(--text-mute); margin: 6px 0 0; text-transform: uppercase;
}
.contact-card .co-name { font-size: 18px; margin-bottom: 14px; }
.contact-card address {
  font-style: normal; font-size: 14px; line-height: 2; color: var(--text-soft);
}

.role-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 7px; }
.role-list li {
  font-size: 11.5px; letter-spacing: .04em; color: var(--text-soft);
  border: 1px solid var(--line-strong); padding: 5px 11px; border-radius: 2px;
  transition: all .25s var(--ease);
}
.contact-card:hover .role-list li { border-color: rgba(201, 165, 92, .38); color: var(--gold-bright); }

.contact-line {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
  transition: padding-left .3s var(--ease);
}
.contact-line:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-line:hover { padding-left: 6px; }
.contact-line .ci {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--gold);
  font-size: 14px; border-radius: 50%; transition: all .3s var(--ease);
}
.contact-line:hover .ci { border-color: var(--gold); background: rgba(201, 165, 92, .1); }
.contact-line b { display: block; font-size: 15px; font-weight: 500; color: var(--text); }
.contact-line:hover b { color: var(--gold-bright); }
.contact-line em {
  display: block; font-style: normal; font-size: 11.5px; letter-spacing: .05em;
  color: var(--text-mute); margin-top: 3px;
}

.foot-contact { margin-top: 14px !important; font-size: 13px; }
.foot-contact a { color: var(--text-soft); border-bottom: 1px solid var(--line-strong); }
.foot-contact a:hover { color: var(--gold-bright); border-color: var(--gold); }
.foot-contact .sep { margin-inline: 9px; color: var(--gold-deep); }

.footer { background: #050506; padding: 66px 0 30px; border-top: 1px solid var(--line); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid var(--line);
}
.footer h5 {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px; font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { font-size: 13.5px; color: var(--text-mute); transition: color .25s var(--ease); }
.footer a:hover { color: var(--gold-bright); }
.footer .about { color: var(--text-mute); font-size: 13.5px; max-width: 40ch; margin: 16px 0 0; }
.footer-base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; font-size: 12px; color: var(--text-mute); letter-spacing: .06em;
}

/* ============================================================
   Category / archive header
   ============================================================ */

.page-head {
  position: relative; padding: 76px 0 56px; text-align: center;
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.page-head .bg { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; opacity: .22; }
.page-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg), rgba(8,8,10,.5)); }
.page-head .inner { position: relative; z-index: 2; }
.page-head h1 { font-size: clamp(30px, 5vw, 54px); margin: 14px 0 12px; }
.page-head p { color: var(--text-soft); max-width: 58ch; margin: 0 auto; }

.pagination { display: flex; justify-content: center; gap: 8px; padding: 20px 0 80px; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); font-size: 13.5px; padding-inline: 12px;
  transition: all .25s var(--ease);
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current { background: var(--gold); color: #0a0a0c; border-color: var(--gold); font-weight: 600; }

.empty { text-align: center; padding: 90px 0; color: var(--text-mute); }
.empty h3 { font-size: 24px; color: var(--text); margin-bottom: 10px; }

/* ============================================================
   Map explore page
   ============================================================ */

.explore { display: grid; grid-template-columns: 380px 1fr; height: calc(100vh - 117px); }
.explore-list { overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-elev); }
.explore-list .head { padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.explore-item {
  display: grid; grid-template-columns: 82px 1fr; gap: 14px; padding: 16px 22px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .25s var(--ease);
}
.explore-item:hover, .explore-item.active { background: var(--surface); }
.explore-item img { width: 82px; height: 66px; object-fit: cover; }
.explore-item h4 { font-size: 15px; margin-bottom: 5px; }
.explore-item .sm { font-size: 12px; color: var(--text-mute); }
#explore-map { height: 100%; filter: grayscale(.35) contrast(1.06) brightness(.82); }

/* ============================================================
   Admin
   ============================================================ */

.admin-body { background: #0b0b0e; }
.admin-shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.admin-side { background: #08080a; border-right: 1px solid var(--line); padding: 26px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .logo { padding: 0 24px 26px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.admin-side nav { display: flex; flex-direction: column; }
.admin-side nav a {
  padding: 12px 24px; font-size: 14px; color: var(--text-soft);
  border-left: 2px solid transparent; transition: all .22s var(--ease);
  display: flex; align-items: center; gap: 10px;
}
.admin-side nav a:hover { background: var(--surface); color: var(--text); }
.admin-side nav a.active { border-left-color: var(--gold); color: var(--gold-bright); background: var(--surface); }
.admin-side .sep { height: 1px; background: var(--line); margin: 18px 24px; }

.admin-main { padding: 30px 34px 70px; min-width: 0; }
.admin-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.admin-head h1 { font-size: 26px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 34px; }
.stat { border: 1px solid var(--line); background: var(--bg-elev); padding: 22px; }
.stat .k { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); }
.stat .v { font-family: var(--serif); font-size: 34px; color: var(--gold-bright); margin-top: 8px; line-height: 1; }
.stat .d { font-size: 12px; color: var(--text-mute); margin-top: 8px; }

.panel { border: 1px solid var(--line); background: var(--bg-elev); }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.panel-head h3 { font-size: 16px; }
.panel-body { padding: 20px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 600; padding: 12px 16px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: rgba(255,255,255,.02); }
tbody tr:last-child td { border-bottom: 0; }
td .thumb { width: 54px; height: 40px; object-fit: cover; }
td .t-title { font-weight: 500; color: var(--text); }
td .t-sub { font-size: 12px; color: var(--text-mute); margin-top: 3px; }

.badge {
  display: inline-block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid var(--line-strong); color: var(--text-soft);
}
.badge.pub { border-color: rgba(90,164,105,.5); color: #7bc48c; }
.badge.draft { border-color: rgba(201,165,92,.45); color: var(--gold); }
.badge.gold { border-color: var(--gold-deep); color: var(--gold-bright); }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.mini {
  padding: 6px 11px; font-size: 11.5px; border: 1px solid var(--line-strong);
  color: var(--text-soft); background: transparent; cursor: pointer; border-radius: 2px;
  transition: all .22s var(--ease); white-space: nowrap;
}
.mini:hover { border-color: var(--gold); color: var(--gold); }
.mini.danger:hover { border-color: var(--danger); color: #f0a5a3; }

.editor-grid { display: grid; grid-template-columns: 1fr 330px; gap: 26px; align-items: start; }
.fieldset { border: 1px solid var(--line); background: var(--bg-elev); margin-bottom: 20px; }
.fieldset > h4 {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  padding: 15px 20px; border-bottom: 1px solid var(--line); font-family: var(--sans); font-weight: 600;
}
.fieldset .inner { padding: 20px; display: grid; gap: 15px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.editor-grid textarea#content { min-height: 460px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13.5px; }

/* --- editor toolbar --- */
.toolbar {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
  border: 1px solid var(--line); border-bottom: 0; background: var(--surface);
  padding: 7px 8px;
}
.tb {
  min-width: 32px; height: 30px; padding: 0 8px;
  background: transparent; border: 1px solid transparent; color: var(--text-soft);
  font-size: 13px; cursor: pointer; border-radius: 2px; line-height: 1;
  transition: all .18s var(--ease);
}
.tb:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--gold); }
.tb:active { transform: translateY(1px); }
.tb.on { background: var(--gold); color: #0a0a0c; border-color: var(--gold); }
.tb-wide { font-size: 12px; letter-spacing: .04em; }
.tb-sep { width: 1px; height: 18px; background: var(--line-strong); margin-inline: 5px; }

.editor-panes { display: grid; grid-template-columns: 1fr; gap: 0; }
.editor-panes.split { grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.editor-panes textarea {
  min-height: 460px; font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13.5px; line-height: 1.75; border-radius: 0;
}
.editor-panes.drag textarea { border-color: var(--gold); background: rgba(201,165,92,.06); }
.preview-pane {
  display: none; overflow-y: auto; max-height: 620px;
  background: var(--bg); border: 1px solid var(--line); padding: 22px 24px;
}
.editor-panes.split .preview-pane { display: block; }
.preview-pane .prose { font-size: 15.5px; }
.preview-pane .prose > p:first-of-type::first-letter { font-size: inherit; float: none; padding: 0; color: inherit; }
.preview-pane .prose h2 { font-size: 21px; } .preview-pane .prose h3 { font-size: 18px; }
.preview-pane .prose blockquote { font-size: 17px; }
.preview-pane:empty::before { content: 'ยังไม่มีเนื้อหา'; color: var(--text-mute); }

.editor-foot {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-top: 8px;
}
.editor-foot .note { font-size: 11.5px; }
#editor-status.busy { color: var(--gold); }
#editor-status.err { color: #f0a5a3; }

.upload-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-top: 0; background: var(--surface); font-size: 12.5px;
}
.upload-bar { flex: 1; height: 3px; background: var(--surface-2); overflow: hidden; }
.upload-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s var(--ease); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; border: 1px solid var(--line); background: var(--bg-elev); padding: 40px 34px; }
.login-card .logo { align-items: center; margin-bottom: 8px; }
.login-card h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.login-card .note { text-align: center; margin-bottom: 26px; }

/* ============================================================
   Utilities & motion
   ============================================================ */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.tc { text-align: center; } .tr { text-align: right; }
.muted { color: var(--text-mute); }
.gold { color: var(--gold); }
.flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1080px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .rail { position: static; margin-top: 40px; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .editor-grid { grid-template-columns: 1fr; }
  .explore { grid-template-columns: 320px 1fr; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { min-height: 440px; padding: 30px 24px; }
  .hero-side-col { grid-template-rows: auto auto; }
  .hero-side { min-height: 230px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-main { padding: 22px 18px 60px; }
  .explore { grid-template-columns: 1fr; height: auto; }
  #explore-map { height: 55vh; }
  .explore-list { max-height: 46vh; border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: 117px 0 auto; z-index: 88; flex-direction: column;
    background: #08080a; border-bottom: 1px solid var(--line); padding: 10px 0 20px;
    display: none; align-items: stretch;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 24px; font-size: 15px; }
  .nav a::after { display: none; }
  .masthead-inner { height: 66px; }
  .section { padding: 52px 0; }
  .grid { gap: 28px 18px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid, .two { grid-template-columns: 1fr; }
  .article-head { margin-top: -120px; }
  .prose { font-size: 16.5px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .contact-band { padding: 52px 0 48px; }
  .contact-card { padding: 26px 22px; }
  .loc-fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .wrap { padding-inline: 18px; }
  table { font-size: 13px; }
  .admin-main { padding-inline: 14px; }
  .panel-body { padding: 14px; }
  .t-hide { display: none; }
}
