:root {
  --color-bg: #fff8ef;
  --color-primary: #e8593a;
  --color-primary-dark: #c8432a;
  --color-accent: #ffb703;
  --color-text: #3a2e26;
  --color-card: #ffffff;
  --color-muted: #9a8b7d;
  --radius: 18px;
  --shadow: 0 6px 18px rgba(58, 46, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  background: linear-gradient(180deg, #fff8ef 0%, #ffeed9 100%);
  color: var(--color-text);
  display: flex;
  justify-content: center;
  padding: 24px 16px 60px;
}

.page {
  width: 100%;
  max-width: 480px;
}

header.hero {
  text-align: center;
  margin-bottom: 24px;
}

header.hero .emoji {
  font-size: 42px;
  display: block;
  margin-bottom: 6px;
}

header.hero h1 {
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--color-primary-dark);
}

header.hero p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.status-banner {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-banner.invalid {
  background: #fdeaea;
  border: 2px solid #f0a3a3;
}

.status-banner.happy {
  background: linear-gradient(180deg, #fff3d6 0%, #ffe4a3 100%);
  border: 2px solid var(--color-accent);
}

.status-banner.true-end {
  background: #eef0f7;
  border: 2px solid #9aa5c9;
}

.status-banner.bad-end {
  background: #2b2230;
  border: 2px solid #6b4a7a;
  color: #f3e9f7;
}

.status-banner.bad-end p {
  color: #e6d9ec;
}

/* 取得カード（本物/ダミーの区別を見せない、共通の「見つけた」カード）
   index.htmlの全画面オーバーレイと、stamp.htmlのページ内表示の両方で使う */
.found-card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: var(--color-card);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.found-card-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  margin-bottom: 16px;
  background: #131f34;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  overflow: hidden;
}

.found-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.found-card-name {
  font-family: var(--font-brush, inherit);
  font-size: 20px;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
}

.found-card-desc {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.status-banner .big-emoji {
  font-size: 52px;
  display: block;
  margin-bottom: 8px;
}

.status-banner h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.status-banner p {
  margin: 0;
  color: var(--color-text);
  line-height: 1.6;
}

.btn {
  display: inline-block;
  margin-top: 20px;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: bold;
  box-shadow: var(--shadow);
  border: none;
  font-size: 15px;
  cursor: pointer;
}

.btn.secondary {
  background: transparent;
  color: var(--color-muted);
  box-shadow: none;
  text-decoration: underline;
  font-size: 13px;
  padding: 6px;
}

.footer-actions {
  text-align: center;
  margin-top: 10px;
}

.qr-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.qr-item {
  background: white;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  page-break-inside: avoid;
}

.qr-item canvas {
  max-width: 100%;
  height: auto;
}

.qr-item .label {
  margin-top: 6px;
  font-weight: bold;
  font-size: 13px;
}

.qr-item .token {
  font-size: 10px;
  color: var(--color-muted);
  word-break: break-all;
}

.section-title {
  font-weight: bold;
  color: var(--color-primary-dark);
  margin: 24px 0 10px;
}

.reveal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 14px;
}

.reveal-item:last-child {
  border-bottom: none;
}

.reveal-badge {
  font-size: 12px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.reveal-badge.real {
  background: #dff5e1;
  color: #2f7a3d;
}

.reveal-badge.decoy {
  background: #fbe0e0;
  color: #a33a3a;
}

@media print {
  body {
    background: white;
  }
  .no-print {
    display: none;
  }
}
