/* MyDoramy — указатель жанров (.gx), полка подборок (.hb) и папка зрителя (.fd).
   Своя вёрстка, не KinoLumo. Токены — из dy.css. */

:where(.gx, .hb, .fd) a { color: inherit; text-decoration: none; }
:where(.gx, .hb, .fd) button { font: inherit; color: inherit; }
:where(.gx, .hb, .fd) :is(h1, h2, p, ul) { margin: 0; padding: 0; }
:where(.gx, .hb, .fd) ul { list-style: none; }
:is(.gx, .hb, .fd) [hidden] { display: none !important; }
.hb .is-hidden { display: none !important; }

@keyframes hbIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.gx, .hb, .fd { display: grid; gap: 30px; padding-top: 104px; padding-bottom: 90px; color: var(--fg); }
.gx-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--fg-3); }
.gx-crumbs a:hover { color: var(--fg); }
.gx-crumbs > span:last-child { color: var(--fg-2); }
.gx-head h1, .hb-head h1, .fd-head h1 { font: 600 clamp(44px, 5.6vw, 76px)/1 var(--f-d); letter-spacing: -.01em; margin: 4px 0 14px; overflow-wrap: anywhere; }
.gx-lead { max-width: 640px; color: var(--fg-2); font-size: 15.5px; line-height: 1.6; }

/* ── жанры: указатель настроений ── */
.gx-index { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 4px; max-width: 1240px; }
.gx-index li { display: inline-flex; align-items: baseline; animation: hbIn .5s var(--ease) both; animation-delay: var(--d, 0ms); }
.gx-index li + li::before { content: "·"; margin: 0 14px 0 10px; font: italic 500 30px var(--f-d); color: var(--fg-3); }
.gx-word { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 6px; border-radius: 16px; isolation: isolate; transition: color .25s; }
.gx-word__bg { position: absolute; inset: -6px -10px; z-index: -1; border-radius: 18px; background: center / cover no-repeat; opacity: 0; transform: scale(.94); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.gx-word__bg::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(10, 8, 14, .78), rgba(10, 8, 14, .5)); }
.gx-word__t { font: 600 34px/1.1 var(--f-d); letter-spacing: -.005em; }
.gx-word--0 .gx-word__t { font-size: 28px; color: var(--fg-2); }
.gx-word--1 .gx-word__t { font-size: 34px; }
.gx-word--2 .gx-word__t { font-size: 42px; }
.gx-word--3 .gx-word__t { font-size: 52px; }
.gx-word--4 .gx-word__t { font-size: 64px; font-style: italic; color: var(--accent); }
.gx-word sup { font: 600 11.5px var(--f-b); letter-spacing: .04em; color: var(--fg-3); white-space: nowrap; top: -1.4em; }
.gx-word:hover .gx-word__t, .gx-word:focus-visible .gx-word__t { color: var(--accent); }
.gx-word:has(.gx-word__bg):hover .gx-word__t, .gx-word:has(.gx-word__bg):focus-visible .gx-word__t { color: #fff; }
.gx-word:has(.gx-word__bg):hover sup, .gx-word:has(.gx-word__bg):focus-visible sup { color: rgba(255, 255, 255, .7); }
.gx-word:hover .gx-word__bg, .gx-word:focus-visible .gx-word__bg { opacity: 1; transform: none; }

/* ── подборки ── */
.hb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; }
.hb-find { display: flex; align-items: center; gap: 12px; height: 54px; width: min(420px, 100%); padding: 0 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.hb-find:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.hb-find i { color: var(--fg-3); }
.hb-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--fg); font: 15px var(--f-b); -webkit-appearance: none; appearance: none; }
.hb-find input::placeholder { color: var(--fg-3); }

