/* =========================================================================
   components.css — ปุ่ม · Carousel · การ์ดข่าว · แผนผัง · Dialog · Skeleton
   ========================================================================= */

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border);
  font-size: 14px; white-space: nowrap;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t);
}
@media (hover: hover) { a.pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } }
a.pill:active { transform: scale(.96); }
.pill-discord { background: var(--discord); border-color: var(--discord); color: #fff; }
.clock { font-variant-numeric: tabular-nums; cursor: default; }
.clock time { font-weight: 700; letter-spacing: .5px; }
.clock-date { color: var(--muted); font-size: 13px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: livePulse 1.8s infinite; }
.theme-switch { padding: 2px; gap: 2px; }
.theme-switch button {
  width: 32px; height: 28px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t), transform var(--t) var(--spring);
}
.theme-switch button:active { transform: scale(.85); }
.theme-switch button.active { background: var(--text); color: var(--surface); }
.theme-switch button.active i { animation: popIn .5s var(--spring); }
.admin-btn { font-weight: 600; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.user-chip .av { width: 26px; height: 26px; margin: 0; font-size: 11px; }
.user-chip .lbl { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--discord); color: #fff; font-size: 11px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
@media (hover: hover) { .btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); } }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-dark { background: var(--text); border-color: var(--text); color: var(--surface); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; min-height: 44px; }

.badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
  background: var(--badge-bg); color: var(--badge-fg); font-size: 12px; font-weight: 600;
  padding: 2px 11px; border-radius: var(--r-pill);
}

/* ---------- Avatar ---------- */
.av {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--c);
}

/* ---------- Search & Chips ---------- */
.controls { text-align: center; margin: 26px 0 22px; }
.search-box { position: relative; width: 320px; max-width: 100%; margin: 0 auto 12px; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.search-box input {
  width: 100%; height: 40px; padding: 0 12px 0 36px; -webkit-appearance: none; appearance: none;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip {
  height: 32px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface); font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s, border-color .3s, transform .3s var(--spring);
}
@media (hover: hover) { .chip:hover { border-color: var(--muted); } }
.chip:active { transform: scale(.94); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); font-weight: 600; }

