/* =========================================================
   家長專區 — 額外樣式（沿用 style.css 設計系統）
   ========================================================= */

/* ---------- 登入 / 申請卡片 ---------- */
.auth-card { max-width: 460px; margin: 6px auto 0; }
.auth-tabs { justify-content: center; margin-bottom: 22px; }
.auth-tabs .tab.active { background: var(--grass); box-shadow: 0 4px 0 var(--grass-deep); }

.auth-pane { display: none; }
.auth-pane.active { display: block; animation: pop-in .3s both; }

.lbl-hint { font-weight: 700; font-size: 13px; color: var(--ink-soft); margin-left: 4px; }

.auth-err {
  color: var(--berry-deep);
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  min-height: 22px;
  margin: 14px 0 0;
}
.auth-note {
  margin: 18px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink-soft);
  background: rgba(255,201,60,.14);
  border-radius: var(--r-sm);
  padding: 14px 16px;
}
.auth-note b { color: var(--grass-deep); }

/* ---------- 儀表板 ---------- */
.mini-btn { min-height: 52px; padding: 12px 18px; font-size: 16px; text-decoration: none; }

.dash-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-actions .btn { flex: 1 1 180px; }

/* 小孩卡片 */
.child-card {
  margin-bottom: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.child-card::after {
  content: "";
  position: absolute;
  top: -50px; right: -50px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: var(--accent, var(--sun));
  opacity: .12;
  pointer-events: none;
}
.child-head { display: flex; align-items: center; gap: 14px; position: relative; }
.child-avatar {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  display: grid; place-content: center;
  font-size: 38px; line-height: 1;
  border-radius: 50%;
  background: rgba(255,201,60,.2);
  box-shadow: inset 0 0 0 3px rgba(255,201,60,.55);
}
.child-id { flex: 1 1 auto; min-width: 0; }
.child-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--ink);
  line-height: 1.15;
}
.child-sub { font-size: 14px; font-weight: 700; color: var(--ink-soft); margin-top: 2px; }

.child-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; position: relative; }
.stat-pill {
  font-weight: 800;
  font-size: 15px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 4px 0 rgba(74,59,42,.08);
}
.stat-pill b { font-family: var(--font-display); margin-left: 2px; }
.stat-pill.stars b { color: var(--sun-deep); }
.stat-pill.score b { color: var(--sky-deep); }
.stat-pill.weak { color: var(--berry-deep); background: rgba(255,107,138,.14); box-shadow: none; }
.stat-pill.weak.zero { color: var(--grass-deep); background: rgba(76,195,138,.16); }

/* 綁定碼區塊 */
.code-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(155,123,232,.1);
  border: 3px dashed rgba(155,123,232,.4);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  position: relative;
}
.code-box .cb-label { font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.code-box .cb-val {
  font-family: 'Baloo 2', monospace;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 4px;
  color: var(--grape);
  flex: 1 1 auto;
}
.cb-copy {
  border: none;
  background: var(--grape);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  padding: 10px 16px;
  min-height: 46px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 0 #7a5cc7;
  transition: transform .08s, filter .15s;
  touch-action: manipulation;
}
.cb-copy:active { transform: translateY(2px); }
.cb-copy:hover { filter: brightness(1.05); }

.child-btns { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.child-btns .btn { flex: 1 1 140px; font-size: 17px; min-height: 56px; padding: 14px 18px; }

/* ---------- 小孩詳情 ---------- */
.detail-top { gap: 14px; align-items: center; }
.detail-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 5vw, 30px);
  color: var(--ink);
}
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

.guardians {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
  align-items: center;
}
.guardians .gd-label { font-weight: 800; font-size: 15px; color: var(--ink-soft); }
.guardians .gd-chip {
  font-weight: 800;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(78,168,245,.16);
  color: var(--sky-deep);
}

/* ---------- 頭像挑選 ---------- */
.avatar-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-opt {
  width: 56px; height: 56px;
  display: grid; place-content: center;
  font-size: 30px; line-height: 1;
  border: 4px solid rgba(74,59,42,.12);
  border-radius: 18px;
  background: var(--paper);
  cursor: pointer;
  transition: transform .1s, border-color .15s, background .15s;
  touch-action: manipulation;
}
.avatar-opt:active { transform: scale(.92); }
.avatar-opt.sel {
  border-color: var(--sun-deep);
  background: rgba(255,201,60,.2);
  transform: translateY(-2px);
}

/* 小一點的 chips（modal 內） */
.chips-sm .chip { min-height: 50px; padding: 9px 16px; font-size: 17px; border-width: 3px; }

/* ---------- Modal ---------- */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(74,59,42,.4);
  backdrop-filter: blur(3px);
  padding: 20px;
  overflow-y: auto;
}
.modal-mask.show { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  width: 100%;
  max-width: 480px;
  margin: 6vh auto;
  animation: pop-in .35s cubic-bezier(.2,1.2,.4,1) both;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  margin: 0;
  color: var(--ink);
}
.modal-x { background: rgba(74,59,42,.1); color: var(--ink-soft); }
.modal-x:hover { background: rgba(74,59,42,.18); }

.code-input {
  text-align: center;
  font-family: 'Baloo 2', monospace;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 8px;
  text-transform: uppercase;
}

/* 顯示綁定碼 Modal */
.code-modal { text-align: center; }
.code-burst { font-size: 60px; animation: bob 2s ease-in-out infinite; }
.code-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  margin: 6px 0 12px;
  color: var(--grass-deep);
}
.bigcode {
  font-family: 'Baloo 2', monospace;
  font-weight: 800;
  font-size: clamp(40px, 12vw, 56px);
  letter-spacing: 10px;
  color: var(--grape);
  background: rgba(155,123,232,.12);
  border: 3px dashed rgba(155,123,232,.4);
  border-radius: var(--r-md);
  padding: 18px 10px 18px 18px;
  margin: 12px 0 18px;
}
