.result-page {
  margin: 0;
  padding: 16px;
  background: #0d1224;
  color: #e7eef7;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
}

.result-header, .result-section, .result-footer {
  background: #111a32;
  border: 1px solid #1f2b45;
  border-radius: 14px;
  padding: 14px;
  margin: 0 auto 12px;
  max-width: 960px;
  box-sizing: border-box;
}

.result-header h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

.result-user-info .user-line {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px;
  font-size: 14px;
  margin: 4px 0;
}
.label { color: #94a3b8; }
.value.small { font-size: 12px; color: #cbd5e1; }

.result-section h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.mask-summary, .history-card {
  background: #0c142c;
  border: 1px solid #1f2b45;
  border-radius: 12px;
  padding: 10px;
}

.mask-metrics { display: flex; gap: 16px; color: #cbd5e1; font-size: 14px; }
.mask-names { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.mask-rows { display: flex; flex-direction: column; gap: 8px; }
.mask-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #1f2b45;
  background: #0b1730;
}
.mask-row-name { font-weight: 700; font-size: 15px; }
.mask-link { color: #7cb8ff; text-decoration: underline; }
.mask-link:hover { color: #b3d6ff; }
.mask-row-metrics { display: flex; gap: 14px; color: #cbd5e1; font-size: 14px; white-space: nowrap; }
.mask-row.placeholder { color: #94a3b8; justify-content: center; }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-card-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #cbd5e1;
}
.history-date { font-weight: 700; color: #e7eef7; }
.history-row { margin: 6px 0; }
.history-label { color: #94a3b8; font-size: 13px; }
.history-value { color: #e2e8f0; font-size: 14px; }
.metric { margin-left: 8px; color: #cbd5e1; font-size: 12px; }
.history-legacy-note { margin-top: 6px; color: #94a3b8; font-size: 12px; }

.omokage-text { white-space: pre-wrap; line-height: 1.6; }

.result-footer { text-align: right; }
button.back-btn {
  background: #4da3ff;
  color: #001428;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.conversation-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.conversation-log .turn {
  background: #0c142c;
  border: 1px solid #1f2b45;
  border-radius: 10px;
  padding: 8px 10px;
}
.conversation-log .turn-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.conversation-log .turn-body {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 14px;
  color: #e7eef7;
}
.conversation-log .turn.user .turn-body {
  color: #dbeafe;
}
.conversation-log .placeholder {
  color: #94a3b8;
  margin: 0;
}

@media (max-width: 640px) {
  .result-user-info .user-line { grid-template-columns: 1fr; }
  .mask-metrics { flex-direction: column; gap: 6px; }
  .mask-row { flex-direction: column; align-items: flex-start; }
  .mask-row-metrics { white-space: normal; }
  .history-card-header { flex-direction: column; align-items: flex-start; gap: 4px; }
}
