:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e7e1d6;
  --accent: #e8590c;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e6;
  --ok: #2f9e44;
  --ok-soft: #ebfbee;
  --ng: #c92a2a;
  --ng-soft: #fff5f5;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 44px;
}
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
button.ghost { background: transparent; }
input, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}
textarea { font-family: ui-monospace, "BIZ UDGothic", "MS Gothic", monospace; font-size: 14px; line-height: 1.55; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.muted { color: var(--muted); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85em; }
.ok { color: var(--ok); }
.ng { color: var(--ng); }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  max-width: calc(100vw - 32px); z-index: 50; font-size: 15px;
}
[hidden] { display: none !important; }
/* パーツ当ての写真：4:3の枠の中に、placePhoto() が場所と大きさを決めて置く */
.pframe { aspect-ratio: 4 / 3; overflow: hidden; background: #000; position: relative; }
.pframe img { position: absolute; max-width: none; visibility: hidden; transition: left .9s ease, top .9s ease, width .9s ease, height .9s ease; }
