/* Next-generation layer: dark theme, glass header, three-column hub, reactions, quick search. Loaded last. */
:root { --glass: rgba(255, 255, 255, .78); --aurora: radial-gradient(60% 50% at 15% 0%, rgba(21, 101, 216, .16), transparent 70%), radial-gradient(50% 40% at 90% 10%, rgba(244, 185, 66, .16), transparent 70%); color-scheme: light; }
html[data-theme="dark"] {
  --bg: #0a111f; --bg-2: #101a2e; --surface: #131e34; --ink: #e9eefa; --ink-2: #b7c3da; --muted: #8e9cb7; --line: #24324e;
  --accent: #5b98ff; --accent-2: #86b2ff; --accent-soft: #162a50; --pine-soft: #172640; --danger: #ff7a6b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -16px rgba(0, 0, 0, .7);
  --glass: rgba(14, 22, 40, .78);
  --aurora: radial-gradient(60% 50% at 15% 0%, rgba(91, 152, 255, .18), transparent 70%), radial-gradient(50% 40% at 90% 10%, rgba(244, 185, 66, .10), transparent 70%);
  color-scheme: dark;
}
html[data-theme="dark"] .post-text { background: linear-gradient(135deg, #16294d, #2a2412); color: var(--ink); }
html[data-theme="dark"] .share-apps a:hover { background: var(--accent-soft); }
html[data-theme="dark"] img { filter: brightness(.93); }
body { background-image: var(--aurora); background-attachment: fixed; transition: background-color .25s, color .25s; }
.site-header { background: var(--glass); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s; }
.post.card:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.theme-btn .moon { display: none; }
html[data-theme="dark"] .theme-btn .sun { display: none; }
html[data-theme="dark"] .theme-btn .moon { display: inline; }
.kbd { font: 600 .72rem/1 var(--f-body); padding: .2rem .4rem; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }

/* Three-column hub */
.hub-left { display: none; position: sticky; top: 88px; gap: .35rem; }
.hub-left a { display: flex; align-items: center; gap: .7rem; padding: .65rem .85rem; border-radius: 12px; font-weight: 600; color: var(--ink-2); transition: background .18s, color .18s, transform .18s; }
.hub-left a:hover { background: var(--surface); color: var(--ink); transform: translateX(2px); }
[dir="rtl"] .hub-left a:hover { transform: translateX(-2px); }
.hub-left a.active { background: var(--accent-soft); color: var(--accent); }
.hub-left .side-title { margin: 1rem .85rem .25rem; }
@media (min-width: 1240px) {
  .hub { grid-template-columns: 210px minmax(0, 600px) 300px; gap: 2rem; }
  .hub-left { display: grid; }
}
.trend-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.trend-tags a { display: inline-flex; gap: .35rem; align-items: baseline; padding: .35rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .88rem; transition: border-color .18s, transform .18s; }
.trend-tags a:hover { border-color: var(--accent); transform: translateY(-1px); }
.trend-tags small { color: var(--muted); font-weight: 500; }

/* Reactions: double-tap burst and animated like */
.post-media, .post-view-media { position: relative; }
.heart-burst { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #fff; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45)); animation: burst .9s ease forwards; }
@keyframes burst { 0% { transform: scale(.3); opacity: 0; } 25% { transform: scale(1.25); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }
.like.on svg { fill: #ef3f5b; stroke: #ef3f5b; animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.to-top { position: fixed; inset-inline-end: 1rem; bottom: 5.5rem; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); display: none; place-items: center; cursor: pointer; z-index: 30; }
.to-top.show { display: grid; }

/* Quick search (Ctrl/Cmd + K) */
.qs { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 10vh 1rem 1rem; background: rgba(5, 10, 20, .55); backdrop-filter: blur(6px); }
.qs.open { display: flex; }
.qs-box { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: qsIn .18s ease; }
@keyframes qsIn { from { transform: translateY(-8px) scale(.98); opacity: 0; } }
.qs-input { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.qs-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1.05rem; }
.qs-list { max-height: 55vh; overflow: auto; padding: .4rem; }
.qs-group { margin: .6rem .7rem .2rem; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.qs-item { display: flex; align-items: center; gap: .8rem; padding: .6rem .75rem; border-radius: 12px; }
.qs-item.sel, .qs-item:hover { background: var(--accent-soft); }
.qs-item .qs-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); color: var(--accent); flex: none; }
.qs-item small { display: block; color: var(--muted); }
.qs-empty { padding: 1.4rem; text-align: center; color: var(--muted); }

/* Smart travel picks: offers, booths and trade shows from the hidden interest profile */
.picks { display: grid; gap: .5rem; }
.picks-row { display: grid; gap: .55rem; }
.tpick { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .85rem; border-radius: 14px; min-width: 0; transition: transform .18s, border-color .18s, box-shadow .18s; }
.tpick:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }
.tpick-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c, var(--accent)); }
.tpick-offer { background: linear-gradient(135deg, #f4b942, #e36a3a); }
.tpick-event { background: linear-gradient(135deg, #5b5bd6, #1565d8); }
.tpick-body { display: grid; gap: .1rem; min-width: 0; }
.tpick-body strong { font-size: .93rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tpick-kind { font-size: .7rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.tpick-why { font-size: .76rem; color: var(--muted); }
.picks-inline { display: none; }
@media (max-width: 960px) {
  .picks-inline { display: grid; margin-block: .25rem; }
  .picks-inline .picks-row { grid-auto-flow: column; grid-auto-columns: minmax(240px, 78%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; scrollbar-width: none; }
  .picks-inline .tpick { scroll-snap-align: start; }
}

/* Infinite feed */
.feed-more { display: grid; gap: .8rem; justify-items: center; padding-block: 1rem; }
.feed-more .skeleton { width: 100%; height: 120px; display: none; }
.feed-more.loading .skeleton { display: block; }
.feed-more.loading [data-more-link] { visibility: hidden; }
.feed-end { display: flex; gap: .4rem; align-items: center; justify-content: center; padding: 1.2rem; }
.fade-in { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .fade-in, .tpick, .heart-burst, .like.on svg { animation: none !important; transition: none !important; } }

/* Dark theme fixes for pieces that mix fixed light surfaces with theme colours */
html[data-theme="dark"] .chip-pine, html[data-theme="dark"] .alert-ok { color: #a9c6ff; }
html[data-theme="dark"] .s-cover .chip { color: #0f1b2d; }
.feed-more .post-skel { display: none; width: 100%; padding: 1rem; gap: .8rem; }
.feed-more.loading .post-skel { display: grid; }
.feed-more .feed-loading { display: none; }
.feed-more.loading .feed-loading { display: block; }
.post-skel .row { gap: .65rem; align-items: center; }
.post-skel .sk-av { width: 38px; height: 38px; border-radius: 50%; flex: none; }
.post-skel .sk-lines { display: grid; gap: .4rem; flex: 1; }
.post-skel .sk-lines .skeleton { height: 10px; width: 45%; }
.post-skel .sk-lines .skeleton + .skeleton { width: 28%; }
.post-skel .sk-media { aspect-ratio: 4 / 3; height: auto; width: 100%; border-radius: 12px; }
.post-skel .sk-line { height: 12px; width: 70%; }
.feed-empty { display: grid; justify-items: center; gap: .9rem; padding: 2.5rem 1.25rem; border-style: solid; }
.feed-empty p { max-width: 34ch; margin: 0; line-height: 1.7; }
.feed-empty-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--accent, var(--ink)); }
