/* ============================================
   ENHANCED PAGES STYLES
   全ページ共通のスタイル
   ============================================ */

/* ============================================
   写真プレビューグリッド
   ============================================ */

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--cream);
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.photo-preview-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-color: var(--hunter-green);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.photo-remove-btn:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
}

.photo-remove-btn:active {
  transform: scale(0.95);
}

/* ============================================
   ページ共通レイアウト
   ============================================ */

.register-page,
.hunting-page,
.ammunition-page,
.application-page,
.history-page,
.notifications-page,
.settings-page,
.help-page,
.privacy-page,
.terms-page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--cream) 0%, white 100%);
  padding: 2rem 0 4rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--charcoal);
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
  animation: titleFadeIn 0.6s ease-out;
}

@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-description {
  font-size: 1.1rem;
  color: var(--charcoal-light);
  margin: 0 0 3rem 0;
  line-height: 1.7;
  animation: titleFadeIn 0.6s ease-out 0.1s both;
}

/* ============================================
   フォームスタイル - ENHANCED
   ============================================ */

.register-content {
  max-width: 700px;
  margin: 0 auto;
  animation: contentFadeIn 0.8s ease-out 0.2s both;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.register-form {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.form-section {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 2px solid var(--cream);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 2rem;
  padding-bottom: 0;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--forest-deep);
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.01em;
}

.form-section-title svg {
  color: var(--sunset-orange);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--charcoal);
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--forest-light);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-help {
  font-size: 0.85rem;
  color: var(--charcoal-light);
  margin: 0.5rem 0 0 0;
  line-height: 1.5;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.checkbox-label:hover {
  background: var(--cream);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--forest-deep);
}

.checkbox-label span {
  font-weight: 500;
  color: var(--charcoal);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 2rem;
  border-top: 2px solid var(--cream);
}

/* ボタンスタイルを統一 */
.btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sunset-orange) 0%, var(--earth-clay) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--charcoal);
  border: 2px solid var(--cream-dark);
}

.btn-secondary:hover {
  background: var(--cream);
  border-color: var(--forest-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-small {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

/* ============================================
   リスト表示 - ENHANCED
   ============================================ */

.list-container {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  animation: sectionFadeIn 0.8s ease-out both;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--cream);
}

.list-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0;
  letter-spacing: -0.02em;
}

.list-item {
  background: var(--cream);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.list-item:hover {
  transform: translateX(4px);
  border-color: var(--forest-light);
  box-shadow: var(--shadow-sm);
}

.list-item:last-child {
  margin-bottom: 0;
}

/* ============================================
   カード表示 - ENHANCED
   ============================================ */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 2px solid var(--cream);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--forest-light);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cream);
}

.card-title {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--charcoal);
  margin: 0;
}

.card-content {
  color: var(--charcoal-light);
  line-height: 1.6;
}

/* ============================================
   エンプティステート
   ============================================ */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--charcoal-light);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 0 0 0.5rem 0;
}

.empty-state-text {
  font-size: 1rem;
  margin: 0 0 2rem 0;
}

/* ============================================
   バッジ・ラベル
   ============================================ */

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-success {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  color: #2e7d32;
}

.badge-warning {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
}

.badge-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1976d2;
}

.badge-danger {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
}

/* ============================================
   レスポンシブ
   ============================================ */

