:root {
  --bg: #120b07;
  --panel: rgba(28, 16, 10, 0.86);
  --panel-solid: #1f130c;
  --line: rgba(212, 175, 55, 0.35);
  --gold: #d4af37;
  --gold-soft: #f1d98a;
  --maroon: #6b1d1d;
  --text: #f7eedc;
  --muted: #c9b89a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font: "Sarabun", system-ui, sans-serif;
  --font-head: "Noto Serif Thai", "Sarabun", serif;
  --accent-text: #f1d98a;
  --scrim: rgba(10, 5, 3, 0.85);
  --node: #2a1a10;
  --intro-bg: radial-gradient(ellipse at center, rgba(60, 20, 15, 0.82), rgba(8, 4, 2, 0.95));
  --intro-card: rgba(20, 11, 7, 0.7);
  --preloader-bg: radial-gradient(ellipse at center, #3a1712, #120b07 70%);
  --compass-fill: rgba(0, 0, 0, .35);
  --needle-s: #e8e0cc;
  --input: rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

/* ---------- โหมดสว่าง: เลือกเอง หรือตามเครื่องเมื่อไม่ได้เลือก ---------- */
:root[data-theme="light"] {
  --bg: #f6efe2;
  --panel: rgba(255, 250, 240, 0.92);
  --panel-solid: #fffaf0;
  --line: rgba(150, 105, 20, 0.35);
  --gold: #b8892a;
  --gold-soft: #f1d98a;
  --text: #2b1a10;
  --muted: #6b5844;
  --shadow: 0 10px 30px rgba(80, 50, 10, 0.18);
  --accent-text: #7a4410;
  --scrim: rgba(246, 239, 226, 0.92);
  --node: #fffaf0;
  --intro-bg: radial-gradient(ellipse at center, rgba(250, 244, 232, 0.86), rgba(226, 211, 186, 0.96));
  --intro-card: rgba(255, 250, 240, 0.85);
  --preloader-bg: radial-gradient(ellipse at center, #fff6e3, #e6d6b9 70%);
  --compass-fill: rgba(255, 250, 240, .8);
  --needle-s: #8a7a62;
  --input: rgba(255, 255, 255, 0.75);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6efe2;
    --panel: rgba(255, 250, 240, 0.92);
    --panel-solid: #fffaf0;
    --line: rgba(150, 105, 20, 0.35);
    --gold: #b8892a;
    --gold-soft: #f1d98a;
    --text: #2b1a10;
    --muted: #6b5844;
    --shadow: 0 10px 30px rgba(80, 50, 10, 0.18);
    --accent-text: #7a4410;
    --scrim: rgba(246, 239, 226, 0.92);
    --node: #fffaf0;
    --intro-bg: radial-gradient(ellipse at center, rgba(250, 244, 232, 0.86), rgba(226, 211, 186, 0.96));
    --intro-card: rgba(255, 250, 240, 0.85);
    --preloader-bg: radial-gradient(ellipse at center, #fff6e3, #e6d6b9 70%);
    --compass-fill: rgba(255, 250, 240, .8);
    --needle-s: #8a7a62;
    --input: rgba(255, 255, 255, 0.75);
    color-scheme: light;
  }
}

/* ภาษาญี่ปุ่น / จีน ใช้ฟอนต์ที่มีอักษร CJK */
:root:lang(ja) { --font: "Noto Sans JP", "Sarabun", system-ui, sans-serif; --font-head: "Noto Sans JP", "Noto Serif Thai", serif; }
:root:lang(zh) { --font: "Noto Sans SC", "Sarabun", system-ui, sans-serif; --font-head: "Noto Sans SC", "Noto Serif Thai", serif; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#viewer { position: fixed; inset: 0; }

/* ---------- แถบบน ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 28px;
  background: linear-gradient(to bottom, var(--scrim), transparent);
  pointer-events: none;
  z-index: 10;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  flex: none;
  display: block;
  width: 42px; height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold), var(--shadow);
}
.brand h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--accent-text);
  line-height: 1.2;
}
.scene-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tools { display: flex; gap: 6px; flex: none; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 18px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--gold); outline: none; }
.icon-btn.on { background: var(--gold); color: var(--maroon); }

/* ---------- แผง ---------- */
.panel {
  position: fixed;
  z-index: 9;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px 6px 14px;
  font-family: var(--font-head);
  color: var(--accent-text);
  font-size: 14px;
}
.close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 2px 6px;
}
.close:hover { color: var(--accent-text); }

.minimap {
  right: 16px;
  bottom: 84px;
  width: 360px;
}
#map-svg { display: block; width: 100%; height: auto; aspect-ratio: 1; padding: 0 8px 8px; }
#map-svg .room { fill: rgba(212, 175, 55, 0.07); stroke: rgba(212, 175, 55, 0.4); stroke-width: .4; }
#map-svg .room-label { fill: var(--muted); font-size: 2.6px; text-anchor: start; font-family: var(--font); opacity: .8; }
#map-svg .path { stroke: var(--gold); stroke-width: .55; opacity: .6; }
#map-svg .cone path { fill: rgba(241, 217, 138, 0.35); stroke: none; }
#map-svg .node { cursor: pointer; }
#map-svg .node circle { fill: var(--node); stroke: var(--gold); stroke-width: .45; transition: r .2s; }
#map-svg .node:hover circle, #map-svg .node:focus circle { fill: var(--gold); outline: none; }
#map-svg .node.current circle { fill: var(--gold-soft); stroke: #fff; stroke-width: .6; }

.scene-list {
  left: 16px;
  top: 86px;
  width: 270px;
  max-height: calc(100% - 190px);
  overflow: auto;
}
.scene-list ol { list-style: none; margin: 0; padding: 0 8px 8px; }
.scene-list button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.scene-list button:hover { background: rgba(212, 175, 55, 0.12); }
.scene-list button.active { background: rgba(212, 175, 55, 0.22); color: var(--accent-text); }
.scene-list .num {
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  font-size: 12px;
}
.scene-list button.active .num { background: var(--gold); color: var(--maroon); }

/* ---------- แถบล่าง ---------- */
.bottombar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 36px 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--scrim), transparent);
  pointer-events: none;
  z-index: 8;
}
.bottombar > * { pointer-events: auto; }
.scene-desc { margin: 0; max-width: 60ch; color: var(--muted); font-size: 15px; }
.forward {
  flex: none;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--maroon);
  color: #f1d98a;
  font-weight: 600;
  cursor: pointer;
  max-width: 60vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forward:disabled { opacity: .55; cursor: default; border-color: var(--line); background: var(--panel); color: var(--text); font-weight: 400; }

