.pkt-trainer-wrap,
.pkt-trainer-wrap * {
    box-sizing: border-box;
}

.pkt-trainer-wrap {
    width: 100%;
    direction: rtl;
    padding: 14px;
    font-family: Tahoma, Arial, sans-serif;
    color: #172f34;
}

.pkt-trainer-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 16px;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f3fbf8 100%);
    border: 1px solid rgba(28, 124, 119, 0.14);
    box-shadow: 0 22px 55px rgba(19, 67, 68, 0.13);
    overflow: hidden;
}

.pkt-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.pkt-kicker {
    margin: 0 0 5px;
    color: #318a7e;
    font-size: 13px;
    font-weight: 800;
}

.pkt-summary-head h2 {
    margin: 0;
    color: #102f35;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 900;
}

.pkt-level-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #e3f7f2;
    color: #126b67;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.pkt-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.pkt-stat-box {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(28, 124, 119, 0.12);
}

.pkt-stat-box span {
    display: block;
    margin-bottom: 4px;
    color: #688589;
    font-size: 12px;
    font-weight: 800;
}

.pkt-stat-box strong {
    display: block;
    color: #12383e;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 900;
}

.pkt-phone-ui {
    position: relative;
    width: 100%;
    max-width: 390px;
    min-height: 620px;
    margin: 8px auto 14px;
    padding: 22px 18px;
    border-radius: 32px;
    background: #f8fcfb;
    border: 1px solid rgba(143, 199, 184, 0.25);
    overflow: hidden;
}

.pkt-phone-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 16% 12%, rgba(116, 205, 165, 0.18) 0 11%, transparent 12%),
        radial-gradient(circle at 90% 20%, rgba(116, 205, 165, 0.14) 0 9%, transparent 10%),
        radial-gradient(circle at 13% 72%, rgba(116, 205, 165, 0.13) 0 10%, transparent 11%),
        linear-gradient(180deg, #fbfffd 0%, #f3fbf8 100%);
    opacity: 0.96;
}

.pkt-app-card {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 9px 24px rgba(33, 71, 72, 0.12);
    border: 1px solid rgba(20, 70, 70, 0.08);
}

