/* 家長端成長頁。沿用 style.css 的變數與元件，只補這一頁專屬的樣式。 */

.parent-main { max-width: 720px; }

/* ---- 開頭 ---- */

.parent-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.parent-cls {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .08em;
  margin-bottom: 2px;
}

.parent-hero h2 { font-size: 22px; line-height: 1.35; }
.parent-hero .hint { margin-top: 8px; }

/* ---- 數字卡 ---- */

.parent-stats .stat { text-align: left; }
.parent-stats .stat .v { color: var(--green); }
.parent-stats .stat .v .unit { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.parent-stats .stat .v-sm { font-size: 19px; line-height: 1.4; }

.panel-hint { margin-top: -6px; margin-bottom: 12px; }

/* ---- 最常出現的表現 ---- */

.hl-list { list-style: none; margin: 0; padding: 0; }

.hl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.hl:last-child { border-bottom: none; }
.hl-icon { font-size: 22px; width: 30px; text-align: center; }
.hl-label { font-weight: 600; }
.hl-count {
  margin-left: auto;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- 每週長條圖 ---- */

.weekly {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 170px;
}

.wcol {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.wval {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  min-height: 16px;
}

.wbar {
  width: 100%;
  max-width: 46px;
  min-height: 3px;
  border-radius: 6px 6px 0 0;
  background: #bcdcca;
}

.wcol.is-current .wbar { background: var(--green); }
.wcol.is-current .wlabel { color: var(--green); font-weight: 700; }

.wlabel {
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink-soft);
  text-align: center;
}

/* ---- 時間軸 ---- */

.parent-timeline { max-height: none; }
.parent-timeline li { gap: 8px; }
.parent-timeline .t { min-width: 108px; }
.pl-icon { font-size: 18px; }
.pl-label { font-weight: 600; }
.pl-period {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 7px;
}

/* ---- 產生連結 ---- */

.linkbox { display: flex; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }

.linkbox input {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
}

.parent-preview { margin-top: 10px; font-size: 14px; }
.parent-preview a { color: var(--green); text-decoration: none; }
.parent-preview a:hover { text-decoration: underline; }

/* ---- 錯誤與註腳 ---- */

.parent-error h3 { font-size: 17px; margin-bottom: 6px; }
.parent-error .hint { margin-bottom: 6px; }
.parent-error-actions { margin-top: 12px; }

.parent-note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
  background: var(--green-soft);
  border: 1px solid #bcdcca;
  border-radius: var(--radius);
  padding: 14px 16px;
}

/* ---- 手機 ---- */

@media (max-width: 480px) {
  .parent-hero { padding: 16px 14px; }
  .parent-hero h2 { font-size: 19px; }
  .parent-stats { grid-template-columns: repeat(2, 1fr); }
  .parent-stats .stat { padding: 12px; }
  .parent-stats .stat .v { font-size: 22px; }
  .parent-stats .stat .v-sm { font-size: 16px; }
  .weekly { height: 150px; gap: 5px; }
  .parent-timeline li { flex-wrap: wrap; row-gap: 2px; }
  .parent-timeline .t { min-width: 100%; font-size: 11px; }
  .parent-timeline .d { margin-left: auto; }
  .linkbox input { flex-basis: 100%; }
  .linkbox .btn { width: 100%; }
}