/* ---------- Carousel ---------- */
.carousel { position: relative; max-width: min(1060px, 100% - 112px); margin: 8px auto 0; }
.carousel-stage { position: relative; }
.carousel-viewport {
  overflow: hidden; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  touch-action: pan-y; -webkit-user-select: none; user-select: none; outline: none;
}
.carousel-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.carousel-track { display: flex; transition: transform .75s var(--ease); will-change: transform; }
.carousel-track.dragging, .carousel-track.no-anim { transition: none; }
.carousel-slide { flex: 0 0 100%; min-width: 0; }
.carousel-slide .news-card { border: 0; border-radius: 0; box-shadow: none; height: 100%; }
.carousel-slide .news-thumb { min-height: clamp(200px, 22vw, 240px); }
.carousel-slide.is-active .news-thumb img { animation: kenburns 7s var(--ease) both; }
.carousel-slide .news-body > * { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.carousel-slide.is-active .news-body > * { opacity: 1; transform: none; }
.carousel-slide.is-active .news-body > :nth-child(1) { transition-delay: .15s; }
.carousel-slide.is-active .news-body > :nth-child(2) { transition-delay: .22s; }
.carousel-slide.is-active .news-body > :nth-child(3) { transition-delay: .29s; }
.carousel-slide.is-active .news-body > :nth-child(4) { transition-delay: .36s; }
.carousel-slide.is-active .news-body > :nth-child(5) { transition-delay: .43s; }

.car-btn {
  position: absolute; top: 50%; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgb(20 20 20 / .8); color: #fff; border: 1px solid rgb(255 255 255 / .08);
  backdrop-filter: blur(6px); box-shadow: var(--shadow-md);
  transform: translateY(-50%); transition: transform .35s var(--spring), background-color .2s;
}
.car-prev { left: -54px; }
.car-next { right: -54px; }
@media (hover: hover) { .car-btn:hover { transform: translateY(-50%) scale(1.12); background: #000; } }
.car-btn:active { transform: translateY(-50%) scale(.9); }

.carousel-nav { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; }
.carousel-dots { display: flex; align-items: center; gap: 5px; }
.dot-btn {
  position: relative; width: 8px; height: 20px; padding: 6px 0; border: 0; cursor: pointer; overflow: hidden;
  border-radius: var(--r-pill); background: var(--line); background-clip: content-box;
  transition: width .5s var(--ease), background-color .3s;
}
.dot-btn.active { width: 30px; background-color: color-mix(in srgb, var(--text) 22%, transparent); }
.dot-btn::after {
  content: ''; position: absolute; inset: 6px 0; border-radius: var(--r-pill);
  background: var(--text); transform: scaleX(0); transform-origin: left;
}
.dot-btn.active::after { animation: progress var(--interval, 3500ms) linear forwards; }
.carousel.paused .dot-btn.active::after { animation-play-state: paused; }
.carousel.reduced .dot-btn.active::after { animation: none; transform: scaleX(1); }
.car-toggle {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 10px; cursor: pointer; transition: transform .3s var(--spring);
}
.car-toggle:active { transform: scale(.85); }
.carousel.single .car-btn, .carousel.single .carousel-nav { display: none; }

/* ---------- News card (Split Banner) ---------- */
.news-card {
  display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.news-thumb { position: relative; flex: 0 0 50%; min-height: 210px; background: var(--surface-2); overflow: hidden; }
.news-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; color: var(--muted); }
.news-body { flex: 1; min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.news-title { font-size: 18px; font-weight: 700; line-height: 1.35; }
.news-excerpt { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.read-more i { font-size: 11px; transition: transform .3s var(--ease); }
.read-more:hover i { transform: translateX(4px); }
.news-date { margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--muted); }
@media (hover: hover) {
  .news-list .news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
  .news-list .news-card:hover .news-thumb img { transform: scale(1.06); }
}
#view-news { padding: 16px 0 70px; }
.sec-head { text-align: center; margin-bottom: 20px; }
.sec-title { font-size: 22px; font-weight: 700; }
.news-list { display: grid; gap: 16px; max-width: 800px; margin: 0 auto; }

/* Scroll reveal */
.reveal { opacity: 0; }
.reveal.show { opacity: 1; animation: fadeUp .7s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 90ms); }

/* ---------- Org chart ---------- */
.chart-scroll { overflow-x: auto; padding: 4px 0 48px; }
.chart { width: max-content; min-width: 100%; display: flex; flex-direction: column; align-items: center; }
.chart-enter { animation: fadeIn .4s ease; }
.top { display: flex; flex-direction: column; align-items: center; }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.vline { width: 1px; height: 24px; background: var(--line); transform-origin: top; animation: growY .5s var(--ease) backwards .1s; }
.vline.short { height: 8px; }
.depts { display: flex; justify-content: center; }
.dept { position: relative; display: flex; flex-direction: column; align-items: center; padding: 24px 6px 0; animation: fadeIn .6s ease backwards .1s; }
.dept::before, .dept::after { content: ''; position: absolute; top: 0; width: 50%; height: 24px; border-top: 1px solid var(--line); }
.dept::before { right: 50%; }
.dept::after { left: 50%; border-left: 1px solid var(--line); }
.dept:first-child::before, .dept:last-child::after { border-top: 0; }
.depts.flat .dept { padding-top: 0; }
.depts.flat .dept::before, .depts.flat .dept::after { display: none; }
.dept-pill {
  font-size: 13px; font-weight: 600; padding: 2px 14px; border-radius: var(--r-pill); margin-bottom: 10px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--c);
}
.dept > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.dept > summary::-webkit-details-marker { display: none; }
.dept > summary::marker { content: ''; }
.dept-count { font-size: 11px; font-weight: 500; opacity: .75; }
.dept > summary > i { font-size: 10px; transition: transform .2s ease; }
.dept[open] > summary > i { transform: rotate(180deg); }
.dept:not([open]) { align-self: flex-start; }
.dept-col, .rank-panel { display: flex; flex-direction: column; align-items: center; gap: 8px; overflow: hidden; transition: height .32s var(--ease); }
.rank-accordion { width: 100%; }
.rank-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0; padding: 5px 10px; border-radius: var(--r-pill); color: var(--muted); font-size: 12px; cursor: pointer; list-style: none; }
.rank-toggle::-webkit-details-marker { display: none; }
.rank-toggle::marker { content: ''; }
.rank-toggle > span:first-child { display: flex; align-items: center; gap: 6px; }
.rank-chevron { font-size: 10px; transition: transform .2s ease; }
.rank-accordion[open] .rank-chevron { transform: rotate(180deg); }
.sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.card {
  --c: #666; display: flex; flex-direction: column; align-items: center; width: 150px;
  padding: 14px 10px 12px; text-align: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm);
  animation: scaleIn .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 30ms);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
  .card:hover .av { transform: scale(1.08); }
}
.card:active { transform: scale(.97); }
.card .av { transition: transform .4s var(--spring); }
.card.ceo { width: 168px; padding: 18px 10px 16px; background: var(--ceo-bg); color: var(--ceo-fg); border-color: transparent; }
.card.ceo .av { width: 54px; height: 54px; box-shadow: 0 0 0 2px rgb(127 127 127 / .35); }
.card.ceo .c-pos { color: inherit; opacity: .65; }
.c-text { display: flex; flex-direction: column; min-width: 0; }
.c-name { font-weight: 700; font-size: 15px; line-height: 1.3; word-break: break-word; }
.c-pos { font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.chart.static .card, .chart.static .vline, .chart.static .dept { animation: none; }

/* ---------- Player cards ---------- */
#view-players { padding: 24px 0 70px; }
.players-grid-scroll { overflow-x: auto; padding: 2px 0 12px; scrollbar-width: thin; }
.players-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: minmax(160px, 205px); gap: 16px; width: max-content; }
.players-grid > .empty { min-width: 300px; grid-row: span 2; display: grid; place-items: center; }
.player-card {
  min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 7px; padding: 10px;
  text-align: left; color: var(--text); cursor: pointer; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  outline: none;
  transition: box-shadow .22s var(--ease), border-color .22s var(--ease), background-color .22s var(--ease);
}
.player-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.player-card:focus:not(:focus-visible) { outline: none; }
.player-card__art { display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 5; border-radius: calc(var(--r-lg) - 4px); background: linear-gradient(145deg, var(--surface-2), color-mix(in srgb, var(--accent) 12%, var(--surface))); }
.player-card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.player-card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: clamp(28px, 5vw, 48px); font-weight: 700; }
.player-card__name { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.player-card__meta { color: var(--muted); font-size: 13px; }
@media (hover: hover) and (pointer: fine) {
  .player-card:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
  .player-card:hover .player-card__art img { transform: scale(1.035); }
}
@media (hover: none) {
  .player-card { -webkit-tap-highlight-color: transparent; }
  .player-card:active { box-shadow: var(--shadow-md); border-color: var(--accent); }
}
#playerModal { max-width: 760px; container: player-modal / inline-size; }
.player-profile { display: grid; grid-template-columns: minmax(220px, .9fr) 1.1fr; min-height: 380px; }
.player-profile__art { min-height: 380px; overflow: hidden; background: var(--surface-2); }
.player-profile__art img { display: block; width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.player-profile__body { padding: 30px 26px; }
.player-profile__body h2 { margin: 8px 0; font-size: 26px; line-height: 1.25; }
.player-profile__body section { margin-top: 18px; }
.player-profile__body section h3 { margin-bottom: 5px; font-size: 14px; }
.player-profile__body section p { white-space: pre-line; }
.player-profile__views { margin-top: 20px; color: var(--muted); font-size: 13px; }
@container player-modal (max-width: 599px) {
  .player-profile { grid-template-columns: 1fr; min-height: 0; }
  .player-profile__art { height: min(42dvh, 360px); min-height: 0; }
  .player-profile__art img { height: 100%; min-height: 0; aspect-ratio: 4 / 3; }
  .player-profile__body { padding: 22px 18px; }
}
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.social-link { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--text); background: var(--surface-2); text-decoration: none; font-size: 13px; transition: transform .2s var(--ease), border-color .2s, background .2s; }
.social-link:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--surface); }
.social-link i { color: var(--accent); }
.profile-views { margin-top: 16px; color: var(--muted); font-size: 13px; }
.admin-profile-mark { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 50%; color: #fff; background: var(--discord); font-size: 32px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--discord) 28%, transparent); }
.social-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); }
.social-fields legend { padding: 0 7px; font-size: 13px; font-weight: 700; }
.social-fields .field { min-width: 0; }

