/* おきどころ app.css — 見た目(色・大きさ・並べ方)。版12 の <style> をそのまま移した物 */
/* 並べ方: 製図台のように、左に図、右に操作の欄。スマホでは上下に重ねる。 */
/* color-mix は iPhone の Safari 16.2 から。古い端末では手前の background(ふつうの色)が使われる(版16) */
:root {
  --bg:#EEF0EC; --surface:#FFFFFF; --ink:#1E2A2C; --muted:#5E6B6C; --line:#CDD3CF;
  --accent:#1F6F8B; --accent-ink:#FFFFFF; --accent-soft:#E2EEF2;
  --desk:#DCE1DD; --paper:#FFFFFF;
  --ok:#2E8B57; --warn:#B9740F; --bad:#C2412D;
  /* 字は端末に入っている物を使う(外から読まない)。iPhone・Mac はヒラギノ、Windows は游ゴシック、Android は Noto */
  --font-body:"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Meiryo","Noto Sans JP","Noto Sans CJK JP",system-ui,sans-serif;
  --font-num:ui-monospace,"SF Mono","Menlo","Consolas",monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg:#151B1C; --surface:#1D2627; --ink:#E4EAE8; --muted:#9AA7A6; --line:#334143;
  --accent:#62B6D1; --accent-ink:#0C1B21; --accent-soft:#1E3640;
  --desk:#0F1415; --paper:#F6F6F2;
  --ok:#4CC27F; --warn:#E7A23C; --bad:#EC6A52; color-scheme:dark;
} }
:root[data-theme="dark"] {
  --bg:#151B1C; --surface:#1D2627; --ink:#E4EAE8; --muted:#9AA7A6; --line:#334143;
  --accent:#62B6D1; --accent-ink:#0C1B21; --accent-soft:#1E3640;
  --desk:#0F1415; --paper:#F6F6F2;
  --ok:#4CC27F; --warn:#E7A23C; --bad:#EC6A52; color-scheme:dark;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html, body { height:100%; }
body { background:var(--bg); color:var(--ink); font-family:var(--font-body); font-size:14px; line-height:1.55; }
.app { display:flex; flex-direction:column; gap:12px; min-height:100%;
  padding-left:max(16px, env(safe-area-inset-left, 0px)); padding-right:max(16px, env(safe-area-inset-right, 0px)); padding-block:14px 20px; }
.top { display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; }
.brand { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; min-width:0; }
.brand h1 { margin:0; font-size:22px; font-weight:700; letter-spacing:.08em; }
.brand p { margin:0; color:var(--muted); font-size:13px; }
.top .acts { display:flex; flex-wrap:wrap; gap:8px; margin-left:auto; }
button, select, input { font:inherit; color:inherit; }
button { border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:6px; padding:7px 12px; cursor:pointer; line-height:1.3; }
button:hover { border-color:var(--muted); }
button:focus-visible, input:focus-visible, select:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
button.primary { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); font-weight:500; }
button.on { background:var(--accent-soft); border-color:var(--accent); }
button.primary.on { background:var(--accent); color:var(--accent-ink); box-shadow:inset 0 0 0 2px var(--accent-ink); }   /* 版14: 白い字が薄い地に乗って読めなかった */
button.danger { color:var(--bad); }
button:disabled { opacity:.45; cursor:default; }
.work { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:14px; flex:1; min-height:0; }
@media (max-width: 900px) { .work { grid-template-columns:minmax(0,1fr); } }
.stage { position:relative; background:var(--desk); border:1px solid var(--line); border-radius:8px; overflow:hidden;
  min-height:420px; height:calc(100vh - 180px); user-select:none; -webkit-user-select:none; }
@media (max-width: 900px) { .stage { height:62vh; min-height:340px; } }
.stage svg { position:absolute; inset:0; width:100%; height:100%; display:block; cursor:grab; touch-action:none; }
.stage svg.panning { cursor:grabbing; }
.stage svg.pick { cursor:crosshair; }
.zoom { position:absolute; right:10px; bottom:10px; display:flex; gap:4px; }
.zoom button { width:36px; height:36px; padding:0; font-size:16px; }
.zoom button.wide { width:auto; padding:0 10px; font-size:13px; }
.scalebar { position:absolute; left:10px; bottom:12px; font:12px var(--font-num); color:var(--ink);
  background:var(--surface); background:color-mix(in srgb, var(--surface) 85%, transparent); padding:4px 8px; border-radius:6px; }
