/* ===== Home ===== */
.home-hero {
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--oshi) 30%, var(--bg-elev)),
    var(--bg-elev) 60%);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: var(--oshi);
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
}
.home-hero-greeting {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  position: relative;
}
.home-hero-name {
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin-top: var(--sp-1);
  position: relative;
}
.home-hero-name strong { color: var(--oshi); }
.home-hero-stats {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  position: relative;
}
.home-hero-stat-label {
  font-size: var(--fs-xs);
  color: var(--text-mute);
}
.home-hero-stat-value {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-top: 2px;
}

/* Feature card grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  min-height: 120px;
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}
.feature-card:active { transform: scale(0.98); }
.feature-card:hover { border-color: var(--oshi); }
.feature-card-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--oshi-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-card-title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-top: auto;
}
.feature-card-sub {
  font-size: var(--fs-xs);
  color: var(--text-mute);
}
.feature-card-badge {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  font-size: var(--fs-xs);
  background: var(--oshi);
  color: white;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-weight: 700;
}

@media (min-width: 480px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Quick add */
.quick-add {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  margin: 0 calc(var(--sp-4) * -1);
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
  scrollbar-width: none;
}
.quick-add::-webkit-scrollbar { display: none; }
.quick-add-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Upcoming */
.upcoming-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.upcoming-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: var(--sp-2) 0;
}
.upcoming-date .month {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  font-weight: 600;
}
.upcoming-date .day {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--oshi);
}
.upcoming-body { flex: 1; min-width: 0; }
.upcoming-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upcoming-sub {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  margin-top: 2px;
}
.upcoming-countdown {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  white-space: nowrap;
}

/* ===== Genba ===== */
.genba-card {
  position: relative;
}
.genba-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}
.genba-date {
  font-weight: 700;
  font-size: var(--fs-md);
}
.genba-venue {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  margin-bottom: var(--sp-1);
}
.genba-tour {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.genba-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-mute);
}
.genba-meta-item { display: inline-flex; gap: 4px; align-items: center; }

/* ===== Subsc ===== */
.subsc-summary {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  text-align: center;
}
.subsc-summary-label {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.subsc-summary-amount {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--oshi);
  margin-top: var(--sp-2);
  letter-spacing: -0.02em;
}
.subsc-summary-sub {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  margin-top: var(--sp-1);
}

.subsc-item .subsc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.subsc-amount {
  font-weight: 700;
  font-size: var(--fs-md);
}
.subsc-period {
  font-size: var(--fs-xs);
  color: var(--text-mute);
}

/* ===== Setlist ===== */
.setlist-track {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
}
.setlist-track:hover { background: var(--surface); }
.setlist-num {
  width: 24px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-faint);
  font-weight: 700;
}
.setlist-title { font-weight: 600; }
.setlist-meta {
  font-size: var(--fs-xs);
  color: var(--text-mute);
}
.setlist-encore {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--oshi);
  margin: var(--sp-3) 0 var(--sp-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== Page header ===== */
.page-header {
  margin-bottom: var(--sp-4);
}
.page-header h1 {
  font-size: var(--fs-2xl);
  letter-spacing: -0.02em;
}
.page-header p {
  color: var(--text-mute);
  font-size: var(--fs-sm);
  margin-top: var(--sp-1);
}

/* ===== Tab pill ===== */
.tabs {
  display: flex;
  gap: var(--sp-1);
  background: var(--surface);
  padding: 4px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-4);
}
.tab {
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  color: var(--text-mute);
  font-weight: 600;
  transition: all 0.15s;
}
.tab.active {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ===== Calendar ===== */
.cal-toolbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: var(--sp-3);
}
.cal-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  color: var(--text);
  background: var(--surface);
}
.cal-nav:hover { background: var(--surface-strong); }
.cal-title {
  text-align: center;
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.cal-title-sub {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  font-weight: 500;
  margin: 0 2px;
}

.cal-actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.cal-actions .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
.cal-weekday {
  background: var(--bg-elev);
  padding: 6px 0;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-mute);
  font-weight: 600;
}
.cal-weekday.sun { color: var(--danger); }
.cal-weekday.sat { color: var(--info); }

