/* =====================================================================
   Givee — design system (no build step)
   ベースはクリエイターAIのデザインシステムを流用し、ブランドカラーを
   Giveeグリーン（与える/成長）に調整。白ベース / やわらかい / 余白多め
   ===================================================================== */
:root {
  --brand-50: #eef7f5;
  --brand-100: #d9efea;
  --brand-200: #b6e0d7;
  --brand-300: #84c9bb;
  --brand-500: #1f9e8d;
  --brand-600: #127c71;
  --brand-700: #0e6359;
  --ink: #18211f;
  --muted: #66726e;
  --line: #e6eae8;
  --bg: #f5f8f7;
  --line-green: #06c755;
  --radius: 14px;
  --shadow-soft: 0 1px 2px rgba(20, 20, 30, 0.04), 0 5px 16px rgba(20, 20, 30, 0.05);
  --shadow-lg: 0 1px 2px rgba(20, 20, 30, 0.04), 0 16px 40px rgba(20, 20, 30, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  font-feature-settings: "palt";
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand-200); }
img { max-width: 100%; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: 72px 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.spacer { flex: 1; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.01em; }
.h1 { font-size: 40px; font-weight: 700; }
.h2 { font-size: 28px; font-weight: 700; }
.h3 { font-size: 19px; font-weight: 700; }
.lead { font-size: 18px; font-weight: 500; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brand-500);
}
.text-brand { color: var(--brand-600); }
.text-red { color: #dc2626; }
.center-narrow { max-width: 560px; margin: 0 auto; }
@media (max-width: 760px) { .h1 { font-size: 30px; } .h2 { font-size: 23px; } }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 247, 244, 0.6);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px rgba(20, 20, 30, 0.06);
}
.nav { height: 66px; display: flex; align-items: center; justify-content: space-between; }
.navlink { position: relative; font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 2px; transition: color .2s; }
.navlink::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--brand-600); transition: right .25s ease; border-radius: 2px; }
.navlink:hover { color: var(--ink); }
.navlink:hover::after { right: 0; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; letter-spacing: -0.03em;
}
.logo { letter-spacing: -0.01em; }
.nav-actions { display: flex; align-items: center; gap: 20px; }
@media (max-width: 760px) { .nav-actions { gap: 12px; } }
.hamburger { display: none; position: relative; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hamburger svg { width: 22px; height: 22px; }
.hamburger:active { background: #f3f3f8; }
.hb-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 999px; background: #f0464a; border: 1.5px solid #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all 0.15s ease;
  font-family: inherit; white-space: nowrap; text-align: center;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--brand-600), #6f66e6); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 214, 0.26); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(79, 70, 214, 0.32); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #cfcfdb; background: #fafafe; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f0f0f6; color: var(--ink); }
.btn-white { background: #fff; color: var(--brand-700); }
.btn-white:hover { background: var(--brand-50); }
.btn-lg { padding: 13px 28px; font-size: 16px; }
/* 主要CTA：周囲のボタンより一回り大きく目立たせる */
.btn-xl { padding: 17px 40px; font-size: 18px; font-weight: 700; border-radius: 14px; letter-spacing: .02em; }
.btn-primary.btn-xl { box-shadow: 0 10px 26px rgba(79, 70, 214, 0.34); }
@media (max-width: 560px) { .btn-xl { width: 100%; padding: 16px 24px; } }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: #dc2626; }
.btn-danger:hover { background: #fef2f2; }

/* ---------- cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-soft);
}
.card-flat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-link { display: block; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.card-link:hover { box-shadow: var(--shadow-lg); }
.pad-lg { padding: 36px; }

/* ---------- forms ---------- */
.label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.hint { margin-top: 6px; font-size: 12px; color: #9aa0ac; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 14px; font-family: inherit; color: var(--ink);
  background: #fff; outline: none; transition: border 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100);
}
.textarea { min-height: 120px; line-height: 1.7; resize: vertical; }
.field + .field { margin-top: 18px; }
/* グリッド内の横並びフィールドは gap で間隔を取るため、隣接マージンを無効化（列の縦ズレ防止） */
.grid > .field + .field { margin-top: 0; }
.grid > .field { align-self: start; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 600;
}
.badge-pro { background: var(--brand-100); color: var(--brand-700); }
.badge-free { background: #f0f0f4; color: #8a8f9c; }
.badge-soft { background: var(--brand-50); color: var(--brand-700); }
.badge-gray { background: #f0f0f4; color: #8a8f9c; }

/* ---------- alerts ---------- */
.alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-info { background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-700); }
.alert-warn { background: #fffbeb; border: 1px solid #fde68a; color: #b45309; }

/* ---------- hero ---------- */
.hero { padding: 80px 0 100px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .mock { display: none; } }

/* ---------- pricing ---------- */
.price { font-size: 40px; font-weight: 700; }
.price-row { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 0; border-bottom: 1px solid #f1f1f5; font-size: 14px; }
.plan-pro { border-color: var(--brand-200); box-shadow: 0 0 0 1px var(--brand-200), var(--shadow-soft); position: relative; }
.ribbon {
  position: absolute; top: -12px; left: 24px; background: var(--brand-600);
  color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
}

/* ---------- table (estimate) ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: #9aa0ac; font-size: 12px;
  border-bottom: 1px solid var(--line); padding: 8px 0; }
.table td { padding: 12px 0; border-bottom: 1px solid #f1f1f5; }
.tr-right { text-align: right; }

/* ---------- misc ---------- */
.doc { white-space: pre-wrap; font-family: inherit; font-size: 15px; line-height: 1.9; color: #2b2f3a; margin: 0; }
.chip { display: inline-block; background: var(--brand-50); color: var(--brand-700);
  border-radius: 999px; padding: 6px 12px; font-size: 14px; margin: 0 6px 6px 0; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center; padding: 64px 24px; }
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 28px 0; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); border: 0; margin: 24px 0; }
.banner { border-radius: var(--radius); background: var(--brand-600); color: #fff;
  padding: 24px; box-shadow: var(--shadow-soft); }
.banner .muted { color: var(--brand-100); }
.list-clean { list-style: none; padding: 0; margin: 0; }
.dot-list li { display: flex; gap: 10px; padding: 4px 0; }
.dot-list li::before { content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: var(--brand-500); margin-top: 11px; flex-shrink: 0; }

/* hide content until auth/role resolved to avoid flicker */
[data-cloak] { visibility: hidden; }
body.ready [data-cloak] { visibility: visible; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--brand-200);
  border-top-color: var(--brand-600); border-radius: 999px; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loading { display: flex; justify-content: center; padding: 80px 0; }

@media (max-width: 760px) {
  .cols-2, .cols-3, .cols-4, .hero-grid { grid-template-columns: 1fr; }
  .nav-actions .hide-sm { display: none; }
}

/* ---------- images / gallery ---------- */
.avatar { width: 88px; height: 88px; border-radius: 999px; object-fit: cover; border: 1px solid var(--line); background: #f1f1f5; }
.avatar-sm { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; border: 1px solid var(--line); background: #f1f1f5; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img, .thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #f1f1f5; display: block; }
.gallery figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* file input */
.file { display: inline-flex; align-items: center; gap: 10px; }
input[type="file"] { font: inherit; font-size: 13px; color: var(--muted); }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 16px; margin-right: 10px; transition: all .15s;
}
input[type="file"]::file-selector-button:hover { border-color: #cfcfdb; background: #fafafe; }

/* image edit tile */
.img-tile { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.img-tile .thumb { aspect-ratio: 1 / 1; }
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .img-grid { grid-template-columns: repeat(2, 1fr); } }

/* share box */
.share-box { display: flex; gap: 8px; align-items: center; background: var(--brand-50);
  border: 1px solid var(--brand-200); border-radius: 12px; padding: 10px 12px; }
.share-box input { flex: 1; border: 0; background: transparent; font-size: 13px; color: var(--ink); outline: none; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; }

/* public portfolio badge */
.pub-banner { background: #fff; border-bottom: 1px solid var(--line); }
.pub-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; font-size: 13px; color: var(--muted); }

/* ---------- full-bleed hero + motion ---------- */
.hero-wrap { position: relative; overflow: hidden; background: linear-gradient(180deg, #ffffff 0%, #f4f3ef 100%); border-bottom: 1px solid var(--line); }
.hero-blob { position: absolute; border-radius: 999px; filter: blur(70px); opacity: .55; pointer-events: none; z-index: 0; }
.hero-blob.b1 { width: 520px; height: 520px; background: #d7d7ff; top: -180px; left: -90px; animation: floatBlob 17s ease-in-out infinite; }
.hero-blob.b2 { width: 460px; height: 460px; background: #d4f2e2; bottom: -200px; right: -70px; animation: floatBlob 22s ease-in-out infinite reverse; }
.hero-blob.b3 { width: 300px; height: 300px; background: #ffe6d6; top: 30%; right: 22%; opacity: .4; animation: floatBlob 26s ease-in-out infinite; }
.hero-inner2 { position: relative; z-index: 1; padding: 96px 0 84px; }
.hero-wrap .h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.2; letter-spacing: -0.02em; }
@media (max-width: 760px) { .hero-inner2 { padding: 56px 0 48px; } }
.grad-word { background: linear-gradient(120deg, var(--brand-600), #9089f2); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-img-full { position: relative; overflow: hidden; background: #f4f3ef; }
.hero-img-full img { width: 100%; display: block; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatBlob { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(42px, -32px) scale(1.12); } }
.anim-up { opacity: 0; animation: fadeUp .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; } .d3 { animation-delay: .25s; } .d4 { animation-delay: .35s; } .d5 { animation-delay: .45s; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .anim-up, .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero-blob { animation: none !important; }
}

/* hero banner image (legacy in-container) */
.hero-banner img { width: 100%; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: block; }

/* feature icon */
.feat-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--brand-50);
  color: var(--brand-600); display: flex; align-items: center; justify-content: center; }

/* placeholders */
.content-cover { aspect-ratio: 16 / 9; background: #efeee9; display: flex; align-items: center; justify-content: center; position: relative; }
.content-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* コンテンツカード（カバー＋タイトル＝記事リンク、作家名＝作家ページリンク） */
.content-card { transition: box-shadow .15s ease, transform .15s ease; }
.content-card:hover { box-shadow: var(--shadow-lg); }
.content-card-main { display: block; color: inherit; }
.content-card-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 16px 16px; }
.content-card-foot .author-link:hover { text-decoration: underline; }
.content-price-badge { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.content-price-badge.is-free { color: #1f9d57; }
.content-price-badge.is-paid { color: var(--brand-700); }
.ph-icon { color: #cbcabf; }
.mono-avatar { display: flex; align-items: center; justify-content: center; background: var(--brand-100); color: var(--brand-700); font-weight: 700; font-size: 16px; }

/* ---------- community / matching ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: #fff; border: 1px solid var(--line); color: var(--muted); transition: all .15s;
}
.pill:hover { border-color: var(--brand-300); color: var(--ink); }
.pill-on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.badge-avail { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px;
  padding: 2px 9px; font-size: 11px; font-weight: 700; background: #e7f8ef; color: #16a34a; }
.badge-avail::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #16a34a; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head .more { font-size: 14px; font-weight: 600; color: var(--brand-600); white-space: nowrap; }
.section-head .more:hover { text-decoration: underline; }

/* community hero */
.chero {
  position: relative; overflow: hidden; border-radius: 18px;
  background: #fff; border: 1px solid var(--line); padding: 60px 52px;
}
.chero::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-600), #7c76ef);
}
@media (max-width: 760px) { .chero { padding: 34px 22px; border-radius: 16px; } }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-stack { display: flex; }
.avatar-stack img, .avatar-stack span { width: 34px; height: 34px; border-radius: 999px; border: 2px solid #fff; margin-left: -8px; object-fit: cover; background: var(--brand-100); display: flex; align-items: center; justify-content: center; }
.avatar-stack img:first-child, .avatar-stack span:first-child { margin-left: 0; }

.stat { text-align: center; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { font-size: 12px; color: var(--muted); }

.job-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.job-meta b { color: var(--ink); }

/* applicant / inquiry row */
.inbox-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.inbox-item.unread { border-color: var(--brand-300); background: var(--brand-50); }

/* ---------- logo image ---------- */
.logo-img { height: 34px; width: auto; max-width: 210px; object-fit: contain; display: block; }
@media (max-width: 760px) { .logo-img { height: 30px; max-width: 160px; } }

/* ---------- app dashboard (2-column) ---------- */
.app-layout { display: grid; grid-template-columns: 236px 1fr; gap: 30px; align-items: start; }
@media (max-width: 900px) { .app-layout { grid-template-columns: 1fr; gap: 18px; } .app-nav { position: static !important; } }
.app-nav { position: sticky; top: 84px; }
.app-nav nav { display: flex; flex-direction: column; gap: 2px; }
.app-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.app-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.app-link:hover { background: #efeee9; color: var(--ink); }
.app-link.active { background: var(--brand-50); color: var(--brand-700); }
.app-link .nb { margin-left: auto; background: var(--brand-600); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.app-navlabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #adaca4; padding: 16px 12px 6px; }
.app-plan { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; }
.app-greeting { font-size: 13px; color: var(--muted); }
.stat-tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat-tile .num { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-tile .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 2-column listing layout ---------- */
.layout-2col { display: grid; grid-template-columns: 232px 1fr; gap: 28px; align-items: start; margin-top: 24px; }
.sidebar { position: sticky; top: 80px; }
.sidebar .filter-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.sidebar .filter-card + .filter-card { margin-top: 16px; }
.filter-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.filter-link { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 12px; border-radius: 9px; font-size: 14px; color: var(--muted); }
.filter-link:hover { background: #f3f3f8; color: var(--ink); }
.filter-link.on { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.filter-search { display: flex; gap: 8px; }
.filter-search .input { flex: 1; }
@media (max-width: 860px) {
  .layout-2col { grid-template-columns: 1fr; gap: 14px; }
  .layout-2col > * { min-width: 0; }
  .sidebar { position: static; min-width: 0; }
  .sidebar .filter-card { padding: 12px; }
  .sidebar .filter-card + .filter-card { margin-top: 10px; }
  /* スマホはカテゴリ・価格を横スクロールのチップ列に */
  .sidebar .filter-card:has(.filter-link) {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; min-width: 0; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .sidebar .filter-card:has(.filter-link)::-webkit-scrollbar { display: none; }
  .sidebar .filter-card:has(.filter-link) .filter-title { flex: 0 0 auto; margin: 0; position: sticky; left: 0; background: #fff; padding-right: 6px; z-index: 1; }
  .sidebar .filter-card:has(.filter-link) .filter-link { flex: 0 0 auto; display: inline-flex; justify-content: center; white-space: nowrap; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
  .sidebar .filter-card:has(.filter-link) .filter-link.on { border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-700); }
}

/* ---------- LP (public portfolio) ---------- */
.lp-hero { position: relative; min-height: 420px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; overflow: hidden; }
.lp-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.lp-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,30,.30), rgba(20,20,30,.50)); }
.lp-hero.no-bg { color: var(--ink); background: linear-gradient(180deg, #fff, #f3f2ee); }
.lp-hero.no-bg .lp-hero-inner { color: var(--ink); }
.lp-hero-inner { position: relative; padding: 64px 20px; }
.lp-avatar { width: 116px; height: 116px; border-radius: 999px; object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow-lg); background: #fff; }
.lp-avatar.mono { display: inline-flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; color: var(--brand-700); background: #fff; }
.lp-name { font-size: 30px; font-weight: 700; margin-top: 16px; letter-spacing: .01em; }
.lp-role { font-size: 14px; opacity: .92; margin-top: 4px; letter-spacing: .08em; }

.lp-section { padding: 60px 0; }
.lp-section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-head { text-align: center; margin-bottom: 28px; }
.lp-head .ttl { font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif; font-style: italic; font-size: 30px; color: var(--ink); }
.lp-head .en { display: block; font-size: 11px; letter-spacing: .26em; color: var(--brand-600); font-weight: 700; margin-bottom: 6px; text-transform: uppercase; }
.lp-head .bar { width: 54px; height: 2px; background: var(--brand-500); margin: 14px auto 0; border-radius: 2px; }
.lp-bio { max-width: 680px; margin: 0 auto; white-space: pre-wrap; line-height: 1.95; font-size: 15px; }

.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 620px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 20px 24px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 13px; height: 13px; border-radius: 999px; background: var(--brand-500); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tl-when { display: block; font-size: 12px; color: var(--brand-600); font-weight: 700; margin-bottom: 2px; }
.tl-what { font-size: 15px; }
.timeline.center { border-left: 0; padding-left: 0; max-width: 620px; text-align: center; }
.timeline.center li { padding: 0 0 18px; }
.timeline.center li:last-child { padding-bottom: 0; }
.timeline.center li::before { display: none; }

.video-embed { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); max-width: 760px; margin: 0 auto; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
.work-card { display: block; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; }
.work-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.work-thumb { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: #efeee9; display: flex; align-items: center; justify-content: center; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wc-body { padding: 12px 14px; }

.sns-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sns-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink); background: #fff; }
.sns-btn:hover { border-color: var(--brand-300); color: var(--brand-700); }

/* work detail gallery */
.wdetail-img { width: 100%; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 14px; display: block; }

/* ---------- block editor ---------- */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.editor-toolbar button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.editor-toolbar button:hover { border-color: var(--brand-300); color: var(--brand-700); }
#editor { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; min-height: 160px; }
.eb { position: relative; border-radius: 10px; padding: 6px 8px 6px 34px; }
.eb:hover { background: #faf9f5; }
.eb-ctl { position: absolute; left: 4px; top: 8px; display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity .15s; }
.eb:hover .eb-ctl { opacity: 1; }
.eb-ctl button { width: 22px; height: 19px; border: 1px solid var(--line); background: #fff; border-radius: 5px; font-size: 10px; cursor: pointer; line-height: 1; color: var(--muted); padding: 0; }
.eb-ctl button:hover { color: var(--ink); border-color: #cfcfdb; }
.eb-h { width: 100%; border: 0; outline: none; font-size: 20px; font-weight: 700; background: transparent; padding: 6px 0; color: var(--ink); }
.eb-p { width: 100%; border: 0; outline: none; resize: none; font: inherit; font-size: 15px; line-height: 1.9; background: transparent; padding: 4px 0; overflow: hidden; color: var(--ink); }
.eb-img { margin: 0; }
.eb-img img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.eb-cap { margin-top: 6px; text-align: center; font-size: 13px; }
.eb-vprev iframe { border: 0; }

/* ---------- rendered article (content body) ---------- */
.cb-h { font-size: 21px; font-weight: 700; margin: 30px 0 10px; line-height: 1.4; }
.cb-p { font-size: 15px; line-height: 1.95; margin: 0 0 18px; white-space: pre-wrap; }
.cb-img { margin: 22px 0; }
.cb-img img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.cb-img figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- LP 自由ブロック ---------- */
.lp-block { padding: 26px 0; }
.lp-block + .lp-block { padding-top: 0; }
.lp-rich { max-width: 680px; margin: 0 auto; white-space: pre-wrap; line-height: 1.95; font-size: 15px; }
.lp-img { margin: 0 auto; }
.lp-img img { width: 100%; border-radius: 14px; border: 1px solid var(--line); display: block; }
.lp-img figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.lp-img-normal { max-width: 520px; }
.lp-img-wide { max-width: 860px; }
.lp-img-full { max-width: 100%; }
.lp-gallery { display: grid; gap: 14px; }
.lp-gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.lp-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.lp-gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
.lp-gallery figure { margin: 0; }
.lp-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
/* ギャラリー「もっと見る」折りたたみ（最初の2行のみ表示） */
.lp-gal-clip.cols-2 figure:nth-child(n+5),
.lp-gal-clip.cols-3 figure:nth-child(n+7),
.lp-gal-clip.cols-4 figure:nth-child(n+9) { display: none; }
.lp-gal-cb:checked ~ .lp-gal-clip figure { display: block; }
.lp-gal-more .g-less { display: none; }
.lp-gal-cb:checked ~ .center .lp-gal-more .g-more { display: none; }
.lp-gal-cb:checked ~ .center .lp-gal-more .g-less { display: inline; }
@media (max-width: 760px) {
  /* スマホはcols-3/4が2列になるため、2行分=4枚で揃える */
  .lp-gal-clip.cols-3 figure:nth-child(n+7),
  .lp-gal-clip.cols-4 figure:nth-child(n+9) { display: none; }
  .lp-gal-cb:checked ~ .lp-gal-clip figure { display: block; }
}
.lp-divider { border: 0; border-top: 1px solid var(--line); max-width: 680px; margin: 0 auto; }
/* 活動・ブログ（折りたたみアコーディオン） */
.lp-blog { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.lp-blog-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lp-blog-sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.lp-blog-sum::-webkit-details-marker { display: none; }
.lp-blog-meta { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lp-blog-date { font-size: 12px; font-weight: 700; color: var(--brand-600); white-space: nowrap; }
.lp-blog-ttl { font-size: 16px; font-weight: 700; margin: 0; }
.lp-blog-chev { color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.lp-blog-item[open] .lp-blog-chev { transform: rotate(180deg); }
.lp-blog-detail { padding: 0 18px 18px; }
.lp-blog-cover { margin-bottom: 12px; }
.lp-blog-cover img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 10px; display: block; }
.lp-blog-text { font-size: 14px; line-height: 1.9; color: var(--muted); margin: 0; }
.lp-blog-more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--brand-600); }
/* 旧インライン（フォールバック） */
.lp-blog-item-flat { display: flex; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lp-blog-item-flat .lp-blog-thumb { flex: 0 0 140px; }
.lp-blog-item-flat .lp-blog-thumb img { width: 140px; height: 100%; min-height: 110px; object-fit: cover; display: block; }
.lp-blog-item-flat .lp-blog-body { padding: 16px 18px; min-width: 0; flex: 1; }
.lp-blog-item-flat .lp-blog-ttl { margin: 4px 0 0; }
.lp-blog-item-flat .lp-blog-text { margin: 8px 0 0; }
@media (max-width: 600px) { .lp-blog-item-flat { flex-direction: column; } .lp-blog-item-flat .lp-blog-thumb { flex: none; } .lp-blog-item-flat .lp-blog-thumb img { width: 100%; height: 160px; } }

/* 記事ページ（post.php） */
.post-article { max-width: 720px; margin: 0 auto; }
.post-date { font-size: 13px; font-weight: 700; color: var(--brand-600); }
.post-title { font-size: 30px; line-height: 1.35; }
.post-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); display: block; }
.post-body { font-size: 16px; line-height: 1.95; }
@media (max-width: 760px) { .post-title { font-size: 24px; } }
/* 音声 */
.lp-audio-ttl { text-align: center; font-weight: 700; margin: 0 0 12px; }
.lp-audio { width: 100%; display: block; }
.lp-audio-embed { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.lp-audio-embed iframe { width: 100%; height: 166px; border: 0; display: block; }
.lp-audio-embed.spotify iframe { height: 152px; }
/* ビルダー：繰り返し入力（ブログ投稿） */
.lpb-entries { display: flex; flex-direction: column; gap: 10px; }
.lpb-entry { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #fbfbf9; }
.lpb-xbtn { border: 0; background: none; color: #dc2626; font-size: 12px; cursor: pointer; padding: 2px 4px; }
.lpb-xbtn:hover { text-decoration: underline; }
@media (max-width: 760px) { .lp-gallery.cols-3, .lp-gallery.cols-4 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- LP テーマ（公開ページに body クラスで付与） ---------- */
/* minimal = 既定（追加オーバーライドなし） */

/* bold：大胆・ビジュアル重視 */
.lp-theme-bold .lp-hero { min-height: 80vh; }
.lp-theme-bold .lp-hero-bg::after { background: linear-gradient(180deg, rgba(10,10,16,.30), rgba(10,10,16,.72)); }
.lp-theme-bold .lp-name { font-size: 48px; letter-spacing: -.02em; }
.lp-theme-bold .lp-role { font-size: 15px; letter-spacing: .22em; }
.lp-theme-bold .lp-avatar { width: 132px; height: 132px; }
.lp-theme-bold .lp-head .ttl { font-family: inherit; font-style: normal; font-weight: 800; font-size: 38px; letter-spacing: -.02em; }
.lp-theme-bold .lp-head .en { letter-spacing: .32em; font-size: 12px; }
.lp-theme-bold .lp-section { padding: 88px 0; }
.lp-theme-bold .works-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
.lp-theme-bold .work-thumb { aspect-ratio: 3 / 2; }
.lp-theme-bold .work-card { border-radius: 18px; }
@media (max-width: 760px) { .lp-theme-bold .lp-name { font-size: 34px; } .lp-theme-bold .works-grid { grid-template-columns: 1fr; } }

/* pop：カラフル */
.lp-theme-pop { --brand-50:#fff0f6; --brand-100:#ffe0ee; --brand-200:#ffc2da; --brand-300:#ff9ec3; --brand-500:#ff5d9e; --brand-600:#f6408a; --brand-700:#d92b74; }
.lp-theme-pop .lp-hero.no-bg { background: linear-gradient(135deg, #fff0f6, #fde9ff 55%, #e9f0ff); color: var(--ink); }
.lp-theme-pop .lp-head .ttl { font-family: inherit; font-style: normal; font-weight: 800; }
.lp-theme-pop .lp-head .bar { background: linear-gradient(90deg, #ff5d9e, #ffb14e); width: 64px; height: 3px; }
.lp-theme-pop .chip { background: var(--brand-100); color: var(--brand-700); }
.lp-theme-pop .work-card { border-radius: 20px; border-color: var(--brand-200); }
.lp-theme-pop .sns-btn { border-color: var(--brand-200); color: var(--brand-700); }
.lp-theme-pop .lp-section.alt { background: var(--brand-50); border-color: var(--brand-100); }

/* dark：黒基調 */
.lp-theme-dark { --ink:#ECECF3; --muted:#9b9bab; --line:#2a2a35; --bg:#0f0f15; --brand-500:#8b7bff; --brand-600:#9d8cff; --brand-700:#b3a6ff; background:#0f0f15; color:var(--ink); }
.lp-theme-dark .site-header { background: rgba(15,15,21,.6); }
.lp-theme-dark .lp-hero.no-bg { background: radial-gradient(120% 100% at 50% 0%, #1c1c2a, #0f0f15); color: var(--ink); }
.lp-theme-dark .lp-section.alt { background:#16161f; border-color: var(--line); }
.lp-theme-dark .work-card { background:#16161f; border-color: var(--line); }
.lp-theme-dark .work-thumb { background:#22222e; }
.lp-theme-dark .sns-btn { background:#16161f; color: var(--ink); border-color: var(--line); }
.lp-theme-dark .card { background:#16161f; border-color: var(--line); }
.lp-theme-dark .input, .lp-theme-dark .textarea { background:#0f0f15; border-color: var(--line); color: var(--ink); }
.lp-theme-dark .lp-avatar { border-color:#22222e; background:#22222e; }
.lp-theme-dark .timeline li::before { border-color:#16161f; }

/* ---------- LPビルダー（lp-edit）＆作品並べ替え ---------- */
.theme-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .theme-cards { grid-template-columns: repeat(2, 1fr); } }
.theme-card { position: relative; border: 2px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.theme-card:hover { border-color: var(--brand-300); }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card.sel { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.theme-card .tc-prev { height: 64px; border-radius: 9px; overflow: hidden; display: flex; flex-direction: column; }
.theme-card .tc-name { font-size: 13px; font-weight: 700; margin-top: 8px; text-align: center; }
.tc-prev .tc-hero { flex: 1.4; display: flex; align-items: center; justify-content: center; }
.tc-prev .tc-dot { width: 16px; height: 16px; border-radius: 999px; background: #fff; }
.tc-prev .tc-body { flex: 1; display: flex; gap: 4px; padding: 5px; }
.tc-prev .tc-body span { flex: 1; border-radius: 3px; }
/* テーマ別プレビュー配色 */
.tc-minimal .tc-hero { background: linear-gradient(180deg,#fff,#f0eee9); } .tc-minimal .tc-dot { box-shadow:0 0 0 2px #4f46d6; } .tc-minimal .tc-body { background:#fff; } .tc-minimal .tc-body span { background:#e8e7e2; }
.tc-bold .tc-hero { background: linear-gradient(135deg,#2a2540,#4f46d6); } .tc-bold .tc-body { background:#fff; } .tc-bold .tc-body span { background:#d9d9ff; }
.tc-pop .tc-hero { background: linear-gradient(135deg,#ff5d9e,#ffb14e); } .tc-pop .tc-body { background:#fff0f6; } .tc-pop .tc-body span { background:#ffc2da; }
.tc-dark .tc-hero { background: radial-gradient(120% 120% at 50% 0%,#1c1c2a,#0f0f15); } .tc-dark .tc-dot { background:#8b7bff; } .tc-dark .tc-body { background:#16161f; } .tc-dark .tc-body span { background:#2a2a35; }

.sec-sort, .work-sort { display: flex; flex-direction: column; gap: 8px; }
.sec-item, .work-sort-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.sec-item.dragging, .work-sort-item.dragging { opacity: .5; }
.sec-item.drop-into, .work-sort-item.drop-into { border-color: var(--brand-500); box-shadow: 0 0 0 2px var(--brand-100); }
.sec-item.off { opacity: .55; }
.ws-grip, .sec-grip { cursor: grab; color: #b9b8b0; font-size: 18px; line-height: 1; touch-action: none; user-select: none; }
.ws-thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: #efeee9; display: flex; align-items: center; justify-content: center; color: #b9b8b0; flex-shrink: 0; }
.ws-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sec-name .en { font-size: 10px; letter-spacing: .12em; color: var(--brand-600); font-weight: 700; display: block; text-transform: uppercase; }
.sec-name b { font-size: 15px; }
.ws-move, .sec-move { display: flex; gap: 4px; margin-left: auto; }
.ws-btn { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 13px; }
.ws-btn:hover:not(:disabled) { border-color: var(--brand-300); color: var(--brand-700); }
.ws-btn:disabled { opacity: .35; cursor: default; }
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 40px; height: 23px; border-radius: 999px; background: #d6d5cf; transition: background .15s; position: relative; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 999px; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--brand-600); }
.switch input:checked + .track::after { transform: translateX(17px); }

/* ---------- ブロックビルダー（lp-edit 左右分割） ---------- */
.lpb { max-width: 1280px; margin: 0 auto; padding: 0 12px; }
.lpb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; flex-wrap: wrap; }
.lpb-saved { background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-700); border-radius: 10px; padding: 8px 14px; font-size: 13px; margin: 0 4px 10px; }
.lpb-split { display: grid; grid-template-columns: 400px 1fr; gap: 18px; align-items: start; }
.lpb-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding-right: 4px; }
.lpb-sec { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.lpb-sec-ttl { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.lpb-palette { display: flex; flex-wrap: wrap; gap: 7px; }
.lpb-add { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.lpb-add:hover { border-color: var(--brand-300); color: var(--brand-700); background: var(--brand-50); }
.lpb-list { display: flex; flex-direction: column; gap: 10px; }
.lpb-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.lpb-card.data { background: #faf9f5; }
.lpb-card.dragging { opacity: .5; }
.lpb-card-h { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: #fbfbf9; border-bottom: 1px solid var(--line); }
.lpb-grip { cursor: grab; color: #b9b8b0; font-size: 16px; touch-action: none; user-select: none; }
.lpb-card-t { font-size: 14px; flex: 1; }
.lpb-tag { font-size: 10px; font-weight: 700; color: #adaca4; border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.lpb-ops { display: flex; gap: 4px; }
.lpb-ops button { width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; font-size: 12px; color: var(--muted); }
.lpb-ops button:hover { border-color: var(--brand-300); color: var(--brand-700); }
.lpb-card-b { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.lpb-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.lpb-f .input, .lpb-f .select, .lpb-f textarea { font-size: 14px; }
.lpb-img { display: flex; align-items: center; gap: 10px; }
.lpb-img img { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.lpb-img-ph { width: 72px; height: 56px; border-radius: 8px; border: 1px dashed #cfcfc7; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #b9b8b0; }
.lpb-gal { display: flex; flex-wrap: wrap; gap: 8px; }
.lpb-gthumb { position: relative; }
.lpb-gthumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.lpb-gthumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 999px; border: 0; background: #f0464a; color: #fff; font-size: 12px; cursor: pointer; line-height: 1; }
.lpb-preview { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.lpb-pv-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fbfbf9; }
.lpb-device button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 9px; cursor: pointer; font-size: 14px; }
.lpb-device button.on { border-color: var(--brand-500); background: var(--brand-50); }
.lpb-frame-wrap { background: #e9e8e3; padding: 0; height: calc(100vh - 130px); min-height: 480px; display: flex; justify-content: center; }
.lpb-frame-wrap.mobile { padding: 16px 0; }
.lpb-frame-wrap iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .2s, box-shadow .2s; }
.lpb-frame-wrap.mobile iframe { width: 390px; box-shadow: 0 8px 30px rgba(0,0,0,.15); border-radius: 18px; }
@media (max-width: 920px) {
  .lpb-split { grid-template-columns: 1fr; }
  .lpb-panel { position: static; max-height: none; overflow: visible; }
  .lpb-frame-wrap { height: 70vh; }
}

/* ---------- SNS 個別入力欄 ---------- */
.sns-fields { display: flex; flex-direction: column; gap: 10px; }
.sns-field { display: flex; align-items: center; gap: 10px; }
.sns-field-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; background: var(--brand-50); color: var(--brand-700); display: flex; align-items: center; justify-content: center; }
.sns-field-lb { width: 124px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.sns-field .input { flex: 1; min-width: 0; }
@media (max-width: 600px) { .sns-field { flex-wrap: wrap; } .sns-field-lb { width: auto; } .sns-field .input { flex: 1 1 100%; } }

/* ---------- SNS予約・連携 ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 600px) { .pf-grid { grid-template-columns: 1fr; } }
.pf-opt { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.pf-opt:hover { border-color: var(--brand-300); }
.pf-opt input { width: 17px; height: 17px; }
.pf-name { font-weight: 600; font-size: 14px; flex: 1; }
.pf-tag { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #f0f0f4; color: #8a8f9c; }
.pf-tag.on { background: var(--brand-100); color: var(--brand-700); }
.badge.sched-scheduled { background: var(--brand-100); color: var(--brand-700); }
.badge.sched-posted { background: #e7f8ef; color: #1f9d57; }
.badge.sched-failed { background: #fef2f2; color: #dc2626; }
.badge.sched-manual { background: #fffbeb; color: #b45309; }
.badge.sched-draft { background: #f0f0f4; color: #8a8f9c; }
.badge.sched-canceled { background: #f0f0f4; color: #8a8f9c; }

/* 投稿テンプレート */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tpl-card { text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.tpl-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-soft); }
.tpl-card-ttl { font-size: 15px; }
.tpl-card-prev { font-size: 12px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 600px) { .tpl-fields { grid-template-columns: 1fr; } }
.tpl-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.tpl-f .input { font-size: 14px; }
.chip-btn { border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-700); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-btn:hover { background: var(--brand-100); }

/* SNS別 出し分け入力 */
.variant-box { display: flex; flex-direction: column; gap: 10px; }
.vfield { display: flex; flex-direction: column; gap: 4px; }
.vfield-h { font-size: 12px; font-weight: 700; color: var(--brand-700); }
.vfield .textarea { min-height: 72px; background: #fff; }

/* ライブ文字数カウント */
.pf-count { display: flex; flex-wrap: wrap; gap: 6px; }
.pfc { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px; }
.pfc.ok { background: var(--brand-50); color: var(--brand-700); }
.pfc.ng { background: #fef2f2; color: #dc2626; }

/* 投稿プレビュー（各SNSモックアップ） */
.sns-pv { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pvm { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; font-size: 13px; }
.pvm-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.pvm-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pvm-id b { font-size: 13px; }
.pvm-sub { font-size: 11px; color: var(--muted); }
.pvm-logo { margin-left: auto; font-weight: 800; color: #999; }
.pvm-ava { width: 34px; height: 34px; border-radius: 999px; overflow: hidden; flex-shrink: 0; background: var(--brand-100); display: inline-flex; align-items: center; justify-content: center; }
.pvm-ava img { width: 100%; height: 100%; object-fit: cover; }
.pvm-ava.mono { color: var(--brand-700); font-weight: 700; }
.pvm-ava.sm { width: 26px; height: 26px; font-size: 12px; }
.pvm-text { padding: 0 12px 10px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.pvm-ph { color: #b9b8b0; }
.pvm-img { background: #f1f1f5; }
.pvm-img img { width: 100%; display: block; object-fit: cover; }
.pvm-img.r16 { aspect-ratio: 16/9; margin: 0 12px 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.pvm-img.r16 img { height: 100%; }
.pvm-img.sq { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.pvm-img.sq img { height: 100%; }
.pvm-img.r { border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.pvm-acts { display: flex; gap: 16px; padding: 8px 12px; color: #9a99a0; border-top: 1px solid #f2f1ec; }
.pvm-cap { padding: 4px 12px 12px; line-height: 1.6; word-break: break-word; }
/* X */
.pvm-x .pvm-logo { color: #111; }
/* Instagram */
.pvm-ig .pvm-head { border-bottom: 1px solid #f2f1ec; }
.pvm-ig .pvm-logo { background: linear-gradient(45deg,#f9ce34,#ee2a7b,#6228d7); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* LINE */
.pvm-line { background: #eef3f6; }
.pvm-line-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #06c755; color: #fff; }
.pvm-line-head .pvm-sub { color: rgba(255,255,255,.85); }
.pvm-line-head b { font-size: 13px; }
.pvm-line-row { display: flex; gap: 8px; padding: 12px; align-items: flex-start; }
.pvm-bubble { background: #fff; border-radius: 4px 14px 14px 14px; padding: 9px 12px; line-height: 1.6; max-width: 80%; word-break: break-word; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
/* note */
.pvm-note-cover { aspect-ratio: 1280/670; background: #f1f1f5; }
.pvm-note-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pvm-note-b { padding: 12px; }
.pvm-note-ttl { font-size: 15px; display: block; line-height: 1.4; }
/* TikTok */
.pvm-tt { background: #000; }
.pvm-tt-frame { position: relative; aspect-ratio: 9/16; max-height: 360px; display: flex; align-items: center; justify-content: center; color: #fff; }
.pvm-tt-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pvm-tt-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; background: linear-gradient(180deg,transparent,rgba(0,0,0,.6)); color: #fff; line-height: 1.5; z-index: 1; }
.pvm-tt .pvm-ph { color: #888; }
/* コピー＆投稿ツールバー */
.pvm-bar { display: flex; gap: 8px; padding: 9px 12px; border-top: 1px solid #f2f1ec; background: #fafaf9; position: relative; z-index: 2; flex-wrap: wrap; }
.pvm-cp, .pvm-open { font-size: 12px; font-weight: 700; border-radius: 8px; padding: 7px 12px; cursor: pointer; line-height: 1; white-space: nowrap; }
.pvm-cp { border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-700); }
.pvm-cp:hover { background: var(--brand-100); }
.pvm-cp.done { background: #e7f8ef; border-color: #bbf0d0; color: #1f9d57; }
.pvm-open { border: 1px solid var(--line); background: #fff; color: var(--ink); display: inline-flex; align-items: center; }
.pvm-open:hover { border-color: var(--brand-300); color: var(--brand-700); }

/* 仕様リファレンス */
.specs-box > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand-600); }
.specs-scroll { overflow-x: auto; margin-top: 10px; }
.specs-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.specs-tbl th, .specs-tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs-tbl th { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }

/* カレンダー */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-wd:first-child { color: #e0567a; } .cal-wd:last-child { color: #5a7bd6; }
.cal-cell { min-height: 92px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: #fff; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.other { background: #fafaf8; }
.cal-cell.other .cal-dnum { color: #c3c2bb; }
.cal-cell.today { border-color: var(--brand-500); box-shadow: 0 0 0 2px var(--brand-100); }
.cal-day { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink); padding: 1px 3px; border-radius: 6px; }
.cal-day .cal-add { opacity: 0; color: var(--brand-600); font-weight: 700; }
.cal-day:hover { background: var(--brand-50); } .cal-day:hover .cal-add { opacity: 1; }
.cal-ev { display: block; font-size: 10.5px; line-height: 1.5; padding: 2px 5px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--brand-400, #9089f2); background: var(--brand-50); color: var(--ink); }
.cal-ev b { font-weight: 700; }
.cal-ev.cal-posted { background: #e7f8ef; border-left-color: #1f9d57; }
.cal-ev.cal-failed { background: #fef2f2; border-left-color: #dc2626; }
.cal-ev.cal-manual { background: #fffbeb; border-left-color: #d99a08; }
.cal-ev.cal-scheduled { background: var(--brand-50); border-left-color: var(--brand-500); }
.cal-ev.cal-draft { background: #f0f0f4; border-left-color: #b8b8c2; }
.cal-more { font-size: 10px; color: var(--muted); padding-left: 4px; }
@media (max-width: 700px) {
  .cal { gap: 3px; }
  .cal-cell { min-height: 64px; border-radius: 8px; padding: 3px; }
  .cal-ev { font-size: 9px; padding: 1px 3px; }
  .cal-ev b { display: inline; }
}

/* ---------- スマホ用 下部タブバー（アプリ風） ---------- */
.tabbar { display: none; }
.sheet { display: none; }

@media (max-width: 760px) {
  /* 下部タブバー本体 */
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(20, 20, 30, 0.06);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 4px 2px; border: 0; background: none; cursor: pointer;
    color: #9a99a0; font-family: inherit; -webkit-tap-highlight-color: transparent;
  }
  .tab-ic { position: relative; display: flex; }
  .tab-ic svg { width: 24px; height: 24px; }
  .tab-lb { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
  .tab.active { color: var(--brand-600); }
  .tab .tab-dot { position: absolute; top: -2px; right: -3px; width: 8px; height: 8px;
    border-radius: 999px; background: #f0464a; border: 1.5px solid #fff; }
  /* 中央の出品CTA */
  .tab-cta { color: #fff; }
  .tab-cta .tab-lb { color: var(--brand-600); }
  .tab-cta-ic {
    width: 46px; height: 46px; margin-top: -18px; border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-600), #6f66e6);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(79, 70, 214, 0.4); border: 3px solid #f7f7f4;
  }
  .tab-cta-ic svg { width: 24px; height: 24px; }

  /* メニュー・シート（下からせり上がる） */
  .sheet { display: block; position: fixed; inset: 0; z-index: 70; }
  .sheet[hidden] { display: none; }
  .sheet-scrim { position: absolute; inset: 0; background: rgba(15, 15, 25, 0.4);
    opacity: 0; transition: opacity .24s ease; }
  .sheet.open .sheet-scrim { opacity: 1; }
  .sheet-panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: #fff; border-radius: 22px 22px 0 0; padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
    max-height: 82vh; overflow-y: auto; transform: translateY(100%);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1);
    box-shadow: 0 -10px 40px rgba(20, 20, 30, 0.2);
  }
  .sheet.open .sheet-panel { transform: translateY(0); }
  .sheet-grab { width: 40px; height: 4px; border-radius: 999px; background: #d8d7d0;
    margin: 8px auto 6px; }
  .sheet-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #adaca4;
    padding: 16px 4px 4px; }
  .sheet-link { display: block; padding: 13px 12px; border-radius: 12px; font-size: 16px;
    font-weight: 600; color: var(--ink); }
  .sheet-link:active { background: #efeee9; }
  .sheet-link.on { background: var(--brand-50); color: var(--brand-700); }
  .sheet-close { display: block; width: 100%; margin-top: 14px; padding: 14px;
    border: 1px solid var(--line); background: #fff; border-radius: 12px;
    font-family: inherit; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; }

  /* タブバー分の余白を確保 */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .footer { margin-bottom: calc(56px + env(safe-area-inset-bottom)); }

  /* モバイルではヘッダーをコンパクトに＆上部リンクを隠す（下タブに集約） */
  .nav { height: 56px; }
  .site-header .nav-actions .navlink,
  .site-header .nav-actions .badge-pro { display: none; }
  .site-header .nav-actions .btn { padding: 7px 14px; font-size: 13px; }

  /* ダッシュボードのサイドバーはモバイルでは隠す（下タブ＋シートに集約） */
  .app-nav { display: none; }
  .app-layout { grid-template-columns: 1fr; gap: 0; }
  .container.section { padding-top: 18px; }

  /* 統計タイルはモバイルでも2列のコンパクト表示（縦積みで間延びさせない） */
  .grid:has(.stat-tile) { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .stat-tile { padding: 13px 14px; }
  .stat-tile .num { font-size: 21px; }

  /* ヘッダーのハンバーガーを表示（フルメニューへ） */
  .hamburger { display: inline-flex; }

  /* コンテンツ一覧は2カラムで密度UP（学ぶ・購入・出品一覧） */
  .grid:has(.content-cover) { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .grid:has(.content-cover) .h3 { font-size: 14px; -webkit-line-clamp: 3; }
  .grid:has(.content-cover) .card > div:last-child { padding: 12px !important; }
  .grid:has(.content-cover) .content-cover { aspect-ratio: 16/10; }

  /* クリエイター一覧（探す）も2カラム・縦並びカードに */
  .grid:has(.creator-card) { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .creator-card { padding: 16px 12px; }
  .creator-card .cc-head { flex-direction: column; text-align: center; gap: 8px; }
  .creator-card .cc-head .avatar-sm { width: 54px; height: 54px; font-size: 20px; }
  .creator-card .cc-info { flex: none !important; width: 100%; }
  .creator-card .cc-info .row { justify-content: center; flex-wrap: wrap; }
  .creator-card .cc-info b { white-space: normal !important; }
  .creator-card p { text-align: center; }
}

/* ---------- print (PDF出力：A4 1ページに収める) ---------- */
@media print {
  .no-print, .site-header, .footer, .tabbar, .sheet,
  .doc-pv-wrap, .lpb-bar, .lpb-preview, .lpb-palette, .alert { display: none !important; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  .section { padding: 0 !important; }
  .container, .container.narrow { max-width: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
  /* 書類本体 */
  .print-area { box-shadow: none !important; border: none !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important; }
  /* 余白・文字を詰めて縦に収める */
  .print-area h1.h2, .print-area .h2 { font-size: 19px; }
  .print-area .mt-1 { margin-top: 5px !important; }
  .print-area .mt-2 { margin-top: 8px !important; }
  .print-area .mt-3 { margin-top: 10px !important; }
  .print-area .mt-4 { margin-top: 12px !important; }
  .print-area .mt-6 { margin-top: 16px !important; }
  .print-area header { padding-bottom: 12px !important; }
  .print-area .table { font-size: 12.5px; }
  .print-area .table th, .print-area .table td { padding-top: 7px !important; padding-bottom: 7px !important; }
  .print-area .doc { font-size: 12px !important; line-height: 1.6 !important; }
  /* 行・表・図はページ途中で割らない */
  .print-area table, .print-area tr, .print-area td, .print-area th,
  .print-area figure, .print-area section { page-break-inside: avoid; }
  /* 自動縮小（JSが必要時に倍率を設定。zoomはレイアウトごと縮むのでページ数も減る） */
  .print-area { zoom: var(--print-zoom, 1); }
  @page { size: A4 portrait; margin: 12mm; }
}

/* ---------- レビュー（星評価） ---------- */
.stars { display: inline-flex; color: #d9d8d2; font-size: 15px; letter-spacing: 1px; }
.stars .star.on { color: #f6b73c; }
.stars .star.half { background: linear-gradient(90deg, #f6b73c 50%, #d9d8d2 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; font-size: 30px; line-height: 1; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label { color: #d9d8d2; cursor: pointer; transition: color .1s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #f6b73c; }

/* ---------- 管理コンソール ---------- */
.admin-body { background: #f4f5f7; }
.admin-bar { background: #1a1a22; color: #fff; position: sticky; top: 0; z-index: 40; }
.admin-bar-in { display: flex; align-items: center; gap: 18px; height: 56px; }
.admin-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; white-space: nowrap; }
.admin-logo .logo-mark { width: 26px; height: 26px; font-size: 14px; background: var(--brand-600); }
.admin-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; overflow-x: auto; }
.admin-nav-link { color: #b9b9c4; font-size: 13.5px; font-weight: 600; padding: 7px 12px; border-radius: 8px; white-space: nowrap; }
.admin-nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.admin-nav-link.on { color: #fff; background: var(--brand-600); }
.admin-bar-r { display: flex; align-items: center; gap: 8px; }
.admin-main { padding: 28px 20px 60px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }
.astat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.astat-lbl { font-size: 12px; color: var(--muted); }
.astat-num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fbfbfc; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid #f0f0f3; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-main .section-head { display: flex; align-items: center; justify-content: space-between; }

/* 請求書 入金ステータス */
.badge.inv-unpaid { background: #fffbeb; color: #b45309; }
.badge.inv-partial { background: var(--brand-50); color: var(--brand-700); }
.badge.inv-paid { background: #e7f8ef; color: #1f9d57; }

/* ---------- 帳票ライブプレビュー（提案/見積/請求） ---------- */
.doc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.doc-pv-wrap { position: sticky; top: 84px; }
.doc-pv-bar { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.doc-pv { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow-soft); max-height: calc(100vh - 130px); overflow-y: auto; }
.doc-pv .doc { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.95; margin: 0; }
@media (max-width: 980px) { .doc-split { grid-template-columns: 1fr; } .doc-pv-wrap { position: static; } .doc-pv { max-height: none; } }

/* コンテンツ本文ブロック（記事カード内：lpブロックを流用しつつ余白を詰める） */
.cb-blocks .lp-block { padding: 16px 0; }
.cb-blocks .lp-block:first-child { padding-top: 4px; }
.cb-blocks .lp-block .container,
.cb-blocks .lp-block .container.narrow { max-width: 100%; padding-left: 0; padding-right: 0; }
.cb-blocks .lp-head { margin-bottom: 10px; }

/* ---------- 作家ページ（author.php） ---------- */
.author-hero { position: relative; min-height: 300px; background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.author-hero.no-cover { background: linear-gradient(120deg, var(--brand-600), #2f2a86); }
.author-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 35%, rgba(0,0,0,.58)); }
.author-hero-row { position: relative; width: 100%; display: flex; align-items: flex-end; gap: 18px; padding-top: 0; padding-bottom: 22px; }
.author-hero-av { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.32); background: #fff; flex: 0 0 auto; }
.author-hero-av.mono { display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 700; color: var(--brand-600); }
.author-hero-text { min-width: 0; padding-bottom: 8px; }
.author-hero-name { color: #fff; font-size: 30px; font-weight: 800; line-height: 1.2; margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.author-hero-role { color: rgba(255,255,255,.92); font-size: 14px; margin: 5px 0 0; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
/* 統計＋アクションのバー */
.author-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--line); }
.author-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.author-stat { font-size: 14px; color: var(--muted); }
.author-stat b { color: var(--ink); font-size: 17px; }
.author-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.author-bio { margin-top: 18px; color: var(--ink); max-width: 680px; }
.author-bio p { margin: 0 0 10px; line-height: 1.85; }
.author-bio p:last-child { margin-bottom: 0; }
.author-sep { border: 0; border-top: 1px solid var(--line); margin: 24px 0 0; }
@media (max-width: 560px) {
  .author-hero { min-height: 190px; }
  .author-hero-row { gap: 12px; padding-bottom: 16px; }
  .author-hero-av { width: 80px; height: 80px; }
  .author-hero-name { font-size: 22px; }
  .author-bar { padding: 14px 0; }
  .author-bar-actions { width: 100%; }
  .author-bar-actions .btn { flex: 1; }
  .author-sep { margin-top: 18px; }
}

/* ---------- コンテンツ詳細：本文＋作家サイドバーの2カラム ---------- */
.content-2col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.content-side { position: sticky; top: 80px; display: grid; gap: 16px; }
.author-mini { padding: 22px 20px; text-align: center; }
.author-mini-head { display: flex; flex-direction: column; align-items: center; gap: 4px; color: inherit; }
.author-mini-av { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow-soft); background: var(--brand-50); }
.author-mini-av.mono { display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: var(--brand-600); }
.author-mini-name { font-size: 16px; margin-top: 6px; }
.author-mini-head:hover .author-mini-name { color: var(--brand-700); }
.author-mini-bio { margin: 12px 0 0; line-height: 1.7; text-align: left; }
.author-mini-stats { display: flex; justify-content: center; gap: 18px; margin: 14px 0 16px; font-size: 13px; color: var(--muted); }
.author-mini-stats b { color: var(--ink); font-size: 15px; }
@media (max-width: 900px) {
  .content-2col { grid-template-columns: 1fr; gap: 18px; }
  .content-side { position: static; }
}

/* ---------- Pro訴求・アップセル ---------- */
.upsell { max-width: 560px; margin: 0 auto; padding: 44px 28px; }
.upsell-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-100); color: var(--brand-600); display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.upsell-list { list-style: none; margin: 18px auto 0; padding: 0; max-width: 400px; text-align: left; display: grid; gap: 8px; }
.upsell-list li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.5; }
.upsell-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--brand-600); font-weight: 800; }
.upsell-roi { margin: 16px auto 0; max-width: 420px; background: var(--brand-50); border-radius: 10px; padding: 10px 14px; }
.pro-card { background: linear-gradient(135deg, var(--brand-50), #fff); border-color: var(--brand-200) !important; }
.pro-card-ttl { font-size: 15px; }
/* 残量バッジ・バー */
.quota { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.quota b { color: var(--ink); }
.quota.warn b { color: #b45309; }
.quota-bar { width: 84px; height: 6px; border-radius: 999px; background: #eceaf6; overflow: hidden; }
.quota-bar > i { display: block; height: 100%; background: var(--brand-500); border-radius: 999px; }
.quota.warn .quota-bar > i { background: #f59e0b; }
.limit-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #92610a; border-radius: 12px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }

/* ---------- トップ：みんなのLP 自動スライド ---------- */
.lp-mq-sec { padding: 28px 0 8px; }
.lp-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.lp-marquee-track { display: flex; gap: 18px; width: max-content; animation: lp-scroll 48s linear infinite; will-change: transform; }
.lp-marquee:hover .lp-marquee-track { animation-play-state: paused; }
@keyframes lp-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.lp-mq-card { flex: 0 0 auto; width: 300px; }
.lp-mq-cover { position: relative; height: 178px; border-radius: 16px; overflow: hidden; background-size: cover; background-position: center; border: 1px solid var(--line); box-shadow: var(--shadow-soft); transition: transform .18s ease, box-shadow .18s ease; }
.lp-mq-card:hover .lp-mq-cover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lp-mq-cover.no-cover { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); }
.lp-mq-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 35%, rgba(0,0,0,.58)); }
.lp-mq-meta { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 10px; }
.lp-mq-av { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; background: #fff; flex: 0 0 auto; }
.lp-mq-av.mono { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--brand-600); }
.lp-mq-meta b { color: #fff; display: block; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-mq-meta span { color: rgba(255,255,255,.85); font-size: 12px; }
@media (max-width: 560px) { .lp-mq-card { width: 240px; } .lp-mq-cover { height: 150px; } .lp-marquee-track { animation-duration: 36s; } }
@media (prefers-reduced-motion: reduce) { .lp-marquee-track { animation: none; } .lp-marquee { overflow-x: auto; } }

/* コンテンツの有料ライン（ペイウォール） */
.cb-paywall { display: flex; align-items: center; gap: 14px; margin: 30px 0; }
.cb-paywall::before, .cb-paywall::after { content: ""; flex: 1; border-top: 2px dashed var(--brand-300); }
.cb-paywall span { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: 999px; padding: 5px 14px; }