.scalebar i { display:block; height:4px; background:var(--ink); margin-bottom:3px; }
.topstack { position:absolute; left:10px; right:10px; top:10px; display:flex; flex-direction:column; gap:8px; pointer-events:none; z-index:1; }   /* 版14: 縮尺の棒が小窓の上に重なっていた(点検 S9) */
.stage .drawer { z-index:2; } .stage .drop { z-index:3; }
.topstack > * { pointer-events:auto; }
/* 家具を押すと出る小窓。パソコンでは家具のすぐ近く、スマホでは図の上の端に出す */
.seltools { background:var(--surface); border:1px solid var(--accent); border-radius:10px; padding:9px 11px; display:flex; flex-direction:column;
  gap:7px; box-shadow:0 4px 18px rgba(0,0,0,.2); }
.seltools.float { position:absolute; width:372px; max-width:100%; }
.seltools.moving { visibility:hidden; }
.seltools .st-top { display:flex; gap:6px; align-items:center; }
.seltools .st-top input[type=text] { flex:1; min-width:0; font-weight:500; padding:5px 8px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.seltools .st-top button { padding:4px 11px; font-size:15px; }
.seltools .sz { display:flex; align-items:center; gap:5px; font-size:13px; color:var(--muted); flex-wrap:wrap; }
.seltools .sz input { width:70px; padding:5px 6px; border:1px solid var(--line); border-radius:6px; font-family:var(--font-num); font-size:15px; background:var(--surface); color:var(--ink); }
.seltools .sz .g { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }   /* 名前・欄・cm を離さない */
.seltools .sz select { padding:5px 6px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); }   /* 版14: カウチは右・左 */
.seltools .acts { display:flex; flex-wrap:wrap; gap:5px; }
.seltools .acts button { padding:5px 9px; font-size:12.5px; }
.seltools .acts button[aria-expanded="true"] { background:var(--accent-soft); border-color:var(--accent); }
.seltools .more { border-top:1px solid var(--line); padding-top:8px; }
.seltools { overflow-y:auto; overscroll-behavior:contain; }
@media (max-width: 900px) { .seltools input[type=text], .seltools input[type=number], .seltools select { font-size:16px; } } /* iPhone で入力時に拡大されないように */
.banner { background:var(--surface); border:1px solid var(--accent);
  border-radius:8px; padding:10px 12px; display:flex; flex-wrap:wrap; gap:8px 10px; align-items:center; box-shadow:0 2px 10px rgba(0,0,0,.12); }
