/* ===================================================================
   חלון תושבי הקבע - "מסלול בשמיים"
   קונספט: מסך מלא של שמיים (כמו דף הבית), הדמות על ענן עם טבעת מסלול,
   בועת דיבור לצידה, והמשימות מסודרות כמסלול כרטיסים מעל עננים.
   הצבעים משתנים לפי התושב דרך data-resident (popolo / avner).
   =================================================================== */

/* ---------- טוקנים ---------- */
.quests-popup,
.quest-meet-popup {
    --rs-sky-deep: #0b3d91;
    --rs-sky-500: #2e9bff;
    --rs-sky-300: #7fd0ff;
    --rs-sky-100: #e3f5ff;
    --rs-sky-50: #f3fbff;
    --rs-ink: #17315c;
    --rs-ink-soft: #4a6288;
    --rs-hl: #ffd93b;          /* הדגשה צהובה, כמו בכותרת דף הבית */
    --rs-hl-deep: #d9a800;
    --rs-acc: #ff9a1f;         /* הצבע של התושב */
    --rs-acc-2: #ff5fa2;
    --rs-deep: #e8650c;
    --rs-glow: rgba(255, 154, 31, .45);
    --rs-ledge: #bcd9f5;
    --rs-font-display: 'Secular One', 'Rubik', system-ui, sans-serif;
    --rs-font-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    --rs-cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='60' cy='70' r='30'/%3E%3Ccircle cx='135' cy='58' r='38'/%3E%3Ccircle cx='215' cy='72' r='30'/%3E%3Ccircle cx='295' cy='58' r='40'/%3E%3Ccircle cx='370' cy='70' r='30'/%3E%3Crect y='68' width='400' height='32'/%3E%3C/g%3E%3C/svg%3E");
}

.quests-popup[data-resident="avner"],
.quest-meet-popup[data-resident="avner"] {
    --rs-hl: #d9c9ff;
    --rs-hl-deep: #7c4dff;
    --rs-acc: #7c4dff;
    --rs-acc-2: #2e9bff;
    --rs-deep: #5b2bd1;
    --rs-glow: rgba(124, 77, 255, .45);
}

/* ---------- רקע המסך: שמיים ---------- */
.quests-popup,
.quest-meet-popup {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: stretch;
    justify-content: center;
    font-family: var(--rs-font-body);
    color: var(--rs-ink);
    background: linear-gradient(180deg, #1f8bff 0%, var(--rs-sky-500) 30%, var(--rs-sky-300) 62%, var(--rs-sky-100) 100%);
    overflow: hidden;
    animation: rsFadeIn .35s ease both;
}

.quests-sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* ענני רקע שנעים לאט, כמו בדף הבית */
/* רצועת עננים בתחתית (כמו פס הגלים בדף הבית) */
.sky-band {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 150px;
}

.sky-band i {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    background: var(--rs-cloud) repeat-x 0 100% / 520px 100%;
    animation: rsBandScroll 45s linear infinite;
}

.sky-band i:nth-child(1) { height: 150px; opacity: .55; filter: hue-rotate(10deg) brightness(.97); }
.sky-band i:nth-child(2) { height: 110px; opacity: .8; animation-duration: 32s; animation-direction: reverse; }
.sky-band i:nth-child(3) { height: 70px; animation-duration: 24s; }

/* כוכבים מנצנצים (אבנר) */
.quests-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.quests-sparkles .sparkle {
    position: absolute;
    color: #fff;
    text-shadow: 0 0 12px var(--rs-acc-2);
    font-size: 20px;
    animation: rsTwinkle 2.8s ease-in-out infinite;
}

.sparkle.s1 { top: 14%; inset-inline-start: 8%; }
.sparkle.s2 { top: 26%; inset-inline-end: 10%; animation-delay: -.6s; }
.sparkle.s3 { top: 52%; inset-inline-start: 4%; animation-delay: -1.2s; }
.sparkle.s4 { top: 70%; inset-inline-end: 6%; animation-delay: -1.8s; }
.sparkle.s5 { top: 40%; inset-inline-start: 46%; animation-delay: -2.2s; }
.sparkle.s6 { top: 10%; inset-inline-start: 50%; animation-delay: -.3s; }
.sparkle.s7 { top: 84%; inset-inline-end: 32%; animation-delay: -1.5s; }
.sparkle.s8 { top: 58%; inset-inline-end: 22%; animation-delay: -2.5s; }
.sparkle.s9 { top: 30%; inset-inline-start: 80%; animation-delay: -.9s; }
.sparkle.s10 { top: 76%; inset-inline-start: 16%; animation-delay: -2s; }

/* ---------- מבנה התוכן ---------- */
.quests-content {
    position: relative;
    z-index: 2;
    width: min(1240px, 100%);
    margin: 0 auto;
    height: 100%;
    padding: 22px 30px 30px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    min-height: 0;
    animation: rsRise .6s cubic-bezier(.2, 1.15, .4, 1) both;
}

/* ---------- כותרת ---------- */
.quests-top {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.quests-kicker {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--rs-deep);
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 3px 0 var(--rs-ledge);
}

.quests-header-title {
    margin: 10px 0 0;
    font-family: var(--rs-font-display);
    font-weight: 400;
    font-size: clamp(32px, 4.6vw, 60px);
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 5px 0 rgba(11, 61, 145, .35), 0 12px 24px rgba(11, 61, 145, .25);
}

.quests-header-title em {
    font-style: normal;
    color: var(--rs-hl);
    text-shadow: 0 5px 0 var(--rs-hl-deep), 0 12px 24px rgba(11, 61, 145, .25);
}

.quests-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.quests-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
    padding: 12px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 5px 0 var(--rs-ledge), 0 14px 26px rgba(21, 60, 130, .18);
}

