/* SyncDraft 公開サイト — 赤・青・紫を基調にしたカラフルなテーマ */
:root {
  --red: #e63946;
  --red-deep: #d62839;
  --blue: #3a56e8;
  --blue-light: #4cc9f0;
  --purple: #7b2cbf;
  --purple-deep: #3c096c;
  --magenta: #b5179e;
  --grad-main: linear-gradient(120deg, var(--red) 0%, var(--magenta) 35%, var(--purple) 60%, var(--blue) 100%);
  --grad-soft: linear-gradient(135deg, #fff0f3 0%, #f3e8ff 50%, #e8eeff 100%);
  --ink: #1d1b2e;
  --ink-soft: #4a4763;
  --muted: #6c6987;
  --line: #e6e3f0;
  --bg: #f7f6fb;
  --card: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(60, 9, 108, .08);
  --shadow-hover: 0 16px 40px rgba(60, 9, 108, .18);
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--purple); }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 32px, 860px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(29, 13, 58, .92);
  backdrop-filter: saturate(160%) blur(12px);
  color: #fff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, .2);
}
.site-header::before { content: ""; display: block; height: 4px; background: var(--grad-main); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.logo:hover { color: #fff; }
.logo-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad-main); font-weight: 900; font-size: 1.3rem; box-shadow: 0 4px 14px rgba(230, 57, 70, .45);
}
.logo-text { display: flex; flex-direction: column; font-weight: 800; font-size: 1.25rem; letter-spacing: .04em; line-height: 1.2; }
.logo-text small { font-weight: 400; font-size: .7rem; opacity: .75; letter-spacing: .02em; }

.global-nav { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list > li > a, .nav-dropdown summary {
  display: block; padding: 8px 14px; border-radius: 999px; color: #fff; text-decoration: none;
  font-weight: 600; font-size: .92rem; cursor: pointer; transition: background .2s;
}
.nav-list > li > a:hover, .nav-dropdown summary:hover, .nav-list > li > a[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; }
.nav-dropdown { position: relative; }
.nav-dropdown summary { list-style: none; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: "▾"; margin-left: 6px; font-size: .75em; opacity: .8; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 240px; padding: 8px; margin: 0; list-style: none;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-hover);
}
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.dropdown-menu a:hover { background: var(--grad-soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat, var(--purple)); flex: none; }
.count { margin-left: auto; font-size: .78rem; color: var(--muted); background: var(--bg); padding: 0 8px; border-radius: 999px; }

