/* =============================================================================
   Kira Manga — banda de coperți (widget Home / pagina Manga), tab-ul de profil
   și rezultatele manga din căutarea temei. Se încarcă pe tot site-ul, deci totul
   e prefixat cu .km- și nu atinge restul temei.
   ========================================================================== */

.km-strip, .km-strip *, .km-ph, .km-ph * { box-sizing: border-box; }
.km-strip {
	--ks-fg: #0f1d33;
	--ks-muted: #686c75;
	--ks-line: #e3ddd0;
	--ks-tile: #0f1d33;
	--ks-tile-fg: #f3efe6;
	--ks-w: 8.25rem;
	margin: 0 0 1.5rem;
	color: var(--ks-fg);
}
/* Ton „ca tema”: folosește variabilele de culoare ale Kiranime, cu valori de rezervă întunecate. */
.km-strip--theme {
	--ks-fg: var(--color-text, #e8e8ef);
	--ks-muted: var(--color-muted, #9a9cae);
	--ks-line: rgba(255, 255, 255, .08);
	--ks-tile: var(--color-overlay, #1f2130);
	--ks-tile-fg: var(--color-text, #e8e8ef);
	padding: 0 .5rem;
}
@media (min-width: 1280px) { .km-strip--theme { padding: 0; } }

.km-strip__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.km-strip__title { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.2; color: var(--ks-fg); }
.km-strip--theme .km-strip__title { font-size: 1.25rem; }
.km-strip__more { font-size: .75rem; color: var(--ks-muted) !important; text-decoration: none; }
.km-strip__more:hover { color: var(--ks-fg) !important; text-decoration: underline; }

.km-strip__row {
	list-style: none; margin: 0; padding: 0 0 .5rem;
	display: grid; grid-auto-flow: column; grid-auto-columns: var(--ks-w); gap: 1.4rem;
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
	scrollbar-width: thin; scrollbar-color: var(--ks-line) transparent;
}
.km-strip__row::-webkit-scrollbar { height: 6px; }
.km-strip__row::-webkit-scrollbar-thumb { background: var(--ks-line); }
.km-strip__item { scroll-snap-align: start; min-width: 0; }

.km-poster { display: flex; flex-direction: column; align-items: center; text-align: center; color: inherit !important; text-decoration: none !important; }
.km-poster__img { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; background: rgba(127, 127, 127, .12); box-shadow: 0 6px 14px -10px rgba(0, 0, 0, .55); border: 1px solid var(--ks-line, #e3ddd0); }
.km-poster__img img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; transition: transform .25s ease; }
.km-poster:hover .km-poster__img img { transform: scale(1.03); }
.km-poster__title { margin-top: .5rem; font-size: .76rem; font-weight: 600; line-height: 1.25; color: var(--ks-fg, #0f1d33); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.km-poster__meta { margin-top: .1rem; font-size: .68rem; color: var(--ks-muted, #686c75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.km-poster:hover .km-poster__title { text-decoration: underline; }
.km-poster:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.km-poster__badge { position: absolute; left: 0; bottom: 0; padding: .2rem .4rem; font-size: .62rem; font-weight: 600; background: #0f1d33; color: #f3efe6; }
.km-poster__rank { position: absolute; left: 0; top: 0; min-width: 1.6rem; padding: .15rem .35rem; font-size: .75rem; font-weight: 700; background: #0f1d33; color: #f3efe6; text-align: center; }
.km-poster__score { position: absolute; right: 0; bottom: 0; padding: .15rem .35rem; font-size: .62rem; font-weight: 600; background: rgba(15, 29, 51, .88); color: #f3efe6; }
.km-poster--all .km-poster__img { display: flex; align-items: center; justify-content: center; background: var(--ks-tile, #0f1d33); color: var(--ks-tile-fg, #f3efe6); border-color: transparent; }
.km-poster--all:hover .km-poster__img { filter: brightness(1.15); }

/* În grilele din catalog (.km-card) posterul ocupă celula. */
.km-card { list-style: none; min-width: 0; }

/* Pe ecrane mici: coperți puțin mai mici, defilare orizontală. */
@media (max-width: 640px) {
	.km-strip { --ks-w: 6.6rem; }
	.km-strip__row { gap: .9rem; }
}
@media (min-width: 1800px) { .km-strip { --ks-w: 10rem; } }

/* Rezultatele de căutare avansată ale temei: banda ocupă toată lățimea grilei. */
.km-strip--search { grid-column: 1 / -1; margin-bottom: 2rem; }

/* ---------- Căutarea instant a temei ---------- */
.km-ts-head { padding: .6rem .75rem .3rem; font-size: .7rem; font-weight: 700; letter-spacing: .04em; opacity: .7; }
.km-ts-badge { display: inline-block; padding: .05rem .4rem; font-size: .65rem; font-weight: 700; background: #f3efe6; color: #0f1d33; }
.km-ts-all { display: block; padding: .55rem .75rem .8rem; font-size: .75rem; font-weight: 600; opacity: .85; }
.km-ts-all:hover { opacity: 1; text-decoration: underline; }

/* ---------- Tab-ul Manga din profil ---------- */
.km-ph { --kp-fg: var(--color-text, #e8e8ef); --kp-muted: #a9a9b6; --kp-line: rgba(255, 255, 255, .08); --kp-card: var(--color-overlay, rgba(255,255,255,.04)); color: var(--kp-fg); }
.km-ph.is-loading { opacity: .6; }
.km-ph__bar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.km-ph__stats { display: flex; gap: 1.25rem; font-size: .85rem; color: var(--kp-muted); }
.km-ph__stats strong { color: var(--kp-fg); font-size: 1rem; }
.km-ph__sort { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--kp-muted); }
.km-ph__sort select { background: var(--kp-card); color: var(--kp-fg); border: 1px solid var(--kp-line); border-radius: 6px; padding: .4rem .6rem; font-size: .85rem; }
.km-ph__sort select { color-scheme: dark; }
.km-ph__sort select option { color: #e8e8e8; background: #1a1a1d; }
.km-ph__sort select option:checked { background: #34345a; color: #fff; }
.km-ph__h { margin: 1.5rem 0 .75rem; font-size: 1.1rem; font-weight: 700; }
.km-ph__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.km-hi { display: grid; grid-template-columns: 3.5rem 1fr auto; gap: 1rem; align-items: center; padding: .7rem; background: var(--kp-card); border: 1px solid var(--kp-line); border-radius: 8px; }
.km-hi__cover img { width: 3.5rem; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; display: block; }
.km-hi__body { min-width: 0; }
.km-hi__title { display: block; font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--kp-fg) !important; }
.km-hi__title:hover { text-decoration: underline; }
.km-hi__meta { margin: .15rem 0 .45rem; font-size: .75rem; color: var(--kp-muted); }
.km-hi__progress { height: 4px; background: var(--kp-line); border-radius: 2px; overflow: hidden; max-width: 22rem; }
.km-hi__progress span { display: block; height: 100%; background: var(--color-accent, #ffd569); }
.km-hi__count { margin: .3rem 0 0; font-size: .7rem; color: var(--kp-muted); }
.km-hi__actions { display: flex; align-items: center; gap: .4rem; }
.km-hi__rm { width: 2.25rem; height: 2.25rem; border-radius: 6px; font-size: 1.25rem; line-height: 1; color: var(--kp-muted); background: transparent; border: 0; cursor: pointer; }
.km-hi__rm:hover { background: var(--kp-line); color: var(--kp-fg); }
.km-ph__btn { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 .9rem; border-radius: 6px; background: var(--color-accent, #ffd569); color: #14151c !important; font-size: .8rem; font-weight: 700; white-space: nowrap; text-decoration: none !important; border: 0; cursor: pointer; }
.km-ph__btn:hover { filter: brightness(1.08); }
.km-ph__btn--ghost { background: transparent; color: var(--kp-fg) !important; border: 1px solid var(--kp-line); }
.km-ph__empty { padding: 2.5rem 1rem; text-align: center; color: var(--kp-muted); }
.km-ph__morewrap { text-align: center; margin-top: 1rem; }
.km-strip--profile { padding: 0; }
@media (max-width: 600px) {
	.km-hi { grid-template-columns: 3rem 1fr; }
	.km-hi__actions { grid-column: 1 / -1; justify-content: space-between; }
	.km-hi__actions .km-ph__btn { flex: 1; justify-content: center; }
}
