/* PPC 掲載リクエスト・ツールのポータル（色は site-colors.md の色だけ） */

/* ---------- フォーム ---------- */
.ppcr { color: inherit; }
.ppcr .ppcr-h, .ppcr-portal .ppcr-h { margin: 0 0 12px; padding: 0 0 4px; font-size: 18px; font-weight: 700; line-height: 1.4; border: 0; border-bottom: 2px solid #424242; background: none; color: inherit; }
.ppcr .ppcr-h::before, .ppcr .ppcr-h::after, .ppcr-portal .ppcr-h::before, .ppcr-portal .ppcr-h::after { content: none !important; display: none !important; }
.ppcr-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.ppcr-lead { margin: 0 0 10px; font-size: 14px; line-height: 1.7; color: #555; }
.ppcr-target { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 8px 12px; background: #f7f7f7; border-radius: 6px; font-size: 14px; }
.ppcr-target span { font-size: 12px; color: #666; }
.ppcr-tabs { display: grid; grid-template-columns: repeat(var(--ppcr-n, 2), minmax(0, 1fr)); gap: 6px; }
.ppcr-tab { position: relative; margin: 0; }
.ppcr-tab input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ppcr-tab span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px; border: 1px solid #e5e5e5; border-radius: 6px; background: #fff; color: #222; font-size: 13px; font-weight: 700; text-align: center; cursor: pointer; }
.ppcr-tab input:checked + span { background: #424242; border-color: #424242; color: #fff; }
.ppcr-tab input:focus-visible + span { outline: 2px solid #3377ee; outline-offset: 2px; }
.ppcr-sec { display: none; }
.ppcr-sec.is-on, .ppcr-form:not(:has(.ppcr-tabs)) .ppcr-sec { display: block; }
.ppcr-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ppcr-f { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: 0; font-size: 13px; font-weight: 700; min-width: 0; }
.ppcr-f legend { padding: 0; margin-bottom: 4px; font-weight: 700; }
.ppcr-form input[type=text], .ppcr-form input[type=email], .ppcr-form select, .ppcr-form textarea { width: 100%; box-sizing: border-box; border: 1px solid #ccc; border-radius: 6px; padding: 9px 10px; font-size: 16px; font-weight: 400; background: #fff; color: #222; margin: 0; }
.ppcr-form textarea { resize: vertical; min-height: 80px; }
.ppcr-choices { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ppcr-choice { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-weight: 400; font-size: 14px; }
.ppcr-req { margin-left: 4px; color: #c8322f; font-size: 11px; }
.ppcr-opt { margin-left: 4px; color: #666; font-size: 11px; font-weight: 400; }
.ppcr-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid #eee; }
.ppcr-foot .ppcr-opt { margin: 0; line-height: 1.5; }
.ppcr-foot button { flex-shrink: 0; min-height: 44px; padding: 0 22px; border: 0; border-radius: 6px; background: #2e7d32; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.ppcr-msg { margin: 0 0 12px; padding: 10px 12px; border-radius: 6px; font-size: 14px; line-height: 1.6; }
.ppcr-msg--ok { background: #f1f8f1; color: #2e7d32; }
.ppcr-msg--err { background: #fdf0ef; color: #c8322f; }
.ppcr-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* 単体ページの下の欄 */
.ppcr-box { margin: 2em 0 0; border: 1px solid #e5e5e5; border-radius: 6px; background: #fff; }
.ppcr-box > summary { padding: 12px 16px; font-size: 14px; font-weight: 700; color: #3377ee; cursor: pointer; list-style: none; }
.ppcr-box > summary::-webkit-details-marker { display: none; }
.ppcr-box > summary::before { content: "＋"; margin-right: 6px; color: #666; }
.ppcr-box[open] > summary::before { content: "－"; }
.ppcr-box > .ppcr { padding: 0 16px 16px; }
.post_content .ppcr-box p { margin-bottom: 0; }

@media (min-width: 600px) {
	.ppcr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ppcr-f--wide { grid-column: 1 / -1; }
}

/* ---------- ツールのポータル ---------- */
.ppcr-tools-page .l-mainContent__inner { background: transparent !important; padding: 0 !important; box-shadow: none !important; }
.-frame-on.ppcr-tools-page .l-mainContent__inner { background-color: transparent !important; }
.ppcr-tools-page .l-mainContent__inner > .post_content { margin-top: 0; padding: 0; }
.ppcr-tools-page .c-pageTitle, .ppcr-tools-page .p-articleHead { display: none; }
.ppcr-portal { display: flex; flex-direction: column; gap: 16px; color: #222; }
.ppcr-portal p { margin: 0; }
.ppcr-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 6px; padding: 16px; }
.ppcr-hero { border-top: 3px solid #424242; display: flex; flex-direction: column; gap: 6px; }
.ppcr-portal .ppcr-title { margin: 0; padding: 0; font-size: 22px; font-weight: 700; line-height: 1.4; border: 0; background: none; }
.ppcr-portal .ppcr-lead { margin: 0; }
.ppcr-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ppcr-today { display: flex; flex-direction: column; gap: 8px; }
.ppcr-kick { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #666; }
.ppcr-lab { display: inline-block; padding: 2px 7px; border-radius: 3px; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.5; }
.ppcr-lab--g { background: #2e7d32; }
.ppcr-lab--r { background: #c8322f; }
.ppcr-lab--line { margin-right: 6px; border: 1px solid #c8322f; color: #c8322f; padding: 0 5px; }
.ppcr-term { font-size: 20px; font-weight: 700; line-height: 1.4; }
.ppcr-yomi { margin-left: 8px; font-size: 13px; font-weight: 400; color: #666; }
.ppcr-text { display: block; font-size: 14px; line-height: 1.7; color: #555; }
.ppcr-kinen { font-size: 14px; font-weight: 700; }
.ppcr-chara { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ppcr-chara li { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0; }
.ppcr-chara b { font-size: 16px; }
.ppcr-sub { display: block; font-size: 12px; color: #666; font-weight: 400; }
.ppcr-chara .ppcr-sub { display: inline; margin-left: 8px; }
.ppcr-ps { display: inline-flex; gap: 3px; flex-shrink: 0; }
.ppcr-b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 3px; color: #fff; font-size: 11px; font-weight: 700; }
.ppcr-b--p { background: #00bcd4; }
.ppcr-b--s { background: #ff9800; }
.ppcr-portal a.ppcr-go, .ppcr-tool .ppcr-go { align-self: flex-end; font-size: 14px; font-weight: 700; color: #3377ee; text-decoration: none; }
.ppcr-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ppcr-portal a.ppcr-tool { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid #e5e5e5; border-top-width: 3px; border-radius: 6px; color: #222; text-decoration: none; }
.ppcr-portal a.ppcr-tool:hover { border-color: #2e7d32; }
.ppcr-tool--g { border-top-color: #4caf50 !important; }
.ppcr-tool--r { border-top-color: #c8322f !important; }
.ppcr-tool--p { border-top-color: #00bcd4 !important; }
.ppcr-tool--s { border-top-color: #ff9800 !important; }
.ppcr-tool__n { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.ppcr-tag { padding: 1px 6px; border-radius: 3px; color: #fff; font-size: 11px; font-weight: 700; }
.ppcr-tag--p { background: #00bcd4; }
.ppcr-tag--s { background: #ff9800; }
.ppcr-nums { display: flex; gap: 16px; font-size: 12px; color: #666; }
.ppcr-nums b { font-size: 18px; color: #222; }
.ppcr-nums b.ppcr-num--g { color: #2e7d32; }
.ppcr-nums b.ppcr-num--r { color: #c8322f; }
.ppcr-reqs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.ppcr-portal a.ppcr-reqlink { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: #f7f7f7; border-radius: 6px; color: #222; text-decoration: none; }
.ppcr-reqlink b { font-size: 15px; }

@media (min-width: 600px) {
	.ppcr-pair, .ppcr-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ppcr-reqs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
	.ppcr-portal { gap: 24px; }
	.ppcr-card { padding: 20px; }
	.ppcr-portal .ppcr-title { font-size: 28px; }
	.ppcr .ppcr-h, .ppcr-portal .ppcr-h { font-size: 20px; }
}

/* ---------- ダークモード（D0 の変数） ---------- */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ppcr-card,
	:root:not([data-theme="light"]) .ppcr-box { background: var(--dk-card); border-color: var(--dk-border); }
	:root:not([data-theme="light"]) .ppcr-portal,
	:root:not([data-theme="light"]) .ppcr-portal a.ppcr-tool,
	:root:not([data-theme="light"]) .ppcr-portal a.ppcr-reqlink { color: var(--dk-text); }
	:root:not([data-theme="light"]) .ppcr-portal a.ppcr-tool { border-color: var(--dk-border); }
	:root:not([data-theme="light"]) .ppcr-portal a.ppcr-reqlink,
	:root:not([data-theme="light"]) .ppcr-target { background: var(--dk-input); }
	:root:not([data-theme="light"]) .ppcr .ppcr-h,
	:root:not([data-theme="light"]) .ppcr-portal .ppcr-h { border-bottom-color: var(--dk-hover); }
	:root:not([data-theme="light"]) .ppcr-lead,
	:root:not([data-theme="light"]) .ppcr-text,
	:root:not([data-theme="light"]) .ppcr-sub,
	:root:not([data-theme="light"]) .ppcr-kick,
	:root:not([data-theme="light"]) .ppcr-yomi,
	:root:not([data-theme="light"]) .ppcr-nums,
	:root:not([data-theme="light"]) .ppcr-opt,
	:root:not([data-theme="light"]) .ppcr-target span { color: var(--dk-sub); }
	:root:not([data-theme="light"]) .ppcr-nums b { color: var(--dk-text); }
	:root:not([data-theme="light"]) .ppcr-nums b.ppcr-num--g { color: var(--dk-green); }
	:root:not([data-theme="light"]) .ppcr-form input[type=text],
	:root:not([data-theme="light"]) .ppcr-form input[type=email],
	:root:not([data-theme="light"]) .ppcr-form select,
	:root:not([data-theme="light"]) .ppcr-form textarea { background: var(--dk-input); border-color: var(--dk-border); color: var(--dk-text); }
	:root:not([data-theme="light"]) .ppcr-tab span { background: transparent; border-color: var(--dk-border); color: var(--dk-text); }
	:root:not([data-theme="light"]) .ppcr-tab input:checked + span { background: var(--dk-hover); border-color: var(--dk-hover); color: #fff; }
	:root:not([data-theme="light"]) .ppcr-foot { border-top-color: var(--dk-border); }
	:root:not([data-theme="light"]) .ppcr-box > summary,
	:root:not([data-theme="light"]) .ppcr-portal a.ppcr-go,
	:root:not([data-theme="light"]) .ppcr-tool .ppcr-go { color: var(--dk-blue); }
}