.banner .msg { flex:1 1 240px; min-width:0; }
.banner .msg .sub { display:block; margin-top:2px; color:var(--muted); font-size:12px; }   /* 版14: 帖数合わせの補足(足す・区切る) */
.banner .fld { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
@media (max-width: 640px) { .banner .fld input { width:66px; } }
.banner input { width:96px; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:var(--surface); font-family:var(--font-num); }
@media (min-width: 901px) { .stage { position:sticky; top:12px; align-self:start; } }
.addbtn { position:absolute; left:10px; bottom:10px; white-space:nowrap; box-shadow:0 2px 8px rgba(0,0,0,.18); }
.stage .scalebar { bottom:58px; }
.drawer { position:absolute; left:0; right:0; bottom:0; max-height:50%; display:flex; flex-direction:column; touch-action:auto;
  background:var(--surface); border-top:1px solid var(--line); border-radius:12px 12px 0 0; box-shadow:0 -4px 16px rgba(0,0,0,.16);
  padding-bottom:env(safe-area-inset-bottom, 0px); }
.drawer .dhead { display:flex; align-items:center; border-bottom:1px solid var(--line); flex:none; }   /* 版14: 「閉じる」はタブの列の外(点検 S2) */
.drawer .tabs { display:flex; gap:5px; overflow-x:auto; padding:8px 10px; flex:1 1 auto; min-width:0; }
.drawer .tabs button { white-space:nowrap; border-radius:999px; padding:5px 11px; font-size:12.5px; flex:none; }
.drawer .tabs button.on { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.drawer .dhead .close { flex:none; margin:0 10px 0 2px; border-radius:6px; white-space:nowrap; }
.drawer .body { overflow-y:auto; padding:10px 12px 12px; display:flex; flex-direction:column; gap:8px; }
.drawer .hint { margin:0; color:var(--muted); font-size:12px; }
.drop { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:500;
  background:var(--accent-soft); background:color-mix(in srgb, var(--accent) 22%, transparent); border:3px dashed var(--accent); border-radius:8px; color:var(--ink); }
.panel { display:flex; flex-direction:column; gap:12px; min-width:0; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:12px 14px; display:flex; flex-direction:column; gap:10px; }
.card h2 { margin:0; font-size:14px; font-weight:700; letter-spacing:.04em; display:flex; align-items:center; gap:8px; }
.card h2 small { font-weight:400; color:var(--muted); font-size:12px; letter-spacing:0; }
.note { margin:0; color:var(--muted); font-size:12.5px; }
.row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.status { font-family:var(--font-num); font-size:13px; padding:6px 8px; border-radius:6px; background:var(--accent-soft); }
.status.warn { background:rgba(185,116,15,.16); background:color-mix(in srgb, var(--warn) 16%, transparent); }
.group { display:flex; flex-direction:column; gap:5px; }
/* 版15: 間取りの切りかえ(上の列)・①の一覧・前の間取りから持ってきた家具 */
.plans { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13px; }
.plans .lbl { color:var(--muted); font-size:12px; }
.plans button { border-radius:999px; padding:5px 14px; max-width:14em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.plans button.on { font-weight:700; }
.plist > b { font-size:11.5px; font-weight:500; color:var(--muted); letter-spacing:.06em; }
.plist .rrow.now { border-color:var(--accent); background:var(--accent-soft); }
.plist .nowlbl { font-size:12px; color:var(--accent); font-weight:700; }
.pend { padding:8px 10px; border:1px dashed var(--accent); border-radius:6px; }
.pend .hint { margin:0; color:var(--muted); font-size:12px; }
/* 版16: 家具の小窓の「この幅に入る物を見る」(js/picks.js) */
.seltools .pickline { border-top:1px solid var(--line); padding-top:7px; }
.seltools .pickline button { width:100%; font-size:12.5px; padding:6px 9px; }
.seltools .pickline button[aria-expanded="true"] { background:var(--accent-soft); border-color:var(--accent); }
.picks { display:flex; flex-direction:column; gap:6px; }
.picks .hint { margin:0; font-size:12px; color:var(--muted); }
.picks .pick { display:flex; flex-direction:column; gap:1px; padding:7px 9px; border:1px solid var(--line); border-radius:6px; font-size:12.5px; position:relative; }
.picks .pick .shop, .picks .pick .dim { color:var(--muted); font-size:12px; }
.picks .pick .dim { font-family:var(--font-num); }
.picks a { color:var(--accent); font-weight:500; }
.picks .pr { display:inline-block; font-size:10.5px; font-weight:700; color:var(--muted); border:1px solid currentColor; border-radius:4px; padding:0 4px; margin-right:5px; }
.picks .pick .pr { position:absolute; top:6px; right:8px; margin:0; }
.picks .pick .over { color:var(--warn); font-size:12px; font-weight:500; }   /* 枠より少し大きい品 */
/* 版16: ページの下(このサイトについて) */
.sitefoot { display:flex; flex-wrap:wrap; gap:4px 12px; align-items:baseline; font-size:12.5px; color:var(--muted); padding-top:6px; }
.sitefoot a { color:var(--accent); font-weight:500; padding:4px 0; }   /* 版16: 指で押しやすい高さ(24px 以上)に */
/* 版16: 置いた家具のメモ */
.buylist { margin:0; padding-left:1.1em; font-size:13px; display:flex; flex-direction:column; gap:2px; }
.buylist .none { list-style:none; margin-left:-1.1em; color:var(--muted); }
.group b { font-size:11.5px; font-weight:500; color:var(--muted); letter-spacing:.06em; }
.chips { display:flex; flex-wrap:wrap; gap:5px; }
.chips button { padding:4px 9px; font-size:12.5px; border-radius:999px; }
.chips button span { font-family:var(--font-num); font-size:11px; color:var(--muted); margin-left:4px; }
.fields { display:grid; grid-template-columns:auto 1fr; gap:6px 10px; align-items:center; }
.fields label { color:var(--muted); font-size:12.5px; }
.fields input, .fields select { padding:5px 8px; border:1px solid var(--line); border-radius:6px; background:var(--surface); min-width:0; width:100%; }
.fields input[type=number] { font-family:var(--font-num); }
.unit { display:flex; align-items:center; gap:6px; } .unit span { color:var(--muted); font-size:12px; }
.swatches { display:flex; gap:6px; flex-wrap:wrap; }
.swatches { align-items:center; }
.swatches button { width:24px; height:24px; padding:0; border-radius:50%; border:2px solid transparent; box-shadow:inset 0 0 0 1px rgba(0,0,0,.2); }
.swatches button.on { border-color:var(--ink); }
.swatches .brk { flex-basis:100%; height:0; }
.swatches small { color:var(--muted); font-size:11.5px; }
input[type=color] { width:32px; height:26px; padding:0 2px; border:1px solid var(--line); border-radius:6px; background:var(--surface); cursor:pointer; }
.seltools input[type=color] { width:32px; padding:0 2px; }
.legend { display:flex; flex-direction:column; gap:4px; font-size:12.5px; }
.legend span { display:flex; align-items:center; gap:8px; }
.legend i { width:22px; height:4px; border-radius:2px; display:inline-block; }
.seg { display:flex; border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.seg button { border:0; border-radius:0; flex:1; padding:6px 8px; font-size:12.5px; }
.seg button + button { border-left:1px solid var(--line); }
/* 困ったときだけ出る知らせの帯(保存できない・保存が開けない)。js/store.js の showNotice */
.notice { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; padding:10px 12px; border-radius:8px; font-size:13.5px;
  border:1px solid var(--warn); background:var(--surface); background:color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.notice .msg { flex:1 1 260px; min-width:0; }
.confirm { display:flex; flex-direction:column; gap:8px; padding:10px; border-radius:6px; background:rgba(194,65,45,.10); background:color-mix(in srgb, var(--bad) 10%, transparent); }
.steps { display:flex; align-items:center; gap:6px; overflow-x:auto; padding:2px 1px 4px; }
.step { display:flex; align-items:center; gap:7px; padding:5px 12px 5px 5px; border-radius:999px; white-space:nowrap; font-size:13px; flex:none; }
.step i { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; font-style:normal; font-size:12px;
  background:var(--bg); color:var(--muted); border:1px solid var(--line); font-family:var(--font-num); }
.step.done i { background:var(--ok); color:#fff; border-color:var(--ok); }
.step.cur { border-color:var(--accent); background:var(--accent-soft); font-weight:700; }
.step.cur i { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.steps .sep { color:var(--muted); flex:none; font-size:12px; }
.stephint { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; font-size:13.5px; margin-top:-4px; }
.stephint span { min-width:0; flex:1 1 260px; }
@media (max-width: 640px) {
  .top .acts { display:none; }
  .steps { overflow:visible; gap:4px; }
  .step { padding:4px; }
  .step:not(.cur) .lbl { display:none; }
  .step.cur { padding-right:12px; }
  .steps .sep { font-size:10px; }
  .stephint { font-size:13px; }
  .stephint button { padding:7px 12px; }
}
.checks { display:flex; flex-direction:column; gap:5px; }
.ck { display:flex; align-items:center; gap:8px; font-size:13px; }
.ck label { display:flex; align-items:center; gap:7px; flex:1; min-width:0; cursor:pointer; }
.ck input { flex:none; width:16px; height:16px; accent-color:var(--ok); }
.ck.done label span { color:var(--muted); text-decoration:line-through; }
.ck button { padding:3px 8px; font-size:12px; flex:none; }
.ck-h { font-size:11.5px; color:var(--muted); letter-spacing:.06em; margin-top:4px; }
.route { display:flex; flex-direction:column; gap:6px; }
.rrow { display:flex; flex-wrap:wrap; gap:5px 8px; align-items:center; padding:7px 8px; border:1px solid var(--line); border-radius:6px; }
.rrow .rname { flex:1 1 9em; min-width:0; padding:4px 6px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.rrow .u { display:flex; align-items:center; gap:3px; font-size:12px; color:var(--muted); }
.rrow input[type=number] { width:56px; padding:4px 5px; border:1px solid var(--line); border-radius:6px; background:var(--surface); font-family:var(--font-num); }
.rrow button { padding:3px 8px; font-size:12px; }
.rrow .est { font-style:normal; font-size:11px; color:var(--warn); border:1px solid currentColor; border-radius:999px; padding:0 7px; }
.verdicts { list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; font-size:13px; }
.verdicts li { display:flex; gap:8px; align-items:baseline; }
.verdicts b { font-size:15px; width:1.2em; text-align:center; flex:none; }
.verdicts .ok b { color:var(--ok); } .verdicts .tight b { color:var(--warn); } .verdicts .ng b { color:var(--bad); }
.verdicts small { color:var(--muted); }
.verdicts .need b { color:var(--muted); }   /* 版15: まだ測っていない通り道(要る幅だけ出す) */
.rrow button.est { font-style:normal; font-size:11px; color:var(--warn); background:transparent; border:1px solid currentColor; border-radius:999px; padding:0 7px; }
.srcline .src { font-size:10.5px; padding:0 6px; margin-left:3px; border-radius:999px; color:var(--accent); border-color:var(--accent); background:transparent; vertical-align:1px; }
.srclist { margin:6px 0 0; padding-left:1.1em; font-size:12px; color:var(--muted); display:flex; flex-direction:column; gap:3px; }
.srclist b { color:var(--ink); font-weight:500; }
.carrysum { margin:8px 0 0; padding:7px 9px; border-radius:6px; font-weight:500; font-size:13px; }
.carrysum.ok { background:rgba(46,139,87,.14); background:color-mix(in srgb, var(--ok) 14%, transparent); }
.carrysum.tight { background:rgba(185,116,15,.16); background:color-mix(in srgb, var(--warn) 16%, transparent); }
.carrysum.ng { background:rgba(194,65,45,.14); background:color-mix(in srgb, var(--bad) 14%, transparent); }
.toast { position:fixed; left:50%; bottom:calc(18px + env(safe-area-inset-bottom, 0px)); transform:translateX(-50%); background:var(--ink); color:var(--bg);
  padding:8px 14px; border-radius:8px; font-size:13px; z-index:50; max-width:calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { .toast { transition:opacity .2s; } }
.toast button { margin-left:10px; padding:4px 12px; border-color:var(--bg); background:transparent; color:var(--bg); font-weight:700; }   /* 版14: 「元に戻す」 */
/* 版14: スマホの指の操作(点検 S3・S4) */
@media (max-width: 900px) {
  input, select, textarea { font-size:16px; }   /* iPhone で入力欄を押したときに画面が拡大されないように(16px 未満だと拡大する) */
  button { min-height:44px; }                    /* 押す所の高さ(Apple の目安 44pt) */
  .chips button, .seltools .acts button, .drawer .tabs button, .seg button, .rrow button, .ck button, .toast button, .plans button { min-height:40px; }
  .seltools .st-top button { min-width:44px; }
  .seltools .sz input { width:60px; }            /* 幅と奥行(カウチの幅と座面の奥行)を1行に2つ並べる */
  .rrow button.est, .srcline .src { min-height:30px; padding:0 10px; }   /* 文の中の小さな印(版15) */
  .zoom button { width:44px; height:44px; }
  .swatches button { width:32px; height:32px; min-height:0; }
  input[type=color] { height:36px; }
  .ck input { width:22px; height:22px; }
}
