/* 상단 헤더 & 날짜 선택기 */
.app-header {
  flex-shrink: 0;
  background: var(--chrome-bg, var(--surface));
  border-bottom: 1px solid var(--chrome-border, var(--border));
  padding-top: calc(10px + var(--safe-top));
  z-index: 20;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--chrome-fg, var(--text-main));
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--chrome-fg, var(--text-main));
  transition: color 0.2s ease;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--chrome-fg, var(--primary));
  background: var(--chrome-pill-bg, var(--primary-soft));
  padding: 3px 8px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-stat {
  font-size: 12px;
  color: var(--chrome-fg, var(--text-sub));
  background: var(--chrome-pill-bg, #F4F4F5);
  padding: 5px 10px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-stat strong {
  color: var(--chrome-fg, var(--primary));
  font-weight: 700;
}

.date-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.date-bar::-webkit-scrollbar {
  display: none;
}

.date-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.date-chip:hover {
  border-color: var(--primary-border);
}

.date-chip.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.date-chip-date {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.date-chip-match {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
}


/* 바텀 시트 */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 30;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  max-height: 78dvh;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: var(--safe-bottom);
}

.bottom-sheet.is-open {
  transform: translateY(0);
}

.sheet-handle-area {
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #CBD5E1;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.sheet-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sheet-date-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 6px;
}

.sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sheet-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheet-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  background: #F1F5F9;
  padding: 4px 10px;
  border-radius: 999px;
}

.icon-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: #F1F5F9;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-close-btn:active {
  background: #E2E8F0;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
}

/* 사진 카드 */
.photo-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.photo-card-media {
  position: relative;
}

.photo-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #E2E8F0;
  cursor: zoom-in;
}

.photo-card-date {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.photo-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.seat-detail-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 9px;
  border-radius: 8px;
}

.author-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.photo-comment {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
}

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state-icon {
  font-size: 36px;
}

.empty-state-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.empty-state-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
}

.btn-empty-upload {
  margin-top: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* 업로드 모달 */
.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + var(--safe-bottom));
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-height: 90dvh;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalUp 0.22s ease-out;
}

@keyframes modalUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.upload-form {
  padding: 14px 18px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.label-hint {
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  background: #F8FAFC;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #FFFFFF;
}

.file-dropzone {
  display: block;
  border: 1.5px dashed #CBD5E1;
  border-radius: 12px;
  background: #F8FAFC;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.file-dropzone:hover {
  border-color: var(--primary);
}

.dropzone-placeholder {
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dropzone-icon {
  font-size: 24px;
}

.dropzone-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.dropzone-preview {
  position: relative;
}

.dropzone-preview img {
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  display: block;
}

.preview-meta {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.72);
  padding: 3px 8px;
  border-radius: 6px;
}

.form-error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
}

.btn-submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-submit:hover {
  background: var(--primary-hover);
}

.btn-submit:disabled {
  background: #94A3B8;
  cursor: not-allowed;
}

/* 라이트박스 */
.lightbox-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-overlay[hidden] {
  display: none;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 75dvh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-caption {
  margin: 12px 0 0;
  font-size: 13px;
  color: #E2E8F0;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: calc(14px + var(--safe-top));
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font-size: 16px;
  cursor: pointer;
}

/* 토스트 */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: 70;
  background: rgba(15, 23, 42, 0.9);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 하단 메뉴바 */
.bottom-nav {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: var(--chrome-bg, var(--surface));
  border-top: 1px solid var(--chrome-border, var(--border));
  padding: 6px 8px calc(8px + var(--safe-bottom));
  z-index: 25;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.bottom-nav-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 52px;
  border: none;
  background: transparent;
  color: var(--chrome-fg-muted, #71717A);
  cursor: pointer;
  border-radius: 12px;
  padding: 0;
  transition: color 0.16s ease, transform 0.12s ease, background 0.16s ease;
}

.bottom-nav-btn:active {
  transform: scale(0.92);
  background: var(--chrome-active-bg, #F4F4F5);
}

.bottom-nav-btn.is-active {
  color: var(--chrome-fg, var(--primary));
}

.bottom-nav-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--chrome-fg, var(--primary));
}

.bottom-nav-btn.is-center.is-active {
  background: var(--chrome-active-bg, #F4F4F5);
  height: 52px;
}

.bottom-nav-icon {
  width: 28px;
  height: 28px;
  display: block;
}

.bottom-nav-icon.is-stadium {
  width: 44px;
  height: 37px;
}

