@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;700&display=swap');

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

:root {
  --neon: #69ff69;
  --cyan: #00ffff;
  --ink: #172617;
  --ink-deep: #0b140c;
  --paper: #e9ffe9;
  --muted: #a9c9b2;
  --r: 28px;
  --chrome: linear-gradient(180deg, #fdfffe 0%, #cfe6d8 36%, #7d9a88 54%, #f2fff7 72%, #a9c6b4 100%);
  --edge: 1px solid rgba(105, 255, 105, 0.26);
}

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Noto Sans Thai", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(0, 255, 255, 0.18), transparent 46%),
    radial-gradient(circle at 88% 2%, rgba(105, 255, 105, 0.18), transparent 42%),
    radial-gradient(rgba(105, 255, 105, 0.13) 1px, transparent 1px),
    linear-gradient(180deg, #172617 0%, #0b140c 100%);
  background-size: auto, auto, 22px 22px, auto;
  background-attachment: fixed, fixed, scroll, fixed;
}

img { max-width: 100%; }
a { color: var(--cyan); }

.skip {
  position: absolute;
  top: -70px;
  left: 12px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, var(--neon));
  color: #06170b;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 10px; }

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 10px 16px 12px;
  border-bottom: var(--edge);
  background: rgba(10, 20, 11, 0.86);
  backdrop-filter: blur(10px);
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px;
  text-decoration: none;
}

.mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.mark-css {
  background: var(--chrome);
  box-shadow: 0 0 0 2px var(--neon), 0 0 18px rgba(0, 255, 255, 0.6);
}

.brandtxt {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.015em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(105, 255, 105, 0.5));
}

.search {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 300px;
  padding: 4px 5px 4px 12px;
  border: 1px solid rgba(0, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(105, 255, 105, 0.09);
}

.search input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  outline: none;
}
.search input::placeholder { color: #8fb59c; }

.search button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #07180c;
  background: linear-gradient(180deg, #ffffff, var(--neon) 55%, #1fa864);
  box-shadow: 0 0 14px rgba(105, 255, 105, 0.55), inset 0 1px 0 #ffffff;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.search button:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(0, 255, 255, 0.65); }

.navbox { max-width: 1120px; margin: 8px auto 0; }

summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(0, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(0, 255, 255, 0.08);
  color: var(--cyan);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  box-shadow: inset 0 0 12px rgba(0, 255, 255, 0.14);
}
summary::-webkit-details-marker { display: none; }

summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.navbox[open] summary::after { transform: rotate(-135deg) translateY(-1px); }

.navlist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.navlist a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(105, 255, 105, 0.3);
  border-radius: 999px;
  background: rgba(105, 255, 105, 0.12);
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.navlist a:hover {
  background: rgba(0, 255, 255, 0.26);
  color: #04140a;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.55);
}

.spark {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
  transform: rotate(45deg);
}

.search-hint {
  max-width: 1120px;
  margin: 8px auto 0;
  font-size: 15px;
  color: var(--cyan);
}
.search-hint:empty { margin: 0; }

/* 布局 */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 26px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

/* 头部主视觉 */
.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 22px;
  align-items: center;
  min-height: 44vh;
  padding: 22px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: var(--r);
  background-image:
    radial-gradient(rgba(105, 255, 105, 0.18) 1px, transparent 1px),
    linear-gradient(140deg, rgba(0, 255, 255, 0.14), rgba(105, 255, 105, 0.06) 58%, transparent);
  background-size: 18px 18px, auto;
  box-shadow: inset 0 0 40px rgba(0, 255, 255, 0.08);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(27px, 5.6vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(105, 255, 105, 0.45));
}

.lede {
  display: -webkit-box;
  max-width: 46ch;
  margin: 0 0 16px;
  overflow: hidden;
  color: #d5f5dd;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, var(--neon) 55%, #1fa864);
  box-shadow: 0 6px 18px rgba(105, 255, 105, 0.3), inset 0 1px 0 #ffffff;
  color: #06170b;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 255, 255, 0.45); }

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.6);
  color: var(--cyan);
  box-shadow: inset 0 0 14px rgba(0, 255, 255, 0.18);
}
.btn.ghost:hover { background: rgba(0, 255, 255, 0.14); }

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--chrome);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 0 28px rgba(0, 255, 255, 0.35);
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(0, 255, 255, 0.45));
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.6), inset -3px -4px 8px rgba(23, 38, 23, 0.28);
}
.b1 { top: 12%; left: 14%; width: 62px; height: 62px; }
.b2 { right: 12%; top: 22%; width: 36px; height: 36px; }
.b3 { bottom: 12%; left: 26%; width: 26px; height: 26px; }
.b4 { right: 24%; bottom: 16%; width: 78px; height: 78px; opacity: 0.7; }

