/* Nest Core components. Mobile-first, RTL-safe (logical properties). Colors come from Nest Settings via CSS variables. */
:root {
	--nest-primary: #6C3CE9;
	--nest-secondary: #FFB020;
	--nest-accent: #1FB6FF;
	--nest-bg: #F3F0FF;
	--nest-ink: #1E1650;
	--nest-muted: #6F6A8F;
	--nest-card: #fff;
	--nest-line: #ECE8FB;
	--nest-green: #22C55E;
	--nest-radius: 24px;
	--nest-shadow: 0 10px 30px -12px rgba(76, 46, 180, .25), 0 2px 6px rgba(76, 46, 180, .06);
	--nest-font: "Baloo 2", "Baloo Bhaijaan 2", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.nest-modal [hidden], .nest-page [hidden], .nest-home [hidden], .nest-reels [hidden], .nest-story-viewer [hidden] { display: none !important; }
html.nest-lock { overflow: hidden; }
.nest-home, .nest-page, .nest-feed, .nest-modal, .nest-story-viewer, .nest-reels, .nest-login { font-family: var(--nest-font); color: var(--nest-ink); }
.nest-home *, .nest-page *, .nest-modal *, .nest-story-viewer *, .nest-reels * { box-sizing: border-box; }
.nest-home h1, .nest-home h2, .nest-home h3, .nest-page h1, .nest-page h2, .nest-page h3, .nest-modal h2, .nest-modal h3 { font-family: var(--nest-font); margin: 0; line-height: 1.15; color: var(--nest-ink); }
.nest-muted { color: var(--nest-muted); }
.nest-i { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- Buttons ---------- */
.nest-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 48px; padding: .55em 1.3em; border: 0; border-radius: 999px; font: 700 1.05rem/1.1 var(--nest-font); color: #fff; text-decoration: none; cursor: pointer; background: linear-gradient(135deg, color-mix(in srgb, var(--nest-primary) 75%, #fff) 0%, var(--nest-primary) 100%); box-shadow: 0 8px 18px -8px var(--nest-primary); transition: transform .15s ease, box-shadow .15s ease, filter .15s; -webkit-tap-highlight-color: transparent; }
.nest-btn:hover { filter: brightness(1.05); transform: translateY(-1px); color: #fff; }
.nest-btn:active { transform: scale(.97); }
.nest-btn:disabled, .nest-btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
.nest-btn-block { width: 100%; }
.nest-btn-sm { min-height: 38px; padding: .3em 1em; font-size: .95rem; }
.nest-btn-ghost { background: #F1ECFF; color: var(--nest-primary); box-shadow: none; }
.nest-btn-ghost:hover { color: var(--nest-primary); }
.nest-btn-yellow { background: linear-gradient(135deg, #FFE066, var(--nest-secondary)); color: var(--nest-ink); box-shadow: 0 8px 18px -8px var(--nest-secondary); }
.nest-btn-yellow:hover { color: var(--nest-ink); }
.nest-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--nest-muted); cursor: pointer; }
.nest-icon-btn:hover { background: #F4F1FF; color: var(--nest-primary); }
.nest-file-btn { position: relative; }
.nest-file-btn input { position: absolute; inset: 0; opacity: 0; }

/* ---------- Cards & sections ---------- */
.nest-card { background: var(--nest-card); border-radius: var(--nest-radius); box-shadow: var(--nest-shadow); }
.nest-section { margin-block: 18px; }
.nest-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 12px; }
.nest-section-head h2 { font-size: 1.3rem; font-weight: 800; }
.nest-section-head a { color: var(--nest-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.nest-h2 { font-size: 1.3rem; font-weight: 800; margin: 28px 0 12px !important; }
.nest-empty { padding: 34px 20px; text-align: center; font-size: 1.1rem; color: var(--nest-muted); background: rgba(255,255,255,.7); border-radius: var(--nest-radius); border: 2px dashed var(--nest-line); grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.nest-note { font-size: .9rem; color: var(--nest-muted); background: #FBF9FF; border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.nest-spinner { display: inline-block; width: 26px; height: 26px; border: 3px solid #E4DCFF; border-top-color: var(--nest-primary); border-radius: 50%; animation: nest-spin .8s linear infinite; }
@keyframes nest-spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.nest-hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 210px; padding: 22px; border-radius: 28px; background: linear-gradient(120deg, #B9E7FF 0%, #D9C8FF 45%, #FFD6F2 100%); box-shadow: var(--nest-shadow); isolation: isolate; }
.nest-hero.has-img { background: var(--nest-hero-img) center / cover no-repeat; min-height: 240px; }
.nest-hero-copy { position: relative; z-index: 2; max-width: 360px; }
.nest-hero h1 { font-size: clamp(1.6rem, 6vw, 2.3rem); font-weight: 800; color: #2A1B8F; }
.nest-hero p { margin: 4px 0 14px; font-size: 1.1rem; color: #2A2366; }
.nest-hero-level { display: block; text-decoration: none; color: inherit; background: rgba(255,255,255,.92); border-radius: 22px; padding: 12px 16px; max-width: 260px; box-shadow: 0 10px 24px -14px rgba(42,27,143,.5); backdrop-filter: blur(6px); }
.nest-hero-art { position: absolute; inset-inline-end: -10px; inset-block: 0; width: 55%; z-index: 1; pointer-events: none; }
.nest-hero-art span { position: absolute; font-size: 3.4rem; filter: drop-shadow(0 8px 10px rgba(0,0,0,.15)); animation: nest-float 5s ease-in-out infinite; }
.nest-hero-art span:nth-child(1) { inset-inline-end: 12%; top: 10%; font-size: 5.5rem; }
.nest-hero-art span:nth-child(2) { inset-inline-end: 52%; top: 8%; animation-delay: -1s; }
.nest-hero-art span:nth-child(3) { inset-inline-end: 40%; bottom: 10%; animation-delay: -2s; }
.nest-hero-art span:nth-child(4) { inset-inline-end: 6%; bottom: 8%; font-size: 2.4rem; animation-delay: -3s; }
@keyframes nest-float { 50% { transform: translateY(-10px) rotate(-4deg); } }
@media (max-width: 520px) { .nest-hero-art { opacity: .55; } }

/* ---------- Level bar ---------- */
.nest-level-top { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.nest-level-star { font-size: 1.4rem; }
.nest-bar { height: 12px; margin: 8px 0 6px; border-radius: 999px; background: #E3DDFB; overflow: hidden; }
.nest-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFC93C, #FF8A3D 60%, #FF6FB5); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.nest-level-xp { font-size: .95rem; color: var(--nest-muted); }
.nest-level-xp b { color: var(--nest-ink); }

/* ---------- Stories row ---------- */
.nest-story-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.nest-story-row::-webkit-scrollbar { display: none; }
.nest-story { flex: none; width: 82px; text-align: center; scroll-snap-align: start; }
.nest-story > span { display: block; margin-top: 6px; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nest-story-ring { position: relative; width: 80px; height: 80px; padding: 3px; border: 0; border-radius: 50%; cursor: pointer; background: conic-gradient(from 200deg, #FFB020, #FF4FA3, #8B5CF6, #1FB6FF, #22C55E, #FFB020); transition: transform .15s; }
.nest-story-ring:active { transform: scale(.94); }
.nest-story-ring .nest-avatar { width: 100%; height: 100%; border-radius: 50%; border: 3px solid #fff; object-fit: cover; background: #fff; }
.nest-story-ring.is-seen { background: #D8D3EA; }
.nest-story-ring.is-add { background: #E8E2FF; }
.nest-story-ring.is-team { background: conic-gradient(var(--nest-primary), var(--nest-accent), var(--nest-primary)); }
.nest-story-plus { position: absolute; inset-inline-end: -2px; bottom: -2px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 3px solid #fff; background: var(--nest-green); color: #fff; font-weight: 800; font-size: 1.2rem; line-height: 1; }
.nest-story-empty { align-self: center; margin: 0; }

/* ---------- Quick actions ---------- */
.nest-quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-block: 18px; }
@media (min-width: 720px) { .nest-quick { grid-template-columns: repeat(4, 1fr); } }
.nest-qa { position: relative; display: flex; align-items: center; gap: 10px; min-height: 92px; padding: 14px 16px; border: 0; border-radius: 22px; color: #fff; font: 800 1.15rem/1.1 var(--nest-font); text-align: start; text-decoration: none; cursor: pointer; overflow: hidden; box-shadow: 0 12px 22px -14px rgba(0,0,0,.45), inset 0 -4px 0 rgba(0,0,0,.08); transition: transform .15s; }
.nest-qa:hover { transform: translateY(-2px); color: #fff; }
.nest-qa:active { transform: scale(.97); }
.nest-qa::after { content: ""; position: absolute; inset-inline-end: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,.18); }
.nest-qa-label { min-width: 0; padding-inline-end: 14px; }
@media (max-width: 420px) { .nest-qa { font-size: 1.02rem; padding: 12px; gap: 8px; } .nest-qa-ico { font-size: 2.2rem !important; } }
.nest-qa-ico { font-size: 2.6rem; filter: drop-shadow(0 6px 6px rgba(0,0,0,.2)); }
.nest-qa-arrow { position: absolute; inset-inline-end: 12px; bottom: 10px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.3); }
[dir="rtl"] .nest-qa-arrow .nest-i, [dir="rtl"] .nest-round-arrow .nest-i { transform: scaleX(-1); }
.nest-qa.is-purple { background: linear-gradient(135deg, #A47BFF, #7442E6); }
.nest-qa.is-green { background: linear-gradient(135deg, #7BE495, #2CC46B); color: #0E3B22; }
.nest-qa.is-green:hover { color: #0E3B22; }
.nest-qa.is-blue { background: linear-gradient(135deg, #7CC8FF, #3D7BFF); }
.nest-qa.is-orange { background: linear-gradient(135deg, #FFD36B, #FF9F1C); color: #4A2500; }
.nest-qa.is-orange:hover { color: #4A2500; }

/* ---------- Horizontal scroller (reels strip) ---------- */
.nest-hscroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.nest-hscroll::-webkit-scrollbar { display: none; }
.nest-reel-thumb { position: relative; flex: none; width: 128px; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: #2A1B8F; scroll-snap-align: start; box-shadow: var(--nest-shadow); }
.nest-reel-thumb img, .nest-reel-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.nest-reel-thumb strong { position: absolute; inset-inline: 0; bottom: 0; padding: 26px 10px 10px; color: #fff; font-size: .9rem; line-height: 1.15; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.nest-reel-thumb-play { position: absolute; top: 8px; inset-inline-start: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--nest-primary); }

/* ---------- Home grid ---------- */
.nest-home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.nest-home-main, .nest-home-side, .nest-feed, .nest-page { min-width: 0; }
.nest-home-side { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 900px) {
	.nest-home-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
	.nest-home-side { order: 0; position: sticky; top: 90px; }
}
.nest-side-card { padding: 16px; }
.nest-side-card h2 { font-size: 1.15rem; font-weight: 800; }
.nest-today-title { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.nest-today-ico { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 50%; background: #FFF0F6; font-size: 1.8rem; }
.nest-today-title h3 { font-size: 1.2rem; font-weight: 800; }
.nest-today-title small { color: var(--nest-primary); }
.nest-today-img { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: 14px; background: #F3EEFF; }
.nest-today-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nest-img-ph { display: grid; place-items: center; width: 100%; height: 100%; min-height: 120px; font-size: 3rem; background: linear-gradient(135deg, #EDE6FF, #FFE9F5); }
.nest-chip-xp { position: absolute; inset-inline-start: 10px; bottom: 10px; padding: 4px 12px; border-radius: 999px; background: #fff; font-weight: 800; font-size: .95rem; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.nest-chip-done { position: absolute; inset-inline-end: 10px; top: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--nest-green); color: #fff; font-weight: 800; }
.nest-chip-done.is-wait { background: var(--nest-secondary); }
.nest-chip-stock { position: absolute; inset-inline-end: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(30,22,80,.75); color: #fff; font-size: .8rem; }
.nest-progress-card { position: relative; display: block; color: inherit; text-decoration: none; }
.nest-progress-card .nest-section-head .nest-i { color: var(--nest-primary); }
.nest-round-arrow { position: absolute; inset-inline-end: 16px; bottom: 30px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #F1ECFF; color: var(--nest-primary); }
.nest-progress-card .nest-bar { margin-inline-end: 54px; }

/* ---------- Feed ---------- */
.nest-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; border-bottom: 2px solid var(--nest-line); scrollbar-width: none; }
.nest-tabs::-webkit-scrollbar { display: none; }
.nest-tab { position: relative; flex: none; padding: 10px 12px; border: 0; background: none; font: 600 1.02rem var(--nest-font); color: var(--nest-muted); cursor: pointer; }
.nest-tab.is-active { color: var(--nest-primary); font-weight: 800; }
.nest-tab.is-active::after { content: ""; position: absolute; inset-inline: 8px; bottom: -2px; height: 4px; border-radius: 4px; background: var(--nest-primary); }
.nest-feed-list { display: flex; flex-direction: column; gap: 16px; }
.nest-feed-more { display: flex; justify-content: center; padding: 18px; }
.nest-feed-more .nest-spinner { visibility: hidden; }
.nest-feed-more.is-loading .nest-spinner { visibility: visible; }
.nest-feed-more[data-more="0"] { display: none; }
.nest-post { padding: 14px; transition: opacity .3s, transform .3s; }
.nest-post.is-gone { opacity: 0; transform: scale(.96); }
.nest-post-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nest-post-author { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.nest-post-author strong { display: block; font-size: 1.1rem; }
.nest-post-author small { color: var(--nest-muted); }
.nest-avatar { border-radius: 50%; object-fit: cover; background: #EEE9FF; flex: none; }
.nest-avatar.is-team { box-shadow: 0 0 0 3px var(--nest-primary); }
.nest-team-tick { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--nest-accent); color: #fff; font-size: .7rem; vertical-align: middle; }
.nest-pending { color: #B7791F; font-style: normal; }
.nest-post-text { margin: 10px 4px; font-size: 1.1rem; line-height: 1.45; word-break: break-word; }
.nest-tag { color: var(--nest-primary); font-weight: 600; }
.nest-media { position: relative; display: grid; gap: 4px; margin-top: 10px; border-radius: 20px; overflow: hidden; background: #F3EEFF; }
.nest-media-2, .nest-media-4 { grid-template-columns: 1fr 1fr; }
.nest-media-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.nest-media-3 > :first-child { grid-row: span 2; }
.nest-media-img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; display: block; }
.nest-media-2 .nest-media-img, .nest-media-3 .nest-media-img, .nest-media-4 .nest-media-img { aspect-ratio: 1; }
.nest-video video { width: 100%; max-height: 560px; display: block; background: #000; }
.nest-media-cta { position: absolute; inset-inline: 0; bottom: 0; padding: 40px 16px 16px; background: linear-gradient(transparent, rgba(20,10,60,.75)); color: #fff; pointer-events: none; }
.nest-media-cta strong { display: block; font-size: 1.35rem; line-height: 1.15; margin-bottom: 10px; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.nest-media-cta .nest-btn { pointer-events: auto; min-height: 42px; }
.nest-post-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 10px; }
.nest-react { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 4px 10px; border: 0; border-radius: 999px; background: transparent; font: 700 1rem var(--nest-font); color: var(--nest-ink); cursor: pointer; transition: background .15s; }
.nest-react:hover { background: #F6F3FF; }
.nest-react .nest-emo { font-size: 1.35rem; filter: grayscale(.9) opacity(.7); transition: filter .2s, transform .2s; }
.nest-react.is-on .nest-emo { filter: none; }
.nest-emojis { display: inline-flex; gap: 2px; margin-inline-start: auto; }
.nest-emoji { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 1.35rem; cursor: pointer; transition: transform .15s, background .15s; }
.nest-emoji:hover { background: #F6F3FF; transform: translateY(-2px); }
.nest-emoji.is-on { background: #FFF3D6; }
.nest-emoji small { position: absolute; inset-inline-end: -2px; top: -4px; min-width: 16px; font-size: .7rem; font-weight: 800; color: var(--nest-primary); }
.is-pop .nest-emo, .nest-emoji.is-pop { animation: nest-pop .4s ease; }
@keyframes nest-pop { 40% { transform: scale(1.45); } }
@media (max-width: 420px) { .nest-emojis { margin-inline-start: 0; } .nest-post-actions > .nest-icon-btn { margin-inline-start: auto; } }

.nest-more { position: relative; }
.nest-more-menu { position: absolute; inset-inline-end: 0; top: 100%; z-index: 20; min-width: 160px; padding: 6px; background: #fff; border-radius: 16px; box-shadow: 0 16px 40px -12px rgba(30,22,80,.35); }
.nest-more-menu button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font: 600 1rem var(--nest-font); text-align: start; cursor: pointer; color: var(--nest-ink); }
.nest-more-menu button:hover { background: #F4F1FF; }

/* ---------- Pages ---------- */
.nest-page { max-width: 1100px; margin-inline: auto; }
.nest-page-head { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 20px; margin-bottom: 16px; border-radius: 28px; color: #fff; box-shadow: var(--nest-shadow); }
.nest-page-head h1 { color: inherit !important; font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 800; }
.nest-page-head p { margin: 2px 0 0; opacity: .92; font-size: 1.05rem; }
.nest-page-ico { font-size: 3rem; filter: drop-shadow(0 8px 8px rgba(0,0,0,.2)); }
.nest-page-head.is-purple { background: linear-gradient(135deg, #A47BFF, #6C3CE9); }
.nest-page-head.is-green { background: linear-gradient(135deg, #6EE7A0, #22B573); color: #073B22; }
.nest-page-head.is-blue { background: linear-gradient(135deg, #7CC8FF, #3D7BFF); }
.nest-page-head.is-orange { background: linear-gradient(135deg, #FFD36B, #FF9F1C); color: #4A2500; }
.nest-balance { margin-inline-start: auto; padding: 10px 16px; border-radius: 18px; background: rgba(255,255,255,.9); color: var(--nest-ink); text-align: center; }
.nest-balance small { display: block; color: var(--nest-muted); }
.nest-balance strong { font-size: 1.3rem; }
.nest-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: none; }
.nest-chips::-webkit-scrollbar { display: none; }
.nest-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 16px; border-radius: 999px; background: #fff; color: var(--nest-ink); font-weight: 700; text-decoration: none; box-shadow: 0 4px 12px -6px rgba(76,46,180,.3); }
.nest-chip.is-active { background: var(--nest-primary); color: #fff; }
.nest-chip.is-xp { background: #FFF4D6; }
.nest-chip.is-done { background: #DCFCE7; color: #166534; }
.nest-meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.nest-meta-chips .nest-chip { min-height: 34px; padding: 4px 12px; font-size: .95rem; }
.nest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 720px) { .nest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .nest-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nest-tile { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 22px; background: #fff; color: inherit; text-decoration: none; box-shadow: var(--nest-shadow); transition: transform .15s; }
a.nest-tile:hover { transform: translateY(-3px); color: inherit; }
.nest-tile-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #F3EEFF; margin-bottom: 4px; }
.nest-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nest-tile strong { font-size: 1.08rem; line-height: 1.2; }
.nest-tile small { color: var(--nest-muted); line-height: 1.3; }
.nest-eyebrow { color: var(--nest-primary) !important; font-weight: 700; font-size: .85rem; }
.nest-reward-card .nest-btn { margin-top: auto; }
.nest-pager { display: flex; justify-content: center; gap: 6px; margin: 20px 0; }
.nest-pager .page-numbers { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #fff; text-decoration: none; font-weight: 700; color: var(--nest-ink); }
.nest-pager .current { background: var(--nest-primary); color: #fff; }
.nest-back { display: inline-block; margin-bottom: 10px; color: var(--nest-primary); font-weight: 700; text-decoration: none; }
.nest-lead { font-size: 1.15rem; color: var(--nest-muted); }
.nest-prose { padding: 18px; font-size: 1.08rem; line-height: 1.6; }
.nest-prose h2 { font-size: 1.2rem; margin-bottom: 8px !important; }

/* Game player */
.nest-game-single h1, .nest-challenge-single h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 800; }
.nest-player { position: relative; aspect-ratio: 16 / 10; border-radius: 24px; overflow: hidden; background: #1E1650; box-shadow: var(--nest-shadow); }
@media (max-width: 600px) { .nest-player { aspect-ratio: 3 / 4; } }
.nest-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.nest-player-cover { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; cursor: pointer; background: linear-gradient(135deg, #8B5CF6, #3D7BFF); }
.nest-player-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.nest-player-btn { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 999px; background: #fff; color: var(--nest-primary); font: 800 1.4rem var(--nest-font); box-shadow: 0 14px 30px rgba(0,0,0,.3); animation: nest-pulse 1.8s ease-in-out infinite; }
@keyframes nest-pulse { 50% { transform: scale(1.06); } }
.nest-player-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }

/* Challenge */
.nest-ch-hero { border-radius: 26px; overflow: hidden; aspect-ratio: 16 / 8; margin-bottom: 14px; background: #F3EEFF; box-shadow: var(--nest-shadow); }
.nest-ch-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nest-ch-video { margin-bottom: 16px; border-radius: 22px; overflow: hidden; }
.nest-ch-video iframe, .nest-ch-video video { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; border: 0; }
.nest-ch-action { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.nest-done-banner { padding: 16px; border-radius: 20px; background: #DCFCE7; color: #166534; font-weight: 800; font-size: 1.1rem; text-align: center; }
.nest-done-banner.is-wait { background: #FFF4D6; color: #7A4B00; }

/* Profile */
.nest-profile-head { position: relative; padding: 28px 18px 20px; border-radius: 28px; text-align: center; background: var(--nest-profile-bg, linear-gradient(135deg, #C9B6FF, #9ADCFF)) center / cover; box-shadow: var(--nest-shadow); }
.nest-profile-head::before { content: ""; position: absolute; inset: 70px 0 0; border-radius: 0 0 28px 28px; background: rgba(255,255,255,.92); }
.nest-profile-head > * { position: relative; }
.nest-profile-avatar { position: relative; width: 120px; height: 120px; margin: 0 auto 8px; }
.nest-profile-avatar .nest-avatar { width: 120px; height: 120px; border: 5px solid #fff; box-shadow: var(--nest-shadow); }
.nest-frame { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); pointer-events: none; }
.nest-profile-head h1 { font-size: 1.8rem; font-weight: 800; }
.nest-bio { margin: 4px auto 10px; max-width: 420px; color: var(--nest-muted); }
.nest-profile-stats { display: flex; justify-content: center; gap: 22px; margin: 10px 0 14px; }
.nest-profile-stats span { display: flex; flex-direction: column; font-size: .9rem; color: var(--nest-muted); }
.nest-profile-stats b { font-size: 1.3rem; color: var(--nest-ink); }
.nest-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nest-profile-grid { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 760px) { .nest-profile-grid { grid-template-columns: 1fr 1fr; } }
.nest-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.nest-badge { width: 76px; text-align: center; }
.nest-badge img, .nest-badge-ph { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; object-fit: cover; background: #FFF4D6; font-size: 2rem; }
.nest-badge small { display: block; font-size: .8rem; line-height: 1.2; margin-top: 4px; }
.nest-avatar-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.nest-avatar-lib button { padding: 3px; border: 3px solid transparent; border-radius: 50%; background: #F4F1FF; cursor: pointer; }
.nest-avatar-lib button.is-on { border-color: var(--nest-primary); }
.nest-avatar-lib img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; display: block; }

/* People (search) */
.nest-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.nest-people a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 20px; background: #fff; color: inherit; text-decoration: none; box-shadow: var(--nest-shadow); text-align: center; }
.nest-people small { color: var(--nest-muted); }
.nest-search-form { display: flex; align-items: center; gap: 10px; padding: 6px 18px; margin-bottom: 16px; border-radius: 999px; background: #fff; box-shadow: var(--nest-shadow); color: var(--nest-muted); }
.nest-search-form input { flex: 1; min-width: 0; height: 52px; border: 0; background: none; font: 600 1.1rem var(--nest-font); color: var(--nest-ink); outline: none; }

/* Notifications */
.nest-notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nest-notif-list a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: #fff; color: inherit; text-decoration: none; box-shadow: var(--nest-shadow); }
.nest-notif-list .is-new a { background: #F4EFFF; box-shadow: inset 4px 0 0 var(--nest-primary), var(--nest-shadow); }
.nest-notif-list small { display: block; color: var(--nest-muted); }
.nest-notif-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: #FFF4D6; font-size: 1.4rem; }

/* Create options */
.nest-create-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.nest-create-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; border: 2px solid var(--nest-line); border-radius: 20px; background: #fff; font-family: var(--nest-font); text-align: start; cursor: pointer; color: var(--nest-ink); transition: transform .15s, border-color .15s; }
.nest-create-opt:hover { border-color: var(--nest-primary); transform: translateY(-2px); }
.nest-create-opt span { font-size: 2.2rem; }
.nest-create-opt b { font-size: 1.15rem; }
.nest-create-opt small { color: var(--nest-muted); line-height: 1.25; }
.nest-create-list .nest-create-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Modals / bottom sheets ---------- */
.nest-modal { position: fixed; inset: 0; z-index: 9990; display: flex; align-items: flex-end; justify-content: center; background: rgba(30,22,80,.45); backdrop-filter: blur(3px); animation: nest-fade .2s ease; }
.nest-modal[hidden] { display: none; }
@keyframes nest-fade { from { opacity: 0; } }
.nest-sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fff; box-shadow: 0 -20px 50px -20px rgba(30,22,80,.4); animation: nest-up .28s cubic-bezier(.2,.9,.3,1.1); }
@keyframes nest-up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 640px) { .nest-modal { align-items: center; } .nest-sheet { border-radius: 28px; } }
.nest-sheet h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 14px !important; padding-inline-end: 40px; }
.nest-sheet h3 { font-size: 1.1rem; margin-top: 8px !important; }
.nest-sheet-close { position: absolute; inset-inline-end: 12px; top: 12px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #F4F1FF; color: var(--nest-ink); cursor: pointer; }
.nest-sheet label { display: block; margin-bottom: 12px; font-weight: 700; }
.nest-sheet input[type=text], .nest-sheet textarea, .nest-sheet select, .nest-comment-form input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 2px solid var(--nest-line); border-radius: 16px; background: #FBFAFF; font: 500 1.05rem var(--nest-font); color: var(--nest-ink); outline: none; }
.nest-sheet input:focus, .nest-sheet textarea:focus, .nest-sheet select:focus { border-color: var(--nest-primary); background: #fff; }
.nest-mode-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.nest-mode-tabs button { flex: none; padding: 8px 14px; border: 0; border-radius: 999px; background: #F4F1FF; font: 700 .95rem var(--nest-font); color: var(--nest-ink); cursor: pointer; }
.nest-mode-tabs button.is-active { background: var(--nest-primary); color: #fff; }
.nest-drop { display: flex !important; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px; border: 3px dashed #D6CCFF; border-radius: 22px; background: #FBF9FF; text-align: center; cursor: pointer; transition: border-color .15s; }
.nest-drop:hover { border-color: var(--nest-primary); }
.nest-drop-ico { font-size: 2.2rem; }
.nest-drop-text { color: var(--nest-muted); font-weight: 600; }
.nest-previews { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.nest-previews img, .nest-previews video { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; }
.nest-progress { height: 10px; border-radius: 99px; background: #EEE9FF; overflow: hidden; margin: 10px 0; }
.nest-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--nest-accent), var(--nest-primary)); transition: width .2s; }
.nest-comment-list { list-style: none; margin: 0 0 12px; padding: 0; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.nest-comment-list li { display: flex; gap: 10px; align-items: flex-start; }
.nest-comment-list li > div { flex: 1; padding: 8px 12px; border-radius: 16px; background: #F7F5FF; }
.nest-comment-list p { margin: 2px 0 0; word-break: break-word; }
.nest-comment-list small { color: var(--nest-muted); }
.nest-comment-form { display: flex; gap: 8px; align-items: center; }
.nest-comment-form input { margin: 0; }
.nest-report-reasons { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Story viewer ---------- */
.nest-story-viewer { position: fixed; inset: 0; z-index: 9995; background: #0E0A24; color: #fff; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; }
.nest-story-viewer[hidden] { display: none; }
@media (min-width: 640px) { .nest-story-viewer { inset: 0; padding: 16px calc(50% - 230px); } }
.nest-sv-bars { display: flex; gap: 4px; padding: 10px 12px 6px; padding-top: calc(10px + env(safe-area-inset-top)); position: relative; z-index: 3; }
.nest-sv-bars span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; }
.nest-sv-bars i { display: block; width: 0; height: 100%; background: #fff; }
.nest-sv-bars span.is-done i { width: 100% !important; }
.nest-sv-head { display: flex; align-items: center; gap: 8px; padding: 4px 12px; position: relative; z-index: 3; }
.nest-sv-head b { font-size: 1rem; }
.nest-sv-head small { opacity: .7; margin-inline-end: auto; }
.nest-sv-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: #fff; cursor: pointer; }
.nest-sv-stage { flex: 1; display: grid; place-items: center; overflow: hidden; border-radius: 18px; }
.nest-sv-stage img, .nest-sv-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.nest-sv-caption { position: absolute; inset-inline: 0; bottom: calc(30px + env(safe-area-inset-bottom)); margin: 0; padding: 0 20px; text-align: center; font: 700 1.2rem var(--nest-font); text-shadow: 0 2px 8px rgba(0,0,0,.6); z-index: 3; pointer-events: none; }
.nest-sv-prev, .nest-sv-next { position: absolute; top: 90px; bottom: 0; width: 35%; border: 0; background: transparent; cursor: pointer; z-index: 2; }
.nest-sv-prev { inset-inline-start: 0; }
.nest-sv-next { inset-inline-end: 0; width: 65%; }

/* ---------- Reels ---------- */
.nest-reels { height: calc(100dvh - 0px); overflow-y: auto; scroll-snap-type: y mandatory; background: #0E0A24; border-radius: 0; margin-inline: auto; max-width: 520px; scrollbar-width: none; position: relative; }
.nest-reels::-webkit-scrollbar { display: none; }
.nest-reels-top { position: sticky; top: 0; z-index: 6; height: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 0 14px; }
.nest-reels-top h1 { color: #fff !important; font-size: 1.5rem; padding-top: calc(14px + env(safe-area-inset-top)); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.nest-reels-top .nest-btn { margin-top: calc(12px + env(safe-area-inset-top)); }
.nest-reel { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; }
.nest-reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nest-reel-tap { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; z-index: 1; }
.nest-reel-playicon { position: absolute; inset: 0; margin: auto; width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; opacity: 0; transition: opacity .2s; }
.nest-reel.is-paused .nest-reel-playicon { opacity: 1; }
.nest-reel-info { position: absolute; inset-inline: 0 76px; bottom: calc(100px + env(safe-area-inset-bottom)); padding: 0 16px; color: #fff; z-index: 2; text-shadow: 0 2px 8px rgba(0,0,0,.55); pointer-events: none; }
.nest-reel-info a { pointer-events: auto; }
.nest-reel-author { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.nest-reel-author .nest-avatar { border: 2px solid #fff; }
.nest-reel-info h3 { color: #fff !important; font-size: 1.25rem; margin: 8px 0 4px !important; }
.nest-reel-info p { margin: 0 0 4px; }
.nest-reel-info .nest-tag { color: #FFE27A; }
.nest-reel-rail { position: absolute; inset-inline-end: 8px; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 3; display: flex; flex-direction: column; gap: 10px; }
.nest-rail-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 60px; padding: 6px 0; border: 0; border-radius: 18px; background: rgba(0,0,0,.25); color: #fff; font: 700 .9rem var(--nest-font); cursor: pointer; backdrop-filter: blur(4px); }
.nest-rail-btn .nest-emo { font-size: 1.7rem; filter: grayscale(.6); }
.nest-rail-btn.is-on .nest-emo { filter: none; }
.nest-rail-btn.is-on { background: rgba(255,255,255,.25); }
.nest-reels-empty { margin: 120px 16px; color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }

/* ---------- Login ---------- */
.nest-login { min-height: 70vh; display: grid; place-items: center; padding: 20px; }
.nest-login-card { width: 100%; max-width: 420px; padding: 28px 22px; border-radius: 30px; background: #fff; box-shadow: var(--nest-shadow); text-align: center; }
.nest-login-card h1 { font-size: 1.8rem; font-weight: 800; margin: 10px 0 16px; }
.nest-login-card form p { text-align: start; margin: 0 0 12px; }
.nest-login-card label { font-weight: 700; display: block; }
.nest-login-card input[type=text], .nest-login-card input[type=password] { width: 100%; margin-top: 6px; padding: 12px 14px; border: 2px solid var(--nest-line); border-radius: 16px; font: 500 1.1rem var(--nest-font); }
.nest-login-card .login-remember label { font-weight: 500; }
.nest-login-card input[type=submit] { width: 100%; min-height: 52px; border: 0; border-radius: 999px; background: var(--nest-primary); color: #fff; font: 800 1.15rem var(--nest-font); cursor: pointer; }
.nest-login-links { font-size: .95rem; color: var(--nest-muted); }
.nest-logo-lg img { max-height: 70px; }

/* ---------- Toast & celebration ---------- */
.nest-toast { position: fixed; inset-inline: 16px; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 9999; max-width: 460px; margin-inline: auto; padding: 14px 18px; border-radius: 18px; background: var(--nest-ink); color: #fff; font: 700 1.05rem var(--nest-font); text-align: center; box-shadow: 0 16px 40px -10px rgba(0,0,0,.4); animation: nest-up .25s ease; }
.nest-toast.is-ok { background: linear-gradient(135deg, #7C4DFF, #5B2BD6); }
.nest-toast.is-error { background: #E5484D; }
.nest-burst { position: fixed; inset: 0; z-index: 9998; pointer-events: none; display: grid; place-items: center; }
.nest-burst span { position: absolute; font-size: 2.6rem; animation: nest-burst 1.3s ease-out forwards; --a: calc(var(--i) * 72deg); }
@keyframes nest-burst { 0% { transform: rotate(var(--a)) translateY(0) scale(.3); opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-160px) scale(1.2); opacity: 0; } }

/* ---------- Social Wall ---------- */
/* Post box — Facebook-style. Scoped selectors so theme styles can't override it. */
.nest-feed .nest-wall-composer { display: block; padding: 12px 16px 6px; margin: 0 0 14px; background: #fff; border: 0; border-radius: var(--nest-radius); box-shadow: var(--nest-shadow); }
.nest-wall-composer .nest-wc-top { display: flex; align-items: center; gap: 10px; margin: 0; }
.nest-wall-composer img.nest-wc-avatar { width: 40px !important; height: 40px !important; max-width: none; flex: 0 0 40px; border-radius: 50%; object-fit: cover; margin: 0; }
.nest-wall-composer textarea.nest-wc-input { flex: 1 1 auto; width: auto; min-width: 0; height: 42px; min-height: 42px; max-height: 220px; margin: 0; padding: 10px 16px; border: 0 !important; border-radius: 22px; background: #F0F2F5; box-shadow: none !important; font: 500 1.05rem/1.35 var(--nest-font); color: var(--nest-ink); resize: none; outline: none; overflow: hidden; cursor: pointer; transition: background .15s, border-radius .15s; }
.nest-wall-composer textarea.nest-wc-input::placeholder { color: #65676B; opacity: 1; }
.nest-wall-composer textarea.nest-wc-input:hover { background: #E4E6E9; }
.nest-wall-composer.is-open textarea.nest-wc-input { cursor: text; background: #F0F2F5; border-radius: 18px; overflow: auto; }
.nest-wall-composer .nest-wc-previews { justify-content: flex-start; margin: 10px 0 0; padding-inline-start: 50px; }
.nest-wc-thumb { position: relative; }
.nest-wc-thumb button { position: absolute; top: -6px; inset-inline-end: -6px; width: 24px; height: 24px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--nest-ink); color: #fff; font-weight: 800; line-height: 1; cursor: pointer; }
.nest-wall-composer .nest-wc-actions { display: flex; align-items: stretch; gap: 4px; margin: 12px 0 0; padding: 6px 0 0; border-top: 1px solid #E4E6EB; }
.nest-wall-composer .nest-wc-act { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 42px; margin: 0; padding: 6px 8px; border-radius: 10px; background: transparent; font: 700 1rem var(--nest-font); color: #65676B; cursor: pointer; white-space: nowrap; transition: background .15s; }
.nest-wall-composer .nest-wc-act:hover { background: #F2F2F2; }
.nest-wall-composer .nest-wc-ico { font-size: 1.35rem; line-height: 1; }
.nest-wall-composer select.nest-wc-topic { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; height: auto; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; font: 700 1rem var(--nest-font); color: #65676B; text-overflow: ellipsis; cursor: pointer; outline: none; }
.nest-wall-composer .nest-wc-post { display: none; width: 100%; min-height: 42px; margin: 8px 0 6px; padding: 8px 16px; border: 0; border-radius: 10px; background: var(--nest-primary); color: #fff; font: 800 1.05rem var(--nest-font); cursor: pointer; box-shadow: none; transition: filter .15s; }
.nest-wall-composer .nest-wc-post:hover { filter: brightness(1.08); }
.nest-wall-composer .nest-wc-post:disabled { opacity: .6; cursor: default; }
.nest-wall-composer.is-open .nest-wc-post { display: block; }
.nest-wall-composer .nest-progress { margin: 8px 0 0; }
@media (max-width: 420px) {
	.nest-feed .nest-wall-composer { padding: 10px 12px 4px; }
	.nest-wall-composer .nest-wc-act { gap: 5px; padding: 6px 4px; font-size: .92rem; }
	.nest-wall-composer select.nest-wc-topic { font-size: .92rem; }
	.nest-wall-composer .nest-wc-ico { font-size: 1.2rem; }
}
.nest-new-pill { position: sticky; top: 84px; z-index: 8; display: block; margin: 0 auto 12px; padding: 10px 20px; border: 0; border-radius: 999px; background: var(--nest-primary); color: #fff; font: 800 1rem var(--nest-font); box-shadow: 0 10px 24px -8px var(--nest-primary); cursor: pointer; animation: nest-up .3s ease; }
.nest-post.is-fresh { animation: nest-fresh .6s ease; }
@keyframes nest-fresh { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
.nest-share-btn { margin-inline-start: 2px; }
.nest-shared-label { display: block; font-style: normal; font-size: .85rem; color: var(--nest-primary); font-weight: 600; }
.nest-shared { display: block; margin: 10px 2px 0; padding: 12px; border: 2px solid var(--nest-line); border-radius: 20px; color: inherit; text-decoration: none; background: #FCFBFF; }
.nest-shared:hover { border-color: #D6CCFF; color: inherit; }
.nest-shared-head { display: flex; align-items: center; gap: 8px; }
.nest-shared-head small { color: var(--nest-muted); }
.nest-shared-text { display: block; margin: 8px 0 0; font-size: 1.02rem; }
.nest-shared-media { position: relative; display: block; margin-top: 8px; border-radius: 14px; overflow: hidden; max-height: 360px; }
.nest-shared-media img, .nest-shared-media video { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.nest-shared-gone { color: var(--nest-muted); text-align: center; }
.nest-post-comments { margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--nest-line); }
.nest-view-comments { border: 0; background: none; padding: 4px 6px; font: 700 .95rem var(--nest-font); color: var(--nest-muted); cursor: pointer; }
.nest-view-comments:hover { color: var(--nest-primary); }
.nest-inline-list { max-height: 360px; margin: 6px 0 8px; }
.nest-inline-list li.is-new > div { background: #EFE9FF; }
.nest-inline-comment { margin-top: 6px; }
.nest-inline-comment input { height: 42px; margin: 0; padding: 8px 14px; border: 2px solid var(--nest-line); border-radius: 999px; background: #FBFAFF; font: 500 1rem var(--nest-font); flex: 1; min-width: 0; outline: none; }
.nest-inline-comment input:focus { border-color: var(--nest-primary); background: #fff; }
.nest-send { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--nest-primary); color: #fff; cursor: pointer; }
.nest-send:disabled { opacity: .5; }
.nest-inline-side { display: none; }
@media (max-width: 899px) {
	.nest-home-side { display: none; }
	.nest-inline-side { display: block; }
}

/* ---------- People directory ---------- */
.nest-member-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .nest-member-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .nest-member-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.nest-member { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 14px; border-radius: 22px; background: #fff; box-shadow: var(--nest-shadow); text-align: center; }
.nest-member-link { display: flex; flex-direction: column; align-items: center; gap: 4px; color: inherit; text-decoration: none; min-width: 0; width: 100%; }
.nest-member-link b { font-size: 1.05rem; line-height: 1.2; overflow-wrap: anywhere; }
.nest-member-link small { color: var(--nest-muted); }
.nest-member .nest-avatar { box-shadow: 0 0 0 4px #F1ECFF; }
.nest-friend-ctl { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.nest-member .nest-friend-ctl { width: 100%; }
.nest-member .nest-friend-ctl .nest-btn { flex: 1 1 auto; min-height: 38px; padding: 4px 10px; font-size: .92rem; }
.nest-chip-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: #FF4D6D; color: #fff; font-size: .75rem; }
.nest-members .nest-feed-more { padding-top: 16px; }

/* ---------- Notifications ---------- */
.nest-req-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; margin-bottom: 12px; color: var(--nest-ink); font-weight: 800; text-decoration: none; background: linear-gradient(135deg, #E8F8EE, #fff); }
.nest-req-banner span { font-size: 1.4rem; color: var(--nest-primary); }
.nest-notif-list li { border-radius: 18px; background: #fff; box-shadow: var(--nest-shadow); overflow: hidden; }
.nest-notif-list li.is-new { background: #F4EFFF; box-shadow: inset 4px 0 0 var(--nest-primary), var(--nest-shadow); }
.nest-notif-list li .nest-notif-main { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: transparent; box-shadow: none; border-radius: 0; color: inherit; text-decoration: none; }
.nest-notif-who { position: relative; flex: none; }
.nest-notif-badge { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: .8rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.nest-notif-body { flex: 1; min-width: 0; line-height: 1.35; }
.nest-notif-msg b { font-weight: 800; }
.nest-notif-body small { display: block; margin-top: 2px; color: var(--nest-primary); font-weight: 600; font-size: .85rem; }
.nest-notif-list li:not(.is-new) .nest-notif-body small { color: var(--nest-muted); }
.nest-notif-thumb img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; display: block; }
.nest-notif-quote { flex: none; max-width: 34%; font-size: .85rem; color: var(--nest-muted); font-style: italic; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nest-notif-actions { padding: 0 14px 12px 74px; }
[dir="rtl"] .nest-notif-actions { padding: 0 74px 12px 14px; }
.nest-notif-actions .nest-friend-ctl { justify-content: flex-start; }
.nest-notifs .nest-feed-more { padding-top: 12px; }

/* ---------- Weekly Challenges ---------- */
.nest-weeks { display: flex; flex-direction: column; gap: 16px; }
.nest-week { padding: 18px; }
.nest-week-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.nest-week-head h2 { font-size: 1.5rem !important; font-weight: 800; margin: 2px 0 4px !important; }
.nest-week-head p { margin: 0; }
.nest-week-lock { font-size: 1.8rem; }
.nest-week-progress { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.nest-week-progress .nest-bar { flex: 1; height: 14px; margin: 0; }
.nest-week-progress .nest-bar span { background: linear-gradient(90deg, #22C55E, #7BE495); }
.nest-week-progress b { white-space: nowrap; font-size: .95rem; }
.nest-week-progress.is-mini { flex-direction: column; align-items: stretch; gap: 4px; margin: 0 0 12px; }
.nest-week-progress.is-mini .nest-bar { height: 10px; flex: none; }
.nest-days { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nest-day-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: 18px; background: #F7F5FF; color: inherit; text-decoration: none; transition: transform .15s, background .15s; }
a.nest-day-row:hover { transform: translateX(3px); color: inherit; }
[dir="rtl"] a.nest-day-row:hover { transform: translateX(-3px); }
.nest-day-num { flex: none; min-width: 58px; padding: 4px 8px; border-radius: 12px; background: #fff; font-weight: 800; font-size: .9rem; text-align: center; color: var(--nest-primary); }
.nest-day-title { flex: 1; min-width: 0; font-weight: 700; line-height: 1.25; }
.nest-day-title small { display: block; font-weight: 600; color: var(--nest-muted); font-size: .82rem; }
.nest-day-state { flex: none; font-size: 1.35rem; }
.nest-day.is-done .nest-day-row { background: #E8F8EE; }
.nest-day.is-done .nest-day-num { color: #15803D; }
.nest-day.is-open .nest-day-row { background: linear-gradient(135deg, #8B5CF6, #6C3CE9); color: #fff; box-shadow: 0 10px 22px -10px #6C3CE9; animation: nest-pulse 2.2s ease-in-out infinite; }
.nest-day.is-open .nest-day-title small { color: #E9E2FF; }
.nest-day.is-wait .nest-day-row { background: #FFF6DB; }
.nest-day.is-locked .nest-day-row { background: #F1F0F5; color: #9A97AE; }
.nest-day.is-locked .nest-day-num { color: #9A97AE; }
.nest-day.is-locked .nest-day-title { filter: blur(0); opacity: .75; }
.nest-countdown b { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.nest-countdown.is-ready b { color: #15803D; }
.nest-wk-next { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
@media (min-width: 640px) { .nest-wk-next:not(.is-compact) { grid-template-columns: 260px minmax(0, 1fr); } }
.nest-wk-next-img { position: relative; display: block; aspect-ratio: 16 / 10; background: #F3EEFF; }
.nest-wk-next:not(.is-compact) .nest-wk-next-img { aspect-ratio: auto; min-height: 170px; }
.nest-wk-next-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nest-wk-next.is-wait .nest-wk-next-img img, .nest-wk-next.is-wait .nest-wk-next-img .nest-img-ph { filter: grayscale(.7) blur(2px); opacity: .7; }
.nest-wk-lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; }
.nest-wk-next-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.nest-wk-next-body h3 { font-size: 1.3rem !important; font-weight: 800; margin: 0 !important; }
.nest-wk-next-body p { margin: 0; }
.nest-wk-timer { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 16px; background: #FFF4D6; font-size: 1.5rem; font-weight: 800; color: #7A4B00; }
.nest-done-banner.nest-wk-timer { display: flex; flex-wrap: wrap; font-size: 1.1rem; }
.nest-wk-next.is-compact { box-shadow: none; border: 2px solid var(--nest-line); }
.nest-side-card .nest-wk-next.is-compact { border: 0; }
.nest-side-card .nest-wk-next-body { padding: 12px 0 0; }
.nest-side-card .nest-wk-next-img { border-radius: 18px; overflow: hidden; }
.nest-wk-next.is-done { grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 18px; }
.nest-wk-next-ico { font-size: 2.6rem; }
.nest-wk-next.is-done h3 { margin: 0 !important; }
.nest-week-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nest-wl { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 18px; background: #fff; color: inherit; text-decoration: none; box-shadow: var(--nest-shadow); border: 2px solid transparent; }
.nest-wl.is-active { border-color: var(--nest-primary); }
.nest-wl.is-locked { opacity: .6; }
.nest-wl-num { font-size: .8rem; font-weight: 800; color: var(--nest-primary); }
.nest-wl b { line-height: 1.2; padding-inline-end: 22px; }
.nest-wl small { color: var(--nest-muted); }
.nest-wl-state { position: absolute; top: 10px; inset-inline-end: 10px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Hardening against theme/BuddyBoss styles on People & Notifications */
.nest-member { min-width: 0; }
.nest-member-grid > * { min-width: 0; }
.nest-friend-ctl { max-width: 100%; }
.nest-member .nest-friend-ctl .nest-btn { min-width: 0; }
.nest-notif-list li .nest-notif-main, .nest-notif-body, .nest-notif-msg { text-align: start; }
.nest-page-head > div { flex: 1 1 200px; min-width: 0; text-align: start; }
.nest-page-head h1, .nest-page-head p { text-align: start; }
/* Keep Nest text aligned to the start even if the theme/BuddyBoss centers body text. */
.nest-page, .nest-home, .nest-feed, .nest-sheet, .nest-week, .nest-wk-next-body, .nest-day-title { text-align: start; }
.nest-empty, .nest-profile-head, .nest-member, .nest-login-card, .nest-done-banner, .nest-wk-timer, .nest-toast, .nest-story, .nest-tile-img { text-align: center; }

/* ---------- Full-width desktop layout ---------- */
.nest-page { max-width: none; }
.nest-home-left { display: none; }
.nest-people-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nest-person { display: flex; align-items: center; gap: 10px; }
.nest-person > a, a.nest-person { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 14px; color: inherit; text-decoration: none; }
.nest-person > a:hover, a.nest-person:hover { background: #F6F3FF; color: inherit; }
.nest-person span { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.nest-person b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nest-person small { color: var(--nest-muted); font-size: .82rem; }
.nest-people-list.has-buttons .nest-person { flex-wrap: wrap; }
.nest-people-list.has-buttons .nest-friend-ctl { margin-inline-start: auto; }
.nest-people-list .nest-friend-ctl .nest-btn { min-height: 34px; padding: 2px 12px; font-size: .85rem; }
.nest-me-row { padding: 4px; margin-bottom: 6px; }
.nest-me-row b { font-size: 1.1rem; }
.nest-shortcuts { display: flex; flex-direction: column; gap: 2px; border-top: 2px solid var(--nest-line); padding-top: 8px; }
.nest-shortcuts a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; color: var(--nest-ink); font-weight: 700; text-decoration: none; }
.nest-shortcuts a:hover { background: #F4F1FF; color: var(--nest-primary); }
.nest-shortcuts .nest-i { color: var(--nest-primary); }

@media (min-width: 900px) {
	.nest-home-grid { grid-template-columns: minmax(0, 1fr) 330px; grid-template-areas: "main side" "main left"; align-items: start; gap: 24px; }
	.nest-home-main { grid-area: main; }
	.nest-home-side { grid-area: side; position: static; }
	.nest-home-left { grid-area: left; display: flex; flex-direction: column; gap: 16px; }
	.nest-home-left .nest-me-card { display: none; }
}
@media (min-width: 1200px) {
	.nest-home-grid.has-left { grid-template-columns: 290px minmax(0, 1fr) 340px; grid-template-areas: "left main side"; gap: 28px; }
	.nest-home-left .nest-me-card { display: block; }
	.nest-home-left, .nest-home-side { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 90px; }
	.nest-home-main > .nest-feed { max-width: 820px; margin-inline: auto; }
	.nest-quick { gap: 18px; }
	.nest-qa { min-height: 110px; font-size: 1.3rem; }
}
@media (min-width: 1600px) {
	.nest-home-grid.has-left { grid-template-columns: 320px minmax(0, 1fr) 380px; gap: 36px; }
	.nest-hero { min-height: 250px; }
}

/* Wider grids on big screens */
@media (min-width: 1400px) {
	.nest-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.nest-member-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1750px) {
	.nest-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.nest-member-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
	.nest-notif-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
	.nest-weeks { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); align-items: start; gap: 20px; }
	.nest-weeks > .nest-week { grid-column: 1; grid-row: 1 / span 2; }
	.nest-weeks > .nest-wk-next { grid-column: 2; grid-row: 1; grid-template-columns: minmax(0, 1fr); position: sticky; top: 90px; }
	.nest-weeks > .nest-wk-next .nest-wk-next-img { min-height: 220px; }
	.nest-weeks > .nest-h2, .nest-weeks > .nest-week-list { grid-column: 1 / -1; }
}
.nest-ch-hero { max-height: 440px; }
.nest-game-single .nest-player { width: min(100%, calc((100vh - 230px) * 1.6)); margin-inline: auto; }
.nest-side-card .nest-wk-next-body { padding: 12px 2px 0; }

/* Gallery / Camera picker */
.nest-picker { z-index: 9996; }
.nest-picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nest-picker-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 120px; padding: 16px 10px; border: 2px solid var(--nest-line); border-radius: 22px; background: #fff; font-family: var(--nest-font); color: var(--nest-ink); cursor: pointer; text-align: center; transition: transform .15s, border-color .15s; }
.nest-picker-grid button:hover, .nest-picker-grid button:active { border-color: var(--nest-primary); transform: translateY(-2px); }
.nest-picker-grid button[hidden] { display: none; }
.nest-picker-grid span { font-size: 2.4rem; }
.nest-picker-grid b { font-size: 1.05rem; line-height: 1.2; }
.nest-picker-grid small { color: var(--nest-muted); }
.nest-drop { width: 100%; font-family: var(--nest-font); }
.nest-wall-composer button.nest-wc-act { border: 0; }
@media (max-width: 480px) {
	.nest-wall-composer .nest-wc-act { flex-direction: column; gap: 2px; min-height: 52px; padding: 6px 2px; font-size: .8rem; }
	.nest-wall-composer select.nest-wc-topic { font-size: .8rem; text-align: center; text-align-last: center; width: 100%; }
	.nest-wall-composer .nest-wc-ico { font-size: 1.35rem; }
}
