/* IB 専用ページ web#548・web#549・web#550・web#569 — jp v2 の黒×金×クリーム。外部のフォントは読まない */
:root {
	--ink: #0c0a08;
	--ink2: #1a1a1a;
	--cream: #f5f0de;
	--paper: #fffdf6;
	--line: #e6dcc0;
	--g1: #e0c14a;
	--g2: #b98f25;
	--gdeep: #8a6d1d;
	--gold: linear-gradient(135deg, #f3d977 0%, #e0c14a 35%, #b98f25 100%);
	--text: #222;
	--muted: #6b6457;
	--up: #2e7d4f;
	--down: #b4472f;
	--serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
	--sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.ibp { background: var(--cream); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
a { color: var(--gdeep); }

/* 左のメニュー */
.ibp-side { position: fixed; inset: 0 auto 0 0; width: 260px; background: var(--ink); color: #eee; overflow-y: auto; }
.ibp-logo { display: block; padding: 26px 26px 22px; border-bottom: 1px solid #2a2620; }
.ibp-logo img { width: 190px; height: auto; display: block; }
.ibp-who { padding: 20px 26px; border-bottom: 1px solid #2a2620; }
.ibp-who b { display: block; font-size: 16px; letter-spacing: .04em; }
.ibp-who span { color: #aaa194; font-size: 13px; }
.ibp-navh { margin: 22px 26px 8px; color: #8c826f; font-size: 12px; letter-spacing: .2em; }
.ibp-nav a { display: flex; align-items: center; gap: 12px; padding: 13px 26px; color: #e9e3d3; text-decoration: none; border-left: 4px solid transparent; }
.ibp-nav a i { width: 18px; text-align: center; font-style: normal; color: #b9ad8f; font-size: 13px; }
.ibp-nav a:hover { background: #17140f; }
.ibp-nav a.on { background: #221d12; border-left-color: var(--g1); color: var(--g1); }
.ibp-nav a.on i { color: var(--g1); }

/* 本文 */
.ibp-main { margin-left: 260px; min-height: 100vh; }
.ibp-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; padding: 20px 36px; border-bottom: 1px solid var(--line); }
.ibp-top h1 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .06em; }
.ibp-meta { display: flex; gap: 18px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.ibp-meta a { color: var(--muted); text-decoration: none; }
.ibp-body { padding: 28px 36px 60px; max-width: 1280px; }

.ibp-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.ibp-empty h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 10px; }

.ibp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.ibp-stats.three { grid-template-columns: repeat(3, 1fr); }
.ibp-stat { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--g2); border-radius: 12px; padding: 18px 22px 20px; min-width: 0; }
.ibp-stat span { display: block; color: var(--muted); font-size: 13px; }
.ibp-stat b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.3; margin: 8px 0 4px; overflow-wrap: anywhere; }
.ibp-stat b small { font-size: 20px; color: var(--muted); }
.ibp-stat b.txt { font-size: 20px; }
.ibp-stat b.mono { font-family: var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.ibp-stat em { font-style: normal; font-size: 13px; color: var(--muted); }
.ibp-stat em.up { color: var(--up); }
.ibp-stat em.down { color: var(--down); }

.ibp-h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 12px; }
.ibp-h2 h2 { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .04em; }
.ibp-h2 span { color: var(--muted); font-size: 13px; }

.ibp-two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; margin-bottom: 26px; align-items: start; }
.ibp-two section { min-width: 0; }

.ibp-chart { display: flex; align-items: flex-end; gap: 12px; height: 250px; padding: 18px 22px 12px; }
.ibp-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.ibp-chart .val { font-size: 11px; line-height: 1.25; color: var(--muted); text-align: center; margin-bottom: 4px; overflow-wrap: anywhere; }
.ibp-chart .bar { width: 100%; max-width: 72px; background: linear-gradient(180deg, #e2c14c 0%, #b98f25 100%); border-radius: 4px 4px 0 0; }
.ibp-chart .bar.zero { background: #eee6cf; }
.ibp-chart .d { margin-top: 6px; font-size: 13px; color: var(--muted); }

.ibp-link { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1.5px dashed #d1b260; border-radius: 12px; padding: 14px 14px 14px 18px; }
.ibp-link code { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, Consolas, monospace; }
.ibp-copy { flex: none; border: 0; border-radius: 999px; background: var(--ink2); color: var(--g1); padding: 9px 18px; font-size: 14px; cursor: pointer; font-family: inherit; }
.ibp-copy:hover { background: #000; }
.ibp-note { color: var(--muted); font-size: 13px; margin: 10px 0 24px; }

.ibp-btn { display: inline-block; border: 0; border-radius: 999px; background: var(--gold); color: var(--ink); padding: 10px 22px; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; font-family: inherit; }
.ibp-btn.dark { background: var(--ink2); color: var(--g1); }
.ibp-btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 400; }
.ibp-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* 報酬の受け取り（web#549） */
.ibp-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--paper); border: 1px solid #d1b260; border-left: 4px solid var(--g2); border-radius: 12px; padding: 16px 22px; margin: -8px 0 28px; }
.ibp-cta p { margin: 0; }
.ibp-cta p b { font-family: var(--serif); font-size: 18px; }
.ibp-cta .ibp-btn { flex: none; }
.ibp-flash { border-radius: 10px; padding: 12px 18px; margin-bottom: 20px; font-size: 14px; }
.ibp-flash.ok { background: #e3f1e6; border: 1px solid #bfdcc8; color: #2e7d4f; }
.ibp-flash.ng { background: #f6e1db; border: 1px solid #ebc3b8; color: #b4472f; }
.ibp-pay { margin-bottom: 28px; }
.ibp-pay h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .04em; }
.ibp-pay p { margin: 0 0 16px; }
.ibp-pay p b { font-family: var(--serif); font-size: 18px; }
.ibp-pay p.ng { color: var(--down); }
.ibp-pay form { margin: 0; }
.ibp-pay .ibp-btn { padding: 13px 32px; font-size: 15px; }
.ibp-pay ul { margin: 18px 0 0; padding: 14px 0 0 1.2em; border-top: 1px solid #efe7d2; color: var(--muted); font-size: 13px; }
.ibp-pay li + li { margin-top: 4px; }

.ibp-table-wrap { overflow-x: auto; background: #fff; border-radius: 8px; margin-bottom: 8px; }
.ibp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ibp-table th { background: var(--ink2); color: var(--g1); text-align: left; font-weight: 700; padding: 13px 16px; white-space: nowrap; }
.ibp-table td { padding: 13px 16px; border-bottom: 1px solid #efe7d2; white-space: nowrap; }
.ibp-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.ibp-table td.url { white-space: normal; overflow-wrap: anywhere; min-width: 260px; }
.ibp-table td.url code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.ibp-table td.act { text-align: right; }
.ibp-table td.none { text-align: center; color: var(--muted); padding: 26px; }
.ibp-table td.mono { font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.ibp-table tr.sel td { background: #fbf5e2; }
.ibp-table tr.sum td { font-weight: 700; background: #faf6ea; }

.ibp-badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eee8da; color: #6b6457; }
.ibp-badge.active, .ibp-badge.p1, .ibp-badge.p5 { background: #e3f1e6; color: #2e7d4f; }
.ibp-badge.dormant { background: #ece7dc; color: #6b6457; }
.ibp-badge.p0, .ibp-badge.p4 { background: #fbecd0; color: #a8661b; }
.ibp-badge.p6 { background: #f6e1db; color: #b4472f; }
.ibp-badge.req-open { background: #fbecd0; color: #a8661b; }
.ibp-badge.req-paid { background: #e3f1e6; color: #2e7d4f; }

.ibp-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.ibp-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.ibp-filter select { min-width: 160px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 15px; font-family: inherit; color: var(--text); }
.ibp-filter .ibp-btn.dark { margin-left: auto; }

.ibp-qr { display: flex; gap: 26px; align-items: center; margin-bottom: 26px; }
.ibp-qr .qr { flex: none; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; line-height: 0; }
.ibp-qr p { margin: 0 0 12px; }

/* 用途別のリンク（web#569） */
.ibp-h2-links { align-items: center; margin-top: 22px; flex-wrap: wrap; }
.ibp-range { margin: 0; }
.ibp-range label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ibp-range select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 14px; font-family: inherit; color: var(--text); }
.ibp-funnel { margin-bottom: 20px; }
.ibp-funnel .ibp-stat { position: relative; }
.ibp-funnel .ibp-stat + .ibp-stat::before { content: "\203A"; position: absolute; left: -14px; top: 50%; transform: translateY(-50%); color: var(--g2); font-size: 22px; line-height: 1; }
.ibp-newlink { margin-bottom: 18px; padding: 18px 22px; }
.ibp-newlink label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.ibp-newlink .row { display: flex; gap: 12px; }
.ibp-newlink input[type=text] { flex: 1; min-width: 0; height: 44px; padding: 0 14px; font-size: 16px; font-family: inherit; color: var(--text); background: #fff; border: 1px solid #c9c2ab; border-radius: 8px; }
.ibp-newlink input[type=text]:focus { outline: none; border-color: var(--g2); box-shadow: 0 0 0 3px rgba(185, 143, 37, .28); }
.ibp-newlink input[disabled] { background: var(--paper); }
.ibp-newlink .ibp-btn { flex: none; }
.ibp-newlink small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.ibp-links td.head { white-space: normal; min-width: 150px; }
.ibp-links td.head small, .ibp-links td.r small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.ibp-links td.url { min-width: 0; white-space: nowrap; overflow-wrap: normal; }   /* 短い URL は 1 行で（- で折り返さない） */
.ibp-links td.act { min-width: 150px; }   /* ボタンを 2 つずつ 2 段に（3 段にしない） */
.ibp-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.ibp-acts form { margin: 0; }
.ibp-acts .ibp-copy { padding: 6px 14px; font-size: 13px; }
.ibp-mini, .ibp-qrpop summary { display: inline-block; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); padding: 5px 12px; font-size: 13px; line-height: 1.5; cursor: pointer; font-family: inherit; }
.ibp-mini:hover, .ibp-qrpop summary:hover { background: var(--paper); }
.ibp-mini.ng { color: var(--down); border-color: #ebc3b8; }
.ibp-qrpop summary { list-style: none; }
.ibp-qrpop summary::-webkit-details-marker { display: none; }
.ibp-qrpop[open] { order: 9; flex-basis: 100%; text-align: right; }
.ibp-qrpop[open] summary { background: var(--paper); border-color: var(--g2); }
.ibp-qrpop > div { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; line-height: 0; }
.ibp-qrpop > div a { font-size: 12px; line-height: 1.4; }
.ibp-notes { margin: 12px 0 28px; padding-left: 1.2em; color: var(--muted); font-size: 13px; }
.ibp-notes li + li { margin-top: 4px; }

/* スマホの下のタブ（PC では出さない） */
.ibp-tab { display: none; }

@media (max-width: 900px) {
	.ibp-stats { grid-template-columns: repeat(2, 1fr); }
	.ibp-stats.three { grid-template-columns: repeat(2, 1fr); }
	.ibp-two { grid-template-columns: 1fr; }
	.ibp-stats.three .ibp-stat:nth-child(3) { grid-column: 1 / -1; }
	.ibp-funnel .ibp-stat + .ibp-stat::before { content: none; }
}
@media (max-width: 760px) {
	body.ibp { padding-bottom: 72px; }
	.ibp-side { position: static; width: auto; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; overflow: visible; }
	.ibp-logo { padding: 16px 0; border: 0; }
	.ibp-logo img { width: 160px; }
	.ibp-who { padding: 0; border: 0; text-align: right; }
	.ibp-who b { font-size: 14px; color: var(--g1); }
	.ibp-who span { font-size: 11px; }
	.ibp-nav { display: none; }
	.ibp-main { margin-left: 0; min-height: 0; }
	.ibp-top { padding: 16px; }
	.ibp-top h1 { font-size: 21px; }
	.ibp-meta { flex-direction: column; align-items: flex-end; gap: 0; font-size: 12px; }
	.ibp-body { padding: 18px 16px 32px; }
	.ibp-stats, .ibp-stats.three { gap: 12px; }
	.ibp-stat { padding: 14px 14px 16px; }
	.ibp-stat b { font-size: 22px; }
	.ibp-stat b small { font-size: 15px; }
	.ibp-chart { height: 210px; gap: 6px; padding: 14px 10px 10px; }
	.ibp-chart .val { display: none; }
	.ibp-chart .d { font-size: 11px; }
	.ibp-link { flex-direction: column; align-items: stretch; }
	.ibp-link code { font-size: 13px; }
	.ibp-filter .ibp-btn.dark { margin-left: 0; }
	.ibp-filter label { flex: 1 1 140px; min-width: 0; }
	.ibp-filter select { width: 100%; min-width: 0; }
	.ibp-qr { flex-direction: column; align-items: flex-start; }
	.ibp-h2-links { gap: 8px; }
	.ibp-newlink { padding: 16px; }
	.ibp-newlink .row { flex-direction: column; }
	.ibp-newlink .ibp-btn { display: block; width: 100%; text-align: center; }
	.ibp-table.stack.ibp-links td.head, .ibp-table.stack.ibp-links td.act { grid-column: 1 / -1; }
	.ibp-table.stack.ibp-links td.r small { display: inline; margin-left: 6px; }
	.ibp-table.stack.ibp-links td.url { white-space: normal; overflow-wrap: anywhere; }
	.ibp-acts { justify-content: flex-start; }
	.ibp-links td.act { min-width: 0; }
	.ibp-qrpop[open] { text-align: left; }
	.ibp-cta { flex-direction: column; align-items: stretch; margin-top: -4px; padding: 14px 16px; }
	.ibp-cta .ibp-btn, .ibp-pay .ibp-btn { display: block; width: 100%; text-align: center; }
	.ibp-pay { padding: 18px 16px; }
	/* 列の多い表は、スマホでは 1 行を 1 枚のカードにして、すべての列を画面の中に出す（見出しは各値の上に小さく） */
	.ibp-table.stack thead { display: none; }
	.ibp-table.stack, .ibp-table.stack tbody { display: block; }
	.ibp-table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px 16px; border-bottom: 1px solid #efe7d2; }
	.ibp-table.stack td { display: block; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
	.ibp-table.stack td.r { text-align: left; }
	.ibp-table.stack td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
	.ibp-table.stack td.head { font-weight: 700; font-size: 15px; }
	.ibp-table.stack td.head::before { content: none; }
	.ibp-table.stack td.badge { text-align: right; }
	.ibp-table.stack td.url, .ibp-table.stack td.none { grid-column: 1 / -1; min-width: 0; }
	.ibp-table.stack td.act { text-align: right; align-self: end; }
	/* 列の少ない表は、余白を詰めて報酬の欄を折り返し、横にはみ出さないようにする */
	.ibp-table.fit { font-size: 13px; }
	.ibp-table.fit th, .ibp-table.fit td { padding: 11px 8px; }
	.ibp-table.fit th:first-child, .ibp-table.fit td:first-child { padding-left: 12px; }
	.ibp-table.fit th:last-child, .ibp-table.fit td:last-child { padding-right: 12px; }
	.ibp-table.fit td.money { white-space: normal; overflow-wrap: anywhere; }
	.ibp-tab { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--ink); border-top: 1px solid #2a2620; padding-bottom: env(safe-area-inset-bottom); }
	.ibp-tab a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 10px; color: #b9ad8f; text-decoration: none; font-size: 12px; }
	.ibp-tab a i { font-style: normal; font-size: 14px; }
	.ibp-tab a.on { color: var(--g1); }
}

/* パスワードの設定・再設定の画面（password.php・web#550）。ログインの前なので左のメニューは無い */
body.ibp-auth { background: var(--cream); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.7; -webkit-text-size-adjust: 100%; }
.ibp-auth-wrap { max-width: 480px; margin: 0 auto; padding: 64px 16px 48px; }
.ibp-auth-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 28px rgba(60, 45, 10, .10); }
.ibp-auth-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); border-bottom: 3px solid var(--g2); padding: 20px 26px; }
.ibp-auth-head img { width: 170px; height: auto; display: block; }
.ibp-auth-head span { color: var(--g1); font-size: 11px; letter-spacing: .24em; }
.ibp-auth-body { padding: 28px 28px 30px; }
.ibp-auth-body h1 { margin: 0 0 14px; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .05em; padding-bottom: 10px; border-bottom: 2px solid #d9b84a; }
.ibp-auth-lead { margin: 0 0 18px; }
.ibp-auth-note { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.ibp-auth-err, .ibp-auth-ok { margin: 0 0 16px; padding: 10px 14px; font-size: 14px; border-radius: 8px; }
.ibp-auth-err { background: #fdf0ef; border: 1px solid #efc8c8; color: #8a2b1d; }
.ibp-auth-ok { background: #faf6e6; border: 1px solid #e6d9a5; color: #5a4710; font-weight: 700; }
.ibp-auth-form label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 700; }
.ibp-auth-form input[type=email], .ibp-auth-form input[type=password] { display: block; width: 100%; height: 48px; padding: 0 14px; font-size: 16px; font-family: inherit; color: var(--text); background: #fff; border: 1px solid #c9c2ab; border-radius: 8px; }
.ibp-auth-form input:focus { outline: none; border-color: var(--g2); box-shadow: 0 0 0 3px rgba(185, 143, 37, .28); }
.ibp-auth-form input.ro { background: var(--paper); color: var(--muted); }
.ibp-auth-hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.ibp-auth-btn { display: block; width: 100%; margin-top: 22px; padding: 14px 16px; border: 0; border-radius: 999px; background: var(--gold); color: var(--ink); font-family: inherit; font-size: 16px; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.ibp-auth-btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 400; }
.ibp-auth-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(185, 143, 37, .35); }
.ibp-auth-foot { margin: 20px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.ibp-auth-foot a { color: var(--gdeep); }
.ibp-auth-foot span { margin: 0 10px; color: #c9c2ab; }
@media (max-width: 760px) {
	.ibp-auth-wrap { padding: 28px 14px 40px; }
	.ibp-auth-head { padding: 16px 20px; }
	.ibp-auth-head img { width: 150px; }
	.ibp-auth-body { padding: 22px 20px 24px; }
	.ibp-auth-body h1 { font-size: 20px; }
}