.quests-progress-track {
    height: 12px;
    border-radius: 999px;
    background: var(--rs-sky-100);
    overflow: hidden;
    box-shadow: inset 0 2px 3px rgba(21, 60, 130, .12);
}

.quests-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rs-acc-2), var(--rs-acc), var(--rs-hl));
    transition: width .7s cubic-bezier(.2, 1, .3, 1);
    position: relative;
    overflow: hidden;
}

.quests-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .85) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: rsShine 2.4s ease-in-out infinite;
}

.quests-progress-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--rs-ink);
}

.quests-close {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    color: var(--rs-ink);
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 5px 0 var(--rs-ledge), 0 12px 20px rgba(21, 60, 130, .2);
    transition: transform .15s ease, box-shadow .15s ease;
}

.quests-close:hover { transform: translateY(-2px) rotate(90deg); }
.quests-close:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--rs-ledge); }

/* ---------- במה: דמות + בועת דיבור ---------- */
.quests-stage {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
}

.quests-hero {
    display: flex;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}

.quest-character-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: rsCardIn .7s cubic-bezier(.2, 1.2, .4, 1) .1s both;
}

.quest-character-container {
    position: relative;
    width: min(34vw, 44vh, 440px);
    height: min(34vw, 44vh, 440px);
    display: grid;
    place-items: center;
}

/* טבעת המסלול: אליפסה תלת-ממדית שמסתובבת, עם כוכב קטן */
.quest-character-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 14px 16px rgba(11, 61, 145, .3));
    animation: rsFloat 3.6s ease-in-out infinite;
}

/* הענן שהדמות עומדת עליו */
.quest-character-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.quest-character-name {
    font-family: var(--rs-font-display);
    font-size: clamp(36px, 4vw, 52px);
    color: #fff;
    text-shadow: 0 5px 0 rgba(11, 61, 145, .35);
}

.quest-character-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--rs-deep);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 3px 0 var(--rs-ledge);
}

/* כפתור כחול-כתום תלת-ממדי כמו ה-CTA של דף הבית */
.quest-meet-me-btn {
    margin-top: 6px;
    padding: 14px 34px;
    border: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffc65c 0%, #ff9a1f 100%);
    color: #fff;
    font-family: var(--rs-font-display);
    font-size: 19px;
    cursor: pointer;
    box-shadow: 0 7px 0 var(--rs-deep), 0 14px 24px rgba(232, 101, 12, .35), inset 0 2px 0 rgba(255, 255, 255, .55);
    text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
    transition: transform .12s ease, box-shadow .12s ease;
}

