/* ============================================================
   請求書システム — うちの共通デザイン（A群）
   型と質＝白基調 / 影なし・1pxヘアライン / 角丸控えめ(6-8px) /
   数字はタブラー右揃え / mono微ラベル / 状態網羅 / a11y
   ※アクセント1色だけを下の「ACCENT」ブロックで差し替え可能。
   ============================================================ */

/* ---- 共通トークン（全A群で固定＝家族の顔） ---- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #eef1f6;

  --ink: #17212e;      /* 主インク（見出し・重要数値） */
  --ink-2: #3f4b5c;    /* 本文 */
  --ink-3: #697485;    /* 補助（対白 4.6:1） */
  --ink-4: #8b95a3;    /* 最弱・アイコン等（非本文のみ） */

  --line: #e3e7ee;     /* ヘアライン主役 */
  --line-2: #eef1f6;   /* さらに淡い仕切り */

  /* 状態色（表示専用・装飾に使わない） */
  --pos: #166f4e;  --pos-soft: #e7f4ee;  --pos-border: #c4e6d4;
  --neg: #b3382f;  --neg-soft: #fbeceb;  --neg-border: #f2cfcc;
  --warn: #986a12; --warn-soft: #fbf1df; --warn-border: #eeddb6;
  --info: #2160b8; --info-soft: #e9f1fb; --info-border: #cfe0f6;

  --radius: 8px;       /* カード・入力 */
  --radius-sm: 6px;    /* ボタン */
  --radius-pill: 2px;  /* バッジ・タグ */
  --border: 1px;
  /* 面には影を使わない。オーバーレイ（モーダル/フラッシュ）だけ */
  --shadow-overlay: 0 20px 48px -16px rgba(23,33,46,.22);

  --sidebar-w: 240px;

  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-head: var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Courier New", monospace;
}

/* ============================================================
   ACCENT（このアプリの中身に合う1色／ここだけ差し替え）
   案A：藍（濃紺ブルー）＝信頼・端正・「書類のインク」【採用】
   ============================================================ */
:root {
  --accent:        #1f4fb8;
  --accent-strong: #17408f;   /* hover / active 文字 */
  --accent-ink:    #ffffff;
  --accent-soft:   #eef3fc;
  --accent-soft-2: #e0e9f8;
  --accent-border: #ccdcf4;
  --accent-ring:   rgba(31,79,184,.20);
}

/* ---- リセット・地 ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink-2);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 800; color: var(--ink); letter-spacing: .01em; }
:where(a, button, .btn, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* mono微ラベル（うちの共通デザインの署名） */
.mono-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------------- レイアウト ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 30;
}
.sidebar .brand {
  padding: 20px 20px 16px;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--line-2);
}
.sidebar .brand .mark {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px;
}
.sidebar .brand .name { font-weight: 800; font-size: 15px; letter-spacing: .01em; color: var(--ink); }
.sidebar .brand .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

.nav { padding: 8px 12px; overflow-y: auto; flex: 1; }
.nav .group-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--ink-4);
  letter-spacing: .12em; text-transform: uppercase; padding: 16px 10px 6px;
}
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 600; font-size: 13.5px;
  margin-bottom: 1px; transition: background .13s ease, color .13s ease;
}
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink-4); transition: color .13s ease; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a:hover svg { color: var(--ink-3); }
.nav a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.nav a.active svg { color: var(--accent); }
.nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}

