/* ============================================================
   PROFILE UI — V2 (Phase 7B, 2026-09-16)
   Student identity space · emerald/mint app identity ·
   zero-raster · 320px safe · no glassmorphism, no neon,
   no giant shadows, no random color.
   ============================================================ */

:root {
  --pp-emerald: #0f6b4f;
  --pp-emerald-deep: #0b5640;
  --pp-emerald-soft: #e8f5ef;
  --pp-emerald-mid: #d3ecdf;
  --pp-ink: #14231d;
  --pp-line: rgba(20, 35, 29, 0.10);
  --pp-card: #ffffff;
  --pp-soft: #f4f8f5;
  --pp-input: #ffffff;
  --pp-fine: #6b8578;
}

.pp-wrap { position: relative; padding: 0 0 8px; max-width: 640px; margin: 0 auto; }
.pp-head { display: flex; align-items: flex-start; justify-content: space-between; margin: 18px 2px 16px; }
.pp-head h1 { font-size: 24px; margin: 0 0 2px; }
.pp-head .muted { font-size: 12.5px; }

.pp-card { padding: 16px; margin: 0 0 12px; background: var(--pp-card); border: 1px solid var(--pp-line); box-shadow: 0 1px 2px rgba(20, 35, 29, 0.04); }
.pp-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pp-emerald); opacity: 0.75; margin-bottom: 6px; }
.pp-value { font-size: 15px; font-weight: 600; line-height: 1.45; word-break: break-word; color: var(--pp-ink); }
.pp-value.pp-empty { opacity: 0.6; font-weight: 500; }
.pp-hint { font-size: 12.5px; opacity: 0.72; margin: 10px 0 0; line-height: 1.5; }
.pp-fine { font-size: 12px; opacity: 0.6; margin: 8px 0 0; line-height: 1.45; }
.pp-fine[hidden] { display: none; }
.pp-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp-arrow { font-size: 18px; opacity: 0.4; flex: none; }
.pp-tap { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: none; background: inherit; font: inherit; color: inherit; cursor: pointer; }
.pp-tap:active { opacity: 0.85; }
.pp-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pp-card-title { font-size: 15.5px; font-weight: 800; color: var(--pp-ink); }
.pp-card-edit { border: none; background: var(--pp-emerald-soft); color: var(--pp-emerald-deep); font-weight: 700; font-size: 12px; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.pp-card-edit:active { opacity: 0.8; }

/* ---------------- identity hero (compact, left-aligned) ---------------- */
/* Reference hero — LIGHT mint card, dark text, emerald accents, SVG mountain wash */
.pp-hero { position: relative; overflow: hidden; text-align: left; padding: 20px 18px 16px; border-radius: 22px; margin-bottom: 12px; background: linear-gradient(160deg, #f2fbf6 0%, #e4f6ec 48%, #d5f0e2 100%); color: #0c3b2a; border: 1px solid rgba(21, 128, 61, 0.14); box-shadow: 0 2px 10px rgba(15, 107, 79, 0.08); }
.pp-hero-wash { position: absolute; right: 0; bottom: 0; width: 100%; height: 58%; pointer-events: none; }
.pp-hero-row { position: relative; display: flex; align-items: center; gap: 14px; }
.pp-hero-avatar { position: relative; width: 72px; height: 72px; flex: none; border-radius: 50%; overflow: visible; display: inline-flex; align-items: center; justify-content: center; border: 3px solid #16a34a; background: #eef6f1; padding: 0; cursor: pointer; box-shadow: 0 0 0 3px #f2fbf6, 0 4px 14px rgba(8, 40, 30, 0.18); }
.pp-cam-badge { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1.5px solid rgba(22, 163, 74, 0.4); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.pp-hero-idblock { min-width: 0; flex: 1; position: relative; }
.pp-hero-name { font-size: 19px; font-weight: 800; color: #0c3b2a; display: flex; align-items: center; gap: 6px; }
.pp-hero-chip { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(22, 163, 74, 0.3); color: #0b5640; font-size: 12.5px; cursor: pointer; }
.pp-hero-chip span { font-size: 9.5px; font-weight: 700; letter-spacing: 1px; color: #15803d; }
.pp-hero-chip b { font-weight: 700; letter-spacing: 0.5px; color: #0c3b2a; }
.pp-hero-chip i { font-style: normal; font-size: 11px; color: #15803d; }
.pp-hero-line { font-size: 12.5px; color: #166534; margin-top: 8px; font-weight: 650; }
.pp-hero-bio { font-size: 12.5px; color: #14532d; opacity: 0.88; margin-top: 5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-hero-edit { position: relative; margin: 16px auto 0; display: block; width: 100%; max-width: 320px; padding: 12px 20px; font-size: 14px; font-weight: 750; border-radius: 14px; background: linear-gradient(150deg, #16a34a, #15803d); color: #fff; box-shadow: 0 6px 16px rgba(21, 128, 61, 0.28); }
.pp-hero-edit:active { transform: scale(0.985); }
.pp-greeting { font-size: 13px; text-align: center; color: #4b7a63; margin: 2px 0 14px; }

/* ---------------- stats strip (real data only) ---------------- */
.pp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 2px 0 12px; background: var(--pp-card); border: 1px solid var(--pp-line); border-radius: 18px; padding: 12px 0; cursor: pointer; }
.pp-stats:active { background: var(--pp-emerald-soft); }
.pp-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; padding: 0 4px; }
.pp-stat + .pp-stat { border-left: 1px solid rgba(20, 35, 29, 0.08); }
.pp-stat-ic { font-size: 17px; line-height: 1; }
.pp-stat-num { font-size: 17px; font-weight: 800; color: var(--pp-ink); font-variant-numeric: tabular-nums; }
.pp-stat small { font-size: 10px; opacity: 0.6; line-height: 1.25; }
.pp-stats-hint { margin-top: -4px; }

/* ---------------- completion (ring) ---------------- */
.pp-comp-row { display: flex; align-items: center; gap: 14px; }
.pp-ring { position: relative; width: 64px; height: 64px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.pp-ring svg { width: 64px; height: 64px; display: block; }
.pp-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 800; color: var(--pp-emerald-deep); }
.pp-comp-info { min-width: 0; flex: 1; }
.pp-comp-cta { margin-top: 8px; border: none; background: none; color: var(--pp-emerald); font-weight: 800; font-size: 13px; cursor: pointer; padding: 0; }
.pp-comp-cta:active { opacity: 0.8; }
.pp-comp-bar { height: 6px; border-radius: 3px; background: rgba(15, 107, 79, 0.12); margin: 9px 0 2px; overflow: hidden; }
.pp-comp-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #34d399, #0f6b4f); transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.pp-ring-anim .pp-ring-arc { transition: stroke-dashoffset 0.95s cubic-bezier(0.22, 1, 0.36, 1); }
.pp-comp-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.pp-comp-step { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px; border: 1px solid rgba(20, 35, 29, 0.1); background: #fbfefc; font: inherit; font-size: 13px; font-weight: 650; color: #14231d; text-align: left; cursor: pointer; transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease; }
.pp-comp-step:hover { background: #f2fbf6; border-color: rgba(22, 163, 74, 0.35); }
.pp-comp-step:active { transform: scale(0.99); }
.pp-comp-step-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--pp-emerald); opacity: 0.65; }
.pp-comp-step-arrow { margin-left: auto; color: var(--pp-emerald); font-weight: 800; opacity: 0.7; }
[data-theme="dark"] .pp-comp-step { background: #16211c; border-color: rgba(255, 255, 255, 0.12); color: #e6f2ec; }
[data-theme="dark"] .pp-comp-bar { background: rgba(255, 255, 255, 0.14); }
.pp-meter { width: 44%; height: 8px; border-radius: 99px; background: rgba(15, 107, 79, 0.12); overflow: hidden; flex: none; }
.pp-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0f6b4f, #2a9d72); transition: width 400ms ease; }

/* ---------------- academic identity ---------------- */
.pp-ac-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: none; background: none; font: inherit; color: inherit; padding: 10px 6px; cursor: pointer; border-radius: 12px; }
.pp-ac-row + .pp-ac-row { border-top: 1px solid var(--pp-line); }
.pp-ac-row:active { background: var(--pp-emerald-soft); }
.pp-ac-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--pp-emerald-soft); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.pp-ac-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.pp-ac-body .pp-kicker { margin-bottom: 3px; }
.pp-ac-body .pp-value { font-size: 13.5px; display: block; }
.pp-ac-row { align-items: center; }
.pp-ac-row .pp-arrow { align-self: center; }

/* ---------------- journey ---------------- */
.pp-journey-track { display: flex; gap: 0; margin: 6px 0 4px; }
.pp-jm { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; min-width: 0; }
.pp-jm::before { content: ''; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--pp-line); }
.pp-jm:first-child::before { display: none; }
.pp-jm.on::before { background: var(--pp-emerald); }
.pp-jm-dot { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--pp-line); color: var(--pp-emerald); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; }
.pp-jm.on .pp-jm-dot { background: var(--pp-emerald); border-color: var(--pp-emerald); color: #fff; }
.pp-jm small { font-size: 9.5px; opacity: 0.75; margin-top: 6px; line-height: 1.25; }
.pp-jm-date { font-size: 9px !important; opacity: 0.5 !important; }
.pp-jl { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.pp-jl-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--pp-line); }
.pp-jl-row span:nth-child(2) { flex: 1; min-width: 0; }
.pp-jl-row b { display: block; font-size: 13.5px; }
.pp-jl-row small { display: block; font-size: 11.5px; opacity: 0.6; }
.pp-jl-row em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--pp-emerald); white-space: nowrap; }
.pp-jl-row.off em { opacity: 0.45; color: inherit; }
.pp-jm-dot.pp-jl-dot { width: 20px; height: 20px; flex: none; }

/* ---------------- achievements ---------------- */
/* achievements — modern rows: icon / title / status / progress / reward (§15) */
.pp-ach-list { display: flex; flex-direction: column; gap: 8px; }
.pp-ach-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: #f7faf8; border: 1px solid var(--pp-line); }
.pp-ach-row.on { background: var(--pp-emerald-soft); border-color: rgba(22, 163, 74, 0.25); }
.pp-ach-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; background: #fff; border: 1px solid var(--pp-line); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pp-ach-row.on .pp-ach-ic { background: #fff; border-color: rgba(22, 163, 74, 0.35); }
.pp-ach-body { flex: 1; min-width: 0; }
.pp-ach-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pp-ach-line b { font-size: 13.5px; font-weight: 750; }
.pp-ach-status { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: 0.4px; padding: 3px 9px; border-radius: 999px; background: #eceff0; color: #6b8578; font-style: normal; }
.pp-ach-row.on .pp-ach-status { background: #16a34a; color: #fff; }
.pp-ach-bar { height: 6px; border-radius: 3px; background: #e4ece8; margin: 7px 0 5px; overflow: hidden; }
.pp-ach-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #22c55e, #16a34a); transition: width 0.5s ease; }
.pp-ach-row.lock .pp-ach-bar i { background: #b9cec2; }
.pp-ach-row small { display: block; font-size: 11px; color: #5d8272; line-height: 1.4; }
.pp-ach-row.lock { opacity: 0.88; }

/* ---------------- preferences ---------------- */
.pp-pref-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: none; font: inherit; color: inherit; padding: 10px 6px; cursor: pointer; border-radius: 12px; }
.pp-pref-row + .pp-pref-row { border-top: 1px solid var(--pp-line); }
.pp-pref-row:active { background: var(--pp-emerald-soft); }
.pp-pref-ic { font-size: 15px; width: 22px; text-align: center; flex: none; }
.pp-pref-label { flex: 1; font-size: 13.5px; font-weight: 600; }
.pp-pref-value { font-size: 12.5px; opacity: 0.65; font-weight: 600; }

/* ---------------- privacy + switch ---------------- */
.pp-privacy { cursor: pointer; }
.pp-priv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp-switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #cdd8d2; border: none; cursor: pointer; flex: none; transition: background 160ms ease; padding: 0; }
.pp-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 160ms ease; }
.pp-switch.on { background: var(--pp-emerald); }
.pp-switch.on i { transform: translateX(20px); }

/* public link */
.pp-public-link { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pp-line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pp-public-link code { font-size: 12px; word-break: break-all; opacity: 0.8; }

/* ---------------- buttons ---------------- */
.pp-btn-primary { background: linear-gradient(135deg, #0f6b4f, #17845f); color: #fff; border: none; border-radius: 12px; padding: 12px 18px; font-weight: 700; font-size: 14px; cursor: pointer; width: 100%; }
.pp-btn-primary:active { opacity: 0.9; }
.pp-btn-primary:disabled { opacity: 0.6; cursor: default; }
.pp-btn-secondary { background: var(--pp-emerald-soft); color: var(--pp-emerald-deep); border: none; border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 13px; cursor: pointer; }
.pp-btn-ghost { background: transparent; color: inherit; border: none; border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 13px; cursor: pointer; opacity: 0.75; }
.pp-btn-ghost.pp-danger { color: #d43f3f; opacity: 0.9; }
.pp-iconbtn { background: var(--pp-emerald-soft); border: none; border-radius: 10px; width: 38px; height: 38px; font-size: 16px; cursor: pointer; flex: none; }
.pp-iconbtn:active { opacity: 0.8; }
.pp-iconbtn.pp-danger { background: rgba(212, 63, 63, 0.1); }

/* ---------------- bottom sheet ---------------- */
.pp-sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 14, 26, 0.45); z-index: 900; display: flex; align-items: flex-end; justify-content: center; animation: ppFade 160ms ease; }
.pp-sheet { width: 100%; max-width: 520px; background: var(--pp-card); border-radius: 22px 22px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 82vh; overflow-y: auto; animation: ppSlide 200ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes ppFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ppSlide { from { transform: translateY(28px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.pp-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pp-sheet-head h3 { margin: 0; font-size: 17px; }
.pp-sheet-head .pp-iconbtn { color: inherit; font-size: 20px; }
.pp-sheet-body .pp-field { display: block; margin-bottom: 14px; }
.pp-field span { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; opacity: 0.8; }
.pp-field em { font-style: normal; font-weight: 500; opacity: 0.55; }
.pp-field .pp-field-sub { margin-top: 6px; font-size: 13px; }
.pp-field input, .pp-field textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--pp-line); border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 14.5px; background: var(--pp-input); color: inherit; }
.pp-field input:focus, .pp-field textarea:focus { outline: none; border-color: var(--pp-emerald); background: #fff; }
.pp-field textarea { resize: vertical; min-height: 70px; }
.pp-sheet-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.pp-sheet-actions .pp-btn-primary { flex: 1; }
.pp-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .pp-2col { grid-template-columns: 1fr; } }

/* visibility + prefs options */
.pp-vlist { display: flex; flex-direction: column; gap: 8px; }
.pp-vopt { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; border: 1.5px solid var(--pp-line); background: var(--pp-card); border-radius: 14px; padding: 12px; font: inherit; cursor: pointer; }
.pp-vopt.on { border-color: var(--pp-emerald); background: var(--pp-emerald-soft); }
.pp-vopt.disabled { opacity: 0.55; cursor: default; }
.pp-vradio { color: var(--pp-emerald); flex: none; }
.pp-vopt b { display: block; font-size: 14px; }
.pp-vopt small { display: block; font-size: 12px; opacity: 0.65; margin-top: 2px; line-height: 1.4; }

/* targets list + chips */
.pp-tlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pp-titem { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #f6f9f7; border-radius: 12px; font-size: 13.5px; }
.pp-add-target { border: 1.5px dashed var(--pp-line); border-radius: 14px; padding: 12px; margin-top: 8px; }
.pp-add-target .pp-field { margin-bottom: 10px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pp-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--pp-emerald-soft); color: var(--pp-emerald-deep); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; }
.pp-chip-x { border: none; background: none; color: inherit; font-size: 14px; cursor: pointer; padding: 0 2px; line-height: 1; }

/* ---------------- edit page ---------------- */
.pp-edit { padding: 6px 2px 30px; }
.pp-edit-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 16px; }
.pp-edit-top h2 { margin: 0; font-size: 18px; flex: 1; text-align: center; }
.pp-edit-top .pp-iconbtn { background: transparent; font-size: 20px; }
.pp-edit-ic { opacity: 0.5; }
.pp-edit-photo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 18px 0 20px; }
.pp-edit-photo-img { border-radius: 50%; line-height: 0; }
.pp-edit-photo-img svg { border-radius: 50%; display: block; }
.pp-edit-photo .pp-btn-secondary { width: auto; }
.pp-edit .pp-field { margin-bottom: 14px; }
.pp-edit .pp-field span { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; opacity: 0.8; }
.pp-edit .pp-field input, .pp-edit .pp-field textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--pp-line); border-radius: 12px; padding: 12px; font: inherit; font-size: 14.5px; background: #f6f9f7; }
.pp-edit .pp-field input:focus, .pp-edit .pp-field textarea:focus { outline: none; border-color: var(--pp-emerald); background: #fff; }
.pp-edit .pp-field textarea { resize: vertical; min-height: 74px; }
.pp-saved-chip { font-style: normal; color: var(--pp-emerald); background: var(--pp-emerald-soft); border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800; margin-left: 6px; }
.pp-bio-count { display: block; text-align: right; font-size: 11px; opacity: 0.5; margin-top: 4px; }
.pp-edit-save { margin-top: 6px; }

/* ---------------- avatar page ---------------- */
.pp-av-tab.on { background: #fff; opacity: 1; color: var(--pp-emerald-deep); box-shadow: 0 1px 3px rgba(20, 35, 29, 0.1); }
.pp-av-preview { display: flex; justify-content: center; margin: 6px 0 16px; line-height: 0; }
.pp-av-preview svg { border-radius: 50%; display: block; }
.pp-av-defaults { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.pp-av-defaults-20 { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pp-av-def { border: 2.5px solid transparent; background: none; border-radius: 50%; padding: 3px; cursor: pointer; line-height: 0; transition: transform 0.16s ease, border-color 0.16s ease; }
.pp-av-def:hover { transform: translateY(-2px); }
.pp-av-def:active { transform: scale(0.94); }
.pp-av-def svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.pp-av-def.on { border-color: var(--pp-emerald); }
.pp-av-sec-note { display: block; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11px; color: #7b9a8c; margin-top: 3px; }
.pp-av-gender { display: flex; gap: 8px; margin-bottom: 12px; }
.pp-av-tab { flex: 1; padding: 9px 12px; border-radius: 12px; border: 1.5px solid rgba(20, 35, 29, 0.14); background: #fff; font: inherit; font-size: 13px; font-weight: 700; color: #4b6a5c; cursor: pointer; transition: all 0.16s ease; }
.pp-av-tab.on { border-color: var(--pp-emerald); background: #eaf7f0; color: #0b5640; }

/* avatar actions (legacy, still referenced by dashboard flow) */
.pp-avatar-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.pp-avatar-actions input[type="file"] { display: none; }

/* ---------------- toast ---------------- */
.pp-toast { position: fixed; left: 50%; bottom: calc(74px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #14231d; color: #fff; font-size: 13px; font-weight: 600; padding: 11px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(10, 14, 26, 0.28); opacity: 0; pointer-events: none; transition: opacity 220ms ease; z-index: 950; max-width: 88vw; text-align: center; }
.pp-toast:not(:empty) { opacity: 1; }
.pp-toast.pp-toast-error { background: #b3261e; }

/* ---------------- skeleton ---------------- */
.pp-skel { height: 120px; border-radius: 18px; margin-bottom: 12px; background: linear-gradient(100deg, #e8f0eb 40%, #f4f8f5 50%, #e8f0eb 60%); background-size: 200% 100%; animation: ppShimmer 1.3s infinite; }
@keyframes ppShimmer { to { background-position: -200% 0; } }

/* ---------------- guest + fallback ---------------- */
.pp-guest { text-align: center; padding: 34px 20px; margin-top: 8px; }
.pp-guest h2 { margin: 10px 0 8px; }
.pp-guest p { font-size: 13.5px; opacity: 0.75; line-height: 1.55; margin: 0 0 18px; }
.pp-guest-ic { font-size: 34px; }
.pp-fallback { padding: 26px 18px; text-align: center; }
.pp-fallback p { font-size: 13.5px; opacity: 0.8; line-height: 1.55; margin: 0 0 14px; }

/* ---------------- public profile page ---------------- */
.pp-public-wrap { padding-bottom: 56px; }
.pp-avatar-lg { width: 100px; height: 100px; }
.pp-hero-avatar:has(.pp-avatar-lg) { width: 100px; height: 100px; }
.pp-hero-avatar .pp-avatar-svg + .pp-avatar-lg { display: none; }
.pp-public-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.pp-public-foot span { font-size: 12.5px; font-weight: 700; opacity: 0.6; }

/* ---------------- 320px + reduced motion ---------------- */
@media (max-width: 340px) {
  .pp-stats { grid-template-columns: repeat(2, 1fr); }
  .pp-hero-name { font-size: 17px; }
  .pp-hero-avatar { width: 62px; height: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-sheet, .pp-skel, .pp-meter i, .pp-switch, .pp-switch i { animation: none; transition: none; }
}

/* ---------------- v6: guest card (reference panel 5) ---------------- */
.pp-guest { padding: 28px 20px 24px; }
.pp-guest-art { width: 132px; margin: 0 auto 10px; }
.pp-guest-art svg { width: 100%; height: auto; display: block; }
.pp-guest h2 { font-size: 21px; font-weight: 800; margin: 0 0 8px; color: #0c3b2a; }
.pp-guest-sub { font-size: 13.5px; color: #43685a; line-height: 1.6; margin: 0 0 18px; }
.pp-guest-actions { display: flex; flex-direction: column; gap: 10px; }
.pp-guest-google { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; background: #fff; color: #1f1f1f; border: 1.8px solid #d8e0db; border-radius: 14px; padding: 13px 10px; font-weight: 750; font-size: 14.5px; cursor: pointer; }
.pp-guest-google:active { background: #f4f8f5; }
.pp-google-g { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; background: #e8f0fe; color: #1a73e8; font-weight: 900; font-size: 13px; font-style: normal; }
.pp-guest-duo { display: flex; gap: 10px; }
.pp-guest-duo-btn { flex: 1; background: #fff; color: #15803d; border: 1.8px solid #16a34a; border-radius: 14px; padding: 12px 10px; font-weight: 750; font-size: 14px; cursor: pointer; }
.pp-guest-duo-btn:active { background: #f2fbf6; }
.pp-btn-outline { flex: 1; background: #fff; color: #15803d; border: 1.8px solid #16a34a; border-radius: 14px; padding: 12px 10px; font-weight: 750; font-size: 14px; cursor: pointer; }
.pp-btn-outline:active { background: #f2fbf6; }
.pp-guest-benefits { margin-top: 18px; text-align: left; background: #f4faf6; border: 1px solid rgba(22, 163, 74, 0.16); border-radius: 14px; padding: 14px 14px 12px; }
.pp-guest-benefits b { display: block; font-size: 12.5px; font-weight: 750; color: #0b5640; margin-bottom: 8px; }
.pp-guest-benefits ul { list-style: none; margin: 0; padding: 0; }
.pp-guest-benefits li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #2c5747; line-height: 1.45; padding: 4px 0; }
.pp-guest-benefits li span { color: #16a34a; font-weight: 800; flex: none; }

/* ---------------- v6: academic identity page (reference panel 3) ---------------- */
.pp-topbar { display: flex; align-items: center; gap: 10px; padding: 10px 0 14px; }
.pp-topbar-back { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; font-weight: 700; }
.pp-topbar-title { font-size: 18px; font-weight: 800; color: #0c3b2a; }
.pp-topbar-spacer { flex: 1; }
.pp-acad-sec { padding: 16px; margin-bottom: 12px; }
.pp-acad-sec h2 { font-size: 14.5px; font-weight: 800; color: #0c3b2a; margin: 0 0 10px; }
.pp-acad-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pp-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--pp-emerald-soft); border: 1px solid rgba(22, 163, 74, 0.2); color: var(--pp-emerald-deep); border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; }
.pp-chip em { font-style: normal; font-weight: 600; opacity: 0.65; }
.pp-chip-lg { padding: 8px 13px; font-size: 13px; }
.pp-chip-x { border: none; background: rgba(21, 128, 61, 0.12); color: var(--pp-emerald-deep); width: 20px; height: 20px; border-radius: 50%; font-size: 13px; font-weight: 800; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pp-chip-x:active { background: rgba(21, 128, 61, 0.22); }
.pp-acad-addrow { display: flex; gap: 8px; align-items: stretch; }
.pp-acad-addrow input { flex: 1; min-width: 0; box-sizing: border-box; border: 1.5px solid var(--pp-line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; background: #f6f9f7; }
.pp-acad-addrow input:focus { outline: none; border-color: var(--pp-emerald); background: #fff; }
.pp-acad-addrow .pp-btn-secondary { flex: none; border-radius: 12px; padding: 10px 14px; }
.pp-select-wrap { position: relative; }
.pp-select-wrap select { width: 100%; box-sizing: border-box; appearance: none; -webkit-appearance: none; border: 1.5px solid var(--pp-line); border-radius: 12px; padding: 11px 34px 11px 12px; font: inherit; font-size: 14.5px; background: #f6f9f7; color: #0c3b2a; }
.pp-select-wrap select:focus { outline: none; border-color: var(--pp-emerald); background: #fff; }
.pp-select-wrap svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 12px; height: 8px; fill: none; stroke: #43685a; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.pp-acad-err { color: #c2362f; font-weight: 700; margin: 2px 0 10px; }
.pp-right { text-align: right; margin: 6px 0 0; }
.pp-acad-save { margin: 4px 0 18px; border-radius: 14px; padding: 13px 18px; font-size: 14.5px; }

/* ---------------- Academic catalog (v262): searchable university,
   catalog unit select, per-unit official subject grid, priority targets */
.pp-acad-addrow-multi { flex-wrap: wrap; }
.pp-acad-uni { position: relative; flex: 1 1 100%; }
.pp-acad-ulist { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--pp-line); border-radius: 12px; box-shadow: 0 10px 26px rgba(10, 43, 30, 0.14); overflow: hidden; }
.pp-acad-uitem { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; box-sizing: border-box; padding: 10px 12px; border: none; border-bottom: 1px solid #eef3f0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: #0c3b2a; cursor: pointer; text-align: left; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pp-acad-uitem:last-child { border-bottom: none; }
.pp-acad-uitem:hover, .pp-acad-uitem:active { background: var(--pp-emerald-soft); }
.pp-acad-uitem small { font-size: 11.5px; font-weight: 600; opacity: 0.6; }
.pp-acad-addrow-multi select { flex: 1 1 38%; min-width: 0; box-sizing: border-box; appearance: none; -webkit-appearance: none; border: 1.5px solid var(--pp-line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; background: #f6f9f7; color: #0c3b2a; }
.pp-acad-addrow-multi select:disabled { opacity: 0.55; }
.pp-acad-addrow-multi .pp-btn-secondary { flex: none; }
.pp-acad-prio { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--pp-emerald); color: #fff; font-size: 10.5px; font-weight: 800; flex: none; }
.pp-chip-move { border: none; background: none; color: var(--pp-emerald-deep); font-size: 10px; line-height: 1; cursor: pointer; padding: 2px; opacity: 0.85; }
.pp-chip-move:active { opacity: 1; }
.pp-acad-subjgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.pp-acad-subj { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--pp-line); border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 600; color: #0c3b2a; background: #f6f9f7; cursor: pointer; box-sizing: border-box; }
.pp-acad-subj input { width: 15px; height: 15px; accent-color: var(--pp-emerald); flex: none; margin: 0; }
.pp-acad-subj:has(input:checked) { border-color: var(--pp-emerald); background: var(--pp-emerald-soft); }
.pp-acad-otherchips { margin-top: 4px; }
/* Goal presets: tappable chips above the goal box. */
.pp-goal-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.pp-goal-preset { border: 1.5px solid var(--pp-line); background: #f6f9f7; color: #0c3b2a; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; box-sizing: border-box; min-height: 36px; }
.pp-goal-preset:hover { border-color: var(--pp-emerald); }
.pp-goal-preset.is-on { border-color: var(--pp-emerald); background: var(--pp-emerald-soft); color: var(--pp-emerald-deep); }
[data-theme="dark"] .pp-goal-preset { background: #16241d; border-color: var(--pp-line); color: var(--pp-ink); }
[data-theme="dark"] .pp-goal-preset.is-on { border-color: var(--pp-emerald); background: #16241d; color: #6ee7b7; }

/* ---------------- v6: save state machine ---------------- */
.pp-btn-primary.pp-save-busy { opacity: 0.75; cursor: wait; }
.pp-btn-primary.pp-save-ok { background: linear-gradient(135deg, #16a34a, #15803d); }
.pp-btn-primary.pp-save-fail { background: linear-gradient(135deg, #e05252, #c2362f); }

/* ---------------- v6: stats note + achievements ---------------- */
.pp-stats-note { text-align: center; font-size: 11.5px; font-weight: 700; color: #166534; margin: -4px 0 12px; }
.pp-ach-empty { font-size: 12px; font-weight: 700; color: #2c5747; background: #f4faf6; border: 1px dashed rgba(22, 163, 74, 0.35); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; line-height: 1.5; }

/* v6.1 (Phase 7B3): circular avatar guarantee (PHASE N) */
.pp-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.pp-hero-avatar .pp-avatar-img, .pp-avatar-lg { border-radius: 50%; }
.pp-av-hint { display: flex; gap: 10px; align-items: flex-start; background: #f4faf6; border: 1px solid rgba(22, 163, 74, 0.2); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.pp-av-hint span { font-size: 16px; flex: none; }
.pp-av-hint b { display: block; font-size: 12.5px; font-weight: 750; color: #0b5640; }
.pp-av-hint small { display: block; font-size: 11.5px; color: #43685a; margin-top: 2px; line-height: 1.45; }

/* v6.2 (Phase 7B3): brand row + auth skeleton + section error boundary */
.pp-brand { display: flex; align-items: center; gap: 10px; padding: 2px 0 14px; }
.pp-brand-logo { width: 38px; height: 38px; flex: none; display: inline-flex; }
.pp-brand-logo svg { width: 100%; height: 100%; display: block; }
.pp-brand-text { min-width: 0; flex: 1; }
.pp-brand-text b { display: block; font-size: 15.5px; font-weight: 850; color: #0c3b2a; letter-spacing: -0.2px; }
.pp-brand-text small { display: block; font-size: 10.5px; font-weight: 600; color: #5d8272; margin-top: 1px; }
.pp-brand-actions { display: flex; gap: 6px; }
.pp-brand-ic { width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(22, 163, 74, 0.18); background: #f4faf6; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pp-brand-ic:active { background: #e7f6ee; }
.pp-skel-pp { display: block; }
.pp-skel-row { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.pp-skel-avatar { width: 72px; height: 72px; border-radius: 50%; flex: none; }
.pp-skel-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pp-skel-name { height: 18px; width: 55%; border-radius: 8px; }
.pp-skel-chip { height: 24px; width: 38%; border-radius: 999px; }
.pp-skel-line { height: 12px; width: 70%; border-radius: 6px; }
.pp-skel-stats { height: 74px; border-radius: 18px; }
.pp-skel-card { height: 120px; border-radius: 18px; }
.pp-skel-note { text-align: center; margin-top: 10px; color: #5d8272; font-weight: 700; }
.pp-section-error { padding: 14px 16px; border: 1px dashed rgba(22, 163, 74, 0.3); background: #f7fbf9; }

/* v6.3 (Phase 7B3): Preferences / Privacy pages + success modal (reference panels 5/6/9) */
.pp-prefs-page { padding: 6px 16px; }
.pp-priv-page { padding: 16px; }
.pp-priv-visible { padding: 16px; }
.pp-priv-visible h3 { font-size: 13.5px; font-weight: 800; color: #0c3b2a; margin: 0 0 10px; }
.pp-priv-visible ul { list-style: none; margin: 0; padding: 0; }
.pp-priv-visible li { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 650; color: #2c5747; padding: 5px 0; }
.pp-priv-visible li span { color: #16a34a; font-weight: 800; }
.pp-priv-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: #fff; font: inherit; color: inherit; cursor: pointer; }
.pp-priv-safe { display: flex; gap: 10px; align-items: flex-start; background: #f4faf6; border: 1px solid rgba(22, 163, 74, 0.2); border-radius: 14px; padding: 13px 14px; margin: 12px 0 18px; }
.pp-priv-safe span { font-size: 16px; flex: none; }
.pp-priv-safe p { margin: 0; font-size: 12.5px; line-height: 1.5; color: #2c5747; }
.pp-priv-safe b { color: #0b5640; }
.pp-page-save { margin: 14px 0 18px; border-radius: 14px; padding: 13px 18px; font-size: 14.5px; }
.pp-pref-row.pp-soon .pp-pref-value { opacity: 0.55; }
/* success modal */
.pp-modal-backdrop { position: fixed; inset: 0; background: rgba(8, 30, 22, 0.45); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 2000; }
.pp-modal { background: var(--pp-card); border-radius: 20px; padding: 26px 22px 20px; width: 100%; max-width: 320px; text-align: center; box-shadow: 0 18px 50px rgba(8, 30, 22, 0.28); }
.pp-modal-check { width: 58px; height: 58px; margin: 0 auto 14px; }
.pp-modal-check svg { width: 100%; height: 100%; }
.pp-modal b { display: block; font-size: 16.5px; font-weight: 800; color: #0c3b2a; }
.pp-modal small { display: block; font-size: 13px; color: #5d8272; margin: 6px 0 18px; line-height: 1.5; }
.pp-modal .pp-btn-primary { border-radius: 14px; padding: 12px 18px; }

/* avatar page — current photo + pick actions (blueprint §5) */
.pp-av-current { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 18px; }
.pp-av-current-label { font-size: 12px; font-weight: 700; color: #5d8272; letter-spacing: 0.2px; }
.pp-av-pick { display: block; width: 100%; text-align: center; margin-bottom: 10px; cursor: pointer; }
.pp-av-pick input[type="file"] { display: none; }
.pp-av-sec { font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: #5d8272; margin: 18px 0 10px; }
.pp-av-err { color: #b3261e; font-weight: 650; margin-top: 10px; }

/* crop modal — zoom + pan, perfect circle */
.pp-crop-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(8, 24, 17, 0.62); backdrop-filter: blur(4px); padding: 20px; }
.pp-crop { width: 100%; max-width: 380px; background: var(--pp-card); border-radius: 20px; padding: 18px 18px 20px; box-shadow: 0 24px 60px rgba(6, 30, 20, 0.35); }
.pp-crop-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pp-crop-top h2 { font-size: 16px; font-weight: 800; margin: 0; }
.pp-crop-stage { display: flex; justify-content: center; margin: 6px 0 4px; }
.pp-crop-circle { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; position: relative; background: #eef3ef; box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.25); }
.pp-crop-circle img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: center center; pointer-events: none; user-select: none; -webkit-user-drag: none; }

/* Premium crop (owner spec: Facebook/Instagram-quality) — a large square stage
   dimmed outside a circular mask, with a rule-of-thirds overlay and a live
   handle. Pinch/drag to zoom and reposition; the saved output is 1:1. */
.pp-crop-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(6, 20, 14, 0.72); backdrop-filter: blur(3px); padding: 16px; }
.pp-crop { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 16px 16px 18px; box-shadow: 0 18px 48px rgba(4, 22, 14, 0.42); animation: ppCropIn 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes ppCropIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.pp-crop-premium .pp-crop-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 340px; margin: 4px auto 12px; border-radius: 18px; overflow: hidden; background: #0d1b14; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); touch-action: none; cursor: grab; }
.pp-crop-premium .pp-crop-stage:active { cursor: grabbing; }
.pp-crop-premium .pp-crop-stage img { position: absolute; top: 50%; left: 50%; width: auto; height: auto; object-fit: unset; transform-origin: center center; pointer-events: none; user-select: none; -webkit-user-drag: none; will-change: transform; }
.pp-crop-guides { position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.34) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.34) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
  background-position: -1px -1px;
  opacity: 0;
  transition: opacity 0.18s ease; }
.pp-crop-premium .pp-crop-stage.is-dragging .pp-crop-guides,
.pp-crop-premium .pp-crop-stage:hover .pp-crop-guides { opacity: 1; }
.pp-crop-mask { position: absolute; inset: 0; pointer-events: none; border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(6, 20, 14, 0.5);
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: -2px; }
.pp-crop-zoom { display: flex; align-items: center; gap: 12px; margin: 14px 4px 4px; }
.pp-crop-zoomrange { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: #e4ece8; outline: none; }
.pp-crop-zoomrange::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--pp-emerald, #16a34a); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(10, 60, 40, 0.4); cursor: pointer; }
.pp-crop-zoomrange::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--pp-emerald, #16a34a); border: 3px solid #fff; cursor: pointer; }
.pp-crop-zoomtrack { position: relative; flex: 1; height: 6px; border-radius: 3px; background: #e4ece8; }
.pp-crop-zoomdot { position: absolute; top: 50%; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--pp-emerald, #16a34a); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(10, 60, 40, 0.4); transition: left 0.12s ease; }
.pp-crop-hint { text-align: center; margin: 8px 0 14px; }
.pp-crop-actions { display: flex; gap: 10px; }
.pp-crop-actions .pp-btn-ghost { flex: 1; }
.pp-crop-actions .pp-btn-primary { flex: 1.4; }

/* edit page — read-only email row + dirty-state save (blueprint §6-7) */
.pp-field-ro { display: block; }
.pp-field-ro span { display: flex; align-items: center; gap: 8px; }
.pp-ro-chip { font-size: 10.5px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: #7a9488; background: #eef3f0; border-radius: 999px; padding: 3px 8px; font-style: normal; }
.pp-ro-value { margin-top: 7px; padding: 11px 13px; border-radius: 12px; background: #f4f7f5; border: 1px dashed #d4e0d9; font-size: 13.5px; color: #48604f; word-break: break-all; }
.pp-edit-dirty { text-align: center; color: #7a9488; }
.pp-edit-save.pp-save-idle { opacity: 0.55; }
.pp-edit-save.pp-save-dirty { box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35); }

/* journey — subtle unlock animation, reduced-motion respected (§14) */
@keyframes pp-milestone-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.pp-jm.on .pp-jm-dot { animation: pp-milestone-pop 0.45s ease-out both; }
.pp-jm.on small { animation: pp-fade-up 0.5s ease-out both; }
@keyframes pp-fade-up { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pp-jm.on .pp-jm-dot, .pp-jm.on small { animation: none; }
  .pp-ach-bar i { transition: none; }
  .pp-crop-zoomdot { transition: none; }
}

/* ============================================================
   GLOBAL APPEARANCE (blueprint §18) — light / dark / system /
   Premium Green. Follows <html data-theme> (AhAppearance engine).
   ============================================================ */
[data-theme="green"] {
  --pp-emerald: #0b5f43;
  --pp-emerald-deep: #094a35;
  --pp-emerald-soft: #d9f2e4;
  --pp-emerald-mid: #bfe8d2;
  --pp-ink: #0e2b20;
  --pp-line: rgba(14, 43, 32, 0.12);
  --pp-card: #ffffff;
  --pp-soft: #f0faf4;
  --pp-input: #ffffff;
  --pp-fine: #51705f;
}
[data-theme="dark"] {
  --pp-emerald: #22c55e;
  --pp-emerald-deep: #4ade80;
  --pp-emerald-soft: #14332a;
  --pp-emerald-mid: #1d4a3a;
  --pp-ink: #e8f4ef;
  --pp-line: rgba(232, 244, 239, 0.14);
  --pp-card: #182420;
  --pp-soft: #141d19;
  --pp-input: #101915;
  --pp-fine: #8fa8a0;
}
[data-theme="dark"] .pp-card,
[data-theme="dark"] .pp-stats,
[data-theme="dark"] .pp-sheet,
[data-theme="dark"] .pp-modal,
[data-theme="dark"] .pp-crop { background: var(--pp-card); }
[data-theme="dark"] .pp-hero {
  background: linear-gradient(160deg, #10231b 0%, #0d1f18 48%, #0a1a13 100%);
  color: #e8f4ef;
  border-color: rgba(34, 197, 94, 0.22);
}
[data-theme="dark"] .pp-hero-name { color: #f2fbf6; }
[data-theme="dark"] .pp-hero-idblock small,
[data-theme="dark"] .pp-hero-chip,
[data-theme="dark"] .pp-hero-line,
[data-theme="dark"] .pp-hero-bio { color: #9fc3b2; }
[data-theme="dark"] .pp-hero-chip { background: rgba(255, 255, 255, 0.08); border-color: rgba(34, 197, 94, 0.35); }
[data-theme="dark"] .pp-kicker { color: #4ade80; }
[data-theme="dark"] .pp-value,
[data-theme="dark"] .pp-hint { color: var(--pp-ink); }
[data-theme="dark"] .pp-fine { color: var(--pp-fine); }
[data-theme="dark"] .pp-field input,
[data-theme="dark"] .pp-field textarea,
[data-theme="dark"] .pp-ro-value { background: var(--pp-input); color: var(--pp-ink); border-color: rgba(232, 244, 239, 0.18); }
[data-theme="dark"] .pp-field span { color: var(--pp-ink); }
[data-theme="dark"] .pp-vopt { background: var(--pp-card); }
[data-theme="dark"] .pp-vopt small { color: var(--pp-fine); }
[data-theme="dark"] .pp-ach-row { background: var(--pp-soft); }
[data-theme="dark"] .pp-ach-row.on { background: rgba(34, 197, 94, 0.14); }
[data-theme="dark"] .pp-ach-ic { background: var(--pp-card); }
[data-theme="dark"] .pp-ach-bar { background: #22352d; }
[data-theme="dark"] .pp-jm-dot { background: var(--pp-card); }
[data-theme="dark"] .pp-select-wrap select { background: var(--pp-input); color: var(--pp-ink); }
[data-theme="dark"] .pp-acad-ulist { background: var(--pp-card); border-color: var(--pp-line); }
[data-theme="dark"] .pp-acad-uitem { color: var(--pp-ink); border-bottom-color: #1d2b24; }
[data-theme="dark"] .pp-acad-uitem:hover, [data-theme="dark"] .pp-acad-uitem:active { background: #16241d; }
[data-theme="dark"] .pp-acad-addrow-multi select { background: var(--pp-input); color: var(--pp-ink); }
[data-theme="dark"] .pp-acad-subj { background: var(--pp-input); color: var(--pp-ink); border-color: var(--pp-line); }
[data-theme="dark"] .pp-acad-subj:has(input:checked) { background: #16241d; border-color: var(--pp-emerald); }
[data-theme="dark"] .pp-guest-google { background: #101915; color: #f2f2f0; border-color: #2d3d35; }
[data-theme="dark"] .pp-guest-duo-btn,
[data-theme="dark"] .pp-btn-outline { background: #101915; color: #4ade80; border-color: #1d5c43; }
[data-theme="dark"] .pp-toast { background: #1d2c25; color: #e8f4ef; }
[data-theme="dark"] .pp-bio-count { color: var(--pp-fine); }
[data-theme="dark"] .pp-card-head { border-color: var(--pp-line); }
[data-theme="dark"] .pp-journey-track .pp-jm small { color: var(--pp-fine); }
[data-theme="dark"] .pp-comp .pp-ring circle { stroke: #22352d; }
/* ============================================================
   POLISH PASS (owner report)
   1. Completion checklist must read as part of the card, not as
      loose rows escaping below it.
   2. Inputs/buttons: consistent radius, height and focus ring across
      profile, academic and edit surfaces.
   3. Suggestion dropdown sits above surrounding cards and scrolls on
      short screens.
   ============================================================ */

/* 1 — completion card containment */
.card.pp-comp {
  border-radius: 18px;
  padding: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 10px rgba(15, 107, 79, 0.06);
}
.pp-comp .pp-comp-row { align-items: flex-start; }
.pp-comp .pp-comp-steps {
  margin: 14px -18px -18px;
  padding: 12px 18px 14px;
  gap: 8px;
  border-top: 1px solid var(--pp-line);
  background: var(--pp-soft);
  list-style: none;
}
.pp-comp .pp-comp-steps li { margin: 0; }
.pp-comp .pp-comp-step {
  border-radius: 12px;
  border: 1px solid var(--pp-line);
  background: var(--pp-card);
  padding: 11px 12px;
  font-weight: 700;
  min-height: 44px;
  box-sizing: border-box;
}
.pp-comp .pp-comp-step:hover { border-color: rgba(22, 163, 74, 0.4); background: var(--pp-emerald-soft); }
.pp-comp .pp-comp-cta { min-height: 40px; padding: 0; }

/* 2 — unified control sizing */
.pp-field input,
.pp-field textarea,
.pp-edit .pp-field input,
.pp-edit .pp-field textarea,
.pp-acad-addrow input,
.pp-acad-addrow-multi select,
.pp-select-wrap select,
.pp-acad-sec input,
.pp-acad-sec select {
  min-height: 46px;
  border-radius: 13px;
  font-size: 15px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.pp-field textarea,
.pp-edit .pp-field textarea { min-height: 96px; padding: 12px; }
.pp-field input:focus,
.pp-field textarea:focus,
.pp-edit .pp-field input:focus,
.pp-edit .pp-field textarea:focus,
.pp-acad-addrow input:focus,
.pp-acad-addrow-multi select:focus,
.pp-select-wrap select:focus {
  border-color: var(--pp-emerald);
  box-shadow: 0 0 0 3px rgba(15, 107, 79, 0.14);
}
.pp-btn-primary,
.pp-btn-secondary,
.pp-btn-ghost { border-radius: 13px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease; }
.pp-btn-primary:not(:disabled):hover { box-shadow: 0 6px 18px rgba(15, 107, 79, 0.22); }
.pp-btn-primary:not(:disabled):active,
.pp-btn-secondary:active,
.pp-btn-ghost:active { transform: translateY(1px); }
.pp-acad-addrow .pp-btn-secondary,
.pp-acad-addrow-multi .pp-btn-secondary { min-height: 46px; border-radius: 13px; }
.pp-card-edit { min-height: 32px; display: inline-flex; align-items: center; }

/* 3 — suggestion list layering */
.pp-acad-ulist { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; }
.pp-acad-ulist[hidden] { display: none; }

[data-theme="dark"] .card.pp-comp { background: var(--pp-card); }
[data-theme="dark"] .pp-comp .pp-comp-steps { background: #16211c; border-top-color: var(--pp-line); }
[data-theme="dark"] .pp-comp .pp-comp-step { background: #1b2721; border-color: rgba(255, 255, 255, 0.12); color: #e6f2ec; }
[data-theme="dark"] .pp-field input:focus,
[data-theme="dark"] .pp-field textarea:focus,
[data-theme="dark"] .pp-acad-addrow input:focus,
[data-theme="dark"] .pp-acad-addrow-multi select:focus { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
