/* ホーム画面とパターン選択 */
.home{position:fixed;inset:0;z-index:60;background:var(--paper);overflow-y:auto;-webkit-overflow-scrolling:touch;color:var(--ink)}
.home[hidden]{display:none}
.home-top{max-width:640px;margin:0 auto;min-height:100%;display:flex;flex-direction:column;justify-content:center;padding:calc(env(safe-area-inset-top,0px) + 40px) 22px calc(env(safe-area-inset-bottom,0px) + 40px)}
.home-brand{display:flex;align-items:center;gap:14px;margin-bottom:38px}
.home-brand h1{margin:0;font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:27px;letter-spacing:1.6px}
.home-brand h1 small{font-family:Arial,sans-serif;font-size:12px;letter-spacing:1px;color:var(--sage);margin-left:4px}
.home-brand p{margin:5px 0 0;font-size:13px;color:var(--muted);letter-spacing:.6px}
.home-question{margin:0 0 16px;font-size:19px;font-weight:600}
.home-choices{display:grid;gap:13px}
.home-choice{display:flex;align-items:center;gap:16px;width:100%;text-align:left;padding:21px 18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow);transition:border-color .15s,transform .15s}
.home-choice:hover,.home-choice:focus-visible{border-color:var(--sage)}
.home-choice:active{transform:scale(.99)}
.home-choice-icon{flex:none;width:52px;height:52px;border-radius:14px;background:var(--sage-light);color:var(--sage);display:grid;place-items:center}
.home-choice-icon svg{width:25px;height:25px}
.home-choice-text{flex:1;min-width:0;display:grid;gap:6px}
.home-choice-text strong{font-size:19px;font-weight:600}
.home-choice-text small{font-size:13px;line-height:1.65;color:var(--muted)}
.home-choice-arrow{flex:none;width:20px;height:20px;color:#a3aa9f}
.home-continue{margin-top:22px;display:flex;align-items:center;gap:11px;padding:13px 16px;border-radius:12px;border:1px dashed #c3c6b9;color:#4a584c;width:100%;text-align:left}
.home-continue svg{width:19px;height:19px;flex:none}
.home-continue span{display:grid;gap:3px;font-size:14px;font-weight:600;min-width:0}
.home-continue small{font-weight:400;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.home-patterns{max-width:1080px;margin:0 auto;padding:calc(env(safe-area-inset-top,0px) + 16px) 16px calc(env(safe-area-inset-bottom,0px) + 34px)}
.home-bar{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.home-bar h2{margin:2px 0 0;font-size:21px;font-weight:600}
.home-eyebrow{font-size:12px;color:var(--sage);letter-spacing:.6px}
.home-back{flex:none;width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center}
.home-back svg{width:19px;height:19px}
.home-types{display:flex;gap:8px;overflow-x:auto;padding:4px 16px 10px;margin:0 -16px;scrollbar-width:none;position:sticky;top:0;background:var(--paper);z-index:2}
.home-types::-webkit-scrollbar{display:none}
.home-types button{flex:none;min-width:62px;padding:10px 15px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:15px;font-weight:600;color:#5a655b}
.home-types button.active{background:var(--sage);border-color:var(--sage);color:#fff}
.home-type-note{margin:6px 2px 14px;font-size:13px;color:var(--muted)}
.home-type-note strong{color:var(--ink);font-size:15px}
.home-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:12px}
.pattern-card{display:flex;flex-direction:column;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden;transition:border-color .15s,box-shadow .15s}
.pattern-card:hover,.pattern-card:focus-visible{border-color:var(--sage);box-shadow:var(--shadow)}
.pattern-card canvas{width:100%;height:158px;background:#f3f2ec;display:block}
.pattern-text{display:grid;gap:4px;padding:12px 13px 14px}
.pattern-text strong{font-size:15px;font-weight:600}
.pattern-text small{font-size:12px;color:var(--muted);line-height:1.5}
.pattern-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
.pattern-tags em{font-style:normal;font-size:11px;padding:3px 8px;border-radius:999px;background:var(--sage-light);color:#47604b}

.home-detail{max-width:640px}
.home-preview{width:100%;height:min(52vh,430px);background:#f3f2ec;border:1px solid var(--line);border-radius:14px;display:block}
.home-specs{margin:16px 0 0;display:grid;gap:0;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.home-specs div{display:flex;gap:14px;padding:11px 14px;border-top:1px solid var(--line)}
.home-specs div:first-child{border-top:0}
.home-specs dt{flex:none;width:44px;font-size:12px;color:var(--muted);padding-top:1px}
.home-specs dd{margin:0;font-size:14px;line-height:1.5}
.home-hint{font-size:12.5px;line-height:1.8;color:var(--muted);margin:14px 2px}
.home-actions{display:flex;gap:10px;position:sticky;bottom:0;padding:10px 0 calc(env(safe-area-inset-bottom,0px) + 4px);background:linear-gradient(#f7f6f200,var(--paper) 35%)}
.home-actions button{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:14px 12px;border-radius:12px;font-size:15px;font-weight:600}
.home-actions .secondary{flex:.6;border:1px solid var(--line);background:var(--surface)}
.home-actions .primary{background:var(--sage);color:#fff}
.home-actions svg{width:18px;height:18px}
.brand{cursor:pointer}
@media(max-width:560px){
  .home-grid{grid-template-columns:1fr 1fr;gap:9px}
  .pattern-card canvas{height:122px}
  .pattern-text{padding:9px 10px 11px}
  .pattern-text strong{font-size:13px}
  .pattern-text small{font-size:11px}
  .home-brand h1{font-size:23px}
  .home-choice{padding:18px 15px;gap:13px}
  .home-choice-text strong{font-size:18px}
}

/* 設備情報（写真・メーカー・品番） */
.product-section .field{margin-top:10px}
.product-section input[type=text]{width:100%;min-width:0;font-size:16px}
.product-photo{display:flex;gap:12px;align-items:stretch;margin:4px 0 6px}
.product-thumb{flex:none;width:104px;height:104px;border-radius:12px;border:1px solid var(--line);background:#f1f0ea;overflow:hidden;padding:0;display:grid;place-items:center}
.product-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.product-thumb.is-empty{border-style:dashed;color:var(--muted);gap:4px;align-content:center;font-size:12px}
.product-thumb.is-empty svg{width:24px;height:24px}
.product-photo-actions{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px;justify-content:center}
.product-photo-actions button{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 8px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:13px;min-height:42px}
.product-photo-actions svg{width:16px;height:16px}
.product-large{display:block;width:100%;max-height:62vh;object-fit:contain;border-radius:10px;background:#f1f0ea}
.product-list{display:grid;gap:8px;margin-top:10px}
.product-row{display:flex;gap:12px;align-items:center;text-align:left;padding:9px;border:1px solid var(--line);border-radius:12px;background:var(--surface);width:100%}
.product-row img,.product-row-empty{flex:none;width:58px;height:58px;border-radius:9px;object-fit:cover;background:#f1f0ea;display:grid;place-items:center;color:#a7ada3}
.product-row-empty svg{width:20px;height:20px}
.product-row span{display:grid;gap:3px;min-width:0}
.product-row strong{font-size:15px}
.product-row small{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-list-divider{margin:8px 2px 0;font-size:12px;color:var(--muted)}
.home-lock{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:700;color:#7c6420;background:#f6ead0;border-radius:999px;padding:3px 10px;width:fit-content}
.home-lock svg{width:13px;height:13px}
