:root{color-scheme:dark;--bg:#100d0b;--panel:#1b1511;--panel2:#241a14;--line:#3b2b20;--text:#f2e8df;--muted:#b09b89;--accent:#b77c4e;--accent2:#d2a47b;--cream:#e7d2bd}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:radial-gradient(ellipse at 50% -25%,#382519 0%,#17100c 42%,var(--bg) 75%);color:var(--text);font:15px/1.6 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh}
a{color:inherit;text-decoration:none}.topbar{height:94px;border-bottom:1px solid #493426;background:rgba(13,10,8,.88);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 max(24px,calc((100% - 1180px)/2));position:relative}.brand{grid-column:2;font-weight:900;letter-spacing:.19em;font-size:clamp(20px,3vw,29px);color:#f0dfcf;text-align:center;text-shadow:0 3px 24px #000}.brand span{color:var(--accent2);margin-left:7px}.topbar-side{grid-column:1}.topbar nav{grid-column:3;justify-self:end}.topbar nav,.topbar-side{display:flex;gap:22px;color:#c2aa96;font-size:11px;font-weight:800;letter-spacing:.16em}.topbar nav a:hover,.topbar-side a:hover,.back:hover{color:#f1c69f}
.container{max-width:1180px;margin:0 auto;padding:54px 26px 90px}.intro{padding:20px 0 40px}.eyebrow{font-size:10px;letter-spacing:.22em;color:var(--accent2);font-weight:800;margin:0 0 12px}.intro h1{font-size:clamp(36px,5vw,58px);line-height:1.08;letter-spacing:-.045em;margin:12px 0 15px;font-weight:750}.intro h1 span{color:#c18a60}.muted,.hint{color:var(--muted)}.intro>.muted{font-size:15px}.library-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:8px 0 20px;border-bottom:1px solid var(--line);padding-bottom:16px}.library-head h2{font-size:23px;margin:0;letter-spacing:-.02em}.library-head .eyebrow{margin-bottom:4px}.search-wrap{width:min(330px,48%);position:relative;margin:0}.search-wrap span{position:absolute;left:14px;top:7px;color:var(--accent2);font-size:24px}.search-wrap input{padding-left:42px;margin:0;background:#1c1510;border:1px solid #493426;border-radius:10px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:20px}.video-card{border:1px solid #3d2c21;border-radius:13px;overflow:hidden;background:linear-gradient(150deg,#241a14,#17110e);transition:transform .22s,border-color .22s,box-shadow .22s;display:block}.video-card:hover{transform:translateY(-4px);border-color:#a8754e;box-shadow:0 14px 35px #0008}.video-card[hidden]{display:none}.thumb{aspect-ratio:16/9;background:radial-gradient(circle at 70% 35%,#62432e 0%,#382519 32%,#1a120e 78%);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}.thumb:before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,transparent 35%,#e0b38a12 36%,transparent 68%)}.thumb .play{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#d7b18b25;border:1px solid #d7b18b75;color:#f1d4b6;padding-left:3px;backdrop-filter:blur(5px);transition:background .2s,transform .2s}.video-card:hover .play{background:#a66c43;transform:scale(1.08)}.thumb small{position:absolute;left:13px;bottom:10px;color:#d5b99f;font-size:9px;letter-spacing:.2em;font-weight:800}.card-copy{padding:15px 16px 16px}.card-copy h2{font-size:16px;margin:0 0 5px;color:#f1e5d9}.card-copy p{font-size:13px;color:#ad9988;margin:0;min-height:20px}.watch-label{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #3b2b20;margin-top:14px;padding-top:11px;color:#c9966e;font-size:9px;letter-spacing:.17em;font-weight:800}.watch-label b{font-size:16px}.empty{text-align:center;border:1px dashed #59402e;border-radius:14px;padding:65px 20px;color:var(--muted);background:#1b15118a}.empty-icon{font-size:32px;color:var(--accent2)}.empty h2{color:var(--text);margin-top:12px}
.panel{background:linear-gradient(145deg,#241a14,#18120e);border:1px solid #493426;border-radius:14px;padding:24px;margin:22px 0;box-shadow:0 12px 30px #0003}.auth{max-width:430px;margin:35px auto}.auth h1{font-size:34px}form label{display:block;color:#c4ad98;font-size:13px;margin:14px 0}input,textarea{display:block;width:100%;margin-top:7px;padding:12px 13px;border:1px solid #493426;border-radius:8px;background:#100c09;color:var(--text);font:inherit}input:focus,textarea:focus{outline:1px solid var(--accent2);border-color:var(--accent2)}button{border:1px solid #b77c4e;border-radius:8px;background:linear-gradient(135deg,#9c643e,#71452d);color:#fff3e8;padding:10px 16px;font-weight:750;cursor:pointer;transition:filter .2s,transform .2s}button:hover{filter:brightness(1.15);transform:translateY(-1px)}.secondary{background:#302219;border-color:#62442f;color:#e8d3c0}.danger{background:#512b25;border-color:#80463a;color:#ffe0d8}.error{color:#ff929b}.admin-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.upload-form{max-width:680px}.hint{font-size:12px}.count{font-size:12px;color:var(--muted);margin-left:8px}.admin-item{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:17px 0;border-top:1px solid var(--line)}.admin-info{display:flex;flex-direction:column}.admin-info small{color:var(--muted);font-size:12px}.actions{display:flex;gap:8px}.actions form{margin:0}.watch{max-width:960px;margin:24px auto}.watch video{width:100%;max-height:70vh;background:#000;border:1px solid #493426;border-radius:13px}.watch h1{font-size:38px}.description{color:var(--muted);white-space:pre-wrap}.back{color:#c3a78f;font-size:13px}footer{border-top:1px solid #38291f;padding:25px 18px;text-align:center;color:#a28c78;font-size:11px;display:flex;flex-direction:column;gap:3px;letter-spacing:.06em}footer strong{color:#d4ae8b;letter-spacing:.2em;font-size:13px}
@media(max-width:650px){.container{padding:32px 16px 60px}.topbar{height:78px;padding:0 14px}.topbar-side,.topbar nav{font-size:9px;letter-spacing:.08em}.brand{font-size:18px;letter-spacing:.1em}.intro{padding-top:12px}.library-head{align-items:stretch;flex-direction:column}.search-wrap{width:100%}.admin-head,.admin-item{align-items:flex-start;flex-direction:column}.actions{flex-wrap:wrap}.watch h1{font-size:29px}}

.editable-headline{white-space:pre-line}


/* Edycja metadanych filmu w panelu administratora */
.video-edit { flex-basis: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, #49372d); }
.video-edit summary { cursor: pointer; color: #d4ad8d; font-weight: 600; padding: 7px 0; }
.video-edit[open] { width: 100%; }
.video-edit .upload-form { max-width: 720px; margin-top: 12px; }

/* Najnowszy film w dużym odtwarzaczu na stronie głównej */
.featured-section{margin:8px 0 46px}.featured-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.featured-heading h2{font-size:25px;margin:0;color:var(--text)}.featured-badge{border:1px solid #8a5b3c;background:#3a281d;color:#e6bd98;border-radius:999px;padding:6px 12px;font-size:10px;font-weight:800;letter-spacing:.15em}.featured-player-wrap{overflow:hidden;border:1px solid #513a2a;border-radius:16px;background:linear-gradient(145deg,#251a13,#120e0b);box-shadow:0 18px 48px #0006}.featured-player-wrap[hidden]{display:none}.featured-player{display:block;width:100%;max-height: min(68vh,680px);aspect-ratio:16/9;background:#050403;object-fit:contain}.featured-copy{padding:21px 24px 23px}.featured-copy h2{font-size:clamp(22px,3vw,31px);margin:0 0 7px;color:#f1e5d9}.featured-copy p{color:#b09b89;margin:0 0 15px;white-space:pre-wrap}.featured-link{display:inline-flex;gap:22px;align-items:center;color:#d5a77e;font-size:10px;font-weight:850;letter-spacing:.15em;border-top:1px solid #493426;padding-top:12px}.featured-link:hover{color:#ffe0bf}.library-head{margin-top:16px}.grid{margin-top:20px}@media(max-width:650px){.featured-copy{padding:16px}.featured-heading h2{font-size:21px}.featured-player{max-height:45vh}}

/* Uporządkowany panel administratora i grupy edycji tekstów */
.settings-panel h2{margin-top:0}.settings-group{border:1px solid var(--line);border-radius:10px;padding:0 15px;margin:12px 0;background:#15100d}.settings-group summary,.section-summary{cursor:pointer;list-style:none;color:#e1c1a3;font-weight:800;padding:15px 0}.settings-group summary::-webkit-details-marker,.section-summary::-webkit-details-marker{display:none}.settings-group summary:after,.admin-section>.section-summary:after{content:'＋';float:right;color:var(--accent2)}.settings-group[open] summary:after,.admin-section[open]>.section-summary:after{content:'−'}.settings-group[open]{padding-bottom:12px}.admin-section>.section-summary{font-size:20px}.admin-section[open]>.section-summary{border-bottom:1px solid var(--line);margin-bottom:14px}.section-content{padding-top:6px}.settings-panel .upload-form{max-width:760px}.settings-panel button{margin-top:10px}.admin-section{display:block}.admin-section>summary{outline:none}.admin-section .admin-list{margin-top:8px}


/* Historia zmian: zwijana sekcja w panelu administratora */
.history-panel > summary { cursor: pointer; user-select: none; }
.history-panel > summary:hover { color: var(--accent, #c49a76); }
.history-panel[open] > summary { margin-bottom: 1rem; }

/* Wbudowane ustawienia jakości w odtwarzaczu TRELO MORELO */
.video-player-frame{position:relative;width:100%;background:#000;border-radius:12px;overflow:hidden;isolation:isolate}
.video-player-frame video{display:block;width:100%;max-height:80vh;background:#000}
.video-player-frame:fullscreen{display:flex;align-items:center;justify-content:center;border-radius:0}
.video-player-frame:fullscreen video{width:100%;max-height:100%;height:100%;object-fit:contain}
.player-actions{position:absolute;z-index:5;right:12px;top:12px;display:flex;align-items:flex-start;gap:8px}
.player-quality{position:relative}
.player-icon-button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:8px 10px;border:1px solid #8b7159;border-radius:8px;background:rgba(17,12,9,.9);color:#f5e8dc;font-size:12px;font-weight:700;cursor:pointer;backdrop-filter:blur(8px)}
.player-icon-button:hover,.player-icon-button:focus-visible{background:#4a3020;outline:2px solid #d2a47b;outline-offset:1px}
.player-icon-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.player-icon-button[hidden],.player-quality[hidden],.quality-menu[hidden]{display:none!important}
.quality-menu{position:absolute;right:0;top:calc(100% + 8px);min-width:185px;max-height:min(60vh,330px);overflow-y:auto;border:1px solid #75543e;border-radius:10px;padding:7px;background:rgba(25,17,12,.98);box-shadow:0 12px 35px rgba(0,0,0,.6)}
.quality-menu-title{display:block;padding:8px;color:#d0ac8d;font-weight:700;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.quality-menu button{display:block;width:100%;padding:10px 12px;text-align:left;border:0;border-radius:6px;background:transparent;color:#f3e7dc;font-size:13px;cursor:pointer}
.quality-menu button:hover,.quality-menu button:focus-visible{background:#4b3325;outline:none}
.quality-menu button[aria-checked="true"]{background:#5b3c28;color:#fff;font-weight:800}
@media(max-width:520px){.player-actions{right:7px;top:7px;gap:5px}.player-icon-button{min-height:34px;padding:7px;font-size:11px}.quality-menu{min-width:166px}}

/* Player quality controls also on featured home-page video */
.featured-player-frame{border-radius:0}
.featured-player-frame .featured-player{max-height:min(68vh,680px)}
@media(max-width:650px){.featured-player-frame .featured-player{max-height:45vh}}


/* Miniatury filmów */
.thumb{position:relative;overflow:hidden}
.thumb-image{width:100%;height:100%;display:block;object-fit:cover}
.admin-item{align-items:flex-start}
.admin-thumb-cell{width:168px;flex:0 0 168px}
.admin-thumb,.admin-thumb-preview{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:12px;border:1px solid var(--line);background:#120d0a;display:block}
.thumbnail-preview-block{margin:6px 0 10px}
.thumb-label{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}
.checkbox-row{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px}
.checkbox-row input{width:auto;margin:0}
@media(max-width:850px){
  .admin-thumb-cell{width:100%;flex:1 1 auto}
  .admin-thumb{max-width:280px}
}


/* TRELO MORELO | minimalistyczny panel administracyjny */
.tm-admin{--tm-border:#483427;--tm-mute:#b19c8a;--tm-accent:#d3a580;--tm-panel:#1e1611;max-width:1220px;margin:0 auto;color:#f1e5d9}
.tm-admin *{min-width:0}
.tm-admin-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:4px 0 28px;border-bottom:1px solid var(--tm-border)}
.tm-admin-header h1{font-size:clamp(28px,3.5vw,38px);line-height:1.2;letter-spacing:-.04em;margin:0 0 8px;font-weight:750}
.tm-admin-header p:not(.eyebrow){color:var(--tm-mute);font-size:13px;margin:0}
.tm-admin-header .eyebrow{margin:0 0 12px}
.tm-admin .tm-logout{flex-shrink:0;margin:8px 0 0}
.tm-admin .tm-logout button{white-space:nowrap;padding:9px 14px;font-size:12px}
.tm-admin-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:35px;padding-top:26px;align-items:start}
.tm-admin-sidebar{position:sticky;top:22px;display:flex;flex-direction:column;gap:4px;padding-top:5px}
.tm-sidebar-label{font-size:10px;letter-spacing:.19em;font-weight:800;color:#9c826d;padding:0 12px 14px}
.tm-admin .tm-nav-link{display:flex;gap:12px;align-items:center;padding:12px 13px;border:1px solid transparent;border-radius:9px;font-size:13px;font-weight:650;color:#cbb6a4;transition:.15s background,.15s color,.15s border-color}
.tm-nav-link>span:first-child{width:18px;text-align:center;color:#ba8b68;font-size:18px;font-weight:400}
.tm-admin .tm-nav-link:hover,.tm-admin .tm-nav-link:focus-visible{color:#f7e8db;background:#271b14;border-color:#493326;outline:none}
.tm-nav-count{margin-left:auto;border-radius:7px;background:#352419;color:#d5ad8e;padding:1px 8px;font-size:11px}
.tm-sidebar-foot{font-size:11px;color:#896f5c;line-height:1.7;margin:24px 12px;padding-top:18px;border-top:1px solid #3c291e}
.tm-admin-main{display:grid;gap:28px}
.tm-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tm-summary-card{background:linear-gradient(145deg,#241b15,#19120f);border:1px solid var(--tm-border);border-radius:12px;padding:21px 18px;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.tm-summary-card>span{font-size:10px;font-weight:800;letter-spacing:.11em;color:#b59b86}
.tm-summary-card strong{font-size:33px;line-height:1.15;font-weight:730;color:#f4e7d9;font-variant-numeric:tabular-nums}
.tm-summary-card small{font-size:11px;color:#8e7b6c}
.tm-panel-block{background:linear-gradient(145deg,#211914,#18120f);border:1px solid var(--tm-border);border-radius:14px;padding:24px 26px;scroll-margin-top:18px}
.tm-section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px}
.tm-section-heading .eyebrow{font-size:9px;letter-spacing:.2em;margin-bottom:8px}
.tm-section-heading h2{font-size:clamp(20px,2.2vw,25px);line-height:1.25;margin:0;font-weight:720;letter-spacing:-.03em}
.tm-section-count{font-size:12px;font-weight:700;color:#ae9580;margin-left:4px}
.tm-text-link{white-space:nowrap;font-size:12px;font-weight:750;color:#dfb18b;border:1px solid #60442f;padding:9px 12px;border-radius:8px}
.tm-text-link:hover{background:#3b291c;color:#f3d3b5}
.tm-section-help{font-size:12px;color:var(--tm-mute);margin:-6px 0 21px;line-height:1.65}
.tm-video-list{display:grid;gap:13px}
.tm-admin .tm-video-card{display:grid;grid-template-columns:144px minmax(0,1fr);gap:12px 19px;align-items:start;background:#17110e;border:1px solid #3d2e24;border-radius:11px;padding:15px;margin:0;min-width:0}
.tm-admin .tm-card-thumbnail{grid-column:1;grid-row:1/3;width:144px;flex:none}
.tm-admin .tm-card-thumbnail img{display:block;width:144px;height:auto;aspect-ratio:16/9;object-fit:cover}
.tm-admin .tm-video-info{grid-column:2;min-width:0}
.tm-admin .tm-video-info strong{display:block;font-size:15px;color:#f1e4d8;overflow-wrap:anywhere;margin-bottom:3px}
.tm-admin .tm-video-info small{display:block;font-size:11px;line-height:1.65;color:#a89382}
.tm-admin .hls-ready{color:#91c6a4}.tm-admin .hls-processing{color:#efd099}.tm-admin .hls-error{color:#ff9f9f}
.tm-admin .tm-edit{grid-column:2;grid-row:2;border:0;width:100%;min-width:0;margin:0}
.tm-admin .tm-edit>summary{color:#d6a780;font-size:12px;cursor:pointer;list-style:none;padding:0 0 6px;width:max-content;max-width:100%;font-weight:750}
.tm-admin .tm-edit>summary::-webkit-details-marker{display:none}
.tm-admin .tm-edit>summary span{padding-left:4px}
.tm-admin .tm-edit[open]{grid-column:1/-1;grid-row:3;background:#211811;border:1px solid #4b3526;border-radius:10px;padding:15px 18px;margin-top:4px}
.tm-admin .tm-edit[open]>summary{margin-bottom:12px}
.tm-admin .tm-video-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;padding-top:12px;margin-top:3px;border-top:1px solid #38281d}
.tm-admin .tm-video-actions form{margin:0}
.tm-admin .tm-video-actions button{padding:8px 12px;font-size:11px;border-radius:7px;line-height:1.35}
.tm-admin .tm-video-actions .danger{background:#37221f;border-color:#633630;color:#f0c1b9}
.tm-admin .tm-video-actions .danger:hover{background:#552c29}
.tm-admin .upload-form{max-width:100%}
.tm-admin label{font-size:12px;font-weight:650;color:#cbb39e}
.tm-admin input,.tm-admin textarea{width:100%;background:#120d0a;border:1px solid #483428;border-radius:8px;padding:11px 12px;font-size:13px;color:#f1e5d9}
.tm-admin input[type=file]{color:#bfa99a;cursor:pointer;max-width:100%}
.tm-admin input[type=file]::file-selector-button{background:#362519;border:1px solid #60442e;border-radius:6px;color:#eed4bb;padding:7px 11px;margin-right:12px;cursor:pointer}
.tm-admin input:focus-visible,.tm-admin textarea:focus-visible,.tm-admin button:focus-visible,.tm-admin a:focus-visible,.tm-admin summary:focus-visible{outline:2px solid #e4b994;outline-offset:2px}
.tm-admin textarea{min-height:85px;resize:vertical}
.tm-admin button{font-size:12px;padding:11px 15px}
.tm-admin .checkbox-row{display:flex;align-items:center;gap:10px}
.tm-admin .checkbox-row input{width:16px;height:16px;flex:0 0 auto}
.tm-admin .admin-thumb-preview{max-width:240px}
.tm-admin .settings-group{margin:8px 0;padding:0 14px;border:1px solid #453125;border-radius:9px;background:#17110e}
.tm-admin .settings-group>summary{padding:15px 2px;color:#e1c5ad;font-size:12px;font-weight:750}
.tm-admin .settings-group[open]{padding-bottom:14px}
.tm-admin .settings-group label{margin-top:15px}
.tm-admin .tm-settings-panel .upload-form>button{margin-top:17px}
.tm-admin .tm-notice{background:#262017;border:1px solid #71553b;border-radius:10px;padding:12px 16px;color:#d6c4ac;font-size:13px;margin:18px 0 0}
.tm-history-details>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px}
.tm-history-details>summary::-webkit-details-marker{display:none}
.tm-history-details>summary strong{display:block;font-size:21px;font-weight:730;letter-spacing:-.02em}
.tm-history-details>summary .eyebrow{display:block;margin-bottom:7px}
.tm-toggle-indicator{font-size:24px;color:#d4a580;font-weight:400}
.tm-history-details[open] .tm-toggle-indicator{transform:rotate(45deg)}
.tm-history-details>.tm-section-help{margin:13px 0}
.tm-history-list{display:grid;gap:9px;margin-top:12px}
.tm-admin .tm-history-item{background:#17110e;border:1px solid #3c2b20;border-radius:9px;padding:14px 16px;margin:0;display:block}
.tm-admin .tm-history-item strong{display:block;font-size:13px}
.tm-admin .tm-history-item small{color:#a48b78;font-size:11px}
.tm-admin .tm-history-item p{font-size:12px;overflow-wrap:anywhere;margin:6px 0 0}
.tm-empty-state{padding:36px 18px;text-align:center;font-size:13px;color:var(--tm-mute);border:1px dashed #55402f;border-radius:12px}
.tm-empty-state a{color:#e0ae8b;text-decoration:underline}
.tm-bottom-link{text-align:right;padding-bottom:8px}
.tm-bottom-link a{font-size:12px;color:#bba28e}
@media(max-width:1000px){.tm-admin-layout{grid-template-columns:170px minmax(0,1fr);gap:20px}.tm-panel-block{padding:22px 20px}}
@media(max-width:760px){
 .tm-admin-header{padding-bottom:20px}.tm-admin-layout{display:block;padding-top:16px}
 .tm-admin-sidebar{position:static;display:flex;flex-direction:row;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:0 0 13px;margin-bottom:18px;scrollbar-width:thin;border-bottom:1px solid #3c2b20}
 .tm-sidebar-label,.tm-sidebar-foot,.tm-nav-count{display:none}
 .tm-admin .tm-nav-link{font-size:11px;padding:9px 11px;border:1px solid #4d3728;white-space:nowrap;flex:0 0 auto;gap:6px}
 .tm-nav-link>span:first-child{font-size:15px;width:15px}
 .tm-admin-main{gap:18px}.tm-overview{gap:8px}.tm-summary-card{padding:15px 12px}.tm-summary-card>span{font-size:8px}.tm-summary-card strong{font-size:25px}.tm-summary-card small{font-size:10px}
}
@media(max-width:530px){
 .tm-admin-header{gap:12px}.tm-admin-header h1{font-size:25px}.tm-admin-header p:not(.eyebrow){font-size:11px}
 .tm-admin .tm-logout button{font-size:11px;padding:9px 10px}.tm-panel-block{padding:17px 14px;border-radius:11px}
 .tm-section-heading{align-items:center}.tm-section-heading h2{font-size:20px}.tm-text-link{padding:8px;font-size:11px}
 .tm-admin .tm-video-card{grid-template-columns:86px minmax(0,1fr);padding:12px;gap:8px 11px}
 .tm-admin .tm-card-thumbnail{width:86px}.tm-admin .tm-card-thumbnail img{width:86px}
 .tm-admin .tm-video-info strong{font-size:13px}.tm-admin .tm-video-info small{font-size:10px}
 .tm-admin .tm-video-actions{gap:6px}.tm-admin .tm-video-actions form{flex-grow:1}.tm-admin .tm-video-actions button{width:100%;font-size:10px;padding:9px 10px}
 .tm-admin .tm-edit[open]{padding:12px}.tm-admin .tm-edit>summary{font-size:11px}
 .tm-admin .tm-summary-card{padding:13px 9px}.tm-admin .tm-summary-card strong{font-size:24px}
}

/* Odstępy tylko na stronie głównej; NIE wpływają na panel administratora.
   :has(> .intro) ogranicza reguły do głównego kontenera strony publicznej. */
.container:has(> .intro){padding-top:18px}
.container:has(> .intro) > .intro{padding:6px 0 22px}
.container:has(> .intro) > .featured-section{margin-top:0}
@media(max-width:650px){
  .container:has(> .intro){padding-top:12px}
  .container:has(> .intro) > .intro{padding:2px 0 16px}
}


/* TRELO MORELO: większy odtwarzacz WYŁĄCZNIE na stronie pojedynczego filmu. */
/* Szerokość innych podstron, panel administratora i strona główna bez zmian. */
.container:has(> .watch){
  max-width:1440px;
  padding-left:clamp(12px,2.5vw,28px);
  padding-right:clamp(12px,2.5vw,28px);
}
.container > .watch{
  max-width:1360px;
  width:100%;
  margin:14px auto 34px;
}
.watch .video-player-frame{
  width:100%;
  aspect-ratio:16 / 9;
}
.watch .video-player-frame > video{
  display:block;
  width:100%;
  height:100%;
  max-height:none;
  object-fit:contain;
  border:0;
  border-radius:0;
}
.watch .watch-title-above{
  font-size:clamp(25px,3vw,40px);
  margin:8px 0 18px;
}
.watch .video-player-frame:fullscreen{
  width:100vw;
  height:100vh;
  aspect-ratio:auto;
}
.watch .video-player-frame:fullscreen > video{
  width:100%;
  height:100%;
  max-height:100%;
}
@media(max-width:650px){
  .container:has(> .watch){padding-left:12px;padding-right:12px}
  .container > .watch{margin-top:12px}
  .watch .watch-title-above{font-size:clamp(23px,6vw,29px);margin-bottom:14px}
}

/* Organizacja kolejności — wizualnie spójna z panelem TRELO MORELO */
.tm-order-list{list-style:none;padding:0;margin:20px 0 25px;display:grid;gap:8px}
.tm-order-item{border:1px solid #4a3529;border-radius:12px;background:linear-gradient(120deg,#241a14,#17110e);padding:12px 14px;display:flex;align-items:center;gap:14px;min-width:0}
.tm-order-number{display:grid;place-items:center;min-width:34px;height:34px;border:1px solid #59402e;border-radius:10px;color:#d5aa85;font-size:12px;font-weight:800}
.tm-order-title{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.tm-order-title strong{font-size:14px;font-weight:650;overflow-wrap:anywhere;color:#f1e5d9}
.tm-order-title small{font-size:11px;color:#b09b89}
.tm-order-buttons{display:flex;gap:7px}
.tm-order-buttons form{margin:0}
.tm-order-buttons button{padding:7px 12px;font-size:18px;line-height:1.25;min-width:42px}
.tm-order-buttons button:disabled{opacity:.3;cursor:not-allowed;transform:none}
.tm-featured-choice{border-top:1px solid #493426;padding-top:19px}
.tm-featured-choice h3{margin:0 0 5px;font-size:17px;color:#f1e5d9}
.tm-featured-form{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-top:13px}
.tm-featured-form label{flex:1;min-width:210px;margin:0;color:#c4ad98;font-size:13px}
.tm-featured-form select{display:block;margin-top:7px;width:100%;padding:12px 13px;border:1px solid #59402e;border-radius:9px;background:#100c09;color:#f2e8df;font:inherit}
.tm-featured-form button{min-height:45px}
@media(max-width:620px){.tm-order-item{gap:8px;padding:10px}.tm-order-number{min-width:27px;height:27px}.tm-order-buttons button{min-width:38px;padding:7px 10px}.tm-featured-form{display:block}.tm-featured-form button{width:100%;margin-top:12px}}


/* TRELO MORELO — favicon settings in administrator panel */
.tm-favicon-settings{margin:10px 0 12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.02)}
.tm-favicon-preview-row{display:flex;align-items:center;gap:12px;margin:8px 0 12px}
.tm-favicon-preview{width:40px;height:40px;object-fit:contain;border-radius:10px;border:1px solid var(--line);background:#120d0a;padding:6px}
.tm-favicon-help{margin:0;color:var(--muted);font-size:13px}

/* Panel — prywatne, anonimowe statystyki */
.tm-stats-page .tm-stats-back{color:#e1bb9a;text-decoration:none;font-weight:650;border:1px solid #5c412f;border-radius:10px;padding:11px 16px;white-space:nowrap}
.tm-stats-page .tm-stats-back:hover{background:#352419}
.tm-stats-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.tm-stats-cards .tm-summary-card{min-width:0}
.tm-stats-periods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:15px 0 25px}
.tm-stats-periods>div{background:#1d1511;border:1px solid #503729;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:6px}
.tm-stats-periods span{color:#bd9c83;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.tm-stats-periods strong{font-size:28px;color:#f5e5d6}
.tm-stats-periods small{color:#baa18e;font-size:12px}
.tm-stats-subheading{color:#e8d6c5;font-size:16px;margin:12px 0 14px}
.tm-stats-chart{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:8px;align-items:end;min-height:170px;overflow-x:auto}
.tm-stats-bar-col{display:flex;flex-direction:column;align-items:center;min-width:28px;gap:6px}
.tm-stats-bar-track{width:100%;height:115px;background:#211712;border:1px solid #473025;border-radius:6px;display:flex;align-items:end;overflow:hidden}
.tm-stats-bar-fill{background:linear-gradient(180deg,#c99469,#765039);width:100%;min-height:0;border-radius:5px 5px 0 0}
.tm-stats-bar-count,.tm-stats-bar-label{color:#c9b29c;font-size:11px;white-space:nowrap}
.tm-stats-table-wrap{overflow-x:auto}
.tm-stats-table{border-collapse:collapse;width:100%;font-size:14px;color:#ead9c9}
.tm-stats-table th,.tm-stats-table td{text-align:left;padding:12px 10px;border-bottom:1px solid #483326}
.tm-stats-table th{color:#b89c84;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.tm-stats-table td:not(:first-child),.tm-stats-table th:not(:first-child){text-align:right;white-space:nowrap}
.tm-stats-disclaimer{color:#a9907d;font-size:12px;line-height:1.7;margin:20px 0}
@media(max-width:780px){.tm-stats-cards,.tm-stats-periods{grid-template-columns:1fr}.tm-stats-chart{gap:4px}.tm-stats-bar-count,.tm-stats-bar-label{font-size:9px}.tm-stats-page .tm-admin-header{flex-wrap:wrap}}


/* Wyrównanie ikony lupy na środku pola wyszukiwania. */
.search-wrap span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
  pointer-events: none;
}

/* TRELO MORELO — ergonomiczny panel, bez ingerencji w inne widoki */
.tm-admin-header .tm-quick-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:18px}
.tm-admin-header .tm-quick-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 14px;border:1px solid rgba(197,154,111,.28);border-radius:11px;color:#ead2b6;background:rgba(255,255,255,.025);font-size:13px;font-weight:650;text-decoration:none;transition:background .14s,border-color .14s}
.tm-admin-header .tm-quick-actions a:hover,.tm-admin-header .tm-quick-actions a:focus-visible{background:rgba(197,154,111,.14);border-color:rgba(197,154,111,.6)}
.tm-admin-header .tm-quick-actions .tm-quick-primary{background:#bc875c;color:#1d100a;border-color:#bc875c}
.tm-admin-header .tm-quick-actions .tm-quick-primary:hover{background:#d6a279}
.tm-film-toolbar{margin:16px 0 14px}
.tm-search-label{display:block;font-size:13px;font-weight:650;margin-bottom:8px;color:#ead2b6}
.tm-film-search-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.tm-film-search-row input[type="search"]{flex:1;min-width:175px;max-width:560px;min-height:44px;padding:10px 13px;border-radius:10px}
.tm-search-count,.tm-file-note{font-size:13px;color:#c6a88c}
.tm-file-note{display:block;margin:5px 0 10px}
.tm-admin-sidebar .tm-nav-current{background:rgba(197,154,111,.16);border-radius:9px;color:#fff0d8}
.tm-video-card[hidden],#tmAdminNoFilms[hidden]{display:none!important}
.tm-settings-panel .upload-form>button[type="submit"]{position:sticky;bottom:12px;z-index:3;box-shadow:0 6px 25px rgba(0,0,0,.35)}
#tmUploadButton:disabled{opacity:.75;cursor:wait}
@media(max-width:600px){.tm-admin-header .tm-quick-actions a{flex:1;min-width:135px}.tm-film-search-row input[type="search"]{max-width:none}}

/* Osobne podstrony panelu — wspólna nawigacja */
.tm-admin-breadcrumb{display:flex;gap:8px;align-items:center;margin-bottom:19px;color:#b6a18d;font-size:13px}
.tm-admin-breadcrumb a{color:inherit;text-decoration:none}
.tm-admin-breadcrumb a:hover{text-decoration:underline}
.tm-admin-sidebar .tm-nav-current{background:rgba(198,143,92,.14);color:#f5ddc2;border-radius:10px}

/* Okienko przetwarzania HLS — tylko podstrona dodawania filmu. */
.tm-hls-overlay[hidden], .tm-hls-error[hidden] {display:none!important}
.tm-hls-overlay{position:fixed;inset:0;z-index:5000;background:rgba(10,7,6,.82);display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(7px)}
.tm-hls-dialog{width:min(100%,520px);padding:clamp(22px,4vw,38px);border:1px solid rgba(216,170,126,.26);border-radius:22px;background:#241813;color:#f2dfc9;box-shadow:0 25px 70px #0008;text-align:center}
.tm-hls-dialog h2{margin:8px 0 10px;font-size:clamp(23px,3vw,32px)}
.tm-hls-symbol{font-size:30px;color:#d9a875}
.tm-hls-filename{font-weight:600;overflow-wrap:anywhere;color:#e8bf99}
.tm-hls-dialog p{line-height:1.5}
.tm-hls-progress{height:12px;background:#443025;border-radius:20px;overflow:hidden;margin:22px 0 10px}
.tm-hls-progress>span{display:block;background:linear-gradient(90deg,#a96e48,#e8b782);height:100%;width:0;transition:width .5s ease}
.tm-hls-progress+strong{display:block;font-size:20px;color:#eec7a4}
.tm-hls-error{color:#ffc8b5;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.tm-hls-actions{display:flex;justify-content:center;align-items:center;gap:14px;flex-wrap:wrap;margin-top:24px}
.tm-hls-actions a{color:#f0cda6;text-decoration:underline;text-underline-offset:4px}

/* TRELO MORELO LIVE — video and moderated temporary chat */
.tm-live-section{margin:8px 0 42px}.tm-live-section[hidden],.featured-section[hidden],.empty[hidden],.tm-live-chat[hidden]{display:none!important}
.tm-live-title-line{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:15px}
.tm-live-title-line h2{margin:0;color:#f1e5d9;font-size:clamp(22px,3vw,29px)}.tm-live-badge{color:#ffe1d9;border:1px solid #b94e4e;background:#6f272a;padding:8px 13px;border-radius:999px;font-weight:800;font-size:12px;letter-spacing:.12em}
.tm-live-layout{display:grid;grid-template-columns:minmax(0,2.8fr) minmax(260px,1fr);gap:16px;align-items:stretch}
.tm-live-main,.tm-live-chat{border:1px solid #513a2a;border-radius:14px;background:linear-gradient(140deg,#241a14,#120e0b);overflow:hidden}
.tm-live-video{display:block;width:100%;aspect-ratio:16/9;background:#050403;object-fit:contain}
.tm-live-info{padding:18px 20px;display:flex;flex-direction:column;gap:8px;text-align:center}.tm-live-info p{margin:0;color:#dec5b0;white-space:pre-wrap}.tm-live-info small{color:#a99785}
.tm-live-chat{min-height:360px;display:flex;flex-direction:column;max-height:630px}.tm-live-chat-heading{padding:17px 16px;border-bottom:1px solid #493426;display:flex;align-items:center;justify-content:space-between;color:#eed9c4}.tm-live-chat-heading span{color:#d47568}
.tm-live-messages{overflow-y:auto;flex:1;min-height:160px;max-height:300px;padding:12px 15px}.tm-live-message{padding:7px 0;overflow-wrap:anywhere;font-size:13px;color:#e4d0bd}.tm-live-message .tm-live-nickname{font-weight:800;color:#ddaa80}.tm-live-message small{font-size:10px;color:#8b7564;margin-left:7px}
.tm-live-chat form{padding:12px 15px;border-top:1px solid #493426}.tm-live-chat label{margin:8px 0 2px}.tm-live-chat input,.tm-live-chat textarea{margin-top:4px;font-size:13px}.tm-live-chat button{margin-top:11px}.tm-live-chat-error{min-height:16px;color:#ffb9ac;font-size:12px}.tm-live-chat-tip{font-size:11px;padding:0 15px 12px;color:#a99482;line-height:1.5}
@media(max-width:850px){.tm-live-layout{grid-template-columns:1fr}.tm-live-chat{max-height:480px}.tm-live-title-line{flex-wrap:wrap}}

/* LIVE chat: confirm nickname once, then hide the nickname entry. */
.tm-live-nick-setup[hidden],.tm-live-nick-confirmed[hidden],#tmLiveMessageBox[hidden]{display:none!important}
.tm-live-nick-setup small{display:block;margin:6px 0 0;color:#a99482;font-size:11px}
.tm-live-nick-row{display:flex;gap:9px;align-items:stretch}
.tm-live-nick-row input{flex:1;min-width:0}
.tm-live-chat .tm-live-nick-confirm{width:45px;min-width:45px;margin-top:4px;padding:0;font-size:23px;line-height:1;border-radius:9px;background:#a97750;color:#1b110c}
.tm-live-nick-confirmed{margin:0 0 9px;color:#e9c8a6;font-size:12px;font-weight:600}

/* LIVE scheduled screen and admin moderation */
.tm-live-upcoming{min-height:320px;aspect-ratio:16/9;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px;background:#130e0b;border:1px solid #5c3e2c;border-radius:14px;padding:24px;color:#ead2b8}
.tm-live-upcoming strong{font-size:clamp(20px,3vw,32px);letter-spacing:.08em}
.tm-live-upcoming p{color:#bfa48d}
.tm-live-upcoming[hidden],.tm-live-video[hidden]{display:none!important}
.tm-live-moderation-line{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;border:1px solid #503a2e;padding:12px;border-radius:10px;margin:9px 0;overflow-wrap:anywhere}
.tm-live-moderation-line span{max-width:100%;flex:1}
.tm-live-moderation-line small{color:#b6a08e}
.tm-live-moderation-actions{display:flex;gap:8px;flex-wrap:wrap}
.tm-live-moderation-actions form{margin:0}
.tm-live-recording-form{display:grid;grid-template-columns:minmax(140px,1fr) minmax(180px,1fr) auto;gap:12px;align-items:end;border:1px solid #503a2e;border-radius:12px;padding:14px;margin:10px 0}
.tm-live-recording-form small{display:block;color:#b6a08e;margin-top:6px}
.tm-live-recording-form label{margin:0}
@media(max-width:760px){.tm-live-recording-form{grid-template-columns:1fr}.tm-live-upcoming{min-height:220px}}

/* LIVE moderation controls are rendered server-side only for the admin session. */
.tm-live-moderation{border-bottom:1px solid #543726;padding:9px 12px;background:#241711}
.tm-live-mod-bar{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.tm-live-mod-tag{font-size:10px;letter-spacing:.09em;font-weight:800;color:#e9ba90;margin-right:auto}
.tm-live-chat .tm-live-mod-bar button,.tm-live-msg-actions button,.tm-live-mod-muted button{margin:0;padding:5px 7px;font-size:11px;line-height:1.2;background:#523522;border:1px solid #875b3c;color:#f9dfc5;border-radius:6px;cursor:pointer}
.tm-live-chat .tm-live-mod-bar button:hover,.tm-live-msg-actions button:hover,.tm-live-mod-muted button:hover{background:#765034}
.tm-live-msg-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
.tm-live-mod-muted{margin-top:8px;display:flex;gap:5px;flex-wrap:wrap;align-items:center;font-size:11px;color:#dcb590}
.tm-live-mod-feedback{margin:5px 0 0;font-size:11px;color:#e8bd91;min-height:0}
.tm-live-mod-feedback:empty{display:none}
.tm-live-chat #tmLiveChatForm[hidden],.tm-live-mod-muted[hidden]{display:none!important}

/* Per-film comments, using the TRELO MORELO dark palette */
.tm-comments{width:min(100%,1050px);margin:34px auto 75px;padding:28px;border:1px solid rgba(201,156,116,.25);border-radius:18px;background:rgba(42,27,19,.45)}
.tm-comments h2{margin:3px 0 0;color:#f3ddc4;font-size:clamp(23px,3vw,32px)}
.tm-comments .eyebrow{margin:0}.tm-comments-caption{color:#bea58e;margin:11px 0 23px;font-size:14px}
.tm-comment-form{padding:18px;background:rgba(16,10,7,.45);border:1px solid rgba(201,156,116,.18);border-radius:12px;max-width:100%}
.tm-comment-form label{display:block;color:#e7c9a9;margin:0 0 8px;font-weight:600;font-size:13px}
.tm-comment-form input,.tm-comment-form textarea{display:block;width:100%;box-sizing:border-box;margin:0 0 12px;min-width:0}
.tm-comment-nick-row{display:flex;gap:10px;align-items:flex-start}.tm-comment-nick-row input{flex:1}
.tm-comment-nick-row button{min-width:48px;height:47px;font-weight:700;font-size:24px;border-radius:10px;padding:0}
.tm-comment-nick-confirmed{font-size:14px;font-weight:600;color:#e9bf95;margin:0 0 14px}
.tm-comment-notice{color:#e1b386;font-size:13px;margin:10px 0 0;min-height:18px}
.tm-comment-nick-setup[hidden],.tm-comment-nick-confirmed[hidden],#tmCommentMessageArea[hidden]{display:none!important}
.tm-comment-list{margin:23px 0 14px;display:grid;gap:13px}
.tm-comment-card{padding:18px;border-radius:12px;background:rgba(22,14,10,.55);border:1px solid rgba(201,156,116,.18);overflow-wrap:anywhere}
.tm-comment-card-head{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.tm-comment-card-head strong{color:#edd0ad}.tm-comment-card-head time{font-size:12px;color:#ae957e}
.tm-comment-card p{margin:12px 0 0;white-space:pre-wrap;color:#e1cebb;line-height:1.65}
.tm-comment-mod-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}
.tm-comment-mod-actions form{margin:0}.tm-comment-mod-actions button{padding:6px 12px;font-size:12px}
.tm-comment-blocked{margin:18px 0;color:#dec1a3}.tm-comment-blocked form{display:flex;align-items:center;gap:10px;margin:8px 0}
.tm-comment-empty{color:#bca18a}
@media(max-width:650px){.tm-comments{padding:18px 14px;margin:22px auto 44px}.tm-comment-card{padding:13px}}

/* Smaller discussion section with threaded replies. */
.tm-comments{width:min(100%,910px);margin:22px auto 50px;padding:18px 20px;border-radius:13px}
.tm-comments h2{font-size:clamp(19px,2.5vw,25px)}
.tm-comments-caption{margin:5px 0 14px;font-size:12px}
.tm-comment-form{padding:12px 14px;border-radius:10px}
.tm-comment-form label{margin-bottom:5px;font-size:12px}
.tm-comment-form input,.tm-comment-form textarea{margin-bottom:8px}
.tm-comment-nick-confirmed{font-size:12px;margin-bottom:8px}
.tm-comment-nick-row button{height:43px}
.tm-comment-list{margin:14px 0 9px;gap:9px}
.tm-comment-card{padding:12px 14px;border-radius:10px}
.tm-comment-card-head strong{font-size:13px}
.tm-comment-card-head time{font-size:10px}
.tm-comment-card p{margin:6px 0 0;font-size:13px;line-height:1.5}
.tm-comment-mod-actions{margin-top:8px;gap:5px}
.tm-comment-mod-actions button{padding:4px 9px;font-size:11px}
.tm-comment-replies{display:grid;gap:7px;margin:10px 0 0 15px;padding-left:11px;border-left:2px solid rgba(201,156,116,.26)}
.tm-comment-replies .tm-comment-card{padding:10px 12px;background:rgba(22,14,10,.35)}
.tm-comment-reply-context{display:flex;align-items:center;gap:10px;margin:0 0 10px;padding:7px 10px;border-radius:7px;background:rgba(201,156,116,.09);color:#e6ba93;font-size:12px}
.tm-comment-reply-context[hidden]{display:none!important}
.tm-comment-reply-context button{margin-left:auto;padding:4px 9px;font-size:11px}
#tmCommentRefresh{padding:7px 12px;font-size:12px}
@media(max-width:650px){.tm-comments{padding:14px 12px;margin:18px auto 32px}.tm-comment-card{padding:11px}.tm-comment-replies{margin-left:7px;padding-left:8px}}


/* Komentarze tej samej szerokosci co odtwarzacz na stronie filmu. */
.container:has(> .watch) > .tm-comments {
  box-sizing: border-box;
  width: 100%;
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
}

/* Czytelny podzial miedzy pseudonimem a trescia, rowniez w odpowiedziach. */
.tm-comments .tm-comment-card-head {
  justify-content: flex-start;
  gap: 8px 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(201,156,116,.20);
}
.tm-comments .tm-comment-card-head strong {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid rgba(210,160,114,.29);
  border-radius: 7px;
  background: rgba(175,113,64,.18);
  color: #f3cba7;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.tm-comments .tm-comment-card-head time {
  color: #a9917e;
  font-size: 11px;
}
.tm-comments .tm-comment-card > p {
  margin-top: 11px;
  color: #f2e1d0;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.tm-comments .tm-comment-reply > p {
  color: #e7d5c2;
}
@media(max-width:650px) {
  .container:has(> .watch) > .tm-comments { padding: 14px 12px; }
  .tm-comments .tm-comment-card > p { font-size: 13px; }
}

/* Verified admin identity: visually distinguish messages and replies. */
.tm-live-message .tm-live-nickname.tm-admin-nickname,
.tm-comment-card-head strong.tm-admin-nickname{
  color:#f2c48b!important;
  font-weight:800!important;
  letter-spacing:.012em;
  text-shadow:0 0 12px rgba(207,145,77,.13);
}
.tm-live-message .tm-live-nickname.tm-admin-nickname{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  padding:2px 7px;
  border-radius:7px;
  background:rgba(174,111,57,.16);
  border:1px solid rgba(215,156,94,.25);
}
.tm-comment-card-head strong.tm-admin-nickname{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  border:1px solid rgba(215,156,94,.45)!important;
  background:rgba(174,111,57,.23)!important;
}
.tm-admin-tag{
  display:inline-block;
  vertical-align:middle;
  border-radius:4px;
  padding:2px 5px;
  line-height:1.2;
  font-size:9px;
  font-weight:800;
  letter-spacing:.06em;
  color:#24150c;
  background:#e1b17c;
  text-shadow:none;
}


/* LIVE waiting screen: keep the chat composer lower and use available height better. */
.tm-live-chat{justify-content:flex-start;}
.tm-live-messages{flex:1 1 auto;min-height:120px;max-height:none;}
.tm-live-chat form{margin-top:auto;}
.tm-live-chat-tip{padding-top:10px;padding-bottom:14px;}
@media(max-width:850px){.tm-live-messages{min-height:110px;}}

/* Automatic, subtle video tone correction; no sharpening or resolution change.
   Target only video pixels, leaving the custom controls unchanged. */
#featuredPlayer,
#mainVideo,
#tmLivePlayer {
  filter: contrast(1.02) saturate(1.03);
}

/* Player ranges must not inherit text-field padding, border or background.
   Keep the native range track, fill, thumb and keyboard interaction. */
.tm-film-frame input[type="range"].tm-film-progress,
.tm-film-frame input[type="range"].tm-film-volume,
.tm-live-player-controls input[type="range"].tm-live-volume {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  height: 16px;
  min-width: 0;
  accent-color: #d5a77e;
  vertical-align: middle;
}
.tm-film-frame input[type="range"]:focus-visible,
.tm-live-player-controls input[type="range"]:focus-visible {
  outline: 2px solid #d5a77e;
  outline-offset: 3px;
}

/* Keep the shared header visible without removing its space in the layout. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #100d0b;
}
html { scroll-padding-top: 110px; }
.tm-admin-sidebar { top: 110px; }
@media (max-width: 650px) {
  html { scroll-padding-top: 94px; }
  .tm-admin-sidebar { top: 94px; }
}

/* Equal-height cards in each grid row; keep the watch action at the bottom. */
#videoGrid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}
#videoGrid .video-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#videoGrid .video-card[hidden] { display: none; }
#videoGrid .thumb { flex-shrink: 0; }
#videoGrid .card-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
}
#videoGrid .card-copy h2 { overflow-wrap: anywhere; }
#videoGrid .card-copy p { margin-bottom: 14px; }
#videoGrid .watch-label { margin-top: auto; }

.tm-language-switch{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:10px}
.tm-language-switch a{padding:4px 6px;border-radius:4px}
.tm-language-switch a[aria-current="true"]{color:#f2d0ac;text-decoration:underline;text-underline-offset:3px}
.tm-language-switch a:focus-visible{outline:2px solid #d5a77e;outline-offset:2px}

/* Standard colors include the root element, which controls the page scrollbar.
   Legacy pseudo-elements are used only when standard colors are unsupported. */
:root, body, * {
  scrollbar-color: #b9875f #17110e;
}
html { scrollbar-width: auto; }
@supports not (scrollbar-color: #b9875f #17110e) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-track { background: #17110e; }
  ::-webkit-scrollbar-thumb {
    background: #b9875f;
    border: 3px solid #17110e;
    border-radius: 999px;
    min-height: 40px;
  }
  ::-webkit-scrollbar-thumb:hover { background: #d2a47b; }
  ::-webkit-scrollbar-thumb:active { background: #e7c29e; }
  ::-webkit-scrollbar-corner { background: #17110e; }
}
@media (forced-colors: active) {
  * { scrollbar-color: auto; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: Canvas; }
  ::-webkit-scrollbar-thumb {
    background: ButtonText;
    border-color: Canvas;
  }
  ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: Highlight; }
}
