/* =====================
   VARIABLES & RESET
   ===================== */
:root {
  --bg: #F7F3EE;
  --surface: #FFFFFF;
  --surface2: #F0EAE0;
  --border: #E3DAD0;
  --text: #1C1008;
  --text-muted: #8C7B6B;
  --accent: #C8692A;
  --accent-light: #FDEDE4;
  --accent-dark: #9E4E1E;
  --green: #3E7255;
  --green-light: #D2E8DA;
  --gold: #C4952A;
  --gold-light: #F8EDD5;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.05), 0 2px 12px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 28px rgba(0,0,0,0.07);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.08), 0 20px 64px rgba(0,0,0,0.12);
  --shadow-card: 0 0 0 1px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --header-bg: #1E1006;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

::selection { background: var(--accent-light); color: var(--accent-dark); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 0%, rgba(200,105,42,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 100%, rgba(62,114,85,0.06) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

#app { position: relative; z-index: 1; }

/* =====================
   SPLASH SCREEN
   ===================== */
#splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(160deg, #130A02 0%, #2D190A 45%, #1A0E05 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#splash.fade-out {
  animation: splashExit 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes splashExit {
  to { opacity: 0; visibility: hidden; }
}

.splash-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,105,42,0.16) 0%, transparent 70%);
  animation: splashGlowPulse 2.5s ease-in-out infinite alternate;
}

@keyframes splashGlowPulse {
  from { transform: scale(0.8); opacity: 0.5; }
  to   { transform: scale(1.2); opacity: 1; }
}

.splash-trail { position: absolute; inset: 0; pointer-events: none; }

.sp { position: absolute; font-size: 28px; opacity: 0; }

.sp1 { left:  4%; top: 64%; animation: pawStep 0.45s ease 0.10s forwards; }
.sp2 { left: 13%; top: 67%; animation: pawStep 0.45s ease 0.26s forwards; }
.sp3 { left: 22%; top: 64%; animation: pawStep 0.45s ease 0.42s forwards; }
.sp4 { left: 31%; top: 67%; animation: pawStep 0.45s ease 0.58s forwards; }
.sp5 { left: 42%; top: 64%; animation: pawStep 0.45s ease 0.74s forwards; }
.sp6 { left: 55%; top: 67%; animation: pawStep 0.45s ease 0.90s forwards; }
.sp7 { left: 64%; top: 64%; animation: pawStep 0.45s ease 1.06s forwards; }
.sp8 { left: 73%; top: 67%; animation: pawStep 0.45s ease 1.22s forwards; }

@keyframes pawStep {
  0%   { opacity: 0; transform: translateY(-12px) scale(0.5); }
  45%  { opacity: 0.9; transform: translateY(0) scale(1.1); }
  100% { opacity: 0.3; transform: translateY(0) scale(1); }
}

.splash-center { text-align: center; z-index: 2; position: relative; }

.splash-icon {
  font-size: 66px;
  display: block;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 32px rgba(200,149,42,0.6));
  animation: splashIconIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.28s both;
}

