@import url("tokens.css");

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 14px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.muted { color: var(--ink-2); }
.latin { font-style: italic; color: var(--ink-2); font-size: 13px; }
.kicker { color: var(--muted); font-size: 12px; font-weight: 500; }

/* ——— Header ——— */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.nav {
  width: 100%;
  max-width: var(--wrap);
  min-height: 72px;
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 20px; color: var(--ink); flex: 0 0 auto;
}
.brand-logo { width: 30px; height: 30px; object-fit: contain; flex: 0 0 30px; }
.nav-end {
  display: flex; align-items: center; gap: 8px 22px; margin-left: auto;
}
.nav-explore { position: relative; }
.nav-explore-btn, .nav-login {
  border: 0; background: none; padding: 0;
  height: 40px; color: var(--ink); font-size: 15px; font-weight: 500;
}
.nav-explore-btn {
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-explore-btn:hover, .nav-login:hover { color: var(--ink-2); }
.nav-chevron { display: block; opacity: .7; }
.nav-dropdown {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 168px; padding: 8px 0;
  background: var(--surface); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(25, 27, 38, .12);
  border: 1px solid var(--line); z-index: 40;
}
.nav-explore:hover .nav-dropdown,
.nav-explore.open .nav-dropdown,
.nav-explore:focus-within .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block; padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--ink);
}
.nav-dropdown a:hover, .nav-dropdown a.active { background: var(--canvas); color: var(--accent); }
.nav-upload {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border: 0; border-radius: var(--pill);
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
}
.nav-upload:hover { background: var(--accent-hover); }
.nav-user { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.avatar { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; background: var(--surface-subtle); }
.nav-menu {
  display: none; width: 36px; height: 36px; border: 0; background: transparent;
  font-size: 20px; color: var(--ink);
}

/* ——— Buttons ——— */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 18px; border: 0; border-radius: var(--pill);
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px;
  transition: background var(--fast) var(--ease);
}
.button:hover { background: #2c3e50; }
.button.accent { background: var(--accent); }
.button.accent:hover { background: var(--accent-hover); }
.button.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.button.secondary:hover { background: var(--surface-subtle); }
.button.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.button.ghost {
  background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.35);
}
.button.ghost:hover { background: #fff; color: var(--ink); }
.button:disabled { opacity: .55; cursor: not-allowed; }

/* ——— Search pill ——— */
.search-pill {
  display: flex; align-items: stretch; height: 56px;
  background: #fff; border-radius: var(--pill); box-shadow: var(--shadow-search); overflow: hidden;
}
.search-pill .search-cat {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px 0 20px; border: 0; background: transparent;
  color: var(--ink); font-weight: 500; font-size: 14px; white-space: nowrap;
  border-right: 1px solid var(--line);
}
.search-pill input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 0 16px; font-size: 16px; min-width: 0;
}
.search-pill input::placeholder { color: var(--muted); }
.search-pill .search-submit {
  width: 56px; border: 0; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 18px;
}
.search-pill .search-submit:hover { background: var(--accent-hover); }
.search-pill .search-submit svg, .nav-search button svg { display: block; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: var(--pill);
  background: rgba(255,255,255,.18); color: #fff;
  font-size: 13px; font-weight: 500; backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
}
.chip:hover { background: rgba(255,255,255,.32); }
.chip-light {
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
  backdrop-filter: none;
}
.chip-light:hover, .chip-light.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.ribbon {
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 0;
  scrollbar-width: none;
}
.ribbon::-webkit-scrollbar { display: none; }
.ribbon a, .ribbon button {
  flex: 0 0 auto; padding: 8px 14px; border: 0; border-radius: var(--pill);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.ribbon a.active, .ribbon button.active, .ribbon a:hover, .ribbon button:hover {
  background: var(--ink); color: #fff;
}

/* ——— Hero (search-centric, video backdrop) ——— */
.hero {
  position: relative; overflow: hidden;
  width: 100%;
  margin: 16px 0 0;
  height: clamp(380px, 42vh, 480px);
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-align: center;
  border-radius: 16px;
}
.hero-video, .hero-overlay { position: absolute; inset: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { background: rgba(17, 20, 24, .42); }
.hero-copy { position: relative; z-index: 2; width: min(760px, 100%); padding-inline: 20px; }
.hero h1 {
  margin: 0 0 10px; font-size: clamp(22px, 4.2vw, 40px);
  font-weight: 700; line-height: 1.2; letter-spacing: -.02em;
}
.hero h1 em { font-style: normal; color: #fff; }
.hero-intro { margin: 0 auto 22px; max-width: 520px; font-size: 16px; line-height: 1.5; color: rgba(255,255,255,.88); font-weight: 400; }
.hero .search-pill { margin: 0 auto 16px; }
.hero-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* ——— Home CTA strip (Pixabay-style) ——— */
.home-cta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 28px 0 8px;
}
.home-cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100%;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.home-cta-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-subtle); color: var(--ink);
  display: grid; place-items: center; flex: 0 0 auto;
}
.home-cta-icon svg { width: 20px; height: 20px; display: block; }
.home-cta-card h2 {
  margin: 14px 0 0;
  font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em;
}
.home-cta-card p {
  margin: 8px 0 0;
  color: var(--ink-2); font-size: 14px; line-height: 1.55;
  flex: 1;
}
.home-cta-card .button {
  width: 100%;
  margin-top: 18px;
  min-height: 44px;
}
.home-cta-card .button:active { transform: scale(0.985); }
.button.quiet {
  background: #f2f2f2; color: var(--ink);
}
.button.quiet:hover { background: #e8e8e8; }

/* ——— Masonry ——— */
.masonry { column-count: 4; column-gap: var(--gap); }
.masonry-card {
  display: block; break-inside: avoid; margin-bottom: var(--gap);
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-subtle); cursor: pointer;
}
.masonry-card .card-cover,
.masonry-card > img {
  width: 100%; height: auto; display: block;
  transition: transform .35s var(--ease), opacity .3s ease;
}
.masonry-card .card-overlay {
  position: absolute; inset: 0;
  background: var(--overlay-card-hover);
  opacity: 0; transition: opacity .25s var(--ease);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px; color: #fff; pointer-events: none;
}
.masonry-card .card-overlay-top,
.masonry-card .card-overlay-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.masonry-card .card-overlay-bottom {
  flex-direction: column; align-items: flex-start; gap: 6px;
}
.masonry-card .card-name { font-size: 13px; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.masonry-card .card-author {
  display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
}
.masonry-card .card-place {
  display: inline-flex; align-items: center; gap: 4px;
  flex: 0 1 auto; max-width: min(58%, 160px); min-width: 0; margin-left: auto;
  height: 32px; padding: 0 10px 0 8px;
  border: 0; border-radius: 8px;
  font-size: 11px; font-weight: 600; line-height: 1;
  color: #fff; background: rgba(255,255,255,.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.masonry-card .card-place svg {
  flex: 0 0 12px; width: 12px; height: 12px; opacity: .92;
}
.masonry-card .card-place-text {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.masonry-card .card-avatar,
.masonry-card .card-avatar-fallback {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  object-fit: cover; background: rgba(255,255,255,.28);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.45);
}
.masonry-card .card-avatar-fallback {
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; line-height: 1;
}
.masonry-card .card-meta {
  font-size: 12px; opacity: .95; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.masonry-card .card-heart {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.22); backdrop-filter: blur(8px);
  display: grid; place-items: center; font-size: 14px;
}
@media (hover: hover) {
  .masonry-card:hover .card-overlay { opacity: 1; }
  .masonry-card:hover .card-cover,
  .masonry-card:hover > img { transform: scale(1.02); }
}
@media (hover: none) {
  .masonry-card .card-overlay { opacity: 1; }
}

.feed-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 0 12px;
}
.feed-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.feed-head span { color: var(--muted); font-size: 13px; }

