/* ポイ活案件 確認画面。見た目のトーンは themeC/web を踏襲。 */

:root { color-scheme: light; }
* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f4f6f8;
  margin: 0;
  padding: 16px;
  padding-bottom: 48px;
}

h2 {
  text-align: center;
  color: #333;
  margin: 0 0 20px;
  font-size: 20px;
}

.main-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}

.ingest-box {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#raw-input {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 8px;
  border: 1px solid #d1d1d6;
  border-radius: 8px;
  resize: vertical;
}
#ingest-btn {
  align-self: flex-end;
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  background: #007aff;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}
#ingest-btn:disabled { background: #a8cbfa; }

#ingest-status, #status {
  text-align: center;
  color: #6e6e73;
  font-size: 13px;
  padding: 4px 0;
}
#ingest-status.error, #status.error { color: #d70015; }

.draft-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.draft-card.needs-review { border-left: 4px solid #ff6b6b; }

.draft-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.action-btn {
  width: 52px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #d1d1d6;
  background: #fff;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
  padding: 0;
}
.commit-btn { background: #34c759; border-color: #34c759; color: #fff; }
.hold-btn { background: #fff; border-color: #d1d1d6; color: #8e8e93; }
.reject-btn { background: #48484a; border-color: #48484a; color: #fff; }

.draft-body { flex: 1; min-width: 0; }
.draft-title { font-size: 15px; font-weight: bold; color: #1d1d1f; }

.draft-summary { font-size: 13px; color: #3a3a3c; line-height: 1.4; margin-top: 2px; }

.draft-links { display: flex; gap: 12px; font-size: 12px; margin-top: 4px; }
.draft-links a { color: #007aff; }

.draft-review { font-size: 12px; color: #ff6b6b; margin-top: 4px; }

.draft-fields {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #f4f6f8;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
}
.field-row { display: flex; gap: 8px; font-size: 12px; }
.field-label { color: #8e8e93; flex-shrink: 0; width: 60px; }
.field-value { color: #1d1d1f; }

.empty-state {
  text-align: center;
  color: #8e8e93;
  padding: 40px 0;
  font-size: 14px;
}

#footer {
  text-align: center;
  font-size: 11px;
  color: #a1a1a6;
  margin-top: 8px;
}

.toast-stack {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
  pointer-events: none;
  z-index: 100;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #2c2c2e;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  pointer-events: auto;
  animation: toast-in 0.15s ease-out;
}
.toast span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button {
  flex-shrink: 0;
  border: none;
  background: none;
  color: #64d2ff;
  font-weight: bold;
  font-size: 13px;
  padding: 4px 2px;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
