/* ===== リセット & 変数 ===== */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --rose:       #E8748A;
  --rose-dark:  #C4526A;
  --rose-light: #F2A7B5;
  --rose-pale:  #FCE8ED;
  --cream:      #FEFAF5;
  --white:      #FFFFFF;
  --text:       #3D2B2B;
  --muted:      #9B8080;
  --border:     rgba(232,116,138,0.2);
  --shadow-sm:  0 2px 8px rgba(200,100,120,0.12);
  --shadow-md:  0 6px 24px rgba(200,100,120,0.16);
  --shadow-lg:  0 12px 40px rgba(200,100,120,0.22);
  --radius:     16px;
  --bnav-h:     72px;

  --spring-c: #FF8FAB; --spring-bg: linear-gradient(135deg,#FFF0F5 0%,#FFE4EF 100%);
  --summer-c: #45B7D1; --summer-bg: linear-gradient(135deg,#E8F8FF 0%,#D0F0FF 100%);
  --autumn-c: #FF8C42; --autumn-bg: linear-gradient(135deg,#FFF5EE 0%,#FFE8D5 100%);
  --winter-c: #7EB8D4; --winter-bg: linear-gradient(135deg,#EEF6FF 0%,#DFF0FF 100%);
}

body {
  font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 認証画面 ===== */
.auth-screen {
  display: none;
  position: fixed; inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.auth-screen.active { display: flex; }

.auth-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #FFB6E1 0%, #FFC8E8 40%, #FFE4B5 100%);
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob1 { width: 300px; height: 300px; background: #FFB6E1; top: -50px; left: -80px; animation-delay: 0s; }
.blob2 { width: 250px; height: 250px; background: #FFF0C8; bottom: -60px; right: -40px; animation-delay: 3s; }
.blob3 { width: 200px; height: 200px; background: #FFD4E5; top: 40%; left: 50%; animation-delay: 1.5s; }

@keyframes blobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(20px,-20px) scale(1.08); }
}

.auth-card {
  position: relative;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 44px 36px 40px;
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(200,100,140,0.25), 0 0 0 1px rgba(255,255,255,0.6);
  text-align: center;
  width: 90%; max-width: 340px;
  animation: authCardIn 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

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

@keyframes authShake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  40%     { transform: translateX(8px); }
  60%     { transform: translateX(-6px); }
  80%     { transform: translateX(6px); }
}

.auth-icon  { font-size: 52px; margin-bottom: 10px; display: block; }
.auth-title { font-size: 26px; font-weight: 700; color: var(--rose); margin-bottom: 6px; }
.auth-sub   { font-size: 13px; color: var(--muted); margin-bottom: 28px; font-weight: 300; }

.password-wrap {
  position: relative;
  margin-bottom: 18px;
}
.password-input {
  width: 100%;
  padding: 14px 48px 14px 18px;
  border: 2px solid var(--border);
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  background: rgba(255,255,255,0.8);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}
.password-input:focus {
  border-color: var(--rose-light);
  box-shadow: 0 0 0 4px var(--rose-pale);
}
.eye-btn {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  font-size: 18px; cursor: pointer; padding: 4px;
  user-select: none; line-height: 1;
}

.btn-login {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-dark) 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(232,116,138,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-login:hover  { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(232,116,138,0.5); }
.btn-login:active { transform: translateY(0); }

.auth-error {
  color: #E85D75;
  font-size: 13px;
  margin-top: 12px;
  min-height: 18px;
  font-weight: 500;
}

/* ===== メインアプリ ===== */
.main-app {
  display: none;
  min-height: 100vh;
  padding-bottom: var(--bnav-h);
}
.main-app.active { display: block; }

/* ===== ヘッダー ===== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(254,250,245,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--rose);
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-icon { font-size: 20px; }
.logout-btn {
  background: none; border: none;
  color: var(--muted); font-size: 12px;
  cursor: pointer; padding: 6px 10px;
  border-radius: 8px;
  font-family: inherit;
  transition: background 0.2s;
}
.logout-btn:hover { background: var(--rose-pale); }

/* ===== ページ共通 ===== */
.page { display: none; animation: pageIn 0.3s ease; }
.page.active { display: block; }

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

.page-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 20px;
}

/* ===== 今日のページ ===== */
.today-wrap { padding: 20px; max-width: 560px; margin: 0 auto; }

/* ===== ストリークバナー ===== */
.streak-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: white;
  padding: 10px 20px;
  border-radius: 16px;
  margin-bottom: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255,107,53,0.35);
  animation: fadeSlideUp 0.4s ease;
}
.streak-flame { font-size: 22px; }
.streak-count { font-size: 22px; font-weight: 900; }
.streak-label { font-size: 13px; }

.today-hero {
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
  border: 3px solid var(--border);
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.5s;
  box-shadow: var(--shadow-md);
}
.today-hero img {
  width: 100%; max-height: 500px;
  object-fit: cover; display: block;
  border-radius: 21px;
  animation: photoIn 0.5s cubic-bezier(0.34,1.2,0.64,1);
  cursor: pointer;
}
@keyframes photoIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.no-photo {
  color: var(--muted); font-size: 15px;
  text-align: center; line-height: 2;
}

.today-info { margin-top: 16px; }

/* ===== マイルストーンバナー（今日ページ） ===== */
.today-milestone-banner {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  text-align: center;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(255,165,0,0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  animation: fadeSlideUp 0.5s cubic-bezier(0.34,1.2,0.64,1);
}

.today-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.season-badge { font-size: 14px; font-weight: 500; }

/* ===== 今日メタ右側（年齢 + ⭐） ===== */
.today-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.age-badge-today {
  background: var(--rose-pale);
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.fav-btn {
  background: none; border: none;
  font-size: 28px; cursor: pointer; padding: 2px;
  transition: transform 0.15s;
  line-height: 1;
}
.fav-btn:hover { transform: scale(1.2); }
.fav-btn.pop { animation: starPop 0.4s cubic-bezier(0.34,1.56,0.64,1); }

@keyframes starPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.6); }
  100% { transform: scale(1); }
}

