/* ---- View tabs: centred, on the page background ---- */
.tabs-row { position: relative; display: flex; justify-content: center; align-items: center; margin-bottom: 4px; }
.tabs-row .tour-replay { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.folder-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #efead0; border-radius: 999px; }
.folder-tab { padding: 9px 24px; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8470; background: transparent; border: 0; border-radius: 999px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.folder-tab.active { color: #fff; background: var(--pink); box-shadow: 0 2px 6px rgba(221, 71, 96, 0.3); }
.folder-tab:not(.active):hover { color: var(--dark-purple); }
@media (max-width: 640px) {
    /* no room to centre the tabs AND float the tour button over the row: they sit side by side */
    .tabs-row { justify-content: space-between; flex-wrap: wrap; gap: 6px; }
    .tabs-row .tour-replay { position: static; transform: none; }
    .folder-tab { padding: 8px 8px; font-size: 0.64rem; letter-spacing: 0; }
}
@media (max-width: 400px) { .tab-lg { display: none; } }
/* cards share the page background: no white panels, no borders */
.folder-card, .plain-card { background: var(--cream); border: 0; box-shadow: none; }

/* ---- One dropdown style for everything: white panel, tick on the current choice ---- */
.s-field { border: 0; border-bottom: 1px solid #fb923c; font-weight: 700; color: #ea580c; background: transparent; outline: none; cursor: pointer; transition: all 0.2s; font-family: inherit; font-size: inherit; }
.dd-panel { position: absolute; left: 0; top: calc(100% + 8px); min-width: 15rem; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,0.14); z-index: 80; padding: 6px 0; font-size: 14px; font-weight: 500; color: #374151; line-height: 1.3; display: none; text-transform: none; letter-spacing: normal; }
.dd-panel.open { display: block; }
.dd-item { display: flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer; transition: background .12s; white-space: nowrap; }
.dd-item:hover { background: #fdf0f2; }
.dd-item.sel { color: var(--dark-purple); font-weight: 700; }
.dd-check { width: 14px; flex-shrink: 0; text-align: center; color: var(--pink); font-size: 12px; }
.dd-item .dd-chev { margin-left: auto; color: #9ca3af; font-size: 10px; padding: 4px 6px; margin-right: -6px; }
.dd-divider { border-top: 1px solid #f3f4f6; margin: 6px 0; }
.dd-sub { position: relative; }
.dd-subpanel { display: none; position: absolute; top: -6px; left: 100%; margin-left: 2px; min-width: 14rem; background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,0.14); padding: 6px 0; z-index: 81; }
.dd-sub:hover > .dd-subpanel, .dd-sub.open > .dd-subpanel { display: block; }
.dd-subpanel.flip { left: auto; right: 100%; margin-left: 0; margin-right: 2px; }
/* the sub-discipline lists (the last layer) can be long: they scroll */
.dd-leaf { max-height: min(60vh, 420px); overflow-y: auto; }
@media (max-width: 480px) {
    /* a fly-out to the right would leave a narrow screen, so it opens inline instead */
    .dd-subpanel { position: static; box-shadow: none; border: none; border-left: 2px solid #f3e8e8; border-radius: 0; margin-left: 22px; padding: 0; }
    .dd-panel { max-width: calc(100vw - 40px); }
}
.csel { position: relative; display: inline-block; }
.csel-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; background: transparent; }
.csel-btn .fa-chevron-down { font-size: 10px; opacity: .7; }
.csel-panel .csel-btn { font-size: 14px; font-weight: 700; color: #374151; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 10px; background: #fff; width: 100%; justify-content: space-between; }
.csel-panel .csel-btn:hover { border-color: #d1d5db; }
.csel-panel { display: block; }
.csel-sentence .dd-panel { min-width: 6.5rem; }
.csel-panel .dd-panel { min-width: 100%; }

/* ---- Filters button (secondary filters live behind it) ---- */
.filter-pop { position: relative; flex-shrink: 0; }
.filter-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #4b5563; background: var(--cream); border: 1px solid #e5e7eb; border-radius: 999px; padding: 6px 13px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.filter-btn:hover, .filter-pop.open .filter-btn { border-color: var(--pink); color: var(--pink); }
.filter-badge { display: none; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 800; align-items: center; justify-content: center; }
.filter-badge.on { display: inline-flex; }
.filter-panel { right: 0; left: auto; width: 17rem; padding: 12px 14px; overflow: visible; max-height: none; }
.fp-row + .fp-row { margin-top: 12px; }
.fp-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #9ca3af; margin-bottom: 5px; }
.fp-input { width: 100%; font-size: 14px; font-weight: 700; color: #374151; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 10px; background: #fff; font-family: inherit; }
.fp-input:focus { outline: none; border-color: var(--pink); }
.fp-help { font-size: 11px; color: #9ca3af; line-height: 1.35; margin-top: 5px; }

/* ---- Timeline (play + range handles, aligned under the chart's x axis) ---- */
.play-controls { position: relative; height: 50px; margin-top: 4px; }
.play-btn { position: absolute; top: 5px; left: 0; background: var(--pink); color: white; border-radius: 999px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; border: none; cursor: pointer; transition: background 0.2s; z-index: 3; }
.play-btn:hover { background: #c73550; }
.slider-container { position: absolute; top: 16px; height: 18px; left: 60px; right: 0; touch-action: none; }
.slider-track { position: absolute; top: 50%; transform: translateY(-50%); height: 4px; background: #e5e7eb; width: 100%; border-radius: 2px; }
.slider-fill { position: absolute; top: 50%; transform: translateY(-50%); height: 4px; background: var(--pink); border-radius: 2px; }
.slider-thumb { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 18px; height: 18px; background: white; border: 2px solid var(--pink); border-radius: 50%; cursor: grab; z-index: 2; touch-action: none; }
.slider-thumb:hover { transform: translate(-50%, -50%) scale(1.15); }
.slider-thumb-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 5px; font-size: 0.72rem; font-weight: 800; color: var(--dark-purple); white-space: nowrap; background: var(--cream); border: 1px solid #e6e0c4; padding: 0 6px; border-radius: 4px; pointer-events: none; }
.slider-head { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--dark-purple); z-index: 1; opacity: 0; transition: opacity .2s; pointer-events: none; }
.tr-speeds { display: flex; align-items: center; gap: 2px; margin-top: 2px; font-size: 11.5px; color: #9ca3af; }
.tr-speeds span { margin-right: 4px; font-weight: 600; }
.tr-speeds button { border: 0; background: none; color: #9ca3af; font-weight: 600; padding: 2px 6px; border-radius: 6px; cursor: pointer; transition: color .15s, background .15s; }
.tr-speeds button:hover { color: #4b5563; }
.tr-speeds button.on { color: var(--pink); font-weight: 800; background: #f1ecd2; }
.t-chip .t-val { font-weight: 800; color: #6b7280; font-size: 11px; margin-left: 2px; }

/* ---- Institution search ("for [institute]") ---- */
.picker-wrap { position: relative; display: inline-block; vertical-align: bottom; max-width: 100%; }
.picker-input { border: 0; border-bottom: 1px solid #fb923c; font-weight: 700; color: #ea580c; background: transparent; outline: none; width: 13.5rem; max-width: 100%; padding: 0 2px 1px; font-size: inherit; font-family: inherit; }
.picker-input::placeholder { color: #fdba74; font-weight: 600; }
.picker-input:focus { border-bottom-color: var(--pink); }
.picker-list { position: absolute; left: 0; top: calc(100% + 8px); width: min(440px, calc(100vw - 48px)); max-height: 380px; overflow-y: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,0.14); z-index: 70; display: none; padding: 4px; font-size: 13px; font-weight: 500; color: #374151; line-height: 1.3; }
.picker-list.open { display: block; }
.picker-filters { position: sticky; top: -4px; z-index: 2; background: #fff; display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 6px 7px; margin: -4px -4px 2px; border-bottom: 1px solid #f0eee3; }
.pf-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #6b7280; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 999px; padding: 3px 9px; cursor: pointer; user-select: none; transition: all .12s; white-space: nowrap; }
.pf-pill input { position: absolute; opacity: 0; pointer-events: none; }
.pf-pill b { font-weight: 800; color: #9ca3af; }
.pf-pill:hover { border-color: #d1d5db; }
.pf-pill.on { background: var(--pink); border-color: var(--pink); color: #fff; }
.pf-pill.on b { color: rgba(255,255,255,.85); }
.pf-pill.zero { opacity: .45; }
.picker-head { display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; padding: 6px 9px 3px; }
.picker-head button { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pink); background: none; border: 0; cursor: pointer; padding: 0; }
.picker-head button:hover { text-decoration: underline; }
.picker-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 7px; cursor: pointer; }
.picker-row.active { background: #fdf0f2; }
.picker-row .pr-main { flex: 1; min-width: 0; }
.picker-row .pr-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: #1f2937; }
.picker-row .pr-meta { font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-row .pr-share { font-weight: 800; font-size: 12px; color: #6b7280; flex-shrink: 0; }
.picker-row .pr-check { color: var(--pink); font-size: 12px; width: 14px; flex-shrink: 0; text-align: center; }
.picker-row.agg-row { border: 1px dashed #e5e7eb; margin: 2px 0 4px; }
.picker-row.agg-row .pr-name { color: var(--dark-purple); }
.pf-pill .pf-sel { font-size: 9.5px; font-weight: 700; color: var(--pink); margin-left: -2px; }
.pf-pill.on .pf-sel { color: #fff; }
.picker-head .ph-sel { font-size: 9px; font-weight: 700; letter-spacing: 0.03em; text-transform: none; color: var(--pink); margin-left: 3px; }
.picker-sub { font-size: 10px; font-weight: 600; color: #9ca3af; padding: 6px 9px 1px; }
/* the marker beside each result: a grey dot like the chart's, its colour once highlighted
   (a dashed line for an aggregate). A fresh pick replays the chart's click pop; --d is a
   negative delay so a re-render mid-animation carries on instead of restarting it. */
.pr-mark { position: relative; width: 14px; height: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pr-dot { width: 9px; height: 9px; border-radius: 999px; background: rgba(170, 170, 170, 0.55); }
.pr-dot.on { width: 12px; height: 12px; background: var(--c); border: 2px solid #000; }
.pr-dash { width: 0; height: 16px; border-left: 2.5px solid var(--c); }
.fx .pr-dot, .fx .pr-dash { animation: prPop 420ms ease-out var(--d, 0ms) both; }
.fx .pr-mark::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 999px; border: 2px solid var(--c); opacity: 0; animation: prRing 420ms ease-out var(--d, 0ms) both; }
@keyframes prPop { 0% { transform: scale(.6); } 45% { transform: scale(1.55); } 100% { transform: scale(1); } }
@keyframes prRing { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.4); opacity: 0; } }
.pr-meta { position: relative; }
.pm-flash { position: absolute; left: 0; top: 0; font-weight: inherit; color: var(--pink); opacity: 0; animation: pmOut 1800ms ease var(--d, 0ms) both; }
.fx .pm-orig { animation: pmIn 1800ms ease var(--d, 0ms) both; }
@keyframes pmOut { 0% { opacity: 0; transform: translateY(3px); } 10%, 60% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes pmIn { 0%, 60% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fx .pr-dot, .fx .pr-dash, .fx .pr-mark::after { animation: none; } }
.picker-empty { padding: 14px 10px; font-size: 12px; color: #9ca3af; font-style: italic; text-align: center; }

/* ---- Highlighted institutions: one card each, side by side, wrapping ---- */
#selectedPanel { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
#selectedPanel > :not(.sel-card) { grid-column: 1 / -1; }
.sel-card { display: flex; flex-direction: column; gap: 2px; padding: 6px 9px 7px 6px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; min-width: 0; transition: background .15s, border-color .15s; }
.sel-card:hover { background: #f6f6f7; border-color: #e1e1e4; }
.sel-top { display: flex; align-items: center; gap: 5px; }
.sel-x { width: 16px; height: 16px; border-radius: 999px; border: 0; background: #f3f4f6; color: #6b7280; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 8px; flex-shrink: 0; transition: all 0.15s; }
.sel-x:hover { background: #fee2e2; color: #dc2626; }
.sel-dot { width: 9px; height: 9px; border-radius: 999px; border: 1.5px solid #111; flex-shrink: 0; }
/* every card the same height: the name always takes two lines' room */
.sel-name { font-weight: 700; color: #1f2937; font-size: 11.5px; cursor: default; line-height: 1.2; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sel-top { align-items: flex-start; }
.sel-top .sel-x, .sel-top .sel-dot { margin-top: 1px; }
/* 16px cross + 5px gap + 9px dot + 5px gap = 35px: meta and button line up under the name */
.sel-meta { font-size: 10.5px; color: #6b7280; padding-left: 35px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-visit { align-self: stretch; display: block; text-align: center; margin-top: auto; background: var(--pink); color: #fff; font-weight: 700; font-size: 10.5px; padding: 4px 8px; border-radius: 5px; text-decoration: none; white-space: nowrap; transition: background 0.15s; }
.sel-meta + .sel-visit { margin-top: 6px; }
.sel-visit:hover { background: #c73550; text-decoration: none; }

/* ---- Tracker chips (right under the sentence) ---- */
.t-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 4px; border-radius: 999px; border: 1px solid #e5e7eb; background: #fff; font-size: 12px; font-weight: 700; color: #374151; }
.t-chip .t-dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }
.t-chip .t-dot.agg { border-radius: 2px; height: 3px; width: 14px; }
.t-chip .sel-x { width: 20px; height: 20px; }

/* ---- Chart extras ---- */
#hoverTip { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; opacity: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.13); padding: 7px 10px; font-size: 12px; max-width: 260px; will-change: transform; }
#hoverTip.wide { max-width: 440px; padding: 8px 12px; }
.tr-tip-table { border-collapse: collapse; }
.tr-tip-table td { padding: 1px 0; white-space: nowrap; color: #374151; }
.tr-tip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 6px; vertical-align: 0; }
.tr-tip-pct { font-weight: 800; text-align: right; padding-left: 16px !important; }
.tr-tip-n { color: #6b7280; font-size: 11px; text-align: right; padding-left: 12px !important; }
.chart-overlay { position: absolute; left: 0; top: 0; pointer-events: none; }
.agg-labels { position: absolute; left: 0; top: 0; right: 0; height: 0; z-index: 4; }
.agg-label { position: absolute; transform: translateX(-50%); display: inline-flex; align-items: baseline; gap: 4px; line-height: 1.4; font-size: 11px; font-weight: 700; color: var(--c); background: rgba(250,247,226,.92); border: 0; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.agg-label b { font-weight: 800; font-size: inherit; line-height: inherit; }
.agg-x { align-self: center; line-height: 1; width: 0; overflow: hidden; border: 0; background: none; color: #9ca3af; cursor: pointer; font-size: 10px; padding: 0; transition: width .12s; }
.agg-label:hover .agg-x { width: 12px; }
.agg-x:hover { color: #dc2626; }
.chart-foot { position: relative; height: 0; }
.foot-toggles { position: absolute; left: 4px; top: -21px; display: flex; align-items: center; gap: 14px; }
.lines-toggle { position: relative; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #6b7280; cursor: pointer; user-select: none; white-space: nowrap; }
@media (max-width: 420px) { .foot-toggles { top: 0; position: relative; margin-top: 4px; } }
.lines-toggle input { accent-color: var(--pink); cursor: pointer; }
.chart-caption { color: #4b5563; }

/* ---- Institute Groups: the "View institutions" toggle under each group's stem; it peeks
   its label out on hover ---- */
.grp-toggles { position: absolute; left: 0; top: 0; right: 0; height: 0; z-index: 3; }
.grp-toggle { position: absolute; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 5px; margin-top: -11px; border: 0; border-radius: 999px; background: transparent; color: #2F2549; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .15s; }
.grp-toggle i { font-size: 10px; color: var(--c); transition: transform .25s; }
.grp-toggle.open i { transform: rotate(180deg); }
.grp-toggle .gt-pct { color: var(--c); font-weight: 800; }
.grp-toggle .gt-view { font-size: 11.5px; font-weight: 500; color: #a3a3a3; margin-left: 2px; transition: color .15s; }
.grp-toggle:hover, .grp-toggle:focus-visible, .grp-toggle.open { background: var(--tint); }
.grp-toggle:hover .gt-view, .grp-toggle:focus-visible .gt-view, .grp-toggle.open .gt-view { color: var(--c); }
/* the count sits in grey brackets right after the name; hovering swaps it for
   "View all 24 institutions" / "Hide institutions" */
.grp-toggle .gt-n { margin-left: -3px; font-weight: 500; color: #a3a3a3; }
.grp-toggle .gt-view { display: none; }
.grp-toggle:hover .gt-view, .grp-toggle:focus-visible .gt-view { display: inline; }
.grp-toggle:hover .gt-n, .grp-toggle:focus-visible .gt-n { display: none; }

/* ---- States choropleth: legend in the map's bottom-right corner ---- */
.states-map-box { position: relative; }
.states-legend { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; color: #9ca3af; text-transform: uppercase; letter-spacing: .04em; pointer-events: none; }
.states-legend .sl-bar { width: 8px; height: 96px; border-radius: 999px; background: linear-gradient(to top, rgba(239, 68, 68, .85), rgba(16, 185, 129, .85)); }
.states-legend .sl-na { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.states-legend .sl-na i { width: 10px; height: 10px; border-radius: 2px; background: #ece7cf; border: 1px solid #ddd6b8; }

.state-pill { padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; border: 1px solid #e6e0c4; background: var(--cream); color: #6b7280; cursor: pointer; transition: all 0.15s; }
.state-pill.active { background: var(--dark-purple); border-color: var(--dark-purple); color: white; }
.state-pill:not(.active):hover { border-color: #c7c5b8; color: #374151; }

/* round joins/caps - sharp shapefile corners otherwise make a uniform stroke-width
   look like it bulges/thins at each vertex (miter-join artifact) */
#indiaStatesMap path { transition: stroke 0.15s ease, stroke-width 0.15s ease, fill 0.15s ease; stroke-linejoin: round; stroke-linecap: round; }
#indiaStatesMap circle { transition: r 0.12s ease; }

#statesZoomHeader { position: relative; min-height: 34px; }
#statesZoomHeader .states-back-btn { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
#statesZoomHeader .states-zoom-title { text-align: center; }

/* ---- the source line, with Save | Download at its right ---- */
.note-row { display: flex; align-items: center; gap: 10px 18px; }
.note-row .note-text { flex: 1; min-width: 0; }
@media (max-width: 640px) { .note-row { flex-wrap: wrap; } }
/* a saved chart opened for editing: its section glows for a moment, a note says so */
.edit-flash { animation: editFlash 2.4s ease-out 1; border-radius: 14px; }
@keyframes editFlash { 0%, 30% { box-shadow: 0 0 0 3px rgba(221, 71, 96, .55); } 100% { box-shadow: 0 0 0 3px rgba(221, 71, 96, 0); } }
#editToast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); z-index: 1050; background: var(--dark-purple); color: #fff; font-size: 13.5px; padding: 11px 16px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.25); opacity: 0; transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px; pointer-events: none; }
#editToast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#editToast b { color: #fea538; }
#editToast button { color: #fff; opacity: .7; font-size: 18px; line-height: 1; }

.tour-replay { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--pink); background: #fdf0f2; border: 1px solid #f9d4db; border-radius: 999px; padding: 5px 12px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.tour-replay:hover { background: #fbe1e6; }
@media (max-width: 520px) { .tour-replay { padding: 6px 8px; } }

/* ---- First-visit guided tour ---- */
#tourLayer { position: fixed; inset: 0; z-index: 1000; display: none; }
#tourLayer.on { display: block; }
#tourBlock { position: fixed; inset: 0; }
#tourSpot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(17, 12, 34, 0.58); transition: left .5s cubic-bezier(.4,0,.2,1), top .5s cubic-bezier(.4,0,.2,1), width .5s cubic-bezier(.4,0,.2,1), height .5s cubic-bezier(.4,0,.2,1); pointer-events: none; }
.tour-fx { position: fixed; pointer-events: none; transition: opacity .25s ease; }
.tour-ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid var(--c); animation: tourPulse 1.4s ease-out infinite; }
.tour-ring.r2 { animation-delay: .7s; }
@keyframes tourPulse { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.tour-guide { border-left: 2px dashed var(--c); }
.tour-arrow { width: 36px; height: 44px; margin-left: -18px; animation: tourBob .85s ease-in-out infinite alternate; transition: left .45s cubic-bezier(.4,0,.2,1), top .45s cubic-bezier(.4,0,.2,1), opacity .25s; }
.tour-arrow svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); transition: transform .3s; }
@keyframes tourBob { from { transform: translateY(0); } to { transform: translateY(var(--bob, 8px)); } }
#tourPop { position: fixed; width: min(330px, calc(100vw - 24px)); background: #fff; border-radius: 14px; padding: 15px 17px 13px; box-shadow: 0 18px 50px rgba(0,0,0,.32); transition: left .45s cubic-bezier(.4,0,.2,1), top .45s cubic-bezier(.4,0,.2,1), opacity .2s; }
#tourPop .tour-text { font-size: 14.5px; line-height: 1.5; color: #374151; font-weight: 500; }
#tourPop .tour-text b { color: #111827; }
#tourPop .tour-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; gap: 8px; }
#tourPop .tour-dots { display: flex; align-items: center; gap: 4px; }
#tourPop .tour-dots span { width: 6px; height: 6px; border-radius: 999px; background: #e5e7eb; transition: all .25s; }
#tourPop .tour-dots span.on { width: 18px; background: var(--pink); }
.tour-btn { white-space: nowrap; font-size: 12.5px; font-weight: 800; padding: 6px 14px; border-radius: 8px; border: 0; cursor: pointer; transition: background .15s; }
.tour-btn.primary { background: var(--pink); color: #fff; }
.tour-btn.primary:hover { background: #c73550; }
.tour-btn.ghost { background: transparent; color: #6b7280; padding: 6px 8px; }
.tour-btn.ghost:hover { color: #111827; }
#tourLayer.scrolling #tourSpot, #tourLayer.scrolling #tourPop, #tourLayer.scrolling .tour-arrow { transition: none; }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-arrow { animation: none; } #tourSpot, #tourPop { transition: none; } }
