/* =====================================================================
   Oley 2.2 — TikTok-style profile page (/profile, /users/:id, /@username)
   Black canvas, white type, minimal icons. Accent = brand colour from Dizayn.
   ===================================================================== */
:root { --tp-bg: #000; --tp-s1: #121214; --tp-s2: #1c1c20; --tp-s3: #2a2a30; --tp-line: rgba(255,255,255,.08); --tp-muted: #8e8e96; --tp-red: #FF2D55; --tp-cyan: #22D3EE; --tp-gold: #FBBF24; }
.tp {
  max-width: 760px; margin: 0 auto; min-height: 100dvh; background: var(--tp-bg); color: #fff; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); animation: fadeUp .35s var(--ease); }
body:has(.tp) { background: #000; }
@media (min-width: 1024px) { .tp { padding-bottom: 48px; } }

/* top bar */
.tp-top { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: linear-gradient(#000 72%, rgba(0,0,0,0)); }
.tp-top-r { display: flex; align-items: center; gap: 6px; }
.tp-top-t { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 16px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-ib { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; transition: background .2s, transform .15s; }
.tp-ib:hover { background: var(--tp-s2); } .tp-ib:active { transform: scale(.9); }
.tp-ib .ico { width: 27px; height: 27px; }
.tp-pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 5px 0 15px; border-radius: 999px; background: var(--tp-s2); font-weight: 700; font-size: 17px; transition: transform .15s; }
.tp-pill:active { transform: scale(.95); }
.tp-bell { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--tp-s3); display: grid; place-items: center; }
.tp-bell .ico { width: 18px; height: 18px; }
.tp-bell i { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--tp-red); box-shadow: 0 0 0 2px var(--tp-s3); }

/* header */
.tp-head { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; padding: 14px 18px 2px; }
.tp-id { min-width: 0; }
.tp-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: clamp(26px, 7.6vw, 38px); font-weight: 900; letter-spacing: -.025em; line-height: 1.08; word-break: break-word; }
.tp-name .ico { width: 24px; height: 24px; }
.tp-badge { min-width: 27px; height: 27px; padding: 0 8px; border-radius: 14px; background: var(--tp-red); color: #fff; font-size: 15px; font-weight: 800; display: inline-grid; place-items: center; letter-spacing: 0; }
.tp-handle { margin-top: 6px; color: var(--tp-muted); font-size: 17px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.tp-on { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.tp-on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #55555c; }
.tp-on.on { color: #4ade80; } .tp-on.on::before { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.tp-lock { display: inline-flex; color: var(--tp-muted); }
.tp-stats { display: flex; gap: clamp(18px, 6.5vw, 46px); margin-top: 24px; }
.tp-stats > * { position: relative; text-align: left; }
.tp-stats b { display: block; font-size: clamp(22px, 6.2vw, 29px); font-weight: 800; letter-spacing: -.01em; }
.tp-stats span { color: var(--tp-muted); font-size: 15px; }
.tp-stats em { position: absolute; top: -21px; left: calc(1.2ch + 16px); font-style: normal; background: rgba(255,45,85,.16); color: var(--tp-red); border-radius: 999px; padding: 1px 8px; font-size: 13px; font-weight: 800; }
.tp-ava { position: relative; width: clamp(108px, 30vw, 150px); height: clamp(108px, 30vw, 150px); margin-top: 30px; }
.tp-av { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--z-primary), var(--z-purple, #8B3DFF) 60%, var(--tp-cyan)); }
.tp-av img { width: 100%; height: 100%; object-fit: cover; }
.tp-av.xl { width: 100%; height: 100%; font-size: 46px; border: 2px solid #2c2c32; }
.tp-dot { position: absolute; left: 10%; bottom: 8%; width: 18px; height: 18px; border-radius: 50%; background: #22c55e; border: 3px solid #000; }
.tp-plus { position: absolute; right: -2px; bottom: 6%; width: 38px; height: 38px; border-radius: 50%; background: var(--tp-cyan); color: #fff; display: grid; place-items: center; border: 3px solid #000; cursor: pointer; transition: transform .15s; }
.tp-plus:active { transform: scale(.88); } .tp-plus .ico { width: 20px; height: 20px; stroke-width: 3; }
.tp-bubble { position: absolute; top: -36px; left: 50%; transform: translateX(-50%); max-width: 180px; padding: 7px 13px; border-radius: 15px; background: var(--tp-s3); color: #dcdce2; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: tpFloat 4s ease-in-out infinite; }
.tp-bubble[role] { cursor: pointer; }
.tp-bubble::after { content: ""; position: absolute; bottom: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--tp-s3); }
@keyframes tpFloat { 50% { transform: translate(-50%, -3px); } }

/* bio, chips */
.tp-bio { padding: 14px 18px 0; font-size: 15px; line-height: 1.5; color: #ececf0; white-space: pre-line; word-break: break-word; }
.tp-bio.edit { cursor: pointer; }
.tp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px 0; }
.tp-apill { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 48px; padding: 0 20px; border-radius: 999px; background: var(--tp-s2); font-size: 17px; overflow: hidden; }
.tp-apill button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; }
.tp-apill button b { font-weight: 700; }
.tp-apill i { color: #55555c; font-style: normal; }
.tp-apill .soft { color: #c6c6cc; overflow: hidden; }
.tp-apill .tx { overflow: hidden; text-overflow: ellipsis; }
.tp-apill .hr, .tp-chips .hr { color: var(--tp-red); display: inline-flex; }
.tp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--tp-s1); border: 1px solid var(--tp-line); color: #d8d8de; font-size: 13px; }
.tp-chip.g { border-color: rgba(var(--z-primary-rgb), .45); background: rgba(var(--z-primary-rgb), .1); color: #fff; }
.tp-gifts { gap: 6px; }
.tp-gift { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--tp-s1); font-size: 20px; }
.tp-gift b { position: absolute; right: -4px; bottom: -4px; font-size: 10px; background: var(--tp-s3); border-radius: 6px; padding: 0 4px; }
.tp-gift img, .tp-gift svg { width: 26px; height: 26px; }

/* buttons */
.tp-acts { display: flex; gap: 8px; padding: 16px 18px 0; max-width: 480px; }
.tp-btn { flex: 1; height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; background: var(--tp-s2); font-weight: 700; font-size: 15px; position: relative; transition: transform .15s, background .2s; }
.tp-btn:active { transform: scale(.97); }
.tp-btn.primary { background: var(--z-primary); box-shadow: 0 10px 28px -12px rgba(var(--z-primary-rgb), .9); }
.tp-btn.soft { background: var(--tp-s2); border: 1px solid var(--tp-s3); }
.tp-btn.sq { flex: 0 0 46px; }
.tp-btn.wide { width: 100%; }
.tp-ndot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--tp-red); }

/* tabs */
.tp-tabs { position: sticky; top: 62px; z-index: 20; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); margin-top: 22px; background: #000; border-bottom: 1px solid var(--tp-line); }
.tp-tabs button { height: 54px; display: grid; place-items: center; color: #6f6f78; transition: color .25s; }
.tp-tabs button .ico { width: 28px; height: 28px; }
.tp-tabs button.on { color: #fff; }
.tp-ink { position: absolute; left: 0; bottom: -1px; width: 46px; height: 3px; border-radius: 3px; background: #fff; transition: transform .38s var(--ease); }
.tp-tt { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 10px; color: var(--tp-muted); font-size: 14px; }
.tp-tt b { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 15px; }
.tp-tt .ico.red { color: var(--tp-red); }
.tp-pane { animation: tpIn .36s var(--ease) both; }
.tp-pane.r { animation-name: tpInR; } .tp-pane.l { animation-name: tpInL; }
@keyframes tpIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tpInR { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes tpInL { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

/* poster grid (3 columns) */
.tp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.tp-grid.gap { gap: 8px; }
.tp-grid.gap .tp-card { border-radius: 10px; }
.tp-card { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; background: var(--tp-s1); cursor: pointer; }
.tp-card.post { aspect-ratio: 3 / 4; }
.tp-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s, transform .5s var(--ease); z-index: 1; }
.tp-card img.ld { opacity: 1; }
.tp-card img.img-failed { display: none; }
.tp-card:hover img { transform: scale(1.05); }
.tp-card .np { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; font-weight: 700; font-size: 13px; color: #c9c9cf; background: linear-gradient(160deg, #1d1d22, #0b0b0d); }
.tp-card.seen img { filter: grayscale(.55) brightness(.55); }
.tp-card.out { animation: tpOut .26s forwards; }
@keyframes tpOut { to { opacity: 0; transform: scale(.86); } }
.tp-card.sk, .tp-av.sk, .sk { background: linear-gradient(90deg, #111 25%, #1c1c20 37%, #111 63%); background-size: 400% 100%; animation: tpSk 1.3s ease infinite; }
@keyframes tpSk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.tp-sh { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 30px 8px 8px; background: linear-gradient(transparent, rgba(0,0,0,.92)); }
.tp-sh b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.2; }
.tp-sh small { display: block; color: #bdbdc4; font-size: 12px; margin-top: 2px; }
.tp-rt { position: absolute; z-index: 2; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 8px; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); font-size: 12px; font-weight: 800; }
.tp-rt .ico { width: 12px; height: 12px; color: var(--tp-gold); }
.tp-hb { position: absolute; z-index: 3; top: 4px; right: 4px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--tp-red); background: rgba(0,0,0,.45); backdrop-filter: blur(6px); transition: transform .2s; }
.tp-hb:active { transform: scale(.8); } .tp-hb .ico { width: 19px; height: 19px; }
.tp-tools { position: absolute; z-index: 3; top: 4px; right: 4px; display: flex; gap: 4px; }
.tp-tools.v { flex-direction: column; }
.tp-tools > * { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: #fff; }
.tp-tools .ico { width: 17px; height: 17px; }
.tp-tools .on { background: #22c55e; }
.tp-tools .f.on { background: rgba(0,0,0,.55); color: var(--tp-red); }
.tp-tools .w.on { background: rgba(0,0,0,.55); color: var(--tp-cyan); }
.tp-lk { position: absolute; z-index: 2; left: 8px; bottom: 7px; display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 15px; text-shadow: 0 1px 4px #000; }
.tp-pend { position: absolute; z-index: 2; top: 6px; right: 6px; }
.tp-add { aspect-ratio: 2 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1.5px dashed #3a3a42; background: var(--tp-s1); color: #d0d0d6; font-weight: 600; font-size: 13px; text-align: center; padding: 8px; transition: background .2s; }
.tp-add.post { aspect-ratio: 3 / 4; }
.tp-add:hover { background: var(--tp-s2); }
.tp-add span { width: 46px; height: 46px; border-radius: 50%; background: var(--tp-s3); display: grid; place-items: center; }

/* lists */
.tp-list { padding: 4px 0; }
.tp-person { display: flex; align-items: center; gap: 12px; padding: 10px 16px; transition: background .2s; }
.tp-person:hover { background: var(--tp-s1); }
.tp-person .w { position: relative; }
.tp-person .w i { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: #22c55e; border: 2px solid #000; }
.tp-person .grow { flex: 1; min-width: 0; }
.tp-person b { display: flex; align-items: center; gap: 4px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-person b .ico { width: 16px; height: 16px; }
.tp-person small { color: var(--tp-muted); font-size: 13px; }
.tp-pad { padding: 0 16px 8px; }
.tp-empty, .tp-private { padding: 52px 24px; text-align: center; color: var(--tp-muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tp-empty .i, .tp-private .i { width: 78px; height: 78px; margin-bottom: 8px; border-radius: 50%; border: 2px solid var(--tp-s3); display: grid; place-items: center; color: #d6d6dc; }
.tp-private .i { border-color: #fff; color: #fff; }
.tp-empty .i .ico, .tp-private .i .ico { width: 34px; height: 34px; }
.tp-empty b, .tp-private b { color: #fff; font-size: 17px; }
.tp-empty .tp-btn { flex: none; margin-top: 14px; padding: 0 22px; }
.tp-more { display: block; margin: 16px auto; padding: 11px 24px; border-radius: 999px; background: var(--tp-s2); font-weight: 600; font-size: 14px; }

/* sheets & editors */
.tp-count { text-align: right; font-size: 12px; color: var(--muted); margin-top: 6px; }
.tp-tagbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 52px; padding: 8px; border-radius: var(--r-sm); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.tp-tagbox input { flex: 1; min-width: 140px; height: 34px; background: none; border: 0; outline: none; padding: 0 6px; font-size: 15px; }
.tp-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--surface-3); font-size: 13.5px; }
.tp-tag button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.tp-tag .ico { width: 12px; height: 12px; stroke-width: 3; }
.tp-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-genre { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: 14px; transition: .2s; }
.tp-genre.on { background: rgba(var(--z-primary-rgb), .16); border-color: var(--z-primary); color: #fff; }
.tp-menu .list-item { width: 100%; text-align: left; }
.sheet.tp-sheet-wide { max-width: 640px; }
.tp-pick { min-height: 220px; }
.toast.tp-undo { display: flex; align-items: center; gap: 16px; }
.toast.tp-undo button { color: var(--z-primary); font-weight: 800; }

/* film page: watchlist button */
.btn.wl-on { color: var(--tp-cyan, #22D3EE); border-color: rgba(34,211,238,.5); }
.btn.wl-on .ico { fill: currentColor; }

@media (min-width: 768px) {
  .tp-head { padding: 22px 26px 2px; }
  .tp-bio, .tp-row, .tp-acts { padding-left: 26px; padding-right: 26px; }
  .tp-grid { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .tp *, .tp { animation: none !important; transition: none !important; } }

/* 2.2.10: profile photo on the left */
.tp-head.tp-head-l { grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.tp-head-l .tp-ava { margin-top: 34px; width: clamp(96px, 27vw, 140px); height: clamp(96px, 27vw, 140px); }
.tp-head-l .tp-id { padding-top: 22px; }
.tp-head-l .tp-bubble { left: 0; transform: none; max-width: 170px; }
.tp-head-l .tp-bubble::after { left: 34px; }
.tp-head-l .tp-handle { margin-top: 4px; font-size: 15px; }
.tp-head-l .tp-name { font-size: clamp(22px, 6.4vw, 30px); }

/* 2.2.10: profile photo editor (zoom + drag) */
.tp-crop h3 { margin: 0 0 12px; font-size: 18px; text-align: center; }
.tp-crop-box { position: relative; width: min(84vw, 340px); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: 18px; background: #000; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tp-crop-box:active { cursor: grabbing; }
.tp-crop-box img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.tp-crop-mask { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .55); outline: 2px solid rgba(255, 255, 255, .85); outline-offset: -2px; }
.tp-crop-hint { margin: 10px 0 4px; text-align: center; font-size: 13px; color: var(--tp-muted, #9a9aa5); }
.tp-crop-zoom { display: flex; align-items: center; gap: 12px; max-width: 340px; margin: 6px auto 14px; }
.tp-crop-zoom input { flex: 1; accent-color: var(--tp-cyan, #22d3ee); }
.tp-crop-zoom button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.tp-crop-acts { display: flex; gap: 8px; }
.tp-crop-acts .btn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-crop-acts [data-ok] { flex-grow: 1.4; }

/* 2.3.0: Premium look on the profile — gold ring, Premium pill, blue tick */
.tp-ava.pm .tp-av { box-shadow: 0 0 0 3px #000, 0 0 0 6px #F2C76E, 0 12px 34px -10px rgba(242,199,110,.7); }
.tp-pm { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 999px; background: linear-gradient(115deg, #FFE3A3, #F2C76E 45%, #C9973F); color: #1a1205; font-size: 12.5px; font-weight: 900; letter-spacing: .02em; }
.tp-pm .ico { width: 14px; height: 14px; color: #1a1205; }
.tp-name .verified { width: 24px; height: 24px; }
.tp-bubble, .tp-dot { display: none !important; }
