:root{font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#e9eff6;background:#101924;font-size:15px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}a{color:#70d8be}.layout{display:flex;min-height:100vh}.sidebar{width:230px;background:#141f2c;padding:25px 14px;border-right:1px solid #263443;position:sticky;top:0;height:100vh}.brand{font-size:30px;font-weight:800;padding:8px 12px 28px;letter-spacing:-1.5px}.brand span{color:#5ed7b1}.nav{width:100%;background:none;border:0;color:#9eb0c4;text-align:left;border-radius:10px;padding:12px 14px;margin-bottom:5px}.nav:hover,.nav.active{background:#233748;color:white}.main{max-width:1300px;width:100%;padding:30px 35px 90px;margin:auto}.top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:25px}.top h1{font-size:28px;margin:0}.subtitle{color:#8e9eaf;font-size:13px}.btn{border:0;border-radius:10px;background:#55cbaa;color:#092b25;font-weight:700;padding:10px 15px}.btn.secondary{background:#25394b;color:#e8f0f7}.btn.warn{background:#6d2e37;color:white}.btn:disabled{opacity:.45;cursor:default}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.split{display:flex;justify-content:space-between;align-items:center;gap:10px}.panel{border:1px solid #304254;background:#172532;border-radius:17px;padding:20px;margin-bottom:17px}.muted{color:#98aabc}.tiny{font-size:12px}.cardgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:19px}.poster{width:100%;aspect-ratio:2/3;object-fit:cover;background:#263847;border-radius:12px}.tile{cursor:pointer;min-width:0}.tile h3{font-size:14px;font-weight:600;margin:9px 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile small{color:#9bb0c2}.progress{height:5px;border-radius:9px;overflow:hidden;background:#304457;margin-top:10px}.progress>div{height:100%;background:#5bd1ae}.tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:19px}.tabs button{border:0;border-radius:20px;padding:9px 13px;background:#243646;color:#b2c3d1}.tabs button.active{background:#54cba7;color:#052c24}.form{max-width:480px;margin:10vh auto;padding:28px;border:1px solid #2a4152;background:#192836;border-radius:18px}.form h1{margin:0 0 5px}.field{margin:13px 0;display:block}.field label{display:block;margin-bottom:7px;color:#aabac9;font-size:13px}.field input,.field select,input.search{width:100%;background:#0d1b28;border:1px solid #385064;border-radius:9px;color:#edf5fc;padding:12px;outline:none}input:focus{border-color:#56cfa9}input[type=checkbox]{accent-color:#4dccaa;width:17px;height:17px}.check{display:flex;align-items:center;gap:8px;margin:9px 0}.result{display:flex;gap:14px;align-items:center;border-bottom:1px solid #2b4151;padding:10px 0}.result img{height:85px;width:57px;object-fit:cover;border-radius:7px}.result .grow{flex:1}.modalcover{position:fixed;inset:0;background:#06121acc;z-index:20;display:flex;align-items:center;justify-content:center;padding:15px}.modal{max-width:620px;width:100%;max-height:92vh;overflow:auto;background:#1a2a38;border:1px solid #416073;border-radius:17px;padding:24px}.modal h2{margin-top:0}.episodes{display:flex;flex-direction:column;gap:8px}.episode{display:flex;gap:12px;align-items:center;border-radius:10px;background:#1c2c3a;padding:11px 12px}.episode .grow{flex:1}.hero{display:flex;gap:25px;align-items:start;margin-bottom:25px}.hero img{width:170px;border-radius:13px}.season{border:1px solid #2b4051;border-radius:12px;margin:12px 0}.season summary{padding:16px;cursor:pointer;font-weight:700}.seasoncontent{padding:0 12px 12px}.badge{background:#264f49;color:#7ce5c2;border-radius:8px;padding:5px 9px;font-size:12px}.actions{display:flex;gap:7px;flex-wrap:wrap}#toast{position:fixed;bottom:20px;right:20px;z-index:99;background:#355e54;color:white;padding:12px 18px;border-radius:10px;display:none;max-width:390px}.empty{border:1px dashed #3b5467;padding:30px;border-radius:14px;color:#9bb0c2;text-align:center}.table{width:100%;border-collapse:collapse}.table td,.table th{padding:12px;border-bottom:1px solid #2a4152;text-align:left}.loading{padding:30px}.calendarrow{border-bottom:1px solid #2f4151;padding:12px 0}.code{font-family:monospace;color:#a6e5d0;overflow-wrap:anywhere}.mobilebar{display:none}@media(max-width:760px){.sidebar{display:none}.main{padding:20px 15px 90px}.top h1{font-size:23px}.hero img{width:115px}.hero{gap:15px}.cardgrid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:13px}.mobilebar{display:flex;position:fixed;bottom:0;left:0;right:0;background:#152433;z-index:9;border-top:1px solid #365064;justify-content:space-around;padding:5px}.mobilebar button{background:none;color:#bed0de;border:0;padding:10px 6px;font-size:11px}.form{margin:12vh 15px}.modal{padding:17px}}

/* Binged v0.2 watch-first interface */
.watchsection{margin-bottom:32px;max-width:850px}.watchsection h2{text-align:center;letter-spacing:2px;text-transform:uppercase;font-size:13px;color:#cbd4df;background:#24262b;border-radius:30px;width:max-content;margin:18px auto;padding:10px 26px}.watchlist{display:flex;flex-direction:column;gap:12px}.watchcard{background:#1f1e21;border-radius:18px;display:flex;align-items:stretch;overflow:hidden;min-height:102px}.watchcard>img{width:112px;object-fit:cover;cursor:pointer}.watchinfo{min-width:0;flex:1;padding:14px 12px;cursor:pointer;display:flex;flex-direction:column;justify-content:center;gap:6px}.watchtitle{font-weight:650;font-size:19px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.watchcheck{align-self:center;flex-shrink:0;margin:12px 16px 12px 2px;width:53px;height:53px;border:3px solid #65656b;border-radius:50%;background:none;color:#8c8c92;font-size:25px}.watchcheck.done{border-color:#33383a;color:#48d9a0;background:#303238}.watchcheck:disabled{opacity:.5}.synopsis{max-width:730px;color:#b0bcc9}.synopsis summary{cursor:pointer;margin:12px 0}.synopsis p{line-height:1.6}#zipfile{max-width:100%;margin:14px 12px 14px 0}@media(max-width:760px){.watchcard{min-height:105px}.watchcard>img{width:99px}.watchtitle{font-size:17px}.watchcheck{width:49px;height:49px;margin-right:12px}.watchinfo{padding:11px 9px}}

/* Binged v0.3 */
.watchcard{min-height:76px;border-radius:13px}.watchcard>img{width:68px}.watchinfo{padding:9px 12px;gap:3px}.watchtitle{font-size:16px}.watchcheck{width:39px;height:39px;font-size:20px;margin:7px 13px 7px 2px;border-width:2px}.watchlist{gap:8px}.watchsection{margin-bottom:23px}.watchsection h2{margin:14px auto;padding:8px 18px}.switcher{display:flex;gap:5px;background:#253342;padding:4px;border-radius:12px}.switcher button{border:0;border-radius:9px;background:transparent;color:#c5d1dc;padding:10px 13px}.switcher button.active{background:#55cbaa;color:#052a21;font-weight:700}.wherebox{margin:14px 0}.wheregroup{margin-top:10px}.providerlist{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.provider{display:flex;align-items:center;gap:6px;background:#263746;border:1px solid #425063;padding:5px 8px;border-radius:8px;font-size:12px}.provider.selected{border-color:#55cbaa}.provider img{width:20px;height:20px;object-fit:contain;border-radius:3px}.discovergrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:12px;margin:12px 0 30px}.discoveritem{cursor:pointer;font-size:12px}.discoveritem img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:8px}.discoveritem span{display:block;margin-top:4px}.wherebox .btn{font-size:13px}@media(max-width:760px){.watchcard{min-height:76px}.watchcard>img{width:71px}.watchtitle{font-size:15px}.watchcheck{width:38px;height:38px;margin-right:9px}.watchinfo{padding:8px 9px}.watchinfo .muted{font-size:12px}.watchsection h2{font-size:11px}.top{align-items:center}.switcher button{padding:9px 11px}.discovergrid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v0.3.1: admin layout + narrow screen wrapping */
.main{margin:0 auto;min-width:0}
.layout{align-items:flex-start}
.panel,.top,#adminbody{min-width:0;max-width:100%}
.panel{overflow-wrap:anywhere;word-break:normal}
#updatestatus{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-width:100%;overflow-x:auto;font-size:12px;line-height:1.5}
#updateform{display:flex;flex-direction:column;align-items:flex-start;gap:10px;max-width:100%}
#updateform input[type=file]{width:100%;max-width:100%;min-width:0;font-size:13px}
#updateform .btn{max-width:100%}
@media(max-width:760px){.layout{display:block}.main{margin:0;padding:18px 14px 96px}.panel{padding:16px}.tabs{gap:7px}.tabs button{padding:9px 12px}}

/* v0.3.2: Admin integration list: prevent narrow flex column on mobile */
#adminbody .result{display:flex;align-items:flex-start;flex-wrap:wrap;min-width:0;gap:12px}
#adminbody .result .grow{flex:1 1 240px;min-width:0;overflow-wrap:anywhere;word-break:break-word}
#adminbody .result .grow .tiny{white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.5;margin-top:4px}
#adminbody .result .actions{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:8px;min-width:0}
#adminbody .result .actions .btn{flex:0 0 auto;min-width:0;white-space:normal}
#syncres{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;overflow-x:auto}
@media(max-width:760px){#adminbody .result{display:block}#adminbody .result .grow{display:block;width:100%;margin-bottom:12px}#adminbody .result .actions{width:100%}#adminbody .result .actions .btn{font-size:13px;padding:9px 11px}}

/* v0.4.0 status indicators */
.statuschip{display:inline-block;border-radius:6px;font-size:10px;font-weight:700;letter-spacing:.1px;padding:3px 6px;vertical-align:middle;white-space:nowrap;background:#344456;color:#cbd6e4;margin-left:4px}
.status-ongoing{background:#193d36;color:#75dfbb}.status-ended{background:#3c4654;color:#d6dee8}.status-canceled{background:#51323b;color:#ffb1b8}.status-unknown{background:#3a3a37;color:#c8c5bf}

/* v0.4.1: prevent narrow admin column on mobile */
html,body,#app,.layout,#page,#adminbody{min-width:0;max-width:100%}
#adminbody{display:block;width:100%}
#adminbody>.panel{width:100%;max-width:none}
#adminbody pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;overflow-x:auto}
@media(max-width:760px){.layout{display:block;width:100%}.main{display:block;width:100%;max-width:none;min-width:0;margin:0}#page,#adminbody{width:100%}.panel{width:100%}}

/* v0.4.4: recent activity behind initial scroll, compact muted history */
.hiddenhistory{opacity:.57;filter:grayscale(.35);padding:8px 0 16px}
.historycard{min-height:52px;background:#1b232c;border:1px solid #29333c;border-radius:9px}
.historycard>img{width:40px;height:60px;object-fit:cover}
.historycard .watchinfo{padding:6px 10px;gap:2px}
.historycard .watchtitle{font-size:13px}
.historycard .tiny{font-size:11px}
.hiddenhistory .watchlist{gap:5px}
.hiddenhistory .watchsection h2{margin:4px auto}
@media(max-width:760px){.historycard>img{width:38px;height:56px}.historycard .watchinfo{padding:5px 8px}}

.tilefollow{margin-top:9px;background:#253746;color:#b5c9d6;border:1px solid #3a4e5c;border-radius:7px;padding:6px 8px;font-size:11px}

/* v0.4.5: light theme and mobile controls */
html[data-theme="light"]{color-scheme:light}html[data-theme="light"] body{background:#f3f6fa;color:#1e3040}html[data-theme="light"] .layout{background:#f3f6fa}html[data-theme="light"] .sidebar,html[data-theme="light"] .mobilebar{background:#fff;border-color:#dce3ec}html[data-theme="light"] .panel,html[data-theme="light"] .form,html[data-theme="light"] .modal,html[data-theme="light"] .episode{background:#fff;color:#1e3040;border-color:#dce3ec}html[data-theme="light"] .nav,html[data-theme="light"] .mobilebar button,html[data-theme="light"] .muted,html[data-theme="light"] .tiny,html[data-theme="light"] .field label,html[data-theme="light"] .tile small{color:#4e6273}html[data-theme="light"] .nav.active,html[data-theme="light"] .nav:hover{background:#e1ede9;color:#143e34}html[data-theme="light"] .field input,html[data-theme="light"] .field select,html[data-theme="light"] input.search,html[data-theme="light"] textarea{background:#fff;color:#172b38;border-color:#bccbd6}html[data-theme="light"] .btn.secondary,html[data-theme="light"] .tabs button{background:#e4ecf2;color:#213b4c}html[data-theme="light"] .tabs button.active{background:#49b897;color:#082d25}html[data-theme="light"] .result,html[data-theme="light"] .calendarrow,html[data-theme="light"] .table td,html[data-theme="light"] .table th{border-color:#dce3ec}html[data-theme="light"] .empty,html[data-theme="light"] .season{border-color:#bdcbd6;color:#415767}html[data-theme="light"] .badge{background:#d8f1e7;color:#176649}html[data-theme="light"] .statuschip{border-color:#c5d1dc}html[data-theme="light"] .code{color:#245b4d}html[data-theme="light"] .poster{background:#e2e9ef}html[data-theme="light"] .progress{background:#dce6ed}.themefloat{display:none}@media(max-width:760px){.themefloat{display:block;position:fixed;right:12px;bottom:67px;z-index:11;border:1px solid #889dad;background:#dce7ec;color:#213b4c;border-radius:30px;padding:9px 12px}}

/* v0.5.0: theme switcher moved to personal settings */
.themefloat{display:none!important}

/* v0.5.2: full light palette, readable dashboard and recent-history cards */
html[data-theme="light"],html[data-theme="light"] body,html[data-theme="light"] #app{background:#f5f7fb;color:#172b3a}
html[data-theme="light"] .main,html[data-theme="light"] #page{color:#172b3a}
html[data-theme="light"] .top h1,html[data-theme="light"] .brand,html[data-theme="light"] .watchtitle,html[data-theme="light"] .tile h3,html[data-theme="light"] .panel h2,html[data-theme="light"] .panel h3{color:#172b3a}
html[data-theme="light"] .watchcard{background:#ffffff;color:#172b3a;border:1px solid #dce5ed;box-shadow:0 2px 7px rgba(30,53,73,.06)}
html[data-theme="light"] .watchinfo,html[data-theme="light"] .watchinfo .muted,html[data-theme="light"] .watchinfo .tiny{color:#526477}
html[data-theme="light"] .watchinfo .watchtitle{color:#172b3a}
html[data-theme="light"] .watchsection h2{background:#e6edf3;color:#34465a}
html[data-theme="light"] .switcher{background:#e2eaf1;border:1px solid #ccd8e3}
html[data-theme="light"] .switcher button{color:#344b5d}
html[data-theme="light"] .switcher button.active{background:#45bf9f;color:#082d25}
html[data-theme="light"] .watchcheck{background:#fff;border-color:#8193a2;color:#53687a}
html[data-theme="light"] .watchcheck.done{background:#e1f6ed;border-color:#67b995;color:#18744c}
html[data-theme="light"] .historycard{background:#edf2f6;border-color:#d5e0e8;box-shadow:none}
html[data-theme="light"] .hiddenhistory{opacity:1;filter:none}
html[data-theme="light"] .hiddenhistory .historycard{opacity:.9}
html[data-theme="light"] .hiddenhistory .watchtitle{color:#2d4151}
html[data-theme="light"] .hiddenhistory .watchinfo .tiny,html[data-theme="light"] .hiddenhistory .watchinfo .muted{color:#526477}
html[data-theme="light"] .synopsis,html[data-theme="light"] .subtitle{color:#506477}
html[data-theme="light"] .episode{background:#f0f5f9;color:#172b3a}
html[data-theme="light"] .status-ongoing{background:#dff4e9;color:#126243}
html[data-theme="light"] .status-ended{background:#e8edf3;color:#47586a}
html[data-theme="light"] .status-canceled{background:#fae5e8;color:#9a3446}
html[data-theme="light"] .status-unknown{background:#ece9e3;color:#645d50}
html[data-theme="light"] .provider,html[data-theme="light"] .tilefollow{background:#edf3f7;color:#344d5c;border-color:#cfdae5}
html[data-theme="light"] .progress>div{background:#239d7d}
html[data-theme="light"] .mobilebar button{color:#304b5d}
html[data-theme="light"] a{color:#087d65}
html[data-theme="light"] .empty{background:#fff;color:#526477}


/* v0.5.3 Sakura – soft cherry-blossom theme with accessible contrast */
html[data-theme="sakura"]{color-scheme:light;--sakura-bg:#fff5f8;--sakura-text:#392734;--sakura-muted:#745663;--sakura-border:#efd6df;--sakura-accent:#b93774}
html[data-theme="sakura"],html[data-theme="sakura"] body,html[data-theme="sakura"] #app,html[data-theme="sakura"] .layout{background:#fff5f8;color:#392734}
html[data-theme="sakura"] .main,html[data-theme="sakura"] #page,html[data-theme="sakura"] .top h1,html[data-theme="sakura"] .brand,html[data-theme="sakura"] .watchtitle,html[data-theme="sakura"] .tile h3,html[data-theme="sakura"] .panel h2,html[data-theme="sakura"] .panel h3{color:#392734}
html[data-theme="sakura"] .sidebar,html[data-theme="sakura"] .mobilebar{background:#ffecf2;border-color:#efd6df}
html[data-theme="sakura"] .panel,html[data-theme="sakura"] .form,html[data-theme="sakura"] .modal,html[data-theme="sakura"] .episode,html[data-theme="sakura"] .empty{background:#fffafc;color:#392734;border-color:#efd6df}
html[data-theme="sakura"] .watchcard{background:#fffafc;color:#392734;border:1px solid #efd6df;box-shadow:0 2px 9px rgba(130,49,82,.07)}
html[data-theme="sakura"] .watchinfo .watchtitle{color:#392734}
html[data-theme="sakura"] .muted,html[data-theme="sakura"] .tiny,html[data-theme="sakura"] .watchinfo .muted,html[data-theme="sakura"] .watchinfo .tiny,html[data-theme="sakura"] .field label,html[data-theme="sakura"] .tile small,html[data-theme="sakura"] .subtitle,html[data-theme="sakura"] .synopsis{color:#745663}
html[data-theme="sakura"] .watchsection h2{background:#f9e0e9;color:#73364f}
html[data-theme="sakura"] .historycard{background:#f6eaf0;color:#493641;border:1px solid #eed5df;box-shadow:none}
html[data-theme="sakura"] .hiddenhistory{opacity:1;filter:none}
html[data-theme="sakura"] .hiddenhistory .historycard{opacity:.83}
html[data-theme="sakura"] .hiddenhistory .watchtitle{color:#493641}
html[data-theme="sakura"] .hiddenhistory .watchinfo .muted,html[data-theme="sakura"] .hiddenhistory .watchinfo .tiny{color:#715763}
html[data-theme="sakura"] .btn,html[data-theme="sakura"] .tabs button.active,html[data-theme="sakura"] .switcher button.active{background:#bb3c77;color:#fff}
html[data-theme="sakura"] .btn.secondary,html[data-theme="sakura"] .tabs button,html[data-theme="sakura"] .provider,html[data-theme="sakura"] .tilefollow{background:#f8e5ed;color:#67364d;border-color:#e9c9d7}
html[data-theme="sakura"] .switcher{background:#fae6ee;border:1px solid #e9c9d7}
html[data-theme="sakura"] .switcher button{color:#76485c}
html[data-theme="sakura"] .nav,html[data-theme="sakura"] .mobilebar button{color:#673b52}
html[data-theme="sakura"] .nav.active,html[data-theme="sakura"] .nav:hover{background:#f5d7e3;color:#722d51}
html[data-theme="sakura"] .field input,html[data-theme="sakura"] .field select,html[data-theme="sakura"] input.search,html[data-theme="sakura"] textarea{background:#fff;color:#392734;border-color:#d9b5c5}
html[data-theme="sakura"] input:focus{border-color:#bb3c77;outline-color:#bb3c77}
html[data-theme="sakura"] input[type=checkbox]{accent-color:#bb3c77}
html[data-theme="sakura"] .result,html[data-theme="sakura"] .calendarrow,html[data-theme="sakura"] .table td,html[data-theme="sakura"] .table th,html[data-theme="sakura"] .season{border-color:#e9c9d7}
html[data-theme="sakura"] .badge{background:#f6dbe6;color:#762c52}
html[data-theme="sakura"] .status-ongoing{background:#def1e6;color:#155b43}
html[data-theme="sakura"] .status-ended{background:#e9e4eb;color:#5d4961}
html[data-theme="sakura"] .status-canceled{background:#f9dce0;color:#932a44}
html[data-theme="sakura"] .status-unknown{background:#eee8e1;color:#625445}
html[data-theme="sakura"] .watchcheck{background:#fff;border-color:#ae8397;color:#82546b}
html[data-theme="sakura"] .watchcheck.done{background:#f7d8e7;border-color:#bb3c77;color:#9e285f}
html[data-theme="sakura"] .progress{background:#f0dce5}
html[data-theme="sakura"] .progress>div{background:#bb3c77}
html[data-theme="sakura"] .code,html[data-theme="sakura"] a{color:#9e285f}
html[data-theme="sakura"] .poster{background:#f4e5ea}
html[data-theme="sakura"] .modalcover{background:#301722b3}
html[data-theme="sakura"] .btn.warn{background:#9d384a;color:white}
html[data-theme="sakura"] .themefloat{display:none!important}

/* Calendar show titles behave as links, including touch affordance. */
.calendar-title{border:0;background:transparent;color:var(--accent,#44bda0);font:inherit;font-weight:700;text-align:left;padding:4px 2px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.calendar-title:focus-visible{outline:2px solid currentColor;outline-offset:2px}
