:root {
  --bg: #faf7f1;          /* クリーム（落ち着いた暖色ニュートラル） */
  --surface: #fffdf9;     /* ほんのり暖かい白 */
  --surface-2: #f3eee4;   /* 生成り（インプット地・淡グレージュ） */
  --text: #2b2620;        /* 深いウォームチャコール＝引き締め */
  --muted: #8a7f70;       /* 木のようなトープグレー */
  --border: #ebe3d5;      /* やわらかな暖色の境界線 */
  --accent: #a8875a;      /* ミルクティー（やわらかいタン） */
  --accent-2: #816441;    /* 濃いめミルクティー（見出し・強調） */
  --accent-soft: #f4eee0; /* ミルキーなサンド */
  --accent-grad: linear-gradient(135deg, #bd9d6c 0%, #9c7d4c 100%); /* ボタン用（ミルクティー） */
  --ok: #2f9e6b;
  --ok-soft: #e6f6ee;
  --err: #c65f52;         /* 暖色テラコッタ（エラーも馴染む） */
  --err-soft: #f8ebe6;
  --money: #b8791b;
  --money-soft: #fcf3e3;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(74,54,28,.05), 0 8px 24px rgba(74,54,28,.07);
  --shadow-lg: 0 2px 6px rgba(74,54,28,.06), 0 20px 46px rgba(74,54,28,.11);
}

* { box-sizing: border-box; }
/* タップ→移動のもたつき（iOSのダブルタップ判定 約300ms待ち）を無くす */
a, button, summary, label, [role="button"], .tabitem, .drawer-nav a { touch-action: manipulation; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: .003em;
}

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

/* ---------- Topbar ---------- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner {
  max-width: 900px; margin: 0 auto;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { font-size: 18px; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -.02em; display: flex; align-items: center; }
.logo-img { height: 30px; width: auto; display: block; }
@media (max-width: 480px) { .logo-img { height: 26px; } }
.nav { display: flex; align-items: center; gap: 12px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--text); }
.nav-email { color: var(--muted); font-size: 13px; }

.plan-badge {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.plan-ad_free { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.plan-custom  { background: #eafaf1; color: var(--ok); border-color: transparent; }
.plan-badge-img { height: 40px; width: auto; display: block; }
@media (max-width: 480px) { .plan-badge-img { height: 36px; } }
.mypage-plan-badge { height: 40px; }

/* ---------- Layout ---------- */
.wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px 120px; }

/* ---------- Site footer (法定・ヘルプリンク) ---------- */
.site-footer { margin: 46px -16px 0; padding: 26px 20px 6px; border-top: 1px solid var(--border); text-align: center; }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.site-footer-links a { color: var(--muted); font-size: 12.5px; text-decoration: none; }
.site-footer-links a:hover { color: var(--accent); }
.site-footer-copy { margin-top: 16px; font-size: 11px; color: var(--muted); letter-spacing: .04em; }

.hero { padding: 8px 4px 12px; }
.hero h1 { font-size: 31px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.035em; font-weight: 800; }
.hero .lead { color: var(--muted); margin: 0; max-width: 640px; line-height: 1.9; }
@media (max-width: 480px) { .hero h1 { font-size: 26px; } }

/* ===== ランディング（ホーム）ヒーロー ===== */
.lp-hero { text-align: center; padding: 2px 6px 22px; margin-top: -14px; }
.lp-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .03em;
  color: var(--accent); background: var(--accent-soft); padding: 6px 14px; border-radius: 999px; }
.lp-hero h1 { font-size: 33px; line-height: 1.22; letter-spacing: -.04em; font-weight: 800; margin: 16px 0 12px; }
.lp-hero .lp-sub { color: var(--muted); font-size: 15px; line-height: 1.85; max-width: 540px; margin: 0 auto; }
.lp-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 24px 0 0; }
.lp-cta .btn { width: auto; margin: 0; min-width: 210px; }
/* 2ボタンを縦に大きく積む（見出し直下の主導線） */
.lp-cta-stack { flex-direction: column; align-items: stretch; max-width: 480px; margin-left: auto; margin-right: auto; gap: 12px; }
.lp-cta-stack .btn { width: 100%; min-width: 0; padding: 15px; font-size: 15.5px; }
.lp-trust { display: flex; gap: 10px 20px; justify-content: center; flex-wrap: wrap; margin-top: 22px;
  font-size: 12.5px; color: var(--muted); }
.lp-trust span { display: inline-flex; align-items: center; gap: 6px; }
.lp-trust svg { width: 15px; height: 15px; color: var(--accent); flex: 0 0 auto; }
@media (max-width: 480px) { .lp-hero h1 { font-size: 28px; } .lp-cta .btn { width: 100%; min-width: 0; } }

