/* スゴサバ コントロールパネル — スタイル */
:root {
  /* OS のライト/ダーク設定にネイティブUI(フォーム/スクロールバー/カレンダー)も追従 */
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e3e6ea;
  --text: #1a1d21;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-fg: #ffffff;
  --primary-soft: #eff4ff;
  --green: #16a34a;
  --red: #dc2626;
  /* 文字・枠線用の赤。暗い背景では --red のままだと沈むため、ダークモードで明るめに上書きする */
  --red-text: #dc2626;
  --amber: #d97706;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
/* すべての入力欄で背景・文字色をテーマ変数に固定(ダークモードで黒文字化を防ぐ) */
input, select, textarea {
  font-family: inherit; font-size: 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
/* select のドロップダウン等、ブラウザ描画UIもOSテーマに追従させる */
select option { background: var(--surface); color: var(--text); }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* --- Login --- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 32px; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .badge { width: 56px; height: 56px; border-radius: 16px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 12px; }
.login-logo h1 { margin: 0; font-size: 22px; }
.login-logo p { margin: 4px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .15em; }
.login-foot { margin-top: 18px; text-align: center; font-size: 12px; }
.login-foot a { color: var(--muted); }
.login-foot a:hover { color: var(--primary); text-decoration: underline; }

/* --- ドキュメントページ(プライバシーポリシー等・公開) --- */
.doc-wrap { min-height: 100vh; display: flex; justify-content: center; padding: 32px 20px; }
.doc-card { width: 100%; max-width: 760px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 40px; }
.doc-head { text-align: center; margin-bottom: 28px; }
.doc-head .badge { width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 10px; }
.doc-head h1 { margin: 0; font-size: 24px; }
.doc-head p { margin: 6px 0 0; font-size: 12px; letter-spacing: .05em; }
.doc-card h2 { font-size: 16px; margin: 28px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.doc-card p { margin: 8px 0; }
.doc-card ul { margin: 8px 0; padding-left: 20px; }
.doc-card li { margin: 4px 0; }
.doc-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; }

/* --- Layout --- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand .badge { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.brand b { font-size: 16px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; margin-bottom: 2px; cursor: pointer; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--primary); color: #fff; }
.nav a .ico { width: 18px; text-align: center; flex-shrink: 0; }
/* ドメイン一覧(ナビ内) */
.nav-group-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; padding: 14px 12px 4px; }
.nav-domain { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 13px; cursor: pointer; margin-bottom: 1px; }
.nav-domain:hover { background: var(--surface-2); }
.nav-domain.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-domain .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.nav-domain .dname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-domain .lock { margin-left: auto; font-size: 11px; }
/* ドメイン配下の Web ツリー(インデント表示) */
a.nav-group-label { display: block; color: var(--muted); cursor: pointer; border-radius: 8px; }
a.nav-group-label:hover { color: var(--primary); }
a.nav-group-label.active { color: var(--primary); }
.nav-webs { margin: 0 0 6px 14px; padding-left: 8px; border-left: 2px solid var(--border); }
.nav-web { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 7px; color: var(--text); font-size: 12.5px; cursor: pointer; }
.nav-web:hover { background: var(--surface-2); }
.nav-web.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-web .ico { flex-shrink: 0; font-size: 12px; }
.nav-web .wname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-web .lock { margin-left: auto; font-size: 11px; }
.nav-add-web { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 7px; color: var(--primary); font-size: 12px; cursor: pointer; }
.nav-add-web:hover { background: var(--primary-soft); }
.nav-add-domain { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; color: var(--primary); font-weight: 600; font-size: 13px; cursor: pointer; margin-top: 4px; border: 1px dashed var(--border); }
.nav-add-domain:hover { background: var(--primary-soft); border-color: var(--primary); }
.sidebar .spacer { flex: 1; }
.sidebar .nav-scroll { overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.userbox { border-top: 1px solid var(--border); padding-top: 12px; font-size: 13px; }
.userbox .name { font-weight: 600; }
.userbox .role { color: var(--muted); font-size: 12px; }
.userbox button { margin-top: 8px; width: 100%; }

.main { padding: 28px 32px; overflow: auto; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 24px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
/* パンくず + 右側アクション(ドメイン/Web ページの見出し) */
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { margin: 0 6px; }
.page-head .head-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-head .head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
/* タブ内の切替(メールアカウント / メーリングリスト) */
.subnav { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; margin-bottom: 16px; }
.subnav button { border: none; background: var(--surface); color: var(--muted); padding: 7px 14px; font-weight: 500; }
.subnav button + button { border-left: 1px solid var(--border); }
.subnav button.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
/* 使用 Web チップ(データベース一覧) */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-size: 12px; margin: 2px 4px 2px 0; }
.chip a { color: var(--text); }
.chip .x { border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 13px; line-height: 1; }
.chip .x:hover { color: var(--red-text); }
.chip-select { font-size: 12px; padding: 2px 6px; border-radius: 999px; width: auto; margin: 2px 0; color: var(--primary); }
.note { padding: 10px 14px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.note b { color: var(--text); }
/* DNS 認証コード(TXT)の表示 */
.acme-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; word-break: break-all; user-select: all; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }

/* --- Cards / grid --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
/* ドメインカード(スクリーンショット付き) */
.domain-card { cursor: pointer; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.domain-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-1px); }
.domain-card .shot { aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--border); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.domain-card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.domain-card .shot-ph { color: var(--muted); font-size: 12px; }
/* --- ファイルマネージャ --- */
.fm-crumb { margin-bottom: 10px; font-size: 13px; display: flex; align-items: center; flex-wrap: wrap; }
.fm-crumb a { color: var(--primary); cursor: pointer; }
.fm-crumb a:hover { text-decoration: underline; }
.fm-crumb .fm-sep { color: var(--muted); margin: 0 6px; }
.fm-drop { position: relative; border-radius: var(--radius); transition: box-shadow .12s; }
.fm-drop.fm-dragover { box-shadow: 0 0 0 3px var(--primary); }
.fm-drop.fm-dragover .fm-drop-hint { display: block; }
.fm-drop-hint { display: none; position: absolute; inset: 0; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border: 2px dashed var(--primary); border-radius: var(--radius); color: var(--primary); font-weight: 600; align-items: center; justify-content: center; pointer-events: none; }
.fm-drop.fm-dragover .fm-drop-hint { display: flex; }
.fm-name span { vertical-align: middle; }
tr.fm-dir .fm-name { font-weight: 600; }
tr.fm-dir:hover { background: var(--surface-2); }
.fm-prog { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.fm-prog > span { display: block; height: 100%; background: var(--primary); width: 0; transition: width .15s; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .app { grid-template-columns: 1fr; } .sidebar { display: none; } }

.stat { padding: 18px 20px; }
/* 件数カード(クリックで管理ページへ) */
a.stat-link { display: block; color: inherit; cursor: pointer; transition: box-shadow .15s, transform .15s; }
a.stat-link:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-1px); }
a.stat-link .value { color: var(--primary); }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.stat .bar { height: 6px; background: var(--surface-2); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.stat .bar > span { display: block; height: 100%; background: var(--primary); }

/* --- Tabs --- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tabs button { padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 500; }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Table / list --- */
.list { }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .sub { color: var(--muted); font-size: 12px; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.data td { font-size: 13px; }

/* --- Badges --- */
.badge-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.b-green { background: #dcfce7; color: #166534; }
.b-red { background: #fee2e2; color: #991b1b; }
.b-amber { background: #fef3c7; color: #92400e; }
.b-gray { background: var(--surface-2); color: var(--muted); }
.b-blue { background: var(--primary-soft); color: var(--primary); }

/* --- Buttons / forms --- */
.btn { padding: 8px 14px; border-radius: 9px; border: 1px solid var(--primary); background: var(--primary); color: #fff; font-weight: 600; }
.btn:hover { filter: brightness(.95); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.ghost.danger { color: var(--red-text); border-color: var(--red-text); background: transparent; }
.btn.ghost.danger:hover { background: color-mix(in srgb, var(--red-text) 12%, transparent); color: var(--red-text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.field input:focus, .field select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.inline-actions { display: flex; gap: 8px; align-items: center; }

/* --- Panel (add form) --- */
.addpanel { border: 1px solid var(--primary); background: var(--primary-soft); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }

/* --- Toast --- */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 8px; box-shadow: var(--shadow); padding: 11px 15px; max-width: 380px; font-size: 13px; animation: slidein .2s ease; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- ローディングスピナー(インストール中などのボタン内表示) --- */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.section-title { font-size: 16px; font-weight: 700; margin: 4px 0 12px; }
.muted { color: var(--muted); }
.right { margin-left: auto; }
.flex { display: flex; align-items: center; gap: 10px; }
.mb0 { margin-bottom: 0; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.icon-btn { border: none; background: transparent; color: var(--muted); padding: 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--red-text); }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; }
.icon-btn[disabled]:hover { background: transparent; color: var(--muted); }
/* 自動生成レコード(SOA/NS/グルー)の行。表示はするが操作させない */
.row-disabled { opacity: .62; }
.row-disabled td { background: var(--surface-2); }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216; --surface: #171b21; --surface-2: #1f242c; --border: #2a3038;
    --text: #e6e9ee; --muted: #9aa4b2; --primary-soft: #1e293b;
    --red-text: #f87171;
  }
  .b-green { background: #14331f; color: #86efac; }
  .b-red { background: #3b1717; color: #fca5a5; }
  .b-amber { background: #3a2a10; color: #fcd34d; }
  .b-blue { background: #1e293b; color: #93c5fd; }
}

/* =========================================================================
   ランディングページ + サインアップ導線
   色は既存のトークン(--bg/--surface/--text ...)のみを使う。
   ダークモードは上の :root 上書きに自動追従するため、個別指定は最小限。
   ========================================================================= */

.lp { min-height: 100vh; background: var(--bg); }

/* --- ナビ --- */
.lp-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.lp-nav-inner { max-width: 1080px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lp-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--text); }
.lp-brand-badge { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.lp-nav-links { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.lp-nav-links a { color: var(--muted); }
.lp-nav-links a:hover { color: var(--text); }
.lp-nav-login { padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; color: var(--text) !important; }
.lp-nav-login:hover { border-color: var(--primary); color: var(--primary) !important; }

/* --- ヒーロー --- */
.lp-hero { max-width: 1080px; margin: 0 auto; padding: 72px 20px 56px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.lp-eyebrow { margin: 0 0 14px; font-size: 12px; letter-spacing: .14em; color: var(--primary); font-weight: 700; }
.lp-hero h1 { margin: 0; font-size: 42px; line-height: 1.25; letter-spacing: -.02em; }
.lp-lead { margin: 18px 0 0; font-size: 15px; color: var(--muted); max-width: 30em; }
.lp-cta-row { margin-top: 30px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lp-cta { display: inline-block; padding: 14px 30px; background: var(--primary); color: var(--primary-fg);
  border-radius: 999px; font-weight: 700; font-size: 15px; box-shadow: 0 6px 18px rgba(37,99,235,.28);
  transition: transform .12s ease, box-shadow .12s ease; }
.lp-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(37,99,235,.34); }
.lp-cta:active { transform: translateY(0); }
.lp-cta-sub { font-size: 14px; color: var(--muted); }
.lp-cta-sub:hover { color: var(--primary); }
.lp-cta-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

/* ヒーロー右側のダッシュボード風イラスト(装飾) */
.lp-window { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.10); overflow: hidden; }
.lp-window-bar { display: flex; gap: 6px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.lp-window-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.lp-window-body { padding: 8px; }
.lp-wrow { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px; font-size: 13px; }
.lp-wrow + .lp-wrow { border-top: 1px solid var(--border); }
.lp-wicon { width: 22px; text-align: center; }
.lp-wtext { flex: 1; color: var(--text); }
.lp-wtag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.lp-wtag-ok { background: var(--primary-soft); color: var(--primary); }

/* --- セクション共通 --- */
.lp-section { max-width: 1080px; margin: 0 auto; padding: 64px 20px; }
.lp-section-alt { max-width: none; background: var(--surface); border-block: 1px solid var(--border); }
.lp-section-alt > * { max-width: 1080px; margin-inline: auto; }
.lp-h2 { margin: 0; font-size: 27px; text-align: center; letter-spacing: -.01em; }
.lp-sub { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 14px; }

/* --- 特長カード --- */
.lp-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease; }
.lp-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.lp-card-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.lp-card h3 { margin: 0 0 8px; font-size: 15px; }
.lp-card p { margin: 0; font-size: 13px; color: var(--muted); }

/* --- ステップ --- */
.lp-steps { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-step { text-align: center; padding: 8px; }
.lp-step-no { width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--primary); color: var(--primary-fg); font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.lp-step h3 { margin: 0 0 8px; font-size: 15px; }
.lp-step p { margin: 0; font-size: 13px; color: var(--muted); }
.lp-mid-cta { margin-top: 40px; text-align: center; }

/* --- FAQ --- */
.lp-faq { margin-top: 32px; max-width: 720px; margin-inline: auto; }
.lp-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 12px; }
.lp-faq summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; position: relative; padding-right: 26px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '+'; position: absolute; right: 2px; top: -2px; font-size: 19px; color: var(--muted); }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq p { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.lp-faq code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: 12px; }

/* --- フッタ --- */
.lp-foot { background: var(--surface); border-top: 1px solid var(--border); padding: 36px 20px; }
.lp-foot-inner { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lp-foot-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.lp-foot-links a { color: var(--muted); }
.lp-foot-links a:hover { color: var(--primary); }
.lp-copy { margin: 0; font-size: 12px; color: var(--muted); }

/* --- サインアップ(方法選択 / コード入力) --- */
.signup-social { display: flex; flex-direction: column; gap: 10px; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 16px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.btn-social:hover { border-color: var(--primary); background: var(--surface-2); }
.btn-social-icon { display: inline-flex; }
.signup-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.signup-or::before, .signup-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.field-hint { margin: 6px 0 0; font-size: 11px; color: var(--muted); }

/* メール設定情報(ラベル / 値 / 表示・コピー操作)。値が長い環境でも折り返す。 */
.mail-detail { padding: 0 0 12px; }
.kv { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.kv-row { display: flex; align-items: center; gap: 10px; }
.kv-k { flex: 0 0 120px; font-size: 12px; color: var(--muted); }
.kv-v { flex: 1 1 auto; font-size: 13px; word-break: break-all; }
.kv-acts { flex: 0 0 auto; display: flex; gap: 2px; }
.signup-terms { margin: 16px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
/* honeypot: 見えないが display:none にしない(bot に検知されにくくするため) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.verify-lead { font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 22px; line-height: 1.8; }
.verify-lead b { color: var(--text); }
.code-input { width: 100%; padding: 14px; text-align: center; font-size: 26px; font-weight: 700;
  letter-spacing: .42em; text-indent: .42em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.verify-actions { margin-top: 16px; text-align: center; font-size: 12px; }
.btn-link { background: none; border: none; color: var(--muted); font-size: 12px; padding: 4px; text-decoration: underline; }
.btn-link:hover { color: var(--primary); }
.btn-link:disabled { opacity: .5; cursor: default; text-decoration: none; }
.verify-note { margin: 18px 0 0; font-size: 11px; color: var(--muted); text-align: center; }

/* --- レスポンシブ --- */
@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; padding: 48px 20px 40px; gap: 36px; }
  .lp-hero h1 { font-size: 32px; }
  .lp-br { display: none; }
  .lp-grid, .lp-steps { grid-template-columns: 1fr; }
  .lp-nav-links { gap: 14px; font-size: 12px; }
  .lp-nav-links a:not(.lp-nav-login) { display: none; }
  .lp-h2 { font-size: 22px; }
  .lp-section { padding: 48px 20px; }
}

@media (prefers-color-scheme: dark) {
  .lp-window { box-shadow: 0 18px 40px rgba(0,0,0,.4); }
  .lp-cta { box-shadow: 0 6px 18px rgba(37,99,235,.18); }
}

/* --- ドメイン追加(サブドメイン / 持ち込みの選択) --- */
.choice { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.choice-item { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px;
  border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.choice-item:hover { border-color: var(--primary); }
.choice-item:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice-item:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.choice-item input { margin-top: 3px; flex: none; }
.choice-title { font-weight: 600; font-size: 14px; }
.choice-note { font-size: 12px; color: var(--muted); margin-top: 3px; }
/* 「名前 + .sugosaba.com」を1つの入力に見せる */
.sub-input { display: flex; align-items: stretch; }
.sub-input input { flex: 1; border-radius: 8px 0 0 8px; border-right: none; padding: 9px 11px; min-width: 0; }
.sub-suffix { display: flex; align-items: center; padding: 0 12px; font-size: 13px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border); border-left: none; border-radius: 0 8px 8px 0; white-space: nowrap; }

/* --- ソーシャルログイン: 未設定(準備中)の表示 --- */
/* 鍵が未設定でもボタン自体は出し、「対応予定がある」ことを伝える。
   押せないことが見た目で分かるよう淡色 + カーソル既定にする。 */
.btn-social.is-disabled { opacity: .5; cursor: default; }
.btn-social.is-disabled:hover { border-color: var(--border); background: var(--surface); }
.btn-social-tag { margin-left: auto; font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); white-space: nowrap; }
/* 6件並ぶため、選択画面のボタン間隔を少し詰める */
.signup-social { gap: 8px; }
.signup-social .btn-social { padding: 9px 14px; }

/* --- ログイン画面: パスワード再設定への導線 --- */
/* login-foot(問い合わせ・ポリシー)とは役割が違うので別枠にする。
   フォーム直下・パスキーボタンの上に置く。 */
.login-links { margin-top: 14px; text-align: center; font-size: 12px; }
.login-links a { color: var(--muted); }
.login-links a:hover { color: var(--primary); text-decoration: underline; }

/* ログイン画面のパスキーボタンはログインボタンと同じ幅に揃える
   (signup 画面の btn-social は縦積みで幅いっぱいなので指定不要) */
#passkeyBox .btn-social { width: 100%; }

/* --- パスキー(プロフィール画面の一覧) --- */
.pk-list { display: flex; flex-direction: column; gap: 8px; }
.pk-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.pk-icon { font-size: 18px; line-height: 1; }
/* 名前が長くても操作ボタンを押し出さない */
.pk-body { flex: 1; min-width: 0; }
.pk-label { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-meta { font-size: 11px; margin-top: 2px; }

/* ============ 料金プラン(#/billing) ============ */

/* 現在の使用量。上限に近づくとバーの色が変わる(色は JS 側で決める)。 */
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 20px; }
.usage-row { min-width: 0; }
.usage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; margin-bottom: 5px; }
.usage-bar { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.usage-bar i { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }

/* 注意書き。tone は amber(要対応) / red(停止) / primary(告知) / muted。 */
.notice { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.notice.amber { background: rgba(217, 119, 6, .08); border-color: rgba(217, 119, 6, .3); color: var(--amber); }
.notice.red { background: rgba(220, 38, 38, .07); border-color: rgba(220, 38, 38, .28); color: var(--red-text); }
.notice.primary { background: var(--primary-soft); border-color: rgba(37, 99, 235, .25); }
.notice.muted { background: var(--surface-2); color: var(--muted); }

/* 料金表。狭い画面では 1 列に落ちる。 */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: stretch; }
.plan-card { position: relative; padding: 18px 16px; display: flex; flex-direction: column; }
/* 契約中のプランは枠で示す(バッジと二重に伝える) */
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset, var(--shadow); }
.plan-badge { position: absolute; top: -9px; left: 16px; background: var(--primary); color: var(--primary-fg);
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.plan-name { font-size: 17px; font-weight: 700; }
.plan-price { line-height: 1.35; }
.plan-price b { font-size: 22px; }
.plan-price s { font-size: 13px; margin-right: 4px; }
.plan-price + .plan-price { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }

.plan-feats { list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; flex: 1; }
.plan-feats li { padding: 4px 0 4px 20px; position: relative; }
.plan-feats li::before { content: '✓'; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
/* 使えない機能は打ち消して見せる(項目自体は残し、プラン間の比較をしやすくする) */
.plan-feats li.off { color: var(--muted); text-decoration: line-through; }
.plan-feats li.off::before { content: '×'; color: var(--muted); font-weight: 400; }

.plan-actions { margin-top: auto; }
.sel.sm { font-size: 13px; padding: 6px 8px; }

/* =============================================================================
   運営管理画面(admin.sugosaba.com)
   テナント向け画面と同じトークンを使う。ここだけの部品は admin- 接頭辞。
   ============================================================================= */

/* --- モーダル --- */
/* 画面全体を覆う。中身が縦に長くなってもスクロールできるよう、
   オーバーレイ側で overflow-y を持たせ、カードは max-height で切る。 */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 18, 22, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto; z-index: 100; }
.modal { width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 12px 32px rgba(0,0,0,.22); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-head .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--border); }
.modal-foot .right { margin-left: auto; }
/* 押せない主ボタンは色も落とす。共有の .btn:disabled は opacity だけなので、
   濃い青のまま薄くなり「押せそう」に見えてしまう。 */
.modal-foot .btn:disabled { background: var(--surface-2); border-color: var(--border); color: var(--muted); opacity: 1; }
/* 閉じる(×)。見出しの右端に置く。 */
.modal-close { border: none; background: transparent; color: var(--muted); font-size: 20px;
  line-height: 1; padding: 4px 6px; border-radius: 6px; margin-left: auto; }
.modal-close:hover { background: var(--surface-2); color: var(--text); }

/* --- 有効/無効スイッチ --- */
/* チェックボックスを隠してトラックを描く。キーボード操作は素の input が担うので、
   :focus-visible の輪郭はトラック側に出す。 */
.switch { position: relative; display: inline-flex; align-items: center; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { width: 40px; height: 22px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); transition: background .18s ease, border-color .18s ease; }
.switch .track::after { content: ''; display: block; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transform: translate(3px, 2px); transition: transform .18s ease; }
.switch input:checked + .track { background: var(--green); border-color: var(--green); }
.switch input:checked + .track::after { transform: translate(21px, 2px); }
.switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .track { opacity: .5; }

/* --- アカウント一覧 --- */
/* 列が多いので横スクロールを許す(ページ全体は横に伸ばさない)。 */
.admin-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 940px; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.admin-table td { font-size: 13px; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--surface-2); }
/* 数値列は右寄せにして桁を比べやすくする。 */
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* 凍結中の行。行全体を淡くして一覧の中で沈ませる。 */
.admin-table tr.is-suspended td { opacity: .55; }

/* テナント識別子(sgaXXXX)と主ドメイン */
.admin-id { font-weight: 600; }
.admin-domain { color: var(--muted); font-size: 12px; }

/* ディスク使用率。バーは幅が狭いので数値と併記する。 */
.disk-cell { min-width: 116px; }
.disk-val { font-size: 12px; font-variant-numeric: tabular-nums; }
.disk-bar { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.disk-bar i { display: block; height: 100%; border-radius: 999px; }

/* 絞り込みツールバー */
.admin-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.admin-filters input[type=search] { flex: 1; min-width: 200px; padding: 8px 11px; }
.admin-filters select { padding: 8px 11px; }

/* 集計カード(アカウント数など) */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-stat { padding: 14px 16px; }
.admin-stat .k { color: var(--muted); font-size: 12px; }
.admin-stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* プラン変更モーダルの選択肢 */
.plan-opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.plan-opt:hover { background: var(--surface-2); }
.plan-opt.selected { border-color: var(--primary); background: var(--primary-soft); }
/* 上限を割るため選べないプラン。押せないことが一目で分かるよう、
   背景を落として枠線を破線にする(理由は .why に別行で出す)。 */
.plan-opt.blocked { cursor: not-allowed; background: var(--surface-2); border-style: dashed; }
.plan-opt.blocked:hover { background: var(--surface-2); }
/* 打ち消すのはプラン名と上限だけ。理由(.why)は読ませたいので薄くしない。 */
.plan-opt.blocked .name, .plan-opt.blocked .lim { opacity: .55; }
.plan-opt input { margin-top: 3px; flex: none; }
.plan-opt .grow { flex: 1; min-width: 0; }
.plan-opt .name { font-weight: 600; }
.plan-opt .lim { color: var(--muted); font-size: 12px; margin-top: 2px; }
.plan-opt .why { color: var(--red-text); font-size: 12px; margin-top: 6px; line-height: 1.5; }