.search-form { display: flex; align-items: center; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 4px 4px 4px 16px; border: 1px solid rgba(255, 255, 255, .2); }
.search-form input { border: 0; background: transparent; color: inherit; font: inherit; font-size: .9rem; width: 170px; outline: none; }
.search-form input::placeholder { color: rgba(255, 255, 255, .65); }
.search-form button { border: 0; cursor: pointer; display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 999px; background: var(--grad-main); color: #fff; font: inherit; font-weight: 700; padding: 0 12px; }
.search-form--block, .search-form--hero { background: #fff; border: 2px solid var(--line); padding-left: 18px; }
.search-form--block input, .search-form--hero input { color: var(--ink); width: 100%; }
.search-form--block input::placeholder, .search-form--hero input::placeholder { color: var(--muted); }
.search-form--hero { max-width: 640px; margin: 20px 0 8px; }
.search-form--hero button { height: 42px; padding: 0 22px; }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { position: absolute; left: 12px; width: 20px; height: 2px; background: #fff; border-radius: 2px; content: ""; transition: transform .2s; }
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -6px; left: 0; }
.nav-toggle-bar::after { top: 6px; left: 0; }

.category-bar { border-top: 1px solid rgba(255, 255, 255, .08); }
.category-bar-inner { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.category-bar-inner::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 4px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; text-decoration: none; color: #fff;
  background: color-mix(in srgb, var(--cat) 35%, transparent); border: 1px solid color-mix(in srgb, var(--cat) 70%, #fff 0%);
}
.chip:hover, .chip[aria-current="page"] { background: var(--cat); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; padding: 48px 0 64px; background: var(--purple-deep); }
.hero-bg {
  position: absolute; inset: 0; opacity: .95;
  background:
    radial-gradient(circle at 10% 20%, rgba(230, 57, 70, .75), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(58, 86, 232, .8), transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(181, 23, 158, .7), transparent 50%),
    linear-gradient(135deg, #240046, #3c096c 60%, #10002b);
}
.hero .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; }
.hero-main { border-radius: var(--radius); overflow: hidden; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); transition: transform .25s, box-shadow .25s; }
.hero-main:hover { transform: translateY(-4px); box-shadow: 0 28px 60px rgba(0, 0, 0, .4); }
.hero-main-link { display: block; color: #fff; text-decoration: none; height: 100%; }
.hero-main-link:hover { color: #fff; }
.hero-main-body { padding: 24px 28px 28px; }
.hero-main-title { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.4; margin: 12px 0 10px; }
.hero-main-excerpt { margin: 0 0 12px; opacity: .9; }
.hero-side { display: grid; gap: 24px; align-content: start; }
.hero .hero-main .meta { color: rgba(255, 255, 255, .8); }

/* ---------- Section heads ---------- */
.section-head { margin-bottom: 24px; }
.eyebrow { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .24em; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head--light .eyebrow { background: linear-gradient(90deg, #ffb3c1, #e0aaff, #a0c4ff); -webkit-background-clip: text; background-clip: text; }
.section-title { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: .02em; }
.section-title--sm { font-size: 1.3rem; margin: 0 0 18px; padding-left: 14px; border-left: 5px solid; border-image: var(--grad-main) 1; }

/* ---------- Thumbnails ---------- */
.thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, .35), transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(0, 0, 0, .18), transparent 40%),
    linear-gradient(135deg, var(--cat, var(--purple)), color-mix(in srgb, var(--cat, var(--purple)) 40%, var(--blue)));
}
.thumb::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 12px, transparent 12px 24px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-label { position: relative; z-index: 1; color: #fff; font-weight: 900; font-size: 1.4rem; letter-spacing: .08em; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.thumb--hero { aspect-ratio: 16 / 8; }
.thumb--hero .thumb-label { font-size: 2.4rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.post-card { color: var(--ink); background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; border-top: 4px solid var(--cat); }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.post-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.post-card-link:hover { color: inherit; }
.post-card-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-card-title { margin: 4px 0 0; font-size: 1.05rem; line-height: 1.55; }
.post-card-link:hover .post-card-title { color: var(--purple); }
.post-card-excerpt { margin: 0; font-size: .88rem; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card--side { display: grid; }
.post-card--side .post-card-link { flex-direction: row; }
.post-card--side .thumb { flex: 0 0 42%; aspect-ratio: auto; }
.post-card--side .thumb-label { font-size: 1rem; }
.post-card--side .post-card-excerpt { -webkit-line-clamp: 2; }
.post-card--mini .post-card-title { font-size: .95rem; }

.badge { display: inline-block; align-self: flex-start; padding: 2px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: #fff; background: var(--cat, var(--purple)); text-decoration: none; margin-right: 6px; }
a.badge:hover { color: #fff; filter: brightness(1.1); }
.badge--new { background: var(--red); box-shadow: 0 0 0 3px rgba(230, 57, 70, .3); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: auto 0 0; font-size: .8rem; color: var(--muted); }
.meta--light { color: rgba(255, 255, 255, .85); }

/* ---------- Popular ---------- */
.popular { padding: 48px 0 8px; margin-top: -32px; position: relative; }
.popular-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.popular-item a { display: flex; gap: 12px; height: 100%; padding: 18px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .25s, box-shadow .25s; border-bottom: 4px solid var(--cat); }
.popular-item a:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: inherit; }
.popular-body { display: flex; flex-direction: column; gap: 6px; }
.popular-title { font-weight: 700; font-size: .93rem; line-height: 1.55; }
.rank { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 900; color: #fff; background: #9a97b5; font-size: .95rem; }
.rank-1 { background: linear-gradient(135deg, var(--red), #ff7b54); box-shadow: 0 4px 12px rgba(230, 57, 70, .5); }
.rank-2 { background: linear-gradient(135deg, var(--purple), var(--magenta)); box-shadow: 0 4px 12px rgba(123, 44, 191, .45); }
.rank-3 { background: linear-gradient(135deg, var(--blue), var(--blue-light)); box-shadow: 0 4px 12px rgba(58, 86, 232, .45); }

/* ---------- Layout ---------- */
.site-main { min-height: 60vh; }
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 48px 0 64px; }
.more-link { text-align: center; margin: 32px 0 0; }

.btn { display: inline-block; padding: 10px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.btn-gradient { background: var(--grad-main); color: #fff; box-shadow: 0 8px 20px rgba(123, 44, 191, .3); background-size: 150% 100%; transition: background-position .4s, transform .2s; }
.btn-gradient:hover { color: #fff; background-position: 100% 0; transform: translateY(-2px); }
.btn-ghost { border: 2px solid var(--purple); color: var(--purple); }
.btn-ghost:hover { background: var(--purple); color: #fff; }
.btn-lg { padding: 14px 40px; font-size: 1.05rem; }

/* category tiles */
.category-showcase { margin-top: 56px; }
.category-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.category-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--radius); color: #fff; text-decoration: none; overflow: hidden;
  background: linear-gradient(135deg, var(--cat), color-mix(in srgb, var(--cat) 50%, var(--purple-deep))); box-shadow: var(--shadow); transition: transform .25s; }
.category-tile:hover { color: #fff; transform: translateY(-4px) rotate(-.5deg); }
.category-tile::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.category-tile-name { font-size: 1.15rem; font-weight: 800; }
.category-tile-desc { font-size: .8rem; opacity: .9; line-height: 1.6; }
.category-tile-count { margin-top: 6px; font-size: .78rem; font-weight: 700; opacity: .85; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.widget-title { margin: 0 0 14px; font-size: 1rem; display: flex; align-items: center; gap: 10px; }
.widget-title::before { content: ""; width: 6px; height: 20px; border-radius: 3px; background: var(--grad-main); }
.widget-title-plain { margin: 8px 0 0; font-size: 1.15rem; }
.widget-profile { text-align: center; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad-main) border-box; border: 3px solid transparent; }
.widget-profile p { font-size: .88rem; color: var(--ink-soft); margin: 6px 0 14px; }
.avatar { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--grad-main); color: #fff; font-weight: 900; font-size: 1.4rem; box-shadow: 0 6px 18px rgba(123, 44, 191, .35); }
.avatar--lg { width: 96px; height: 96px; font-size: 1.8rem; margin: 0; }
.profile-role { font-weight: 700; color: var(--purple) !important; margin: 0 !important; }
.category-list, .rank-list { list-style: none; margin: 0; padding: 0; }
.category-list a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); color: var(--ink); text-decoration: none; font-size: .92rem; }
.category-list a:hover { color: var(--cat); }
.rank-list li + li { border-top: 1px dashed var(--line); }
.rank-list a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; color: var(--ink); text-decoration: none; font-size: .88rem; line-height: 1.55; }
.rank-list a:hover { color: var(--purple); }
.rank-list .rank { width: 28px; height: 28px; font-size: .8rem; }

/* ---------- Page hero / list ---------- */
.page-hero { position: relative; color: #fff; padding: 40px 0 44px; background: linear-gradient(120deg, color-mix(in srgb, var(--cat, var(--red)) 85%, #000 0%), var(--purple) 55%, var(--blue)); }
.page-title { margin: 8px 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.page-lead { margin: 0; opacity: .92; }
.page-count { margin: 8px 0 0; font-size: .88rem; opacity: .85; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8rem; opacity: .9; }
.breadcrumb a { color: #fff; }
.breadcrumb span[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.page-link { min-width: 42px; height: 42px; padding: 0 14px; display: grid; place-items: center; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 700; }
.page-link:hover { color: var(--purple); }
.page-link.is-current { background: var(--grad-main); color: #fff; }
.page-gap { align-self: center; color: var(--muted); }

.empty-state { padding: 48px 24px; text-align: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink-soft); }
.empty-state--light { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- Article ---------- */
.article-hero { color: #fff; padding: 40px 0 72px; background:
    radial-gradient(circle at 15% 30%, color-mix(in srgb, var(--cat) 80%, transparent), transparent 50%),
    radial-gradient(circle at 90% 10%, rgba(58, 86, 232, .8), transparent 45%),
    linear-gradient(135deg, #240046, #3c096c); }
.article-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.45; margin: 12px 0; }
.article .layout-2col { padding-top: 0; margin-top: -40px; }
.article-card { background: var(--card); border-radius: var(--radius); padding: clamp(20px, 4vw, 48px); box-shadow: var(--shadow); }
.container--narrow > .article-card { margin: -28px 0 64px; position: relative; }

.prose { font-size: 1.02rem; line-height: 1.95; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.45rem; margin: 2.2em 0 .8em; padding: .5em .8em; border-radius: var(--radius-sm); background: var(--grad-soft); border-left: 6px solid var(--cat, var(--purple)); line-height: 1.5; }
.prose h3 { font-size: 1.18rem; margin: 1.8em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid; border-image: var(--grad-main) 1; }
.prose p { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.prose li::marker { color: var(--cat, var(--purple)); font-weight: 700; }
.prose blockquote { margin: 1.5em 0; padding: 1em 1.4em; border-left: 5px solid var(--magenta); background: #fbf5ff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: #f1edf9; color: var(--purple-deep); padding: .15em .45em; border-radius: 6px; }
.prose pre { background: #1d1b2e; color: #f1edf9; padding: 1.2em 1.4em; border-radius: var(--radius-sm); overflow-x: auto; line-height: 1.6; border-top: 4px solid; border-image: var(--grad-main) 1; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .94rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6em .9em; text-align: left; }
.prose thead th, .prose tbody th { background: var(--grad-soft); }
.prose img { border-radius: var(--radius-sm); margin: 1em auto; }
.prose a { color: var(--blue); font-weight: 600; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 32px 0 0; }
.tag-list a { display: block; padding: 4px 14px; border-radius: 999px; background: var(--bg); color: var(--purple); text-decoration: none; font-size: .85rem; font-weight: 600; border: 1px solid var(--line); }
.tag-list a:hover { background: var(--purple); color: #fff; }
.author-box { display: flex; gap: 18px; align-items: center; margin-top: 36px; padding: 20px; border-radius: var(--radius); background: var(--grad-soft); }
.author-box .avatar { margin: 0; flex: none; }
.author-box p { margin: 0; font-size: .9rem; }
.author-name { font-weight: 800; margin-bottom: 4px !important; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
.post-nav-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; }
.post-nav-link span { font-size: .78rem; color: var(--purple); }
.post-nav-link.next { text-align: right; grid-column: 2; }
.post-nav-link:hover { color: var(--purple); }
.related { margin-top: 40px; }

.notice { padding: 14px 18px; border-radius: var(--radius-sm); margin: 0 0 24px; font-size: .92rem; }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice-ai { background: #f3e8ff; border-left: 5px solid var(--purple); color: var(--purple-deep); }
.notice-success { background: #e8f8ef; border-left: 5px solid #2a9d5c; color: #135c33; }
.notice-error { background: #fdecee; border-left: 5px solid var(--red); color: #8a1621; }

/* ---------- Fixed pages ---------- */
.profile-card { display: flex; align-items: center; gap: 24px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 2px dashed var(--line); }
.profile-label { margin: 0; font-size: .8rem; font-weight: 700; color: var(--muted); letter-spacing: .1em; }
.profile-name { margin: 0; font-size: 1.7rem; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.toc { background: var(--grad-soft); border-radius: var(--radius-sm); padding: 16px 24px; margin-bottom: 32px; }
.toc-title { margin: 0 0 6px; font-weight: 800; }
.toc ol { margin: 0; padding-left: 1.4em; }
.policy-date { text-align: right; color: var(--muted); font-size: .9rem; }

.contact-form { display: grid; gap: 22px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.req { display: inline-block; margin-left: 6px; padding: 0 8px; font-size: .72rem; border-radius: 999px; background: var(--red); color: #fff; vertical-align: middle; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(123, 44, 191, .15); outline: none; }
.field [aria-invalid="true"] { border-color: var(--red); background: #fffafa; }
.field-error { margin: 6px 0 0; color: var(--red-deep); font-size: .86rem; font-weight: 700; }
.field-error::before { content: "⚠ "; }
.field-hint { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.field-check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.field-check label { margin: 0; font-weight: 600; }
.field-check input { width: 20px; height: 20px; accent-color: var(--purple); }
.field-check .field-error { flex-basis: 100%; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: center; }

.error-page { padding: 72px 0; text-align: center; }
.error-page .search-form--hero { margin: 24px auto; }
.error-code { margin: 0; font-size: clamp(4rem, 12vw, 7rem); font-weight: 900; line-height: 1; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-detail { text-align: left; background: #1d1b2e; color: #ffd6dc; padding: 12px; border-radius: 8px; overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer { color: rgba(255, 255, 255, .85); background: linear-gradient(160deg, #10002b, #240046 50%, #1b1464); position: relative; }
.site-footer::before { content: ""; display: block; height: 4px; background: var(--grad-main); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 48px 0; }
.footer-about p { font-size: .9rem; line-height: 1.8; }
.footer-more { color: #e0aaff; font-weight: 700; text-decoration: none; }
.footer-more:hover { color: #fff; }
.logo-footer { margin-bottom: 8px; }
.footer-title { font-size: .95rem; color: #fff; margin: 0 0 14px; letter-spacing: .08em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: rgba(255, 255, 255, .78); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: #ffb3c1; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; font-size: .8rem; text-align: center; }
.footer-bottom p { margin: 0; opacity: .7; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .popular-grid { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
  .layout-2col { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .global-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; background: rgba(29, 13, 58, .98); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
  .global-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .dropdown-menu { position: static; box-shadow: none; margin-top: 6px; }
  .search-form input { width: 100%; }
  .header-inner { position: relative; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .logo-text small { display: none; }
  .hero { padding: 32px 0 56px; }
  .hero-side { grid-template-columns: minmax(0, 1fr); }
  .popular-grid { grid-template-columns: minmax(0, 1fr); }
  .post-card--side .post-card-link { flex-direction: column; }
  .post-card--side .thumb { aspect-ratio: 16 / 9; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link.next { grid-column: auto; }
  .profile-card { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