.today-comment {
  padding: 14px 18px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 10px;
}

/* ===== LINE シェアボタン（今日ページ） ===== */
.line-share-btn {
  width: 100%;
  padding: 13px;
  background: #06C755;
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(6,199,85,0.35);
}
.line-share-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(6,199,85,0.45); }
.line-share-btn:active { transform: translateY(0); }

/* ===== 過去の今日 ===== */
.on-this-day { margin-top: 24px; }

.otd-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 12px;
  padding-left: 4px;
}
.otd-item {
  display: flex;
  gap: 12px;
  background: var(--white);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  animation: fadeSlideUp 0.4s ease;
}
.otd-img {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.otd-img:hover { opacity: 0.85; }
.otd-info { flex: 1; min-width: 0; }
.otd-year    { font-size: 12px; color: var(--muted); font-weight: 600; }
.otd-age     { font-size: 13px; font-weight: 700; color: var(--rose); margin: 2px 0; }
.otd-comment { font-size: 13px; color: var(--text); line-height: 1.5; word-break: break-all; }

/* ===== 投稿フォーム ===== */
.post-form {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.form-group { margin-bottom: 22px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.file-drop {
  display: block;
  border: 2px dashed var(--rose-light);
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  background: var(--rose-pale);
}
.file-drop:hover { border-color: var(--rose); background: #FCE0E6; }
.file-drop input { display: none; }

#fileDropContent {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 30px 20px; gap: 6px;
}
.file-icon { font-size: 32px; }
.file-text  { font-size: 14px; font-weight: 700; color: var(--rose); }
.file-sub   { font-size: 12px; color: var(--muted); }

.photo-preview { position: relative; }
.photo-preview img {
  width: 100%; max-height: 280px;
  object-fit: cover; display: block;
}
.preview-change {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.45);
  color: white; font-size: 13px; font-weight: 600;
  text-align: center; padding: 8px;
}

.post-form textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  resize: none;
  outline: none;
  background: #FFFCFD;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.post-form textarea:focus {
  border-color: var(--rose-light);
  box-shadow: 0 0 0 4px var(--rose-pale);
}
.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.overwrite-warning {
  background: #FFF8E8;
  border: 2px solid #FFB340;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  color: #8B5000;
}

.btn-post {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-dark) 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(232,116,138,0.4);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn-post:hover  { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(232,116,138,0.5); }
.btn-post:active { transform: translateY(0); }
.btn-post:disabled { background: linear-gradient(135deg, #ccc, #aaa); box-shadow: none; transform: none; cursor: not-allowed; }

.post-success {
  color: #28a745; font-weight: 600;
  font-size: 14px; text-align: center;
  margin-top: 14px;
  animation: fadeSlideUp 0.4s ease;
}
.post-error {
  color: #E85D75; font-size: 13px;
  margin-top: 10px; font-weight: 500;
}

/* ===== 一覧ページ ===== */
.list-header { padding: 24px 20px 8px; }

.list-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.list-header-top .page-title { margin-bottom: 0; }

.list-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 4px;
}

/* ===== グリッド切り替えボタン ===== */
.view-toggle-btn {
  background: var(--rose-pale);
  color: var(--rose-dark);
  border: 1.5px solid var(--rose-light);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.view-toggle-btn:hover  { background: #F8D5DC; transform: scale(1.04); }
.view-toggle-btn:active { transform: scale(0.95); }

.timeline-container {
  overflow-x: auto;
  padding: 16px 0 32px;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--rose-light) transparent;
}
.timeline-container::-webkit-scrollbar { height: 4px; }
.timeline-container::-webkit-scrollbar-thumb { background: var(--rose-light); border-radius: 2px; }
.timeline-container:active { cursor: grabbing; }

.photo-timeline {
  display: flex;
  gap: 16px;
  padding: 8px 24px 8px;
  align-items: flex-end;
  min-width: min-content;
  position: relative;
}
.photo-timeline::before {
  content: '';
  position: absolute;
  bottom: 0; left: 24px; right: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--rose-light), var(--rose-pale), transparent);
  border-radius: 2px;
}

/* ===== タイムラインカード ===== */
.timeline-card {
  background: var(--white);
  border-radius: 16px;
  padding: 10px 10px 14px;
  width: 156px;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s cubic-bezier(0.34,1.4,0.64,1), box-shadow 0.25s;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
}
.timeline-card.visible {
  animation: cardIn 0.5s cubic-bezier(0.34,1.2,0.64,1) forwards;
}
@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}
.timeline-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  z-index: 5;
}

