/*
Theme Name: SlotWallet
Theme URI: https://youx88.online/
Author: SlotWallet Dev
Description: ธีม WordPress สำหรับเว็บคอนเทนต์สล็อต/คาสิโน เน้น SEO สูงสุด โหลดเร็ว ไม่ใช้ page builder รองรับ Yoast SEO และปลั๊กอิน Table of Contents
Version: 1.4.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: slotwallet
Tags: blog, seo, one-column, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ═══════════════════════════════════════════════════════════════
   1. TOKENS
   ═══════════════════════════════════════════════════════════════ */
:root {
  --bg:          #100e0d;
  --surface:     #191614;
  --surface-2:   #211d1a;
  --card:        #191614;

  --line:        rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);

  --text:        #ece8e3;
  --text-soft:   #c9c3bc;
  --text-muted:  #98918a;
  --text-dim:    #6f6862;

  --gold:        #e0a02c;
  --gold-hi:     #f2bc55;
  --red:         #cf2b26;
  --red-hi:      #e5453f;

  --r:           6px;
  --r-lg:        10px;

  --wrap:        1280px;
  --content:     960px;

  --font:        "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ═══════════════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .55em;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

h1 { font-size: clamp(24px, 3.6vw, 33px); font-weight: 700; line-height: 1.35; }
h2 { font-size: clamp(20px, 2.8vw, 25px); }
h3 { font-size: clamp(17px, 2.1vw, 19px); }
h4 { font-size: 16px; }

p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.25em; padding-left: 1.4em; }
li { margin-bottom: .4em; }

strong, b { font-weight: 600; color: var(--text); }

blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--gold);
  color: var(--text);
}
blockquote p:last-child { margin-bottom: 0; }

code {
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .07);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: .9em;
  color: var(--gold-hi);
}
pre {
  padding: 15px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #0b0a09;
}
pre code { background: none; padding: 0; color: var(--text-soft); }

hr { height: 1px; margin: 2.2em 0; border: 0; background: var(--line); }

/* ═══════════════════════════════════════════════════════════════
   3. UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 999;
  width: auto; height: auto; clip: auto;
  padding: 9px 16px;
  background: var(--gold); color: #17130c;
  border-radius: var(--r); font-weight: 600;
}

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

/* ═══════════════════════════════════════════════════════════════
   4. BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }

.btn-gold {
  background: var(--gold);
  color: #17130c;
}
.btn-gold:hover { background: var(--gold-hi); color: #17130c; }

.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover { background: var(--red-hi); color: #fff; }

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════
   5. HEADER & NAV
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 8px 18px;
  max-width: var(--wrap);
  margin: 0 auto;
}

.site-branding { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-branding img { max-height: 46px; width: auto; }
.site-logo { display: block; line-height: 0; }
.site-logo img { height: 46px; width: auto; max-width: 180px; object-fit: contain; }
.site-title { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.2; }
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--gold); text-decoration: none; }
.site-tagline { margin: 0; font-size: 12px; color: var(--text-dim); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1px;
  margin: 0; padding: 0;
  list-style: none;
}
.main-nav li { margin: 0; position: relative; }
.main-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r);
  font-size: 15px;
  color: var(--text-soft);
  white-space: nowrap;
}
.main-nav a:hover { color: var(--gold); text-decoration: none; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a {
  color: var(--gold);
  font-weight: 600;
}

/* Login / register get button treatment */
.main-nav .menu-item.nav-login > a {
  margin-left: 6px;
  border: 1px solid var(--line-strong);
  font-weight: 600;
}
.main-nav .menu-item.nav-login > a:hover { border-color: var(--gold); }

.main-nav .menu-item.nav-register > a {
  margin-left: 4px;
  background: var(--gold);
  color: #17130c;
  font-weight: 600;
}
.main-nav .menu-item.nav-register > a:hover { background: var(--gold-hi); color: #17130c; }

/* Dropdown */
.main-nav .sub-menu {
  position: absolute;
  top: 100%; left: 0;
  min-width: 190px;
  flex-direction: column;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, visibility .15s;
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; }
.main-nav .sub-menu a { padding: 8px 11px; font-size: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════
   6. PAGE INTRO (front page H1 block)
   ═══════════════════════════════════════════════════════════════ */
.page-intro {
  padding: 34px 0 26px;
  border-bottom: 1px solid var(--line);
}
.page-intro h1 { max-width: 26ch; margin-bottom: .45em; }
.page-intro-lead {
  max-width: 70ch;
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--text-muted);
}
.page-intro-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }

/* Editor-only hint when the front page has nothing to show */
.slw-hint {
  margin: 26px 0;
  padding: 18px 20px;
  border: 1px dashed var(--gold);
  border-radius: var(--r-lg);
  background: rgba(224, 160, 44, .06);
}
.slw-hint strong { display: block; margin-bottom: 6px; font-size: 13px; color: var(--gold); }
.slw-hint p { margin: 0 0 12px; color: var(--text-soft); }

/* ═══════════════════════════════════════════════════════════════
   7. SECTIONS
   ═══════════════════════════════════════════════════════════════ */
.section { padding: 36px 0; }

.section-title {
  position: relative;
  margin: 0 0 20px;
  padding-left: 12px;
  font-size: clamp(19px, 2.6vw, 23px);
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: .22em; bottom: .22em;
  width: 3px;
  background: var(--gold);
}

.section-more { margin: 20px 0 0; font-size: 15px; font-weight: 600; }

.page-head { padding: 28px 0 4px; }
.page-head h1 { margin-bottom: .3em; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
  padding: 30px 0 46px;
}
.layout-full { grid-template-columns: minmax(0, 1fr); }
.layout-narrow {
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--content);
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   8. ENTRY CONTENT  (SEO + TOC critical)
   ═══════════════════════════════════════════════════════════════ */
.entry-content {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--text-soft);
  overflow-wrap: break-word;
}

.entry-content > h2 {
  position: relative;
  margin: 1.9em 0 .6em;
  padding-left: 13px;
  scroll-margin-top: 80px;
}
.entry-content > h2::before {
  content: "";
  position: absolute;
  left: 0; top: .2em; bottom: .2em;
  width: 3px;
  background: var(--red);
}

.entry-content > h3 {
  margin: 1.6em 0 .45em;
  color: var(--gold);
  scroll-margin-top: 80px;
}
.entry-content > h4 {
  margin: 1.35em 0 .4em;
  color: var(--text);
  scroll-margin-top: 80px;
}
.entry-content > *:first-child { margin-top: 0; }

.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul > li { position: relative; padding-left: 19px; }
.entry-content ul > li::before {
  content: "";
  position: absolute;
  left: 3px; top: .72em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.entry-content ol { padding-left: 1.4em; }
.entry-content ol > li::marker { color: var(--gold); font-weight: 600; }
.entry-content li > ul, .entry-content li > ol { margin-top: .45em; }

/* Inline images — the promo banners live here */
.entry-content figure { margin: 26px 0; }
.entry-content figure img,
.entry-content > img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.entry-content .slw-banner a { display: block; line-height: 0; }

/*
 * Promo banners are 1366px artwork. Letting them break past the reading
 * column keeps the text at a comfortable measure while the images still
 * carry their intended weight.
 */
.entry-content .slw-banner {
  width: min(var(--wrap), 100vw - 36px);
  margin-left: 50%;
  transform: translateX(-50%);
}
@media (max-width: 1000px) {
  .entry-content .slw-banner { width: 100%; margin-left: 0; transform: none; }
}
.entry-content figcaption,
.entry-content .wp-caption-text {
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* Tables */
.table-scroll { overflow-x: auto; margin: 1.6em 0; -webkit-overflow-scrolling: touch; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.entry-content th {
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  text-align: left;
}
.entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  vertical-align: top;
}
.entry-content tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .02); }

