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

:root {
  --main: #ff0080;
  --alt: #ff00ff;
  --ink: #26171f;
  --paper: #fbeef6;
  --dim: #d9b6cc;
  --line: rgba(255, 255, 255, 0.14);
}

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

html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Noto Sans Thai", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper);
  background: transparent;
  padding-bottom: 132px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 36% at 10% 6%, rgba(255, 0, 128, 0.55), transparent 60%),
    radial-gradient(46% 40% at 92% 14%, rgba(255, 0, 255, 0.42), transparent 64%),
    radial-gradient(70% 55% at 74% 96%, rgba(255, 0, 128, 0.26), transparent 72%),
    conic-gradient(from 200deg at 38% 62%, rgba(255, 0, 255, 0.22), rgba(255, 0, 128, 0.12), rgba(38, 23, 31, 0.88), rgba(255, 0, 255, 0.2));
  background-size: 180% 180%, 170% 170%, 200% 200%, 160% 160%;
  background-position: 0% 0%, 100% 0%, 60% 100%, 50% 50%;
  animation: aurora 26s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% { background-position: 0% 0%, 100% 0%, 60% 100%, 50% 50%; filter: hue-rotate(0deg); }
  100% { background-position: 32% 18%, 68% 22%, 40% 70%, 62% 40%; filter: hue-rotate(28deg); }
}

img { max-width: 100%; }

a { color: #ffc0e0; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 底部固定条 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(38, 23, 31, 0.7), rgba(20, 12, 17, 0.94) 38%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -18px 40px rgba(255, 0, 128, 0.14);
}

.dock-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-nav::-webkit-scrollbar { height: 0; }

.dock-set {
  display: flex;
  gap: 2px;
  margin: 0;
  min-width: 0;
}

.dock-left { flex: 1 1 auto; justify-content: flex-end; }
.dock-right { flex: 1 1 auto; justify-content: flex-start; }

.dock-set a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.3s ease;
}

.dock-set a:hover,
.dock-set a:focus-visible {
  color: #fff;
  border-bottom-color: var(--main);
  background: linear-gradient(180deg, transparent, rgba(255, 0, 128, 0.22));
}

.dock-brand {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 8px;
}

.dock-brand a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(96deg, #fff, var(--main) 55%, var(--alt));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mark {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-bottom: 2px solid var(--main);
  flex: 0 0 auto;
}

.dock-search {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  margin-left: 4px;
}

.dock-search input {
  width: 92px;
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}

.dock-search input::placeholder { color: var(--dim); }

.dock-search button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: linear-gradient(120deg, var(--main), var(--alt));
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.dock-search button:hover { filter: brightness(1.15); }

/* 首屏 */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 70vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(26px, 6vw, 64px) clamp(16px, 5vw, 48px) 0;
  text-align: right;
}

.hero-copy {
  padding-bottom: clamp(20px, 4vw, 40px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 6vw, 58px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.hero-desc {
  margin: 0 0 0 auto;
  max-width: 54ch;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--dim);
  line-height: 1.8;
}

.hero-img {
  display: block;
  width: 100%;
  margin-top: auto;
  max-height: 40vh;
  object-fit: cover;
  border-bottom: 4px solid var(--main);
  border-top: 1px solid var(--line);
  filter: saturate(1.1) contrast(1.03);
}

/* 主体 */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(38px, 7vw, 78px) clamp(16px, 5vw, 48px) 0;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

section { scroll-margin-top: 76px; }

.prose { max-width: 70ch; }

small {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--alt);
  font-weight: 500;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.32;
  font-weight: 700;
  background: linear-gradient(96deg, #ffffff, var(--main) 62%, var(--alt));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h3 {
  margin: 26px 0 10px;
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.4;
  color: #fff;
}

p { margin: 0 0 16px; }

.prose section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 2px solid rgba(255, 0, 128, 0.24);
}

.prose section:first-of-type { border-top: 0; padding-top: 0; }

.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 18px; }
.prose li { margin: 0.35em 0; }

.prose a {
  color: #ffd3e8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.prose a:hover { color: #fff; }

.prose img {
  display: block;
  margin: 20px 0;
  border-bottom: 3px solid var(--main);
}

.prose blockquote {
  margin: 22px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--alt);
  background: linear-gradient(90deg, rgba(255, 0, 255, 0.16), transparent);
  color: var(--dim);
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
}

.prose th, .prose td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.hit {
  outline: 2px solid var(--alt);
  outline-offset: 6px;
  background: rgba(255, 0, 255, 0.1);
}

/* 侧栏 */
.rail {
  border-top: 3px solid var(--main);
  padding-top: 16px;
}

.rail h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--dim);
}

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

.rail li { border-bottom: 2px solid rgba(255, 0, 255, 0.22); }

.rail a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 6px 4px 6px 12px;
  font-size: 16px;
  color: var(--paper);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: border-color 0.2s ease, background 0.3s ease, padding-left 0.2s ease;
}

.rail a:hover,
.rail a:focus-visible {
  border-left-color: var(--main);
  padding-left: 18px;
  background: linear-gradient(90deg, rgba(255, 0, 128, 0.24), transparent);
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: clamp(48px, 8vw, 90px);
  padding: clamp(28px, 5vw, 46px) clamp(16px, 5vw, 48px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 0, 128, 0.14), transparent 70%);
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #fff;
  min-height: 44px;
}

.foot-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: #fff;
  border-bottom-color: var(--main);
}

.foot-legal {
  font-size: 15px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.totop {
  position: fixed;
  right: 14px;
  bottom: 128px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(120deg, var(--main), var(--alt));
  box-shadow: 0 8px 24px rgba(255, 0, 128, 0.4);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.totop:hover { transform: translateY(-2px); filter: brightness(1.1); }

.rise {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.rise.in { opacity: 1; transform: none; }

@media (min-width: 960px) {
  .content { grid-template-columns: minmax(0, 1fr) 268px; gap: 56px; }
  .rail { position: sticky; top: 26px; }
  .totop { right: 24px; }
}

@media (max-width: 700px) {
  body { padding-bottom: 148px; }
  .dock-search input { width: 74px; }
  .dock-set a { padding: 0 8px; font-size: 15px; }
  .hero { min-height: 68vh; }
  .totop { bottom: 146px; right: 10px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .rise { opacity: 1; transform: none; transition: none; }
  .totop:hover { transform: none; }
  .rail a { transition: none; }
}

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