[hidden] { display: none !important; }
:root { --blue: #1f6feb; --ink: #1d232b; --muted: #5b6573; --bg: #f5f7fa; --card: #fff; --line: #dde3ea; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.top { background: var(--blue); color: #fff; padding: 14px 16px 10px; }
.top h1 { margin: 0; font-size: 1.3rem; }
.lead { margin: 4px 0 8px; font-size: .9rem; }
.steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; font-size: .8rem; }
.steps li { flex: 1; text-align: center; padding: 4px 2px; border-radius: 6px; background: rgba(255,255,255,.18); white-space: nowrap; }
.steps li.active { background: #fff; color: var(--blue); font-weight: 700; }
.steps li.done { background: rgba(255,255,255,.4); }
main { max-width: 760px; margin: 0 auto; padding: 12px 14px 24px; }
h2 { font-size: 1.2rem; margin: 6px 0 10px; }
h2:focus { outline: none; }
h3 { font-size: 1rem; margin: 0 0 6px; }
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .spec-list { grid-template-columns: repeat(4, 1fr); } }
.spec-card { min-height: 72px; padding: 10px 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; color: inherit; cursor: pointer; }
.spec-card:hover, .spec-card:focus-visible { border-color: var(--blue); }
.spec-name { font-weight: 700; font-size: 1rem; text-align: center; }
.spec-size { font-size: .8rem; color: var(--muted); }
.custom { margin: 12px 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.custom summary { cursor: pointer; min-height: 32px; }
.custom-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.custom-row input { width: 5.5em; font-size: 16px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.tips, .spec-info-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.tips ul, .tips ol, #specInfo ul { margin: 0; padding-left: 1.2em; }
.tips li, #specInfo li { margin: 2px 0; font-size: .92rem; }
.spec-title { font-weight: 700; color: var(--blue); margin: 0 0 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border-radius: 12px;
  border: 2px solid var(--blue); background: #fff; color: var(--blue); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.big { min-height: 60px; font-size: 1.1rem; flex: 1; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.sq { min-width: 48px; padding: 0; font-size: 1.2rem; }
.btn[aria-pressed="true"] { background: #ff4f7b; border-color: #ff4f7b; color: #fff; }
.btn:focus-visible, .spec-card:focus-visible, #stage:focus-visible { outline: 3px solid #ffb800; outline-offset: 2px; }
.pick-row { display: flex; gap: 10px; margin: 10px 0; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.pick-row label:focus-within { outline: 3px solid #ffb800; }
.err { color: #c0262d; font-weight: 700; min-height: 0; margin: 6px 0; }
.err:empty { display: none; }
.info { color: var(--blue); font-weight: 700; }
.warn { color: #9a5b00; background: #fff6e0; border-radius: 8px; padding: 6px 8px; font-size: .88rem; margin: 8px 0 0; }
.src { font-size: .8rem; color: var(--muted); margin: 8px 0 0; word-break: normal; overflow-wrap: break-word; line-break: strict; }
.hint { font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.pink { color: #e0335f; font-weight: 700; } .yellow { color: #b07d00; font-weight: 700; } .cyan { color: #0089b3; font-weight: 700; }
.stage-wrap { width: 100%; border-radius: 12px; overflow: hidden; background: #2b2f36; }
#stage { display: block; width: 100%; height: 420px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.status { min-height: 1.6em; margin: 6px 0; font-size: .92rem; }
.status p { margin: 2px 0; }
.st-ok { color: #157f3b; font-weight: 700; } .st-guide { color: #5b4a00; background: #fff6d6; border-radius: 6px; padding: 2px 6px; font-weight: 700; } .st-note { color: var(--muted); font-size: .82rem; } .st-ng { color: #c0262d; font-weight: 700; } .st-info { color: var(--blue); font-weight: 700; }
.controls { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.slider { display: flex; flex-direction: column; font-size: .9rem; color: var(--muted); }
.slider input { width: 100%; height: 40px; }
.nudge { display: flex; flex-wrap: wrap; gap: 8px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.row-btns .big { flex: 1 1 100%; }
.results { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .results { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.results figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.results img { display: block; max-width: 100%; max-height: 360px; object-fit: contain; margin: 0 auto; border: 1px solid var(--line); background: #fff;
  -webkit-touch-callout: default; }
.results figcaption { text-align: center; font-size: .9rem; color: var(--muted); }
.disclaimer { font-size: .85rem; color: var(--muted); background: #eef1f5; padding: 10px 12px; border-radius: 10px; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 10px 16px 24px; }