@media (min-width: 768px) {
  .register-page,
  .hunting-page,
  .ammunition-page,
  .application-page,
  .history-page,
  .notifications-page,
  .settings-page,
  .help-page,
  .privacy-page,
  .terms-page {
    padding: 3rem 0 5rem;
  }

  .register-form {
    padding: 3rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-actions {
    justify-content: flex-end;
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   アニメーション
   ============================================ */

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   履歴ページ専用スタイル
   ============================================ */

.history-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.next-renewal-section,
.history-section,
.stats-section {
  margin-bottom: 3rem;
}

.section-header {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 1.5rem 0;
}

.next-renewal-card {
  background: linear-gradient(135deg, var(--forest-light) 0%, var(--forest-deep) 100%);
  color: white;
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-lg);
}

.renewal-icon svg {
  font-size: 3rem;
}

.renewal-info {
  flex: 1;
}

.renewal-date,
.renewal-period {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.renewal-countdown {
  margin-top: 1rem;
}

.countdown-value {
  font-size: 2.5rem;
  font-weight: 800;
}

.countdown-label {
  font-size: 1rem;
  margin-left: 0.5rem;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-upcoming {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.status-completed {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  color: #2e7d32;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.history-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--cream);
  transition: all 0.3s ease;
}

.history-card:hover {
  border-color: var(--forest-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--cream);
}

.history-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.history-title h3 {
  font-size: 1.3rem;
  margin: 0;
  color: var(--charcoal);
}

.completed-icon {
  color: #2e7d32;
}

.history-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.detail-row {
  display: flex;
  gap: 1rem;
}

.detail-label {
  font-weight: 600;
  color: var(--charcoal-light);
  min-width: 100px;
}

.detail-value {
  color: var(--charcoal);
}

.history-documents,
.history-notes {
  margin-top: 1rem;
}

.history-documents h4,
.history-notes h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.document-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.document-list li {
  background: var(--cream);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.history-notes p {
  color: var(--charcoal-light);
  line-height: 1.6;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--cream);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--forest-light);
  transform: translateY(-4px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--forest-deep);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--charcoal-light);
}

/* ============================================
   申請ページ専用スタイル
   ============================================ */

.application-period-page .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.period-header {
  text-align: center;
  margin-bottom: 3rem;
}

.period-alert {
  background: linear-gradient(135deg, var(--sunset-orange) 0%, var(--earth-clay) 100%);
  color: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.period-alert .page-title {
  color: white;
  margin-bottom: 0.5rem;
}

.period-dates {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.period-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.period-countdown .countdown-value {
  font-size: 2.5rem;
  font-weight: 800;
}

.progress-section,
.todo-section,
.notice-section,
.action-section {
  margin-bottom: 2.5rem;
}

.progress-bar-container {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.progress-bar {
  width: 100%;
  height: 24px;
  background: var(--cream);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--forest-light) 0%, var(--forest-deep) 100%);
  transition: width 0.5s ease;
}

.progress-text {
  text-align: center;
  font-weight: 600;
  color: var(--charcoal);
}

.section-description {
  color: var(--charcoal-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.todo-list {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow-md);
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.todo-item:hover {
  background: var(--cream);
  border-color: var(--forest-light);
}

.todo-item.completed {
  opacity: 0.6;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
}

.todo-checkbox {
  flex-shrink: 0;
}

.check-icon-completed {
  color: #2e7d32;
}

.check-icon-uncompleted {
  color: var(--charcoal-light);
}

.todo-icon {
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--forest-deep);
}

.todo-text {
  flex: 1;
  font-weight: 500;
  color: var(--charcoal);
}

.notice-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--sunset-orange);
}

.notice-card ul {
  margin: 0;
  padding-left: 1.5rem;
}

.notice-card li {
  color: var(--charcoal);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.action-section {
  text-align: center;
}

.btn-large {
  padding: 1.25rem 3rem;
  font-size: 1.1rem;
}

/* ============================================
   設定ページ専用スタイル
   ============================================ */

.settings-page .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.settings-section {
  margin-bottom: 3rem;
}

.settings-section .section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
}

.settings-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--cream);
}

.divider {
  border: none;
  border-top: 2px solid var(--cream);
  margin: 1.5rem 0;
}

.gun-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--cream);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.gun-info h3 {
  font-size: 1.2rem;
  color: var(--charcoal);
  margin: 0 0 0.5rem 0;
}

.gun-details {
  font-size: 0.9rem;
  color: var(--charcoal-light);
}

.gun-details p {
  margin: 0.25rem 0;
}

.btn-danger {
  background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(198, 40, 40, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(198, 40, 40, 0.4);
}

.danger-zone {
  padding: 1.5rem;
  background: #fff5f5;
  border: 2px solid #ffcdd2;
  border-radius: 12px;
}

.subsection-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #c62828;
  margin: 0 0 0.5rem 0;
}

.danger-text {
  color: var(--charcoal-light);
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

/* ============================================
   通知ページ専用スタイル
   ============================================ */

.notifications-page .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.notifications-header .page-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.unread-badge {
  background: var(--sunset-orange);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}

.notifications-actions {
  margin-bottom: 2rem;
  display: flex;
  justify-content: flex-end;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.notification-group {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.group-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--cream);
}

.notification-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid var(--cream);
  margin-bottom: 1rem;
  position: relative;
}

.notification-item:last-child {
  margin-bottom: 0;
}

