/* ── Sticky header ── */
.sticky-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Tab bar ── */
.tab-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: var(--tab-h);
  background: var(--tab-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: space-around;
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
}
.tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px; cursor: pointer;
  color: var(--text-3); text-decoration: none;
  transition: color 0.15s;
  padding: 8px 0;
}
.tab.active { color: var(--accent); }
.tab-icon { width: 24px; height: 24px; }
.tab-label { font-size: 10px; font-weight: 700; }

/* ── Section card ── */
.section-card {
  background: var(--bg-section);
  border: 2px solid var(--border);
  border-radius: var(--r);
  margin: 8px 12px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.section-card--accent {
  border-color: var(--pink-border);
  background: var(--pink-soft);
}

/* ── Section title ── */
.section-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-family: var(--font-accent);
}
.section-title__icon {
  font-size: 16px;
}

/* ── EXP bar ── */
.exp-bar {
  height: 16px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.exp-bar__fill {
  height: 100%;
  background: var(--exp-bar);
  border-radius: 8px;
  transition: width 0.6s ease;
}
.exp-bar__text {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  font-weight: 700;
  color: var(--text);
}

/* ── Badge / chip ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  background: var(--badge-bg);
  color: var(--badge-text);
}

/* ── Check item ── */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.check-item:last-child { border-bottom: none; }
.check-item__box {
  width: 22px; height: 22px;
  border: 2px solid var(--border-2);
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.check-item__box.checked {
  background: var(--check-color);
  border-color: var(--check-color);
}
.check-item__content {
  flex: 1;
}
.check-item__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.check-item__desc {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
}
.check-item__exp {
  font-size: 14px;
  font-weight: 900;
  color: var(--accent);
  white-space: nowrap;
}

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid-7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }

/* ── Evolution road ── */
.evo-road {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 8px 0;
}
.evo-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.evo-stage__img {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--card-accent);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.evo-stage__img img { width: 36px; height: 36px; object-fit: contain; }
.evo-stage__label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-2);
  text-align: center;
}
.evo-stage__exp {
  font-size: 8px;
  color: var(--text-3);
}
.evo-stage--locked .evo-stage__img {
  background: var(--border);
  position: relative;
}
.evo-stage--locked .evo-stage__img img {
  display: none;
}
.evo-stage--locked .evo-stage__img::after {
  content: '？';
  font-size: 20px;
  font-weight: 900;
  color: var(--text-4);
}
.evo-stage--locked .evo-stage__label {
  color: var(--text-4);
}
.evo-stage--locked .evo-stage__exp {
  color: var(--text-4);
}
.evo-arrow {
  font-size: 14px;
  color: var(--text-4);
  margin-top: -20px;
}

/* ── Room item ── */
.room-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: var(--card-accent);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.room-item__img {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
}
.room-item__name {
  font-size: 9px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.room-item__cost {
  font-size: 8px;
  font-weight: 700;
  color: var(--accent);
}

/* ── Calendar ── */
.calendar-day {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-xs);
  background: var(--card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: var(--text-3);
}
.calendar-day-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  text-align: center;
}

/* ── Mood selector ── */
.mood-list {
  display: flex;
  justify-content: space-evenly;
}
.mood-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.mood-item__face {
  width: 56px; height: 56px;
  min-width: 56px;
  border-radius: 50%;
  background: var(--card-accent);
  position: relative;
}
.mood-item__face img {
  position: absolute;
  width: 56px;
  height: 56px;
  max-width: none;
  object-fit: contain;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.mood-item__label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 700;
  white-space: nowrap;
}

/* ── Stamp / badge collection ── */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.stamp-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--card-accent);
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
}
.stamp-item__icon {
  width: 24px; height: 24px;
}
.stamp-item__name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}

/* ── Input fields ── */
.text-input {
  width: 100%;
  padding: 8px 12px;
  border: 2px dashed var(--border-2);
  border-radius: var(--r-xs);
  background: var(--card);
  font-family: var(--font-main);
  font-size: 12px;
  color: var(--text);
}
.text-input::placeholder { color: var(--text-4); }

/* ── Spacer ── */
.spacer { height: 80px; }
