/* =========================================================
   MatchMate — панель «Задания и поинты».
   Подключается последней на profile.html. Разметку и логику
   не трогает: только оформление существующих классов.
   ========================================================= */

html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show{--t-line:rgba(255,255,255,.09) !important; --t-line-soft:rgba(255,255,255,.06) !important; --t-text:#eaf1ff !important; --t-dim:#93a5be !important; --t-accent:#3fd7f5 !important; --t-grad:linear-gradient(135deg,#48dcf7 0%,#6f7bff 60%,#9a63ff 100%) !important; position:fixed !important; inset:0 !important; z-index:1300 !important; align-items:center !important; justify-content:center !important; padding:76px 16px 90px !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .modal-backdrop{position:absolute !important; inset:0 !important; background:rgba(2,4,10,.8) !important; backdrop-filter:blur(8px) !important; -webkit-backdrop-filter:blur(8px) !important;}

html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-dialog{position:relative !important; z-index:2 !important; width:100% !important; max-width:640px !important; max-height:100% !important; display:flex !important; flex-direction:column !important; padding:22px !important; border-radius:20px !important; background:linear-gradient(180deg,rgba(16,22,38,.98),rgba(8,11,20,.99)) !important; border:1px solid rgba(255,255,255,.1) !important; box-shadow:0 34px 80px rgba(0,0,0,.6) !important; overflow:hidden !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .modal-close{position:absolute !important; top:16px !important; right:16px !important; width:34px !important; height:34px !important; display:grid !important; place-items:center !important; padding:0 !important; border-radius:10px !important; background:rgba(255,255,255,.05) !important; border:1px solid var(--t-line-soft) !important; color:var(--t-dim) !important; font-size:14px !important; line-height:1 !important; cursor:pointer !important; box-shadow:none !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .modal-close:hover{background:rgba(255,255,255,.1) !important; color:var(--t-text) !important;}

/* шапка */
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-head{flex:none !important; padding:0 46px 0 0 !important; margin:0 0 16px !important; border:0 !important; background:none !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-kicker{display:inline-block !important; margin:0 0 7px !important; padding:4px 10px !important; border-radius:999px !important; background:rgba(63,215,245,.12) !important; border:1px solid rgba(63,215,245,.24) !important; color:#9ce8fb !important; font-size:10.5px !important; font-weight:800 !important; letter-spacing:.14em !important; text-transform:uppercase !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-head h3{margin:0 0 5px !important; font-size:22px !important; font-weight:800 !important; letter-spacing:-.02em !important; color:var(--t-text) !important; background:none !important; -webkit-text-fill-color:currentColor !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-head p{margin:0 !important; font-size:13.5px !important; line-height:1.45 !important; color:var(--t-dim) !important;}

/* сводка */
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-summary{flex:none !important; display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:10px !important; margin:0 0 12px !important; padding:0 !important; background:none !important; border:0 !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card{display:flex !important; flex-direction:column !important; gap:6px !important; padding:13px 14px !important; border-radius:13px !important; background:rgba(255,255,255,.04) !important; border:1px solid var(--t-line-soft) !important; box-shadow:none !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card span{display:flex !important; align-items:center !important; gap:7px !important; font-size:10.5px !important; font-weight:800 !important; letter-spacing:.12em !important; text-transform:uppercase !important; color:var(--t-dim) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .summary-ico{display:grid !important; place-items:center !important; width:16px !important; height:16px !important; flex:none !important; background:none !important; border:0 !important; padding:0 !important; margin:0 !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .summary-ico svg{width:15px !important; height:15px !important; fill:var(--t-dim) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card strong{font-size:22px !important; font-weight:800 !important; letter-spacing:-.02em !important; color:var(--t-text) !important; background:none !important; -webkit-text-fill-color:currentColor !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card.is-balance strong{background:var(--t-grad) !important; -webkit-background-clip:text !important; background-clip:text !important; color:transparent !important; -webkit-text-fill-color:transparent !important;}

html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-progress{flex:none !important; height:4px !important; margin:0 0 14px !important; border-radius:999px !important; background:rgba(255,255,255,.07) !important; overflow:hidden !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-progress i{display:block !important; height:100% !important; border-radius:999px !important; background:var(--t-grad) !important;}

/* список заданий */
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-list{flex:1 !important; min-height:0 !important; overflow-y:auto !important; display:grid !important; gap:9px !important; padding:2px !important; margin:0 !important; background:none !important; border:0 !important; scrollbar-width:thin !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-list::-webkit-scrollbar{width:7px !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-list::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12) !important; border-radius:7px !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-state{padding:32px 16px !important; text-align:center !important; color:var(--t-dim) !important; font-size:14px !important;}

html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card{display:grid !important; grid-template-columns:auto minmax(0,1fr) auto !important; align-items:center !important; gap:14px !important; padding:13px 14px !important; border-radius:14px !important; background:rgba(255,255,255,.04) !important; border:1px solid var(--t-line-soft) !important; box-shadow:none !important; transition:border-color .16s ease,background .16s ease !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card:hover{background:rgba(255,255,255,.06) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card.is-ready{border-color:rgba(63,215,245,.34) !important; background:rgba(63,215,245,.07) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card.is-claimed{opacity:.62 !important;}

html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-icon{display:grid !important; place-items:center !important; width:40px !important; height:40px !important; flex:none !important; border-radius:12px !important; background:rgba(255,255,255,.05) !important; border:1px solid var(--t-line-soft) !important; color:var(--t-dim) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-icon svg{width:19px !important; height:19px !important; fill:currentColor !important; stroke:none !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card.is-ready .task-icon{background:rgba(63,215,245,.14) !important; border-color:rgba(63,215,245,.3) !important; color:var(--t-accent) !important;}

html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-main{min-width:0 !important; display:grid !important; gap:5px !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-title-row{display:flex !important; align-items:center !important; justify-content:space-between !important; gap:10px !important; flex-wrap:wrap !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-title-row h4{margin:0 !important; font-size:14.5px !important; font-weight:700 !important; line-height:1.3 !important; color:var(--t-text) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-title-badges{display:flex !important; align-items:center !important; gap:7px !important; flex:none !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-state-pill{padding:3px 9px !important; border-radius:999px !important; background:rgba(255,255,255,.05) !important; border:1px solid var(--t-line-soft) !important; color:var(--t-dim) !important; font-size:10.5px !important; font-weight:700 !important; white-space:nowrap !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card.is-ready .task-state-pill{background:rgba(63,215,245,.14) !important; border-color:rgba(63,215,245,.28) !important; color:#9ce8fb !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-reward{padding:3px 9px !important; border-radius:999px !important; background:rgba(255,196,84,.12) !important; border:1px solid rgba(255,196,84,.26) !important; color:#ffc454 !important; font-size:11.5px !important; font-weight:800 !important; white-space:nowrap !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-main p{margin:0 !important; font-size:12.5px !important; line-height:1.4 !important; color:var(--t-dim) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-meta{display:flex !important; align-items:center !important; gap:8px !important; font-size:11.5px !important; font-weight:600 !important; color:var(--t-dim) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-meta span{padding:2px 8px !important; border-radius:999px !important; background:rgba(255,255,255,.04) !important; border:1px solid var(--t-line-soft) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-progress{height:4px !important; margin-top:2px !important; border-radius:999px !important; background:rgba(255,255,255,.07) !important; overflow:hidden !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-progress i{display:block !important; height:100% !important; border-radius:999px !important; background:var(--t-grad) !important;}

html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-actions{display:flex !important; align-items:center !important; gap:8px !important; flex:none !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-claim-btn,
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-open-link{display:inline-flex !important; align-items:center !important; justify-content:center !important; height:38px !important; padding:0 16px !important; border-radius:10px !important; border:1px solid var(--t-line) !important; background:rgba(255,255,255,.05) !important; color:var(--t-text) !important; font-size:13px !important; font-weight:700 !important; font-family:inherit !important; text-decoration:none !important; white-space:nowrap !important; cursor:pointer !important; box-shadow:none !important; transition:background .16s ease,border-color .16s ease !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-claim-btn:hover:not(:disabled),
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-open-link:hover{background:rgba(255,255,255,.1) !important; border-color:rgba(255,255,255,.2) !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-claim-btn.is-ready{background:var(--t-grad) !important; border-color:transparent !important; color:#04070f !important; font-weight:800 !important;}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-claim-btn:disabled{opacity:.5 !important; cursor:default !important; background:rgba(255,255,255,.04) !important;}

/* телефон */
@media (max-width:640px){html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show{padding:70px 10px 84px}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-dialog{padding:16px !important; border-radius:18px}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-head h3{font-size:19px}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-head p{font-size:12.5px}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-modal-summary{gap:7px}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card{padding:10px}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card span{font-size:9.5px !important; letter-spacing:.08em}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card strong{font-size:18px}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card{
    grid-template-columns:auto minmax(0,1fr) !important; gap:11px !important; padding:12px !important; }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-actions{
    grid-column:1 / -1 !important; justify-content:stretch !important; }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-claim-btn,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-open-link{flex:1 !important; height:36px}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-title-row h4{font-size:14px} !important;}

/* высота карточки по содержимому — иначе кнопки обрезаются */
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible !important;
}
@media (max-width:640px){
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card{
    row-gap:10px !important;
    align-items:start !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-actions{
    grid-column:1 / -1 !important;
    margin-top:2px !important;
    display:flex !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-claim-btn,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-open-link{
    flex:1 !important;width:100% !important;height:38px !important;
  }
  /* подписи сводки должны помещаться */
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card{
    min-height:0 !important;padding:11px 10px !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card span{
    font-size:9px !important;
    letter-spacing:.02em !important;
    white-space:normal !important;
    line-height:1.2 !important;
    margin-bottom:0 !important;
    gap:5px !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-summary-card strong{
    font-size:17px !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }
}

/* модификаторы карточек тоже должны тянуться по содержимому */
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card,
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card.is-claimed,
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card.is-ready{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  align-items:center !important;
  align-content:center !important;
}
@media (max-width:640px){
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card.is-claimed,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card.is-ready{
    align-items:start !important;
    align-content:start !important;
    row-gap:10px !important;
    padding:12px !important;
  }
}

/* старые стили сажают кнопки в именованную grid-область — сбрасываем */
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card{
  grid-template-areas:none !important;
  grid-template-rows:auto !important;
}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-icon,
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-main,
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-actions{
  grid-area:auto !important;
}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-actions{
  grid-row:auto !important;
  grid-column:auto !important;
}
@media (max-width:640px){
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-actions{
    grid-column:1 / -1 !important;
  }
}

/* на телефоне карточка — простая колонка, без их grid-раскладки */
@media (max-width:640px){
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card.is-claimed,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .point-task-card.is-ready{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:10px !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    padding:13px !important;
    overflow:visible !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-icon{display:none !important}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-main{
    display:flex !important;
    flex-direction:column !important;
    gap:6px !important;
    width:100% !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .task-actions{
    display:flex !important;
    width:100% !important;
    margin:0 !important;
  }
}

/* мобильная раскладка карточек — с тем же префиксом, что и десктопная */
@media (max-width:640px){
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card.is-claimed,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card.is-ready{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:10px !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    padding:13px !important;
    overflow:visible !important;
    grid-template-columns:none !important;
    grid-template-rows:none !important;
    grid-template-areas:none !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-icon{display:none !important}
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-main{
    display:flex !important;flex-direction:column !important;gap:6px !important;width:100% !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-actions{
    display:flex !important;width:100% !important;margin:0 !important;
    grid-area:auto !important;grid-column:auto !important;
  }
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-claim-btn,
  html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .task-open-link{
    flex:1 !important;width:100% !important;height:38px !important;
  }
}

/* список без grid-контекста: высота строк больше ничего не ограничивает */
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show .tasks-list{
  display:block !important;
  grid-template-rows:none !important;
  grid-auto-rows:auto !important;
}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card{
  height:fit-content !important;
  min-height:fit-content !important;
  margin:0 0 9px !important;
}
html body #profile-tasks-modal#profile-tasks-modal.tasks-modal.show #profile-tasks-list .point-task-card:last-child{
  margin-bottom:0 !important;
}
