/* ベースレイアウト */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #2d2d7a;
  color: #ffffff;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.logo-wrapper {
  margin-bottom: 16px;
}

.logo {
  max-width: 220px;
  width: 60vw;
  height: auto;
}

/* メインコンテンツ */
.content {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* 写真プレビュー */
.preview-section {
  width: 100%;
}

.image-wrapper {
  width: 100%;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); 
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;               
}

.photo-preview {
  width: 100%;                     
  height: auto;                    
  display: none;
  object-fit: contain;             
}

.no-image-message {
  margin: 0 16px;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* リンク風テキストボタン */
.text-link {
  background: transparent;
  border: none;
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px 8px;
}

.text-link:hover {
  opacity: 0.8;
}

/* QRコード */
.qr-section {
  margin-top: 8px;
}

/* QRの余白付きの白い枠 */
.qr-wrapper {
  display: inline-block;
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.qrcode {
  width: 200px;
  height: 200px;
}

.qrcode canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ダウンロードボタン周り */
.download-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
}

/* ヒントテキスト */
.hint-text {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

/* フッター */
.footer {
  margin-top: 16px;
}

/* ダウンロード無効時 */
.download-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------
   ボタン6 (指定のスタイル + 中央寄せ調整)
   -------------------------------------------------- */

.btn-6 {
  position: relative;
  background: radial-gradient(circle, rgba(247,150,192,1) 0%, rgba(118,174,241,1) 100%);
  line-height: 42px;
  padding: 0;
  border: none;
  box-shadow:
    0 0 10px rgba(0, 0, 0, 0.4);
}

.btn-6 span {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0 24px;
  text-align: center;           /* 文字を中央寄せに */
}

/* 枠線のエフェクト部分 */
.btn-6:before,
.btn-6:after {
  position: absolute;
  content: "";
  height: 0%;
  width: 1px;
  box-shadow:
    -1px -1px 20px 0px rgba(255,255,255,1),
    -4px -4px 5px 0px rgba(255,255,255,1),
    7px 7px 20px 0px rgba(0,0,0,.4),
    4px 4px 5px 0px rgba(0,0,0,.3);
}

.btn-6:before {
  right: 0;
  top: 0;
  transition: all 500ms ease;
}

.btn-6:after {
  left: 0;
  bottom: 0;
  transition: all 500ms ease;
}

.btn-6:hover {
  background: transparent;
  color: #76aef1;
  box-shadow: none;
}

.btn-6:hover:before {
  transition: all 500ms ease;
  height: 100%;
}

.btn-6:hover:after {
  transition: all 500ms ease;
  height: 100%;
}

.btn-6 span:before,
.btn-6 span:after {
  position: absolute;
  content: "";
  box-shadow:
    -1px -1px 20px 0px rgba(255,255,255,1),
    -4px -4px 5px 0px rgba(255,255,255,1),
    7px 7px 20px 0px rgba(0,0,0,.4),
    4px 4px 5px 0px rgba(0,0,0,.3);
}

.btn-6 span:before {
  left: 0;
  top: 0;
  width: 0%;
  height: .5px;
  transition: all 500ms ease;
}

.btn-6 span:after {
  right: 0;
  bottom: 0;
  width: 0%;
  height: .5px;
  transition: all 500ms ease;
}

.btn-6 span:hover:before {
  width: 100%;
}

.btn-6 span:hover:after {
  width: 100%;
}

/* モーダル */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none; /* JSで表示 */
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
  box-sizing: border-box;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  max-width: 560px;
  width: 100%;
  background: #ffffff;
  color: #222222;
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-sizing: border-box;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  text-align: left;
}

.modal-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-body {
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.modal-body p {
  margin: 0 0 0.8em;
}

/* モーダル閉じるボタン */
.btn-close-modal {
  margin-top: 12px;
  display: block;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: #2d2d7a;
  color: #ffffff;
}

.btn-close-modal:hover {
  opacity: 0.9;
}

/* ちょっとだけ余白調整（スマホ用） */
@media (max-width: 480px) {
  .page {
    padding: 16px 12px;
  }

  .modal-content {
    padding: 16px 14px 12px;
  }
}