/* NEXT CAST — 公開面スタイル（白基調・信頼感重視・システムフォントのみ） */

:root {
  --ink: #16203a;
  --muted: #5d6b8a;
  --line: #e2e7f2;
  --accent: #0f5bd7;
  --accent-dark: #0a46a8;
  --accent-soft: #eef4ff;
  --ok: #0e8a4d;
  --ok-soft: #e6f6ee;
  --ng: #b3261e;
  --ng-soft: #fdecea;
  --warn: #8a6a00;
  --warn-soft: #fff7dd;
  --bg-soft: #f6f8fc;
  --shadow: 0 2px 10px rgba(22, 32, 58, 0.06);
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

h1 { font-size: 28px; line-height: 1.35; }
h2 { font-size: 20px; }

main { max-width: 1000px; margin: 0 auto; padding: 28px 20px 72px; }

/* ---------------------------------- ヘッダー・フッター */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .logo {
  font-weight: 800; font-size: 21px; letter-spacing: .04em;
  color: var(--ink); text-decoration: none;
}
.site-header .logo span { color: var(--accent); margin-left: 4px; }
.site-header nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--ink); font-size: 14.5px; }
.site-header nav a:hover { color: var(--accent); }
.site-header nav a.btn { color: #fff; }
.site-header nav a.btn:hover { color: #fff; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 20px 36px; background: var(--bg-soft); }
.footer-brand { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.footer-nav { display: flex; gap: 8px 22px; justify-content: center; flex-wrap: wrap; font-size: 13px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }

/* ---------------------------------- トップ */
.hero {
  text-align: center;
  padding: 64px 24px 56px;
  margin: -28px -20px 36px;
  background:
    radial-gradient(900px 340px at 15% -10%, #e7efff 0%, transparent 60%),
    radial-gradient(900px 340px at 85% -10%, #eaf6ff 0%, transparent 60%),
    linear-gradient(180deg, #fbfcff 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.hero h1 { font-size: 44px; line-height: 1.25; margin: 0 0 18px; letter-spacing: .02em; }
.hero p { color: var(--muted); font-size: 16px; max-width: 640px; margin: 0 auto; }
.hero strong { color: var(--ink); }
.cta { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.cta .btn { padding: 13px 30px; font-size: 16px; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 36px 0;
}
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 16px; box-shadow: var(--shadow);
}
.feature h2 { font-size: 16.5px; margin: 0 0 8px; color: var(--accent-dark); }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }

.fee-explain {
  text-align: center; margin: 48px auto; max-width: 560px;
  background: var(--bg-soft); border-radius: var(--radius); padding: 28px 24px;
}
.fee-explain h2 { margin-top: 0; }
.fee-explain .fee-table { margin: 14px auto; }

/* ---------------------------------- ボタン・フォーム */
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 10px; padding: 10px 24px; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn-outline { background: #fff; color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-small { padding: 5px 14px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: #fff; color: var(--ng); border-color: var(--ng); }
.btn-danger:hover { background: var(--ng-soft); }
.linklike { background: none; border: none; color: var(--ink); cursor: pointer; font-size: 14.5px; padding: 0; font-family: inherit; }
.linklike:hover { color: var(--accent); }
.inline { display: inline; }

.stack { display: flex; flex-direction: column; gap: 15px; margin: 16px 0; }
.stack.narrow { max-width: 480px; }
.stack label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; }
.stack input, .stack select, .stack textarea {
  font: inherit; font-weight: 400; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.stack input:focus, .stack select:focus, .stack textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.checkline { flex-direction: row !important; align-items: center; gap: 8px !important; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 13px; }
.role-select { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.role-select legend { font-weight: 700; padding: 0 6px; }
.role-option {
  flex-direction: row !important; gap: 10px !important; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer;
}
.role-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-option small { font-weight: 400; color: var(--muted); }

/* ---------------------------------- フラッシュ */
.flash { border-radius: 10px; padding: 11px 16px; font-size: 14.5px; }
.flash-error { background: var(--ng-soft); color: #8a1c14; border: 1px solid #f3c8c3; }
.flash-notice { background: var(--ok-soft); color: #0e5c36; border: 1px solid #bfe6cf; }

/* ---------------------------------- タレント一覧 */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tab {
  padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; color: var(--ink); font-size: 14px; background: #fff;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  text-decoration: none; color: var(--ink); background: #fff; box-shadow: var(--shadow);
  transition: transform .12s, border-color .12s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h2 { margin: 6px 0; font-size: 18px; }
.card p { margin: 0; font-size: 13px; color: var(--muted); }
.cat {
  display: inline-block; color: var(--accent); font-size: 12.5px; font-weight: 700;
  background: var(--accent-soft); border-radius: 6px; padding: 1px 9px;
}

/* ---------------------------------- テーブル */
table { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; }
.table-scroll { overflow-x: auto; }
.channels th, .channels td, .profile-table th, .profile-table td {
  border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top;
}
.profile-table th { width: 9em; background: var(--bg-soft); font-weight: 600; }
.channels th { background: var(--bg-soft); white-space: nowrap; }
.fee-table { max-width: 480px; margin: 12px 0; }
.fee-table caption { text-align: left; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.fee-table th, .fee-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.fee-table th { background: var(--bg-soft); font-weight: 600; width: 22em; }
.fee-table .payout { font-weight: 700; color: var(--ok); }

/* ---------------------------------- バッジ・ステータス */
.badge { display: inline-block; border-radius: 6px; padding: 1px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-ng { background: var(--ng-soft); color: var(--ng); }
.badge-negotiable { background: var(--warn-soft); color: var(--warn); }
.badge-pr { background: var(--accent-soft); color: var(--accent); }

.status { border-radius: 6px; padding: 1px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-requested { background: var(--accent-soft); color: var(--accent); }
.status-accepted { background: var(--ok-soft); color: var(--ok); }
.status-completed { background: var(--ink); color: #fff; }
.status-declined, .status-cancelled { background: #f0f1f5; color: var(--muted); }

/* ---------------------------------- 案件 */
.casting {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  margin: 14px 0; background: #fff; box-shadow: var(--shadow);
}
.casting-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.casting-head small { color: var(--muted); margin-left: auto; }
.casting .desc { color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------------------------------- 詳細・ドキュメントページ */
.talent-detail section, .company-detail section, .doc section { margin: 28px 0; }
.talent-detail h2, .company-detail h2, .doc h2 {
  font-size: 18px; border-left: 4px solid var(--accent); padding-left: 12px;
}
.ng-terms p {
  background: #fff7f6; border: 1px solid #f5d9d5; border-radius: 10px; padding: 12px 16px;
}
.doc { max-width: 760px; }
.doc h2 { margin-top: 30px; }
.doc ol, .doc ul { padding-left: 22px; }

/* ---------------------------------- メッセージ・検索 */
.badge-unread { background: var(--ng); color: #fff; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.msg {
  max-width: 78%; align-self: flex-start;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px;
  padding: 10px 14px; font-size: 14px;
}
.msg-mine {
  align-self: flex-end;
  background: var(--accent-soft); border-color: #cfdffb; border-radius: 12px 12px 4px 12px;
}
.msg small { color: var(--muted); display: block; margin-top: 4px; font-size: 11.5px; }
.casting-title { display: inline; font-size: 24px; margin: 0; }

.search-bar { display: flex; gap: 8px; margin: 16px 0 4px; max-width: 440px; }
.search-bar input {
  flex: 1; font: inherit; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 9px;
}
.search-bar input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* ---------------------------------- 管理画面 */
td.pre { white-space: pre-wrap; max-width: 420px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
tr.suspended td { background: #fff6f5; color: var(--muted); }

.empty { color: var(--muted); }
.note { color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  .hero { padding: 44px 16px 40px; }
  .hero h1 { font-size: 30px; }
  h1 { font-size: 24px; }
  .site-header { padding: 10px 14px; }
  .site-header nav { gap: 12px; font-size: 14px; }
}