/* ——— Page chrome ——— */
.page-hero { padding: 28px 0 8px; }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -.02em; }
.page-hero p { margin: 0 0 18px; color: var(--ink-2); max-width: 560px; font-size: 15px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  border: 0; background: var(--surface); color: var(--ink-2);
  border-radius: var(--pill); padding: 8px 14px; font-size: 13px; font-weight: 500;
}
.pill.active, .pill:hover { background: var(--ink); color: #fff; }
a.pill { display: inline-flex; align-items: center; }

.input, .select, textarea.input {
  width: 100%; min-height: 42px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); padding: 8px 12px; outline: 0;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--accent); }
.filter-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 8px 0 48px; }
.filter-panel { background: var(--surface); border-radius: 12px; padding: 18px; height: fit-content; }
.filter-panel label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.results-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 28px 0 48px; }
.suggest {
  position: absolute; left: 0; right: 0; top: 48px; z-index: 6;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(25,27,38,.08); overflow: hidden;
}
.suggest button {
  display: block; width: 100%; padding: 10px 14px; text-align: left;
  border: 0; background: transparent;
}
.suggest button:hover { background: var(--canvas); }

/* ——— Detail / lightbox-ish ——— */
.detail-layout {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .9fr);
  gap: 28px; padding: 24px 0 64px;
}
.detail-hero {
  background: var(--canvas); border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center; position: relative;
}
.detail-photo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}
.detail-hero .card-badge { z-index: 1; }
.thumbs { display: flex; justify-content: center; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumb {
  flex: 0 0 72px; height: 72px; object-fit: cover; border-radius: 6px;
  cursor: pointer; opacity: .7; border: 2px solid transparent;
}
.thumb.active, .thumb:hover { opacity: 1; border-color: var(--accent); }
.detail-title { font-size: clamp(20px, 2.4vw, 24px); font-weight: 600; line-height: 1.3; margin: 6px 0 8px; }
.observer-card {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 4px; padding: 10px 12px;
  border-radius: 12px; background: var(--canvas);
  transition: background var(--fast) var(--ease);
}
.observer-card:hover { background: #ececec; }
.observer-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  flex: 0 0 44px; background: var(--surface-subtle);
}
.observer-avatar.fallback {
  display: grid; place-items: center;
  font-size: 16px; font-weight: 600; color: var(--ink); background: #e4e6eb;
}
.observer-info { flex: 1; min-width: 0; }
.observer-info strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.observer-info span { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); }
.observer-go { font-size: 12px; color: var(--accent); font-weight: 600; flex: 0 0 auto; }
.detail-side { background: var(--surface); border-radius: 12px; padding: 8px 22px 22px; }
.detail-block { padding: 18px 0; border-bottom: 1px solid var(--line); }
.detail-block:last-child { border-bottom: 0; }
.detail-block h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.data-list { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; }
.notice {
  background: #e8f8f1; color: #0b5c3c; border-radius: 8px; padding: 12px 14px; font-size: 13px;
}
.progress { height: 6px; background: var(--surface-subtle); border-radius: var(--pill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }
.taxonomy { display: flex; flex-wrap: wrap; gap: 6px; }
.taxonomy span { padding: 4px 10px; background: var(--canvas); border-radius: var(--pill); font-size: 12px; }
.id-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.id-row:last-child { border-bottom: 0; }
.id-row strong { display: block; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card-badge {
  position: absolute; left: 12px; top: 12px; padding: 4px 10px;
  border-radius: var(--pill); background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
}

/* ——— Profile ——— */
.profile-cover {
  padding: 28px 0 20px; display: grid; grid-template-columns: 88px 1fr auto;
  gap: 20px; align-items: center;
}
.profile-avatar {
  width: 88px; height: 88px; object-fit: cover; border-radius: 50%; background: var(--surface-subtle);
}
.profile-name { font-size: clamp(22px, 3vw, 28px); font-weight: 700; margin: 0 0 6px; }
.profile-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.stat strong { display: block; font-size: 20px; font-weight: 700; }
.stat span { color: var(--muted); font-size: 12px; }
.badge-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.badge {
  min-width: 96px; padding: 12px; background: var(--surface); border-radius: var(--radius); text-align: center;
}
.badge-icon { font-size: 18px; color: var(--accent); }
.badge small { display: block; font-size: 12px; margin-top: 4px; font-weight: 600; }
.collection-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.collection-cell {
  aspect-ratio: 1; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-subtle);
}
.collection-cell img { width: 100%; height: 100%; object-fit: cover; }
.collection-cell .cell-label {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  font-size: 12px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); font-weight: 500;
}
.collection-cell.state-blank { display: grid; place-items: center; color: var(--muted); font-size: 22px; }