/* ---------- Dialog ---------- */
dialog {
  width: calc(100% - 32px); max-width: 440px; max-height: calc(100dvh - 40px); margin: auto; padding: 0;
  border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); overflow: auto; overscroll-behavior: contain;
}
#newsModal { max-width: 680px; }
#formModal { max-width: 560px; }
dialog[open] { animation: scaleIn .4s var(--ease); }
dialog.closing { animation: scaleOut .2s ease forwards; }
dialog::backdrop { background: rgb(0 0 0 / .5); backdrop-filter: blur(3px); }
dialog[open]::backdrop { animation: fadeIn .3s ease; }
dialog.closing::backdrop { animation: fadeOut .2s ease forwards; }
.x {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgb(0 0 0 / .45); color: #fff; font-size: 20px; cursor: pointer; transition: transform .3s var(--spring);
}
.x:hover { transform: rotate(90deg); }
.profile { text-align: center; padding: 34px 24px 26px; }
.profile .av { width: 104px; height: 104px; font-size: 34px; margin-bottom: 12px; animation: popIn .6s var(--spring) backwards .1s; }
.profile h3 { font-size: 24px; line-height: 1.25; }
.profile .bio { margin-top: 14px; text-align: left; background: var(--bg); padding: 12px 14px; border-radius: 10px; white-space: pre-line; font-size: 15px; }
.tag { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; padding: 2px 12px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--c); }
.news-detail > img { width: 100%; max-height: 360px; object-fit: cover; }
.modal-body { padding: 22px; }
.news-detail .content { white-space: pre-line; margin: 12px 0 16px; }