.notification-item.unread {
  background: #e3f2fd;
  border-color: #90caf9;
}

.notification-item.read {
  background: white;
  opacity: 0.8;
}

.notification-item:hover {
  border-color: var(--forest-light);
  transform: translateX(4px);
}

.notification-icon {
  flex-shrink: 0;
}

.notification-icon-alert {
  color: var(--sunset-orange);
}

.notification-icon-success {
  color: #2e7d32;
}

.notification-icon-info {
  color: #1976d2;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 0.5rem 0;
}

.notification-message {
  color: var(--charcoal-light);
  line-height: 1.6;
  margin: 0 0 0.5rem 0;
}

.notification-meta {
  font-size: 0.85rem;
  color: var(--charcoal-light);
  margin-top: 0.5rem;
}

.notification-delete {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--charcoal-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.notification-delete:hover {
  background: rgba(198, 40, 40, 0.1);
  color: #c62828;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--charcoal-light);
}

.empty-state svg {
  opacity: 0.3;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1.1rem;
  margin: 0;
}

/* ============================================
   狩猟記録・弾薬帳簿ページ共通スタイル
   ============================================ */

.hunting-page .container,
.ammunition-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-header .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hunting-stats,
.ammunition-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--cream);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--forest-light);
  transform: translateY(-4px);
}

.stat-in {
  border-left: 4px solid #2e7d32;
}

.stat-out {
  border-left: 4px solid #c62828;
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--forest-deep);
}

.stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.filter-section {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-icon {
  font-size: 1.5rem;
  color: var(--forest-deep);
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--forest-light);
}

.hunting-list,
.ammunition-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hunting-card,
.ammunition-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--cream);
  transition: all 0.3s ease;
}

.hunting-card:hover,
.ammunition-card:hover {
  border-color: var(--forest-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ammunition-card.in {
  border-left: 4px solid #2e7d32;
}

.ammunition-card.out {
  border-left: 4px solid #c62828;
}

.hunting-card-header,
.ammunition-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--cream);
}

.hunting-date,
.ammunition-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--charcoal);
}

.hunting-weather {
  color: var(--charcoal-light);
  font-size: 0.9rem;
}

.ammunition-badge {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

.ammunition-badge.in {
  background: #c8e6c9;
  color: #2e7d32;
}

.ammunition-badge.out {
  background: #ffcdd2;
  color: #c62828;
}

.hunting-card-body,
.ammunition-card-body {
  margin-bottom: 1rem;
}

.hunting-animal,
.ammunition-type {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.animal-icon,
.type-icon {
  font-size: 1.5rem;
}

.animal-count,
.ammunition-quantity {
  margin-left: auto;
  font-size: 1.3rem;
}

.quantity-value {
  font-weight: 800;
}

.quantity-value.in {
  color: #2e7d32;
}

.quantity-value.out {
  color: #c62828;
}

.quantity-balance {
  font-size: 0.9rem;
  color: var(--charcoal-light);
  margin-left: 0.5rem;
}

.hunting-location,
.ammunition-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--charcoal-light);
  margin-bottom: 0.5rem;
}

.hunting-memo,
.ammunition-memo,
.ammunition-target,
.ammunition-supplier,
.ammunition-gunpowder {
  color: var(--charcoal-light);
  line-height: 1.6;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.gunpowder-total {
  margin-left: 1rem;
  font-weight: 600;
  color: var(--charcoal);
}

.hunting-companions {
  font-size: 0.9rem;
  color: var(--charcoal-light);
  margin-top: 0.5rem;
}

.hunting-card-actions,
.ammunition-card-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 2px solid var(--cream);
}