/* ——— Cities / ranks compact ——— */
.city-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.city-card {
  min-width: 160px; padding: 14px; background: var(--surface); border-radius: var(--radius);
}
.city-card strong { display: block; font-size: 16px; }
.city-card span { color: var(--muted); font-size: 12px; }
.rank-list { display: grid; gap: 0; background: var(--surface); border-radius: 12px; overflow: hidden; }
.rank-row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line);
}
.rank-row:last-child { border-bottom: 0; }
.rank-number { color: var(--muted); font-size: 12px; font-weight: 600; }
.rank-name { font-weight: 600; }
.rank-value { font-size: 13px; color: var(--ink-2); }

.section { padding: 8px 0 36px; }
.section-title { font-size: 18px; font-weight: 600; margin: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 14px; }

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 36px;
}
.activity-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.activity-cover { width: 100%; height: 140px; object-fit: cover; }
.activity-body { padding: 14px 16px 16px; }
.activity-body h2 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.activity-body p { margin: 0 0 8px; color: var(--ink-2); font-size: 13px; }

.empty, .error {
  padding: 48px 20px; text-align: center; color: var(--muted);
  background: var(--surface); border-radius: 12px;
}
.error { color: var(--danger); }
.skeleton { background: linear-gradient(90deg, #ececec, #f7f7f7, #ececec); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.masonry-skel { height: 220px; margin-bottom: var(--gap); break-inside: avoid; }

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 80px 0;
  color: var(--ink);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.footer-brand {
  flex: 1 1 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-brand .brand { font-size: 22px; }
.footer-brand .brand-logo { width: 32px; height: 32px; flex-basis: 32px; }
.footer-desc {
  margin: 0;
  max-width: 36em;
  font-size: 14px;
  line-height: 20px;
  color: rgba(25, 27, 38, 0.64);
}
.footer-cols {
  display: flex;
  gap: 24px;
  flex: 0 0 auto;
}
.footer-col {
  width: 200px;
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-col h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.footer-col ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.footer-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 400; line-height: 21px;
  color: rgba(25, 27, 38, 0.64); cursor: default;
}
.footer-link:hover { color: var(--ink); }
.footer-badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 16px; padding: 0 6px; border-radius: 4px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.footer-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--muted);
}
.footer-live i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--danger); display: block;
}

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(25, 27, 38, .45); padding: 20px;
}
.modal {
  width: min(400px, 100%); background: var(--surface); border-radius: 16px;
  padding: 28px; position: relative; box-shadow: 0 16px 48px rgba(0,0,0,.16);
}
.modal-close { position: absolute; right: 12px; top: 10px; border: 0; background: none; font-size: 22px; color: var(--muted); }
.group-modal {
  width: min(400px, 100%);
  background: var(--surface);
  border-radius: 16px;
  padding: 28px 28px 24px;
  position: relative;
  box-shadow: 0 16px 48px rgba(0,0,0,.16);
}
.group-modal h2 { margin: 0 28px 8px 0; font-size: 20px; font-weight: 700; }
.group-modal p { margin: 0 0 18px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.group-modal .button { width: 100%; }
.qr { width: 200px; height: 200px; margin: 16px auto; object-fit: contain; }

.login-modal {
  width: min(820px, 100%);
  min-height: 480px;
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.16);
}
.login-visual {
  position: relative;
  min-height: 480px;
  background: #1a1c18 center / cover no-repeat;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.12) 40%, rgba(0,0,0,.55) 100%);
}
.login-visual-copy {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 52px;
  z-index: 1;
  color: #fff;
}
.login-visual-copy strong {
  display: block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.login-visual-copy p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,.88);
}
.login-credit {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 16px;
  z-index: 1;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  font-weight: 400;
}
.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 40px 28px;
}
.login-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.login-panel .login-lead {
  margin: 0 0 20px;
  color: var(--ink-2);
  font-size: 14px;
}
.login-qr {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 220px;
}
.login-qr .qr { width: 216px; height: 216px; margin: 0; }
.login-status {
  margin: 8px 0 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.login-panel .button { width: 100%; min-height: 44px; }
.login-legal {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.login-legal a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .login-modal { grid-template-columns: 1fr; min-height: 0; }
  .login-visual { min-height: 160px; }
  .login-visual-copy { left: 20px; right: 20px; bottom: 36px; }
  .login-visual-copy strong { font-size: 22px; }
  .login-credit { left: 20px; right: 20px; bottom: 12px; }
  .login-panel { padding: 24px 22px 20px; }
}
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%);
  padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--pill); font-size: 13px;
}