/* 季節ボーダー */
.timeline-card.spring { border-top: 4px solid var(--spring-c); }
.timeline-card.summer { border-top: 4px solid var(--summer-c); }
.timeline-card.autumn { border-top: 4px solid var(--autumn-c); }
.timeline-card.winter { border-top: 4px solid var(--winter-c); }

/* ===== マイルストーンカード ===== */
.timeline-card.milestone-card {
  background: linear-gradient(135deg, #FFFBE8, #FFF0C8);
  box-shadow: 0 6px 24px rgba(255,210,50,0.28), 0 0 0 2px rgba(255,200,30,0.35);
}
.timeline-card.milestone-card.spring,
.timeline-card.milestone-card.summer,
.timeline-card.milestone-card.autumn,
.timeline-card.milestone-card.winter {
  border-top: 4px solid #FFD700;
}

.milestone-banner {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 5px 8px;
  margin: -10px -10px 8px;
  border-radius: 6px 6px 0 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
  gap: 4px;
}
.season-icon { font-size: 16px; flex-shrink: 0; }

/* ===== 年齢バッジ（カード） ===== */
.age-badge {
  background: var(--rose-pale);
  color: var(--rose-dark);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  white-space: nowrap;
  flex: 1;
  text-align: center;
  line-height: 1.6;
}

.fav-star {
  font-size: 18px; cursor: pointer;
  user-select: none; line-height: 1;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.fav-star:hover { transform: scale(1.3); }
.fav-star.pop { animation: starPop 0.4s cubic-bezier(0.34,1.56,0.64,1); }

.timeline-date {
  font-size: 10px; color: var(--muted);
  font-weight: 600; line-height: 1.5;
  margin-bottom: 8px;
}
.timeline-image {
  width: 100%; height: 128px;
  object-fit: cover; border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
  display: block;
}
.timeline-image:hover { opacity: 0.88; }
.timeline-comment {
  font-size: 11px; line-height: 1.6;
  color: var(--text); word-break: break-all;
}

/* ===== 横スクロール内の区切り ===== */
.h-divider {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 6px;
  min-height: 220px;
  gap: 8px;
  opacity: 0;
  animation: cardIn 0.4s ease 0.1s forwards;
}
.h-divider-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px; font-weight: 700;
  color: white;
  background: var(--rose);
  padding: 8px 5px;
  border-radius: 8px;
  white-space: nowrap;
}
.week-divider .h-divider-label {
  background: var(--rose-pale);
  color: var(--rose);
  font-size: 10px;
}
.h-divider-line {
  flex: 1; width: 2px;
  background: linear-gradient(to bottom, var(--rose-light), transparent);
  border-radius: 1px;
}

/* ===== グリッドビュー ===== */
.grid-container {
  padding: 4px 16px 32px;
}
.grid-month-section {
  margin-bottom: 28px;
}
.grid-month-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: 10px;
  padding-left: 4px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.grid-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.grid-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s, transform 0.25s;
}
.grid-item:hover img { opacity: 0.85; transform: scale(1.04); }
.grid-item-date {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 10px 6px 4px;
  text-align: center;
}
.grid-item-milestone {
  box-shadow: 0 0 0 2.5px #FFD700, var(--shadow-sm);
}
.grid-item-milestone-badge {
  position: absolute;
  top: 4px; right: 4px;
  font-size: 16px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

/* ===== お気に入りページ ===== */
#favoritesPage .timeline-container { padding-top: 0; }

/* ===== スケルトンローダー ===== */
.skeleton-card {
  background: var(--white);
  border-radius: 16px;
  padding: 10px 10px 14px;
  width: 156px; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.skeleton-img {
  width: 100%; height: 128px;
  background: linear-gradient(90deg, #f0e8ea 25%, #fce8ed 50%, #f0e8ea 75%);
  background-size: 200% 100%;
  border-radius: 10px; margin-bottom: 10px;
  animation: shimmer 1.5s infinite;
}
.skeleton-line {
  height: 10px; border-radius: 5px; margin-bottom: 6px;
  background: linear-gradient(90deg, #f0e8ea 25%, #fce8ed 50%, #f0e8ea 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-line.short { width: 60%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== ポップアップ ===== */
.photo-popup {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20,10,15,0.92);
  justify-content: center; align-items: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.photo-popup.active {
  display: flex;
  animation: popupIn 0.3s ease;
}
@keyframes popupIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.popup-inner {
  position: relative;
  max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center;
  animation: popupImgIn 0.3s cubic-bezier(0.34,1.2,0.64,1);
}
@keyframes popupImgIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.popup-inner img {
  max-width: 100%; max-height: 78vh;
  border-radius: 14px; object-fit: contain; display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.popup-close {
  position: absolute; top: -14px; right: -14px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.95);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}
.popup-close:hover { transform: scale(1.1); }

/* ===== ポップアップ LINE ===== */
.popup-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.popup-line-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  background: #06C755;
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6,199,85,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.popup-line-btn:hover  { transform: scale(1.05); box-shadow: 0 6px 20px rgba(6,199,85,0.5); }
.popup-line-btn:active { transform: scale(0.97); }

/* ===== ボトムナビゲーション ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(200,100,120,0.1);
}
.bnav-btn {
  flex: 1;
  background: none; border: none;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 4px;
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.bnav-btn:active { transform: scale(0.9); }
.bnav-icon  { font-size: 22px; line-height: 1; }
.bnav-label { font-size: 10px; color: var(--muted); font-weight: 500; font-family: inherit; }

.bnav-btn.active .bnav-icon { filter: none; }
.bnav-btn.active .bnav-label { color: var(--rose); font-weight: 700; }
.bnav-btn.active::after {
  content: '';
  position: absolute; top: 0; left: 20%; right: 20%; height: 3px;
  background: var(--rose);
  border-radius: 0 0 4px 4px;
}

.bnav-btn[data-page="post"] .post-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  color: white; border-radius: 50%;
  font-size: 22px; font-weight: 300; line-height: 1;
  box-shadow: 0 4px 14px rgba(232,116,138,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.bnav-btn[data-page="post"]:active .post-icon {
  transform: scale(0.88);
  box-shadow: 0 2px 6px rgba(232,116,138,0.3);
}
.bnav-btn[data-page="post"].active .post-icon {
  background: linear-gradient(135deg, var(--rose-dark), #A03050);
}

/* ===== アニメーション共通 ===== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.empty-msg {
  color: var(--muted); font-size: 14px;
  padding: 40px 20px; text-align: center;
}
.loading-msg {
  color: var(--muted); font-size: 14px;
  padding: 20px;
}
.error-msg-inline {
  color: #E85D75; font-size: 13px; padding: 12px;
}

/* ===== レスポンシブ（デスクトップ） ===== */
@media (min-width: 640px) {
  .timeline-card { width: 176px; }
  .timeline-card:hover { transform: translateY(-10px) scale(1.03); }
  .timeline-image { height: 148px; }
  .h-divider { min-height: 240px; }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}