/* ---------- ลูกศรแบบ Street View ---------- */
.sv-arrow {
  width: 84px; height: 84px;
  margin: -42px 0 0 -42px; /* จัดให้กึ่งกลางอยู่ที่ตำแหน่ง yaw/pitch */
  cursor: pointer;
  perspective: 240px;
}
.sv-arrow-shape {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.75);
  transform: rotateX(58deg);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.5);
  transition: background .2s, transform .2s, border-color .2s;
}
.sv-arrow-shape::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 30px; height: 30px;
  border-top: 9px solid #fff;
  border-left: 9px solid #fff;
  transform: translate(-50%, -30%) rotate(45deg);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.5));
}
.sv-arrow:hover .sv-arrow-shape {
  background: rgba(212, 175, 55, 0.6);
  border-color: var(--gold-soft);
  transform: rotateX(58deg) scale(1.12);
}
.sv-arrow-label {
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(20, 10, 6, 0.8);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.sv-arrow:hover .sv-arrow-label, .sv-arrow:focus .sv-arrow-label { opacity: 1; }
@media (hover: none) { .sv-arrow-label { opacity: .9; } }

/* ---------- จุดข้อมูล ---------- */
.sv-info {
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  cursor: pointer;
}
.sv-info-dot {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--maroon);
  font: 700 18px/1 Georgia, serif;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.35), 0 4px 12px rgba(0,0,0,.5);
  animation: pulse 2.4s ease-in-out infinite;
}
.sv-info-label {
  position: absolute;
  left: 42px; top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(20, 10, 6, 0.85);
  font-size: 13px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.sv-info:hover .sv-info-label { opacity: 1; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.35), 0 4px 12px rgba(0,0,0,.5); }
  50% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0.08), 0 4px 12px rgba(0,0,0,.5); }
}