.quest-meet-me-btn:hover { transform: translateY(-2px) scale(1.03); }
.quest-meet-me-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--rs-deep); }

/* בועת דיבור */
.quests-text-section {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 26px 24px;
    border-radius: 36px;
    background: #fff;
    box-shadow: 0 10px 0 var(--rs-ledge), 0 26px 44px rgba(21, 60, 130, .24);
    animation: rsPopIn .6s cubic-bezier(.2, 1.3, .4, 1) .2s both;
}

/* זנב הבועה לכיוון הדמות */
.quests-text-section::before {
    content: '';
    position: absolute;
    top: 50%;
    inset-inline-start: -14px;
    width: 30px;
    height: 30px;
    background: #fff;
    transform: translateY(-50%) rotate(45deg);
    border-radius: 6px;
    box-shadow: -4px 4px 0 -1px var(--rs-ledge);
}

.quest-dialogue-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quest-dialogue-speaker {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--rs-acc-2), var(--rs-acc));
    color: #fff;
    font-family: var(--rs-font-display);
    font-size: 20px;
    box-shadow: 0 5px 0 var(--rs-deep);
}

.quest-dialogue-dots {
    display: inline-flex;
    gap: 6px;
}

.quest-dialogue-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rs-acc);
    animation: rsDots 1.2s ease-in-out infinite;
}

.quest-dialogue-dots i:nth-child(2) { animation-delay: .15s; }
.quest-dialogue-dots i:nth-child(3) { animation-delay: .3s; }

.quest-text-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 2px;
}

.quest-select-message {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-family: var(--rs-font-display);
    font-size: 22px;
    color: var(--rs-sky-deep);
}

.quest-select-icon {
    font-size: 48px;
    animation: rsFloat 2.4s ease-in-out infinite;
}

.quest-active-text {
    font-size: clamp(20px, 1.9vw, 26px);
    line-height: 1.8;
    color: var(--rs-ink);
    white-space: pre-line;
}

.typing-cursor {
    display: inline-block;
    width: 4px;
    height: 1.1em;
    margin-inline-start: 4px;
    vertical-align: -0.2em;
    background: var(--rs-acc);
    border-radius: 2px;
    animation: rsBlink .9s steps(2, start) infinite;
}

.quest-progress-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 22px;
    background: var(--rs-sky-50);
    border: 2px solid var(--rs-sky-100);
    animation: rsRise .45s ease both;
}

.quest-progress-label-text {
    font-weight: 800;
    color: var(--rs-sky-deep);
}

.quest-progress-bar {
    height: 16px;
    border-radius: 999px;
    background: var(--rs-sky-100);
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rs-acc-2), var(--rs-acc), var(--rs-hl));
    transition: width .7s cubic-bezier(.2, 1, .3, 1);
    position: relative;
    overflow: hidden;
}

.quest-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .8) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: rsShine 2.2s ease-in-out infinite;
}

.quest-start-btn,
.quest-claim-reward-btn {
    align-self: flex-start;
    padding: 14px 34px;
    border: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffc65c 0%, #ff9a1f 100%);
    color: #fff;
    font-family: var(--rs-font-display);
    font-size: 19px;
    cursor: pointer;
    box-shadow: 0 7px 0 var(--rs-deep), 0 14px 24px rgba(232, 101, 12, .3), inset 0 2px 0 rgba(255, 255, 255, .55);
    text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
    transition: transform .12s ease, box-shadow .12s ease;
    animation: rsPopIn .5s cubic-bezier(.2, 1.4, .4, 1) both;
}

.quest-start-btn:hover,
.quest-claim-reward-btn:hover { transform: translateY(-2px) scale(1.02); }
.quest-start-btn:active,
.quest-claim-reward-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--rs-deep); }

/* ---------- מסלול המשימות ---------- */
.quests-route {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quests-route-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: var(--rs-font-display);
    font-weight: 400;
    font-size: 22px;
    color: #fff;
    text-shadow: 0 3px 0 rgba(11, 61, 145, .35);
}