@keyframes splashIconIn {
  from { opacity: 0; transform: scale(0.2) rotate(-20deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.splash-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(38px, 8vw, 56px);
  font-weight: 700;
  color: #F5E8D8;
  letter-spacing: 0.10em;
  text-shadow: 0 0 60px rgba(200,149,42,0.35), 0 2px 4px rgba(0,0,0,0.5);
  animation: splashTextUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.5s both;
}

.splash-sub {
  font-size: 13px;
  color: rgba(245,232,216,0.40);
  letter-spacing: 0.22em;
  margin-top: 14px;
  animation: splashTextUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.7s both;
}

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

/* =====================
   BACKGROUND PAWS
   ===================== */
.bg-paws {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-paws span {
  position: absolute;
  font-size: 110px;
  opacity: 0.022;
  animation: bgDrift 20s ease-in-out infinite alternate;
}

.bg-paws span:nth-child(1) { top:  8%; left:  3%; animation-duration: 22s; animation-delay:  -2s; }
.bg-paws span:nth-child(2) { top: 55%; right: 5%; animation-duration: 28s; animation-delay:  -9s; }
.bg-paws span:nth-child(3) { bottom: 12%; left: 40%; animation-duration: 18s; animation-delay: -15s; }
.bg-paws span:nth-child(4) { top: 28%; right: 22%; animation-duration: 32s; animation-delay:  -5s; }
.bg-paws span:nth-child(5) { top: 76%; left: 12%; animation-duration: 24s; animation-delay: -11s; }

@keyframes bgDrift {
  0%   { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-22px) rotate(9deg); }
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* =====================
   HEADER
   ===================== */
.site-header {
  background: linear-gradient(135deg, #1E1006 0%, #3C2010 50%, #1E1006 100%);
  background-size: 200% 100%;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 30px rgba(30,16,6,0.45);
  overflow: hidden;
}

.header-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 5s ease-in-out infinite;
  pointer-events: none;
}

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

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
  z-index: 1;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 22px; }

.logo-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 700;
  color: #F5E8D8;
  letter-spacing: 0.06em;
}

.today-date {
  font-size: 11px;
  color: rgba(245,232,216,0.48);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* =====================
   TAB NAVIGATION
   ===================== */
.tab-nav {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 99;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
  position: relative;
}

.tab-btn .tab-icon { font-size: 20px; line-height: 1; }

.tab-btn:hover { color: var(--accent); background: var(--accent-light); }

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: linear-gradient(to bottom, transparent, var(--accent-light));
  font-weight: 600;
}

/* =====================
   MAIN CONTENT
   ===================== */
.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px 100px;
}

.tab-content { display: none; }

.tab-content.active {
  display: block;
  animation: tabFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =====================
   PET GRID (TODAY)
   ===================== */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.pet-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: none;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  animation: cardEnter 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pet-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.pet-card-header {
  background: linear-gradient(135deg, var(--surface2) 0%, var(--accent-light) 100%);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(227,218,208,0.7);
  position: relative;
  overflow: hidden;
}

.pet-card-header::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  pointer-events: none;
}

/* =====================
   PET AVATAR
   ===================== */
.pet-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.95);
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  flex-shrink: 0;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pet-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pet-avatar-fallback { font-size: 28px; line-height: 1; }

.pet-info { flex: 1; min-width: 0; }

.pet-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pet-breed { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.completion-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 20px;
  background: rgba(255,255,255,0.7);
  color: var(--text-muted);
  transition: all 0.3s ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.completion-badge.done {
  background: var(--green-light);
  color: var(--green);
}

/* =====================
   CARE CHECKLIST
   ===================== */
.care-list { padding: 8px 24px 4px; }

.care-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 16px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.care-section-title:first-child { margin-top: 10px; }

.care-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 8px;
  border-bottom: 1px solid rgba(227,218,208,0.45);
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 8px;
}

.care-item:last-child { border-bottom: none; }
.care-item:hover { background: var(--surface2); }
.care-item:active { background: var(--accent-light); }

.care-checkbox {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: white;
}

.care-checkbox.checked {
  background: var(--green);
  border-color: var(--green);
  color: white;
  transform: scale(1.1);
}

.care-item-info { flex: 1; }

.care-item-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
}

.care-item.checked .care-item-label {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Medication hint */
.med-hint {
  margin: 0 24px 10px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--gold-light);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
}

/* Memo */
.memo-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.memo-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.memo-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: white;
  resize: none;
  min-height: 64px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.memo-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.memo-save-btn {
  margin-top: 10px;
  padding: 8px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.memo-save-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200,105,42,0.32);
}

/* =====================
   SECTION HEADER
   ===================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

/* =====================
   PET FILTER PILLS
   ===================== */
