/* Friends, For you, Your world, Your HQ. Same tokens as app.css. */

.glassbtn { background: var(--glass); color: var(--ink); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 0 0 1px var(--border); }
@media (hover: hover) { .glassbtn:hover { background: var(--glass); filter: brightness(1.04); } }

/* ---- Explore: your people row */
.netrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.netlink { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px 0 6px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--ink); transition: background-color var(--dur-quick) var(--ease), transform var(--dur-quick) var(--ease); }
@media (hover: hover) { .netlink:hover { background: var(--chip); } }
.netlink:active { transform: scale(.97); }
.netlink .i { color: var(--muted); }

/* ---- Homes strip */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px); gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); overscroll-behavior-x: contain; }
.hscroll::-webkit-scrollbar { display: none; }
.home-card { scroll-snap-align: start; display: flex; flex-direction: column; padding: 8px; border-radius: var(--r-card); background: var(--card); box-shadow: 0 0 0 1px var(--border), var(--shadow-card); transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease); min-width: 0; }
@media (hover: hover) { .home-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); } }
.home-card:active { transform: scale(.98); }
.hc-img { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-well); overflow: hidden; background: var(--well); }
.hc-img img, .hc-img .art { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-xslow) var(--ease); }
@media (hover: hover) { .home-card:hover .hc-img img { transform: scale(1.03); } }
.hc-tag { position: absolute; left: 10px; top: 10px; }
.hc-heart { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #EC4899; }
.hc-heart .i { fill: currentColor; }
.hc-meta { padding: 12px 6px 6px; min-width: 0; }
.hc-meta .t { font-size: 15px; font-weight: 500; letter-spacing: -.012em; }

/* ---- For you */
.feed-list { display: flex; flex-direction: column; gap: 2px; }
.feed-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px; border-radius: 20px; transition: background-color var(--dur-quick) var(--ease), transform var(--dur-quick) var(--ease); min-width: 0; }
@media (hover: hover) { .feed-item:hover { background: var(--chip); } }
.feed-item:active { transform: scale(.985); }
.feed-item .t { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.fi-ic { position: relative; flex: none; }
.fi-kind { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--border); }
.fi-kind .i { width: 11px; height: 11px; }
.fi-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.fi-act { color: var(--accent); }
.feed-item .thumb { width: 64px; height: 64px; }
.caught { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; color: var(--muted); font-size: 13px; font-weight: 500; }
.caught .i { color: var(--ok); }

