/* スマートフォン（幅360px）でも、拡大や横方向の移動なしに読めて押せる大きさにする（NFR4） */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px; /* 16px 未満だと iPhone で入力時に自動で拡大されるため */
  line-height: 1.6;
  color: #1a1a1a;
  background: #f5f7fa;
  overflow-wrap: anywhere;
}

.app-header {
  background: #1f4e79;
  color: #ffffff;
  padding: 12px 16px;
}

.app-header h1 {
  margin: 0;
  font-size: 1.15rem;
}

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

.section-title {
  font-size: 1rem;
  margin: 20px 0 8px;
}

.status {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 2px solid transparent;
}

.status-info { background: #e8f0fb; border-color: #9bb8e0; }
.status-success { background: #e6f4ea; border-color: #5a9e6f; }
.status-error { background: #fdecea; border-color: #c0392b; }

.status .detail {
  font-size: 0.9rem;
}

.notice {
  padding: 12px;
  border-radius: 8px;
  margin: 0 0 12px;
}

.notice-warning { background: #fff4e5; border: 2px solid #d68910; }
.notice-error { background: #fdecea; border: 2px solid #c0392b; }
.notice-success { background: #e6f4ea; border: 2px solid #5a9e6f; }

.empty {
  padding: 24px 12px;
  text-align: center;
  background: #ffffff;
  border-radius: 8px;
}

.prompt {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
}

.prompt-meta {
  margin: 0 0 8px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #ffffff;
}

.badge-approval { background: #b03a2e; }
.badge-question { background: #1f618d; }

.prompt-body {
  white-space: pre-wrap;
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  background: #f8f9fa;
  border: 1px solid #d5d8dc;
  border-radius: 6px;
  font-size: 0.95rem;
}

.options {
  list-style: none;
  padding: 0;
  margin: 0;
}

.options li + li {
  margin-top: 8px;
}

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #f39c12;
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.option-button,
.primary-button,
.secondary-button {
  display: block;
  width: 100%;
  min-height: 48px; /* 指で押しやすい大きさ */
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
}

.option-button {
  background: #ffffff;
  border: 2px solid #1f4e79;
  color: #1f4e79;
}

.primary-button {
  margin-top: 8px;
  background: #1f4e79;
  border: 2px solid #1f4e79;
  color: #ffffff;
  text-align: center;
}

.secondary-button {
  margin-top: 8px;
  background: #ffffff;
  border: 2px solid #5d6d7e;
  color: #1a1a1a;
  text-align: center;
}

.answer-text,
.text-input {
  display: block;
  width: 100%;
  font: inherit;
  padding: 8px;
  border: 2px solid #5d6d7e;
  border-radius: 6px;
}

.register-box {
  margin-top: 20px;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
}

.register-box summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.toolbar {
  margin-top: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
