.cihp-front { --cihp-c: #1f5f8b; max-width: 920px; margin: 0 auto; font-size: 16px; line-height: 1.7; }
.cihp-front .cihp-form fieldset { border: 1px solid #d0d4d9; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.cihp-front legend { font-weight: 700; padding: 0 6px; }
.cihp-front .cihp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 8px; }
.cihp-front .cihp-rooms { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.cihp-front label { display: block; font-size: 14px; }
.cihp-front input[type=text], .cihp-front input[type=email], .cihp-front input[type=tel], .cihp-front input[type=number], .cihp-front select { width: 100%; padding: 8px; font-size: 16px; border: 1px solid #b9bec4; border-radius: 6px; box-sizing: border-box; margin-top: 4px; }
.cihp-front .cihp-check { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.cihp-front .cihp-check input { width: auto; margin: 0; }
.cihp-front .cihp-btn { display: inline-block; background: var(--cihp-c); color: #fff; border: none; border-radius: 8px; padding: 12px 20px; font-size: 16px; cursor: pointer; }
.cihp-front .cihp-btn2 { background: #2f7d4f; }
.cihp-front .cihp-small { font-size: 13px; color: #555; }
.cihp-front .cihp-hp { position: absolute; left: -9999px; }
.cihp-front .cihp-box { border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.cihp-front .cihp-ok { background: #eef7f1; border: 1px solid #9fd0b0; }
.cihp-front .cihp-err { background: #fdf0f0; border: 1px solid #e3a3a3; color: #8a2424; }
.cihp-color .cihp-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.cihp-color .cihp-tools button { border: 1px solid #b9bec4; background: #fff; border-radius: 6px; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.cihp-color .cihp-tools button.on { background: #e5f0f8; border-color: var(--cihp-c); color: var(--cihp-c); font-weight: 700; }
.cihp-color .cihp-file input { display: none; }
.cihp-color .cihp-hint { font-size: 14px; color: #333; background: #f6f7f8; border-radius: 6px; padding: 6px 10px; }
.cihp-color .cihp-canvas-wrap { border: 1px solid #d0d4d9; border-radius: 8px; overflow: auto; background: #f3f4f5; min-height: 120px; max-height: 80vh; position: relative; }
.cihp-color canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.cihp-color.cc-panning canvas { cursor: grab; }
.cihp-zoom { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; margin-left: 6px; }
.cihp-zoom button { min-width: 2.4em; }
.cihp-color .cihp-palette { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.cihp-color .cihp-palette button { display: inline-flex; gap: 6px; align-items: center; border: 1px solid #b9bec4; background: #fff; border-radius: 16px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.cihp-color .cihp-palette button.on { border: 2px solid var(--cihp-c); }
.cihp-color .cihp-palette i { width: 16px; height: 16px; border-radius: 3px; border: 1px solid #999; display: inline-block; }
.cihp-color .cihp-note { font-size: 13px; color: #8a4a00; background: #fff8ea; border: 1px solid #f0d8a8; border-radius: 6px; padding: 8px 10px; }
.cihp-front .cihp-floor { border-top: 1px dashed #d0d4d9; padding-top: 8px; margin-top: 8px; }
.cihp-front .cihp-floor h4 { margin: 4px 0 6px; font-size: 16px; }
.cihp-front .cihp-floor-sum { font-weight: 400; font-size: 13px; color: #555; }
.cihp-front .cihp-room-row, .cihp-front .cihp-room-head-row { display: grid; grid-template-columns: 1.8fr 1.1fr 1.1fr 1.1fr 40px; gap: 6px; align-items: center; margin-bottom: 6px; }
.cihp-front .cihp-room-row select { margin-top: 0; }
.cihp-front .cihp-del { border: 1px solid #d6b3b3; background: #fff; color: #8a2424; border-radius: 6px; height: 38px; font-size: 18px; cursor: pointer; }
.cihp-front .cihp-btn-sub { border: 1px dashed var(--cihp-c); background: #fff; color: var(--cihp-c); border-radius: 6px; padding: 8px 12px; font-size: 14px; cursor: pointer; margin: 4px 0 8px; }
.cihp-front .cihp-total { font-weight: 700; color: var(--cihp-c); }
.cihp-front details { margin: 6px 0; }
.cihp-front .cihp-note { background: #f3f8fc; border: 1px solid #b7d2e6; border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.cihp-front .cihp-plans { border: 1px solid #d0d4d9; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; background: #fafbfc; }
.cihp-front .cihp-plans h3 { margin: 0 0 8px; font-size: 16px; }
.cihp-front .cihp-plan { border-top: 1px solid #e3e6e9; padding: 8px 0; }
.cihp-front .cihp-plan p { margin: 4px 0 0; font-size: 14px; }
.cihp-front .cihp-paint { font-size: 14px; color: #1f5f8b; }
.cihp-front .cihp-cal { max-width: 420px; margin: 6px 0 10px; }
.cihp-front .cihp-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cihp-front .cihp-cal-head button { border: 1px solid #b9bec4; background: #fff; border-radius: 6px; width: 44px; height: 38px; font-size: 20px; cursor: pointer; }
.cihp-front .cihp-cal-head button:disabled { opacity: .3; cursor: default; }
.cihp-front .cihp-cal table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cihp-front .cihp-cal th { font-size: 13px; font-weight: 600; padding: 4px 0; text-align: center; }
.cihp-front .cihp-cal td { padding: 2px; text-align: center; }
.cihp-front .cihp-cal td button { width: 100%; height: 48px; border: 1px solid #d0d4d9; background: #fff; border-radius: 6px; font-size: 16px; cursor: pointer; line-height: 1.1; }
.cihp-front .cihp-cal td button small { display: block; font-size: 10px; }
.cihp-front .cihp-cal td button:disabled { background: #f2f3f4; color: #bbb; border-color: #eee; cursor: default; }
.cihp-front .cihp-cal td button.on { background: var(--cihp-c); color: #fff; border-color: var(--cihp-c); font-weight: 700; }
.cihp-front .cihp-cal .w0 { color: #c0392b; }
.cihp-front .cihp-cal .w6 { color: #1f5f8b; }
.cihp-front .cihp-cal td button.on.w0, .cihp-front .cihp-cal td button.on.w6 { color: #fff; }
.cihp-front .cihp-pick { display: flex; gap: 10px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.cihp-front .cihp-pick select { width: auto; margin-top: 0; }
.cihp-front .cihp-pick .cihp-del { width: 40px; }
.cihp-front .cihp-err-inline { color: #8a2424; font-weight: 600; }
/* 施工実績 */
.cihp-work-info { border-collapse: collapse; margin: 0 0 1.2em; width: 100%; max-width: 560px; }
.cihp-work-info th, .cihp-work-info td { border-bottom: 1px solid #e2e4e7; padding: .5em .6em; text-align: left; vertical-align: top; }
.cihp-work-info th { width: 5.5em; color: #555; font-weight: 600; white-space: nowrap; }
.cihp-ba { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: .8em 0 1.4em; }
.cihp-ba figure { margin: 0; }
.cihp-ba img { width: 100%; height: auto; border-radius: 6px; display: block; }
.cihp-ba figcaption { font-size: .85em; color: #555; text-align: center; margin-top: 3px; }
.cihp-diary { border-top: 1px solid #e2e4e7; padding-top: .6em; }
.cihp-diary h3 { font-size: 1.05em; margin: .4em 0; }
.cihp-work-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.5em 0 .8em; }
.cihp-work-links a { border: 1px solid #c3c4c7; border-radius: 16px; padding: .3em .9em; text-decoration: none; font-size: .9em; }
.cihp-work-cta a { display: inline-block; background: #2271b1; color: #fff; padding: .7em 1.2em; border-radius: 6px; text-decoration: none; font-weight: 600; }
.cihp-ba-main { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 0; }
.cihp-ba-main figure { position: relative; }
.cihp-ba-tag { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.65); color: #fff; font-weight: 700; padding: .15em .7em; border-radius: 4px; font-size: .95em; }
.cihp-ba-tag.is-after { background: #2271b1; }
@media (max-width: 480px) { .cihp-ba-main { grid-template-columns: 1fr; } }
.cihp-rec-part { margin-top: 1.6em; border-left: 4px solid #2271b1; padding-left: .5em; border-radius: 0; }
.cihp-diary h4 { margin: .6em 0 .3em; font-size: 1em; }
.cihp-scope { list-style: none; padding: 0; margin: .5em 0 1.5em; }
.cihp-scope li { border-bottom: 1px solid #e2e4e7; padding: .6em 0; line-height: 1.7; }
.cihp-scope-area { margin-left: .6em; color: #555; font-size: .9em; }
/* スタッフ日記 */
.cihp-nikki-kind { display: inline-block; background: #f0f6fc; color: #135e96; border-radius: 12px; padding: .1em .8em; font-size: .85em; margin: 0 0 .6em; }
.cihp-nikki-photos { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cihp-nikki-work { background: #f6f7f7; border-radius: 6px; padding: .6em .9em; }
/* 建物のまわりの長さ */
.cihp-front .cihp-per-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px 10px; align-items: end; }
.cihp-front .cihp-per-row label { font-size: 13px; }
.cihp-front .cihp-per-row input { width: 100%; }
.cihp-front .cihp-per-total input { font-weight: 700; border-color: var(--cihp-c, #2271b1); }
.cihp-front .cihp-howto ul { margin: 4px 0 8px 1.2em; }
.cihp-front .cihp-wins label { font-size: 13px; }
.cihp-front .cihp-spread { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-left: 6px; }
.cihp-front .cihp-spread input { width: 110px; }
.cihp-front .cihp-tools2 { margin: 4px 0; font-size: 13px; }
/* v0.19.3 テーマ（Astraなど）に負けないように：両側に余白、カレンダーのボタンを整える */
.entry-content .cihp-front, .cihp-front { max-width: 780px !important; margin-left: auto !important; margin-right: auto !important; padding-left: 20px; padding-right: 20px; box-sizing: border-box; }
@media (max-width: 600px) { .entry-content .cihp-front, .cihp-front { padding-left: 12px; padding-right: 12px; } .cihp-front .cihp-form fieldset { padding: 10px 12px; } }
.cihp-front .cihp-cal { max-width: 440px; }
.cihp-front .cihp-cal button { padding: 0 !important; margin: 0 !important; min-height: 0 !important; line-height: 1.1 !important; letter-spacing: 0 !important; text-transform: none !important; white-space: nowrap !important; box-shadow: none !important; font-family: inherit !important; }
.cihp-front .cihp-cal td button { color: #222 !important; background: #fff !important; border: 1px solid #d0d4d9 !important; font-weight: 400 !important; font-size: 16px !important; height: 46px !important; width: 100% !important; border-radius: 6px !important; }
.cihp-front .cihp-cal td button.w0 { color: #c0392b !important; }
.cihp-front .cihp-cal td button.w6 { color: #1f5f8b !important; }
.cihp-front .cihp-cal td button:disabled { background: #f2f3f4 !important; color: #c3c6c9 !important; border-color: #eceef0 !important; }
.cihp-front .cihp-cal td button.on { background: var(--cihp-c) !important; color: #fff !important; border-color: var(--cihp-c) !important; font-weight: 700 !important; }
.cihp-front .cihp-cal-head button { color: #333 !important; background: #fff !important; border: 1px solid #b9bec4 !important; width: 44px !important; height: 38px !important; font-size: 22px !important; border-radius: 6px !important; }
.cihp-front .cihp-cal-head button:disabled { opacity: .35; }
.cihp-front .cihp-cal-head strong { font-size: 17px; }
.cihp-front .cihp-cal table { border: none !important; margin: 0 !important; }
.cihp-front .cihp-cal th, .cihp-front .cihp-cal td { border: none !important; padding: 2px !important; background: transparent !important; }
.cihp-front h3 { margin-top: .4em; }
.cihp-front .cihp-picked button { padding: 4px 12px !important; min-height: 0 !important; line-height: 1.2 !important; color: #8a2424 !important; background: #fff !important; border: 1px solid #d6b3b3 !important; border-radius: 6px !important; font-size: 15px !important; box-shadow: none !important; }
.cihp-front .cihp-picked select { width: auto !important; margin-top: 0 !important; }