/* WP alignment */
.alignleft  { float: left;  margin: .4em 1.4em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   9. FAQ ACCORDION
   ═══════════════════════════════════════════════════════════════ */
.entry-content .faq-item {
  margin: 0 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.entry-content .faq-item summary {
  position: relative;
  padding: 13px 42px 13px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.entry-content .faq-item summary::-webkit-details-marker { display: none; }
.entry-content .faq-item summary::after {
  content: "";
  position: absolute;
  right: 18px; top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform .2s;
}
.entry-content .faq-item summary:hover { color: var(--gold); }
.entry-content .faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.entry-content .faq-answer { padding: 0 16px 15px; font-size: 15.5px; color: var(--text-muted); }
.entry-content .faq-answer p:last-child { margin-bottom: 0; }


/* Theme's own TOC — used when no TOC plugin is installed */
.entry-content .slw-toc {
  margin: 0 0 1.8em;
  padding: 14px 18px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
}
.entry-content .slw-toc-title {
  margin: 0 0 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.entry-content .slw-toc ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
  counter-reset: slw-toc;
}
.entry-content .slw-toc ul ul { margin-top: 5px; padding-left: 20px; }
.entry-content .slw-toc li {
  counter-increment: slw-toc;
  position: relative;
  margin-bottom: 5px;
  padding-left: 24px;
  line-height: 1.6;
}
.entry-content .slw-toc li::before {
  content: counter(slw-toc) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
  line-height: inherit;
  text-align: left;
}
.entry-content .slw-toc a {
  font-size: 15px;
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: none;
}
.entry-content .slw-toc a:hover { color: var(--gold); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   10. TOC PLUGIN COMPAT
   Easy TOC / LuckyWP / Rank Math
   ═══════════════════════════════════════════════════════════════ */
#ez-toc-container,
.ez-toc-container,
.lwptoc,
.rank-math-toc {
  margin: 0 0 1.8em;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: none;
  overflow: hidden;
}

#ez-toc-container .ez-toc-title-container,
.ez-toc-container .ez-toc-title-container,
.lwptoc_header,
.rank-math-toc > h2 {
  padding: 11px 16px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: none;
}

#ez-toc-container .ez-toc-title,
.ez-toc-container .ez-toc-title,
.lwptoc_title,
.rank-math-toc > h2 {
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

#ez-toc-container nav,
.ez-toc-container nav,
.lwptoc_items,
.rank-math-toc nav { padding: 12px 16px; }

#ez-toc-container ul,
.ez-toc-container ul,
.lwptoc_items ul,
.rank-math-toc ul {
  list-style: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
}
#ez-toc-container ul ul,
.ez-toc-container ul ul,
.lwptoc_items ul ul,
.rank-math-toc ul ul { padding-left: 16px !important; margin-top: 4px !important; }

#ez-toc-container li,
.ez-toc-container li,
.lwptoc_item,
.rank-math-toc li {
  margin-bottom: 5px !important;
  padding-left: 0 !important;
  line-height: 1.6;
}
#ez-toc-container li::before,
.ez-toc-container li::before,
.rank-math-toc li::before { content: none !important; }

#ez-toc-container a,
.ez-toc-container a,
.lwptoc_item_label,
.rank-math-toc a {
  color: var(--text-soft) !important;
  font-size: 15px;
  text-decoration: none !important;
}
#ez-toc-container a:hover,
.ez-toc-container a:hover,
.lwptoc_item_label:hover,
.rank-math-toc a:hover { color: var(--gold) !important; text-decoration: underline !important; }

.ez-toc-toggle, #ez-toc-container .ez-toc-toggle { color: var(--gold) !important; }
.ez-toc-counter nav ul li a::before { color: var(--text-dim) !important; }

/* ═══════════════════════════════════════════════════════════════
   11. POST CARDS
   ═══════════════════════════════════════════════════════════════ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.post-card {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.post-card-thumb {
  display: block;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: var(--r);
}
.post-card-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-card-cat {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
}
.post-card-cat:hover { text-decoration: underline; }

.post-card-title {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--gold); text-decoration: none; }

.post-card-excerpt {
  flex: 1;
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--text-dim);
}
.post-meta a { color: var(--text-dim); }
.post-meta a:hover { color: var(--gold); }

/* List variant */
.post-list { display: flex; flex-direction: column; gap: 22px; }
.post-list .post-card { flex-direction: row; gap: 18px; align-items: flex-start; }
.post-list .post-card-thumb { flex: 0 0 210px; margin-bottom: 0; }
.post-list .post-card-thumb img { aspect-ratio: 4 / 3; }
.post-list .post-card-title { font-size: 19px; }

/* ═══════════════════════════════════════════════════════════════
   12. SINGLE POST
   ═══════════════════════════════════════════════════════════════ */
.entry-header { margin-bottom: 22px; }
.entry-header h1 { margin-bottom: 12px; }
.entry-header .post-meta { padding-bottom: 16px; border-bottom: 1px solid var(--line); }

.entry-thumb { margin: 0 0 26px; }
.entry-thumb img { width: 100%; border-radius: var(--r-lg); }

.entry-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 13.5px;
  color: var(--text-muted);
}
.tag-list a:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.post-nav a {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.post-nav a:hover { border-color: var(--line-strong); text-decoration: none; }
.post-nav small { display: block; margin-bottom: 4px; font-size: 12.5px; color: var(--text-dim); }
.post-nav strong { display: block; font-size: 15px; font-weight: 500; color: var(--text); line-height: 1.5; }
.post-nav .next { text-align: right; }

.related-posts { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.related-posts h2 { margin-bottom: 18px; font-size: 21px; }

/* ═══════════════════════════════════════════════════════════════
   13. BREADCRUMB
   ═══════════════════════════════════════════════════════════════ */
.breadcrumb {
  padding: 11px 0;
  font-size: 13.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0; padding: 0; list-style: none;
}
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--text-dim); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb [aria-current="page"] { color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════════
   14. SIDEBAR / WIDGETS
   ═══════════════════════════════════════════════════════════════ */
.sidebar { position: sticky; top: 78px; }

.widget { margin-bottom: 28px; }
.widget-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--text-soft); }
.widget select, .widget input[type="search"] { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   15. FORMS
   ═══════════════════════════════════════════════════════════════ */
.form-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.form-card-wide { max-width: 100%; }

.form-row { margin-bottom: 15px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label {
  display: block;
  margin-bottom: 5px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}
.label-req::after { content: " *"; color: var(--red-hi); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="number"], input[type="search"], input[type="date"],
select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: #0d0b0a;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
textarea { min-height: 130px; resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23e0a02c' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 10px;
  padding-right: 34px;
}

.form-check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; margin-top: 4px; accent-color: var(--gold); flex-shrink: 0; }
.form-check label { margin: 0; font-weight: 400; color: var(--text-muted); }

.form-note { margin-top: 15px; font-size: 14px; color: var(--text-dim); text-align: center; }

.form-msg {
  padding: 11px 15px;
  margin-bottom: 18px;
  border-radius: var(--r);
  font-size: 14.5px;
}
.form-msg-ok  { border: 1px solid rgba(70, 180, 110, .4); background: rgba(70, 180, 110, .08); color: #7fd3a2; }
.form-msg-err { border: 1px solid rgba(207, 43, 38, .5);  background: rgba(207, 43, 38, .08);  color: #f09a96; }

/* Contact info blocks */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  margin-bottom: 26px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.contact-item { padding: 18px; background: var(--surface); }
.contact-item strong { display: block; margin-bottom: 4px; font-size: 14px; color: var(--gold); }
.contact-item span, .contact-item a { font-size: 15px; color: var(--text-soft); }

/* ═══════════════════════════════════════════════════════════════
   16. PAGINATION
   ═══════════════════════════════════════════════════════════════ */
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px; height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text-soft);
  font-size: 15px;
}
.pagination .page-numbers:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.pagination .page-numbers.current {
  background: var(--gold);
  border-color: var(--gold);
  color: #17130c;
  font-weight: 600;
}
.pagination .dots { border-color: transparent; }

/* ═══════════════════════════════════════════════════════════════
   17. FOOTER
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 34px 0 26px;
}
.footer-widgets .widget { margin: 0; }

.footer-bottom {
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--text-dim);
}
.footer-bottom p { margin: 0 0 6px; }
.footer-bottom p:last-child { margin: 0; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 5px 20px;
  margin: 0 0 14px; padding: 0; list-style: none;
}
.footer-nav li { margin: 0; }
.footer-nav a { font-size: 14px; color: var(--text-muted); }

.age-badge { font-size: 13px; color: var(--text-dim); }

/* Sticky mobile CTA */
.mobile-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  gap: 10px;
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
}
.mobile-cta .btn { flex: 1; padding: 11px 10px; }

/* ═══════════════════════════════════════════════════════════════
   18. NOTICES / 404
   ═══════════════════════════════════════════════════════════════ */
.notice-block { padding: 50px 0; }
.notice-block .code {
  font-size: clamp(52px, 11vw, 88px);
  font-weight: 700;
  line-height: 1;
  color: var(--line-strong);
}
.notice-block p { max-width: 50ch; margin: 10px 0 22px; color: var(--text-muted); }
.notice-block .hero-cta,
.notice-block .page-intro-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ═══════════════════════════════════════════════════════════════
   19. RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .sidebar { position: static; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 63px; left: 0; right: 0;
    max-height: calc(100vh - 63px);
    overflow-y: auto;
    padding: 10px 18px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s, visibility .18s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 1px; }
  .main-nav a { padding: 12px 13px; font-size: 16px; }
  .main-nav .menu-item.nav-login > a,
  .main-nav .menu-item.nav-register > a { margin: 6px 0 0; text-align: center; }

  .main-nav .sub-menu {
    position: static;
    opacity: 1; visibility: visible;
    box-shadow: none;
    border: 0;
    background: none;
    margin-left: 14px;
  }

  .post-list .post-card { flex-direction: column; gap: 0; }
  .post-list .post-card-thumb { flex: none; margin-bottom: 12px; }
  .post-list .post-card-thumb img { aspect-ratio: 16 / 9; }

  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }

  .mobile-cta { display: flex; }
  body.has-mobile-cta { padding-bottom: 70px; }
}

@media (max-width: 520px) {
  .page-intro { padding: 26px 0 22px; }
  .page-intro h1 { max-width: none; }
  .page-intro-cta .btn { flex: 1; }
  .form-row-2 { grid-template-columns: 1fr; }
  .form-card { padding: 22px 17px; }
  .site-tagline { display: none; }
  .site-logo img { height: 38px; max-width: 140px; }
  .entry-content { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .sidebar, .mobile-cta, .post-nav, .related-posts { display: none; }
  body { background: #fff; color: #000; }
}
