*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg:     #0f0f1a;
  --card:   rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.10);
  --text:   #f0eeea;
  --muted:  rgba(240,238,234,0.55);
}

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

/* ===== 背景オーブ ===== */
.bg-orbs {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb1 { width: 500px; height: 500px; background: #E8748A; top: -120px; left: -100px; animation-delay: 0s; }
.orb2 { width: 420px; height: 420px; background: #F59E0B; bottom: -80px; right: -80px; animation-delay: 5s; }
.orb3 { width: 300px; height: 300px; background: #7C3AED; top: 40%; left: 40%; animation-delay: 2.5s; }

@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(30px,-30px) scale(1.1); }
}

/* ===== ページ ===== */
.page {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 48px;
}

/* ===== ヘッダー ===== */
.hero {
  text-align: center;
  padding: 56px 20px 40px;
}
.hero-icon {
  font-size: 56px;
  margin-bottom: 12px;
  display: block;
  animation: heroIconIn 0.8s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes heroIconIn {
  from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
.hero-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  animation: heroTextIn 0.6s ease 0.1s both;
}
.hero-sub {
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
  animation: heroTextIn 0.6s ease 0.2s both;
}
@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== アプリグリッド ===== */
.app-grid {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ===== アプリカード ===== */
.app-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  animation: cardIn 0.5s cubic-bezier(0.34,1.2,0.64,1) both;
}
.app-card:nth-child(1) { animation-delay: 0.1s; }
.app-card:nth-child(2) { animation-delay: 0.18s; }
.app-card:nth-child(3) { animation-delay: 0.26s; }
.app-card:nth-child(4) { animation-delay: 0.34s; }

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

.app-card:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-3px);
}
.app-card:active {
  transform: scale(0.97);
}

.card-icon-wrap {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card-icon {
  font-size: 30px;
  line-height: 1;
}

.card-body {
  flex: 1;
  min-width: 0;
}
.card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 300;
}

.card-arrow {
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.app-card:hover .card-arrow {
  transform: translateX(4px);
}

/* ===== ダッシュボード ===== */
.dashboard {
  width: 100%;
  max-width: 480px;
  margin-top: 32px;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ダッシュグリッド */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ダッシュカード 共通 */
.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  animation: cardIn 0.5s cubic-bezier(0.34,1.2,0.64,1) both;
}
.dash-card:nth-child(1) { animation-delay: 0.25s; }
.dash-card:nth-child(2) { animation-delay: 0.32s; }
.dash-card:nth-child(3) { animation-delay: 0.38s; }
.dash-card:nth-child(4) { animation-delay: 0.44s; }

a.dash-card:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
a.dash-card:active {
  transform: scale(0.97);
}

.dash-card-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* 全幅カード */
.card-photo,
.card-topics {
  grid-column: 1 / -1;
}

/* ===== 写真カード ===== */
.card-photo {
  padding: 0;
  overflow: hidden;
  min-height: 200px;
  position: relative;
}
.card-photo .dash-card-label {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  margin-bottom: 0;
  background: rgba(0,0,0,0.45);
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.photo-content {
  width: 100%;
  height: 100%;
  min-height: 200px;
  position: relative;
}
.photo-skeleton {
  width: 100%;
  min-height: 200px;
  border-radius: 20px;
}
.photo-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}
.photo-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
  padding: 24px 16px 16px;
  border-radius: 0 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.photo-date {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  font-weight: 300;
}
.photo-comment {
  font-size: 13px;
  color: #fff;
  font-weight: 500;
  line-height: 1.4;
}
.dash-empty-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--muted);
  font-size: 14px;
}

/* ===== 年齢カード ===== */
.card-age {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.age-display {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.age-num {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #A78BFA, #E879F9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.age-unit {
  font-size: 13px;
  color: var(--muted);
  margin-right: 4px;
}
.age-days {
  font-size: 11px;
  color: var(--muted);
  font-weight: 300;
  margin-top: 6px;
}
.age-next {
  font-size: 11px;
  color: rgba(167,139,250,0.7);
  margin-top: 2px;
}

/* ===== キャンプカード ===== */
.card-camp {
  display: flex;
  flex-direction: column;
}
.camp-next-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.camp-next-site,
.camp-next-date,
.camp-next-members {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.camp-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 12px 0;
}

/* ===== トピックカード ===== */
.card-topics {
  min-height: 80px;
}
.topics-count {
  font-size: 13px;
  font-weight: 600;
  color: #F59E0B;
  margin-bottom: 10px;
}
.topic-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.topic-row:last-of-type {
  border-bottom: none;
}
.topic-dot {
  flex-shrink: 0;
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--muted);
}
.topic-dot.urgent {
  font-size: 14px;
}
.topic-text {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topics-more {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  text-align: right;
}
.dash-empty {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ===== スケルトン ===== */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.dash-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 75%
  );
  background-size: 800px 100%;
  border-radius: 8px;
  animation: shimmer 1.6s infinite linear;
}
.dash-skeleton-line {
  height: 14px;
  border-radius: 6px;
  width: 100%;
}

/* ===== 今週の予定カード ===== */
.card-yotei {
  grid-column: 1 / -1;
  min-height: 80px;
}
.yotei-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
}
.yotei-row:last-of-type { border-bottom: none; }
.yotei-dot {
  width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0;
}
.yotei-date {
  font-size: 11px; color: var(--muted); flex-shrink: 0; white-space: nowrap;
}
.yotei-member {
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.yotei-label {
  font-size: 12px; color: var(--text);
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.yotei-check {
  font-size: 12px; color: #67B899; flex-shrink: 0;
}

/* ===== フッター ===== */
.footer {
  margin-top: 48px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ===== レスポンシブ ===== */
@media (min-width: 600px) {
  .app-grid {
    max-width: 560px;
  }
  .app-card {
    padding: 22px 24px;
  }
  .card-icon-wrap {
    width: 64px; height: 64px;
  }
  .card-icon { font-size: 34px; }
  .card-name { font-size: 17px; }
  .card-desc { font-size: 13px; }
  .dashboard {
    max-width: 560px;
  }
  .photo-img {
    height: 260px;
  }
  .photo-skeleton {
    min-height: 260px;
  }
  .photo-content {
    min-height: 260px;
  }
  .card-photo {
    min-height: 260px;
  }
}
