:root {
  --bg-color: #FCFAF2;
  --card-bg: #FFFFFF;
  --accent-soft: #F8D7DA;
  --text-main: #5A4A42;
  --text-sub: #A08E84;
  --accent-deep: #EEC9CF;
}

body {
  font-family: 'Zen Maru Gothic', serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.app-container {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 40px 20px 10px;
  text-align: center;
  background: var(--bg-color);
}

.page-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-sub);
  letter-spacing: 0.05em;
}

.user-name {
  font-weight: 700;
  color: var(--text-main);
  margin-right: 2px;
}

.month-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 5px 16px 25px;
  padding: 10px;
}

.month-display {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
}

.nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-sub);
  cursor: pointer;
}

.diary-list {
  padding: 0 16px 100px;
}

.diary-item {
  background: var(--card-bg);
  margin-bottom: 12px;
  border-radius: 20px;
  padding: 18px 16px;
  display: flex;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(90, 74, 66, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: slideUp 0.4s ease-out forwards;
}

.diary-item.is-empty {
  padding: 8px 16px;
  opacity: 0.6;
  background: transparent;
  box-shadow: none;
  border: 1px dashed #E0DCD9;
}

.date-box {
  min-width: 50px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1.5px dashed #F5F5F5;
  padding-right: 12px;
}

.day-num {
  font-size: 1.25rem;
  font-weight: 700;
}

.day-name {
  font-size: 0.75rem;
  color: var(--text-sub);
}

.is-sunday .day-num,
.is-sunday .day-name {
  color: #E57373;
}

.is-saturday .day-num,
.is-saturday .day-name {
  color: #64B5F6;
}

.content-box {
  flex: 1;
  display: flex;
  align-items: center;
}

.content-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

.content-empty {
  font-size: 0.8rem;
  color: var(--text-sub);
  letter-spacing: 0.15em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 3px;
  height: 3px;
  background: var(--text-sub);
  border-radius: 50%;
  display: inline-block;
  opacity: 0.5;
}

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

#status {
  display: none;
}

.diagnosis-link {
  display: inline-block;
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-sub);
  text-decoration: underline;
}

/* 推し活キャラ設定画面 */
.oshi-chara-setup {
  padding: 0 16px 100px;
}

.setup-description {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-sub);
  margin: 0 0 24px;
}

.oshi-chara-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 8px;
}

.oshi-chara-btn {
  background: rgba(90, 74, 66, 0.06);
  border: none;
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'Zen Maru Gothic', serif;
  box-shadow: none;
  transition: all 0.2s ease;
  min-height: 72px;
}

.oshi-chara-btn:hover {
  background: rgba(90, 74, 66, 0.12);
  transform: translateY(-1px);
  box-shadow: none;
}

.oshi-chara-btn:active {
  transform: translateY(0);
  background: rgba(90, 74, 66, 0.18);
  box-shadow: none;
}

.oshi-chara-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.3;
}

.oshi-chara-code {
  font-size: 0.75rem;
  color: var(--text-main);
  letter-spacing: 0.15em;
  opacity: 0.85;
}

/* 推し活キャラ表示セクション（感謝日記の下） */
.oshi-chara-section {
  padding: 16px 16px 40px;
  text-align: center;
}

/* シンプルな一行ボタン（感謝日記カードとは別デザイン） */
.oshi-chara-simple-btn {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text-sub);
  border-radius: 0;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Zen Maru Gothic', serif;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: opacity 0.2s ease;
}

.oshi-chara-simple-btn:hover {
  opacity: 0.7;
}

.oshi-chara-simple-btn:active {
  opacity: 0.5;
}

.oshi-chara-change-text {
  color: var(--text-sub);
  margin-left: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 16px 40px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-sub);
  text-decoration: underline;
}

/* ローディング画面 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--text-main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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