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

:root {
  --pink: #F5325B;
  --ink: #1A1A1A;
  --cream: #FFE9D6;
  --paper: #FFFFFF;
  --line: #E7D2C1;
  --mute: #6B564B;
  --soft: #FBD3DE;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Noto Sans Thai', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}

a {
  color: var(--pink);
  text-underline-offset: 3px;
}

img {
  border: 0;
}

/* 顶部细条 */
.ticker {
  display: flex;
  align-items: center;
  background: var(--pink);
  color: #fff;
  font-size: 1rem;
  line-height: 1.5;
  padding: 8px 16px;
  min-height: 40px;
  overflow: hidden;
}

.ticker span {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* 头部：两行，品牌独占一行 */
.hd {
  background: var(--ink);
  color: var(--cream);
}

.hd-brand {
  padding: 10px 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  color: var(--cream);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand:hover {
  color: var(--pink);
}

.hd-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}

.dd {
  flex: 1 1 140px;
  min-width: 0;
}

.dd > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  transition: background 160ms ease, color 160ms ease;
}

.dd > summary::-webkit-details-marker {
  display: none;
}

.dd > summary::after {
  content: "+";
  font-weight: 700;
}

.dd[open] > summary {
  background: var(--pink);
  color: #fff;
}

.dd[open] > summary::after {
  content: "−";
}

.dd > menu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-top: 0;
}

.dd > menu li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
}

.dd > menu li:last-child a {
  border-bottom: 0;
}

.dd > menu li a:hover,
.dd > menu li a:focus-visible {
  background: var(--soft);
}

/* 容器 */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

/* 首页首屏 */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 45vh;
  padding: 38px 18px 30px;
  text-align: center;
  border-bottom: 3px solid var(--ink);
  background: var(--cream);
}

.ghost {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(3.4rem, 15vw, 9rem);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pink);
  opacity: 0.16;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 3.2rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-img {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  height: auto;
  border: 3px solid var(--ink);
}

/* 正文 + 侧栏 */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  padding: 26px 0 40px;
}

.doc {
  min-width: 0;
}

.doc > section {
  padding: 22px 0;
  border-top: 3px solid var(--ink);
  scroll-margin-top: 18px;
}

.doc > section:first-child {
  border-top: 0;
  padding-top: 2px;
}

.doc h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--pink);
}

.doc h3 {
  margin: 20px 0 8px;
  font-size: 1.15rem;
  line-height: 1.4;
  font-weight: 700;
}

.doc p {
  margin: 0 0 14px;
}

.doc ul,
.doc ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
}

.doc li {
  margin: 0 0 6px;
}

.doc a {
  color: var(--pink);
}

.doc strong {
  font-weight: 700;
}

.doc img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
}

.doc blockquote {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--paper);
  border-left: 6px solid var(--pink);
}

.doc blockquote p:last-child {
  margin: 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 1rem;
}

.doc th,
.doc td {
  border: 2px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.doc th {
  background: var(--soft);
}

/* 侧栏 */
.side {
  background: var(--paper);
  border-top: 8px solid var(--pink);
  padding: 16px;
}

.side h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  line-height: 1.4;
  font-weight: 700;
}

.side .subtitle {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--mute);
  font-weight: 500;
}

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

.side li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

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

.side li a:hover {
  color: var(--pink);
}

/* 页脚 */
.ft {
  background: var(--ink);
  color: var(--cream);
  padding: 30px 18px 22px;
  margin-top: 10px;
}

.ft-brand {
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 11vw, 5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pink);
  word-break: break-all;
}

.ft-dls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 18px;
}

.ft dt {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--paper);
}

.ft dd {
  margin: 0;
}

.ft dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  color: var(--cream);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
}

.ft dd a:hover {
  color: var(--pink);
}

.ft-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 2px solid #434343;
}

.ft-bottom p {
  margin: 0;
  font-size: 1rem;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 2px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
}

.to-top:hover {
  color: var(--pink);
}

/* 进场 */
html.js .doc > section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease;
}

html.js .doc > section.in {
  opacity: 1;
  transform: none;
}

/* 桌面 */
@media (min-width: 900px) {
  .hd-brand {
    padding: 12px 0 0;
  }

  .hd-menu {
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    padding: 0 0 16px;
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 18px;
    padding-right: 18px;
  }

  .hd-brand .brand {
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 18px;
    padding-right: 18px;
  }

  .hd-brand {
    padding-left: 0;
    padding-right: 0;
  }

  .dd {
    flex: 0 1 auto;
    display: flex;
    align-items: stretch;
  }

  .dd > summary {
    flex: 0 0 auto;
    background: var(--pink);
    color: #fff;
    pointer-events: none;
  }

  .dd > summary::after {
    content: "";
  }

  .dd > menu,
  .dd:not([open]) > menu {
    display: flex;
    align-items: stretch;
    gap: 2px;
    background: var(--ink);
    border: 0;
    padding: 0;
  }

  .dd > menu li a {
    min-height: 44px;
    padding: 8px 12px;
    color: var(--cream);
    border-bottom: 0;
    font-weight: 500;
  }

  .dd > menu li a:hover,
  .dd > menu li a:focus-visible {
    background: var(--cream);
    color: var(--ink);
  }

  .cols {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    align-items: start;
    padding: 34px 0 52px;
  }

  .side {
    position: sticky;
    top: 18px;
  }

  .ft {
    padding: 44px 18px 26px;
  }

  .ft-dls {
    gap: 28px;
    padding-bottom: 26px;
  }

  .doc h2 {
    font-size: 1.55rem;
  }
}

@media (min-width: 1160px) {
  .hd-menu,
  .hd-brand .brand {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 420px) {
  .ft-dls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .ft dd a {
    font-size: 1rem;
    word-break: break-word;
  }
}

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

  html.js .doc > section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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