.cover-fallback {
  min-height: 160px; display: grid; place-items: center; color: var(--muted); font-size: 12px; background: var(--surface-subtle);
}

@media (min-width: 1600px) { .masonry { column-count: 5; } }
@media (max-width: 1199px) { .masonry { column-count: 3; } }
@media (max-width: 1000px) {
  .detail-layout, .filter-layout { grid-template-columns: 1fr; }
  .collection-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { flex-wrap: wrap; gap: 40px 24px; }
  .footer-brand { flex: 1 1 100%; }
  .footer-cols { width: 100%; justify-content: space-between; }
  .footer-col { flex: 1 1 0; width: auto; }
  .home-cta, .activity-grid { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .masonry { column-count: 2; }
  .home-cta, .activity-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav { min-height: 56px; gap: 10px; }
  .nav-explore, .nav-user-name { display: none; }
  .site-header.nav-open .nav-explore { display: block; position: static; }
  .site-header.nav-open .nav-explore-btn { display: none; }
  .site-header.nav-open .nav-dropdown {
    display: flex; flex-direction: column; position: absolute;
    left: 0; right: 0; top: 56px; min-width: 0; border-radius: 0;
    border: 0; border-bottom: 1px solid var(--line);
    box-shadow: none; padding: 8px var(--page-gutter) 16px;
    background: var(--surface);
  }
  .nav-end { gap: 8px; }
  .nav-upload { padding: 0 14px; height: 36px; }
  .nav-menu { display: grid; place-items: center; }
  .hero { height: clamp(320px, 52vh, 400px); margin-top: 12px; border-radius: 12px; }
  .hero-intro { font-size: 14px; }
  .search-pill { height: 48px; }
  .search-pill input { font-size: 14px; }
  .search-pill .search-cat { display: none; }
  .profile-cover { grid-template-columns: 64px 1fr; }
  .profile-avatar { width: 64px; height: 64px; }
  .profile-cover .button { grid-column: span 2; }
  .collection-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer { padding: 48px 0 56px; margin-top: 28px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; width: 100%; }
  .footer-col { width: auto; flex: none; }
  .footer-desc { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
