/* ---------- 헤더 ---------- */
.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-2);
  min-height: 80px;
  padding: var(--space-4) var(--gutter) var(--space-2);
}

.header__back {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--touch);
  height: var(--touch);
  /* 아이콘 모서리를 좌우 여백 선에 맞춤 */
  margin-left: -16px;
}

.header__title {
  font-size: var(--text-page);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.header__sub {
  overflow-wrap: normal;
}

.header__aside {
  margin-left: auto;
  white-space: nowrap;
}

.header__logo {
  height: 44px;
  width: auto;
}

/* ---------- 목록 카드 ---------- */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 64px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid transparent;
  border-radius: var(--radius-m);
  background: var(--color-surface);
  text-align: left;
}

/* 빠뜨린 항목: 불이 켜진 카드 */
.card--lit {
  border-color: var(--color-navy);
  background: var(--color-bg);
}

.card__body {
  flex: 1;
  min-width: 0;
}

.card__title {
  display: block;
  font-size: var(--text-card);
  font-weight: 700;
}

.card__desc,
.card__aside {
  display: block;
  font-size: var(--text-min);
}

.card__aside {
  text-align: right;
}

.card__arrow {
  flex: none;
}

/* ---------- 강조 카드 (D-day, 점수) ---------- */
.hero {
  padding: var(--space-4) var(--gutter);
  border-radius: var(--radius-l);
  background: var(--color-navy);
  color: var(--color-on-fill);
}

.hero__label {
  font-weight: 500;
}

.hero__value {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- 버튼 ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-m);
  background: var(--color-primary);
  color: var(--color-on-fill);
  font-size: var(--text-card);
  font-weight: 700;
}

.button--dark {
  background: var(--color-dark);
}

.button-row {
  display: flex;
  gap: var(--space-5);
}

.button-row > .button,
.app__dock > .button {
  flex: 1;
}

/* ---------- 질문 입력창 ---------- */
.composer__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.picker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
  min-height: var(--touch);
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--text-min);
}

/* 흰색 로고를 검정으로 (PowerPoint의 밝기 -100%와 같은 효과) */
.picker__logo {
  flex: none;
  filter: brightness(0);
}

.picker--end {
  flex: none;
  margin-left: auto;
}

.picker__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer__box {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-4);
  border-radius: var(--radius-s);
  background: var(--color-surface);
  box-shadow: var(--shadow-float);
}

.composer__box:focus-within {
  outline: 2px solid var(--color-primary-light);
}

.composer__input {
  flex: 1;
  min-width: 0;
  max-height: 140px;
  padding: 11px 0;
  border: 0;
  background: none;
  line-height: 22px;
  resize: none;
  field-sizing: content;
}

.composer__input:focus {
  outline: none;
}

.composer__send {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--touch);
  height: var(--touch);
  padding: 0;
  border: 0;
  background: none;
}

.composer__send span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-light);
  color: var(--color-on-fill);
}

/* ---------- 하단 탭 ---------- */
.tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: var(--space-2);
  border-radius: var(--radius-l);
  background: var(--color-surface);
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  border-radius: var(--radius-m);
  color: var(--color-muted);
  font-size: var(--text-min);
}

.tabbar__item[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 700;
}
