/* ============ ホーム(スタンプ判定)ページ ============ */

.gps-status {
  font-size: 13px;
  font-weight: 700;
  color: #4FA8D8;
  background: #E3F4FD;
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-block;
  margin: 0 0 12px;
}

.spot-item {
  padding: 13px 14px;
  margin: 8px 0;
  background: #F7FBFE;
  border-radius: 16px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
}

.spot-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.spot-item:hover {
  border-color: #A5DBF7;
}

.spot-item.selected {
  border-color: #6EC2EE;
  background: #E9F7FE;
}

.spot-item-checkin-btn {
  display: none;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: #6EC2EE;
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.spot-item.selected .spot-item-checkin-btn {
  display: block;
}

.spot-name {
  font-weight: 800;
  font-size: 14px;
  color: #3E5C70;
}

.spot-desc {
  font-size: 12px;
  color: #8FA9BB;
  margin-top: 2px;
}

.stamp-icon {
  font-size: 18px;
  flex: none;
}

/* ---- 判定ヒーローカード ---- */
.hero-card {
  background: linear-gradient(135deg, #7DCBF3, #A5DBF7);
  border-radius: 22px;
  padding: 20px;
  margin: 14px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(90, 160, 210, .25);
}

.hero-card::before {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -26px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}

.hero-card h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
  border: none;
  padding: 0;
}

.hero-card .hero-sub {
  font-size: 12.5px;
  opacity: .95;
  margin: 0 0 12px;
}

.hero-card #selectedSpot {
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: rgba(255, 255, 255, .22);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 12px;
  position: relative;
}

.hero-card button {
  background: #fff;
  color: #4FA8D8;
  box-shadow: 0 3px 8px rgba(60, 120, 160, .2);
  position: relative;
}

.hero-card button:hover {
  background: #F0FAFF;
}

.hero-card .result-text {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin: 10px 0 0;
  position: relative;
}

/* ---- スタンプ獲得演出 ---- */
#stampArea {
  position: relative;
}

#stampArea h3 {
  background: #fff;
  border: none;
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
  color: #F0A73A;
  font-weight: 800;
  font-size: 16px;
  margin: 12px 0 0;
  box-shadow: 0 4px 14px rgba(90, 160, 210, .18);
}

#stampArea p {
  background: rgba(255, 255, 255, .9);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
  color: #4A6B80;
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 0;
  position: relative;
}

/* ---- 台帳(最近のスタンプ・スタンプ帳風グリッド) ---- */
.stamps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}

.stamp-card {
  background: #F7FBFE;
  border-radius: 18px;
  padding: 14px 8px 12px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all .2s;
}

.stamp-card:hover {
  transform: translateY(-2px);
}

.stamp-icon-large {
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 3px solid #6EC2EE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
  transform: rotate(-5deg);
}

.stamp-icon-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stamp-card:nth-child(4n+2) .stamp-icon-large {
  border-color: #F48FB1;
  transform: rotate(4deg);
}

.stamp-card:nth-child(4n+3) .stamp-icon-large {
  border-color: #A6D46B;
  transform: rotate(-2deg);
}

.stamp-card:nth-child(4n) .stamp-icon-large {
  border-color: #F6C26B;
  transform: rotate(5deg);
}

.stamp-spot-name {
  font-size: 11px;
  font-weight: 800;
  color: #3E5C70;
  line-height: 1.3;
}

.loading-text {
  grid-column: 1 / -1;
  text-align: center;
  color: #8FA9BB;
  font-size: 14px;
  padding: 24px;
}

#selectedSpot {
  font-weight: 800;
  color: #4FA8D8;
}

.result-text {
  font-size: 14px;
  color: #4A6B80;
  margin: 8px 0;
}

.spots-count {
  font-size: 12.5px;
  font-weight: 700;
  color: #8FA9BB;
  margin: 4px 0 8px;
}

#shareBtn {
  background-color: #3E5C70;
  margin-top: 12px;
}