.cal-cell {
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 6px 4px 8px;
  min-height: 64px;
  color: var(--text);
  position: relative;
  transition: background 0.15s;
}
.cal-cell:hover { background: var(--surface-strong); }
.cal-cell.out { color: var(--text-faint); background: color-mix(in oklab, var(--bg-elev) 92%, var(--bg)); }
.cal-cell.sun .cal-day { color: var(--danger); }
.cal-cell.sat .cal-day { color: var(--info); }
.cal-cell.out.sun .cal-day,
.cal-cell.out.sat .cal-day { opacity: 0.45; }

.cal-cell.today .cal-day {
  background: var(--oshi);
  color: white !important;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.cal-day {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
}

.cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  align-items: center;
  min-height: 8px;
}
.cal-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-more {
  font-size: 9px;
  color: var(--text-mute);
  font-weight: 700;
}

@media (min-width: 480px) {
  .cal-cell { min-height: 80px; }
  .cal-day { font-size: var(--fs-md); }
}

/* ===== Mypage ===== */
.me-hero {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: var(--sp-4);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  isolation: isolate;
}
.me-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 0%, var(--oshi-soft), transparent 55%),
    radial-gradient(circle at 90% 90%, var(--oshi-soft), transparent 50%);
  pointer-events: none;
  opacity: 0.9;
}
.me-hero-inner {
  position: relative;
  z-index: 1;
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
}
.me-avatar-stack {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
  padding-left: 36px;
}
.me-avatar-stack .oshi-avatar {
  width: 80px;
  height: 80px;
  font-size: 28px;
  border: 3px solid var(--bg-elev);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.me-style-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.me-style-desc {
  font-size: var(--fs-sm);
  color: var(--text-mute);
  margin-top: var(--sp-2);
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
}
.me-level-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.me-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--oshi);
  color: white;
  font-weight: 800;
}
.me-level-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  opacity: 0.85;
}
.me-level-value {
  font-size: var(--fs-lg);
}
.me-tenure {
  font-size: var(--fs-sm);
  color: var(--text-mute);
}

/* Labels */
.me-labels {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.me-label {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.me-label.primary {
  border-color: var(--oshi);
  background: linear-gradient(135deg, var(--oshi-soft), transparent 60%), var(--bg-elev);
  color: var(--oshi);
}
.me-label.primary .me-label-desc { color: var(--text-mute); }
.me-label-title {
  font-weight: 700;
  font-size: var(--fs-md);
}
.me-label-desc {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  margin-top: 2px;
}

/* Trend bars */
.me-trend { margin-bottom: var(--sp-3); }
.me-trend:last-child { margin-bottom: 0; }
.me-trend-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: var(--fs-sm);
}
.me-trend-label { color: var(--text-mute); }
.me-trend-value { font-weight: 700; }
.me-trend-bar {
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}
.me-trend-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--oshi-strong), var(--oshi));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Badges */
.me-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--sp-2);
}
.me-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--sp-3);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  opacity: 0.4;
  filter: grayscale(0.8);
  transition: opacity 0.15s, filter 0.15s, transform 0.15s;
}
.me-badge.achieved {
  opacity: 1;
  filter: none;
  border-color: var(--oshi);
  color: var(--oshi);
}
.me-badge.achieved:hover { transform: translateY(-2px); }
.me-badge-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  background: var(--oshi-soft);
}
.me-badge-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: center;
  color: var(--text);
}

/* Rating row */
.rating-row {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--oshi);
}

/* ===== Oshi page ===== */
.oshi-list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.oshi-list-item.current {
  border-color: var(--oshi);
  background: var(--oshi-soft);
}
.oshi-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