.pkt-stage-card {
    min-height: 420px;
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.pkt-brand {
    margin-bottom: 16px;
    color: #111;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 900;
    letter-spacing: -0.4px;
}

.pkt-prep-figure {
    position: relative;
    width: 210px;
    height: 190px;
    margin: 6px auto 10px;
    display: block;
}

.pkt-person-head {
    position: absolute;
    top: 12px;
    left: 88px;
    width: 28px;
    height: 32px;
    border-radius: 48% 48% 46% 46%;
    background: #f0c3b3;
    box-shadow: inset -5px -2px 0 rgba(143, 83, 69, 0.14);
}

.pkt-person-hair {
    position: absolute;
    top: 9px;
    left: 98px;
    width: 20px;
    height: 80px;
    border-radius: 14px 14px 18px 18px;
    background: #2f2a25;
    transform: rotate(-10deg);
}

.pkt-person-body {
    position: absolute;
    top: 48px;
    left: 62px;
    width: 70px;
    height: 76px;
    border-radius: 24px 20px 18px 18px;
    background: linear-gradient(135deg, #b9e4ec, #8fc7d8);
    transform: skewX(-8deg);
}

.pkt-person-arm {
    position: absolute;
    top: 72px;
    left: 54px;
    width: 84px;
    height: 13px;
    border-radius: 999px;
    background: #8fc7d8;
    transform: rotate(15deg);
}

.pkt-person-leg {
    position: absolute;
    border-radius: 999px;
    background: #cbd9ef;
}

.pkt-person-leg-one {
    top: 121px;
    left: 84px;
    width: 82px;
    height: 17px;
    transform: rotate(2deg);
}

.pkt-person-leg-two {
    top: 136px;
    left: 133px;
    width: 58px;
    height: 16px;
    transform: rotate(25deg);
}

.pkt-chair-back {
    position: absolute;
    top: 76px;
    left: 38px;
    width: 12px;
    height: 89px;
    border-radius: 999px;
    background: #2d3133;
}

.pkt-chair-seat {
    position: absolute;
    top: 126px;
    left: 35px;
    width: 92px;
    height: 13px;
    border-radius: 999px;
    background: #2d3133;
}

.pkt-chair-leg {
    position: absolute;
    top: 133px;
    width: 9px;
    height: 56px;
    border-radius: 999px;
    background: #2d3133;
}

.pkt-chair-leg-one {
    left: 46px;
    transform: rotate(8deg);
}

.pkt-chair-leg-two {
    left: 112px;
    transform: rotate(-8deg);
}

.pkt-ring-wrap {
    display: none;
    align-items: center;
    justify-content: center;
    width: 238px;
    height: 238px;
    margin: 3px auto 12px;
}

.pkt-ring {
    --ring-degree: 0deg;
    --pkt-active: #e41035;
    width: 206px;
    height: 206px;
    border-radius: 999px;
    background: conic-gradient(var(--pkt-active) var(--ring-degree), transparent 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s linear;
}

.pkt-ring::before {
    content: '';
    position: absolute;
    width: 158px;
    height: 158px;
    border-radius: 50%;
    background: #fff;
}

.pkt-ring-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 138px;
    height: 138px;
    border-radius: 999px;
    background: #fff;
}

.pkt-phase-number {
    display: block;
    color: var(--pkt-active);
    font-size: 33px;
    line-height: 1;
    font-weight: 900;
}

.pkt-phase-word {
    display: block;
    margin-top: 6px;
    color: var(--pkt-active);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
}

.pkt-stage-card.is-rest .pkt-ring,
.pkt-stage-card.is-rest .pkt-ring-inner,
.pkt-stage-card.is-rest {
    --pkt-active: #65c957;
}

.pkt-stage-card.is-prep .pkt-ring-wrap,
.pkt-stage-card.is-complete .pkt-ring-wrap {
    display: none;
}

.pkt-stage-card.is-squeeze .pkt-prep-figure,
.pkt-stage-card.is-rest .pkt-prep-figure,
.pkt-stage-card.is-complete .pkt-prep-figure {
    display: none;
}

.pkt-stage-card.is-squeeze .pkt-ring-wrap,
.pkt-stage-card.is-rest .pkt-ring-wrap {
    display: flex;
}

.pkt-stage-card.is-complete {
    justify-content: center;
}

.pkt-stage-card.is-complete::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    margin: 22px auto 20px;
    color: #327d3f;
    font-size: 78px;
    line-height: 1;
    font-weight: 900;
}

.pkt-stage-card.is-complete .pkt-instruction-lines {
    padding: 14px 12px;
    border: 5px solid #e51517;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(229, 21, 23, 0.18);
}

.pkt-stage-card.is-complete .pkt-instruction-lines p {
    font-weight: 900;
}

.pkt-instruction-lines {
    width: 100%;
    margin-top: auto;
    text-align: center;
}

.pkt-instruction-lines p {
    margin: 3px 0;
    color: #111;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 800;
}

.pkt-instruction-lines b {
    font-weight: 900;
}

.pkt-info-card {
    margin-top: 18px;
    padding: 16px 14px 14px;
    min-height: 135px;
}

.pkt-plan-title {
    margin: 0 0 11px;
    text-align: center;
    color: #111;
    font-size: 21px;
    line-height: 1.45;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 2px 0 rgba(245, 182, 65, 0.35);
}

.pkt-phase-label {
    margin: 0 0 10px;
    text-align: center;
    color: #2b4549;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 800;
}

.pkt-time-left {
    margin-bottom: 8px;
    color: #8b9799;
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
    direction: ltr;
}

.pkt-progress {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #f2f1ef;
    overflow: hidden;
}

.pkt-progress-fill {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #f5d11d;
    transition: width 0.12s linear;
}

.pkt-session-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 14px;
}

.pkt-session-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eef9f6;
    color: #356869;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 800;
}

