/* tool */
[hidden]{display:none!important}
.pal-fieldset{border:0;padding:0;margin:0;min-width:0}
.pal-fieldset legend{padding:0;margin-bottom:6px}
.pal-opt{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;margin-bottom:6px;border:1.5px solid var(--border);border-radius:8px;background:#fff}
.pal-opt input{margin-top:4px;width:20px;height:20px;flex:none;accent-color:var(--primary-d)}
.pal-opt input:disabled+label{color:#6B7280;opacity:.7}
.pal-opt label{display:flex;flex-direction:column;gap:2px;font-size:14px;line-height:1.6;cursor:pointer;min-height:44px;justify-content:center}
.pal-name{font-weight:700;color:var(--text)}
.pal-desc{font-size:14px;color:var(--muted)}
.pal-note{font-size:14px;color:var(--muted);line-height:1.6;margin-top:8px}
.form-error{margin:0 0 14px;padding:12px 14px;border:1.5px solid #9CA3AF;border-left-width:5px;border-radius:8px;background:#F3F4F6;color:var(--text);font-size:14px;line-height:1.6}
.form-error ul{margin:6px 0 0 1.2em}
.result-heading{font-size:15px;font-weight:700;margin:0 0 10px;color:var(--text)}
.result-heading:focus{outline:none}
.under18-note,.res-blocked{margin:0 0 14px;padding:12px 14px;border-radius:8px;background:#F3F4F6;border:1px solid var(--border);font-size:14px;line-height:1.7;color:var(--text)}
.res-method{font-size:12px;color:var(--muted);line-height:1.6;margin:0 0 14px}
.goal-sub,.goal-note{font-size:12px;color:var(--muted);margin-top:2px;line-height:1.5}
/* 差は中立の色(赤・緑・黄で良し悪しを示さない) */
#res-balance-row{background:#F3F4F6}
#res-balance{color:var(--text)}
/* notes */
#safety-notes{margin:0 0 14px;padding:12px 14px;border:1px solid var(--border);border-radius:8px;background:#F8FAFC;color:var(--text)}
#safety-notes .safety-note{margin:0 0 10px;font-size:14px;line-height:1.75;overflow-wrap:anywhere}
#safety-notes .safety-note:last-child{margin-bottom:0}
#safety-notes .safety-note a{color:#1d4ed8;text-decoration:underline;font-size:14px}
#safety-notes-dyn:empty{display:none}
#safety-notes-dyn{margin-bottom:10px}
.copy-status{min-height:1.4em;margin:6px 0 10px;font-size:14px;color:var(--text)}
@media print{#safety-notes,#res-method{display:block!important}}
/* a11y */
/* 文字は 14px 以上。index.html のインライン style は書き換えず、属性セレクタで引き上げる(.note・small は 13px まで許す) */
[style*="font-size:10px"],[style*="font-size: 10px"],[style*="font-size:11px"],[style*="font-size: 11px"],[style*="font-size:12px"],[style*="font-size: 12px"],[style*="font-size:13px"],[style*="font-size: 13px"],[style*="font-size:.8rem"],[style*="font-size: .8rem"],[style*="font-size:.83rem"],[style*="font-size: .83rem"],[style*="font-size:.85rem"],[style*="font-size: .85rem"],[style*="font-size:.87rem"],[style*="font-size: .87rem"]{font-size:14px!important}
.site-nav a,.breadcrumb,.tool-header p,.field-label,.field-g small,.gbtn,.sec-title,.ex-sel,.add-ex,.big-kcal-lbl,.bdr-lbl,.goal-lbl,.goal-unit,.sbtn,.reset-btn,.sec-sub,.feat-ttl,.feat-dsc,.howto-sub,.step-dsc,.faq-q,.faq-icon,.faq-a,.rel-lnk,.ex-detail-row,.food-chip,.weekly-proj,.res-method,.goal-sub,.goal-note{font-size:14px}
@media(max-width:600px){.ex-sel,.tool-header p{font-size:14px}}
small[id$="-error"]{font-size:14px!important;color:#991b1b!important;background:#fee2e2!important;line-height:1.6}
/* タップ対象は 44x44px 以上 */
.site-nav a,.breadcrumb a,.logo,.reset-btn,.sbtn,.add-ex,.rel-lnk,footer a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
.breadcrumb{display:flex;align-items:center;flex-wrap:nowrap}
.breadcrumb a{padding:0 4px}
.sbtn,.reset-btn,.add-ex{min-height:44px}
.reset-btn{width:100%}
a[style*="inline-block"],li>a:only-child{display:inline-flex!important;align-items:center;min-height:44px}
input[type=range]{min-height:44px;height:44px;cursor:pointer}
/* 結果の出現アニメは、動きを減らす設定のときは止める */
@media(prefers-reduced-motion:reduce){.r-content.show{animation:none!important}*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important}}
/* 同意バナー(共有物)が最後の本文と下端固定の計算ボタンを覆わない。高さは cbc-a11y.js が --cbc-banner-h に写す */
body{padding-bottom:var(--cbc-banner-h,0px)}
@media(max-width:600px){.calc-btn{bottom:var(--cbc-banner-h,0px)}}
#back-to-top{bottom:calc(24px + var(--cbc-banner-h,0px))!important}
/* 横あふれを防ぐ(長い語・表・拡大表示) */
.panel-body,.result-panel,.tool-grid>*{min-width:0}
img,svg,canvas,select,input{max-width:100%}
/* ads */
.ads-block{margin:32px 0 0;padding:20px 16px;background:#F3F4F6;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.ads-inner{max-width:740px;margin:0 auto}
.ads-title{font-size:16px;font-weight:700;color:var(--text);margin:0 0 8px}
.ads-note{font-size:14px;line-height:1.7;color:var(--text);margin:0 0 8px}
.ads-list{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:12px}
.ads-link{display:flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:1.5px solid #374151;border-radius:8px;background:#fff;color:#1F2937;font-size:14px;font-weight:600;line-height:1.5;text-align:center;text-decoration:none}
.ads-link:hover{background:#E5E7EB}
.ads-link:focus-visible{outline:3px solid #1D4ED8;outline-offset:2px}
@media print{#ads-block{display:none!important}}