.pet-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-muted);
  transition: all 0.2s ease;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(200,105,42,0.30);
}

.filter-pill-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* =====================
   UPLOAD BUTTON
   ===================== */
.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all 0.2s ease;
  user-select: none;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(200,105,42,0.28);
}

.upload-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,105,42,0.36);
}

/* =====================
   PHOTOS GRID
   ===================== */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--surface2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  animation: cardEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.photo-thumb:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-thumb-pet {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(28,16,8,0.65);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  letter-spacing: 0.02em;
}

/* =====================
   PHOTO MODAL
   ===================== */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-modal.hidden { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,10,2,0.85);
  backdrop-filter: blur(10px);
}

.modal-box {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 620px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.86) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,0.20);
  transition: all 0.2s ease;
}

.modal-close:hover { background: #fee2e2; transform: scale(1.12); }

.modal-image { width: 100%; max-height: 60vh; object-fit: contain; background: #080808; display: block; }

.modal-footer {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.modal-caption { flex: 1; font-size: 14px; color: var(--text); font-weight: 500; }
.modal-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* =====================
   HISTORY / CALENDAR
   ===================== */
.month-nav { display: flex; align-items: center; gap: 12px; }

.month-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
}

.month-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(200,105,42,0.30);
}

.month-label {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  min-width: 100px;
  text-align: center;
}

.history-calendar {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.cal-header-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(135deg, #1E1006 0%, #3C2010 100%);
}

.cal-header-cell {
  text-align: center;
  padding: 12px 4px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(245,232,216,0.60);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }

.cal-cell {
  min-height: 64px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 7px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--accent-light); }
.cal-cell.empty { cursor: default; background: rgba(240,234,224,0.5); opacity: 0.6; }
.cal-cell.today {
  background: var(--accent-light);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.cal-day {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; }

.cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}

.cal-dot.done { background: var(--green); }

.history-detail {
  margin-top: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  animation: cardEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-detail.hidden { display: none; }

.history-detail-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  background: var(--surface2);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}

.detail-item.done { background: var(--green-light); color: var(--green); font-weight: 600; }

/* =====================
   SETTINGS
   ===================== */
.settings-container { max-width: 600px; }

.pet-setting-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  animation: cardEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pet-setting-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.pet-setting-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  flex-shrink: 0;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-xs);
}

.pet-setting-avatar img { width: 100%; height: 100%; object-fit: cover; }

.setting-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.setting-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.setting-input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.setting-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* Avatar upload */
.avatar-upload-area { display: flex; align-items: center; gap: 16px; }

.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

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

.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'Noto Sans JP', sans-serif;
  transition: all 0.2s ease;
  background: var(--surface);
}

.avatar-upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}

.save-btn {
  padding: 11px 26px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(200,105,42,0.28);
}

.save-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,105,42,0.36);
}

.danger-btn {
  padding: 7px 16px;
  background: var(--surface);
  color: #c0392b;
  border: 1.5px solid #e0a8a4;
  border-radius: var(--radius-xs);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 600;
}

.danger-btn:hover { background: #c0392b; color: white; border-color: #c0392b; }

/* =====================
   STATES
   ===================== */
.loading-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 15px;
  animation: tabFadeIn 0.4s ease;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 15px; }

.hidden { display: none !important; }

/* =====================
   TOAST
   ===================== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #1E1006;
  color: #F5E8D8;
  padding: 13px 28px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.toast.hidden { display: none; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 600px) {
  .pets-grid { grid-template-columns: 1fr; }
  .photos-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .main-content { padding: 20px 14px 100px; }
  .tab-btn .tab-label { display: none; }
  .tab-btn { padding: 12px 8px 10px; }
  .tab-btn .tab-icon { font-size: 22px; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .header-inner { height: 56px; }
  .tab-nav { top: 56px; }
  .splash-trail span { font-size: 20px; }
}