.pkt-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.pkt-btn {
    width: 100%;
    min-height: 52px;
    padding: 13px 14px;
    border: 0;
    border-radius: 17px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.4;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.pkt-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.pkt-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pkt-btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.pkt-btn-primary {
    background: linear-gradient(135deg, #16877f, #39b8ac);
    color: #fff;
    box-shadow: 0 10px 22px rgba(22, 135, 127, 0.25);
}

.pkt-btn-secondary {
    background: #eaf7f5;
    color: #126b67;
}

.pkt-btn-danger {
    background: #fff0ef;
    color: #b23a32;
}

.pkt-message {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.9;
    font-weight: 800;
    text-align: center;
}

.pkt-message.is-visible {
    display: block;
}

.pkt-message.is-success {
    background: #e8f8f0;
    color: #16643f;
}

.pkt-message.is-error {
    background: #fff0ef;
    color: #a9352e;
}

.pkt-message.is-info {
    background: #eef7ff;
    color: #245c85;
}

.pkt-login-notice {
    max-width: 620px;
    margin: 18px auto;
    padding: 18px;
    border-radius: 18px;
    background: #eef7ff;
    color: #245c85;
    border: 1px solid rgba(36, 92, 133, 0.16);
    font-family: Tahoma, Arial, sans-serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.9;
    text-align: center;
}

@media (min-width: 600px) {
    .pkt-trainer-wrap {
        padding: 24px;
    }

    .pkt-trainer-card {
        padding: 22px;
    }

    .pkt-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pkt-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .pkt-trainer-card {
        max-width: 760px;
    }

    .pkt-summary-head h2 {
        font-size: 30px;
    }

    .pkt-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* نسخه 2.2: فشرده‌سازی موبایل و پیام پایان تمرین */
.pkt-success-title {
    margin: 0 0 6px !important;
    color: #12383e !important;
    font-size: 18px !important;
    font-weight: 900 !important;
}

.pkt-success-text {
    margin: 0 0 12px !important;
    color: #24474d !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    font-weight: 800 !important;
}

.pkt-success-ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 40px;
    padding: 9px 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #16877f, #39b8ac);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(22, 135, 127, 0.22);
}

@media (max-width: 599px) {
    .pkt-trainer-wrap {
        padding: 6px;
    }

    .pkt-trainer-card {
        padding: 10px;
        border-radius: 20px;
    }

    .pkt-summary-head {
        margin-bottom: 8px;
        gap: 8px;
    }

    .pkt-kicker {
        margin-bottom: 2px;
        font-size: 11px;
    }

    .pkt-summary-head h2 {
        font-size: 19px;
        line-height: 1.25;
    }

    .pkt-level-pill {
        min-width: 66px;
        padding: 6px 9px;
        font-size: 11px;
    }

    .pkt-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-bottom: 8px;
    }

    .pkt-stat-box {
        padding: 7px 5px;
        border-radius: 13px;
        text-align: center;
    }

    .pkt-stat-box span {
        margin-bottom: 2px;
        font-size: 10px;
        line-height: 1.25;
    }

    .pkt-stat-box strong {
        font-size: 11px;
        line-height: 1.35;
    }

    .pkt-phone-ui {
        max-width: 340px;
        min-height: 430px;
        margin: 5px auto 8px;
        padding: 10px;
        border-radius: 22px;
    }

    .pkt-stage-card {
        min-height: 260px;
        padding: 10px 10px 8px;
        border-radius: 16px;
    }

    .pkt-brand {
        margin-bottom: 5px;
        font-size: 15px;
    }

    .pkt-prep-figure {
        width: 210px;
        height: 128px;
        margin: -2px auto 2px;
        transform: scale(0.68);
        transform-origin: top center;
    }

    .pkt-ring-wrap {
        width: 158px;
        height: 158px;
        margin: 0 auto 6px;
    }

    .pkt-ring {
        width: 146px;
        height: 146px;
    }

    .pkt-ring::before {
        width: 112px;
        height: 112px;
    }

    .pkt-ring-inner {
        width: 94px;
        height: 94px;
    }

    .pkt-phase-number {
        font-size: 27px;
    }

    .pkt-phase-word {
        margin-top: 4px;
        font-size: 11px;
    }

    .pkt-instruction-lines p {
        margin: 1px 0;
        font-size: 12px;
        line-height: 1.45;
    }

    .pkt-stage-card.is-complete::before {
        width: 50px;
        height: 50px;
        margin: 4px auto 8px;
        font-size: 46px;
    }

    .pkt-stage-card.is-complete .pkt-instruction-lines {
        padding: 8px 8px;
        border-width: 3px;
    }

    .pkt-success-title {
        font-size: 15px !important;
        margin-bottom: 4px !important;
    }

    .pkt-success-text {
        font-size: 12px !important;
        line-height: 1.55 !important;
        margin-bottom: 8px !important;
    }

    .pkt-success-ok {
        min-height: 34px;
        min-width: 78px;
        padding: 7px 16px;
        font-size: 12px;
    }

    .pkt-info-card {
        margin-top: 9px;
        padding: 9px 10px 10px;
        min-height: 88px;
        border-radius: 16px;
    }

    .pkt-plan-title {
        margin-bottom: 4px;
        font-size: 16px;
        line-height: 1.3;
        letter-spacing: 1px;
    }

    .pkt-phase-label {
        margin-bottom: 5px;
        font-size: 12px;
        line-height: 1.45;
    }

    .pkt-time-left {
        margin-bottom: 5px;
        font-size: 10px;
    }

    .pkt-progress {
        height: 6px;
    }

    .pkt-session-meta {
        display: none;
    }

    .pkt-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
        margin-top: 6px;
    }

    .pkt-btn {
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 13px;
        font-size: 13px;
    }

    .pkt-message {
        margin-top: 8px;
        padding: 9px 10px;
        border-radius: 12px;
        font-size: 12px;
        line-height: 1.6;
    }
}