.hb-week { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 46%); align-items: center; gap: 30px; min-height: 340px; padding: 40px 0 40px 44px; border-radius: 32px; background: radial-gradient(90% 120% at 100% 50%, color-mix(in srgb, var(--accent) 18%, var(--surface)), var(--surface) 60%); border: 1px solid var(--line); isolation: isolate; }
.hb-week__txt { display: grid; gap: 12px; justify-items: start; max-width: 560px; }
.hb-week__k { display: inline-flex; gap: 10px; align-items: center; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }
.hb-week__k .kr { color: var(--gold); font-size: 14px; letter-spacing: .04em; text-transform: none; }
.hb-week__t { font: 600 clamp(32px, 3.6vw, 50px)/1.05 var(--f-d); }
.hb-week__d { color: var(--fg-2); font-size: 15px; line-height: 1.6; }
.hb-week__m { font-size: 13.5px; color: var(--fg-3); }
.hb-week__m b { color: var(--accent); font-weight: 600; }
.hb-week__go { margin-top: 8px; height: 48px; }
.hb-week__steps { position: relative; height: 270px; }
.hb-week__p { position: absolute; top: calc(var(--i) * 18px); left: calc(var(--i) * 17%); width: 34%; aspect-ratio: 2 / 3; border-radius: 16px; background: var(--surface-2) center / cover no-repeat; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .5s var(--ease); z-index: calc(10 - var(--i)); }
.hb-week:hover .hb-week__p { transform: translateY(calc(var(--i) * -6px)) rotate(calc((var(--i) - 2) * 2deg)); }

.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.hb-book { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 22px; align-items: center; padding: 18px 22px 18px 18px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); animation: hbIn .45s var(--ease) both; transition: border-color .25s, transform .35s var(--ease); }
.hb-book:hover { border-color: var(--line-2); transform: translateY(-3px); }
.hb-book__stack { position: relative; height: 168px; }
.hb-book__p, .hb-book__ph { position: absolute; top: 0; width: 96px; aspect-ratio: 2 / 3; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .45s var(--ease); }
.hb-book__p--0 { left: 0; z-index: 3; }
.hb-book__p--1 { left: 18px; top: 12px; z-index: 2; filter: brightness(.75); }
.hb-book__p--2 { left: 36px; top: 24px; z-index: 1; filter: brightness(.55); }
.hb-book:hover .hb-book__p--1 { transform: translateX(6px); }
.hb-book:hover .hb-book__p--2 { transform: translateX(12px); }
.hb-book__ph { left: 18px; display: grid; place-items: center; font: 600 44px var(--f-d); color: var(--fg-3); }
.hb-book__txt { display: grid; gap: 6px; min-width: 0; }
.hb-book__kind { justify-self: start; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--chip); color: var(--fg-2); }
.hb-book__kind.is-theme { color: var(--jade); background: color-mix(in srgb, var(--jade) 12%, transparent); }
.hb-book__kind.is-franchise { color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.hb-book__kind.is-editorial { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.hb-book__t { font: 600 24px/1.12 var(--f-d); transition: color .2s; }
.hb-book:hover .hb-book__t { color: var(--accent); }
.hb-book__d { font-size: 13.5px; line-height: 1.5; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hb-book__n { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--fg-3); }
.hb-book__n i { font-size: 11px; transition: transform .3s var(--ease); }
.hb-book:hover .hb-book__n i { transform: translateX(4px); color: var(--accent); }

.hb-more { display: grid; justify-items: center; gap: 12px; margin-top: 30px; font-size: 13px; color: var(--fg-3); }
.hb-more__bar { width: min(260px, 70%); height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.hb-more__bar i { display: block; height: 100%; background: var(--accent); }
.hb-more__btn { height: 46px; border: 1px solid var(--line-2); color: var(--fg); }
.hb-more__btn:hover { border-color: var(--fg-3); transform: translateY(-2px); }
.hb-more__btn.is-loading { opacity: .6; pointer-events: none; }

.hb-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 64px 20px; border-radius: 28px; border: 1px dashed var(--line-2); }
.hb-empty__moon { width: 56px; height: 56px; border-radius: 50%; box-shadow: inset -12px -5px 0 0 var(--accent); transform: rotate(-20deg); margin-bottom: 6px; }
.hb-empty b { font: 600 24px/1.1 var(--f-d); }
.hb-empty span { color: var(--fg-2); font-size: 14.5px; }

/* ── папка зрителя ── */
.fd-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; padding: 38px 40px 34px; border-radius: 6px 30px 30px 30px; background: var(--surface); border: 1px solid var(--line); margin-top: 22px; }
.fd-head__tab { position: absolute; left: -1px; top: -22px; width: 180px; height: 24px; border-radius: 14px 14px 0 0; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; }
.fd-head__l { min-width: 0; }
.fd-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.fd-owner { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.fd-owner:hover { color: var(--accent); }
.fd-owner__ava { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); font: 600 16px var(--f-d); color: var(--fg-2); }
.fd-owner__ava img { width: 100%; height: 100%; object-fit: cover; }
.fd-n { font-size: 13.5px; color: var(--fg-3); }
.fd-n b { font: 600 22px var(--f-d); color: var(--fg); margin-right: 2px; }
.fd-head__r { display: grid; gap: 16px; justify-items: end; }
.fd-vote { display: flex; align-items: center; gap: 14px; }
.fd-vote.is-loading { opacity: .6; pointer-events: none; }
.fd-vote__n { display: grid; justify-items: end; line-height: 1.1; }
.fd-vote__n strong { font: 600 32px var(--f-d); color: var(--jade); }
.fd-vote__n span { font-size: 12px; color: var(--fg-3); }
.fd-vote__btns { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); }
.fd-vote__btns button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--fg-2); cursor: pointer; font-size: 13px; }
.fd-vote__btns button.is-active { background: var(--fg); color: var(--bg); }
.fd-vote__btns button:disabled { opacity: .45; cursor: default; }
.fd-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fd-acts form { margin: 0; }
.fd-btn { height: 42px; padding: 0 16px; font-size: 13.5px; border: 1px solid var(--line-2); color: var(--fg); background: none; cursor: pointer; }
.fd-btn:hover { border-color: var(--fg-3); }
.fd-btn.is-danger { color: #ff7b8a; border-color: color-mix(in srgb, #ff7b8a 40%, transparent); }
.fd-edit { grid-column: 1 / -1; display: none; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.fd-edit.is-open { display: grid; }
.fd-field { display: grid; gap: 6px; }
.fd-field span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.fd-field :is(input, textarea) { width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--fg); font: 15px var(--f-b); outline: 0; }
.fd-field :is(input, textarea):focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.fd-edit__vis { display: flex; gap: 22px; flex-wrap: wrap; }
.fd-radio { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg-2); cursor: pointer; }
.fd-radio input { position: absolute; opacity: 0; pointer-events: none; }
.fd-radio span { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .2s; }
.fd-radio input:checked + span { box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 9px var(--accent); }
.fd-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fd-edit .btn { justify-self: start; height: 46px; }

