/* ============================================
   asioto — そらいろテーマ 共通スタイル
   Palette:
     bg        #F2FAFF
     text      #3E5C70 / sub #8FA9BB
     blue      #6EC2EE / deep #4FA8D8
     green     #A6D46B / deep #7CB342
     yellow    #F6C26B / deep #F0A73A
     pink      #F48FB1 / soft #FBD3E0
   ============================================ */

* {
  box-sizing: border-box;
}

.offline-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #3E5C70;
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
}

.offline-banner.show {
  display: block;
}

body {
  font-family: "M PLUS Rounded 1c", "Hiragino Sans", "Yu Gothic", sans-serif;
  background-color: #F2FAFF;
  margin: 0;
  padding: 0;
  color: #3E5C70;
}

/* ---- ヘッダー ---- */
header {
  background: #F2FAFF;
  padding: 18px 20px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FBD3E0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.logo-foot {
  position: relative;
  width: 14px;
  height: 18px;
}

.logo-foot::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 11px;
  height: 13px;
  background: #F48FB1;
  border-radius: 50%;
}

.logo-foot::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 4px;
  background: #F48FB1;
  border-radius: 50%;
  box-shadow: 5px -1px 0 #F48FB1, 10px 1px 0 #F48FB1;
}

.logo-text {
  font-weight: 800;
  font-size: 22px;
  color: #6EC2EE;
  letter-spacing: .5px;
}

header h1 {
  margin: 0 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  color: #8FA9BB;
}

.header-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---- レイアウト ---- */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 110px;
}

.card {
  background: white;
  border-radius: 20px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 2px 10px rgba(90, 160, 210, .1);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 800;
  color: #4A6B80;
  border: none;
  padding-left: 0;
}

/* ---- ボタン ---- */
button {
  background-color: #6EC2EE;
  color: white;
  border: none;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: background-color .2s, transform .1s;
  box-shadow: 0 4px 12px rgba(90, 160, 210, .25);
}

button:hover {
  background-color: #4FA8D8;
}

button:active {
  transform: scale(.98);
}

/* ---- セレクト ---- */
select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #DCEAF3;
  border-radius: 14px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  color: #4A6B80;
  background: #fff;
  outline: none;
  margin-bottom: 8px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236EC2EE' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

select:focus {
  border-color: #6EC2EE;
}

/* ---- 認証フォーム ---- */
.auth-divider {
  display: flex;
  align-items: center;
  color: #8FA9BB;
  font-size: 12px;
  font-weight: 700;
  margin: 14px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #DCEAF3;
}

.auth-divider span {
  padding: 0 10px;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 2px solid #DCEAF3;
  border-radius: 14px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  color: #4A6B80;
  background: #fff;
  outline: none;
  margin-bottom: 10px;
}

.auth-form input:focus {
  border-color: #6EC2EE;
}

.auth-form button + button {
  margin-top: 10px;
}

.btn-outline {
  background: #fff;
  color: #6EC2EE;
  border: 2px solid #6EC2EE;
  box-shadow: none;
}

.btn-outline:hover {
  background-color: #E3F4FD;
}

.auth-error {
  color: #E0575A;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
}

.auth-error:empty {
  display: none;
}

.auth-error.success {
  color: #4FA8D8;
}

.forgot-password-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: -2px 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #6EC2EE;
  text-align: right;
  cursor: pointer;
}

.legal-disclaimer {
  text-align: center;
  font-size: 11.5px;
  color: #9AB2C2;
  line-height: 1.6;
  margin-top: 14px;
}

.legal-disclaimer a {
  color: #6EC2EE;
  font-weight: 700;
  text-decoration: none;
}