.quests-chain {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px 8px 34px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

/* קו המסלול המקווקו בין הכרטיסים */
.quest-chain-item {
    position: relative;
    flex: 0 0 280px;
    display: flex;
    scroll-snap-align: start;
    animation: rsDrop .55s cubic-bezier(.2, 1.2, .4, 1) both;
}

.quest-chain-item + .quest-chain-item::before {
    content: '';
    position: absolute;
    top: 50%;
    inset-inline-start: -22px;
    width: 22px;
    border-top: 4px dashed rgba(255, 255, 255, .95);
}

.quest-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    text-align: start;
    border: 0;
    border-radius: 26px;
    background: #fff;
    color: var(--rs-ink);
    font: inherit;
    cursor: pointer;
    box-shadow: 0 7px 0 var(--rs-ledge), 0 14px 22px rgba(21, 60, 130, .16);
    transition: transform .2s cubic-bezier(.2, 1.2, .4, 1), box-shadow .2s ease;
}

.quest-step:hover:not(:disabled) {
    transform: translateY(-6px);
    box-shadow: 0 13px 0 var(--rs-ledge), 0 22px 30px rgba(21, 60, 130, .2);
}

.quest-step:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 3px 0 var(--rs-ledge);
}

.quest-step:focus-visible {
    outline: 4px solid var(--rs-hl);
    outline-offset: 4px;
}

.quest-step.is-selected {
    transform: translateY(-10px);
    box-shadow: 0 9px 0 var(--rs-acc), 0 0 0 5px rgba(255, 255, 255, .75), 0 22px 34px var(--rs-glow);
}

.quest-step-marker {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--rs-sky-500), #1565d8);
    color: #fff;
    font-family: var(--rs-font-display);
    font-size: 20px;
    box-shadow: 0 4px 0 var(--rs-sky-deep);
}

.quest-step[data-state="active"] .quest-step-marker,
.quest-step[data-state="new"] .quest-step-marker {
    background: linear-gradient(180deg, var(--rs-acc-2), var(--rs-acc));
    box-shadow: 0 4px 0 var(--rs-deep);
    animation: rsPulse 1.8s ease-in-out infinite;
}

.quest-step[data-state="done"] .quest-step-marker,
.quest-step[data-state="reward"] .quest-step-marker {
    background: linear-gradient(180deg, #3ddc84, #1fa65a);
    box-shadow: 0 4px 0 #17834a;
}

.quest-step[data-state="locked"] {
    opacity: .6;
    filter: grayscale(.7);
    cursor: not-allowed;
}

.quest-step[data-state="locked"] .quest-step-marker {
    background: #cfd9e8;
    box-shadow: 0 4px 0 #aab7cc;
    color: var(--rs-ink-soft);
}

.quest-step-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.quest-step-title {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.3;
}

.quest-step-status {
    font-size: 12px;
    font-weight: 700;
    color: var(--rs-ink-soft);
}

.quest-step[data-state="done"] .quest-step-status { color: #1fa65a; }
.quest-step[data-state="reward"] .quest-step-status { color: var(--rs-deep); }

.quest-step-bar {
    display: block;
    height: 9px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--rs-sky-100);
    overflow: hidden;
}

.quest-step-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rs-acc-2), var(--rs-acc));
    transition: width .7s cubic-bezier(.2, 1, .3, 1);
}

.quest-step-meta {
    font-size: 11px;
    font-weight: 800;
    color: var(--rs-ink-soft);
}

/* ---------- פופאפ "הכירו אותי" ---------- */
.quest-meet-popup {
    align-items: center;
    background: rgba(11, 61, 145, .45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.quest-meet-content {
    position: relative;
    width: min(480px, 100%);
    margin: auto;
    padding: 30px 28px 28px;
    border-radius: 36px;
    background: linear-gradient(180deg, #fff 0%, var(--rs-sky-50) 100%);
    box-shadow: 0 10px 0 var(--rs-ledge), 0 30px 60px rgba(11, 61, 145, .35);
    text-align: center;
    animation: rsCardIn .55s cubic-bezier(.2, 1.25, .4, 1) both;
}

.quest-meet-burst { display: none; }

.quest-meet-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--rs-ink);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--rs-ledge);
    transition: transform .15s ease;
}