#shareBtn:hover {
  background-color: #2E4657;
}

/* ---- ヘッダーアイコン ---- */
.header-icons {
  margin-left: auto;
}

.header-icon {
  font-size: 20px;
  text-decoration: none;
}

/* ---- 挨拶 ---- */
.greeting-wrap {
  padding: 8px 4px 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.greeting-name {
  font-size: 15px;
  font-weight: 700;
  color: #3E5C70;
}

.greeting-name strong {
  font-weight: 800;
}

.greeting-sub {
  font-size: 13px;
  color: #8FA9BB;
}

/* ---- チェックインカード ---- */
.checkin-card {
  background: linear-gradient(135deg, #7DCBF3, #A5DBF7);
  border-radius: 22px;
  padding: 20px;
  margin: 8px 0 14px;
  box-shadow: 0 4px 14px rgba(90,160,210,.25);
  position: relative;
  overflow: hidden;
}

.checkin-card::before {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}

.checkin-label {
  font-size: 12px;
  color: rgba(255,255,255,.9);
  font-weight: 700;
  margin-bottom: 4px;
}

.checkin-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.checkin-btn {
  background: #fff;
  color: #4FA8D8;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 20px;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 8px rgba(60,120,160,.2);
}

.checkin-btn:hover {
  background: #F0FAFF;
}

.checkin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #A6D46B;
  display: inline-block;
}

/* ---- セクションヘッダー ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  color: #4A6B80;
}

.see-all {
  font-size: 12px;
  font-weight: 700;
  color: #6EC2EE;
  text-decoration: none;
}

/* ---- 参加中のラリー ---- */
.rally-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rally-loading {
  font-size: 13px;
  color: #8FA9BB;
  text-align: center;
  padding: 16px;
}

.rally-item {
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(90,160,210,.1);
  cursor: pointer;
  transition: transform .15s;
}

.rally-item:hover {
  transform: translateY(-1px);
}

.rally-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex: none;
}

.rally-info {
  flex: 1;
  min-width: 0;
}

.rally-name {
  font-size: 14px;
  font-weight: 800;
  color: #3E5C70;
  margin-bottom: 6px;
}

.rally-bar-wrap {
  background: #EEF5FA;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.rally-bar {
  height: 100%;
  border-radius: 999px;
  transition: width .5s ease;
}

.rally-count {
  font-size: 18px;
  font-weight: 800;
  flex: none;
}

.rally-count span {
  font-size: 12px;
  font-weight: 700;
  color: #8FA9BB;
}


/* ---- 近く/エリア 切り替えタブ ---- */
.tab-wrap {
  display: flex;
  background: #EAF2F7;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 12px;
  border: none;
}

.tab-btn {
  flex: 1;
  padding: 9px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #8FA9BB;
  border: none;
  background: none;
  border-radius: 999px;
  margin: 0;
  width: auto;
  box-shadow: none;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, .5);
}

.tab-btn.active {
  color: #4FA8D8;
  background: #fff;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(90, 160, 210, .15);
}

/* ---- スタンプ拡大表示モーダル（スタンプ作成の結果表示） ---- */
.stamp-view-modal {
  position: fixed;
  inset: 0;
  background: rgba(62, 92, 112, .6);
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.stamp-view-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);
}

.stamp-view-image {
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  background: #F7FBFE;
}

.stamp-view-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stamp-view-name {
  font-size: 16px;
  font-weight: 800;
  color: #3E5C70;
  margin-bottom: 20px;
}

.stamp-view-card button {
  margin-bottom: 10px;
}

.stamp-view-card button:last-child {
  margin-bottom: 0;
}

.stamp-view-card input {
  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;
  outline: none;
  margin-bottom: 16px;
}

.stamp-view-card input:focus {
  border-color: #6EC2EE;
}

/* ---- スポット選択エリア ---- */
.selected-spot-txt {
  font-weight: 800;
  font-size: 14px;
  color: #4FA8D8;
  background: #E3F4FD;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 8px 0;
}