.info-card {
  position: fixed;
  z-index: 11;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 32px));
  padding: 22px 24px 20px;
  background: var(--panel-solid);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.info-card .close { position: absolute; top: 8px; right: 8px; }
.info-card h2 { margin: 0 24px 8px 0; font-family: var(--font-head); color: var(--accent-text); font-size: 20px; }
.info-card p { margin: 0; line-height: 1.7; color: var(--text); }

/* ---------- หน้าต้อนรับ ---------- */
.intro {
  position: fixed; inset: 0;
  z-index: 20;
  display: grid; place-items: center;
  padding: 16px;
  background: var(--intro-bg);
  transition: opacity .6s;
}
.intro.gone { opacity: 0; pointer-events: none; }
.intro-card {
  width: min(520px, 100%);
  text-align: center;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--intro-card);
}
.intro-mark {
  display: block;
  width: 96px; height: 96px;
  margin: 0 auto 4px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--gold), 0 8px 30px rgba(0, 0, 0, .5);
}
.intro h2 {
  margin: 6px 0 4px;
  font-family: var(--font-head);
  font-size: clamp(30px, 7vw, 44px);
  color: var(--accent-text);
}
.intro p { margin: 0 0 18px; color: var(--muted); }
.intro-help { list-style: none; padding: 0; margin: 0 0 24px; line-height: 1.9; }
.start {
  padding: 12px 28px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #f1d98a, var(--gold));
  color: var(--maroon);
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.start:hover { filter: brightness(1.08); }

/* ---------- อื่น ๆ ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 90px;
  transform: translateX(-50%) translateY(20px);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--panel-solid);
  border: 1px solid var(--gold);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 30;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.edit-hud {
  position: fixed;
  left: 16px; bottom: 90px;
  z-index: 12;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #9ef09e;
  font: 12px/1.5 ui-monospace, monospace;
  white-space: pre;
}
.edit-hud::before {
  content: "+";
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: #9ef09e;
}

/* พื้นหลัง / ข้อความโหลดของ Pannellum */
.pnlm-container { background: var(--bg); font-family: var(--font); }
.pnlm-load-box { background: var(--panel); border-radius: var(--radius); }

@media (max-width: 720px) {
  .brand h1 { font-size: 16px; }
  .scene-title { font-size: 13px; }
  .brand-mark { width: 34px; height: 34px; }
  .icon-btn { width: 36px; height: 36px; font-size: 16px; }
  .tools { gap: 4px; }
  #btn-share, #btn-rotate { display: none; }
  .minimap { left: 16px; right: 16px; width: auto; bottom: 76px; }
  #map-svg { aspect-ratio: 1.6; }
  .scene-list { left: 16px; right: 16px; width: auto; top: 76px; }
  .bottombar { flex-direction: column; align-items: stretch; }
  .scene-desc { font-size: 13px; }
  .forward { max-width: none; }
}

/* ---------- งานศิลปะ ---------- */
.info-card {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100% - 120px);
  overflow: auto;
}
.info-card .info-sub { margin: -4px 0 10px; color: var(--muted); font-style: italic; }
.info-sub:empty, #info-text:empty, .info-where:empty { display: none; }
.info-img-link { display: block; margin-top: 4px; }
.info-img-link img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}
.info-card .info-where { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

.art-list .art-search {
  display: block;
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  font: inherit;
}
.art-list .art-search:focus { outline: none; border-color: var(--gold); }
.art-list .t { display: flex; flex-direction: column; min-width: 0; }
.art-list .en { color: var(--muted); font-size: 12px; }
.art-list .num { width: 28px; height: 28px; }
.art-list button.no-place .num { border-style: dashed; opacity: .7; }
.art-list li[hidden] { display: none; }
.panel-head small { color: var(--muted); font-family: var(--font); }
.panel-head > span { white-space: nowrap; }

/* จุดข้อมูลงานศิลปะในภาพ 360° */
.sv-info-dot { font-size: 16px; }

/* ---------- หน้าโหลด (preloader) ---------- */
.preloader {
  position: fixed; inset: 0;
  z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
  background: var(--preloader-bg);
  transition: opacity .6s ease, visibility .6s;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo {
  position: relative;
  width: 148px; height: 148px;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.preloader-logo img {
  width: 128px; height: 128px;
  border-radius: 50%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
  animation: logo-breathe 2.4s ease-in-out infinite;
}
.preloader-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(212, 175, 55, .2);
  border-top-color: var(--gold);
  border-right-color: var(--gold-soft);
  animation: ring-spin 1.1s linear infinite;
}
.preloader-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(26px, 6vw, 36px);
  color: var(--accent-text);
}
.preloader-text { margin: 0; color: var(--muted); font-size: 15px; }
.preloader-bar {
  width: min(240px, 70vw); height: 4px;
  margin-top: 18px;
  border-radius: 2px;
  background: rgba(212, 175, 55, .18);
  overflow: hidden;
}
.preloader-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transition: width .3s ease;
}
.preloader-status { margin: 10px 0 0; color: var(--text); font-size: 14px; opacity: .8; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes logo-breathe { 50% { transform: scale(.95); } }
@media (prefers-reduced-motion: reduce) {
  .preloader-ring, .preloader-logo img { animation: none; }
}

/* กล่องโหลดของ Pannellum ตอนเปลี่ยนจุด: ใช้โลโก้หน่วยงาน */
.pnlm-load-box {
  width: 220px; height: auto;
  margin: 0; padding: 18px 16px 14px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pnlm-load-box::before {
  content: "";
  display: block;
  width: 64px; height: 64px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff url("../images/logo/mcu-logo.png") center / cover no-repeat;
  box-shadow: 0 0 0 2px var(--gold);
  animation: logo-breathe 2.4s ease-in-out infinite;
}
.pnlm-load-box p { margin: 6px 0; font-family: var(--font); color: var(--text); }
.pnlm-lbar { border-color: var(--gold); }
.pnlm-lbar-fill { background: var(--gold); }

/* ---------- โมเดล 3 มิติ ---------- */
.btn-3d { font-size: 13px; font-weight: 700; letter-spacing: .5px; color: var(--accent-text); }
.model3d { position: fixed; inset: 0; z-index: 25; background: var(--bg); }
.model3d-canvas { position: absolute; inset: 0; }
.model3d-canvas canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.model3d-head {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 24px;
  background: linear-gradient(to bottom, var(--scrim), transparent);
  pointer-events: none;
}
.model3d-head > * { pointer-events: auto; }
.model3d-head h2 { margin: 0; font-family: var(--font-head); color: var(--accent-text); font-size: 20px; }
.model3d-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.model3d-head .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold-soft); box-shadow: 0 0 0 2px var(--maroon); vertical-align: middle;
}
.model3d-head .gem { color: var(--gold); }
#model3d-close { font-size: 24px; flex: none; }
.model3d-note {
  position: absolute; left: 16px; bottom: max(14px, env(safe-area-inset-bottom)); margin: 0;
  color: var(--muted); font-size: 13px; opacity: .8; pointer-events: none;
}
.model3d-status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0;
  padding: 10px 18px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
}
.model3d-tip {
  position: fixed; z-index: 26; pointer-events: none;
  padding: 4px 10px; border-radius: 8px; background: rgba(20, 10, 6, .9);
  border: 1px solid var(--line); font-size: 13px; white-space: nowrap;
}
@media (max-width: 720px) {
  .model3d-head h2 { font-size: 16px; }
  .model3d-head p { font-size: 12px; }
}

