/* 프로필·집·결과·부모 화면 */

.screen { height: 100%; overflow: auto; padding: clamp(12px, 2.4vh, 28px) clamp(14px, 3vw, 48px); }

/* ── 프로필 고르기 (PLAN.md 8.7 첫 5분) ─────────────────────────────── */
.screen--profile { display: grid; place-content: center; justify-items: center; gap: clamp(8px, 2vh, 20px); }
.brand { font-size: clamp(34px, 7vh, 64px); color: var(--accent); letter-spacing: .04em; }
.brand__sub { margin: 0; font-size: clamp(16px, 2.6vh, 24px); color: var(--again); }

.avatars { display: flex; gap: clamp(14px, 3vw, 40px); margin-top: 2vh; }
.avatar {
  width: clamp(170px, 20vw, 240px);
  padding: clamp(14px, 2.4vh, 26px);
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* 안쪽 진열대가 카드를 밀어내지 못하게 */
  justify-items: center;
  gap: 6px;
  background: var(--window);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgb(0 0 0 / .45);
}
.avatar:hover { transform: translateY(-4px); }
.avatar__face { font-size: clamp(48px, 9vh, 84px); line-height: 1; }
.avatar__name { font-size: clamp(20px, 3vh, 30px); color: var(--ink); }
.avatar__sub { font-size: 13px; color: var(--ink-soft); }
.avatar__shelf { width: 100%; margin-top: 6px; }
.avatar .shelf__rack { background: #EAE4D4; }
.avatar .shelf__slot { background: rgb(26 26 46 / .07); }

.parentlink {
  background: transparent;
  color: var(--again);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  padding: .4em .6em;
}

/* ── 집 화면 ────────────────────────────────────────────────────────── */
.screen--home { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: clamp(8px, 1.6vh, 18px); }

.homehead { display: flex; align-items: center; gap: 16px; }
.homehead__who { display: flex; align-items: center; gap: 8px; background: var(--night-2); color: var(--window); }
.homehead__face { font-size: 26px; }
.homehead__goal { display: flex; flex-direction: column; font-size: 12px; color: var(--again); }
.homehead__goal strong { font-size: 15px; color: var(--window); }
.homehead .btn--big { margin-left: auto; }
.btn--blind { margin-left: auto; background: var(--night-3); color: var(--window); font-size: 13px; }
.homehead .btn--blind + .btn--big { margin-left: 0; }

.daily {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(10px, 1.8vh, 18px) 20px;
  border-radius: 18px;
  background: linear-gradient(100deg, #2A2F63, #1F2350);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.daily.is-done { box-shadow: inset 0 0 0 2px var(--again); opacity: .72; }
.daily__tag { font-size: 12px; color: var(--accent); }
.daily__theme { font-size: clamp(16px, 2.4vh, 22px); }
.daily__words { margin: 0; color: var(--again); font-size: 13px; flex: 1; }
.daily__done { color: var(--again); font-size: 14px; }

.homebody { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 18px; min-height: 0; }
.stages { overflow: auto; display: grid; gap: 8px; align-content: start; padding-right: 6px; }
.stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--night-2);
}
.stage.is-locked { opacity: .4; }
.stage__head { width: 170px; display: flex; gap: 8px; align-items: baseline; }
.stage__id { color: var(--accent); font-size: 13px; }
.stage__title { font-size: 15px; }
.stage__lessons { display: flex; gap: 8px; margin-left: auto; }
.lesson { background: var(--night-3); color: var(--window); font-size: 13px; padding: .45em .9em; }
.lesson.is-cleared { background: var(--right); }
.lesson.is-hidden { display: none; }
.lesson__mark { color: var(--accent); margin-left: 4px; }

.homeside { display: grid; gap: 14px; align-content: start; overflow: auto; }
.homeshop, .badges { background: var(--night-2); border-radius: 16px; padding: 14px; }
.homeshop__title, .badges__title { font-size: 15px; color: var(--accent); margin-bottom: 10px; }
.homeshop__pending { font-size: 12px; color: var(--accent); margin: 8px 0 0; }

.shop { display: grid; gap: 8px; margin-top: 12px; }
.shop__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--night-3);
  color: var(--window);
  text-align: left;
  padding: .6em .9em;
}
.shop__icon { font-size: 24px; }
.shop__label { font-size: 14px; }
.shop__cost { grid-column: 2; font-size: 11px; opacity: .7; }
.shop__go { background: var(--accent); color: var(--ink); border-radius: 999px; padding: .3em .8em; font-size: 12px; }
.shop__need { font-size: 12px; color: var(--again); }
.shop__item.is-locked { opacity: .45; }

