/* RUNQUEST V37: quest-first mobile screens. Source coordinates remain from Supabase;
   route geometry is explicitly marked as reference until validated. */
.rq-quest-card{min-width:0}
.rq-quest-map-hint{position:absolute;right:9px;bottom:12px;z-index:6;border-radius:9px;padding:6px 9px;background:rgba(4,21,41,.85);color:#e9f6ff;font:750 11px/1.1 system-ui;pointer-events:none;border:1px solid rgba(138,190,244,.25)}
.rq-quest-top{display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:24px}
.rq-quest-points{display:inline-flex;align-items:baseline;gap:4px;color:#fff;font-weight:900;font-size:14px;background:#176aeb;border-radius:10px;padding:5px 8px;white-space:nowrap}
.rq-quest-points small{font-size:9px;letter-spacing:.3px;font-weight:750}
.rq-quest-meta{font-size:13px;color:#bed4ec;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:0}
.rq-quest-meta i{font-style:normal;padding:0 4px;color:#8fa8c4}
.rq-quest-accuracy{font-size:11px;color:#98bcdf;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rq-quest-body h3{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rq-quest-actions .primary{background:#176bff;color:white;font-weight:850}
.rq-quest-actions .uploadQuest{background:rgba(43,85,132,.20);border:1px solid rgba(102,162,230,.28)}
.rq-quest-actions .uploadQuest span{color:#9bb9d8}
.rq-next-quest{padding:0!important;display:flex;flex-direction:column;overflow:hidden;gap:0!important;border-radius:18px!important;cursor:pointer;border:1px solid rgba(107,160,231,.24);background:#102641}
.rq-next-map{position:relative;min-height:120px;height:140px;overflow:hidden;background:#102943}
.rq-next-map .mapTag{position:absolute;z-index:5;top:10px;left:10px;background:#09203a;border:1px solid rgba(130,181,239,.22);border-radius:8px;padding:5px 7px;color:#f1f7ff;font-size:10px;font-weight:800}
.rq-next-copy{padding:14px;display:flex;flex-direction:column;gap:7px;min-height:0}
.rq-next-copy .rq-quest-kicker{font-size:11px;color:#77bcff;font-weight:850;letter-spacing:.3px;font-style:normal}
.rq-next-copy h3{margin:0;font-size:21px;line-height:1.15;color:white}
.rq-next-copy p{margin:0;color:#b5d2ef;font-size:13px}
.rq-next-disclaimer{font-size:11px;color:#b0cae3}
.rq-next-open{margin-top:auto;min-height:44px;font-size:13px}
.nextQuest[data-open-segment]{cursor:pointer;text-align:left}
.rq-future-upload{display:none!important}
.rq-mobile-tabs[data-tabs="detail"] button:disabled{opacity:.4;pointer-events:none}
#view-segments .rq-quest-empty{min-height:160px;gap:8px}
#view-segments .rq-quest-empty button{min-height:43px;margin-top:8px}
@media (max-width:700px), (orientation:landscape) and (max-height:540px) and (pointer:coarse){
 #view-segments .segmentGrid{min-width:0}
 #view-segments #segmentsList>.rq-quest-card{height:100%;min-height:0;min-width:0;flex:1 1 0;overflow:hidden;display:flex;flex-direction:column}
 #view-segments .rq-quest-card .segmentMap{position:relative;min-height:83px;flex:1 1 0;height:auto!important;max-height:none;touch-action:manipulation}
 #view-segments .rq-quest-card .segmentMap .mapTag,#view-segments .rq-quest-card .segmentMap .speedTag,#view-segments .rq-quest-card .segmentMap .standardTag{font-size:10px;top:8px;letter-spacing:0}
 #view-segments .rq-quest-card .segmentBody{flex:0 0 auto;max-height:none!important;height:auto!important;min-height:0;overflow:visible!important;gap:4px;padding:9px 11px 11px!important;display:flex;flex-direction:column}
 #view-segments .rq-quest-card h3{font-size:clamp(16px,4.5vw,20px);margin:0;line-height:1.17;letter-spacing:-.35px;white-space:nowrap}
 #view-segments .rq-quest-card .questStatus{font-size:10px;padding:5px 8px}
 #view-segments .rq-quest-card .rq-quest-meta{font-size:12px}
 #view-segments .rq-quest-card .rq-quest-accuracy{font-size:10px;line-height:1.2;margin:0;color:#aac7e7}
 #view-segments .rq-quest-card .questRules{display:none!important}
 #view-segments .rq-quest-card .segmentActions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:4px}
 #view-segments .rq-quest-card .segmentActions>*{height:46px!important;min-height:46px!important;padding:5px 6px!important;border-radius:12px;font-size:12px!important;line-height:1.13;white-space:normal;display:flex;align-items:center;justify-content:center;flex-direction:column;min-width:0}
 #view-segments .rq-quest-card .segmentActions .uploadQuest{font-size:12px!important}
 #view-segments .rq-quest-card .segmentActions .uploadQuest span{font-size:10px!important;display:block}
 #view-segments .rq-quest-card .rq-quest-map-hint{font-size:10px;bottom:8px;right:8px;padding:5px 7px}
 #view-segments .rq-quest-card .rq-map-status{left:7px!important;top:auto!important;bottom:7px!important;max-width:54%!important;font-size:10px!important;line-height:1.2!important;max-height:32px!important;white-space:normal!important;background:rgba(4,19,37,.92)!important}
 #view-segments[data-rq-quests="next"] #nextWeekGrid>.rq-next-quest:not(.rq-page-off){display:flex;flex:1 1 0;min-height:0;overflow:hidden;justify-content:flex-start;gap:0;padding:0}
 #view-segments[data-rq-quests="next"] #nextWeekGrid>.rq-next-quest .rq-next-map{flex:1 1 0;height:auto;min-height:95px;max-height:none;width:100%}
 #view-segments[data-rq-quests="next"] #nextWeekGrid>.rq-next-quest .rq-next-copy{flex:0 0 auto;width:100%;padding:12px;gap:6px;max-height:60%}
 #view-segments[data-rq-quests="next"] .nextWeekPanel>.muted{font-size:11px}
 #questBackdrop #detailRouteNotice{font-size:12px!important;line-height:1.35!important;max-height:74px!important;overflow-y:auto!important;white-space:normal}
 #questBackdrop .detailHeader h2{white-space:normal;overflow-wrap:break-word}
 #questBackdrop .routeTools button{min-height:44px!important;font-size:12px!important}
 #questBackdrop .rq-route-summary{font-size:12px;gap:5px}
 #questBackdrop .rq-route-summary b{font-size:13px}
}
@media (max-width:700px) and (max-height:650px), (orientation:landscape) and (max-height:540px) and (pointer:coarse){
 #view-segments .pageHead{min-height:37px;max-height:40px}
 #view-segments .rq-mobile-tabs[data-tabs="quests"]{height:34px!important;min-height:34px!important}
 #view-segments .questFilters{height:34px!important;min-height:34px!important}
 #view-segments .questFilters button{min-height:34px!important}
 #view-segments .nearbyControls{height:30px;min-height:30px;max-height:30px}
 #view-segments .nearbyControls #nearbyToggle{min-height:29px;max-height:29px}
 #view-segments .rq-quest-card .segmentMap{min-height:70px}
 #view-segments .rq-quest-card .segmentBody{gap:3px;padding:7px 9px 9px!important}
 #view-segments .rq-quest-card .rq-quest-meta{font-size:11px}
 #view-segments .rq-quest-card .rq-quest-accuracy{font-size:10px}
 #view-segments .rq-quest-card .segmentActions>*{height:43px!important;min-height:43px!important}
 #view-segments .rq-pager{min-height:34px;height:34px}
 #view-segments .rq-pager button{min-height:32px;height:32px}
}
@media (max-width:700px), (orientation:landscape) and (max-height:540px) and (pointer:coarse) and (max-height:535px), (orientation:landscape) and (max-height:535px) and (pointer:coarse){
 #view-segments .rq-quest-card .rq-quest-accuracy{display:none}
 #view-segments .rq-quest-card .segmentMap{min-height:60px}
}
/* Short-device next week must retain a visible, operable route action. */
@media (max-width:700px) and (max-height:710px), (orientation:landscape) and (max-height:540px) and (pointer:coarse){
 #view-segments[data-rq-quests="next"] .nextWeekPanel{gap:5px;padding:9px!important}
 #view-segments[data-rq-quests="next"] .nextWeekPanel .panelTitle h3{font-size:15px}
 #view-segments[data-rq-quests="next"] .nextWeekPanel>.muted{display:none}
 #view-segments[data-rq-quests="next"] #nextWeekGrid>.rq-next-quest .rq-next-map{min-height:54px}
 #view-segments[data-rq-quests="next"] #nextWeekGrid>.rq-next-quest .rq-next-copy{padding:8px 10px 9px;gap:3px;max-height:none;flex:0 0 auto}
 #view-segments[data-rq-quests="next"] .rq-next-copy .rq-quest-kicker{font-size:10px}
 #view-segments[data-rq-quests="next"] .rq-next-copy h3{font-size:17px}
 #view-segments[data-rq-quests="next"] .rq-next-copy p{font-size:11px}
 #view-segments[data-rq-quests="next"] .rq-next-disclaimer{display:none}
 #view-segments[data-rq-quests="next"] .rq-next-open{min-height:39px;font-size:12px;margin-top:2px}
}
