/* 認証・アカウント・料金ページ共通スタイル（アプリ本体とは独立の軽量版） */
:root {
  --ap-bg: #eef1fb;
  --ap-card: rgba(255, 255, 255, 0.85);
  --ap-ink: #1e2233;
  --ap-muted: #6b7088;
  --ap-accent: #4f46e5;
  --ap-accent-d: #4338ca;
  --ap-border: #d9ddf0;
  --ap-danger: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--ap-ink);
  background:
    radial-gradient(1000px 500px at 10% -10%, #dfe4ff 0, transparent 60%),
    radial-gradient(900px 500px at 110% 10%, #e7e0ff 0, transparent 55%),
    var(--ap-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ap-card {
  width: 100%;
  max-width: 420px;
  background: var(--ap-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--ap-border);
  border-radius: 18px;
  box-shadow: 0 18px 50px -20px rgba(60, 70, 160, 0.45);
  padding: 32px 28px;
}
.ap-card.wide { max-width: 560px; }
.ap-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 20px; margin-bottom: 4px;
}
.ap-brand svg { width: 26px; height: 26px; stroke: var(--ap-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ap-brand circle { fill: var(--ap-accent); stroke: none; }
h1.ap-title { font-size: 22px; margin: 14px 0 4px; }
.ap-sub { color: var(--ap-muted); font-size: 14px; margin: 0 0 22px; }
label.ap-label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input.ap-input {
  width: 100%; padding: 11px 13px; font-size: 15px;
  border: 1px solid var(--ap-border); border-radius: 10px; background: #fff; color: var(--ap-ink);
}
input.ap-input:focus { outline: none; border-color: var(--ap-accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); }
button.ap-btn, a.ap-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 20px; padding: 12px; font-size: 15px; font-weight: 700;
  border: none; border-radius: 10px; cursor: pointer; text-decoration: none;
  background: var(--ap-accent); color: #fff; transition: background .15s;
}
button.ap-btn:hover, a.ap-btn:hover { background: var(--ap-accent-d); }
button.ap-btn:disabled { opacity: .6; cursor: default; }
.ap-btn.ghost { background: transparent; color: var(--ap-accent); border: 1px solid var(--ap-border); }
.ap-btn.ghost:hover { background: rgba(79,70,229,.06); }
.ap-btn.danger { background: transparent; color: var(--ap-danger); border: 1px solid #f0c9c9; }
/* ソーシャルログイン（Google で続ける）。既定は非表示、有効時のみ .ap-google-on で表示 */
.ap-or { display: none; align-items: center; gap: 12px; margin: 18px 0 4px; color: var(--ap-muted); font-size: 12px; }
.ap-or::before, .ap-or::after { content: ""; flex: 1; height: 1px; background: var(--ap-border); }
a.ap-btn-google {
  display: none; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px; padding: 11px; font-size: 15px; font-weight: 700;
  border: 1px solid var(--ap-border); border-radius: 10px; cursor: pointer;
  text-decoration: none; background: #fff; color: #3c4043; transition: background .15s, box-shadow .15s;
}
a.ap-btn-google:hover { background: #f7f8fa; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
a.ap-btn-google svg { width: 18px; height: 18px; flex: none; }
.ap-google-on .ap-or, .ap-google-on a.ap-btn-google { display: flex; }

.ap-foot { margin-top: 20px; font-size: 13px; color: var(--ap-muted); text-align: center; }
.ap-foot a { color: var(--ap-accent); font-weight: 600; }
.ap-msg { margin-top: 16px; padding: 11px 13px; border-radius: 10px; font-size: 14px; display: none; }
.ap-msg.err { display: block; background: #fde8e8; color: #a11; border: 1px solid #f3c2c2; }
.ap-msg.ok { display: block; background: #e6f6ec; color: #176b34; border: 1px solid #bfe6cd; }
.ap-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ap-border); }
.ap-row:last-child { border-bottom: none; }
.ap-row .k { color: var(--ap-muted); font-size: 13px; }
.ap-row .v { font-weight: 700; }
.ap-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ap-badge.free { background: #eceefb; color: #555; }
.ap-badge.pro { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.ap-plan { border: 1px solid var(--ap-border); border-radius: 14px; padding: 20px; background: #fff; }
.ap-plan.featured { border-color: var(--ap-accent); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.ap-plan h3 { margin: 0 0 4px; }
.ap-price { font-size: 28px; font-weight: 800; }
.ap-price small { font-size: 13px; color: var(--ap-muted); font-weight: 500; }
.ap-list { list-style: none; padding: 0; margin: 14px 0; font-size: 14px; }
.ap-list li { padding: 5px 0 5px 24px; position: relative; }
.ap-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ap-accent); font-weight: 800; }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .ap-grid { grid-template-columns: 1fr; } }

/* ===== 法務・長文ページ ===== */
body.ap-doc { display: block; padding: 0; }
.ap-doc-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.ap-doc-wrap .ap-brand { font-size: 18px; margin-bottom: 22px; }
.ap-doc-wrap .ap-brand a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.ap-doc h1 { font-size: 24px; margin: 0 0 6px; }
.ap-updated { color: var(--ap-muted); font-size: 13px; margin: 0 0 28px; }
.ap-sec { padding: 18px 0; border-bottom: 1px solid var(--ap-border); }
.ap-sec:last-child { border-bottom: none; }
.ap-sec h2 { font-size: 16px; margin: 0 0 8px; }
.ap-sec h3 { font-size: 14px; margin: 12px 0 4px; color: var(--ap-muted); }
.ap-sec p { font-size: 14px; line-height: 1.8; margin: 6px 0; }
.ap-sec ul, .ap-sec ol { font-size: 14px; line-height: 1.8; margin: 8px 0; padding-left: 22px; }
.ap-sec li { margin: 3px 0; }
.ap-sec a { color: var(--ap-accent); }
.ap-doc-foot { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--ap-border); font-size: 13px; color: var(--ap-muted); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ap-doc-foot a { color: var(--ap-accent); font-weight: 600; text-decoration: none; }
.ap-doc-foot a:hover { text-decoration: underline; }
.ap-card-box { border: 1px solid var(--ap-border); border-radius: 12px; padding: 18px 20px; background: #fff; margin: 12px 0; }
.ap-card-box h2 { margin: 0 0 8px; font-size: 15px; }
