/* ==========================================================================
   Variables for Top Page (Overrides or specific values)
   ========================================================================== */
:root {
  --brand-text: #111827;
  --text-muted: #6b7280;
  --brand-header: #1f7a58;
  --brand-btn-hover: #114a38;
  --brand-orange: #ea580c;
  --brand-orange-hover: #c2410c;
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-top: 32px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
}

.hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Alert Notice */
.alert-notice {
  width: 100%;
  max-width: 800px;
  background-color: var(--primary-green);
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.alert-icon-wrapper {
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-icon-wrapper i {
  width: 10px;
  height: 10px;
}

.alert-highlight {
  color: #facc15;
  font-weight: 700;
}

.alert-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.alert-close:hover {
  color: #ffffff;
}

/* Cards Section */
.cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 850px;
  margin: 0 auto 48px auto;
}

@media (min-width: 1024px) {
  .cards-grid {
    max-width: 1024px;
  }
}

.card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  max-width: 320px;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-icon-container {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transform: rotate(-5deg);
}

.icon-search {
  background-color: #ecfdf5;
  color: var(--brand-header);
}

.icon-calendar {
  background-color: #fff7ed;
  color: var(--brand-orange);
}

.card-icon-container i {
  width: 32px;
  height: 32px;
}

.card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-text);
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-btn {
  width: 100%;
  color: #ffffff;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.9rem;
  text-decoration: none;
}

.btn-search {
  background-color: var(--primary-green);
}
.btn-search:hover {
  background-color: var(--brand-btn-hover);
}

.btn-calendar {
  background-color: var(--brand-orange);
}
.btn-calendar:hover {
  background-color: var(--brand-orange-hover);
}

.card-btn.is-disabled {
  background-color: #cbd5e1;
  color: #475569;
  cursor: not-allowed;
  pointer-events: none;
}

.card-btn.is-disabled:hover {
  background-color: #cbd5e1;
}

.card-btn.is-disabled i {
  opacity: 0.7;
}

.badge-new {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #ffedd5;
  color: #ea580c;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
}

/* ==========================================================================
   Web Bonus Floating Button & Modal
   ========================================================================== */
.web-bonus-floating {
  position: fixed;
  top: 125px; /* 固定ヘッダーのすぐ下 */
  right: 20px;
  z-index: 1500;
  display: flex;
  justify-content: flex-end;
}

.floating-bonus-btn {
  background-color: var(--primary-green);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(31, 122, 88, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.floating-bonus-btn:hover {
  background-color: var(--dark-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(31, 122, 88, 0.4);
}

.floating-bonus-btn i {
  width: 18px;
  height: 18px;
}

/* Modal */
.bonus-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.bonus-modal.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.bonus-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.bonus-modal-content {
  position: relative;
  background-color: #fff;
  border-radius: 24px;
  width: 95%; /* モバイルでの余裕 */
  max-width: 440px; /* 少し広げて文字入りを改善 */
  padding: 40px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.bonus-modal.is-hidden .bonus-modal-content {
  transform: scale(0.9);
}

.bonus-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: background-color 0.2s;
}

.bonus-modal-close:hover {
  background-color: #e5e7eb;
  color: #111827;
}

.bonus-modal-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.bonus-modal-header p {
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* Widget Overrides inside Modal */
.web-bonus-widget--modal .web-bonus-widget__qr {
  background-color: #f9fafb;
  border: 2px dashed #e5e7eb;
  padding: 24px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.web-bonus-widget--modal .web-bonus-widget__qr img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .web-bonus-floating {
    top: auto;
    bottom: 100px; /* 比較バーがある場合はその上 */
    right: 16px;
  }
  .floating-bonus-btn span {
    display: none; /* スマホではアイコンのみか、もっと小さく */
  }
  .floating-bonus-btn {
    padding: 12px;
    border-radius: 50%;
  }
}
