/* Профиль и задания дня: плашки на главной и общее окно (web/profile.js). */

#pfChips {
  position: absolute;
  left: 0; right: 0;
  top: calc(54px + clamp(30px, 9vw, 42px) + 44px);
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  pointer-events: none;
}
@media (min-aspect-ratio: 3/4) { #pfChips { top: calc(6% + clamp(30px, 9vw, 42px) + 42px); } }
.pf-chip {
  position: relative;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px 3px 11px;
  box-sizing: border-box;
  border-radius: 20px;
  border: 1px solid rgba(255, 224, 160, 0.45);
  background: rgba(10, 12, 30, 0.7);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  color: #fff3d0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.pf-chip:active { transform: scale(0.96); }
.pf-chip svg { width: 17px; height: 17px; flex-shrink: 0; }
.pf-chip .pf-bar { position: absolute; left: 33px; right: 13px; bottom: 4px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.pf-chip .pf-bar b { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ffc15a, #ff8a3a); transition: width 0.5s ease; }
.pf-chip .pf-dot { position: absolute; top: -3px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: #ff5a3c; border: 2px solid #120c24; display: none; animation: pfPulse 1.8s ease-in-out infinite; }
.pf-chip.pf-alldone { border-color: rgba(120, 220, 140, 0.6); color: #c9f5d2; }
@keyframes pfPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .pf-chip .pf-dot { animation: none; } }

#pfSheet {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(6, 4, 18, 0.72);
  animation: pfFade 0.25s ease-out;
}
#pfSheet.out { opacity: 0; transition: opacity 0.25s ease; }
#pfSheet .pf-card {
  position: relative;
  width: 100%; max-width: 400px; max-height: 90%;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #221c3e, #141028);
  border: 1px solid rgba(255, 224, 160, 0.4); border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #f2ecd8;
  animation: pfUp 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes pfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pfUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.pf-x { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #e8dfc8; font-size: 22px; line-height: 1; cursor: pointer; }

.pf-head { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.pf-av { flex-shrink: 0; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.pf-av .av-wrap { width: 58px; height: 58px; }
.pf-av .lb-avatar { width: 58px; height: 58px; font-size: 24px; display: flex; align-items: center; justify-content: center; }
.pf-id { min-width: 0; }
.pf-name { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pf-name .lb-badge { display: inline-block; width: 22px; height: 22px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.pf-rk { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: #ffd98a; }
.pf-rk svg { width: 16px; height: 16px; }
.pf-rk b { font-size: 16px; }
.pf-rk span { font-size: 12px; color: #a99fcb; }
.pf-prog { margin: 14px 0 4px; }
.pf-prog span { display: block; margin-top: 6px; font-size: 12px; color: #b9afd8; }
.pf-pb { display: block; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.pf-pb b { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffc15a, #ff8a3a); transition: width 0.5s ease; }
.pf-pb.big { height: 9px; }
.pf-card h3 { margin: 18px 0 8px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #a99fcb; font-weight: 700; }

.pf-ql { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pf-qi { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.pf-qi.ready { border-color: rgba(255, 200, 90, 0.7); background: rgba(255, 170, 60, 0.12); }
.pf-qi.claimed { opacity: 0.6; }
.pf-qm { flex: 1; min-width: 0; }
.pf-qm > b { display: block; font-size: 14px; margin-bottom: 6px; }
.pf-qm > span { display: block; margin-top: 5px; font-size: 11.5px; color: #b9afd8; }
.pf-claim, .pf-go { flex-shrink: 0; min-width: 86px; padding: 9px 12px; border: 0; border-radius: 11px; font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.pf-claim { background: linear-gradient(180deg, #ffab45, #ea7416); color: #2a1200; box-shadow: 0 2px 0 #9a4a08; }
.pf-claim:active { transform: translateY(2px); box-shadow: none; }
.pf-claim:disabled { opacity: 0.6; }
.pf-go { background: rgba(255, 255, 255, 0.1); color: #f2ecd8; border: 1px solid rgba(255, 255, 255, 0.2); }
.pf-done { flex-shrink: 0; min-width: 86px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 700; color: #9fe0ac; }
.pf-done svg { width: 15px; height: 15px; }
.pf-bonus { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); font-size: 13px; color: #d9cfae; }
.pf-bonus svg { width: 18px; height: 18px; flex-shrink: 0; }
.pf-bonus.ok { color: #9fe0ac; background: rgba(120, 220, 140, 0.1); }

.pf-st { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pf-s { padding: 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); text-align: center; }
.pf-s b { display: block; font-size: 19px; color: #ffe3a6; }
.pf-s span { display: block; margin-top: 3px; font-size: 10.5px; line-height: 1.25; color: #b0a6d0; }
.pf-note { margin: 14px 0 0; font-size: 11.5px; line-height: 1.45; color: #8f86b4; }
.pf-toast { position: sticky; bottom: 0; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 190, 80, 0.95); color: #2a1200; font-weight: 700; font-size: 13.5px; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; }
.pf-toast.on { opacity: 1; transform: none; }
.pf-rk { flex-wrap: wrap; row-gap: 0; }
.pf-rk b { white-space: nowrap; }
.pf-rk span { flex-basis: 100%; margin-top: 1px; }
