:root {
  --bg: #f5f4f0;
  --card: #ffffff;
  --text: #22201c;
  --muted: #6b665d;
  --line: #dedad2;
  --accent: #2f5d50;
  --accent-text: #ffffff;
  --danger: #b3261e;
  --req: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614; --card: #22211e; --text: #ecebe7; --muted: #a39e94;
    --line: #3a3833; --accent: #6fb39e; --accent-text: #10201b; --danger: #ff8a80; --req: #ff8a80;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

#watermark {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: .07;
  background-repeat: repeat;
}
@media (prefers-color-scheme: dark) { #watermark { filter: invert(1); opacity: .09; } }

.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.bar h1 { font-size: 16px; margin: 0; }
#who { font-size: 13px; color: var(--muted); }

main { max-width: 640px; margin: 0 auto; padding: 16px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 16px;
}
h2 { font-size: 18px; margin: 0 0 8px; }
h3 { font-size: 16px; margin: 0 0 4px; }
.section-title { font-size: 15px; color: var(--muted); margin: 20px 0 8px; }
h3.section { margin: 24px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hint { font-size: 13px; color: var(--accent); margin: 4px 0 12px; }

label { display: block; margin: 12px 0; font-size: 14px; }
label small { display: block; color: var(--muted); }
.req { font-size: 11px; color: var(--req); margin-left: 6px; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }

input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  display: block; width: 100%; margin-top: 4px;
  font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; vertical-align: -4px; accent-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; }

fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; margin: 16px 0; }
legend { font-size: 13px; color: var(--muted); padding: 0 4px; }

button {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 0; border-radius: 10px; padding: 12px 16px; min-height: 48px;
  background: var(--accent); color: var(--accent-text);
}
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--danger); color: #fff; }
button.wide { width: 100%; margin-top: 12px; }
button:disabled { opacity: .45; cursor: default; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions button { flex: 1; }

.nda-box {
  max-height: 50vh; overflow-y: auto; white-space: pre-wrap;
  border: 1px solid var(--line); border-radius: 8px; padding: 12px;
  font-size: 14px; background: var(--bg);
}

.profile { display: grid; gap: 4px; font-size: 14px; }
.project .desc { white-space: pre-wrap; font-size: 14px; background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.status { font-weight: 600; margin: 8px 0 0; }

.q { margin: 16px 0; padding: 4px 0; }
.q.missing .q-label { color: var(--req); }
.q-label { font-weight: 600; font-size: 15px; }
.opts { display: grid; gap: 2px; margin-top: 4px; }
.opts.scale { grid-template-columns: repeat(5, 1fr); }
.opt { margin: 0; padding: 8px 4px; display: flex; gap: 8px; align-items: center; }
.shot-label { margin-top: 8px; }
.shot { display: block; margin-top: 4px; font-size: 13px; max-width: 100%; }

#toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 600px; margin: 0 auto; z-index: 10000;
  background: #22201c; color: #fff; border-radius: 10px; padding: 12px 16px; font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

a { color: var(--accent); }

.notice { border-color: var(--accent); font-size: 14px; }