/* ---------- Skeleton ---------- */
.sk {
  background: linear-gradient(100deg, var(--border) 30%, var(--surface-2) 50%, var(--border) 70%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r); box-shadow: none;
}
.sk-banner { height: clamp(200px, 24vw, 240px); max-width: 1060px; margin: 8px auto 0; border-radius: var(--r-lg); }
.sk-chart { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px 0; width: 100%; }
.sk-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sk-card { width: 150px; height: 110px; }
/* ===== ปุ่มปิด X: ไอคอนอยู่ตรงกลางพอดี ===== */
.x{position:absolute;top:12px;right:12px;z-index:5;width:36px;height:36px;padding:0;border:0;border-radius:50%;
  display:grid;place-items:center;font-size:0;line-height:1;color:#fff;cursor:pointer;
  background:rgba(0,0,0,.45);backdrop-filter:blur(6px);transition:background .2s,transform .2s}
.x::before{content:"\f00d";font-family:"Font Awesome 6 Free";font-weight:900;font-size:16px;line-height:1}
.x:hover{background:rgba(0,0,0,.7);transform:rotate(90deg)}

/* ===== Popup เซิร์ฟเวอร์ / TICKET ===== */
.pk-modal{border:0;padding:0;border-radius:20px;width:min(560px,92vw);background:var(--card,#1e1f22);color:inherit;
  box-shadow:0 24px 60px rgba(0,0,0,.45)}
.pk-modal::backdrop{background:rgba(0,0,0,.55);backdrop-filter:blur(4px)}
.pk-modal[open]{animation:pkIn .25s ease}
@keyframes pkIn{from{opacity:0;transform:translateY(12px) scale(.97)}}
.pk-body{position:relative;padding:28px 22px 22px}
.pk-title{margin:0 0 4px;font-size:20px;display:flex;gap:8px;align-items:center}
.pk-sub{margin:0 0 18px;opacity:.7;font-size:14px}
.pk-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.pk-server{display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px 14px;border-radius:14px;
  text-align:center;background:rgba(127,127,127,.1);border:1px solid rgba(127,127,127,.18)}
.pk-icon{width:56px;height:56px;border-radius:16px;object-fit:cover;display:grid;place-items:center;
  background:#5865f2;color:#fff;font-size:26px}
.pk-desc{font-size:13px;opacity:.7}
.pk-btn{margin-top:6px;width:100%;display:inline-flex;justify-content:center;align-items:center;gap:8px;
  padding:10px 14px;border-radius:10px;color:#fff;font-weight:600;text-decoration:none;transition:filter .2s,transform .2s}
.pk-btn:hover{filter:brightness(1.1);transform:translateY(-1px)}
.pk-btn.discord{background:#5865f2}
.pk-btn.ticket{background:#e53935}
.pk-option:hover{background:#36393f !important;transform:translateY(-2px)}

/* ===== Carousel ข่าว ===== */
.cz{position:relative;max-width:840px;margin:0 auto;padding:0 46px;touch-action:pan-y}
.cz-viewport{overflow:hidden;border-radius:16px}
.cz-track{display:flex;transition:transform .55s cubic-bezier(.22,.61,.36,1)}
.cz-slide{flex:0 0 100%;min-width:0}
.cz-nav{position:absolute;top:calc(50% - 14px);translate:0 -50%;width:36px;height:36px;border:0;border-radius:50%;
  display:grid;place-items:center;color:#fff;background:rgba(0,0,0,.4);cursor:pointer;transition:background .2s}
.cz-nav:hover{background:rgba(0,0,0,.7)}
.cz-nav.prev{left:0}.cz-nav.next{right:0}
.cz-dots{display:flex;justify-content:center;gap:6px;margin-top:12px}
.cz-dot{width:8px;height:8px;padding:0;border:0;border-radius:99px;overflow:hidden;cursor:pointer;
  background:rgba(127,127,127,.35);transition:width .3s}
.cz-dot.on{width:30px}
.cz-dot span{display:block;width:0;height:100%;background:currentColor}
.cz-dot.on span{animation:czFill linear forwards}
@keyframes czFill{to{width:100%}}
.cz:hover .cz-dot.on span{animation-play-state:paused}
.cz.single .cz-nav,.cz.single .cz-dots{display:none}
@media (max-width:640px){.cz{padding:0}.cz-nav{display:none}}

/* ===== ฟอร์มล็อกอิน ===== */
.lf{display:flex;flex-direction:column;gap:12px;width:min(380px,100%)}
.lf-tabs{display:grid;grid-template-columns:1fr 1fr;padding:4px;border-radius:12px;background:rgba(127,127,127,.15)}
.lf-tabs button{padding:8px;border:0;border-radius:9px;background:none;color:inherit;font-weight:600;cursor:pointer;opacity:.6}
.lf-tabs button.on{background:var(--card,#2b2d31);opacity:1;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.lf-discord{display:flex;justify-content:center;align-items:center;gap:8px;padding:11px;border:0;border-radius:10px;
  background:#5865f2;color:#fff;font-weight:600;cursor:pointer}
.lf-hint{margin:-4px 0 0;font-size:12px;opacity:.6;text-align:center}
.lf-or{display:flex;align-items:center;gap:10px;font-size:12px;opacity:.6}
.lf-or::before,.lf-or::after{content:"";flex:1;height:1px;background:currentColor;opacity:.3}
.lf-form{display:flex;flex-direction:column;gap:10px}
.lf-field{display:flex;flex-direction:column;gap:4px;font-size:13px}
.lf-field input{padding:10px 12px;border-radius:10px;border:1px solid rgba(127,127,127,.3);background:transparent;color:inherit;font:inherit}
.lf-field input:focus{outline:2px solid #5865f2;border-color:transparent}
.lf[data-mode="in"] .lf-up{display:none}
.lf-submit{padding:11px;border:0;border-radius:10px;background:var(--text,#fff);color:var(--bg,#111);font-weight:700;cursor:pointer}
.lf-submit:disabled{opacity:.5;cursor:wait}