/* نسخه 2.5: خواناتر کردن عددهای وضعیت تمرین */
.pkt-stat-box strong {
    font-size: 19px;
    font-weight: 950;
    letter-spacing: -0.2px;
}

.pkt-training-day-value,
.pkt-cycle-day-value,
.pkt-today-count {
    color: #0f3940;
    font-weight: 950;
}

@media (max-width: 599px) {
    .pkt-stat-box {
        padding: 9px 6px;
    }

    .pkt-stat-box span {
        font-size: 10.5px;
        font-weight: 900;
    }

    .pkt-stat-box strong {
        font-size: 14.8px;
        line-height: 1.35;
        font-weight: 950;
    }

    .pkt-today-count {
        font-size: 16px;
    }
}

/* نسخه 2.6: پنل قطعی پایان تمرین با دکمه OK روی کارت تمرین */
.pkt-complete-panel[hidden] {
    display: none !important;
}

.pkt-complete-panel {
    position: absolute;
    inset: 14px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(22, 135, 127, 0.2);
    box-shadow: 0 18px 45px rgba(19, 67, 68, 0.18);
    text-align: center;
}

.pkt-complete-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #e8f8f0;
    color: #208447;
    font-size: 56px;
    line-height: 1;
    font-weight: 950;
}

.pkt-complete-title {
    margin: 0 0 8px;
    color: #12383e;
    font-size: 22px;
    line-height: 1.45;
    font-weight: 950;
}

.pkt-complete-text {
    max-width: 280px;
    margin: 0 0 18px;
    color: #24474d;
    font-size: 15px;
    line-height: 1.9;
    font-weight: 850;
}

@media (max-width: 599px) {
    .pkt-complete-panel {
        inset: 10px;
        padding: 14px 12px;
        border-radius: 20px;
    }

    .pkt-complete-mark {
        width: 58px;
        height: 58px;
        margin-bottom: 10px;
        font-size: 44px;
    }

    .pkt-complete-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .pkt-complete-text {
        max-width: 245px;
        margin-bottom: 14px;
        font-size: 13.5px;
        line-height: 1.75;
    }
}


/* نسخه 2.7: استفاده از وکتور مرجع و پاپ‌آپ وسط صفحه */
.pkt-prep-figure {
    width: 100%;
    max-width: 270px;
    height: auto;
    margin: 4px auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pkt-prep-vector {
    display: block;
    width: 100%;
    height: auto;
    max-height: 295px;
    object-fit: contain;
}

.pkt-person-head,
.pkt-person-hair,
.pkt-person-body,
.pkt-person-arm,
.pkt-person-leg,
.pkt-chair-back,
.pkt-chair-seat,
.pkt-chair-leg {
    display: none !important;
}

.pkt-complete-panel {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(10, 26, 32, 0.38);
}

.pkt-complete-backdrop {
    position: absolute;
    inset: 0;
}

.pkt-complete-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 360px);
    padding: 22px 18px;
    border-radius: 24px;
    background: rgba(255,255,255,0.99);
    border: 2px solid rgba(22, 135, 127, 0.18);
    box-shadow: 0 22px 60px rgba(17, 52, 59, 0.22);
    text-align: center;
}

body.pkt-modal-open {
    overflow: hidden;
}

@media (max-width: 599px) {
    .pkt-prep-figure {
        max-width: 225px;
        margin: -2px auto 4px;
    }

    .pkt-prep-vector {
        max-height: 210px;
    }

    .pkt-complete-dialog {
        width: min(92vw, 320px);
        padding: 18px 14px;
        border-radius: 20px;
    }
}
