/* Kinetic: the four colours of the family mark, quiet surfaces and natural photos.
   Kept separate from structural styles so forms, moderation and native bridges retain their layout. */
:root {
  --brand: #4263d1;
  --brand-dark: #304eb7;
  --brand-soft: #edf1ff;
  --accent: #4263d1;
  --accent-dark: #304eb7;
  --ink: #20283c;
  --muted: #657087;
  --label: #4d5870;
  --bg: #f7f9fd;
  --soft: #edf1f8;
  --soft-hover: #e4eaf5;
  --line: #e0e6f0;
  --line-strong: #c7d1e3;
  --surface: #fff;
  --raised: #fff;
  --glass: rgba(255, 255, 255, .94);
  --radius: 20px;
  --radius-sm: 14px;
  --wrap: 1200px;
  --tile-blue: #edf3ff;
  --tile-green: #eef7f1;
  --tile-red: #fff0ed;
  --tile-yellow: #fff8e7;
  --spectrum: linear-gradient(125deg, #bfc7fa, #b8e8df 34%, #ece5b3 64%, #f0c5c8 86%, #c8c3ee);
  --shadow: 0 8px 28px rgba(53, 69, 108, .07);
}
body.kinetic { background: radial-gradient(ellipse at 80% 0, #eef2ff 0, transparent 45%), var(--bg); }
.kinetic .page { padding-top: 18px; }
.kinetic .site-header { background: var(--glass); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.kinetic .topbar { background: transparent; border-bottom: 1px solid var(--line); font-size: 11px; }
.kinetic .topbar-in { height: 28px; }
.kinetic .toplinks a, .kinetic .toplinks .linkbtn { color: var(--muted); }
.kinetic .mainbar { height: 72px; gap: 12px; }
.kinetic .logo { font-size: 26px; gap: 7px; letter-spacing: -.05em; }
.kinetic .logo img { border-radius: 12px; flex-shrink: 0; }
.kinetic .site-header .logo img { order: 1; }
.kinetic .searchbar { height: 42px; padding: 0 10px 0 3px; border: 1px solid transparent; border-radius: 999px; background: linear-gradient(105deg, var(--surface), var(--tile-blue)) padding-box, var(--spectrum) border-box; }
.kinetic .searchbar input[type="search"] { background: transparent; border: 0; border-radius: 0; box-shadow: none; outline: none; padding: 0 4px; height: 100%; min-height: 0; font-size: 13px; }
.search-submit { display: grid; place-items: center; width: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.search-submit:hover { color: var(--brand-dark); }
.search-submit svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.header-languages { display: flex; align-items: center; gap: 1px; }
.header-languages a { display: grid; place-items: center; min-width: 27px; min-height: 40px; border-radius: 20px; color: var(--muted); font-size: 10px; font-weight: 650; }
.header-languages a.on { color: var(--ink); background: var(--brand-soft); }
.header-languages a:hover { color: var(--brand-dark); }
.kinetic .usernav > .header-post { height: 42px; padding: 0 16px; gap: 8px; font-size: 12px; border: 1px solid transparent; border-radius: 999px; color: var(--brand-dark); background: linear-gradient(115deg, var(--surface), var(--tile-blue) 50%, var(--tile-green) 82%, var(--tile-yellow)) padding-box, linear-gradient(120deg, #edb5e8, #ffc6a3 24%, #f6e69c 48%, #a6e8d4 70%, #b9d6fa) border-box; box-shadow: 0 3px 12px #4263d10a; }
.kinetic .usernav > .header-post:hover { box-shadow: 0 4px 16px #4263d11a; color: var(--brand-dark); }
.header-post svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.7; fill: none; }
.kinetic .btn-primary, .kinetic .btn-accent { background: linear-gradient(155deg, #5575df, #3d5ac3); box-shadow: inset 0 1px 0 #ffffff30, 0 3px 9px #4263d118; }
.kinetic .btn-primary:hover, .kinetic .btn-accent:hover { background: var(--brand-dark); }
.kinetic :is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.kinetic .searchbar:focus-within, .app-home-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.discovery { position: relative; display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: start; gap: 12px; margin: 0 0 18px; }
html[data-app] .discovery { display: block; }
.discovery-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; margin: 0; }
.discovery-heading h1 { margin: 0; font-size: 22px; white-space: nowrap; letter-spacing: -.045em; font-weight: 800; }
html[data-app] .discovery-heading { margin-bottom: 14px; }
.discovery-city { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.discovery-city label { display: flex; align-items: center; gap: 6px; padding-left: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; }
.discovery-city svg { width: 16px; height: 16px; fill: none; stroke: var(--brand); stroke-width: 1.8; flex-shrink: 0; }
.discovery-city select { max-width: 195px; height: 40px; min-height: 0; padding: 0 10px 0 0; border: 0; border-radius: inherit; background: transparent; font-size: 13px; cursor: pointer; }
.discovery-city.is-enhanced > button { display: none; }
.header-city { flex-shrink: 0; }
.header-city label { padding-left: 10px; background: var(--brand-soft); border-color: transparent; }
.header-city select { max-width: 125px; font-size: 12px; }
.category-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.category-pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 6px 14px; background: var(--brand-soft); border: 1px solid transparent; border-radius: 999px; color: var(--label); font-size: 12px; font-weight: 600; }
.category-pill > .category-count { font-size: 10px; color: var(--muted); font-weight: 500; }
.category-pill:hover { border-color: var(--brand); color: var(--brand-dark); }
.category-pill.on { background: #4263d1; border-color: transparent; color: #fff; }
.category-pill.on:hover { background: #304eb7; color: #fff; }
.home-catalog { margin-top: 0; }
.home-catalog > summary { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0 0 0 auto; width: fit-content; min-height: 34px; list-style: none; cursor: pointer; color: var(--brand-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }
.home-catalog > summary::-webkit-details-marker { display: none; }
.home-catalog > summary svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.home-catalog[open] > summary svg { transform: rotate(90deg); }
.home-catalog-grid { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-top: 10px; padding: 24px; max-height: 65vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.kinetic .section-head { margin-top: 24px; margin-bottom: 14px; }
.kinetic .section-head h2 { font-size: 18px; letter-spacing: -.025em; }
.kinetic .section-head > a { font-size: 12px; white-space: nowrap; }
.kinetic .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kinetic .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kinetic .card {
  --card-tint: var(--tile-blue);
  padding: 5px; border: 1px solid transparent; border-radius: 22px;
  background: linear-gradient(var(--surface), var(--card-tint)) padding-box, var(--spectrum) border-box;
  box-shadow: 0 4px 15px rgba(53, 69, 108, .045);
}
.kinetic .card-tone-1 { --card-tint: var(--tile-green); }
.kinetic .card-tone-2 { --card-tint: var(--tile-red); }
.kinetic .card-tone-3 { --card-tint: var(--tile-yellow); }
.kinetic .card-photo { aspect-ratio: 8 / 5; border-radius: 16px; }
.kinetic .card:hover .card-photo img { transform: none; }
.kinetic .card-body { padding: 10px 9px 8px; }
.kinetic .card-title { font-size: 14px; font-weight: 650; line-height: 1.35; }
.kinetic .card-price { font-size: 18px; letter-spacing: -.035em; line-height: 1.35; margin-top: 5px; overflow-wrap: anywhere; }
.kinetic .card-approx { font-size: 11px; line-height: 1.4; margin-top: 2px; }
.kinetic .card-meta { font-size: 11px; line-height: 1.4; }
.kinetic .card-tags { gap: 3px; margin: 6px 0 4px; }
.kinetic .card-tags:empty { display: none; }
.kinetic .tag { font-size: 10px; padding: 2px 6px; border-radius: 6px; }
.kinetic .card .fav { top: 12px; right: 12px; width: 32px; height: 32px; box-shadow: 0 2px 8px #20283c12; }
.kinetic .fav svg { width: 18px; height: 18px; }
.kinetic .site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 32px; }
.kinetic .logo-sm { font-size: 20px; }
.app-home-brand { margin: 0 0 18px; }
.app-home-search { display: flex; align-items: center; gap: 8px; min-height: 46px; margin-bottom: 22px; padding: 4px 5px 4px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.app-home-search > svg { width: 19px; height: 19px; stroke: var(--muted); fill: none; stroke-width: 1.8; flex-shrink: 0; }
.app-home-search input[type="search"] { width: 0; min-width: 0; flex: 1; border: 0; background: transparent; outline: none; font-size: 14px; }
/* Shared sign-in card. Provider marks and OAuth links keep their original identity. */
.kinetic .auth-card { max-width: 468px; padding: 28px; margin: 12px auto 28px; border: 1px solid transparent; border-radius: 28px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--spectrum) border-box; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand > img { border-radius: 14px; flex-shrink: 0; }
.auth-brand > div > span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: -.02em; }
.auth-brand h1 { margin: 0; font-size: 25px; line-height: 1.2; letter-spacing: -.035em; }
.kinetic .auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); margin-bottom: 20px; }
.kinetic .auth-tabs a { display: flex; align-items: center; justify-content: center; min-height: 36px; font-size: 13px; font-weight: 700; border-radius: 11px; }
.kinetic .auth-tabs a.on { background: var(--surface); box-shadow: 0 2px 7px #20283c0d; }
.kinetic .auth-card .field > span { font-size: 12px; font-weight: 650; color: var(--label); }
.kinetic .auth-card .field input { min-height: 46px; background: var(--bg); border-color: var(--line); border-radius: 14px; }
.kinetic .auth-card form.stack { gap: 14px; }
.kinetic .auth-card .btn-lg { height: 48px; font-size: 14px; }
.kinetic .oauth-signin { gap: 9px; }
.kinetic .btn-oauth { --provider-border: #d6ddeb; --provider-hover: var(--soft); min-height: 52px; padding: 10px 45px; border-radius: 15px; border-color: var(--provider-border); background: var(--surface); box-shadow: 0 2px 5px #20283c04; font-size: 14px; font-weight: 650; color: var(--ink); }
.kinetic .btn-oauth-google { --provider-hover: var(--tile-blue); }
.kinetic .btn-oauth-yandex { --provider-border: #ead9d9; --provider-hover: var(--tile-red); }
.kinetic .btn-oauth-vk { --provider-border: #ccddef; --provider-hover: var(--tile-blue); }
.kinetic .btn-oauth:hover { background: var(--provider-hover); border-color: var(--brand); color: var(--ink); }
.kinetic .btn-oauth img { left: 16px; }
.kinetic .btn-oauth .oauth-arrow { position: absolute; right: 15px; top: calc(50% - 6px); width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; opacity: .5; }
.kinetic .btn-oauth-apple, .kinetic .btn-oauth-apple:hover { background: #000; color: #fff; border-color: #000; }
.kinetic .oauth-signin > p { font-size: 10px; line-height: 1.6; margin: 3px 4px; }
.kinetic .auth-or { font-size: 11px; margin: 5px 0 2px; gap: 14px; }
.kinetic #logins { background: var(--surface); border: 1px solid transparent; border-radius: 22px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--spectrum) border-box; }
.login-provider { display: flex; align-items: center; gap: 12px; min-width: 0; }
.login-provider > img { flex-shrink: 0; }
.login-provider > span { min-width: 0; overflow-wrap: anywhere; }
.login-provider .small { display: block; margin-top: 2px; }
.kinetic #logins .blocked-list li { gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.kinetic #logins .blocked-list .linkbtn { color: var(--muted); font-size: 12px; min-height: 44px; }
.kinetic .oauth-link-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kinetic .oauth-link-buttons .btn-oauth { min-width: 0; font-size: 12px; padding-right: 12px; }
.kinetic .merge-offer { padding: 18px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--tile-blue); }
.kinetic .merge-email > summary { padding: 12px 14px; border-radius: 12px; background: var(--soft); }
@media (max-width: 900px) {
  .kinetic .mainbar { height: auto; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .kinetic .logo { font-size: 24px; }
  .kinetic .logo img { width: 34px; height: 34px; }
  .kinetic .usernav { gap: 3px; margin-left: auto; }
  .kinetic .usernav .iconlink { display: grid; width: 36px; height: 40px; }
  .kinetic .usernav .iconlink[href="/messages"] { display: none; }
  .kinetic .header-city { order: 3; }
  .kinetic .header-city label { padding-left: 8px; }
  .kinetic .header-city svg { width: 13px; height: 13px; }
  .kinetic .header-city select { width: 106px; padding-right: 0; font-size: 11px; }
  .kinetic .searchbar { flex-basis: 140px; }
  .kinetic .page { padding-top: 18px; }
  .discovery { display: block; }
  .discovery-heading { margin-bottom: 12px; }
  .home-catalog { margin-top: 6px; }
  .home-catalog-grid { position: static; max-height: none; }
  .kinetic .grid, .kinetic .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .home-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kinetic .tabbar { left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 24px; padding: 0 5px; background: var(--glass); box-shadow: 0 5px 30px #20283c12; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .kinetic .tabbar a { min-height: 60px; font-size: 10px; justify-content: center; }
  .kinetic .tabbar .tab-add span { width: 34px; height: 30px; font-size: 25px; border-radius: 11px; }
  body.kinetic { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.kinetic.has-bottom-bar { padding-bottom: calc(142px + env(safe-area-inset-bottom)); }
  .kinetic .listing-action-bar { bottom: calc(72px + env(safe-area-inset-bottom)); }
  html[data-app] body.kinetic { padding-bottom: env(safe-area-inset-bottom); }
  html[data-app] body.kinetic.has-bottom-bar { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  html[data-app] .kinetic .listing-action-bar { bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 640px) {
  .kinetic .page { padding-top: 18px; }
  .discovery { margin-bottom: 8px; }
  .discovery-heading { gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
  .discovery-heading h1 { font-size: 24px; gap: 8px; margin-bottom: 0; white-space: nowrap; }
  .discovery-city label { padding-left: 8px; }
  .discovery-city svg { width: 13px; height: 13px; }
  .discovery-city select { max-width: 130px; height: 36px; font-size: 11px; padding-right: 3px; }
  .category-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-right: 0; }
  .category-pill { min-height: 38px; border-radius: 12px; padding: 6px 3px; gap: 3px; font-size: 11px; letter-spacing: -.02em; }
  .category-pill > .category-count { display: none; }
  .category-pill.category-extra { display: none; }
  .home-catalog { margin-top: 5px; }
  .home-catalog > summary { margin: 0 0 0 auto; min-height: 32px; font-size: 11px; }
  .home-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; padding: 16px; margin-top: 6px; }
  .home-catalog-grid .catmenu-col a { font-size: 12px; }
  .home-catalog-grid .catmenu-head { font-size: 13px !important; }
  .kinetic .section-head { margin-top: 16px; margin-bottom: 12px; }
  .kinetic .section-head h2 { font-size: 16px; }
  .kinetic .grid, .kinetic .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kinetic .card { padding: 4px; border-radius: 18px; }
  .kinetic .card-photo { border-radius: 13px; aspect-ratio: 3 / 2; }
  .kinetic .card-body { padding: 8px 6px 6px; }
  .kinetic .card-title { font-size: 12px; line-height: 1.4; }
  .kinetic .card-price { font-size: 16px; margin-top: 4px; }
  .kinetic .card-meta, .kinetic .card-approx { font-size: 10px; }
  .kinetic .card .fav { width: 30px; height: 30px; top: 10px; right: 10px; }
  .app-home-brand { margin-bottom: 14px; }
  .app-home-search { margin-bottom: 20px; }
  .kinetic .auth-card { padding: 20px 16px; margin: 0 auto 16px; border-radius: 22px; }
  .auth-brand { margin-bottom: 18px; }
  .auth-brand h1 { font-size: 23px; }
  .kinetic .btn-oauth { min-height: 50px; font-size: 13px; padding-left: 42px; padding-right: 34px; }
  .kinetic .oauth-link-buttons { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .kinetic .site-header .logo { font-size: 22px; gap: 3px; }
  .kinetic .site-header .logo img { width: 30px; height: 30px; }
  .kinetic .header-languages a { min-width: 24px; }
  .kinetic .usernav .iconlink { width: 30px; }
  .kinetic .header-city select { width: 100px; }
  .kinetic .header-city label { gap: 3px; padding-left: 6px; }
  .kinetic .mainbar { gap: 8px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-dark: #adbeff; --brand-soft: #222d4c; --ink: #edf1fa; --muted: #a5b0c6;
    --label: #c5cde0; --bg: #11151e; --soft: #202737; --soft-hover: #2b3449;
    --line: #30394b; --line-strong: #4b5872; --surface: #1b2230; --raised: #283247;
    --glass: rgba(27, 34, 48, .95); --tile-blue: #202e49; --tile-green: #20372f;
    --tile-red: #382b32; --tile-yellow: #373226;
    --spectrum: linear-gradient(125deg, #4b5682, #3b7065 34%, #746b3e 64%, #77515c 86%, #554d77);
    --shadow: 0 8px 28px #0004;
  }
  body.kinetic { background: radial-gradient(ellipse at 80% 0, #1b2540 0, transparent 45%), var(--bg); }
  .category-pill.on { border-color: #596da5; }
  .kinetic .btn-primary:hover, .kinetic .btn-accent:hover { background: #304eb7; }
  .kinetic .btn-oauth { --provider-border: #4b5872; }
  .kinetic .btn-oauth-apple, .kinetic .btn-oauth-apple:hover { background: #fff; color: #000; border-color: #fff; }
  .kinetic .login-provider img[src*="/apple.svg"] { filter: invert(1); }
}
@media (prefers-contrast: more) {
  :root { --muted: #4c5871; --line: #a0aec8; --brand: #304eb7; }
  .kinetic .card { border-color: var(--line); }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --muted: #c4cee2; --line: #7d8aa3; --brand: #9db5ff; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--surface); }
  .kinetic .site-header, .kinetic .tabbar { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