/* ---- Friends */
.fr-req { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.fr-req .t { font-size: 15px; font-weight: 500; }
.searchbox .input { height: 46px; border-radius: var(--r-pill); padding-left: 20px; }
.person { justify-content: space-between; }
.person > .btn, .person > .pill, .person > .icon-btn { flex: none; }
.vouch-card .btn { flex: none; }

/* QR */
.qr-wrap { position: relative; display: grid; place-items: center; padding: 26px; border-radius: 28px; overflow: hidden; isolation: isolate; background: var(--card); box-shadow: 0 0 0 1px var(--border); }
.qr-wrap .aurora { z-index: -1; height: 80%; }
.qr-card { width: min(260px, 70vw); aspect-ratio: 1; padding: 18px; border-radius: 24px; background: #fff; color: #17181C; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); }
.qr { width: 100%; height: 100%; display: block; }

/* ---- Your world */
.world-page .page-head { padding-top: 40px; }
.globe-stage { position: relative; height: min(72vh, 760px); min-height: 420px; border-radius: 32px; overflow: hidden; isolation: isolate; background: radial-gradient(120% 90% at 50% 10%, #FFFFFF 0%, #F1EFF7 75%); box-shadow: 0 0 0 1px var(--border); }
/* The stage follows the page theme from the first frame (it used to start dark and turn light once three.js loaded). */
:root[data-theme="dark"] .globe-stage { background: radial-gradient(120% 90% at 50% 0%, #15182E 0%, #07080F 70%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .globe-stage { background: radial-gradient(120% 90% at 50% 0%, #15182E 0%, #07080F 70%); } }
.globe-mount { position: absolute; inset: 0; }
.globe-host { position: absolute; inset: 0; touch-action: none; }
.globe-host[data-theme="light"]::after { content: ""; position: absolute; left: 50%; bottom: 7%; width: 46%; height: 6%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 50, 110, .22), transparent); filter: blur(6px); z-index: -1; }
.globe-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.globe-canvas:active { cursor: grabbing; }
.globe-pins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.gpin { position: absolute; left: 0; top: 0; pointer-events: auto; opacity: 0; transition: opacity var(--dur-fast) var(--ease); will-change: transform; }
.gpin .bob { position: relative; display: block; animation: bob 3.6s ease-in-out infinite; }
.gpin:nth-child(3n) .bob { animation-delay: -1.2s; } .gpin:nth-child(3n+1) .bob { animation-delay: -2.4s; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.gpin .face { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 0 2px var(--ring), 0 0 0 4px rgba(255, 255, 255, .14), 0 8px 24px rgba(0, 0, 0, .35); transition: transform var(--dur-med) var(--ease-bounce); color: #fff; font-weight: 600; }
@media (hover: hover) { .gpin:hover .face { transform: scale(1.12); } }
.gpin .face img { width: 100%; height: 100%; object-fit: cover; }
.gpin .cnt { position: absolute; right: -8px; top: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: #17181C; font-size: 11px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); font-variant-numeric: tabular-nums; }
.gpin.fof .fofdot { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--ring); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 0 12px var(--ring); }
.gpin.me .beacon { position: relative; display: block; width: 14px; height: 14px; }
.gpin.me .beacon b { position: absolute; inset: 0; border-radius: 50%; background: var(--ring); box-shadow: 0 0 0 3px #fff, 0 0 18px var(--ring); }
.gpin.me .beacon i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ring); animation: beacon 2.4s var(--ease) infinite; }
.gpin.me .beacon i + i { animation-delay: 1.2s; }
@keyframes beacon { from { transform: scale(1); opacity: .9; } to { transform: scale(4.2); opacity: 0; } }
.globe-hint { position: absolute; z-index: 2; left: 16px; top: 16px; pointer-events: none; color: var(--ink); background: rgba(255, 255, 255, .7); }
:root[data-theme="dark"] .globe-hint { color: #E8E8F0; background: rgba(255, 255, 255, .08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .globe-hint { color: #E8E8F0; background: rgba(255, 255, 255, .08); } }
.globe-share { position: absolute; z-index: 2; right: 16px; top: 12px; }
.globe-card { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 16px; max-width: 420px; margin: 0 auto; padding: 16px; border-radius: 24px; background: var(--glass); color: var(--ink); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); box-shadow: var(--shadow-lift); transform: translateY(calc(100% + 24px)); opacity: 0; transition: transform var(--dur-xslow) var(--ease-bounce), opacity var(--dur-fast) var(--ease); }
.globe-card.in { transform: none; opacity: 1; }
.gc-row { padding: 8px; border-radius: 14px; transition: background-color var(--dur-quick) var(--ease); }
@media (hover: hover) { .gc-row:hover { background: var(--chip); } }
.world-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.world-city { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--card); box-shadow: 0 0 0 1px var(--border); transition: transform var(--dur-quick) var(--ease), background-color var(--dur-quick) var(--ease); min-width: 0; }
@media (hover: hover) { .world-city:hover { background: var(--chip); } }
.world-city:active { transform: scale(.98); }
.world-city .t { font-weight: 500; }
.wc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; }
.stat-chip { cursor: default; }
.share-world { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lift); max-width: 360px; margin: 0 auto; width: 100%; }
.share-world canvas { width: 100%; height: auto; display: block; aspect-ratio: 4 / 5; }

/* ---- Your HQ */
.vibe { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.3; letter-spacing: -.02em; font-weight: 500; color: var(--ink); max-width: 30ch; }
.vibe::before { content: "“"; color: var(--muted); }
.vibe::after { content: "”"; color: var(--muted); }
.hl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.hl { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--chip); font-size: 14px; font-weight: 500; }
.hl .i { color: var(--accent); flex: none; }
.block-chip .i { color: var(--muted); }
.note-warn[hidden] { display: none; }
.note-warn { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 500; }
.block-row { padding: 6px 4px; border-radius: 12px; }

/* the save heart */
.icon-btn.heart { color: var(--ink); }
.icon-btn.heart.on { color: #EC4899; background: rgba(236, 72, 153, .12); }
.icon-btn.heart.on .i { fill: currentColor; }
.icon-btn.heart.pop .i { animation: heartpop var(--dur-xslow) var(--ease-bounce); }
@keyframes heartpop { 0% { transform: scale(.6); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
.spark { position: fixed; z-index: 100; width: 6px; height: 6px; margin: -3px; border-radius: 50%; pointer-events: none; animation: spark 600ms var(--ease) forwards; }
@keyframes spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.bottom-bar .icon-btn.heart { width: 48px; height: 48px; flex: none; }

/* lightbox */
.lightbox { --fade: 1; position: fixed; inset: 0; z-index: 96; background: rgba(5, 5, 8, calc(.94 * var(--fade))); overflow: hidden; animation: fadein var(--dur-fast) var(--ease) both; touch-action: none; }
.lightbox.out { animation: leave-fade var(--dur-quick) var(--ease-close) both; }
.lb-track { display: flex; height: 100%; transition: transform var(--dur-xslow) var(--ease); }
.lb-slide { flex: none; width: 100%; height: 100%; display: grid; place-items: center; padding: 56px 16px; }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 16px; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.lb-x { position: absolute; right: 16px; top: 16px; }
.lb-prev, .lb-next { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-dots { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 6px; }
.lb-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.lb-dots i.on { background: #fff; transform: scale(1.2); }
@media (hover: none) { .lb-prev, .lb-next { display: none; } }

@media (max-width: 640px) {
  .globe-stage { height: 64vh; min-height: 380px; border-radius: 24px; margin: 0 calc(var(--gutter) * -1 + 8px); }
  .globe-hint { display: none; }
  .hscroll { grid-auto-columns: 74%; }
}
@media (prefers-reduced-motion: reduce) {
  .gpin .bob, .gpin.me .beacon i, .spark { animation: none !important; }
  .globe-card { transition-duration: 120ms; }
}

.feed-more > summary { list-style: none; align-self: flex-start; }
.feed-more > summary::-webkit-details-marker { display: none; }
.feed-more[open] > summary .i { transform: rotate(180deg); }
.feed-more > summary .i { transition: transform var(--dur-fast) var(--ease); }
@media (min-width: 1000px) { .feed-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; } }

/* the place header row holds back, city, hosting, share and the heart: let it wrap on phones */
.crumbs { flex-wrap: wrap; row-gap: 8px; }
.crumbs .label.grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .crumbs [data-sharehome] { padding: 0 12px; } .crumbs [data-sharehome] .t { display: none; } }
