:root {
  --teal: #0f6e78;
  --teal-dark: #0a4f57;
  --ink: #1d2a2c;
  --sub: #44575a;
  --bg: #f4f8f8;
  --card: #ffffff;
  --line: #9db4b7;
  --warn-bg: #fff4de;
  --warn-line: #7a4300;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
[hidden] { display: none !important; }
main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 20px 12px; }
h1 { font-size: 1.5rem; line-height: 1.4; margin: 8px 0 12px; }
h2 { font-size: 1.15rem; margin: 20px 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: 1.1rem; }
.note { color: var(--sub); font-size: 1rem; }
.howto { border-left: 4px solid var(--teal); padding: 2px 0 2px 12px; margin: 14px 0; }
.howto-main { font-size: 1.05rem; margin-bottom: 4px; }
.howto .note { margin-bottom: 4px; }
.btn {
  display: block; width: 100%; min-height: 56px; margin: 14px 0 0; padding: 12px 16px;
  font: inherit; font-size: 1.1rem; font-weight: 700; text-align: center;
  border-radius: 12px; border: 3px solid var(--teal); cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.btn.primary { background: var(--teal); color: #fff; }
.btn.secondary { background: var(--card); color: var(--teal-dark); }
.btn:active { filter: brightness(0.92); }
.btn[disabled] { opacity: 0.75; cursor: default; }
.btn[disabled]::before { content: "⏳ "; }
.linkbtn {
  font: inherit; color: var(--teal-dark); background: none; border: 0; padding: 10px 0;
  min-height: 48px; text-decoration: underline; cursor: pointer; text-align: left;
}
.linkbtn.emph {
  display: block; width: 100%; min-height: 56px; margin-top: 12px; padding: 12px 16px;
  text-align: center; font-weight: 700; text-decoration: none;
  background: var(--card); border: 3px solid var(--teal); border-radius: 12px;
}
.small-block { font-size: 1rem; color: var(--sub); margin-top: 28px; }
.err {
  display: flex; gap: 12px; align-items: flex-start; margin: 14px 0;
  padding: 12px 14px; background: var(--warn-bg); color: var(--ink);
  border: 3px solid var(--warn-line); border-radius: 10px; font-weight: 600;
}
.err[hidden] { display: none; }
.err-mark {
  flex: none; width: 1.7em; height: 1.7em; line-height: 1.7em; text-align: center;
  background: var(--warn-line); color: #fff; font-weight: 800; border-radius: 4px;
}
.field-label { display: block; font-weight: 700; margin: 18px 0 6px; }
.code-input {
  display: block; width: 100%; min-height: 64px; padding: 8px 12px;
  font: inherit; font-size: 2rem; letter-spacing: 0.25em; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--ink); background: var(--card);
  border: 3px solid var(--line); border-radius: 12px;
}
.code-input:focus { outline: 4px solid #8cc6cc; border-color: var(--teal); }
.who { margin: 20px 0 8px; padding: 18px 14px; background: var(--card); border: 3px solid var(--teal); border-radius: 12px; text-align: center; }
.who-name { display: block; font-size: 2rem; font-weight: 800; line-height: 1.3; word-break: break-all; }
.who-suffix { display: block; font-size: 1.1rem; margin-top: 4px; }
.ok-mark { display: inline-block; width: 1.5em; height: 1.5em; line-height: 1.5em; text-align: center; background: var(--teal); color: #fff; border-radius: 50%; margin-right: 6px; }
.steps { padding-left: 1.4em; margin: 12px 0; }
.steps li { margin-bottom: 12px; }
.share-figure { display: block; margin: 8px auto; color: var(--teal-dark); background: var(--card); border: 3px solid var(--line); border-radius: 12px; padding: 10px; width: 116px; height: 116px; }
.bottom-actions { margin-top: 48px; }
footer {
  max-width: 560px; width: 100%; margin: 0 auto;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  font-size: 0.95rem; line-height: 1.6; color: var(--sub); border-top: 2px solid var(--line);
}
footer p { margin: 0; }

/* ---- 写真の送信待ち ---- */
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.queue-card { margin: 8px 0 4px; padding: 14px; background: var(--card); border: 3px solid var(--teal); border-radius: 12px; }
.queue-card p:last-child { margin-bottom: 0; }
.queue-count { font-size: 1.35rem; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.queue-progress-text { font-weight: 700; margin-bottom: 6px; }
progress { display: block; width: 100%; height: 18px; margin-bottom: 10px; accent-color: var(--teal); }
.btn.subtle { min-height: 48px; font-size: 1rem; font-weight: 600; border-width: 2px; border-color: var(--line); }
.pre-queue { margin-top: 28px; padding-top: 14px; border-top: 2px solid var(--line); }
.pre-queue .btn { margin-top: 8px; }
.pre-count { font-weight: 700; margin-bottom: 4px; }
.plain-list { list-style: none; margin: 0 0 8px; padding: 0; }
.plain-list li { padding: 10px 0; border-bottom: 2px solid #d3e0e1; word-break: break-all; }
.plain-list .li-name { font-weight: 700; }
.plain-list .li-meta { display: block; color: var(--sub); font-size: 0.95rem; }
.plain-list .li-reason { display: block; font-weight: 600; margin-top: 2px; }
.plain-list .linkbtn { min-height: 44px; padding: 6px 0; }
.inbox-note { margin-top: 18px; }