/* ===== こんなページが作れます（作例ショーケース） ===== */
.showcase { margin: 6px 0 20px; }
.sc-title { text-align: center; font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.sc-lead { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 auto 16px; max-width: 460px; }
.sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-item { display: block; }
.sc-tag { display: block; width: fit-content; margin: 0 auto 9px; font-size: 11.5px; font-weight: 700;
  color: var(--accent-2); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
.sc-frame { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--border);
  background: #fff; box-shadow: var(--shadow); aspect-ratio: 86 / 150; }
.sc-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.sc-frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 44px;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.9)); pointer-events: none; }
.sc-cap { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
a.sc-frame { display: block; }
.sc-view { display: block; width: max-content; margin: 9px auto 0; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--accent-grad); padding: 7px 18px; border-radius: 999px; text-decoration: none; box-shadow: 0 4px 12px rgba(122,90,50,.24); }
.sc-view:hover { filter: brightness(1.04); }
@media (max-width: 380px) { .sc-lead { font-size: 12.5px; } }
/* 作れるスタイルの横流し（自動スクロール＋スワイプ） */
.sc-styles-h { text-align: center; font-size: 14px; font-weight: 800; color: var(--text); margin: 26px 0 12px; }
.sc-styles { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.sc-styles::-webkit-scrollbar { display: none; }
.scy-card { flex: 0 0 auto; width: 156px; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 14px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.04); transition: transform .15s ease, box-shadow .15s ease; }
.scy-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.1); }
.scy-ico { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.scy-name { font-size: 14px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.scy-desc { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.scy-tiktok { background: #141414; }
.scy-news   { background: #fdeaea; }
.scy-live   { background: #ffe6ef; }
.scy-profile { background: #e4f7e8; }
.scy-links  { background: var(--accent-soft); }
.scy-folder { background: #e7eefc; }
.scy-site   { background: #e7f6ec; }
/* ページ作成のスタイル選択 /mypage/create */
.pnew { max-width: 640px; margin: 0 auto; padding: 8px 0 24px; }
.pnew-title { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 4px; }
.pnew-lead { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 auto 20px; max-width: 460px; }
.pnew-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 560px) { .pnew-grid { grid-template-columns: 1fr 1fr 1fr; } }
.pnew-card { text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 14px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.04); transition: transform .15s ease, box-shadow .15s ease; }
.pnew-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.1); }
.pnew-pro { font-size: 10px; font-weight: 800; color: #fff; background: var(--accent-2); padding: 1px 6px; border-radius: 6px; vertical-align: middle; }
.pnew-plan-note { text-align: center; font-size: 12px; color: var(--muted); margin: 18px auto 0; max-width: 480px; line-height: 1.7; }
.pnew-back { text-align: center; margin-top: 18px; }
.pnew-back a { color: var(--accent); text-decoration: none; font-weight: 700; font-size: 14px; }

/* ===== 用途グリッド ===== */
.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .uc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.uc { border: 1px solid var(--border); border-radius: 14px; padding: 15px 14px; background: var(--surface);
  transition: transform .15s ease, box-shadow .15s ease; }
.uc:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.uc-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.uc-ico svg { width: 21px; height: 21px; }
.uc-t { font-weight: 800; font-size: 14px; letter-spacing: -.01em; }
.uc-d { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 3px; }

/* ===== CTAバンド（淡サンド地＋濃ウォルナット文字・浮かない） ===== */
.cta-band { text-align: center; border-radius: 18px; padding: 30px 22px; margin-bottom: 18px;
  background: var(--accent-soft); color: var(--accent-2); }
.cta-band h2 { color: var(--accent-2); font-size: 20px; margin: 0 0 8px; letter-spacing: -.01em; }
.cta-band p { color: var(--muted); font-size: 13.5px; line-height: 1.75; margin: 0 auto 18px; max-width: 460px; }
.cta-band .btn { width: auto; margin: 0; min-width: 220px; background: var(--accent-grad); color: #fff;
  box-shadow: 0 8px 20px rgba(107,87,166,.28); }
.cta-band .btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ---------- できること（機能一覧） ---------- */
.feature-list { display: flex; flex-direction: column; gap: 20px; margin-top: 6px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-ico { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft);
  color: var(--accent); display: flex; align-items: center; justify-content: center; }
.feature-ico svg { width: 22px; height: 22px; }
.feature-t { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.feature-d { font-size: 13px; color: var(--muted); line-height: 1.8; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card-narrow { max-width: 420px; margin-left: auto; margin-right: auto; margin-top: 32px; }
.card.center { text-align: center; }

h1 { font-size: 22px; margin: 0 0 14px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 0 0 14px; font-weight: 800; letter-spacing: -.01em; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 15px;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled { background: var(--surface-2); color: var(--muted); }
/* チェックボックス・ラジオは幅100%/枠/余白の対象外（＝通常の小さな四角に戻す） */
input[type=checkbox], input[type=radio] {
  width: auto; padding: 0; margin: 0; border: none; border-radius: 0;
  background: none; box-shadow: none; accent-color: var(--accent); cursor: pointer;
  flex: 0 0 auto;
}
input[type=checkbox]:focus, input[type=radio]:focus { box-shadow: none; }

.alias-row {
  display: flex; align-items: stretch; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--surface);
}
.alias-prefix {
  display: flex; align-items: center; padding: 0 12px; color: var(--muted);
  font-size: 13px; background: var(--surface-2); white-space: nowrap;
}
.alias-row input { border: none; border-radius: 0; }
.alias-row input:focus { box-shadow: none; }
.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.hint a { color: var(--accent); }
.domain-list { margin-top: 8px; font-size: 13px; }
.domain-list summary { cursor: pointer; color: var(--accent); font-weight: 700; width: fit-content; }
.domain-list ul { margin: 8px 0 4px; padding-left: 18px; }
.domain-list li { padding: 2px 0; }

/* 作成フォーム：遷移先URL → 語尾（コード）→ ドメイン選択 の間を少し空ける */
#create form label[for=alias],
#create form label[for=domain] { margin-top: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; margin-top: 18px; width: 100%; padding: 13px;
  border: none; border-radius: 12px; background: var(--accent-grad); color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none;
  letter-spacing: .01em; box-shadow: 0 6px 16px rgba(122,90,50,.26);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 9px 22px rgba(122,90,50,.30); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { background: var(--surface-2); color: var(--muted); cursor: default; box-shadow: none; filter: none; transform: none; }
.btn-sm { width: auto; margin: 0; padding: 8px 14px; font-size: 14px; border-radius: 9px; }
/* セカンダリ（白地＋ゴールド枠）＝ミルクティー配色で、クリーム背景でもはっきり見えるように */
.btn-ghost { background: #fff; color: var(--accent-2); border: 1.5px solid var(--accent); box-shadow: 0 4px 14px rgba(122,90,50,.12); font-weight: 800; }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent-2); filter: none; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(122,90,50,.18); }
.btn-white { width: auto; margin: 0; padding: 9px 16px; background: #fff; color: var(--accent); }
.btn-white:hover { background: var(--accent-soft); }

/* ---------- Tags ---------- */
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-lock { background: var(--surface-2); color: var(--muted); }
.tag-money { background: var(--money-soft); color: var(--money); }
.tag-progress { background: var(--accent-soft); color: var(--accent); }

/* ---------- Link cards ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 620px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.linkcard {
  border: 1px solid var(--border); border-radius: 13px; padding: 14px; background: var(--surface);
  min-width: 0; /* グリッド内で中身の長いURL等に押し広げられないように */
}
.linkcard-img { margin: -14px -14px 12px; border-radius: 12px 12px 0 0; overflow: hidden; background: var(--surface-2); }
.linkcard-img img { display: block; width: 100%; height: 150px; object-fit: cover; }
.file-input { font-size: 14px; padding: 9px 11px; }
.file-input::file-selector-button {
  margin-right: 10px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--text); font-size: 13px; cursor: pointer;
}
.file-input::file-selector-button:hover { background: var(--accent-soft); color: var(--accent); }
.image-preview { margin-top: 12px; }
.image-preview-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.image-preview-card { max-width: 280px; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.image-preview-card img { display: block; width: 100%; height: 150px; object-fit: cover; background: var(--surface-2); }
.linkcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.linkcard-title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkcard-url { display: flex; align-items: center; gap: 8px; }
a.short { color: var(--accent); text-decoration: none; font-weight: 700; font-size: 14px; word-break: break-all; }
a.short:hover { text-decoration: underline; }
.copy { background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 3px 8px; font-size: 12px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.copy:hover { color: var(--text); }
.linkcard-dest { color: var(--muted); font-size: 12px; margin: 6px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkcard-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; }
.clicks { font-size: 13px; color: var(--muted); font-weight: 600; }
.stats-link { font-size: 13px; color: var(--accent); text-decoration: none; }
.empty { color: var(--muted); }

/* ---------- 作成完了パネル ---------- */
.created {
  border: 1px solid #bfe8d1; background: var(--ok-soft);
  border-radius: 14px; padding: 16px 16px 14px; margin: 0 0 18px;
  box-shadow: var(--shadow);
}
.created-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.created-check {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ok); color: #fff; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.created-lead { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.created-lead strong { font-size: 16px; color: #0f6b41; }
.created-lead span { font-size: 13px; color: var(--muted); }
.created-row { display: flex; gap: 8px; align-items: stretch; }
.created-url {
  flex: 1 1 auto; min-width: 0; padding: 12px 14px; font-size: 16px; font-weight: 700;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
}
.created-copy { flex: 0 0 auto; width: auto; margin-top: 0; white-space: nowrap; padding-left: 24px; padding-right: 24px; }
.created-copy.is-copied { background: var(--accent-2); }
.created-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.created-open { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.created-open:hover { text-decoration: underline; }
.created-more { font-size: 14px; color: var(--muted); text-decoration: none; }
.created-more:hover { color: var(--text); }
@media (max-width: 480px) {
  .created-row { flex-direction: column; }
  .created-copy { width: 100%; padding-top: 12px; padding-bottom: 12px; }
}

/* ---------- 履歴タブ ---------- */
.htabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.htab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.htab:hover { color: var(--text); }
.htab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.htab-n {
  font-size: 12px; font-weight: 700; line-height: 1;
  padding: 2px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.htab.is-active .htab-n { background: rgba(255,255,255,.25); color: #fff; }

/* ---------- 履歴の種類フィルタ（すべて/リンクカード/短縮リンク/オリジナルページ） ---------- */
.hist-filter { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; flex-wrap: wrap; }
.hist-filter label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0; }
.hist-select {
  flex: 1 1 200px; min-width: 0; max-width: 320px; width: auto;
  padding: 10px 38px 10px 14px; font-size: 15px; font-weight: 700; font-family: inherit;
  color: var(--text); background-color: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237c5cc4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.hist-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hist-group + .hist-group { margin-top: 22px; }
.hist-gtitle { font-size: 15px; margin: 0 0 10px; }
.hist-newpage { margin-top: 12px; }

/* リンクカードの編集・削除 */
.lc-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.lc-edit { flex: 0 0 auto; }
.lc-edit > summary { list-style: none; cursor: pointer; }
.lc-edit > summary::-webkit-details-marker { display: none; }
.lc-del { background: var(--err); border-color: var(--err); color: #fff; }
.lc-form { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.lc-form label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 6px 0 0; }
.lc-form input[type=text] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
}
.lc-form input[type=file] { font-size: 13px; }
.lc-check { display: flex !important; align-items: center; gap: 7px; font-size: 13px !important; color: var(--text) !important; font-weight: 500 !important; margin-top: 8px !important; }
.lc-check input { flex: 0 0 auto; }
.lc-form .btn { margin-top: 10px; }

/* ---------- クリック推移グラフ ---------- */
.chart-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  background: var(--surface); box-shadow: var(--shadow); margin-bottom: 18px;
}
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-head h2 { margin: 0; font-size: 16px; }
.chart-tabs { margin: 0; }
.chart-tabs .htab { padding: 6px 12px; font-size: 13px; }
.chart-total { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.chart-leg-range { color: var(--muted); }
.chart-leg { display: inline-flex; align-items: center; gap: 5px; margin-right: 14px; font-weight: 700; color: var(--text); }
.chart-leg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
/* バー行：下端に連続した軸線。バーはこの線の上に接地（-2pxで密着） */
.chart { display: flex; align-items: flex-end; gap: 2px; height: 175px; border-bottom: 2px solid #d8cdf0; }
.chart-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-col.multi { gap: 2px; }
.chart-bar {
  position: relative; width: 70%; max-width: 26px; min-width: 4px;
  background: var(--accent); border-radius: 4px 4px 0 0; margin-bottom: -2px;
}
.chart-bar.multi { width: 46%; max-width: 12px; min-width: 2px; border-radius: 3px 3px 0 0; }
.chart-bar:not(.multi):hover { background: var(--accent-2, #2f49d6); }
.chart-bar.is-zero { background: transparent; }
.chart-val {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: var(--muted); line-height: 1; margin-bottom: 3px; white-space: nowrap;
}
/* 時間ラベルの行（バーとは別の行） */
.chart-xaxis { display: flex; gap: 2px; margin-top: 8px; }
.chart-xcol { flex: 1 1 0; min-width: 0; text-align: center; font-size: 10px; color: var(--muted); white-space: nowrap; }
.chart-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 24px 0; }

/* ---------- 決済ページ / 契約 ---------- */
.page-back { margin: 0 0 12px; }
.checkout-card { max-width: 480px; margin-left: auto; margin-right: auto; }
.checkout-summary { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); margin-bottom: 18px; }
.checkout-plan { font-weight: 700; font-size: 15px; }
.checkout-price { font-size: 26px; font-weight: 800; color: var(--accent); margin-top: 2px; }
.checkout-price span { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.sq-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); min-height: 44px; margin-bottom: 10px; }
.checkout-error { background: var(--err-soft); border: 1px solid #f4c7c7; color: #a12626; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.checkout-note { margin-top: 10px; }
.pc-from { font-size: 13px; color: var(--muted); }
.pc-arrow { font-size: 20px; font-weight: 800; color: var(--muted); margin: 4px 0; }
.sub-box { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.sub-box h2 { font-size: 16px; margin: 0 0 10px; }
.sub-box form { margin-top: 12px; }
.sub-box .btn { width: auto; margin-top: 0; }

/* ---------- Flashes ---------- */
.flashes { margin-bottom: 16px; }
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 8px; font-size: 14px; word-break: break-all; border: 1px solid transparent; }
.flash-success { background: var(--ok-soft); border-color: #bfe8d1; color: #0f6b41; }
.flash-error { background: var(--err-soft); border-color: #f4c7c7; color: #a12626; }

/* ---------- Stats ---------- */
.stat-grid { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 22px; text-align: center; min-width: 120px; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--muted); }
dl.detail { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; font-size: 14px; }
dl.detail dt { color: var(--muted); }
dl.detail dd { margin: 0; word-break: break-all; }
.back { text-decoration: none; }
.switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 16px; }

/* ---------- Pricing ---------- */
.pricing { margin: 26px 0 8px; }
.pricing-head { text-align: center; margin-bottom: 22px; }
.pricing-head h2 { font-size: 22px; margin: 0 0 6px; }
.pricing-head p { font-size: 14px; color: var(--muted); margin: 0; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .plans { grid-template-columns: 1fr; } }
.plan {
  position: relative; display: flex; flex-direction: column;
  border: 2px solid #d8c7a1; border-radius: 18px; padding: 24px 18px 20px;
  background: var(--surface); box-shadow: 0 2px 4px rgba(74,54,28,.06), 0 10px 26px rgba(74,54,28,.09);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.plan:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(74,54,28,.16); }
.plan-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent), 0 14px 34px rgba(124,92,196,.20);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 76px);
}
.plan-current { border-color: var(--ok); }
.plan-ribbon {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  padding: 4px 14px; border-radius: 999px; letter-spacing: .05em; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(124,92,196,.45);
}
.plan-now {
  position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800;
  color: var(--ok); background: var(--ok-soft); padding: 2px 9px; border-radius: 999px;
}
.plan-name { font-weight: 800; font-size: 16px; margin-top: 2px; }
.plan-tagline { font-size: 12px; color: var(--muted); margin-top: 3px; }
.plan-price { display: flex; align-items: baseline; gap: 1px; margin: 16px 0 2px; flex-wrap: wrap; }
.plan-price .cur { font-size: 17px; font-weight: 800; }
.plan-price .num { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.plan-price .per { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 5px; }
.plan-feats { list-style: none; padding: 0; margin: 16px 0 18px; font-size: 13px; color: var(--text); flex: 1; }
.plan-feats li { padding: 5px 0 5px 22px; position: relative; line-height: 1.55; }
.plan-feats li::before { content: "✓"; position: absolute; left: 0; top: 4px; color: var(--ok); font-weight: 900; }
.plan-feats strong { font-weight: 700; }
.plan-btn {
  display: block; width: 100%; padding: 12px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 800; cursor: pointer; text-align: center; font-family: inherit;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.plan-cta { margin-top: auto; }
.plan-cta-note { text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.plans.has-trial .plan-cta-note { min-height: 34px; margin-bottom: 9px; display: flex; align-items: flex-end; justify-content: center; }
.plan-btn.is-primary { background: var(--accent); color: #fff; }
.plan-btn.is-primary:hover { background: var(--accent-2); }
.plan-btn.is-ghost { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.plan-btn.is-ghost:hover { background: var(--accent-soft); }
.plan-btn.is-current { background: var(--ok-soft); color: var(--ok); cursor: default; }
.pricing-foot { text-align: center; font-size: 12px; color: var(--muted); margin: 22px 0 0; }
.demo-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; text-align: center; }

/* ---------- Bottom bar ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 22px rgba(70,50,110,.08);
}
.bottombar-inner {
  max-width: 900px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.bottombar-text { font-size: 14px; font-weight: 600; color: var(--text); }
.bottombar .btn-white { background: var(--accent); color: #fff; white-space: nowrap; flex-shrink: 0; }
.bottombar .btn-white:hover { background: var(--accent-2); }
@media (max-width: 480px) {
  .bottombar-inner { padding: 10px 14px; gap: 10px; }
  .bottombar-text { font-size: 12.5px; line-height: 1.35; }
  .bottombar .btn-white { padding: 9px 14px; font-size: 14px; }
}

/* ---------- Interstitial ---------- */
.interstitial-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.interstitial { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 28px; max-width: 440px; width: 100%; text-align: center; }
.inter-kicker { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.sponsor { display: block; text-decoration: none; border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: var(--surface-2); margin-bottom: 18px; text-align: left; }
.sponsor:hover { border-color: var(--accent); }
.sponsor-badge { display: inline-block; font-size: 11px; font-weight: 800; color: var(--money); background: var(--money-soft); padding: 2px 8px; border-radius: 999px; }
.sponsor-title { display: block; font-weight: 800; color: var(--text); margin: 8px 0 2px; font-size: 16px; }
.sponsor-url { display: block; color: var(--muted); font-size: 12px; word-break: break-all; }
.sponsor-cta { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 800; font-size: 14px; }
.btn-continue { background: var(--surface-2); color: var(--muted); }
.btn-continue.ready { background: var(--accent); color: #fff; }
.inter-count { color: var(--text); font-size: 14px; font-weight: 700; margin: 4px 0 10px; }
.inter-count #count { color: var(--accent); }
.inter-skip { display: inline-block; color: var(--muted); font-size: 13px; text-decoration: none; }
.inter-skip:hover { color: var(--text); text-decoration: underline; }
.inter-note { color: var(--muted); font-size: 12px; margin: 12px 0 0; }

/* ---------- Hamburger ---------- */
.hamburger {
  width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer; display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; padding: 0;
}
.hamburger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
.hamburger:hover { background: var(--surface-2); }
.drawer-open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.drawer-open .hamburger span:nth-child(2) { opacity: 0; }
.drawer-open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Drawer (right slide-in) ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(20,28,50,.38);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; z-index: 40;
}
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 300px; max-width: 84vw;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -12px 0 30px rgba(20,28,50,.12);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 50; display: flex; flex-direction: column;
}
.drawer-open .drawer-overlay { opacity: 1; visibility: visible; }
.drawer-open .drawer { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-title { font-weight: 800; }
.drawer-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); line-height: 1; }
.drawer-close:hover { color: var(--text); }
.drawer-nav { padding: 8px; overflow-y: auto; }
.drawer-label { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; padding: 12px 14px 6px; }
.drawer-nav a, .drawer-form button {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600;
  width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left;
}
/* 右端の「>」シェブロン */
.drawer-nav a::after, .drawer-form button::after {
  content: ""; width: 7px; height: 7px; margin-left: auto; flex: 0 0 auto;
  border-top: 2px solid var(--muted); border-right: 2px solid var(--muted);
  transform: rotate(45deg); opacity: .45;
}
.drawer-nav a:hover, .drawer-form button:hover { background: var(--accent-soft); color: var(--accent); }
.drawer-nav a.on { background: var(--accent-soft); color: var(--accent-2); font-weight: 800; }
.drawer-nav .di { width: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.drawer-nav .di svg { width: 21px; height: 21px; }
.drawer-nav a:hover .di, .drawer-nav a.on .di, .drawer-form button:hover .di { color: var(--accent); }
.drawer-sep { height: 1px; background: var(--border); margin: 6px 8px; }

/* ---------- Stats bar ---------- */
.statsbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 480px) {
  .statsbar { gap: 8px; }
  .statbox { padding: 13px 6px; }
  .statbox-num { font-size: 21px; }
  .statbox-label { font-size: 11px; }
}
.seg-filter { margin-bottom: 10px; }
.seg-filter .hist-select { font-weight: 700; }
.chart-note { font-size: 12px; color: var(--muted); margin: 8px 2px 18px; }
.analytics-lock { text-align: center; background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.analytics-lock .al-t { font-weight: 800; font-size: 16px; color: var(--text); }
.analytics-lock .al-d { font-size: 13px; color: var(--muted); line-height: 1.85; margin: 8px auto 16px; max-width: 440px; }
.analytics-lock .al-cta { width: auto; min-width: 200px; margin: 0 auto; }
.page-metric { margin-bottom: 12px; }
.statbox {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; text-align: center; box-shadow: var(--shadow);
}
.statbox-num { font-size: 26px; font-weight: 800; color: var(--accent); line-height: 1.2; }
.statbox-label { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }

/* ---------- Simple content pages ---------- */
.notice { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.notice-date { font-size: 12px; color: var(--muted); }
.notice-title { font-weight: 700; margin: 2px 0 4px; }
.notice-body { font-size: 14px; color: var(--muted); }
.doc h3 { font-size: 15px; margin: 18px 0 6px; }
.doc p, .doc li { color: var(--muted); font-size: 14px; line-height: 1.7; }
.doc ul { margin: 6px 0 10px; padding-left: 20px; }
.doc li { padding: 2px 0; }
.doc strong { color: var(--text); font-weight: 700; }
.doc-lead { color: var(--text) !important; }
.doc-date { color: var(--muted); font-size: 13px; margin-top: 18px; }
.doc-note { background: var(--money-soft); color: var(--money); border: 1px solid #f0dcb0; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 0 0 16px; }
.doc .law { grid-template-columns: 170px 1fr; gap: 12px 16px; font-size: 14px; }
.doc .law dt { font-weight: 700; color: var(--text); }
.doc .law dd { color: var(--muted); }
.doc .law .ph { color: var(--err); font-weight: 700; }
@media (max-width: 520px) { .doc .law { grid-template-columns: 1fr; gap: 2px 0; } .doc .law dt { margin-top: 14px; } }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th, .history-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }
.history-table th { color: var(--muted); font-size: 12px; }
.nav-hide-sm { }
@media (max-width: 420px) { .nav-hide-sm { display: none; } }

/* ---------- Original page editor ---------- */
.page-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.page-url-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.linkadd { margin-bottom: 14px; }
.linkadd-row { display: flex; gap: 8px; align-items: stretch; }
.linkadd-row input { flex: 1; }
.linkadd-row input:first-child { max-width: 220px; }
.linkadd-row .btn-sm { white-space: nowrap; align-self: center; }
@media (max-width: 560px) { .linkadd-row { flex-direction: column; } .linkadd-row input:first-child { max-width: none; } }
.pl-list { display: flex; flex-direction: column; gap: 10px; }
.pl-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface); }
.pl-edit { display: flex; gap: 8px; align-items: center; }
.pl-edit input { flex: 1; }
.pl-edit input:first-child { max-width: 200px; }
.pl-edit .btn-sm { white-space: nowrap; }
@media (max-width: 560px) { .pl-edit { flex-direction: column; align-items: stretch; } .pl-edit input:first-child { max-width: none; } }
.pl-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pl-actions { display: flex; gap: 6px; }
.pl-actions form { margin: 0; }
.pl-btn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; }
.pl-btn:hover { background: var(--surface-2); color: var(--text); }
.pl-del:hover { background: var(--err-soft); color: var(--err); border-color: #f4c7c7; }

/* ---------- オリジナルページ編集（ビルダー・すっきり版） ---------- */
.pe-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pe-title h1 { margin: 0; }
.pe-url { display: flex; align-items: center; gap: 8px; margin-top: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.pe-url .short { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

/* アイコン・背景の行 */
.pe-avatar { display: flex; gap: 14px; align-items: center; margin: 4px 0 6px; }
.pe-av-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--surface-2); flex: 0 0 auto; }
.pe-bg-img { width: 96px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); flex: 0 0 auto; }
.pe-av-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.pe-av-ctrl { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pe-av-opts { display: flex; gap: 16px; flex-wrap: wrap; }
.pe-check { font-size: 13px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }
.pe-color { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pe-color input[type=color] { width: 48px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }

/* デザイン（折りたたみ） */
.pe-more { margin: 14px 0 4px; border-top: 1px dashed var(--border); padding-top: 10px; }
.pe-more > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); list-style: none; }
.pe-more > summary::before { content: "▸ "; }
.pe-more[open] > summary::before { content: "▾ "; }

/* コンテンツ追加バー */
.pe-addbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pe-add { flex: 1 1 auto; }
.pe-add-btn { list-style: none; cursor: pointer; text-align: center; display: block;
  padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 700; color: var(--accent); background: var(--surface); white-space: nowrap; }
.pe-add-btn::-webkit-details-marker { display: none; }
.pe-add[open] .pe-add-btn { background: var(--accent-soft); border-style: solid; }
.pe-add > form { margin-top: 10px; }
.pe-add > form .btn-sm { margin-top: 10px; }

/* ブロック一覧（すっきり） */
.pe-list { display: flex; flex-direction: column; gap: 8px; }
.pe-block { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.pe-block-row { display: flex; align-items: center; gap: 10px; }
.pe-ico { font-size: 16px; flex: 0 0 auto; }
.pe-mini { width: 40px; height: 28px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.pe-sum { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text); }
.pe-edit { margin-top: 8px; }
.pe-edit > summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 700; }
.pe-edit > form { margin-top: 10px; }

/* 写真を選ぶ（ワンタップでピッカー） */
.pe-photo { display: block; text-align: center; cursor: pointer; padding: 20px; border: 2px dashed var(--accent); border-radius: 12px; color: var(--accent); font-weight: 800; font-size: 15px; background: var(--accent-soft); }
.pe-photo:hover { filter: brightness(0.98); }
/* 追加済み画像をカード表示 */
.pe-imgs { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.pe-imgcard { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.pe-imgcard-pic { display: block; width: 100%; max-height: 200px; object-fit: cover; background: var(--surface-2); }
.pe-imgcard-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pe-imgcard-body .pe-edit { margin: 0; }
.pe-imgcard-body .pl-actions { justify-content: flex-end; }
.pe-add-solo { margin-bottom: 14px; }
.pe-finish { margin-top: 18px; }
/* 動画は縦が長くなりがちなので、編集画面のサムネは高さを抑える */
video.pe-imgcard-pic { max-height: 260px; }

/* アイコン（プロフィール画像）設定 */
.pe-avatar-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.pe-avatar-prev { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface-2); }
.pe-avatar-none { display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; background: var(--accent); }
.pe-avatar-ctrl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pe-avatar-ctrl input[type=file] { font-size: 13px; }
/* SNS共有サムネ(OGP)のプレビュー（横長） */
.pe-og-prev { width: 120px; height: 63px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface-2); }
.pe-og-none { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }

/* フィード：動画の再生方法（再生ボタン / 自動再生）のカード型ラジオ */
.pe-radio { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 2px; }
.pe-radio-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); transition: border-color .15s ease, background .15s ease; }
.pe-radio-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pe-radio-item input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.pe-radio-item > span { display: flex; flex-direction: column; font-weight: 700; color: var(--text); font-size: 14.5px; }
.pe-radio-item small { font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* フィード：動画・画像の追加（1つのボタン→開くと「動画/画像」の2択が縦に並ぶ） */
.pe-add-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.pe-add-choices .pe-blockform { margin: 0; }
.pe-media-tag { font-size: 12px; font-weight: 700; color: var(--muted); }
.pe-newshead { margin-top: 2px; }
.pe-newshead-lb { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }

/* 履歴のオリジナルページ一覧 */
.op-list { display: flex; flex-direction: column; gap: 10px; }
.op-hist { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.op-thumb { width: 72px; height: 44px; object-fit: cover; object-position: center 38%; border-radius: 8px; flex: 0 0 auto; }
.op-hist-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 220px; }
.op-hist-body .short { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-hist-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-hist-act .btn-sm, .op-hist-act .copy { margin: 0; }
.op-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px; }
.op-stat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; }
.op-stat strong { color: var(--text); font-size: 13px; }
.op-stat-ico { font-size: 12px; }

/* ---------- Logout buttons (POST forms styled as links) ---------- */
.inline-form { display: inline; margin: 0; }
.linklike {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  color: var(--muted); font-size: 14px; font-family: inherit;
}
.linklike:hover { color: var(--text); }
.drawer-form { margin: 0; }
.drawer-form button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border: none; border-radius: 10px; background: none;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer; text-align: left;
}
.drawer-form button:hover { background: var(--accent-soft); color: var(--accent); }
.drawer-form .di { width: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.drawer-form .di svg { width: 20px; height: 20px; }

/* ============================================================
   運営 管理画面
   ============================================================ */
.adm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.adm-title { font-size: 20px; margin: 0; }
.adm-exit { font-size: 13px; color: var(--accent-2); text-decoration: none; font-weight: 700; }
.adm-exit:hover { text-decoration: underline; }

.adm-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.adm-tab {
  display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.adm-tab:hover { color: var(--text); }
.adm-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.adm-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.adm-kpi-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.adm-kpi-accent .adm-kpi-num, .adm-kpi-accent .adm-kpi-lab, .adm-kpi-accent .adm-kpi-sub { color: #fff; }
.adm-kpi-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.adm-kpi-lab { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 700; }
.adm-kpi-sub { font-weight: 500; opacity: .85; }

.adm-plandist { display: flex; flex-wrap: wrap; gap: 10px; }
.adm-plan { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; background: var(--surface-2); }
.adm-plan-name { font-weight: 700; }
.adm-plan-count { color: var(--accent-2); font-weight: 800; }
.adm-plan-price { font-size: 12px; color: var(--muted); }

.adm-count { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 6px; }

.adm-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 460px; }
.adm-table th, .adm-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.adm-table th { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.adm-table td { color: var(--text); }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-r { text-align: right !important; white-space: nowrap; }
.adm-dim { color: var(--muted); }
.adm-ell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.adm-cell-main { min-width: 180px; }
.adm-ell .adm-dim { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.adm-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.adm-badge-pro { background: var(--accent); color: #fff; }
.adm-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 700; }
.adm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.adm-dot-ok { background: var(--ok); }

.adm-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.adm-status-active { background: rgba(47,158,107,.14); color: var(--ok); }
.adm-status-canceled, .adm-status-deactivated { background: rgba(210,83,126,.14); color: var(--err); }
.adm-status-pending { background: var(--accent-soft); color: var(--accent-2); }

.adm-search { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.adm-search-input {
  flex: 1 1 220px; min-width: 0; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
}
.adm-search .btn { margin: 0; flex: 0 0 auto; }

/* 並び替え（リンク一覧） */
.adm-sort { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.adm-sort-lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.adm-sort-link {
  display: inline-block; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 700;
  text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border);
}
.adm-sort-link.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 料金表：月額/年額トグル */
.bill-toggle { display: flex; width: max-content; max-width: 100%; gap: 4px; padding: 4px; margin: 0 auto 22px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.bill-toggle .bt { border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: 14px;
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.bill-toggle .bt.on { background: var(--accent); color: #fff; }
.bill-toggle .bt-badge { display: inline-block; background: #e2601f; color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 800; padding: 1px 7px; margin-left: 4px; }
.bill-toggle .bt.on .bt-badge { background: rgba(255,255,255,.28); }
.plan-price .price-save { display: inline-block; background: #e2601f; color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 800; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }

/* 下部タブバー（メインナビ：ホーム/プラン/作成/履歴/マイページ） */
body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex;
  background: rgba(255,255,255,.85); border-top: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -1px 10px rgba(24,18,45,.05); }
.tabitem { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 9px 2px 7px; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 600;
  letter-spacing: .01em; -webkit-tap-highlight-color: transparent; transition: color .15s ease; }
.tabitem .tabicon { display: flex; line-height: 1; }
.tabitem .tabicon svg { width: 23px; height: 23px; display: block; }
.tabitem.on { color: var(--accent); }
.tabitem:active { background: var(--accent-soft); }

/* 作成タイプの選択ボタン（短縮URL / リンクカード / オリジナルページ） */
.create-choose { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.create-choose .cc-btn { flex: 1 1 0; min-width: 100px; text-align: center; padding: 12px 8px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; }
.create-choose .cc-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.create-choose .cc-link { display: flex; align-items: center; justify-content: center; }

/* パスワード「表示して確認」トグル */
.pw-show { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted);
  font-weight: 500; cursor: pointer; margin: 2px 0 8px; }
.pw-show input { width: auto; margin: 0; flex: 0 0 auto; }

/* 未ログイン向け：メール登録訴求バナー */
.promo-signup { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 18px 46px 18px 20px; border-radius: 16px;
  background: var(--accent-soft); border: 1px solid var(--border); }
.promo-signup .promo-emoji { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; background: var(--surface);
  color: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.promo-signup .promo-emoji svg { width: 24px; height: 24px; }
.promo-signup .promo-body { flex: 1 1 260px; min-width: 0; }
.promo-signup .promo-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.promo-signup .promo-sub { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }
.promo-signup .promo-cta { flex: 0 0 auto; background: var(--accent-grad); color: #fff; font-weight: 800;
  font-size: 14px; text-decoration: none; padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(110,81,198,.28); white-space: nowrap; }
.promo-signup .promo-cta:active { transform: scale(.98); }
.promo-signup .promo-x { position: absolute; top: 8px; right: 10px; background: transparent; border: 0;
  font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; padding: 2px 6px; }
@media (max-width: 560px) { .promo-signup .promo-cta { width: 100%; text-align: center; } }

.adm-plan-select {
  padding: 6px 26px 6px 10px; font-size: 13px; font-family: inherit; font-weight: 700;
  color: var(--text); background-color: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath fill='%237c5cc4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.adm-plan-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- SEO用の説明セクション ---------- */
.seo-intro h2 { font-size: 18px; line-height: 1.45; margin: 0 0 6px; }
.seo-intro h3 { font-size: 15px; margin: 26px 0 10px; }
.seo-intro p { color: var(--muted); margin: 15px 0; line-height: 1.95; }
.seo-list { margin: 14px 0; padding-left: 22px; }
.seo-list li { margin: 10px 0; color: var(--text); line-height: 1.8; }