.badges__row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--night-3);
  font-size: 20px;
  filter: grayscale(1);
  opacity: .35;
}
.badge.is-earned { filter: none; opacity: 1; background: var(--accent); }

/* ── 결과 화면 ──────────────────────────────────────────────────────── */
.screen--result { display: grid; align-content: start; justify-items: center; gap: clamp(10px, 2vh, 22px); }
.result__title { font-size: clamp(26px, 5vh, 46px); color: var(--accent); }
.result__stats { display: flex; gap: clamp(16px, 4vw, 54px); }
.result__stat { display: grid; justify-items: center; gap: 2px; }
.result__statkey { font-size: 13px; color: var(--again); }
.result__statvalue { font-size: clamp(28px, 5vh, 48px); font-variant-numeric: tabular-nums; }
.result__statreason { font-size: 11px; color: var(--again); max-width: 16ch; text-align: center; }

.result__gain, .result__badges, .result__shelf { width: min(760px, 92vw); text-align: center; }
.result__gain h2, .result__badges h2, .result__shelf h2 { font-size: 15px; color: var(--again); margin-bottom: 8px; }
.result__awards { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.result__award {
  display: flex; justify-content: space-between;
  background: var(--night-2); border-radius: 10px; padding: .5em .9em; font-size: 15px;
}
.result__awardpoint { color: var(--accent); }
.result__nogain { color: var(--again); font-size: 14px; }
.result__badgerow { display: flex; gap: 14px; justify-content: center; }
.result__badge { display: grid; justify-items: center; gap: 4px; animation: shelf-in .4s ease; }
.result__badgeicon { font-size: 40px; }
.result__badgelabel { font-size: 12px; color: var(--accent); }
.result__warn { color: var(--wrong); font-size: 13px; }
.result__buttons { display: flex; gap: 12px; }

/* 소유는 결과 화면에서만 진열대를 본다 → 여기서는 크게 */
.screen--result[data-tier='sprout'] .result__stats { display: none; }
.screen--result[data-tier='sprout'] .shelf__slot { max-height: 9vh; }

/* ── 부모 화면 ──────────────────────────────────────────────────────── */
.screen--parent { max-width: 860px; margin: 0 auto; }
.parent__gate { display: grid; justify-items: center; gap: 12px; padding-top: 12vh; text-align: center; }
.parent__gate h1 { font-size: 26px; }
.parent__note { color: var(--again); font-size: 13px; margin: 0; max-width: 44ch; }
.parent__pin {
  font: inherit; font-size: 30px; letter-spacing: .5em; text-align: center;
  width: 220px; padding: .3em; border-radius: 12px; border: 0;
  background: var(--window); color: var(--ink);
}
.parent__msg { color: var(--wrong); font-size: 14px; min-height: 1.2em; margin: 0; }

.parent__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.parent__head h1 { font-size: 22px; }
.parent__body { display: grid; gap: 14px; padding-bottom: 4vh; }
.parent__card { background: var(--night-2); border-radius: 16px; padding: 16px 18px; }
.parent__card h2 { font-size: 15px; color: var(--accent); margin-bottom: 10px; }
.parent__card ul { margin: 0; padding-left: 1.2em; font-size: 14px; line-height: 1.7; }
.parent__card--signal { box-shadow: inset 0 0 0 2px var(--accent); }
.parent__card--warn { box-shadow: inset 0 0 0 2px var(--wrong); }
.parent__vouchers { list-style: none; padding: 0; display: grid; gap: 6px; margin-bottom: 12px; }
.parent__vouchers li { display: flex; gap: 12px; align-items: baseline; background: var(--night-3); border-radius: 10px; padding: .5em .8em; }
.parent__cost { color: var(--accent); margin-left: auto; }
.parent__when { color: var(--again); font-size: 12px; }
.parent__row { display: flex; gap: 10px; flex-wrap: wrap; }
.parent__backups { list-style: none; padding: 0; margin-top: 10px; display: grid; gap: 6px; font-size: 13px; }
.parent__backups li { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.parent__toggle { display: flex; gap: 8px; align-items: center; font-size: 14px; }

/* 협력 목표 — 셋이 함께 채우는 막대 (PLAN.md 12절 Q5). 형제를 견주지 않는다 (D8) */
.team { background: var(--night-2); border-radius: 16px; padding: 14px; }
.team__title { font-size: 15px; color: var(--accent); margin-bottom: 10px; }
.team__bar { height: 12px; border-radius: 6px; background: var(--night-3); overflow: hidden; }
.team__fill { height: 100%; background: linear-gradient(90deg, var(--left), var(--accent), var(--right)); transition: width .5s ease; }
.team__note { margin: 8px 0 0; font-size: 12px; color: var(--again); }
.team.is-done .team__note { color: var(--accent); }
