:root {
  --c-bg: #f5f8fe;
  --c-surface: #ffffff;
  --c-border: #e8edf6;
  --c-border-input: #e2e8f2;
  --c-text: #1c2a4a;       /* 見出し */
  --c-body: #4a5670;       /* 本文 */
  --c-muted: #8a94a6;
  --c-muted2: #9aa4b6;
  --c-primary: #2f6bf6;
  --c-primary-dark: #2a5fe6;
  --c-primary-soft: #eaf1ff;
  --c-accent: #34c77b;
  --c-orange: #ff9f45;
  --c-orange-soft: #fff3e6;
  --c-green-soft: #e9f7ef;
  --c-danger: #e5484d;
  --radius: 20px;
  --radius-card: 24px;
  --radius-btn: 14px;
  --radius-sm: 13px;
  --shadow: 0 2px 12px rgba(31, 45, 75, .05);
  --shadow-md: 0 12px 26px rgba(31, 45, 75, .09);
  --shadow-lg: 0 20px 44px rgba(42, 95, 230, .18);
  --shadow-primary: 0 8px 18px rgba(47, 107, 246, .28);
  --font-round: 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --maxw: 920px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-body);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}

button { font-family: inherit; cursor: pointer; }

/* ===== ヘッダー ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.app-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  border: 0;
  padding: 0;
}
.brand__logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 12px rgba(42, 95, 230, .22);
  flex: 0 0 auto;
}
.brand__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand__name { font-family: var(--font-round); font-weight: 700; font-size: 18px; color: var(--c-text); letter-spacing: .01em; }
@media (max-width: 420px) {
  .brand__name { font-size: 15px; }
  .app-header__inner { padding: 12px 14px; }
  .plan-badge { padding: 6px 11px; font-size: 12px; }
}
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-primary-dark);
  background: var(--c-primary-soft);
  border-radius: 999px;
  padding: 7px 15px;
}
.plan-badge { border: none; cursor: pointer; transition: filter .15s; }
.plan-badge:hover { filter: brightness(.97); }
.plan-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent); }

/* ヘッダー右側：プラン＋メニュー */
.app-header__right { display: flex; align-items: center; gap: 10px; }
.menu-wrap { position: relative; }
.menu-btn {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--c-border);
  background: #fff; color: var(--c-text); display: grid; place-items: center; transition: background .15s;
}
.menu-btn:hover { background: #f4f6fb; }
.menu-dropdown {
  position: absolute; right: 0; top: 48px; background: #fff;
  border: 1px solid var(--c-border); border-radius: 16px; box-shadow: var(--shadow-md);
  padding: 7px; min-width: 230px; z-index: 50;
}
.menu-dropdown[hidden] { display: none; }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: none; padding: 12px; border-radius: 10px;
  font-family: var(--font-round); font-weight: 700; font-size: 14px; color: var(--c-text);
}
.menu-item:hover { background: var(--c-primary-soft); }
.menu-item--logout { color: var(--c-danger); }
.menu-sep { height: 1px; background: var(--c-border); margin: 6px 6px; }
body.auth-mode .app-header__right { display: none; }
.plan-badge.is-pro { color: #fff; background: linear-gradient(135deg, #f5a623, #f08c00); }
.plan-badge.is-pro .plan-dot { background: #fff; }

/* ===== ビュー ===== */
.view {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 20px 100px;
}
.page-title { font-family: var(--font-round); font-size: 22px; font-weight: 700; color: var(--c-text); margin: 4px 0 4px; }
.page-sub { color: var(--c-muted); font-size: 13.5px; margin: 0 0 20px; line-height: 1.7; }

/* 戻るリンク */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--c-muted);
  font-size: 13.5px; font-weight: 700; font-family: inherit;
  padding: 4px 0; margin-bottom: 12px;
}
.back-link:hover { color: var(--c-primary); }

