/* Films for children: the parent's filter panel and the results. Flat: state shows by fill and border, no shadows. */
.kd-head { max-width: 760px; }

.kd-panel { position: relative; z-index: 4; margin-top: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); }
.kd-top { display: grid; grid-template-columns: minmax(150px, 190px) minmax(230px, 280px) 1fr; gap: 20px 28px; padding: 22px 24px; }
.kd-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.kd-label { display: block; margin-bottom: 10px; padding: 0; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kd-label small { margin-left: 6px; color: var(--faint); font-size: .78rem; font-weight: 500; letter-spacing: 0; text-transform: none; }

.kd-select { position: relative; display: block; }
.kd-select select { appearance: none; width: 100%; height: 48px; padding: 0 40px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); color: #fff; font: 700 1.05rem var(--font); cursor: pointer; }
.kd-select select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.kd-select svg { position: absolute; top: 15px; right: 14px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

.kd-seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); }
.kd-seg label { position: relative; cursor: pointer; }
.kd-seg input, .kd-platforms input, .kd-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kd-seg span { display: grid; place-items: center; height: 38px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .95rem; transition: background .18s, color .18s; }
.kd-seg label:hover span { color: #fff; }
.kd-seg input:checked + span { background: #fff; color: #0A0A0F; }
.kd-seg input:focus-visible + span, .kd-platforms input:focus-visible + span, .kd-chip input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.kd-platforms { display: flex; flex-wrap: wrap; gap: 8px; }
.kd-platforms label { cursor: pointer; }
.kd-platforms span { position: relative; display: grid; place-items: center; width: 116px; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); transition: border-color .18s, background .18s; }
.kd-platforms img { display: block; width: auto; max-width: 82px; height: 22px; object-fit: contain; filter: brightness(0) invert(1); opacity: .5; transition: opacity .18s; }
.kd-platforms label:hover img { opacity: .85; }
.kd-platforms input:checked + span { border-color: var(--brand-2); background: rgba(47,216,198,.1); }
.kd-platforms input:checked + span img { opacity: 1; }
.kd-tick { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; padding: 3px; border-radius: 99px; background: var(--brand-2); fill: none; stroke: #0A0A0F; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .18s; }
.kd-platforms input:checked + span .kd-tick { opacity: 1; }

.kd-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); }
.kd-likes { margin: 0 4px 0 0; }
.kd-drops { display: flex; flex-wrap: wrap; gap: 8px; }
.kd-drop { position: relative; }
.kd-drop summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg-3); font-weight: 600; font-size: .95rem; list-style: none; cursor: pointer; transition: border-color .18s; }
.kd-drop summary::-webkit-details-marker { display: none; }
.kd-drop summary:hover, .kd-drop[open] summary { border-color: #fff; }
.kd-drop summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.kd-drop[open] summary svg { transform: rotate(180deg); }
.kd-drop summary b { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--brand-2); color: #0A0A0F; font-size: .78rem; }
.kd-drop summary b[hidden] { display: none; }
.kd-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 6; width: min(520px, calc(100vw - 32px)); padding: 18px; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: var(--bg-3); }
.kd-pop > p { margin: 0 0 12px; font-weight: 700; }
.kd-pop > p small { color: var(--faint); font-weight: 500; }
.kd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kd-chip { position: relative; cursor: pointer; }
.kd-chip span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg-2); font-size: .92rem; font-weight: 600; transition: background .18s, border-color .18s; }
.kd-chip span:hover { border-color: rgba(255,255,255,.4); }
.kd-chip input:checked + span { border-color: var(--brand-2); background: var(--brand-2); color: #0A0A0F; }
.kd-done { display: block; margin: 14px 0 0 auto; padding: 8px 18px; border: 1px solid var(--line); border-radius: 99px; background: none; color: #fff; font: 600 .9rem var(--font); cursor: pointer; }
.kd-done:hover { border-color: #fff; }
.kd-go { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.kd-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.kd-active { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; }
.kd-active[hidden] { display: none; }
.kd-active button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 99px; background: var(--bg-3); color: #fff; font: 600 .85rem var(--font); cursor: pointer; }
.kd-active button:hover { border-color: rgba(255,255,255,.4); }
.kd-active button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.kd-active .clear { background: none; color: var(--brand-2); }

.kd-privacy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 12px 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; }
.kd-privacy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kd-forget { padding: 0; border: 0; background: none; color: var(--brand-2); font: inherit; text-decoration: underline; cursor: pointer; }
.kd-forget[hidden] { display: none; }

.kd-results { margin-top: 42px; }
.kd-results-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 16px; }
.kd-results-head h2 { margin: 0; }
.kd-results-head .cat-total { margin-left: 0; }
.kd-fit { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 99px; background: #FFD166; color: #0A0A0F; font-size: .74rem; font-weight: 700; }
.kd-fit.is-unrated { background: var(--bg-3); color: rgba(255,255,255,.85); }
.kd-card .cat-badge { right: auto; padding: 4px 8px; font-size: .74rem; }
.kd-card:not(.is-dubidu) .cat-badge { background: rgba(10,10,15,.78); color: rgba(255,255,255,.85); font-weight: 600; }
.kd-rating { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .84rem; color: var(--muted); }
.kd-rating svg { width: 15px; height: 15px; fill: #F5C518; }
.kd-rating b { color: #fff; }
.kd-rating .kd-votes { color: var(--faint); }
.kd-matches { display: block; margin-top: 4px; color: var(--brand-2); font-size: .82rem; font-weight: 600; line-height: 1.3; }
.kd-note { max-width: 760px; margin-top: 30px; color: var(--muted); font-size: .92rem; }

/* Ready lists for search */
.kd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: clamp(28px, 5vw, 48px); color: var(--faint); font-size: .88rem; }
.kd-crumbs a { color: var(--muted); }
.kd-crumbs svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kd-crumbs + .kd-head { padding-top: 14px; }
.kd-head .kd-intro { margin-top: 10px; font-size: 1rem; line-height: 1.6; }
.kd-tailor { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); color: #fff; text-decoration: none; transition: border-color .18s; }
.kd-tailor:hover { border-color: var(--brand-2); }
.kd-tailor span { display: grid; gap: 3px; color: var(--muted); font-size: .92rem; }
.kd-tailor b { color: #fff; font-size: 1.05rem; }
.kd-tailor svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--brand-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kd-related { margin-top: 40px; }
.kd-related h2 { margin-bottom: 14px; font-size: 1.25rem; }
.kd-links { display: flex; flex-wrap: wrap; gap: 8px; }
.kd-links a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg-2); color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; transition: border-color .18s, color .18s; }
.kd-links a:hover { border-color: #fff; color: #fff; }

@media (max-width: 860px) {
  .kd-top { grid-template-columns: 1fr 1fr; }
  .kd-field-wide { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .kd-top { grid-template-columns: 1fr; padding: 18px 16px; }
  .kd-bottom, .kd-privacy { padding-left: 16px; padding-right: 16px; }
  .kd-active { padding: 0 16px 14px; }
  .kd-drops, .kd-drop { width: 100%; }
  .kd-drop summary { width: 100%; justify-content: space-between; }
  .kd-pop { position: static; width: auto; margin-top: 8px; }
  .kd-platforms label { flex: 1 1 calc(50% - 4px); }
  .kd-platforms span { width: 100%; }
  .kd-go { width: 100%; justify-content: center; margin-left: 0; }
}