.fd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 28px 18px; }
.fd-film { position: relative; animation: hbIn .45s var(--ease) both; }
.fd-film a { display: grid; gap: 4px; }
.fd-film__p { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; background: var(--surface); margin-bottom: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.fd-film__p i { position: absolute; inset: 0; display: grid; place-items: center; font: 600 46px var(--f-d); font-style: normal; color: var(--fg-3); }
.fd-film__p img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.fd-film:hover .fd-film__p img { transform: scale(1.04); }
.fd-film__t { font: 600 18px/1.2 var(--f-d); }
.fd-film:hover .fd-film__t { color: var(--accent); }
.fd-film__y { font-size: 12.5px; color: var(--fg-3); }
.fd-film__rm { position: absolute; z-index: 2; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(10, 8, 14, .65); color: #fff; cursor: pointer; opacity: 0; transition: opacity .2s; }
.fd-film:hover .fd-film__rm, .fd-film__rm:focus-visible { opacity: 1; }
@media (hover: none) { .fd-film__rm { opacity: 1; } }

@media (max-width: 900px) {
    .gx, .hb, .fd { padding-top: 88px; }
    .hb-week { grid-template-columns: minmax(0, 1fr); padding: 26px; min-height: 0; }
    .hb-week__steps { height: 200px; order: -1; }
    .hb-week__p { width: 30%; left: calc(var(--i) * 17.5%); }
    .fd-head { grid-template-columns: minmax(0, 1fr); padding: 26px 22px; }
    .fd-head__r { justify-items: start; }
    .fd-acts { justify-content: flex-start; }
}
@media (max-width: 600px) {
    .gx-index li + li::before { margin: 0 8px 0 6px; font-size: 22px; }
    .gx-word--0 .gx-word__t { font-size: 22px; }
    .gx-word--1 .gx-word__t { font-size: 26px; }
    .gx-word--2 .gx-word__t { font-size: 31px; }
    .gx-word--3 .gx-word__t { font-size: 36px; }
    .gx-word--4 .gx-word__t { font-size: 44px; }
    .hb-book { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; padding: 14px 16px 14px 14px; }
    .hb-book__stack { height: 136px; }
    .hb-book__p, .hb-book__ph { width: 76px; }
    .hb-book__p--1 { left: 13px; top: 9px; }
    .hb-book__p--2 { left: 26px; top: 18px; }
    .hb-book__t { font-size: 20px; }
    .fd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
}