/* ---------- เข็มทิศ ---------- */
.compass {
  position: fixed;
  z-index: 9;
  right: 16px; top: 76px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 6px 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  cursor: pointer;
}
.compass:hover, .compass:focus-visible { border-color: var(--gold); outline: none; }
.compass svg { width: 64px; height: 64px; display: block; }
.compass .ring { fill: var(--compass-fill); stroke: var(--gold); stroke-width: 2; }
.compass .needle-n { fill: #c0392b; }
.compass .needle-s { fill: var(--needle-s); }
.compass .hub { fill: var(--gold); }
.compass .mark { fill: var(--gold-soft); }
.compass text { font: 700 11px var(--font); text-anchor: middle; fill: var(--muted); }
.compass text.n { fill: #ff6b5b; font-size: 12px; }
#compass-rose { transition: transform .08s linear; }
.compass-text { font-size: 11px; color: var(--text); white-space: nowrap; }
#map-svg .map-north path { fill: #ff6b5b; }
#map-svg .map-north text { fill: #ff6b5b; font: 700 3px var(--font); text-anchor: middle; }
@media (max-width: 720px) {
  .compass { top: 66px; padding: 4px 4px 2px; }
  .compass svg { width: 48px; height: 48px; }
  .compass-text { font-size: 10px; }
}

/* ---------- หน้าข้อมูล (about) ---------- */
.btn-about { font-weight: 700; color: var(--accent-text); }
.about {
  position: fixed; inset: 0; z-index: 35;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(8, 4, 2, .72);
  backdrop-filter: blur(3px);
}
.about-card {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px 24px 18px;
  border: 1px solid var(--gold);
  border-radius: 18px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}
.about-card .close { position: absolute; top: 10px; right: 10px; }
.about-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; padding-right: 28px; }
.about-head img { flex: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.about-head h2 { margin: 0; font-family: var(--font-head); font-size: 21px; color: var(--accent-text); }
.about-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.about-sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.about-sec h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 16px; color: var(--gold); }
.about-sec p { margin: 0 0 6px; line-height: 1.7; }
.about-list { margin: 4px 0 0; padding-left: 20px; line-height: 1.8; color: var(--text); }
.about-list a { color: var(--accent-text); }
.dev { display: flex; gap: 14px; align-items: center; }
.dev-photo {
  flex: none; width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px var(--gold), 0 6px 18px rgba(0, 0, 0, .45);
}
.dev-en { color: var(--muted); font-size: 13px; letter-spacing: .3px; }
.dev-tag { margin-top: 2px !important; font-size: 12px; color: var(--gold); letter-spacing: .5px; }
.dev-contact {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 16px;
}
.dev-contact li { display: flex; gap: 8px; font-size: 14px; min-width: 0; }
.dev-contact span { flex: none; width: 56px; color: var(--muted); }
.dev-contact a { color: var(--accent-text); text-decoration: none; overflow-wrap: anywhere; }
.dev-contact a:hover { text-decoration: underline; }
.dev-avatar {
  flex: none; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--maroon); font-family: var(--font-head); font-weight: 700; font-size: 20px;
}
.dev p { margin: 0; }
.dev-name { font-size: 18px; font-weight: 600; color: var(--text); }
.dev-role { color: var(--accent-text); }
.dev-org { color: var(--muted); font-size: 14px; }
.intro-credit { margin: 16px 0 0 !important; font-size: 13px; color: var(--muted); }
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--accent-text); text-decoration: underline; font: inherit;
}
@media (max-width: 720px) {
  #btn-full { display: none; }
  .about-card { padding: 18px 16px 14px; }
  .about-head h2 { font-size: 18px; }
}

/* ---------- ภาษาและโหมดสี ---------- */
.settings { right: 16px; top: 86px; width: 340px; z-index: 11; }
.settings-body { padding: 0 14px 14px; }
.settings-label { margin: 8px 0 6px; font-size: 13px; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.theme-switch { grid-template-columns: repeat(3, 1fr); }
.seg button, .intro-langs button {
  min-width: 0;
  padding: 7px 6px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}
.seg button:hover, .intro-langs button:hover { border-color: var(--gold); }
.seg button[aria-pressed="true"], .intro-langs button[aria-pressed="true"] {
  background: var(--gold); border-color: var(--gold); color: #2b1a10; font-weight: 600;
}
.intro-langs { display: flex; justify-content: center; gap: 6px; margin: 16px 0 0; }
.intro-langs button { flex: none; min-width: 0; padding: 5px 10px; font-size: 13px; }
.info-card .info-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.info-card .info-note::before { content: "ⓘ "; color: var(--gold); }
@media (max-width: 720px) {
  .settings { left: 12px; right: 12px; top: 74px; width: auto; }
}
.brand > div { min-width: 0; }
.brand h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
