/* =====================================================================
   Creator AI — design system (no build step)
   白ベース / やわらかい / 余白多め / SaaS
   ===================================================================== */
:root {
  --brand-50: #f4f4ff;
  --brand-100: #ebebff;
  --brand-200: #d9d9ff;
  --brand-500: #7c76ef;
  --brand-600: #6357e3;
  --brand-700: #5446c8;
  --ink: #1f2230;
  --muted: #6b7280;
  --line: #e7e7ee;
  --bg: #fbfbfd;
  --radius: 16px;
  --shadow-soft: 0 1px 2px rgba(31, 34, 48, 0.04), 0 8px 24px rgba(31, 34, 48, 0.06);
  --shadow-lg: 0 1px 2px rgba(31, 34, 48, 0.04), 0 18px 50px rgba(31, 34, 48, 0.1);
}

* { 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(251, 251, 253, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.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(--brand-600);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft);
}
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- 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: var(--brand-600); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--brand-700); }
.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; }
.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; }

/* ---------- 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; }
}

/* ---------- print (PDF出力) ---------- */
@media print {
  .no-print, .site-header, .footer { display: none !important; }
  body { background: #fff; }
  .print-area { box-shadow: none !important; border: none !important; padding: 0 !important; }
  @page { margin: 16mm; }
}