.quest-meet-close:hover { transform: rotate(90deg); }

.quest-meet-avatar {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 6px;
    display: grid;
    place-items: center;
    animation: rsFloat 3.6s ease-in-out infinite;
}

.quest-meet-avatar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px dashed var(--rs-acc);
    opacity: .5;
    transform: rotateX(68deg);
    animation: rsOrbit 14s linear infinite;
}

.quest-meet-avatar img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 12px 14px rgba(11, 61, 145, .25));
}

.quest-meet-title {
    font-family: var(--rs-font-display);
    font-size: 34px;
    color: var(--rs-sky-deep);
    margin-bottom: 10px;
}

.quest-meet-quote {
    margin: 0 0 14px;
    padding: 14px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, var(--rs-hl), #ffc65c);
    color: #4a2a00;
    font-family: var(--rs-font-display);
    font-size: 19px;
    line-height: 1.5;
    box-shadow: 0 5px 0 var(--rs-hl-deep);
}

.quest-meet-description {
    margin: 0 0 14px;
    color: var(--rs-ink-soft);
    line-height: 1.75;
}

.quest-meet-warning {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 999px;
    background: #fff;
    color: var(--rs-deep);
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 0 var(--rs-ledge);
}

/* ---------- Animations ---------- */
@keyframes rsFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rsRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rsCardIn { from { opacity: 0; transform: translateY(28px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes rsPopIn { from { opacity: 0; transform: scale(.85) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rsDrop { from { opacity: 0; transform: translateY(26px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes rsFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes rsPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes rsShine { 0%, 40% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes rsDots { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
@keyframes rsBlink { to { visibility: hidden; } }
@keyframes rsBandScroll { from { background-position: 0 100%; } to { background-position: 520px 100%; } }
@keyframes rsTwinkle { 0%, 100% { opacity: .2; transform: scale(.8) rotate(0deg); } 50% { opacity: 1; transform: scale(1.2) rotate(20deg); } }
@keyframes rsBandScroll { from { background-position: 0 100%; } to { background-position: 520px 100%; } }

/* ---------- רספונסיביות ---------- */
@media (max-width: 960px) {
    .quests-content { overflow-y: auto; height: 100%; grid-template-rows: auto auto auto; }
    .quests-stage { grid-template-columns: 1fr; gap: 18px; }
    .quests-text-section::before { display: none; }
    .quest-character-container { width: 210px; height: 210px; }
    .quests-progress { min-width: 0; flex: 1; }
    .quests-top-actions { width: 100%; }
    .quest-text-content { min-height: 160px; }
}

@media (max-width: 520px) {
    .quests-popup, .quest-meet-popup { font-size: 15px; }
    .quests-content { padding: 14px 12px 12px; }
    .quests-close { width: 44px; height: 44px; flex-basis: 44px; }
    .quests-text-section { padding: 18px 16px; border-radius: 28px; }
    .quest-start-btn, .quest-claim-reward-btn, .quest-meet-me-btn { width: 100%; text-align: center; }
    .quest-chain-item { flex-basis: 220px; }
}

/* ---------- הפחתת תנועה ---------- */
@media (prefers-reduced-motion: reduce) {
    .quests-popup, .quest-meet-popup, .quests-content, .quests-text-section,
    .quest-chain-item, .quest-step, .quest-start-btn, .quest-claim-reward-btn,
    .quest-character-image, .quest-meet-me-btn, .quest-meet-avatar,
    .quest-meet-avatar::before, .quest-meet-content, .quests-sparkles .sparkle,
    .sky-band i, .typing-cursor, .quest-dialogue-dots i,
    .quest-select-icon, .quest-step[data-state="active"] .quest-step-marker,
    .quest-step[data-state="new"] .quest-step-marker, .quests-progress-fill::after,
    .quest-progress-fill::after {
        animation: none !important;
        transition: none !important;
    }
}
