.workspace { display: grid; grid-template-columns: .95fr 1.05fr; gap: 24px; align-items: start; }
.dimensions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { flex-shrink: 0; width: 20px; height: 20px; accent-color: var(--accent); }
#error { font-size: 0.875rem; color: #a13524; }
#error:empty { display: none; }
.badge[data-status="ギリギリ"] { background: #fff0ce; color: #795408; }
.badge[data-status="入らない"] { background: #ffe9e5; color: #982f21; }
.reserve-note { font-size: 0.8125rem; color: var(--muted); margin: 0 0 16px; }
.arrangement { font-weight: 750; font-size: 1rem; margin: 0; }
.arrangement > span { color: #677d82; padding: 0 2px; }
.placement { margin: 12px 0 20px; }
svg { width: 100%; display: block; max-height: 260px; }
svg text { font: 13px system-ui; fill: #405b62; }
figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; font-size: 0.75rem; color: var(--muted); }
figcaption > span:last-child { margin-left: 6px; }
.legend-swatch { width: 10px; height: 10px; background: #cce8e3; border: 1px solid #227b70; }
.legend-swatch.gap { background: #edf1f2; border-color: #859ca2; margin-left: 6px; }
.orientation { font-size: 0.875rem; color: var(--muted); line-height: 1.8; margin: 0 0 14px; }
.orientation strong { color: #25464d; font-weight: 600; }
dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #c6dfd9; padding-top: 14px; gap: 8px; margin: 0; }
dt { font-size: 0.875rem; color: var(--muted); }
dd { margin: 4px 0 0; font-size: 1.375rem; font-weight: 750; overflow-wrap: anywhere; }
dd small { font-size: 0.75rem; font-weight: 400; }
.remainder-note { font-size: 0.75rem; margin: 12px 0 0; }
.theoretical { margin-top: 16px; border: 1px solid var(--border); border-radius: 8px; }
.theoretical summary { padding: 16px; font-size: 0.875rem; }
.theoretical strong { font-size: 1.25rem; margin-left: 8px; }
.detail-label { color: var(--accent); font-size: 0.75rem; margin-left: 8px; }
.theory-content { padding: 0 16px 16px; }
.result-caution { color: var(--muted); font-size: 0.8125rem; margin: 16px 0 0; }
.result-caution a { display: inline-block; }
.empty, .zero-note { font-size: 0.875rem; color: var(--muted); }
.zero-note { background: #fff3d9; color: #725419; padding: 12px; border-radius: 6px; }
.pending-result { border: 1px dashed #bacdd1; padding: 36px 20px; border-radius: 10px; text-align: center; color: var(--muted); }
.pending-result p { font-weight: 650; margin: 0 0 8px; }
.pending-result span { font-size: 0.875rem; }
.purchase-note { border-left: 3px solid #c78b31; background: #fff9ed; font-size: 0.875rem; padding: 16px 20px; margin: 24px 0 0; color: #644f2d; }
.guide, .faq { margin-top: 48px; scroll-margin-top: 24px; }
.section-heading > p:last-child { color: var(--muted); margin: 8px 0 20px; }
.measure-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 0; gap: 16px; margin: 24px 0; }
.measure-steps li { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 22px; }
.step-number { color: var(--accent); font-size: 0.875rem; font-weight: 750; }
.measure-steps h3 { margin: 8px 0; }
.measure-steps p, .example p { color: var(--muted); margin: 0; }
.example { padding: 22px; border: 1px solid var(--border); border-radius: 10px; }
.example h3 { margin: 0 0 8px; }
.example .muted { margin-top: 8px; }
.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details p { color: var(--muted); margin: 0 0 20px; }
footer { border-top: 1px solid var(--border); font-size: 0.875rem; color: var(--muted); }
footer small { font-size: 0.75rem; }
@media (max-width: 720px) {
  header, footer { padding: 16px; }
  .brand { font-size: 1.125rem; }
  main { padding: 20px 16px 36px; }
  .workspace { grid-template-columns: 1fr; gap: 20px; }
  .panel { padding: 18px; }
  .intro > p:last-of-type { font-size: 0.875rem; }
  .page-links { margin-bottom: 16px; }
  .dimensions { gap: 8px; }
  .recommended { padding: 16px; }
  .measure-steps { grid-template-columns: 1fr; gap: 12px; }
  .measure-steps li { padding: 20px; }
  .guide, .faq { margin-top: 36px; }
  footer { align-items: start; flex-direction: column; gap: 8px; }
}
@media (max-width: 360px) {
  .panel { padding: 14px; }
  input[type=number] { font-size: 1.125rem; padding-left: 6px; }
  .recommended { padding: 12px; }
  .total { font-size: 3.375rem; }
}
/* 購入前の条件選択と奥行確認 */
.orientation-options { margin-bottom: 16px; }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; cursor: pointer; }
.choice input { flex: 0 0 auto; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--accent); }
.choice > span { display: block; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.choice strong { display: block; color: #25464d; font-size: .875rem; line-height: 1.6; }
.choice small { display: block; font-size: .75rem; margin-top: 3px; line-height: 1.65; }
.choice:has(input:checked) strong { color: var(--accent); }
.margin-options { margin: 0 0 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.margin-options summary { padding: 14px 0; font-size: .875rem; }
.margin-options summary span { font-size: .75rem; color: var(--muted); font-weight: 400; margin-left: 8px; }
.margin-input { display: flex; align-items: center; max-width: 160px; background: #f7f9fa; border: 1px solid #aabfc4; border-radius: 6px; padding-right: 12px; margin: 10px 0; }
.margin-input:focus-within { outline: 3px solid #72bdb1; }
.top-view { border-top: 1px solid #c6dfd9; margin: 0 0 16px; }
.top-view summary { padding: 12px 0; font-size: .875rem; color: var(--accent); }
.empty { background: #fff5e3; color: #644f2d; padding: 14px; border-radius: 6px; }
.empty p { font-size: .8125rem; margin: 8px 0 0; }
.use-cases { margin-top: 40px; }
.use-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.use-grid h3 { margin: 12px 0 8px; }
.use-grid p { color: var(--muted); margin: 0; }
@media(max-width:720px) { .use-grid { grid-template-columns: 1fr; gap: 12px; } }
#copy-status:empty { display: none; }
#copy-text { width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #aabfc4; border-radius: 8px; font: inherit; font-size: 1rem; line-height: 1.65; resize: vertical; }
#copy-result:disabled { opacity: .65; cursor: wait; }
/* 運営者ページの長い連絡先もスマホ幅に収める */
a[href^="mailto:"] { overflow-wrap: anywhere; }
footer nav { font-size: .875rem; }