.sidebar .foot {
  padding: 13px 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.sidebar .foot > span { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.sidebar .foot strong { color: var(--ink); font-weight: 700; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .foot a { color: var(--ink-3); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.sidebar .foot a:hover { color: var(--accent); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
  height: 64px; background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 19px; }
.topbar .crumb { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.content { padding: 26px 28px 64px; max-width: 1200px; }

/* ---------------- ボタン ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; min-height: 40px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 700; font-size: 13.5px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background .13s ease, border-color .13s ease, color .13s ease, transform .13s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-3); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { color: var(--neg); border-color: var(--line); }
.btn.danger:hover { background: var(--neg-soft); border-color: var(--neg-border); }
.btn.sm { min-height: 32px; padding: 6px 12px; font-size: 12.5px; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent; }
.btn.loading::after {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; color: var(--accent-ink);
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- カード ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.card .card-head {
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card .card-head h2 { font-size: 14.5px; font-weight: 700; }
.card .card-body { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* 統計タイル（mono微ラベル＋巨大tnum） */
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
  transition: border-color .13s ease;
}
a.stat:hover { border-color: var(--ink-4); }
.stat .label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .06em; display: flex; align-items: center; gap: 9px;
}
.stat .label .ico { width: 28px; height: 28px; border-radius: var(--radius-sm); display: grid; place-items: center; flex-shrink: 0; }
.stat .ico svg { width: 15px; height: 15px; }
.stat .value {
  font-size: 28px; font-weight: 800; color: var(--ink); margin-top: 11px;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.stat .meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.ico.i-accent { background: var(--accent-soft); color: var(--accent); }
.ico.i-green  { background: var(--pos-soft);  color: var(--pos); }
.ico.i-amber  { background: var(--warn-soft); color: var(--warn); }
.ico.i-blue   { background: var(--info-soft); color: var(--info); }
.ico.i-red    { background: var(--neg-soft);  color: var(--neg); }

/* ---------------- テーブル ---------------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
table.list td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
table.list tr:last-child td { border-bottom: none; }
table.list tbody tr { transition: background .1s ease; }
table.list tbody tr:hover { background: var(--surface-2); }
table.list .num { text-align: right; font-variant-numeric: tabular-nums; }
table.list .strong { font-weight: 700; color: var(--ink); }

/* ---------------- バッジ／ピル ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .02em;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line);
}
.badge.gray  { background: var(--surface-2); color: var(--ink-3);  border-color: var(--line); }
.badge.blue  { background: var(--info-soft); color: var(--info);   border-color: var(--info-border); }
.badge.green { background: var(--pos-soft);  color: var(--pos);    border-color: var(--pos-border); }
.badge.amber { background: var(--warn-soft); color: var(--warn);   border-color: var(--warn-border); }
.badge.red   { background: var(--neg-soft);  color: var(--neg);    border-color: var(--neg-border); }
.badge.indigo{ background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-border); }
/* 書類種別ピルは中立インク（アクセントを行ごとに撒かない＝アクセントは操作に温存） */
.badge.type-pill {
  background: var(--surface-2); color: var(--ink); border-color: var(--line);
  font-family: var(--font-body); font-weight: 700; letter-spacing: .01em;
}

/* ---------------- フォーム ---------------- */
.form-grid { display: grid; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
label.lab { font-size: 12.5px; font-weight: 700; color: var(--ink); }
label.lab .opt { color: var(--ink-4); font-weight: 600; font-size: 11.5px; margin-left: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); font-size: 13.5px; font-family: var(--font-body);
  color: var(--ink); transition: border-color .13s ease, box-shadow .13s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-4); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
textarea { resize: vertical; min-height: 72px; line-height: 1.6; }
.hint { font-size: 11.5px; color: var(--ink-3); }
.inline-row { display: flex; gap: 10px; align-items: center; }

/* ---------------- 明細エディタ ---------------- */
.lines { width: 100%; border-collapse: collapse; }
.lines th { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-align: left; padding: 8px; }
.lines td { padding: 5px 6px; vertical-align: middle; }
.lines td input, .lines td select { padding: 8px 9px; }
.lines .col-amt { text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines .drag { color: var(--ink-4); cursor: grab; text-align: center; width: 22px; }
.lines .del { width: 34px; text-align: center; }
.lines .del button { border: none; background: none; color: var(--ink-4); cursor: pointer; padding: 6px; border-radius: var(--radius-sm); transition: background .12s, color .12s; }
.lines .del button:hover { background: var(--neg-soft); color: var(--neg); }

.totals-box { margin-left: auto; width: 320px; }
.totals-box .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; color: var(--ink-2); }
.totals-box .row.sub { color: var(--ink-3); }
.totals-box .row.total {
  border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 12px;
  font-size: 20px; font-weight: 800; color: var(--ink);
}
.totals-box .row .val { font-variant-numeric: tabular-nums; }

/* ---------------- フラッシュ（オーバーレイ＝影OK） ---------------- */
.flash-wrap { position: fixed; top: 16px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 11px 16px; border-radius: var(--radius); box-shadow: var(--shadow-overlay);
  font-size: 13.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); display: flex; align-items: center; gap: 9px; animation: slidein .28s cubic-bezier(.2,0,0,1);
}
.flash.ok { border-left: 3px solid var(--pos); }
.flash.error { border-left: 3px solid var(--neg); }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------------- 空状態 ---------------- */
.empty { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty .big { font-size: 16px; font-weight: 700; color: var(--ink); margin: 12px 0 4px; }
.empty p { margin: 0 auto; max-width: 42ch; }
.empty svg { width: 44px; height: 44px; color: var(--ink-4); }

/* ---------------- 認証ページ ---------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--surface-2); padding: 24px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-overlay); padding: 32px 30px;
}
.auth-card .mark {
  width: 44px; height: 44px; border-radius: var(--radius); margin: 0 auto 16px;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  font-weight: 800; font-size: 21px;
}
.auth-card h1 { text-align: center; font-size: 20px; }
.auth-card .lead { text-align: center; color: var(--ink-3); font-size: 13px; margin: 6px 0 22px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .btn { width: 100%; padding: 11px; }

/* ---------------- 細かな部品 ---------------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters .search { position: relative; flex: 1; max-width: 320px; }
.filters .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-4); }
.filters .search input { padding-left: 34px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg a { padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--ink-3); border-right: 1px solid var(--line); transition: background .12s, color .12s; }
.seg a:last-child { border-right: none; }
.seg a:hover { background: var(--surface-2); color: var(--ink); }
.seg a.active { background: var(--accent-soft); color: var(--accent-strong); }
.page-actions { display: flex; gap: 10px; }
.section-title { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 12px; }
.divider { height: 1px; background: var(--line); margin: 22px 0; border: none; }
.img-prev { max-height: 70px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; background: var(--surface-2); }

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-overlay); }
  .main { margin-left: 0; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: span 1; }
  .menu-toggle { display: inline-flex !important; }
  .totals-box { width: 100%; }
}
.menu-toggle { display: none; }

/* ---------------- モーション配慮 ---------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============================================================
   課金・料金・規約ページ（SaaS化・2026-08-02追加）
   すべて既存トークンのみ。ワンオフ値ゼロ。藍アクセント・白基調・1pxライン・角丸控えめ。
   ============================================================ */

/* 追加ボタン形（既存 .btn を拡張） */
.btn.lg { min-height: 46px; padding: 12px 24px; font-size: 14.5px; }
.btn.block { width: 100%; justify-content: center; }

/* ---- 公開ページ共通シェル ---- */
.pub { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.pub-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; width: 100%; }
.pub-head { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.pub-head .pub-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.pub-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; }
.pub-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px; }
.pub-brand-name { font-size: 15px; letter-spacing: .01em; }
.pub-nav { display: flex; align-items: center; gap: 20px; }
.pub-nav a { color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.pub-nav a:hover { color: var(--ink); }
.pub-nav a.on { color: var(--accent-strong); }
.pub-nav a.btn { color: var(--accent-ink); }
.pub-main { flex: 1; }
.pub-foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 64px; }
.pub-foot .pub-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; flex-wrap: wrap; }
.pub-foot-brand { font-size: 12.5px; color: var(--ink-3); }
.pub-foot-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.pub-foot-nav a { font-size: 12.5px; color: var(--ink-3); }
.pub-foot-nav a:hover { color: var(--ink); }

/* ---- 汎用セクション ---- */
.pub-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; width: 100%; }
.pub-section { padding: 56px 0; }
.pub-section-alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ttl { font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 24px; }

/* ---- ヒーロー ---- */
.pub-hero { padding: 72px 0 8px; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-strong); margin-bottom: 14px; }
.pub-hero h1 { font-size: 40px; line-height: 1.18; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.pub-lead { max-width: 62ch; margin: 18px 0 0; font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.pub-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.pub-fineprint { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
.pub-cta-foot { margin-top: 28px; }

/* ---- 料金カード ---- */
.price-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.price-card { border-color: var(--accent-border); }
.price-name { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); }
.price-amount { margin: 10px 0 6px; display: flex; align-items: baseline; gap: 4px; color: var(--ink);
  font-variant-numeric: tabular-nums; }
.price-cur { font-size: 22px; font-weight: 700; }
.price-num { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.price-unit { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.price-trial { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.price-trial-note { font-size: 12.5px; color: var(--ink-3); }
.check-list { list-style: none; margin: 16px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 3px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--pos-soft);
  /* チェックの線（背景SVGでなくborderで軽量に描く） */ }
.check-list li::after { content: ""; position: absolute; left: 6px; top: 6.5px; width: 4px; height: 7px;
  border: solid var(--pos); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---- 支払い方法 ---- */
.pay-methods { display: flex; flex-direction: column; gap: 24px; }
.pay-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.pay-row + .pay-row { border-top: 1px solid var(--line); }
.pay-ic { flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); }
.pay-ic svg { width: 20px; height: 20px; }
.pay-ttl { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.pay-desc { font-size: 13px; line-height: 1.6; color: var(--ink-2); }

/* ---- FAQ ---- */
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 32px; }
.faq-item { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.faq-q { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.faq-a { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }

/* ---- 規約・法務ドキュメント ---- */
.doc { max-width: 760px; margin: 0 auto; }
.doc-ttl { font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.doc-lead { font-size: 14.5px; line-height: 1.8; color: var(--ink-2); margin-bottom: 8px; }
.doc h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 28px 0 8px; }
.doc p { font-size: 14px; line-height: 1.9; color: var(--ink-2); margin: 6px 0; }
.doc ul { margin: 6px 0; padding-left: 20px; }
.doc li { font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.doc-meta { font-size: 12px; color: var(--ink-3); margin-top: 24px; }
.doc-table-body { padding: 4px 4px; }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.7; }
.doc-table th { width: 34%; font-weight: 700; color: var(--ink); background: var(--surface-2); white-space: nowrap; }
.doc-table td { color: var(--ink-2); }
.doc-table tr:last-child th, .doc-table tr:last-child td { border-bottom: none; }
.doc-back { margin-top: 32px; }
.doc-back a { font-size: 13.5px; color: var(--accent-strong); font-weight: 600; }

/* ---- 課金画面（ログイン中） ---- */
.bill-wrap { max-width: 760px; }
.bill-lead { font-size: 15px; line-height: 1.7; color: var(--ink); margin: 0; }
.bill-lead .num { font-variant-numeric: tabular-nums; }
.bill-note { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }
.bill-price { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.bill-price-label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bill-price-amount { color: var(--ink); font-variant-numeric: tabular-nums; }
.bill-price-amount .cur { font-size: 15px; font-weight: 700; }
.bill-price-amount .num { font-size: 24px; font-weight: 800; }
.bill-price-amount .unit { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.bill-options { margin-top: 20px; }
.bill-fineprint { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }
.bill-warn { font-size: 12.5px; line-height: 1.6; color: var(--neg); background: var(--neg-soft); border: 1px solid var(--neg-border); border-radius: var(--radius-sm); padding: 8px 10px; margin: 0 0 12px; }
.bill-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; cursor: pointer; }
.bill-check input { margin-top: 3px; }
.bank-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 14px; }
.bank-box-ttl { font-weight: 700; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.bank-table { width: 100%; border-collapse: collapse; }
.bank-table th, .bank-table td { text-align: left; padding: 6px 8px; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.bank-table th { width: 40%; color: var(--ink-3); font-weight: 600; }
.bank-table td { color: var(--ink); }
.bank-table td.num { font-variant-numeric: tabular-nums; }
.bank-table tr:last-child th, .bank-table tr:last-child td { border-bottom: none; }
.bill-links { margin-top: 24px; font-size: 12.5px; color: var(--ink-3); }
.bill-links a { color: var(--ink-3); }
.bill-links a:hover { color: var(--ink); }
.bill-links .sep { margin: 0 8px; color: var(--ink-4); }

@media (max-width: 820px) {
  .price-layout { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .pub-hero h1 { font-size: 30px; }
  .pub-hero { padding: 48px 0 4px; }
  .pub-section { padding: 40px 0; }
}
@media (max-width: 480px) {
  .pub-nav { gap: 12px; }
  .pub-brand-name { display: none; }
}

/* ---- 運営画面：課金操作行 ---- */
.op-controls-row td { background: var(--surface-2); padding-top: 8px; padding-bottom: 8px; }
.op-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-controls-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
