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

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

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

body {
  margin: 0;
  padding-bottom: 88px;
  background: #000000;
  color: #e4e4e4;
  font-family: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: 0.012em;
  color-scheme: dark;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #8fd0ff;
}

:focus-visible {
  outline: 2px solid #7cffb2;
  outline-offset: 3px;
}

/* 底部固定条 */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.mark:hover,
.mark:focus-visible {
  border-color: rgba(124, 255, 178, 0.6);
  box-shadow: 0 0 16px rgba(124, 255, 178, 0.24);
}

.mark-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.mark-text {
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  color: #f0f0f0;
  padding: 0 4px;
  letter-spacing: 0;
  max-height: 40px;
  overflow: hidden;
}

.menu-btn {
  min-height: 46px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: #ededed;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.24);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.menu-btn:hover,
.menu-btn:focus-visible {
  color: #7cffb2;
  border-color: #7cffb2;
  background: rgba(124, 255, 178, 0.07);
}

/* 全屏遮罩菜单 */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 22px 96px;
  background: radial-gradient(120% 80% at 20% 0%, #121212 0%, #000000 62%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

body.menu-open .menu {
  opacity: 1;
  visibility: visible;
}

.menu-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: 0;
}

.menu-row a {
  display: block;
  padding: 13px 2px 13px 0;
  min-height: 50px;
  color: #f4f4f4;
  font-size: clamp(18px, 4.6vw, 26px);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.34s ease, transform 0.34s ease, color 0.2s ease, padding-left 0.2s ease;
}

body.menu-open .menu-row a {
  opacity: 1;
  transform: none;
}

.menu-row a:nth-child(2) { transition-delay: 0.04s; }
.menu-row a:nth-child(3) { transition-delay: 0.08s; }
.menu-row a:nth-child(4) { transition-delay: 0.12s; }
.menu-row a:nth-child(5) { transition-delay: 0.16s; }
.menu-row a:nth-child(6) { transition-delay: 0.2s; }
.menu-row a:nth-child(7) { transition-delay: 0.24s; }

.menu-row a:hover,
.menu-row a:focus-visible {
  color: #7cffb2;
  padding-left: 12px;
  text-shadow: 0 0 12px rgba(124, 255, 178, 0.45);
}

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 45vh;
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 10% 0%, rgba(110, 168, 255, 0.18) 0%, rgba(0, 0, 0, 0) 55%),
    linear-gradient(160deg, #121212 0%, #000000 68%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 44px), 0 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.52) 58%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  margin: 0;
}

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

.hero-in {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 22px 76px;
  text-align: left;
}

.hero-title {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(30px, 7vw, 58px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 0 26px rgba(110, 168, 255, 0.34);
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 54px;
  height: 2px;
  background: linear-gradient(90deg, #7cffb2 0%, #6ea8ff 34%, #b98cff 66%, #ffd166 100%);
  opacity: 0.85;
  transform: rotate(-1.2deg);
  transform-origin: left center;
  z-index: 3;
}

/* 版心 */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  padding: 44px 0 72px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 40px;
}

/* 正文 */
.prose > article {
  scroll-margin-top: 26px;
  margin: 0 0 26px;
  padding: 26px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.014) 100%);
  border: 1px solid rgba(255, 255, 255, 0.085);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  animation: rise 0.62s ease both;
}

.prose > article:nth-child(1) { animation-delay: 0.02s; }
.prose > article:nth-child(2) { animation-delay: 0.07s; }
.prose > article:nth-child(3) { animation-delay: 0.12s; }
.prose > article:nth-child(4) { animation-delay: 0.17s; }
.prose > article:nth-child(5) { animation-delay: 0.22s; }
.prose > article:nth-child(6) { animation-delay: 0.27s; }
.prose > article:nth-child(7) { animation-delay: 0.32s; }

.prose > article:hover {
  border-color: rgba(124, 255, 178, 0.32);
  box-shadow: 0 22px 44px -34px rgba(124, 255, 178, 0.7), inset 0 0 0 1px rgba(124, 255, 178, 0.08);
  transform: translateY(-2px);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.prose small {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #7cffb2;
}

.prose h2 {
  margin: 0 0 0.55em;
  font-size: clamp(22px, 3.6vw, 30px);
  line-height: 1.34;
  letter-spacing: -0.005em;
  color: #ffffff;
}

.prose h3 {
  margin: 1.3em 0 0.5em;
  font-size: clamp(18px, 2.6vw, 21px);
  line-height: 1.42;
  color: #cfe9ff;
}

.prose p {
  margin: 0 0 1em;
  max-width: 68ch;
  color: #dedede;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: #8fd0ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #7cffb2;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.prose li {
  margin: 0.45em 0;
  color: #dedede;
}

.prose li::marker {
  color: #b98cff;
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 16px;
  border-left: 3px solid #b98cff;
  background: rgba(185, 140, 255, 0.09);
  color: #ece4ff;
}

.prose blockquote p {
  margin: 0;
}

.prose img {
  display: block;
  margin: 1.2em 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.prose hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.6em 0;
}

.prose strong {
  color: #ffffff;
  font-weight: 700;
}

/* 右侧栏 */
.rail {
  padding: 22px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.rail-key {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  letter-spacing: 0.18em;
  color: #ffd166;
}

.rail-title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.4;
  color: #ffffff;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 2px;
  font-size: 16px;
  color: #d5d5d5;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 0.22s ease, padding-left 0.22s ease;
}

.rail-list li:last-child a {
  border-bottom: 0;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #7cffb2;
  padding-left: 8px;
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px 26px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 22px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.foot-brand {
  font-size: clamp(28px, 8.5vw, 60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 0 22px rgba(110, 168, 255, 0.22);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  flex: 1 1 auto;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  font-size: 16px;
  color: #b9b9b9;
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: #7cffb2;
}

.copy {
  margin: 0;
  font-size: 16px;
  color: #7c7c7c;
}

/* 桌面 */
@media (min-width: 960px) {
  .content {
    grid-template-columns: minmax(0, 1fr) 296px;
    gap: 54px;
    align-items: start;
    padding: 56px 0 88px;
  }

  .rail {
    position: sticky;
    top: 26px;
  }

  .prose > article {
    padding: 32px 30px;
  }

  .hero {
    min-height: 46vh;
  }

  .hero-in {
    padding: 84px 30px 92px;
  }

  .wrap {
    padding: 0 30px;
  }

  .bar {
    padding: 12px 30px;
  }

  .menu-row a {
    padding: 15px 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }

  .menu-row a {
    opacity: 1;
    transform: none;
  }
}

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