/* SaraFilm — komponentlar */

/* ---------------------------------------------------------------- tugmalar */
.btn {
    --btn-bg: oklch(1 0 0 / 0.08);
    --btn-fg: var(--ink);
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 22px;
    border-radius: var(--r-md);
    border: 1px solid oklch(1 0 0 / 0.14);
    background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 600; font-size: 0.96rem; line-height: 1; white-space: nowrap;
    transition: transform 0.25s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.25s, color 0.2s;
    user-select: none;
}
.btn:hover { --btn-bg: oklch(1 0 0 / 0.15); border-color: oklch(1 0 0 / 0.28); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.975); transition-duration: 0.08s; }
.btn .icon { width: 20px; height: 20px; }
.btn[disabled], .btn[aria-busy='true'] { opacity: 0.55; pointer-events: none; }

.btn-primary {
    --btn-bg: var(--amber); --btn-fg: var(--amber-ink);
    border-color: transparent;
    box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.35), inset 0 -2px 0 oklch(0.6 0.16 55 / 0.55),
                0 10px 26px -12px oklch(0.8 0.165 68 / 0.7);
    font-weight: 700;
}
.btn-primary:hover {
    --btn-bg: var(--amber-hi); border-color: transparent;
    box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.45), inset 0 -2px 0 oklch(0.6 0.16 55 / 0.55),
                0 16px 32px -12px oklch(0.8 0.165 68 / 0.8);
}
.btn-primary .icon:last-child { transition: transform 0.3s var(--ease); }
.btn-primary:hover .icon:last-child { transform: translateX(4px); }

.btn-ghost { --btn-bg: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { --btn-bg: oklch(1 0 0 / 0.08); border-color: transparent; color: var(--ink); }

.btn-danger { --btn-fg: oklch(0.78 0.16 22); border-color: oklch(0.63 0.21 20 / 0.45); }
.btn-danger:hover { --btn-bg: oklch(0.63 0.21 20 / 0.16); border-color: var(--crimson); }

.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }

/* holat tugmasi: saqlash / sevimli / koʻrilgan */
.btn.is-on { --btn-bg: var(--amber-soft); --btn-fg: var(--amber); border-color: oklch(0.8 0.165 68 / 0.45); }
.btn.is-on .icon { fill: currentColor; }
.btn.is-on .icon-check { fill: none; }