/* ===== カード ===== */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.card__title {
  font-family: var(--font-round);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card__title .step-no {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #3d7bff, #2a5fe6); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: 0 0 auto;
  font-family: var(--font-round);
}

/* ===== フォーム ===== */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #3a4663;
  margin-bottom: 8px;
}
.field .hint { font-weight: 500; color: var(--c-muted2); font-size: 12px; }
.input, .textarea, select.input {
  width: 100%;
  border: 1.5px solid var(--c-border-input);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 14px;
  color: var(--c-text);
  background: #fff;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, select.input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 246, .12);
}
select.input { cursor: pointer; }
.textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.row { display: flex; gap: 14px; }
.row > .field { flex: 1; }
.input-money { position: relative; }
.input-money .input { padding-left: 30px; }
.input-money::before {
  content: "¥"; position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--c-muted2); font-weight: 700;
}
.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: #f8fafe;
}
.switch-row__label { font-size: 14px; font-weight: 700; color: var(--c-text); font-family: var(--font-round); }
.switch-row__label small { display: block; font-weight: 400; color: var(--c-muted2); font-size: 12px; font-family: var(--font-body); }
.switch { position: relative; width: 48px; height: 28px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: #d3dae6; border-radius: 999px; transition: background .18s; }
.switch .track::before {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 22px; height: 22px; background: #fff; border-radius: 50%;
  transition: transform .18s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.switch input:checked + .track { background: var(--c-primary); }
.switch input:checked + .track::before { transform: translateX(20px); }

/* ===== ボタン ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: var(--radius-btn);
  padding: 14px 22px; font-size: 15px; font-weight: 700; font-family: var(--font-round);
  background: linear-gradient(135deg, #3d7bff, #2a5fe6); color: #fff; width: 100%;
  box-shadow: var(--shadow-primary);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(47, 107, 246, .34); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: #fff; color: var(--c-primary); border-color: var(--c-border-input); box-shadow: none; }
.btn--ghost:hover { background: var(--c-primary-soft); border-color: #cbdcff; box-shadow: none; }
.btn--sub { background: #fff; color: #5a647a; border-color: var(--c-border-input); box-shadow: none; }
.btn--sub:hover { background: #f4f6fb; border-color: #cbd3e0; box-shadow: none; }
.btn--accent { background: linear-gradient(135deg, #34c77b, #23a865); box-shadow: 0 10px 22px rgba(52, 199, 123, .34); }
.btn--accent:hover { box-shadow: 0 14px 26px rgba(52, 199, 123, .4); }
.btn--danger { background: #fff; color: var(--c-danger); border-color: #f3c9c9; box-shadow: none; }
.btn--danger:hover { background: #fdecec; box-shadow: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn-group { display: flex; gap: 12px; }
.btn-group .btn { width: auto; flex: 1; }

/* ===== ホーム：ヒーロー ===== */
.hero {
  background: linear-gradient(135deg, #3d7bff 0%, #2a5fe6 100%);
  color: #fff; border-radius: 28px; padding: 36px 38px;
  box-shadow: var(--shadow-lg); margin-bottom: 18px;
  position: relative; overflow: hidden;
  display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.hero::before {
  content: ""; position: absolute; top: -70px; right: -40px;
  width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.hero::after {
  content: ""; position: absolute; bottom: -90px; left: -50px;
  width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .06);
}
.hero__main { flex: 1 1 300px; min-width: 280px; position: relative; z-index: 1; }
.hero__art { flex: 0 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .18); padding: 6px 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; margin-bottom: 16px;
}
.hero h1 { font-family: var(--font-round); font-weight: 900; font-size: 30px; line-height: 1.35; margin: 0 0 14px; letter-spacing: .01em; }
.hero p { font-size: 15px; line-height: 1.75; margin: 0 0 24px; color: rgba(255, 255, 255, .92); max-width: 420px; }
.hero__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn { width: auto; }
.hero .btn--primary-on-blue { background: #fff; color: var(--c-primary-dark); box-shadow: 0 8px 20px rgba(0, 0, 0, .14); }
.hero .btn--primary-on-blue:hover { background: #f0f4ff; }
.hero .btn--ghost-on-blue { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .45); box-shadow: none; }
.hero .btn--ghost-on-blue:hover { background: rgba(255, 255, 255, .26); }

/* ===== ステップカード ===== */
.section-title { font-family: var(--font-round); font-weight: 700; font-size: 18px; color: var(--c-text); margin: 34px 0 4px; }
.steps-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 14px 0 8px; }
.flow-step {
  text-align: left; background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 20px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.flow-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cbdcff; }
.flow-step__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.flow-step__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; }
.flow-step__icon.ic-blue { background: var(--c-primary-soft); }
.flow-step__icon.ic-orange { background: var(--c-orange-soft); }
.flow-step__icon.ic-green { background: var(--c-green-soft); }
.flow-step__n { font-family: var(--font-round); font-weight: 900; font-size: 22px; color: #dce5f3; }
.flow-step__t { font-family: var(--font-round); font-weight: 700; font-size: 15px; color: var(--c-text); margin-bottom: 5px; }
.flow-step__t small { font-size: 11px; color: var(--c-muted2); font-weight: 500; }
.flow-step__d { font-size: 12.5px; color: var(--c-muted); line-height: 1.6; }

/* ===== セクション見出し ===== */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 14px; }
.section-head h2 { font-family: var(--font-round); font-size: 18px; color: var(--c-text); margin: 0; }
.section-head span { font-size: 13px; color: var(--c-muted); }

/* 履歴リスト */
.history-item {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 14px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.history-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #cbdcff; }
.history-item__main { flex: 1; min-width: 0; }
.history-item__dest { font-family: var(--font-round); font-weight: 700; font-size: 14.5px; color: var(--c-text); margin-bottom: 3px; }
.history-item__meta { font-size: 12px; color: var(--c-muted); }
.history-item__amt { font-family: var(--font-round); font-weight: 700; color: var(--c-accent); font-size: 15px; white-space: nowrap; }
.history-item__chev { color: var(--c-muted2); font-size: 20px; }

/* 空状態 */
.empty {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-card);
  padding: 44px 24px; text-align: center;
}
.empty .emoji { font-size: 40px; }
.empty p { color: var(--c-muted); }
.empty .empty-title { font-family: var(--font-round); font-weight: 700; font-size: 15px; color: #5a647a; margin: 8px 0 4px; }

/* ===== ステッパー ===== */
.stepper { display: flex; gap: 10px; width: 100%; margin-bottom: 22px; }
.stepper__item {
  flex: 1; min-width: 0; text-align: center; padding: 14px 8px 12px;
  border-radius: 16px; transition: all .2s; background: #f4f6fb; border: 1px solid var(--c-border);
}
.stepper__item.is-done { background: var(--c-primary-soft); border-color: #cbdcff; }
.stepper__item.is-active { background: #fff; border: 2px solid var(--c-primary); box-shadow: 0 8px 20px rgba(47, 107, 246, .16); }
.stepper__badge {
  width: 30px; height: 30px; margin: 0 auto 8px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-round); font-weight: 700; font-size: 14px;
  background: #e2e7f0; color: var(--c-muted2);
}
.stepper__item.is-done .stepper__badge { background: var(--c-primary); color: #fff; }
.stepper__item.is-active .stepper__badge { background: linear-gradient(135deg, #3d7bff, #2a5fe6); color: #fff; }
.stepper__label { font-size: 13px; font-weight: 700; font-family: var(--font-round); color: var(--c-muted2); }
.stepper__item.is-done .stepper__label { color: var(--c-primary-dark); }
.stepper__item.is-active .stepper__label { color: var(--c-text); }
.stepper__sub { font-size: 11px; color: var(--c-muted2); margin-top: 2px; min-height: 14px; line-height: 1.3; }

/* ===== 計算サマリー ===== */
.calc-box { background: var(--c-primary-soft); border-radius: 16px; padding: 16px 18px; margin-top: 6px; }
.calc-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; color: var(--c-body); }
.calc-row.total {
  border-top: 1px dashed #b9d0f5; margin-top: 8px; padding-top: 10px;
  font-family: var(--font-round); font-weight: 700; font-size: 17px; color: var(--c-primary-dark);
}

/* ===== AI 出力欄 ===== */
.ai-output {
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: #f8fafe; padding: 14px; white-space: pre-wrap;
  font-size: 14px; line-height: 1.8; min-height: 100px;
}
.ai-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  font-weight: 700; color: #7c4dff; background: #f1ecff; border-radius: 999px;
  padding: 4px 11px; margin-bottom: 8px;
}
.ai-callout {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(135deg, #eef4ff, #f3f0ff); border-radius: 16px;
  padding: 16px 18px; margin-top: 8px;
}
.ai-callout .em { flex: 0 0 auto; font-size: 18px; }
.ai-callout p { font-size: 13px; color: var(--c-body); line-height: 1.65; margin: 0; }
.ai-callout strong { color: var(--c-primary-dark); }

/* ===== プレビュー ===== */
.preview-wrap { background: #5b6472; border-radius: var(--radius-card); padding: 14px; overflow: hidden; }

/* ===== 出張報告書シート (PDF/プレビュー共通：公式フォーマット準拠・変更しない) ===== */
.pdf-stage { position: fixed; left: -10000px; top: 0; }
.report-sheet {
  width: 794px;
  min-height: 1123px;
  background: #fff;
  color: #000;
  padding: 54px 56px;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  box-sizing: border-box;
}
.report-sheet.is-preview { width: 794px; min-height: auto; box-shadow: var(--shadow-lg); border-radius: 4px; transform-origin: top left; }
.rs-title { text-align: center; font-size: 26px; font-weight: 700; letter-spacing: .35em; margin: 0 0 26px; }
.rs-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rs-table th, .rs-table td { border: 1px solid #333; padding: 9px 10px; font-size: 14px; vertical-align: top; word-break: break-word; }
.rs-table th { background: #d9d9d9; font-weight: 600; text-align: center; width: 110px; white-space: nowrap; }
.rs-content-head { background: #d9d9d9; text-align: center; font-weight: 600; font-size: 14px; }
.rs-content-body { height: 560px; vertical-align: top; line-height: 1.9; font-size: 13.5px; white-space: pre-wrap; }

/* ===== 旅費規程シート (公式フォーマット準拠・変更しない) ===== */
.reg-title { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: .5em; margin: 6px 0 34px; }
.reg-body { font-size: 14px; line-height: 1.9; }
.reg-art { display: flex; gap: 14px; margin-bottom: 18px; }
.reg-no { flex: 0 0 56px; font-weight: 600; white-space: nowrap; }
.reg-text { flex: 1; }
.reg-table { display: block; margin: 10px 0 4px 28px; }
.reg-trow { display: flex; gap: 24px; padding: 2px 0; }
.reg-trow > span:first-child { flex: 0 0 110px; }
.reg-trow > span:nth-child(2) { flex: 0 0 40px; }
.reg-pos { display: flex; align-items: flex-start; gap: 16px; padding: 4px 0; }
.reg-pos-name { flex: 0 0 130px; }
.reg-pos-amts { display: flex; flex-direction: column; }
.reg-pos-amts > span { line-height: 1.8; }
.reg-date { margin: 30px 0 18px 28px; font-size: 14px; }
.reg-sign { margin-left: 120px; font-size: 14px; line-height: 2.2; }
.reg-sign-l { display: inline-block; width: 84px; }

/* 役職エディタ（規程の第5条） */
.pos-row { border: 1px solid var(--c-border); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; background: #f8fafe; }
.pos-row__head { display: flex; gap: 8px; align-items: center; }
.pos-row__head .input { flex: 1; background: #fff; }
.pos-del { width: 40px; height: 44px; flex: 0 0 auto; border: 1.5px solid #f3c9c9; background: #fff; color: var(--c-danger); border-radius: var(--radius-sm); font-size: 15px; }
.pos-del:hover { background: #fdecec; }
.pos-mini-label { font-size: 11px; color: var(--c-muted2); margin: 10px 0 4px; display: block; font-weight: 700; }
.pos-row .input { background: #fff; }

/* ===== アカウント / 課金 ===== */
.plan-card {
  border: 2px solid var(--c-primary); border-radius: var(--radius-card);
  padding: 24px; background: linear-gradient(180deg, #fff, #f7faff);
}
.plan-card .price { font-family: var(--font-round); font-size: 32px; font-weight: 900; color: var(--c-text); }
.plan-card .price small { font-size: 14px; font-weight: 700; color: var(--c-muted); }
.feature-list { list-style: none; padding: 0; margin: 16px 0 20px; }
.feature-list li { padding: 7px 0 7px 28px; position: relative; font-size: 13.5px; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--c-accent); font-weight: 900; }

/* ===== トースト ===== */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: var(--c-text); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; font-family: var(--font-round); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 60; max-width: 90vw; text-align: center;
  box-shadow: 0 10px 30px rgba(28, 42, 74, .3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--c-danger); }

/* ===== 認証（ログイン / 新規登録） ===== */
body.auth-mode .tabbar { display: none; }
body.auth-mode #planBadge { display: none; }
.auth-wrap { max-width: 400px; margin: 4vh auto 0; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .brand__logo { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; margin: 0 auto 14px; }
.auth-brand h1 { font-family: var(--font-round); font-weight: 700; font-size: 22px; color: var(--c-text); margin: 0 0 6px; }
.auth-brand p { font-size: 13.5px; color: var(--c-muted); margin: 0; }
.auth-card { padding: 22px; }
.auth-tabs { display: flex; background: #eef2f9; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; border: none; background: none; padding: 10px; border-radius: 9px;
  font-family: var(--font-round); font-weight: 700; font-size: 14px; color: var(--c-muted);
}
.auth-tab.is-active { background: #fff; color: var(--c-primary); box-shadow: 0 2px 8px rgba(31, 45, 75, .08); }
.auth-msg { font-size: 12.5px; min-height: 18px; margin: 2px 2px 12px; color: var(--c-danger); font-weight: 600; }
.auth-foot { text-align: center; font-size: 11.5px; color: var(--c-muted2); margin: 16px auto 0; max-width: 360px; line-height: 1.6; }

/* ===== バナー広告（AdSense・無料プラン） ===== */
.ad-slot { display: block; margin: 18px 0; min-height: 90px; }
.ad-placeholder {
  margin: 18px 0; min-height: 92px; border: 1px dashed var(--c-border-input); border-radius: 14px;
  background: repeating-linear-gradient(45deg, #f6f8fc, #f6f8fc 10px, #eef2f9 10px, #eef2f9 20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--c-muted2); text-align: center; padding: 12px;
}
.ad-placeholder span { font-family: var(--font-round); font-weight: 700; font-size: 13px; color: var(--c-muted); }
.ad-placeholder small { font-size: 11px; }

/* ===== 旧：全画面広告（未使用） ===== */
.ad-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 22, 38, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
  animation: adfade .2s ease;
}
@keyframes adfade { from { opacity: 0; } to { opacity: 1; } }
.ad-modal {
  width: 100%; max-width: 360px; background: #fff; border-radius: 22px;
  padding: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  animation: adpop .22s ease;
}
@keyframes adpop { from { transform: translateY(12px) scale(.98); opacity: .6; } to { transform: none; opacity: 1; } }
.ad-modal__label {
  font-size: 11px; font-weight: 700; color: var(--c-muted2); letter-spacing: .08em;
  text-transform: uppercase; margin: 2px 2px 10px; display: flex; align-items: center; gap: 6px;
}
.ad-modal__label::before { content: "AD"; background: #ffce47; color: #5a4500; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 5px; }
.ad-creative {
  border-radius: 16px; padding: 26px 20px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #6a5cff, #9b4dff); position: relative; overflow: hidden;
}
.ad-creative__pr { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; background: rgba(255, 255, 255, .25); padding: 3px 7px; border-radius: 6px; }
.ad-creative__icon { font-size: 40px; line-height: 1; }
.ad-creative__title { font-family: var(--font-round); font-weight: 700; font-size: 17px; margin: 10px 0 6px; }
.ad-creative__desc { font-size: 12.5px; opacity: .92; line-height: 1.6; margin-bottom: 14px; }
.ad-creative__cta { display: inline-block; background: #fff; color: #6a3dff; font-weight: 700; font-size: 13px; padding: 9px 20px; border-radius: 999px; font-family: var(--font-round); }
.ad-modal__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 4px 4px; }
.ad-modal__timer { font-size: 12.5px; color: var(--c-muted); }
.ad-modal__close { flex: 0 0 auto; width: auto; padding: 10px 16px; }
.ad-upgrade {
  display: block; width: 100%; text-align: center; margin-top: 10px;
  background: var(--c-primary-soft); color: var(--c-primary-dark); border: none;
  font-family: var(--font-round); font-weight: 700; font-size: 13px; padding: 11px; border-radius: 12px;
}
.ad-upgrade:hover { background: #dbe7ff; }

/* ===== 下部タブバー ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-border);
  display: flex; padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
}
.tabbar__item {
  flex: 1; background: none; border: 0; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--c-muted2); font-size: 10.5px; font-weight: 700;
}
.tabbar__item.is-active { color: var(--c-primary); }
.tabbar__icon { font-size: 19px; line-height: 1; }

/* ===== 汎用 ===== */
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
.btn--ghost .spinner, .btn--sub .spinner { border-color: rgba(47, 107, 246, .3); border-top-color: var(--c-primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.note {
  font-size: 12.5px; color: var(--c-body); background: var(--c-primary-soft);
  border-radius: 16px; padding: 14px 16px; line-height: 1.65;
}
.note strong { color: var(--c-primary-dark); }
.divider { height: 1px; background: var(--c-border); margin: 16px 0; border: 0; }

@media (min-width: 760px) {
  .tabbar { display: none; }
  .view { padding-bottom: 40px; }
  .toast { bottom: 28px; }
}
@media (max-width: 540px) {
  .hero { padding: 28px 24px; }
  .hero h1 { font-size: 26px; }
  .hero__art { display: none; }
}