/* ---- バッジ/トロフィー獲得演出 ---- */
.badge-celebration {
  position: fixed;
  inset: 0;
  background: rgba(62, 92, 112, .55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.badge-celebration-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  animation: badge-pop .3s ease;
}

@keyframes badge-pop {
  from { transform: scale(.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.badge-celebration-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.badge-celebration-title {
  font-size: 18px;
  font-weight: 800;
  color: #3E5C70;
  margin-bottom: 6px;
}

.badge-celebration-label {
  font-size: 14px;
  font-weight: 700;
  color: #F0A73A;
  margin-bottom: 20px;
}

/* ---- スタンプ獲得演出（STAMP GET） ---- */
.stamp-celebration {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: linear-gradient(160deg, #BFE4FA, #7DCBF3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow: hidden;
  text-align: center;
}

.stamp-celebration-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stamp-celebration-dots span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stamp-celebration-dots span:nth-child(1) { top: 8%;  left: 14%; background: #A6D46B; }
.stamp-celebration-dots span:nth-child(2) { top: 14%; left: 78%; background: #F6C26B; }
.stamp-celebration-dots span:nth-child(3) { top: 32%; left: 10%; background: #F48FB1; }
.stamp-celebration-dots span:nth-child(4) { top: 40%; left: 86%; background: #6EC2EE; }
.stamp-celebration-dots span:nth-child(5) { top: 60%; left: 18%; background: #F6C26B; }
.stamp-celebration-dots span:nth-child(6) { top: 24%; left: 48%; background: #fff; }

.stamp-celebration-content {
  position: relative;
  z-index: 1;
}

.stamp-celebration-eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  opacity: .9;
  margin-bottom: 6px;
}

.stamp-celebration-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 28px;
}

.stamp-emblem-ring {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #F48FB1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  animation: badge-pop .35s ease;
}

.stamp-emblem-ring::before {
  content: "";
  position: absolute;
  width: 158px;
  height: 158px;
  border-radius: 50%;
  border: 2px solid #F8BFD2;
}

.stamp-emblem-photo {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.stamp-emblem-ring.has-photo::before,
.stamp-emblem-ring.has-photo .stamp-emblem-paw,
.stamp-emblem-ring.has-photo .stamp-emblem-name,
.stamp-emblem-ring.has-photo .stamp-emblem-date {
  display: none;
}

.stamp-emblem-ring.has-photo .stamp-emblem-photo {
  display: block;
}

.stamp-emblem-paw {
  font-size: 30px;
  margin-bottom: 4px;
}

.stamp-emblem-name {
  position: relative;
  font-size: 16px;
  font-weight: 800;
  color: #E5658A;
  padding: 0 16px;
  line-height: 1.3;
}

.stamp-emblem-date {
  position: relative;
  font-size: 11px;
  font-weight: 700;
  color: #C98BA0;
  margin-top: 2px;
}

.stamp-celebration-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #4A6B80;
}

.stamp-celebration-tag .highlight {
  color: #F0A73A;
  font-weight: 800;
}

.stamp-celebration-actions {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  margin-top: 32px;
}

.stamp-celebration-actions button {
  margin-bottom: 10px;
}

.stamp-celebration-actions .btn-outline-white {
  background: rgba(255,255,255,.25);
  color: #fff;
  box-shadow: none;
}

.stamp-celebration-actions .btn-outline-white:hover {
  background: rgba(255,255,255,.35);
}

/* ---- スタンプ写真撮影オーバーレイ ---- */
.stamp-photo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(62, 92, 112, .55);
  z-index: 550;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.stamp-photo-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  animation: badge-pop .3s ease;
}

.stamp-photo-title {
  font-size: 16px;
  font-weight: 800;
  color: #3E5C70;
  margin-bottom: 6px;
}

.stamp-photo-sub {
  font-size: 12px;
  color: #8FA9BB;
  margin-bottom: 20px;
}

.stamp-photo-canvas-wrap {
  display: none;
  margin-bottom: 16px;
}

.stamp-photo-canvas-wrap canvas {
  width: 200px;
  height: 200px;
  max-width: 100%;
}

.stamp-photo-colors {
  display: none;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.stamp-color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  padding: 0;
  cursor: pointer;
}

.stamp-color-btn.active {
  border-color: #3E5C70;
}

.stamp-icon-choices {
  display: none;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.stamp-icon-choice-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #E3EDF3;
  background: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.stamp-icon-choice-btn:hover {
  border-color: #6EC2EE;
}

.stamp-photo-status {
  font-size: 13px;
  font-weight: 700;
  color: #4FA8D8;
  min-height: 18px;
  margin-bottom: 12px;
}

.stamp-photo-actions button {
  margin-bottom: 10px;
}

.stamp-photo-skip {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #8FA9BB;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 4px;
}

/* ---- ボトムナビ ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 14px 18px;
  box-shadow: 0 -4px 16px rgba(90, 160, 210, .12);
  border-radius: 24px 24px 0 0;
  z-index: 100;
  max-width: 480px;
  margin: 0 auto;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #9AB2C2;
  font-size: 10px;
  font-weight: 700;
  gap: 2px;
  flex: 1;
  padding: 7px 0;
  border-radius: 14px;
  transition: background .2s;
}

.bottom-nav a.active {
  color: #4FA8D8;
  font-weight: 800;
  background: #E3F4FD;
}

.bottom-nav .nav-icon {
  font-size: 21px;
}

#logoutBtn {
  background-color: #EAF2F7;
  color: #8FA9BB;
  box-shadow: none;
  margin-top: 8px;
}

#logoutBtn:hover {
  background-color: #DCEAF3;
}

/* ---- 使い方オンボーディング ---- */
.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(62, 92, 112, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.onboarding-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 44px 24px 28px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}

.onboarding-skip {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  box-shadow: none;
  color: #8FA9BB;
  width: auto;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.onboarding-slide {
  display: none;
}

.onboarding-slide.active {
  display: block;
  animation: badge-pop .3s ease;
}

.onboarding-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.onboarding-title {
  font-size: 17px;
  font-weight: 800;
  color: #3E5C70;
  margin-bottom: 10px;
}

.onboarding-desc {
  font-size: 13px;
  color: #8FA9BB;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 24px;
  min-height: 66px;
}

.onboarding-card input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 2px solid #DCEAF3;
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 700;
  color: #4A6B80;
  background: #fff;
  margin-bottom: 16px;
}

.onboarding-card input[type="text"]:focus {
  border-color: #6EC2EE;
  outline: none;
}

.onboarding-card input[type="text"]::placeholder {
  color: #B7CBD9;
  font-weight: 500;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #DCEAF3;
  transition: all .2s;
}

.onboarding-dot.active {
  background: #6EC2EE;
  width: 20px;
  border-radius: 999px;
}