.icon-btn {
    display: inline-grid; place-items: center; flex: none;
    width: 44px; height: 44px; border-radius: 50%;
    color: var(--ink-2);
    transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { background: oklch(1 0 0 / 0.1); color: var(--ink); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn .icon { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- chiplar */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 36px; padding: 0 14px; border-radius: 99px;
    border: 1px solid var(--line); background: transparent;
    color: var(--ink-2); font-size: 0.88rem; font-weight: 500; white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
a.chip:hover, button.chip:hover { border-color: var(--ink-3); color: var(--ink); background: oklch(1 0 0 / 0.05); }
.chip[aria-pressed='true'], .chip[aria-selected='true'], .chip.is-active {
    background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600;
}
.chip small { font-size: 0.78rem; opacity: 0.65; font-variant-numeric: tabular-nums; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.chips-scroll::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- formalar */
.field { display: grid; gap: 8px; }
.field label, .field-label { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.input, .select {
    width: 100%; min-height: 50px; padding: 0 16px;
    border-radius: var(--r-md); border: 1px solid var(--line);
    background: var(--bg-2); color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.input::placeholder { color: var(--ink-3); }
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus, .select:focus {
    outline: none; border-color: var(--amber); background: var(--bg-3);
    box-shadow: 0 0 0 4px oklch(0.8 0.165 68 / 0.18);
}
.input[aria-invalid='true'] { border-color: var(--crimson); box-shadow: 0 0 0 4px oklch(0.63 0.21 20 / 0.16); }
.input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 100px var(--bg-3) inset; }
.select {
    appearance: none; padding-right: 42px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9aec4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.select option { background: var(--bg-2); color: var(--ink); }
.field-hint { font-size: 0.82rem; color: var(--ink-3); }
.field-error { font-size: 0.85rem; color: oklch(0.78 0.15 22); min-height: 1.2em; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .icon-btn { position: absolute; right: 4px; top: 3px; }

.form-alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; border-radius: var(--r-md);
    background: oklch(0.63 0.21 20 / 0.14); border: 1px solid oklch(0.63 0.21 20 / 0.4);
    color: oklch(0.88 0.07 22); font-size: 0.92rem;
}
.form-alert.is-ok { background: oklch(0.8 0.15 158 / 0.12); border-color: oklch(0.8 0.15 158 / 0.4); color: oklch(0.9 0.08 158); }

/* ---------------------------------------------------------------- boʻlim sarlavhasi */
.section { margin-top: clamp(48px, 6vw, 84px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(1.35rem, 1.7vw, 2rem); }
.section-head .more {
    display: inline-flex; align-items: center; gap: 6px; flex: none;
    padding-bottom: 4px; color: var(--ink-3); font-size: 0.9rem; font-weight: 600;
    transition: color 0.2s, gap 0.3s var(--ease);
}
.section-head .more:hover { color: var(--amber); gap: 10px; }
.section-head .more .icon { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- afisha kartasi */
.card { position: relative; min-width: 0; }
.card-link { display: block; }
.poster {
    position: relative; aspect-ratio: 2 / 3; overflow: hidden;
    border-radius: var(--r-sm); background: var(--bg-3);
    box-shadow: var(--shadow-1);
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.poster::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.08);
}
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease), opacity 0.4s; }
.poster img:not(.is-loaded) { opacity: 0; }
.poster-fallback {
    position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; padding: 14px;
    font: 700 0.86rem/0.95 var(--font-display); text-align: center; text-wrap: balance;
    color: var(--ink-3);
    background: repeating-linear-gradient(-60deg, transparent 0 18px, oklch(1 0 0 / 0.025) 18px 36px);
}
.poster img { position: relative; z-index: 1; }

@media (hover: hover) {
    .card:hover .poster { transform: translateY(-6px); box-shadow: var(--shadow-2); }
    .card:hover .poster img { transform: scale(1.04); }
}

/* reyting — chipta qirqimi */
.ticket {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 11px 2px; background: var(--amber); color: var(--amber-ink);
    font: 700 0.8rem/1.1 var(--font-display); font-variant-numeric: tabular-nums;
    -webkit-mask: radial-gradient(circle 5px at 0 50%, #0000 96%, #000) 0 0 / 51% 100% no-repeat,
                  radial-gradient(circle 5px at 100% 50%, #0000 96%, #000) 100% 0 / 51% 100% no-repeat;
            mask: radial-gradient(circle 5px at 0 50%, #0000 96%, #000) 0 0 / 51% 100% no-repeat,
                  radial-gradient(circle 5px at 100% 50%, #0000 96%, #000) 100% 0 / 51% 100% no-repeat;
}
.ticket .icon { width: 0.72em; height: 0.72em; fill: currentColor; stroke: none; margin-top: -2px; }
.poster .ticket { position: absolute; z-index: 2; left: 8px; bottom: 8px; }
.ticket-lg { font-size: 2.6rem; padding: 6px 20px 3px; }
.ticket-lg .icon { width: 0.5em; height: 0.5em; margin-top: -4px; }

.card-title {
    margin-top: 12px; font-size: 0.95rem; font-weight: 600; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.2s;
}
.card:hover .card-title { color: var(--amber); }
.card-meta { margin-top: 3px; font-size: 0.83rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.card-role { margin-top: 3px; font-size: 0.83rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-save {
    position: absolute; z-index: 3; top: 8px; right: 8px;
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    background: oklch(0.14 0.004 200 / 0.78); color: var(--ink);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    opacity: 0; transform: translateY(-4px);
    transition: opacity 0.25s, transform 0.3s var(--ease), background-color 0.2s, color 0.2s;
}
.card-save .icon { width: 19px; height: 19px; }
.card:hover .card-save, .card-save:focus-visible, .card-save.is-on { opacity: 1; transform: translateY(-6px); }
.card-save:hover { background: var(--ink); color: var(--bg); }
.card-save.is-on { background: var(--amber); color: var(--amber-ink); }
.card-save.is-on .icon { fill: currentColor; }
@media (hover: none) {
    .card-save { opacity: 1; transform: none; }
    .card:hover .card-save, .card-save.is-on { transform: none; }
}

.my-rating {
    position: absolute; z-index: 2; right: 8px; bottom: 8px;
    display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 6px;
    background: oklch(0.14 0.004 200 / 0.85); color: var(--ink); font-size: 0.78rem; font-weight: 700;
}
.my-rating .icon { width: 12px; height: 12px; fill: var(--amber); stroke: none; }

/* ---------------------------------------------------------------- toʻr va lenta */
.grid {
    display: grid; gap: clamp(20px, 2.4vw, 32px) clamp(12px, 1.6vw, 22px);
    grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 13.5vw, 190px), 1fr));
}

.rail { position: relative; }
.rail-track {
    display: grid; grid-auto-flow: column; grid-auto-columns: clamp(136px, 14vw, 196px);
    gap: clamp(12px, 1.4vw, 20px);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter) 6px;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
.rail-btn {
    position: absolute; z-index: 5; top: calc(10px + (clamp(136px, 14vw, 196px) * 1.5) / 2);
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
    background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2);
    transform: translateY(-50%) scale(0.9); opacity: 0;
    transition: opacity 0.25s, transform 0.3s var(--ease), background-color 0.2s;
}
.rail-btn:hover { background: var(--amber); color: var(--amber-ink); }
.rail-btn[data-dir='prev'] { left: -12px; }
.rail-btn[data-dir='next'] { right: -12px; }
.rail:hover .rail-btn:not([disabled]), .rail-btn:focus-visible { opacity: 1; transform: translateY(-50%) scale(1); }
.rail-btn[disabled] { opacity: 0 !important; pointer-events: none; }
@media (hover: none) { .rail-btn { display: none; } }

/* ---------------------------------------------------------------- shaxs kartasi */
.person { display: block; min-width: 0; }
.person-photo {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r-sm);
    background: var(--bg-3); box-shadow: var(--shadow-1);
    transition: transform 0.45s var(--ease);
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: opacity 0.4s, transform 0.7s var(--ease); }
.person-photo img:not(.is-loaded) { opacity: 0; }
.person-photo .poster-fallback { font-size: 2.4rem; }
.person-photo img { position: relative; z-index: 1; }
@media (hover: hover) {
    .person:hover .person-photo { transform: translateY(-6px); }
    .person:hover .person-photo img { transform: scale(1.04); }
}
.person-rank {
    position: absolute; z-index: 2; left: 0; top: 0; padding: 4px 10px 2px;
    background: var(--ink); color: var(--bg); border-bottom-right-radius: var(--r-sm);
    font: 700 0.8rem/1.1 var(--font-display); font-variant-numeric: tabular-nums;
}
.person-name { margin-top: 10px; font-weight: 600; font-size: 0.95rem; line-height: 1.3; transition: color 0.2s; }
.person:hover .person-name { color: var(--amber); }
.person-sub { margin-top: 2px; font-size: 0.83rem; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ixcham shaxs qatori (ijodkorlar roʻyxati) */
.crew-grid { display: grid; gap: 8px 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.crew {
    display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: var(--r-md);
    transition: background-color 0.2s;
}
.crew:hover { background: var(--bg-2); }
.crew-photo {
    position: relative; flex: none; width: 56px; height: 72px; border-radius: var(--r-xs); overflow: hidden; background: var(--bg-3);
    display: grid; place-items: center; font: 700 0.83rem var(--font-display); color: var(--ink-3);
}
.crew-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.crew-name { font-weight: 600; line-height: 1.3; }
.crew-role { font-size: 0.85rem; color: var(--ink-3); line-height: 1.35; margin-top: 2px; }

/* ---------------------------------------------------------------- yorliqlar (tabs) */
.tabs {
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
    border-bottom: 1px solid var(--line-soft);
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    position: relative; flex: none; padding: 16px 14px 14px;
    font: 700 0.93rem/1 var(--font-display);
    color: var(--ink-3); transition: color 0.2s;
}
.tab small { font: 600 0.75rem var(--font-body); letter-spacing: 0; color: var(--ink-3); margin-left: 6px; vertical-align: 0.35em; font-variant-numeric: tabular-nums; }
.tab::after {
    content: ''; position: absolute; inset: auto 14px -1px 14px; height: 3px; background: var(--amber);
    transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected='true'] { color: var(--ink); }
.tab[aria-selected='true']::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- skelet, boʻsh holat */
.skeleton {
    border-radius: var(--r-sm);
    background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%) 0 0 / 300% 100%;
    animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }
.skeleton-poster { aspect-ratio: 2 / 3; }
.skeleton-line { height: 14px; margin-top: 12px; width: 80%; }
.skeleton-block { height: 180px; }

.empty {
    display: grid; justify-items: center; gap: 14px; text-align: center;
    padding: clamp(48px, 8vw, 96px) 20px;
}
.empty-mark {
    width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
    background: var(--bg-2); color: var(--amber); border: 1px dashed var(--line);
}
.empty-mark .icon { width: 34px; height: 34px; }
.empty h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.empty p { max-width: 46ch; color: var(--ink-2); }
.empty .btn { margin-top: 8px; }

.load-more { display: flex; justify-content: center; margin-top: 40px; }

/* ---------------------------------------------------------------- foydalanuvchi menyusi */
.avatar {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    background: var(--amber); color: var(--amber-ink);
    font: 700 0.86rem/1 var(--font-display); padding-top: 2px;
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.avatar:hover { transform: scale(1.06); box-shadow: 0 0 0 4px var(--amber-soft); }
.menu { position: relative; }
.menu-panel {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 120; min-width: 240px; padding: 8px;
    border-radius: var(--r-lg); background: var(--bg-3); border: 1px solid var(--line); box-shadow: var(--shadow-2);
    transform-origin: 90% 0; animation: menu-in 0.22s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: scale(0.94) translateY(-6px); } }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.menu-head span { font-size: 0.83rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; display: block; }
.menu-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 10px;
    color: var(--ink-2); font-weight: 500; font-size: 0.94rem; text-align: left;
    transition: background-color 0.15s, color 0.15s;
}
.menu-item:hover { background: oklch(1 0 0 / 0.08); color: var(--ink); }
.menu-item .icon { width: 19px; height: 19px; }

/* ---------------------------------------------------------------- bildirishnoma */
.toasts {
    position: fixed; z-index: 400; left: 50%; bottom: calc(var(--tabbar-h) + 24px); transform: translateX(-50%);
    display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 460px);
}
.toast {
    display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 14px;
    background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.93rem;
    box-shadow: var(--shadow-2); pointer-events: auto;
    animation: toast-in 0.4s var(--ease);
}
.toast.is-error { background: var(--crimson); color: oklch(0.98 0.01 20); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.toast a { text-decoration: underline; text-underline-offset: 3px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }

/* ---------------------------------------------------------------- qidiruv oynasi */
dialog { color: var(--ink); border: 0; padding: 0; max-width: none; max-height: none; }
dialog::backdrop { background: oklch(0.08 0.004 200 / 0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.search-dialog {
    width: min(720px, calc(100vw - 24px)); margin: clamp(12px, 9vh, 96px) auto auto;
    border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow-2);
    overflow: hidden;
}
.search-dialog[open] { animation: dialog-in 0.3s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(-14px) scale(0.98); } }
.search-form { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 20px; border-bottom: 1px solid var(--line-soft); }
.search-form > .icon { width: 22px; height: 22px; color: var(--amber); }
.search-form input {
    flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; font-size: 1.1rem; outline: none;
}
.search-form input::placeholder { color: var(--ink-3); }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-results { max-height: min(62vh, 560px); overflow-y: auto; padding: 8px; }
.search-results:empty { display: none; }
.search-group {
    padding: 12px 12px 6px; font: 700 0.8rem var(--font-display); color: var(--ink-3);
}
.search-item {
    display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 12px;
    transition: background-color 0.12s;
}
.search-item:hover, .search-item.is-active { background: var(--bg-4); }
.search-thumb {
    flex: none; width: 44px; height: 62px; border-radius: 5px; overflow: hidden; background: var(--bg-3);
    display: grid; place-items: center; color: var(--ink-3);
}
.search-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.search-item strong { display: block; font-weight: 600; line-height: 1.3; color: var(--ink); }
.search-item span span { font-size: 0.85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.search-item .ticket { margin-left: auto; font-size: 1.05rem; flex: none; color: var(--amber-ink); }
.search-note { padding: 28px 16px; text-align: center; color: var(--ink-3); }
.search-all {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; padding: 14px;
    border-top: 1px solid var(--line-soft); color: var(--amber); font-weight: 600; font-size: 0.93rem; border-radius: 0 0 12px 12px;
}
.search-all:hover, .search-all.is-active { background: var(--bg-3); }

/* ---------------------------------------------------------------- rasm koʻrgich */
.lightbox { width: 100vw; height: 100dvh; background: transparent; }
.lightbox::backdrop { background: oklch(0.06 0.004 200 / 0.94); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 64px clamp(12px, 6vw, 96px); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-xs); box-shadow: var(--shadow-2); }
.lightbox .icon-btn { position: absolute; background: oklch(0.2 0.004 200 / 0.8); color: var(--ink); width: 52px; height: 52px; }
.lightbox .icon-btn:hover { background: var(--amber); color: var(--amber-ink); }
.lightbox [data-lb='close'] { top: 16px; right: 16px; }
.lightbox [data-lb='prev'] { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox [data-lb='next'] { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); color: var(--ink-2); font-size: 0.9rem; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- baholash oynasi */
.rate-dialog {
    width: min(480px, calc(100vw - 24px)); margin: auto; padding: 28px;
    border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow-2);
    text-align: center;
}
.rate-dialog[open] { animation: dialog-in 0.3s var(--ease); }
.rate-dialog h2 { font-size: 1.5rem; }
.rate-dialog p { color: var(--ink-2); margin-top: 6px; }
.rate-value { font: 700 3.2rem/1 var(--font-display); color: var(--amber); margin-top: 18px; font-variant-numeric: tabular-nums; min-height: 1em; }
.rate-stars { display: flex; justify-content: center; margin-top: 8px; }
.rate-stars button { padding: 6px 3px; color: var(--line); transition: color 0.12s, transform 0.2s var(--ease); }
.rate-stars button .icon { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.rate-stars button.is-lit { color: var(--amber); }
.rate-stars button:hover { transform: scale(1.18); }
.rate-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

@media (max-width: 760px) {
    .section-head h2 { font-size: 1.3rem; }
    .rail-track { grid-auto-columns: 132px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 20px 12px; }
    .card-title { font-size: 0.88rem; }
    .tab { font-size: 0.95rem; padding-inline: 10px; }
    .rate-stars button .icon { width: 25px; height: 25px; }
    .search-dialog { margin-top: 10px; }
}

/* ================================================================ iTV uslubidagi komponentlar */
.btn { border-radius: 12px; border-color: transparent; --btn-bg: var(--bg-2); font-weight: 600; }
.btn:hover { --btn-bg: var(--bg-4); border-color: transparent; transform: none; }
.btn-primary { --btn-bg: var(--amber); box-shadow: none; font-weight: 700; }
.btn-primary:hover { --btn-bg: var(--amber-hi); box-shadow: none; }
.btn-ghost { --btn-bg: transparent; }
.btn.is-on { --btn-bg: var(--amber-soft); border-color: transparent; }
.btn-danger { border-color: transparent; --btn-bg: oklch(0.63 0.21 20 / 0.14); }
.btn-share { width: 50px; min-height: 50px; padding: 0; }
.btn-lg { min-height: 50px; border-radius: 12px; font-size: 0.98rem; }

.chip { border-color: transparent; background: var(--bg-2); color: var(--ink-2); }
a.chip:hover, button.chip:hover { border-color: transparent; background: var(--bg-4); }

.section-head { align-items: center; margin-bottom: 14px; }
.section-head h2 a { display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s; }
.section-head h2 a .icon { width: 0.8em; height: 0.8em; stroke-width: 2.6; transition: transform 0.3s var(--ease); }
.section-head h2 a:hover { color: var(--amber); }
.section-head h2 a:hover .icon { transform: translateX(4px); }

.poster { border-radius: 12px; box-shadow: none; }
.poster::after { display: none; }
.person-photo { border-radius: 12px; box-shadow: none; }
@media (hover: hover) {
    .card:hover .poster, .person:hover .person-photo { transform: none; box-shadow: none; }
}
.card:hover .card-title, .person:hover .person-name { color: var(--ink); }
.poster-fallback { font-size: 0.9rem; line-height: 1.25; background: var(--bg-2); }

/* reyting — chipta qirqimi (avvalgi ko'rinish) */
.ticket {
    padding: 3px 11px 2px; border-radius: 0;
    font: 800 1.2rem/1.1 var(--font-brand); letter-spacing: 0.02em;
}
.ticket .icon { width: 0.72em; height: 0.72em; margin-top: -2px; }
.ticket-lg { font-size: 2.6rem; padding: 6px 20px 3px; }
.ticket-lg .icon { width: 0.5em; height: 0.5em; margin-top: -4px; }
.search-item .ticket, .episode-meta .ticket { font-size: 1.05rem; }
.person-rank { padding: 5px 9px; border-radius: 12px 0 12px 0; background: var(--amber); color: var(--amber-ink); }
.card-save { border-radius: 10px; }

.tabs { gap: 20px; }
.tab { padding: 14px 0 13px; font-weight: 600; letter-spacing: -0.01em; }
.tab::after { inset: auto 0 -1px 0; height: 2px; }
.tab small { vertical-align: 0; }

.rail-track { grid-auto-columns: clamp(140px, 11.6vw, 220px); }
.rail-btn {
    top: calc(10px + (clamp(140px, 11.6vw, 220px) * 1.5) / 2);
    border-radius: 12px; width: 44px; height: 56px; background: oklch(0.215 0.004 200 / 0.9); color: var(--ink);
}
.rail-btn:hover { background: var(--bg-4); color: var(--ink); }
.rail-btn[data-dir='prev'] { left: -8px; }
.rail-btn[data-dir='next'] { right: -8px; }

.avatar { border-radius: 12px; width: 50px; height: 50px; padding: 0; font-size: 1.05rem; }
.avatar:hover { transform: none; box-shadow: none; background: var(--amber-hi); }
.search-dialog, .rate-dialog, .menu-panel { border-color: transparent; background: var(--bg-2); }
.input, .select { border-color: transparent; background-color: var(--bg-2); }
.input:hover, .select:hover { border-color: var(--line); }
.input:focus, .select:focus { background-color: var(--bg-2); border-color: var(--amber); }
.segmented { border-color: transparent; border-radius: 14px; }
.segmented button { border-radius: 10px; }
.empty-mark { border: 0; border-radius: 20px; }
.rate-value { font-weight: 800; }
@media (max-width: 760px) {
    .rail-track { grid-auto-columns: 132px; }
    .avatar { width: 44px; height: 44px; }
}
