.mylists-page,
.mylists-bookmark,
.mylists-user-bookmark,
.mylists-modal {
    --ml-accent: #ef4b3e;
    --ml-bg: rgba(15, 12, 12, .78);
    --ml-bg-soft: rgba(20, 16, 16, .62);
    --ml-border: rgba(255, 255, 255, .12);
    --ml-text: #fff;
    --ml-muted: rgba(255, 255, 255, .64);
    box-sizing: border-box;
}

.mylists-page *,
.mylists-bookmark *,
.mylists-user-bookmark *,
.mylists-modal * { box-sizing: border-box; }

.mylists-page { width: 100%; color: var(--ml-text); }
.mylists-page__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.mylists-page__header h1 { margin: 8px 0 0; color: #fff; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; }
.mylists-breadcrumb { color: var(--ml-muted); font-size: 13px; }
.mylists-page__total { color: var(--ml-muted); white-space: nowrap; }
.mylists-page__summary { margin-top: 22px; color: var(--ml-muted); font-size: 13px; }
.mylists-lead { max-width: 800px; margin: -10px 0 26px; color: rgba(255,255,255,.82); line-height: 1.65; }

.mylists-nav { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 25px; }
.mylists-nav__item { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 13px; border: 1px solid transparent; border-radius: 5px; background: rgba(15,12,12,.46); color: rgba(255,255,255,.82); text-decoration: none; transition: .18s ease; }
.mylists-nav__item:hover { color: #fff; border-color: var(--ml-border); background: rgba(15,12,12,.72); }
.mylists-nav__item.is-active { color: #fff; background: rgba(15,12,12,.88); border-color: rgba(239,75,62,.45); }
.mylists-nav__item b { color: var(--ml-muted); font-size: 12px; font-weight: 500; }

.mylists-toolbar { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; padding: 12px 15px; border: 1px solid var(--ml-border); border-radius: 5px; background: rgba(15,12,12,.38); }
.mylists-toolbar label { display: flex; align-items: center; gap: 9px; }
.mylists-toolbar select { appearance: none; min-width: 165px; padding: 8px 28px 8px 10px; border: 0; border-radius: 4px; outline: 0; background: rgba(0,0,0,.28); color: #fff; }
.mylists-page .mylists-toolbar select { height: 35px; line-height: 1.2; background-color: rgba(0,0,0,.28) !important; background-image: none !important; box-shadow: none !important; }
.mylists-toolbar > label:first-child { flex: 0 0 auto; white-space: nowrap; }
.mylists-toolbar > label:first-child select { width: 165px; margin: 0; }
.mylists-toolbar option { color: #222; background: #fff; }
.mylists-toolbar a { margin-left: auto; color: #fff; text-decoration: none; }
.mylists-toolbar__help { min-height: 35px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 0; border-radius: 4px; background: transparent; color: rgba(255,255,255,.82); font: inherit; white-space: nowrap; cursor: pointer; }
.mylists-toolbar__help:hover { background: rgba(255,255,255,.08); color: #fff; }
.mylists-toolbar__search { min-width: min(330px,100%); }
.mylists-toolbar__search input { width: 100%; min-height: 35px; padding: 7px 10px; border: 1px solid var(--ml-border); border-radius: 4px; outline: 0; background: rgba(0,0,0,.22); color: #fff; }
.mylists-toolbar__search input::placeholder { color: var(--ml-muted); }
.mylists-toolbar__search button { width: 35px; height: 35px; border: 0; border-radius: 4px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }

.mylists-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mylists-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 164px; overflow: hidden; border: 1px solid var(--ml-border); border-radius: 6px; background: var(--ml-bg); box-shadow: none; }
.mylists-card__poster { display: block; min-height: 164px; background: rgba(0,0,0,.35); }
.mylists-card__poster img { width: 100%; height: 100%; min-height: 164px; display: block; object-fit: cover; }
.mylists-card__no-poster { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ml-muted); font-size: 28px; }
.mylists-card__body { min-width: 0; padding: 15px; }
.mylists-card__top { display: flex; align-items: flex-start; gap: 12px; }
.mylists-card__title { min-width: 0; flex: 1; overflow-wrap: anywhere; color: var(--ml-accent); font-size: 17px; font-weight: 700; line-height: 1.35; text-decoration: none; }
.mylists-card__title:hover { color: #ff6e62; }
.mylists-card__actions { display: flex; gap: 3px; }
.mylists-icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ml-muted); cursor: pointer; }
.mylists-icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.mylists-card__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 11px; color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.35; }
.mylists-card__place, .mylists-card__genres { display: block; max-width: 100%; overflow-wrap: anywhere; }
.mylists-card__note { display: -webkit-box; overflow: hidden; margin: 14px 0 0; color: var(--ml-muted); font-size: 13px; line-height: 1.45; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.mylists-empty { grid-column: 1 / -1; min-height: 220px; display: grid; place-items: center; align-content: center; gap: 14px; border: 1px dashed var(--ml-border); border-radius: 6px; background: rgba(15,12,12,.34); color: var(--ml-muted); text-align: center; }
.mylists-empty i { font-size: 34px; }
.mylists-empty p { margin: 0; }

.mylists-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; margin-top: 28px; }
.mylists-pagination a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--ml-border); border-radius: 4px; background: rgba(15,12,12,.55); color: #fff; text-decoration: none; }
.mylists-pagination a:hover, .mylists-pagination a.is-active { background: var(--ml-accent); border-color: var(--ml-accent); }

.mylists-bookmark .mylists-launch { width: 100%; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 5px; background: rgba(15,12,12,.76); color: #fff; cursor: pointer; }
.mylists-bookmark .mylists-launch:hover { background: rgba(15,12,12,.92); color: #fff; }
.mylists-bookmark .mylists-launch.is-loading { cursor: wait; }

.mylists-modal { position: fixed; inset: 0; z-index: 100050; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.73); opacity: 0; visibility: hidden; transition: opacity .16s ease, visibility .16s ease; }
.mylists-modal[hidden] { display: none !important; }
.mylists-modal.is-open { opacity: 1; visibility: visible; }
.mylists-modal__dialog { position: relative; width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; border-radius: 12px; background: #fff; color: #333; box-shadow: 0 18px 70px rgba(0,0,0,.38); transform: translateY(8px); transition: transform .16s ease; }
.mylists-modal.is-open .mylists-modal__dialog { transform: translateY(0); }
.mylists-modal__dialog--small { width: min(430px, 100%); }
.mylists-modal__dialog--help { width: min(760px,100%); padding: 28px 32px 34px; }
.mylists-modal__dialog h2 { margin: 0 40px 23px 0; color: #333; font-size: 22px; }
.mylists-modal__dialog h2 i { margin-right: 7px; font-weight: 400; }
.mylists-modal__close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #777; font-size: 20px; cursor: pointer; }
.mylists-modal__close:hover { color: #333; background: transparent; }
.mylists-modal__dialog--help h3 { margin: 26px 0 10px; color: #222; font-size: 19px; line-height: 1.3; }
.mylists-modal__dialog--help p { margin: 0 0 13px; color: #444; line-height: 1.65; }
.mylists-modal__dialog--help ul { margin: 0 0 18px; padding-left: 23px; color: #444; }
.mylists-modal__dialog--help li { margin: 7px 0; line-height: 1.5; }
.mylists-modal__dialog--help p > i { width: 21px; color: #222; text-align: center; }
.mylists-bookmark-form fieldset { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.mylists-bookmark-form legend { width: 100%; margin-bottom: 10px; color: #444; font-size: 13px; font-weight: 700; }
.mylists-statuses { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.mylists-statuses label, .mylists-custom-folders label { cursor: pointer; }
.mylists-statuses input, .mylists-custom-folders input, .mylists-check input { position: absolute; opacity: 0; pointer-events: none; }
.mylists-statuses span, .mylists-custom-folders span, .mylists-check span { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 10px 12px; border: 1px solid #dedede; border-radius: 6px; background: #fafafa; color: #444; }
.mylists-statuses input:checked + span, .mylists-custom-folders input:checked + span, .mylists-check input:checked + span { border-color: var(--ml-accent); background: rgba(239,75,62,.08); color: #d93f34; }
.mylists-custom-folders { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.mylists-check { display: block; margin-bottom: 20px; cursor: pointer; }
.mylists-note-field, .mylists-field { display: block; margin-bottom: 20px; }
.mylists-note-field > span, .mylists-field > span { display: block; margin-bottom: 8px; color: #555; font-size: 13px; font-weight: 700; }
.mylists-note-field textarea, .mylists-field input { width: 100%; padding: 12px; border: 1px solid #d9d9d9; border-radius: 6px; outline: 0; background: #fff; color: #333; resize: vertical; }
.mylists-note-field textarea:focus, .mylists-field input:focus { border-color: var(--ml-accent); box-shadow: 0 0 0 3px rgba(239,75,62,.1); }
.mylists-note-counter { display: block; margin-top: 6px; color: #888; font-size: 12px; text-align: right; }
.mylists-note-counter.is-over-limit { color: #d93f34; font-weight: 700; }
.mylists-form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mylists-btn { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--ml-border); border-radius: 5px; background: rgba(15,12,12,.66); color: #fff; font: inherit; text-decoration: none; cursor: pointer; }
.mylists-btn:hover { color: #fff; background: rgba(15,12,12,.88); }
.mylists-btn--accent { border-color: var(--ml-accent); background: var(--ml-accent); color: #fff; }
.mylists-btn--accent:hover { background: #db4035; }
.mylists-btn--danger { margin-left: auto; border-color: transparent; background: transparent; color: #c63f36; }
.mylists-btn--danger:hover { background: #fff1f0; color: #b52d25; }
.mylists-modal__dialog--bookmark { width: min(320px, 100%); padding: 25px 20px 20px; border-radius: 5px; }
.mylists-modal__dialog--bookmark h2 { margin: 0 35px 18px 0; font-size: 21px; line-height: 1.25; font-weight: 500; }
.mylists-modal__dialog--bookmark .mylists-modal__close { top: 10px; right: 9px; color: #444; }
.mylists-modal__dialog--bookmark .mylists-list-fieldset { margin: 0; }
.mylists-modal__dialog--bookmark .mylists-statuses,
.mylists-modal__dialog--bookmark .mylists-custom-folders { display: grid; grid-template-columns: 1fr; gap: 0; }
.mylists-modal__dialog--bookmark .mylists-statuses label,
.mylists-modal__dialog--bookmark .mylists-custom-folders label,
.mylists-modal__dialog--bookmark .mylists-check { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; cursor: pointer; }
.mylists-modal__dialog--bookmark .mylists-statuses input:not([hidden]),
.mylists-modal__dialog--bookmark .mylists-custom-folders input,
.mylists-modal__dialog--bookmark .mylists-check input { position: relative; width: 16px; height: 16px; flex: 0 0 16px; margin: 0; border: 2px solid #c9cdd0; border-radius: 4px; background: #fff; opacity: 1; pointer-events: auto; appearance: none; }
.mylists-modal__dialog--bookmark input:checked:not([value="0"]) { border-color: #e6534e; background: #e6534e; }
.mylists-modal__dialog--bookmark input:checked:not([value="0"])::after { content: '✓'; position: absolute; inset: -3px 0 0; color: #fff; font-size: 13px; font-weight: 700; text-align: center; }
.mylists-modal__dialog--bookmark .mylists-statuses span,
.mylists-modal__dialog--bookmark .mylists-custom-folders span,
.mylists-modal__dialog--bookmark .mylists-check span { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #222; font-size: 15px; }
.mylists-modal__dialog--bookmark .mylists-statuses input:checked + span,
.mylists-modal__dialog--bookmark .mylists-custom-folders input:checked + span,
.mylists-modal__dialog--bookmark .mylists-check input:checked + span { border: 0; background: transparent; color: #222; }
.mylists-modal__dialog--bookmark .mylists-statuses span i,
.mylists-modal__dialog--bookmark .mylists-custom-folders span i { width: 15px; color: #111; text-align: center; }
.mylists-modal__dialog--bookmark .mylists-note-field { margin: 10px 0 15px; }
.mylists-modal__dialog--bookmark .mylists-note-field textarea { height: 68px; min-height: 68px; max-height: min(280px,36vh); padding: 10px; border-radius: 4px; overflow-x: hidden; overflow-y: auto; resize: none; line-height: 1.45; scrollbar-width: thin; }
.mylists-modal__dialog--bookmark .mylists-form-actions { position: sticky; z-index: 3; bottom: -20px; align-items: center; gap: 5px 10px; margin-inline: -2px; padding: 12px 2px 20px; background: #fff; }
.mylists-modal__dialog--bookmark .mylists-btn { min-height: 40px; padding: 8px 13px; border-radius: 4px; }
.mylists-modal__dialog--bookmark .mylists-btn--note { border-color: transparent; background: transparent; color: #777; }
.mylists-modal__dialog--bookmark .mylists-btn--note:hover { background: transparent; color: #333; }
.mylists-modal__dialog--bookmark .mylists-btn--danger { display: none; flex: 0 0 100%; justify-content: flex-start; margin: 0; padding-left: 0; color: #777; }
.mylists-modal__dialog--bookmark .mylists-bookmark-form.is-existing .mylists-btn--danger { display: inline-flex; }
.mylists-modal__dialog--bookmark .mylists-bookmark-form.is-new .mylists-btn--note { display: none; }
.mylists-modal__dialog--bookmark .mylists-bookmark-form.is-existing:not(.is-note-open) .mylists-note-field { display: none; }
.mylists-modal__dialog--bookmark .js-mylists-folders-field[hidden],
.mylists-modal__dialog--bookmark [hidden] { display: none !important; }
.mylists-muted { color: #888; }
.mylists-no-scroll { overflow: hidden !important; }
.mylists-toast { position: fixed; z-index: 100100; right: 22px; bottom: 22px; max-width: min(360px,calc(100vw - 30px)); padding: 12px 16px; border-radius: 6px; background: #202020; color: #fff; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s ease; }
.mylists-toast.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.mylists-toast.is-error { background: #a92f28; }

.mylists-settings-form { margin-bottom: 20px; }
.mylists-settings-card { margin-bottom: 20px; padding: 22px; border: 1px solid var(--ml-border); border-radius: 6px; background: var(--ml-bg-soft); }
.mylists-settings-card h2 { margin: 0 0 18px; color: #fff; font-size: 20px; }
.mylists-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.mylists-section-heading h2 { margin-bottom: 5px; }
.mylists-section-heading p { margin: 0; color: var(--ml-muted); }
.mylists-folder-list { display: grid; gap: 9px; }
.mylists-folder-row { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 13px; border: 1px solid var(--ml-border); border-radius: 5px; background: rgba(0,0,0,.18); }
.mylists-folder-row > span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mylists-folder-row small { color: var(--ml-muted); }
.mylists-folder-row button { padding: 6px; border: 0; background: transparent; color: var(--ml-muted); cursor: pointer; }
.mylists-folder-row button:hover { color: #fff; }
.mylists-folder-row input { accent-color: var(--ml-accent); }
.mylists-folder-row em { color: var(--ml-muted); font-size: 12px; font-style: normal; }
.mylists-switch-control { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.mylists-switch-control input { position: absolute; opacity: 0; }
.mylists-switch-control > span { position: relative; width: 46px; height: 25px; flex: 0 0 46px; border-radius: 20px; background: rgba(255,255,255,.2); transition: .2s; }
.mylists-switch-control > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: .2s; }
.mylists-switch-control input:checked + span { background: var(--ml-accent); }
.mylists-switch-control input:checked + span::after { transform: translateX(21px); }
.mylists-users-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.mylists-user-card { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--ml-border); border-radius: 6px; background: var(--ml-bg); color: #fff; text-decoration: none; }
.mylists-user-card:hover { border-color: rgba(239,75,62,.5); color: #fff; }
.mylists-user-card img, .mylists-user-card__avatar { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; object-fit: cover; background: rgba(0,0,0,.25); }
.mylists-user-card__avatar { display: grid; place-items: center; color: var(--ml-muted); font-size: 20px; }
.mylists-user-card > span:not(.mylists-user-card__avatar), .mylists-user-card__profile > span:not(.mylists-user-card__avatar) { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 4px; }
.mylists-user-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mylists-user-card small { color: var(--ml-muted); }
.mylists-user-card > i { color: var(--ml-muted); }
.mylists-user-card--saved { position: relative; }
.mylists-user-card__profile { min-width: 0; display: flex; flex: 1; align-items: center; gap: 13px; color: #fff; text-decoration: none; }
.mylists-user-card__profile:hover { color: #fff; }
.mylists-user-card--saved > .mylists-icon-btn { flex: 0 0 34px; color: var(--ml-muted); }
.mylists-user-card--saved > .mylists-icon-btn:hover { color: var(--ml-accent); }
.mylists-user-bookmark { margin-top: 16px; }
.mylists-user-bookmark .mylists-btn { min-width: 210px; }
.mylists-user-bookmark .mylists-btn.is-saved { border-color: rgba(239,75,62,.55); background: rgba(239,75,62,.16); }
.mylists-user-bookmark .mylists-btn:disabled { cursor: wait; opacity: .65; }

@media (max-width: 900px) {
    .mylists-grid { grid-template-columns: 1fr; }
    .mylists-users-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 600px) {
	.aninet__bookmark .mylists-bookmark .mylists-launch { min-height: 46px; border: 1px solid rgba(239,75,62,.58); background: rgba(20,15,15,.78); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
	.aninet__bookmark .mylists-bookmark .mylists-launch i { color: var(--ml-accent); }
	.aninet__bookmark .mylists-bookmark .mylists-launch:hover { border-color: var(--ml-accent); background: rgba(239,75,62,.16); }
    .mylists-page__header, .mylists-section-heading { align-items: stretch; flex-direction: column; }
    .mylists-page__total { white-space: normal; }
    .mylists-nav { flex-wrap: wrap; margin-inline: 0; padding: 0; overflow: visible; }
    .mylists-nav__item { flex: 0 0 auto; max-width: 100%; }
    .mylists-toolbar { align-items: stretch; flex-direction: column; }
    .mylists-toolbar label { justify-content: space-between; }
    .mylists-toolbar a { margin-left: 0; }
    .mylists-toolbar__help { justify-content: flex-start; padding-inline: 0; }
    .mylists-card { grid-template-columns: 92px minmax(0,1fr); min-height: 142px; }
    .mylists-card__poster, .mylists-card__poster img { min-height: 142px; }
    .mylists-card__body { padding: 12px; }
    .mylists-modal { align-items: flex-end; padding: 0; }
    .mylists-modal[data-mylists-modal] { align-items: center; padding: 12px; }
    .mylists-modal__dialog, .mylists-modal__dialog--small { width: 100%; max-height: 92vh; padding: 22px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; }
    .mylists-modal__dialog--help { width: 100%; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
    .mylists-modal__dialog--bookmark { width: min(320px, 100%); padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 5px; }
    .mylists-modal__dialog--bookmark .mylists-note-field textarea { max-height: min(190px,25vh); }
    .mylists-modal__dialog--bookmark .mylists-form-actions { bottom: calc(-20px - env(safe-area-inset-bottom)); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
    .mylists-statuses, .mylists-custom-folders { grid-template-columns: 1fr; }
    .mylists-btn--danger { margin-left: 0; }
    .mylists-folder-row { align-items: flex-start; flex-direction: column; }
    .mylists-folder-row > div { width: 100%; display: flex; justify-content: flex-end; }
    .mylists-users-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .mylists-modal, .mylists-modal__dialog, .mylists-toast { transition: none; }
}
