/* The photo extends behind Telegram chrome; only controls respect safe areas. */
:root { background: #000; color: #fff; color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { box-sizing: border-box; }
html, body, #root { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; background: #000; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.loading-screen, .status-screen { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.loading-screen { touch-action: none; }
.loader { width: 22px; height: 22px; border: 2px solid #333; border-top-color: #aaa; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader { animation: none; } }
.status-screen { overflow-y: auto; padding: calc(24px + var(--device-top, 0px) + var(--content-top, 0px)) 24px calc(24px + var(--device-bottom, 0px)); }
.status-screen section { max-width: 340px; text-align: center; }
.status-screen h1 { font-size: 22px; }
.status-screen p { color: #aaa; font-size: 15px; line-height: 1.6; }
.status-screen button, .button { display: inline-block; font: inherit; border: 0; border-radius: 14px; padding: 14px 22px; background: #fff; color: #000; margin-top: 16px; text-decoration: none; cursor: pointer; }
.app-shell {
  position: absolute;
  top: 0; left: 0; width: 100%;
  height: var(--app-height, 100svh);
  touch-action: pinch-zoom;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}
.tab-content { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.feed-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.tabbar {
  display: flex;
  flex: none;
  background: #000;
  padding: 0 max(var(--device-right, env(safe-area-inset-right, 0px)), var(--content-right, 0px)) max(var(--device-bottom, env(safe-area-inset-bottom, 0px)), var(--content-bottom, 0px)) max(var(--device-left, env(safe-area-inset-left, 0px)), var(--content-left, 0px));
}
.tab-button { flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; justify-content: center; border: 0; padding: 10px 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tab-button img { display: block; pointer-events: none; }
.tab-feed:not([aria-current]) img { opacity: .3; }
.tab-profile[aria-current] img { filter: brightness(0) invert(1); }
.tab-matches[aria-current] img { filter: brightness(0) invert(1); }
.tab-button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 8px; }

.feed-photo[hidden] { display: none; }

@font-face { font-family: Inter; src: url('/assets/inter-latin-BYUaCkDG.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url('/assets/inter-cyrillic-C6nVnD8i.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
.profile-card { position: absolute; inset: 0; font-family: Inter, sans-serif; font-synthesis: none; font-optical-sizing: none; font-weight: 400; }
.profile-card[hidden] { display: none; }
.photo-gallery { position: absolute; inset: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pinch-zoom; }
.gallery-photo { position: absolute; inset: 0; pointer-events: none; }
.profile-overlay { display: flex; align-items: flex-end; position: absolute; bottom: 12px; left: 0; right: 0; pointer-events: none; padding-left: max(var(--device-left, 0px), var(--content-left, 0px)); padding-right: max(var(--device-right, 0px), var(--content-right, 0px)); }
.profile-overlay::before { content: ''; position: absolute; inset: 9px 0 -12px; background: linear-gradient(transparent, #000); }
.profile-info { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.profile-heading { padding: 0 16px; display: flex; flex-direction: column; gap: 4px; }
.profile-heading h1 { margin: 0; font-size: 20px; font-weight: 800; line-height: 24px; }
.profile-job { margin: 0; color: #ffffff99; font-size: 14px; font-weight: 500; line-height: 18px; letter-spacing: -.154px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
.badge { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 8px 4px 4px; border-radius: 32px; position: relative; overflow: hidden; background: transparent; color: #fff; font-size: 12px; font-weight: 600; line-height: 14px; }
/* Sample the current photo at the badge's exact position. Unlike backdrop-filter,
   this remains live across WebKit compositing boundaries. Figma blur radius 10
   maps to CSS Gaussian sigma 5. The tint is a separate 40% layer. */
.photo-surface::before { content: ''; position: absolute; inset: -15px; background-image: linear-gradient(to bottom, transparent var(--shade-start), #000 var(--sample-height)), var(--badge-photo); background-size: var(--sample-width) var(--sample-height), var(--photo-width) var(--photo-height); background-repeat: no-repeat; background-position: var(--sample-x) var(--sample-y), var(--photo-x) var(--photo-y); filter: blur(5px); pointer-events: none; }
.photo-surface::after { content: ''; position: absolute; inset: 0; background: rgba(65,63,64,.4); pointer-events: none; }
.photo-surface > *, .badge-accent > * { position: relative; z-index: 1; }
.badge img { display: block; flex: none; }
.badge-accent { background: #fff; color: #000; gap: 0; }
.profile-bio { margin: 0 16px 10px; font-size: 14px; line-height: 18px; letter-spacing: -.154px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.photo-pagination { position: absolute; z-index: 2; bottom: 0; left: max(var(--device-left, 0px), var(--content-left, 0px)); right: max(var(--device-right, 0px), var(--content-right, 0px)); height: 12px; padding: 4px 16px; display: flex; gap: 2px; pointer-events: none; }
.photo-step { height: 2.5px; flex: 1; border-radius: 1000px; background: rgba(179,178,179,.3); overflow: hidden; }
.photo-step > span { display: block; width: 100%; height: 100%; background: white; transform-origin: left; }
.gallery-keyboard-controls { position: absolute; top: 25%; left: 16px; right: 16px; display: flex; gap: 8px; z-index: 3; }
.gallery-keyboard-controls:not(:focus-within) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.gallery-keyboard-controls button { border: 1px solid white; border-radius: 8px; background: #111; color: white; padding: 8px; }
.photo-error { position: absolute; top: 30%; left: 16px; right: 16px; text-align: center; }

.profile-actions { position: relative; flex: none; padding: 0 16px 12px 0; }
.reaction-capsule { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 10px 6px; border-radius: 1040px; overflow: hidden; pointer-events: auto; }
.reaction-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.reaction-button img { display: block; pointer-events: none; }
.reaction-button:active { transform: scale(.9); }
.reaction-button:focus-visible { outline: 2px solid white; outline-offset: 1px; background: #ffffff20; }

.reaction-button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.reaction-playing img { opacity: 0; }
.reaction-effect { position: absolute; z-index: 5; pointer-events: none; left: var(--reaction-x); top: var(--reaction-y); width: 0; height: 0; }
.reaction-effect-icon { position: absolute; width: 84px; height: 84px; left: -42px; top: -42px; }
.reaction-effect-burst { position: absolute; width: 200px; height: 200px; right: -26px; top: -100px; }
.reaction-effect.is-super .reaction-effect-icon { transform: translateX(-20px) scale(1.35); }
.reaction-effect.is-super .reaction-effect-burst { transform: translateX(-22px) scale(1.35); transform-origin: right center; }
.reaction-effect.is-holding .reaction-effect-icon, .reaction-effect.is-holding .reaction-effect-burst { animation: reaction-charge 1.1s ease-out both; }
@keyframes reaction-charge { from { transform: translateX(0) scale(1); } to { transform: translateX(-22px) scale(1.35); } }
.reaction-effect.is-static img { position: absolute; left: -21px; top: -21px; }
.reaction-effect.is-static:not(.is-holding) img { animation: reaction-fade .24s ease-out both; }
@keyframes reaction-fade { from { opacity: 1; } to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .reaction-button:active { transform: none; }
  .reaction-effect * { transform: none !important; }
}

.feed-pager { position: absolute; inset: 0; overflow: hidden; touch-action: pinch-zoom; }
.feed-pager[hidden] { display: none; }
.feed-track { position: absolute; inset: 0; }
.feed-pager[data-moving] .feed-track { will-change: transform; }
.feed-page { position: absolute; left: 0; width: 100%; height: 100%; }