.star {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--ink);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.s1 { top: 18%; right: 30%; }
.s2 { bottom: 20%; left: 12%; }

/* 正文 */
.main-col { min-width: 0; }

.content {
  counter-reset: sect;
  min-width: 0;
}

.content section {
  counter-increment: sect;
  scroll-margin-top: 138px;
  padding: 26px 0;
  border-top: 1px dashed rgba(105, 255, 105, 0.24);
}
.content section:first-child { padding-top: 4px; border-top: 0; }

.content h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: clamp(21px, 3.4vw, 26px);
  line-height: 1.35;
  color: #f2fff4;
  text-shadow: 0 0 12px rgba(105, 255, 105, 0.5);
}

.content h2::before {
  content: counter(sect, decimal-leading-zero);
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, var(--neon));
  box-shadow: 0 0 12px rgba(105, 255, 105, 0.6);
  color: #0a1a0b;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.content h3 {
  margin: 20px 0 8px;
  font-size: 19px;
  color: #e6ffe9;
}

.content p { margin: 0 0 14px; color: #dcf6e2; }
.content ul, .content ol { margin: 0 0 14px; padding-left: 22px; }
.content li { margin: 6px 0; }
.content strong { color: #ffffff; }
.content a { text-underline-offset: 3px; text-decoration-color: rgba(0, 255, 255, 0.5); }
.content blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--neon);
  border-radius: 0 18px 18px 0;
  background: rgba(105, 255, 105, 0.09);
}
.content blockquote p:last-child { margin-bottom: 0; }
.content img { height: auto; border-radius: 18px; }
.content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 16px; }
.content th, .content td { padding: 9px 12px; border-bottom: 1px solid rgba(105, 255, 105, 0.22); text-align: left; }
.content th { color: var(--cyan); }

/* 侧栏 */
.side {
  position: sticky;
  top: 138px;
  padding: 18px 16px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: var(--r);
  background: rgba(9, 20, 10, 0.74);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 26px rgba(0, 255, 255, 0.1);
}

.side small {
  display: block;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.side h2 {
  margin: 2px 0 12px;
  font-size: 20px;
  color: #eefff2;
}

.side ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }

.side a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(105, 255, 105, 0.1);
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.side a:hover { background: rgba(0, 255, 255, 0.26); color: #04140a; transform: translateX(2px); }

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, var(--neon));
  color: #06170b !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(105, 255, 105, 0.5);
}

/* 页脚 */
.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 26px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 16px 46px;
  border-top: 1px solid rgba(0, 255, 255, 0.26);
}

.foot-brand p {
  max-width: 40ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.foot-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  color: #cfeeda;
  font-size: 16px;
  text-decoration: none;
}
.foot-nav a:hover { color: #04140a; background: rgba(0, 255, 255, 0.28); }

.copy {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(105, 255, 105, 0.22);
  color: #8fb59c;
  font-size: 14px;
}

/* 动效 */
.js .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.js .rv.in { opacity: 1; transform: none; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* 断点 */
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot-nav ul { justify-content: flex-start; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brandtxt { font-size: 17px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 18px;
  }
  .hero-art { min-height: 130px; }
  .lede { -webkit-line-clamp: 5; }
  .content section { scroll-margin-top: 130px; }
  .content h2 { font-size: 21px; }
  .news { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