/* 弾薬帳簿専用スタイル */
.ammunition-balance-card {
  background: linear-gradient(135deg, var(--forest-light) 0%, var(--forest-deep) 100%);
  color: white;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.balance-label {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.balance-number {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.balance-number span {
  font-size: 1.5rem;
  margin-left: 0.5rem;
}

/* モーダルスタイル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 2px solid var(--cream);
}

.modal-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--charcoal-light);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--cream);
  color: var(--charcoal);
}

.modal-content form {
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 100px;
  justify-content: center;
}

.radio-label:hover {
  border-color: var(--forest-light);
  background: var(--cream);
}

.radio-label input[type="radio"] {
  cursor: pointer;
  accent-color: var(--forest-deep);
}

.type-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.type-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.type-button:hover {
  border-color: var(--forest-light);
  background: var(--cream);
}

.type-button.active {
  border-color: var(--forest-deep);
  background: var(--forest-light);
  color: white;
}

.type-button.active.in {
  background: #2e7d32;
  border-color: #1b5e20;
}

.type-button.active.out {
  background: #c62828;
  border-color: #b71c1c;
}

.type-button .type-icon {
  font-size: 1.8rem;
}

.type-button .type-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.quantity-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-input-group .form-input {
  flex: 1;
}

.quantity-unit {
  font-weight: 600;
  color: var(--charcoal);
}

/* ============================================
   認証ページスタイル (Login/Register/Password Reset)
   ============================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--cream) 0%, white 100%);
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.auth-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  z-index: 10;
}

.auth-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--cream);
  animation: authCardFadeIn 0.6s ease-out;
}

@keyframes authCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--forest-deep);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.auth-logo:hover {
  color: var(--sunset-orange);
  transform: scale(1.05);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--charcoal);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 1rem;
  color: var(--charcoal-light);
  margin: 0;
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #ffebee;
  border: 2px solid #ffcdd2;
  border-radius: 12px;
  color: #c62828;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.auth-success {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #e8f5e9;
  border: 2px solid #c8e6c9;
  border-radius: 12px;
  color: #2e7d32;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .form-input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--charcoal-light);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.password-toggle:hover {
  color: var(--charcoal);
  background: var(--cream);
}

.forgot-password-link {
  color: var(--forest-deep);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.forgot-password-link:hover {
  color: var(--sunset-orange);
  text-decoration: underline;
}

.auth-submit-button {
  width: 100%;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--sunset-orange) 0%, var(--earth-clay) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.auth-submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.auth-submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 2px solid var(--cream);
}

.auth-divider span {
  padding: 0 1rem;
  color: var(--charcoal-light);
  font-size: 0.9rem;
  font-weight: 500;
}

.social-login-button {
  width: 100%;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--cream-dark);
  cursor: pointer;
  background: white;
  color: var(--charcoal);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.social-login-button:hover {
  background: var(--cream);
  border-color: var(--forest-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--cream);
}

.auth-footer p {
  color: var(--charcoal-light);
  margin: 0;
  font-size: 0.95rem;
}

.auth-footer a {
  color: var(--forest-deep);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.5rem;
  transition: all 0.2s ease;
}

.auth-footer a:hover {
  color: var(--sunset-orange);
  text-decoration: underline;
}

.auth-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 50%, var(--cream) 1px, transparent 1px),
    radial-gradient(circle at 80% 80%, var(--cream) 1px, transparent 1px),
    radial-gradient(circle at 40% 20%, var(--cream) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.5;
  animation: patternFloat 20s ease-in-out infinite;
}

@keyframes patternFloat {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, 10px);
  }
}

/* ============================================
   静的ページ共通スタイル (ヘルプ・プライバシー・利用規約)
   ============================================ */

.static-page .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.static-page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.static-page-header .page-description {
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   FAQアコーディオン (ヘルプページ)
   ============================================ */

.faq-section {
  margin-bottom: 2.5rem;
}

.faq-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--forest-deep);
  margin: 0 0 1.25rem 0;
}

.faq-section-title svg {
  color: var(--sunset-orange);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.faq-item {
  background: white;
  border-radius: 16px;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--cream);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item.open {
  border-color: var(--forest-light);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  text-align: left;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--cream);
}

.faq-question-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--forest-deep);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-question-icon {
  transform: rotate(180deg);
}

.faq-answer-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--charcoal-light);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ============================================
   法的ページスタイル (プライバシー・利用規約)
   ============================================ */

.legal-content {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.legal-updated {
  text-align: right;
  font-size: 0.9rem;
  color: var(--charcoal-light);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--cream);
}

.legal-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--cream);
}

.legal-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--forest-deep);
  margin: 0 0 1rem 0;
}

.legal-section p {
  color: var(--charcoal-light);
  line-height: 1.8;
  margin: 0 0 0.75rem 0;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  color: var(--charcoal-light);
  line-height: 1.8;
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-section li:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .legal-content {
    padding: 3rem;
  }
}

@media (max-width: 767px) {
  .legal-content {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 1.25rem 1rem;
  }
}

/* ============================================
   アクセシビリティ
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
