:root{
  --bg:#0f0f0f;--surface:#181818;--surface-2:#212121;--surface-3:#272727;--hover:#272727;
  --text:#f1f1f1;--muted:#aaa;--line:#303030;--accent:#ff2147;--accent-hover:#e8193d;--blue:#3ea6ff;
  --success:#20c47a;--danger:#ff4e4e;--shadow:0 10px 30px rgba(0,0,0,.28);
  --header-h:56px;--sidebar-w:240px;--sidebar-mini:76px;--radius:12px;--font:Arial,"Noto Sans Thai",Tahoma,sans-serif;
}
html[data-theme="light"]{--bg:#fff;--surface:#fff;--surface-2:#f2f2f2;--surface-3:#e5e5e5;--hover:#f2f2f2;--text:#0f0f0f;--muted:#606060;--line:#e5e5e5;--shadow:0 10px 30px rgba(0,0,0,.12)}
*{box-sizing:border-box}html{background:var(--bg);color:var(--text);font-family:var(--font);scrollbar-width:none;-ms-overflow-style:none}html::-webkit-scrollbar,body::-webkit-scrollbar{width:0;height:0;display:none}body{margin:0;background:var(--bg);color:var(--text);min-height:100vh;-ms-overflow-style:none;scrollbar-width:none}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}button{color:inherit}.icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;display:block}.icon.end{margin-left:auto;width:18px}.icon.flip{transform:rotate(180deg)}
.app-header{height:var(--header-h);position:fixed;top:0;left:0;right:0;z-index:100;display:grid;grid-template-columns:minmax(190px,1fr) minmax(260px,732px) minmax(190px,1fr);align-items:center;gap:18px;padding:0 16px;background:var(--bg)}
.header-left,.header-actions,.header-center{display:flex;align-items:center}.header-left{gap:10px}.header-actions{justify-content:flex-end;gap:8px;position:relative}.header-center{gap:12px;justify-content:center}.icon-button{width:40px;height:40px;border:0;border-radius:50%;background:transparent;display:inline-grid;place-items:center;cursor:pointer;position:relative;flex:0 0 auto}.icon-button:hover{background:var(--hover)}
.brand{display:flex;align-items:center;gap:4px;font-weight:800;letter-spacing:-.6px;font-size:21px;white-space:nowrap}.brand-mark{color:var(--accent);width:34px;height:26px;display:flex}.brand-logo-svg{width:100%;height:100%;display:block}.brand sup{font-size:9px;color:var(--muted);font-weight:500;margin-left:1px;margin-top:-14px}.search-box{height:40px;display:flex;flex:1;max-width:640px}.search-input-wrap{height:40px;flex:1;position:relative;display:flex;align-items:center;border:1px solid var(--line);border-radius:22px 0 0 22px;background:var(--bg);overflow:hidden}.search-input-wrap:focus-within{border-color:#1c62b9}.search-input-wrap input{border:0;outline:0;background:transparent;color:var(--text);width:100%;height:100%;padding:0 42px 0 16px;font-size:16px}.search-leading{display:none;width:20px;margin-left:14px}.search-input-wrap:focus-within .search-leading{display:block}.search-input-wrap:focus-within input{padding-left:10px}.search-clear{position:absolute;right:4px;width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:var(--text);display:none;place-items:center;cursor:pointer}.search-clear .icon{width:22px}.search-input-wrap input:not(:placeholder-shown)+.search-clear{display:grid}.search-submit{width:64px;border:1px solid var(--line);border-left:0;border-radius:0 22px 22px 0;background:var(--surface-2);display:grid;place-items:center;cursor:pointer}.search-submit:hover{background:var(--surface-3)}.mic-button{background:var(--surface-2)}
.create-button{height:36px;border-radius:18px;background:var(--surface-2);display:flex;align-items:center;gap:6px;padding:0 13px;font-weight:700;font-size:14px}.create-button:hover{background:var(--surface-3)}.create-button .icon{width:20px}.signin-button{height:36px;border:1px solid var(--line);border-radius:18px;color:var(--blue);display:flex;align-items:center;gap:7px;padding:0 13px;font-weight:700}.signin-button:hover{background:rgba(62,166,255,.12)}.signin-button .icon{width:21px}.avatar{width:34px;height:34px;border-radius:50%;background:#595959 center/cover no-repeat;border:0;color:#fff;display:inline-grid;place-items:center;font-size:14px;font-weight:700;overflow:hidden;flex:0 0 auto}.avatar.sm{width:36px;height:36px}.avatar.xs{width:30px;height:30px;font-size:12px}.avatar.lg{width:42px;height:42px}.account-trigger{cursor:pointer;margin-left:2px}.notify-badge{position:absolute;top:2px;right:0;min-width:17px;height:17px;border:2px solid var(--bg);border-radius:10px;background:#cc0000;color:white;font-size:10px;font-weight:700;display:grid;place-items:center;padding:0 3px}
.account-menu{position:absolute;right:0;top:48px;width:300px;max-height:calc(100vh - 68px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);display:none;padding:8px 0;z-index:160}.account-menu.open{display:block}.account-menu>a,.account-menu>button{width:100%;min-height:44px;border:0;background:transparent;color:var(--text);display:flex;align-items:center;gap:14px;padding:8px 16px;text-align:left;cursor:pointer}.account-menu>a:hover,.account-menu>button:hover{background:var(--hover)}.account-menu>a .icon,.account-menu>button .icon{flex:0 0 24px}.account-head{padding:10px 16px 14px;display:flex;gap:12px}.account-head>div{min-width:0;display:flex;flex-direction:column;line-height:1.45}.account-head span{color:var(--muted);font-size:14px}.account-head a{color:var(--blue);font-size:14px;margin-top:6px}.menu-separator{height:1px;background:var(--line);margin:6px 0}.mobile-search-toggle{display:none}
.mobile-search-panel{display:none}
.app-shell{padding-top:var(--header-h);min-height:100vh}.sidebar{position:fixed;top:var(--header-h);left:0;bottom:0;width:var(--sidebar-w);overflow-y:auto;background:var(--bg);z-index:80;padding:12px 12px 24px;transition:width .18s ease,transform .18s ease}.side-nav{display:flex;flex-direction:column;gap:2px}.side-nav a{min-height:40px;border-radius:10px;display:flex;align-items:center;gap:24px;padding:0 12px;font-size:14px}.side-nav a:hover,.side-nav a.active{background:var(--hover)}.side-nav a.active{font-weight:700}.side-nav .icon{width:24px;flex:0 0 24px}.side-divider{height:1px;background:var(--line);margin:12px 0}.side-heading{font-size:16px!important;gap:8px!important}.side-heading .icon{width:16px!important}.sidebar-footer{padding:6px 12px 16px;color:var(--muted);font-size:12px;line-height:1.5}.sidebar-footer b{color:var(--text);font-size:13px}.sidebar-footer p{margin:6px 0}.sidebar-backdrop{display:none}
.content{margin-left:var(--sidebar-w);min-width:0;padding:16px 24px 44px;transition:margin-left .18s ease}.nav-mini .sidebar{width:var(--sidebar-mini);padding:8px 4px}.nav-mini .content{margin-left:var(--sidebar-mini)}.nav-mini .sidebar .side-divider,.nav-mini .side-you,.nav-mini .sidebar-footer{display:none}.nav-mini .side-nav:first-child{gap:8px}.nav-mini .side-nav:first-child a{height:64px;flex-direction:column;justify-content:center;gap:4px;padding:6px 2px;font-size:10px}.nav-mini .side-nav:first-child a .icon{width:23px}
.flash{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:200;min-width:280px;max-width:min(520px,90vw);border-radius:4px;background:#303030;color:white;box-shadow:var(--shadow);padding:12px 14px;display:flex;align-items:center;gap:10px}.flash>.icon{width:20px;color:#62d69b}.flash span{flex:1}.flash button{border:0;background:transparent;color:white;cursor:pointer}.flash button .icon{width:18px}
.chips-wrap{position:sticky;top:var(--header-h);z-index:45;background:var(--bg);margin:-4px -4px 18px;padding:8px 4px 10px}.chips{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}.chip{height:32px;padding:0 13px;border-radius:8px;background:var(--surface-2);display:inline-flex;align-items:center;white-space:nowrap;font-size:14px;font-weight:700}.chip:hover{background:var(--surface-3)}.chip.active{background:var(--text);color:var(--bg)}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 20px}.section-title h1,.section-title h2{margin:0;font-size:24px}.section-title .subtitle{color:var(--muted);font-size:14px}.page-head{margin:8px 0 24px}.page-head h1{font-size:28px;margin:0 0 6px}.page-head p{margin:0;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:38px 16px}.video-card{min-width:0}.thumb{aspect-ratio:16/9;border-radius:12px;background:#222 center/cover no-repeat;display:block;position:relative;overflow:hidden}.thumb::after{content:"";position:absolute;inset:0;background:rgba(0,0,0,0);transition:.18s}.thumb:hover::after{background:rgba(0,0,0,.06)}.thumb-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:var(--accent);background:linear-gradient(145deg,#2a2a2a,#171717)}.thumb-placeholder .brand-logo-svg{width:58px;height:auto}.duration{position:absolute;right:5px;bottom:5px;background:rgba(0,0,0,.82);color:white;border-radius:4px;font-size:12px;font-weight:700;line-height:18px;padding:0 5px;z-index:2}.thumb-play{position:absolute;inset:0;margin:auto;width:46px;height:46px;border-radius:50%;background:rgba(0,0,0,.62);display:grid;place-items:center;opacity:0;transform:scale(.9);transition:.18s;z-index:2;color:white}.thumb:hover .thumb-play{opacity:1;transform:scale(1)}.thumb-play .icon{width:23px;margin-left:2px}.video-meta{display:grid;grid-template-columns:36px minmax(0,1fr) 28px;gap:10px;padding-top:11px}.video-copy{min-width:0}.video-title{font-size:16px;font-weight:700;line-height:1.38;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:5px}.muted{color:var(--muted);font-size:14px}.channel-link{display:block;line-height:1.45}.verified-dot{font-size:9px;background:#777;color:#fff;border-radius:50%;width:13px;height:13px;display:inline-grid;place-items:center;margin-left:2px;vertical-align:1px}.card-more{width:28px;height:28px;border:0;border-radius:50%;background:transparent;display:grid;place-items:center;cursor:pointer;opacity:0}.video-card:hover .card-more{opacity:1}.card-more:hover{background:var(--hover)}.card-more .icon{width:21px}
.empty{min-height:220px;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;color:var(--muted);padding:32px}.empty .icon{width:46px;height:46px;color:var(--muted)}.empty strong{color:var(--text);font-size:18px}.block{display:block}.grow{flex:1}.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:20px}.panel h1,.panel h2,.panel h3{margin-top:0}.soft-panel{background:var(--surface-2);border-radius:12px;padding:14px}.btn{height:38px;border:0;border-radius:19px;background:var(--accent);color:white;padding:0 16px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn:hover{background:var(--accent-hover)}.btn.secondary{background:var(--surface-2);color:var(--text)}.btn.secondary:hover{background:var(--surface-3)}.btn.ghost{background:transparent;color:var(--text)}.btn.outline{background:transparent;color:var(--text);border:1px solid var(--line)}.btn.danger{background:#c81e1e}.btn.active{background:var(--text);color:var(--bg)}.btn .icon{width:20px}.btn-block{width:100%}.pill{height:34px;padding:0 13px;border-radius:17px;background:var(--surface-2);display:inline-flex;align-items:center;gap:7px;font-size:14px}.pill:hover{background:var(--surface-3)}
.auth-page{min-height:calc(100vh - 100px);display:grid;place-items:center;padding:28px}.auth-card{width:min(460px,100%);border:1px solid var(--line);border-radius:20px;padding:36px;background:var(--surface)}.auth-logo{display:flex;align-items:center;gap:9px;margin-bottom:28px;font-size:23px;font-weight:800}.auth-logo .brand-mark{width:38px}.auth-card h1{font-size:27px;margin:0 0 8px}.auth-card>p{color:var(--muted);margin:0 0 24px}.auth-foot{margin-top:22px;color:var(--muted);font-size:14px;text-align:center}.auth-foot a{color:var(--blue)}.form-row{margin-bottom:16px}.form-row label{display:block;font-weight:700;font-size:14px;margin-bottom:7px}.input,textarea,select{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);padding:11px 12px;outline:0}.input{height:44px}.input:focus,textarea:focus,select:focus{border-color:#1c62b9;box-shadow:0 0 0 1px #1c62b9}.field-hint{font-size:12px;color:var(--muted);margin-top:5px}.error{background:rgba(255,78,78,.12);border:1px solid rgba(255,78,78,.4);color:#ffb4b4;border-radius:10px;padding:11px 13px;margin-bottom:16px}
.watch-page{max-width:1740px;margin:auto}.watch-grid{display:grid;grid-template-columns:minmax(0,1fr) 402px;gap:24px}.player-shell{background:#000;border-radius:12px;overflow:hidden;position:relative;box-shadow:0 0 0 1px rgba(255,255,255,.04)}.player{display:block;width:100%;aspect-ratio:16/9;background:#000}.watch-title{font-size:20px;line-height:1.4;margin:12px 0 10px}.watch-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.channel-row{display:flex;align-items:center;gap:11px;min-width:0}.channel-row .avatar{width:40px;height:40px}.channel-row .grow{min-width:120px}.channel-row b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.action-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.watch-action{height:36px;border:0;border-radius:18px;background:var(--surface-2);color:var(--text);padding:0 13px;display:flex;align-items:center;gap:7px;font-weight:700;cursor:pointer}.watch-action:hover{background:var(--surface-3)}.watch-action .icon{width:20px}.watch-action.active{background:var(--text);color:var(--bg)}.description-box{background:var(--surface-2);border-radius:12px;padding:12px 14px;margin:14px 0 22px;font-size:14px;line-height:1.55;cursor:pointer}.description-box:hover{background:var(--surface-3)}.desc-summary{font-weight:700;margin-bottom:5px}.desc-text{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.description-box.expanded .desc-text{display:block}.desc-toggle{font-weight:700;margin-top:5px}.comments-head{display:flex;align-items:center;gap:20px;margin:10px 0 20px}.comments-head h2{font-size:20px;margin:0}.comment-form{display:flex;gap:12px;margin-bottom:22px}.comment-form .avatar{width:40px;height:40px}.comment-form .comment-editor{flex:1}.comment-form textarea{border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;padding:7px 2px;resize:none;min-height:38px}.comment-form textarea:focus{box-shadow:none;border-bottom-color:var(--text)}.comment-actions-form{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.comment{display:flex;gap:12px;padding:10px 0 16px}.comment .avatar{width:40px;height:40px}.comment-body{flex:1;min-width:0}.comment-author{font-size:13px;font-weight:700}.comment-time{font-size:12px;color:var(--muted);font-weight:400;margin-left:6px}.comment p{font-size:14px;line-height:1.5;margin:6px 0 0}.watch-side{min-width:0}.side-list{display:flex;flex-direction:column;gap:8px}.side-video{display:grid;grid-template-columns:168px minmax(0,1fr);gap:8px}.side-video .thumb{border-radius:8px}.side-copy{min-width:0;position:relative;padding-right:22px}.side-video .video-title{font-size:14px;line-height:1.35;margin:0 0 4px}.side-video .muted{font-size:12px}.side-more{position:absolute;right:0;top:0;width:22px;height:28px;border:0;background:transparent;display:grid;place-items:center;cursor:pointer}.side-more .icon{width:18px}
.save-popover{position:fixed;z-index:220;width:300px;max-width:calc(100vw - 24px);background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:12px;display:none}.save-popover.open{display:block}.save-popover h3{font-size:16px;margin:2px 0 10px}.save-option{display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px;cursor:pointer}.save-option:hover{background:var(--hover)}.save-option input{width:17px;height:17px}.save-foot{padding-top:8px;border-top:1px solid var(--line);margin-top:6px}.save-foot a{color:var(--blue);font-size:14px}
.channel-head{max-width:1284px;margin:0 auto 20px}.channel-banner{height:min(16vw,220px);min-height:120px;border-radius:14px;background:linear-gradient(120deg,#2e2e2e,#171717) center/cover no-repeat}.channel-info{display:flex;align-items:center;gap:20px;padding:20px 10px}.channel-info>.avatar{width:136px;height:136px;font-size:40px}.channel-details{flex:1;min-width:0}.channel-details h1{font-size:36px;line-height:1.15;margin:0 0 8px}.channel-meta{color:var(--muted);font-size:14px}.channel-description-short{max-width:760px;color:var(--muted);font-size:14px;line-height:1.45;margin:8px 0}.channel-tabs{height:48px;border-bottom:1px solid var(--line);display:flex;gap:26px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.channel-tabs::-webkit-scrollbar{display:none;width:0;height:0}.channel-tabs a{height:48px;display:flex;align-items:center;font-size:14px;font-weight:700;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}.channel-tabs a.active,.channel-tabs a:hover{color:var(--text);border-bottom-color:var(--text)}.channel-body{max-width:1284px;margin:auto}
.result-layout{max-width:1180px}.search-tools{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:16px}.filter-button{height:36px;border:0;background:transparent;border-radius:18px;display:flex;align-items:center;gap:8px;padding:0 12px;font-weight:700;cursor:pointer}.filter-button:hover{background:var(--hover)}.filter-panel{display:none;grid-template-columns:repeat(4,1fr);gap:18px;padding:18px 0;border-bottom:1px solid var(--line);margin-bottom:18px}.filter-panel.open{display:grid}.filter-group b{font-size:13px}.filter-group a{display:block;color:var(--muted);font-size:13px;padding:7px 0}.filter-group a:hover{color:var(--text)}.channel-result{display:grid;grid-template-columns:220px 1fr auto;align-items:center;gap:18px;padding:16px 0;border-bottom:1px solid var(--line)}.channel-result-avatar{display:flex;justify-content:center}.channel-result-avatar .avatar{width:136px;height:136px;font-size:42px}.channel-result-info h3{margin:0 0 6px;font-size:18px}.channel-result-info p{margin:8px 0;color:var(--muted);font-size:13px;line-height:1.45}.result-video{display:grid;grid-template-columns:minmax(260px,360px) minmax(0,1fr);gap:16px;margin:0 0 18px}.result-thumb{width:100%}.result-title{display:block;font-size:18px;line-height:1.35;margin-bottom:5px}.result-stats{font-size:12px}.result-channel{display:flex;align-items:center;gap:8px;margin:14px 0;color:var(--muted);font-size:13px}.result-desc{color:var(--muted);font-size:13px;line-height:1.5;max-width:720px}
.list-page{max-width:1200px}.library-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:28px}.library-cover{position:sticky;top:80px;align-self:start;border-radius:18px;padding:20px;background:linear-gradient(160deg,#2b1b20,#141414);min-height:400px}.library-cover .cover-thumb{aspect-ratio:16/9;border-radius:12px;background:#222 center/cover no-repeat;margin-bottom:18px}.library-cover h1{font-size:28px;margin:8px 0}.library-cover p{color:#c0c0c0;font-size:13px}.library-cover .btn{margin-top:10px}.playlist-list{display:flex;flex-direction:column;gap:8px}.playlist-row{display:grid;grid-template-columns:34px 170px minmax(0,1fr) auto;gap:12px;align-items:center;padding:8px;border-radius:10px}.playlist-row:hover{background:var(--hover)}.playlist-index{color:var(--muted);text-align:center}.playlist-row .thumb{border-radius:8px}.playlist-row h3{font-size:15px;margin:0 0 5px}.playlist-row .muted{font-size:12px}
.playlist-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 16px}.playlist-card .playlist-thumb{position:relative}.playlist-count{position:absolute;right:0;top:0;bottom:0;width:42%;background:rgba(0,0,0,.72);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:13px}.playlist-count .icon{width:25px}.playlist-card h3{margin:9px 0 4px;font-size:15px}.playlist-card .muted{font-size:12px}
.notification-list{max-width:900px}.notification-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 10px;border-radius:10px}.notification-item:hover{background:var(--hover)}.notification-item.unread{background:rgba(62,166,255,.06)}.notification-item.unread::before{content:"";position:absolute}.notification-copy{min-width:0}.notification-copy p{margin:0 0 4px;font-size:14px;line-height:1.45}.notification-copy time{font-size:12px;color:var(--muted)}.notification-dot{width:6px;height:6px;border-radius:50%;background:var(--blue)}
.studio-shell{max-width:1500px}.subnav{display:flex;gap:4px;overflow-x:auto;margin:0 0 22px;border-bottom:1px solid var(--line)}.subnav a{height:44px;padding:0 14px;display:flex;align-items:center;gap:7px;color:var(--muted);font-size:14px;font-weight:700;border-bottom:2px solid transparent;white-space:nowrap}.subnav a:hover,.subnav a.active{color:var(--text);border-bottom-color:var(--accent)}.subnav .icon{width:19px}.studio-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.stat-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px;min-height:122px}.stat-card .stat-icon{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);margin-bottom:10px}.stat-card .stat-icon .icon{width:20px}.stat-card strong{display:block;font-size:28px;line-height:1.1;margin:4px 0}.stat-card small{color:var(--muted)}.studio-panel{border:1px solid var(--line);border-radius:14px;overflow:hidden}.studio-panel-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line)}.studio-panel-head h2{font-size:18px;margin:0}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;min-width:760px}.table th,.table td{text-align:left;padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:middle;font-size:13px}.table th{color:var(--muted);font-weight:700;background:var(--surface)}.table tr:hover td{background:rgba(255,255,255,.015)}.mini-thumb{width:120px;aspect-ratio:16/9;border-radius:8px;background:#222 center/cover no-repeat;display:block}.table-video{display:flex;gap:12px;align-items:center;min-width:340px}.table-video>div{min-width:0}.table-video b{display:block;max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-video .muted{display:block;max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.status-badge{display:inline-flex;align-items:center;height:24px;border-radius:12px;padding:0 9px;background:var(--surface-2);font-size:12px}.status-badge.good{background:rgba(32,196,122,.12);color:#6ee7a8}.status-badge.warn{background:rgba(255,174,0,.12);color:#ffd36d}.status-badge.bad{background:rgba(255,78,78,.12);color:#ff9999}.admin-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.admin-actions{display:flex;gap:8px;flex-wrap:wrap}
.upload-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:22px;max-width:1100px}.upload-drop{border:2px dashed var(--line);border-radius:16px;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;cursor:pointer}.upload-drop:hover,.upload-drop.dragging{border-color:var(--accent);background:rgba(255,33,71,.04)}.upload-drop .upload-circle{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);margin-bottom:12px}.upload-drop .icon{width:30px}.upload-drop p{margin:4px 0;color:var(--muted);font-size:13px}.upload-drop strong{font-size:16px}.upload-preview{position:sticky;top:76px;align-self:start}.preview-frame{aspect-ratio:16/9;border-radius:12px;background:#222 center/cover no-repeat;display:grid;place-items:center;overflow:hidden;color:var(--muted)}.preview-frame video{width:100%;height:100%;object-fit:cover}.preview-frame .icon{width:42px}.upload-preview h3{font-size:15px;margin:12px 0 4px}.upload-preview p{font-size:12px;color:var(--muted)}
.toast{position:fixed;left:50%;bottom:30px;transform:translate(-50%,20px);z-index:300;background:#303030;color:#fff;border-radius:4px;padding:11px 16px;opacity:0;pointer-events:none;transition:.2s;box-shadow:var(--shadow);font-size:14px}.toast.show{opacity:1;transform:translate(-50%,0)}.mobile-bottom-nav{display:none}
.pagination{display:flex;gap:6px;justify-content:center;margin:26px 0}.pagination a,.pagination span{min-width:36px;height:36px;padding:0 10px;border-radius:18px;background:var(--surface-2);display:grid;place-items:center;font-size:13px}.pagination .active{background:var(--text);color:var(--bg)}
@media(max-width:1500px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.playlist-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1180px){.app-header{grid-template-columns:190px minmax(220px,1fr) 190px}.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.watch-grid{grid-template-columns:minmax(0,1fr) 350px}.side-video{grid-template-columns:150px minmax(0,1fr)}.channel-info>.avatar{width:110px;height:110px}.channel-details h1{font-size:30px}}
@media(max-width:1000px){.sidebar{width:var(--sidebar-mini);padding:8px 4px}.content{margin-left:var(--sidebar-mini);padding-left:18px;padding-right:18px}.sidebar .side-divider,.sidebar .side-you,.sidebar .sidebar-footer{display:none}.sidebar .side-nav:first-child{gap:8px}.sidebar .side-nav:first-child a{height:64px;flex-direction:column;justify-content:center;gap:4px;padding:6px 2px;font-size:10px}.app-header{grid-template-columns:165px minmax(220px,1fr) 165px;gap:10px}.watch-grid{grid-template-columns:1fr}.watch-side{padding-top:10px}.side-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.side-video{display:block}.side-video .thumb{margin-bottom:8px}.side-copy{padding-right:0}.side-more{display:none}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.playlist-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.library-layout{grid-template-columns:260px 1fr}.channel-result{grid-template-columns:170px 1fr auto}.channel-result-avatar .avatar{width:110px;height:110px}.result-video{grid-template-columns:300px 1fr}.upload-layout{grid-template-columns:1fr}.upload-preview{position:static}.admin-kpis,.studio-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){:root{--header-h:52px}.app-header{height:var(--header-h);grid-template-columns:1fr auto;padding:0 10px}.header-center{display:none}.menu-toggle{display:none}.brand{font-size:19px}.brand-mark{width:31px}.header-actions{gap:3px}.create-button{display:none}.notification-button{width:38px;height:38px}.mobile-search-toggle{display:grid}.signin-button{padding:0 10px}.signin-button span{display:none}.sidebar{transform:translateX(-100%);width:260px!important;padding:12px!important;box-shadow:var(--shadow)}.sidebar.open{transform:translateX(0)}.sidebar .side-divider,.sidebar .side-you,.sidebar .sidebar-footer{display:block}.sidebar .side-nav:first-child a{height:42px;flex-direction:row;justify-content:flex-start;gap:22px;padding:0 12px;font-size:14px}.sidebar-backdrop.open{display:block;position:fixed;inset:var(--header-h) 0 0 0;background:rgba(0,0,0,.5);z-index:70}.content,.nav-mini .content{margin-left:0;padding:12px 12px 88px}.chips-wrap{margin:0 -12px 16px;padding:7px 12px 9px}.grid{grid-template-columns:1fr;gap:30px}.video-meta{padding-left:2px;padding-right:2px}.thumb{border-radius:10px}.card-more{opacity:1}.mobile-search-panel{position:fixed;inset:0 0 auto 0;height:var(--header-h);z-index:180;background:var(--bg);display:none;align-items:center;gap:6px;padding:5px 8px}.mobile-search-panel.open{display:flex}.mobile-search-panel>form{display:flex;flex:1;height:40px}.mobile-search-panel input{flex:1;border:1px solid var(--line);border-radius:20px 0 0 20px;background:var(--surface-2);color:var(--text);outline:0;padding:0 14px;font-size:16px}.mobile-search-panel form button{width:46px;border:1px solid var(--line);border-left:0;border-radius:0 20px 20px 0;background:var(--surface-2);display:grid;place-items:center}.account-menu{position:fixed;left:8px;right:8px;top:56px;width:auto}.mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;height:64px;z-index:110;background:var(--bg);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);padding-bottom:env(safe-area-inset-bottom)}.mobile-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;color:var(--text)}.mobile-bottom-nav a .icon{width:22px}.mobile-bottom-nav a.active{font-weight:700}.mobile-bottom-nav .mobile-create{align-self:center;justify-self:center;width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:var(--surface-2)}.mobile-bottom-nav .mobile-create .icon{width:25px}.watch-page{margin:0 -12px}.watch-page>.watch-grid>section{min-width:0}.player-shell{border-radius:0}.watch-title,.watch-actions,.description-box,.comments-section{margin-left:12px;margin-right:12px}.watch-title{font-size:18px}.watch-actions{align-items:flex-start}.channel-row{width:100%;order:1}.action-row{order:2;overflow-x:auto;flex-wrap:nowrap;width:100%;padding-bottom:3px}.watch-action{white-space:nowrap}.side-list{display:block;padding:0 12px}.side-video{display:grid;grid-template-columns:160px 1fr;margin-bottom:12px}.side-video .thumb{margin:0}.side-copy{padding-right:16px}.comments-head h2{font-size:18px}.channel-head{margin:0 -12px 18px}.channel-banner{border-radius:0;height:120px}.channel-info{padding:16px 14px;gap:14px;align-items:flex-start;flex-wrap:wrap}.channel-info>.avatar{width:82px;height:82px;font-size:26px}.channel-details{min-width:calc(100% - 100px)}.channel-details h1{font-size:24px}.channel-info>.btn{margin-left:96px}.channel-tabs{padding:0 14px}.channel-body{padding:0 0}.result-layout{width:100%}.search-tools{margin-top:4px}.filter-panel{grid-template-columns:repeat(2,1fr)}.channel-result{grid-template-columns:84px 1fr;gap:12px}.channel-result-avatar .avatar{width:74px;height:74px;font-size:24px}.channel-result>.btn{display:none}.result-video{grid-template-columns:1fr;gap:9px;margin-bottom:26px}.result-title{font-size:16px}.result-channel{margin:9px 0}.result-desc{display:none}.library-layout{display:block}.library-cover{position:static;min-height:0;margin-bottom:22px}.playlist-row{grid-template-columns:28px 130px 1fr}.playlist-row .row-actions{display:none}.playlist-cards{grid-template-columns:1fr 1fr}.auth-page{padding:18px 4px;min-height:auto}.auth-card{border:0;background:transparent;padding:20px 8px}.upload-layout{display:block}.upload-preview{margin-top:20px}.admin-kpis,.studio-grid{grid-template-columns:1fr 1fr}.panel{padding:15px}.subnav{margin-left:-12px;margin-right:-12px;padding-left:8px}.section-title h1,.section-title h2{font-size:22px}}
@media(max-width:460px){.brand sup{display:none}.notification-button{display:none}.grid{gap:26px}.side-video{grid-template-columns:145px 1fr}.playlist-cards{grid-template-columns:1fr}.admin-kpis,.studio-grid{grid-template-columns:1fr}.channel-info>.btn{margin-left:0;width:100%}.filter-panel{grid-template-columns:1fr}.playlist-row{grid-template-columns:24px 112px 1fr}.library-cover{border-radius:12px}.auth-card h1{font-size:24px}}
.playlist-create-form{display:grid;grid-template-columns:minmax(0,1fr) 150px auto;gap:10px;align-items:end}
.preview-frame>*{grid-area:1/1}.preview-frame video{z-index:2;background:#000}.section-title{flex-wrap:wrap}
@media(max-width:620px){.playlist-create-form{grid-template-columns:1fr}.playlist-create-form .btn{width:100%}}

/* === ThaiTube v1.2.2: restore original sidebar-safe content layout === */
/* Keep the ThaiTube sidebar outside the video grid instead of covering cards. */
.card-more,.result-more,.side-more,.watch-more{opacity:1!important}
.result-title-row{display:flex;align-items:flex-start;gap:8px}.result-title-row .result-title{flex:1}.result-more,.watch-more{width:36px;height:36px;border:0;border-radius:50%;background:transparent;display:grid;place-items:center;cursor:pointer;flex:0 0 auto}.result-more:hover,.watch-more:hover{background:var(--hover)}.result-more .icon,.watch-more .icon{width:21px}

/* === Custom video player: native browser controls are not used === */
.tt-player{position:relative;aspect-ratio:16/9;background:#000;overflow:hidden;isolation:isolate;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.tt-player .tt-video{width:100%;height:100%;aspect-ratio:auto;object-fit:contain;background:#000;display:block}
.player-center-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:5;width:68px;height:68px;border:0;border-radius:50%;background:rgba(0,0,0,.68);color:#fff;display:grid;place-items:center;cursor:pointer;backdrop-filter:blur(4px)}.player-center-play[hidden],.tt-player.is-playing .player-center-play{display:none!important}.player-center-play .icon{width:34px;height:34px;margin-left:4px;stroke-width:2.2}.player-center-play:hover{background:rgba(0,0,0,.82)}
.player-ui{position:absolute;left:0;right:0;bottom:0;z-index:7;padding:34px 12px 8px;background:linear-gradient(to top,rgba(0,0,0,.82),rgba(0,0,0,.42) 55%,transparent);transition:opacity .18s,transform .18s}.tt-player.controls-hidden .player-ui{opacity:0;transform:translateY(8px);pointer-events:none}.tt-player.controls-hidden{cursor:none}
.player-progress-wrap{height:14px;position:relative;display:flex;align-items:center;cursor:pointer}.player-track{position:absolute;left:0;right:0;height:3px;background:rgba(255,255,255,.3);transition:height .12s}.player-progress-wrap:hover .player-track{height:5px}.player-buffered,.player-played{position:absolute;left:0;top:0;bottom:0;width:0}.player-buffered{background:rgba(255,255,255,.48)}.player-played{background:var(--accent)}
.player-progress{position:absolute;inset:0;width:100%;height:14px;margin:0;opacity:0;cursor:pointer}.player-progress-wrap::after{content:"";position:absolute;left:calc(var(--progress,0%));width:0;height:0;border-radius:50%;background:var(--accent);pointer-events:none;transition:.1s}.player-progress-wrap:hover::after{width:12px;height:12px;margin-left:-6px}
.player-controls{height:40px;display:flex;align-items:center;gap:2px;color:#fff}.player-btn{width:40px;height:40px;border:0;background:transparent;color:#fff;display:grid;place-items:center;border-radius:4px;cursor:pointer}.player-btn:hover{background:rgba(255,255,255,.12)}.player-btn .icon{width:25px;height:25px;stroke-width:2}.player-spacer{flex:1}.player-time{font-size:13px;white-space:nowrap;margin:0 6px;text-shadow:0 1px 2px #000}.player-volume-group{display:flex;align-items:center}.player-volume{width:0;opacity:0;transition:width .15s,opacity .15s;accent-color:#fff;cursor:pointer}.player-volume-group:hover .player-volume,.player-volume:focus{width:74px;opacity:1}.player-speed .icon{width:23px}
.player-settings{position:absolute;right:52px;bottom:58px;z-index:12;width:210px;padding:8px;background:rgba(28,28,28,.97);border:1px solid rgba(255,255,255,.12);border-radius:12px;color:#fff;box-shadow:0 12px 40px rgba(0,0,0,.48)}.player-settings>b{display:block;padding:8px 10px;font-size:14px}.player-settings button{width:100%;height:38px;border:0;border-radius:8px;background:transparent;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 10px;cursor:pointer}.player-settings button:hover{background:rgba(255,255,255,.12)}
.player-feedback{position:absolute;z-index:6;left:50%;top:50%;transform:translate(-50%,-50%);padding:10px 16px;border-radius:22px;background:rgba(0,0,0,.7);color:white;font-size:14px;opacity:0;pointer-events:none}.player-feedback.show{animation:ttFeedback .7s ease}@keyframes ttFeedback{0%{opacity:0;transform:translate(-50%,-50%) scale(.88)}20%{opacity:1;transform:translate(-50%,-50%) scale(1)}80%{opacity:1}100%{opacity:0}}
.tt-player:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;border-radius:0}.tt-player:fullscreen .tt-video{width:100%;height:100%}
body.theater-mode .watch-page{max-width:none}body.theater-mode .watch-grid{display:block}body.theater-mode .watch-grid>section>.tt-player{width:calc(100vw - 48px);max-height:calc(100vh - var(--header-h) - 18px);margin-left:calc(50% - 50vw + 24px);aspect-ratio:16/9}body.theater-mode .watch-side{margin-top:20px}body.theater-mode .side-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}

/* === Three-dot video menu === */
.video-menu-popover{position:fixed;z-index:280;width:245px;max-width:calc(100vw - 16px);padding:8px 0;border-radius:12px;background:var(--surface-3);border:1px solid var(--line);box-shadow:0 14px 44px rgba(0,0,0,.5);display:none;overflow:hidden}.video-menu-popover.open{display:block}.video-menu-popover>button,.video-menu-popover>a{width:100%;min-height:44px;border:0;background:transparent;color:var(--text);display:flex;align-items:center;gap:15px;padding:8px 14px;text-align:left;cursor:pointer;font-size:14px}.video-menu-popover>button:hover,.video-menu-popover>a:hover{background:rgba(255,255,255,.09)}html[data-theme="light"] .video-menu-popover>button:hover,html[data-theme="light"] .video-menu-popover>a:hover{background:rgba(0,0,0,.06)}.video-menu-popover .icon{width:24px;flex:0 0 24px}.video-menu-separator{height:1px;background:var(--line);margin:5px 0}

/* Playlist / report modal used by card menus */
.modal-backdrop{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.58);display:grid;place-items:center;padding:16px}.modal-backdrop[hidden]{display:none}.save-modal{width:min(420px,100%);max-height:min(620px,calc(100vh - 32px));display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 60px rgba(0,0,0,.5);overflow:hidden}.save-modal-head{height:56px;padding:0 12px 0 18px;display:flex;align-items:center;border-bottom:1px solid var(--line)}.save-modal-head h3{font-size:17px;margin:0;flex:1}.save-modal-body{padding:8px 10px;overflow:auto}.save-modal-foot{border-top:1px solid var(--line);padding:13px 16px}.save-modal-foot a{color:var(--blue);font-size:14px}.menu-loading{padding:24px;text-align:center;color:var(--muted)}.modal-field{display:flex;flex-direction:column;gap:7px;padding:8px;font-size:14px;font-weight:700}.modal-field select,.modal-field textarea{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);padding:10px;outline:0}.modal-field textarea{resize:vertical;min-height:90px}.report-actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--line)}
.queue-bar{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:250;width:min(520px,calc(100vw - 24px));min-height:58px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow);display:flex;align-items:center;gap:10px;padding:8px 10px 8px 16px}.queue-bar[hidden]{display:none}.queue-bar>div{display:flex;flex-direction:column;gap:2px;flex:1}.queue-bar span{font-size:12px;color:var(--muted)}


/* === ThaiTube v1.2.2: comments, replies and reactions === */
.comment{align-items:flex-start}.comment-thread{padding-bottom:2px}.comment-actions{display:flex;align-items:center;gap:4px;margin-top:7px;min-height:32px}.comment-react,.comment-reply-toggle,.comment-heart{height:32px;border:0;border-radius:16px;background:transparent;color:var(--text);display:inline-flex;align-items:center;gap:6px;padding:0 10px;cursor:pointer;font-size:13px;font-weight:700}.comment-react:hover,.comment-reply-toggle:hover,.comment-heart:hover{background:var(--hover)}.comment-react .icon,.comment-heart .icon{width:18px;height:18px}.comment-react.active{color:var(--accent)}.comment-react.active .icon{fill:var(--accent);stroke:var(--accent)}.comment-heart{color:var(--muted)}.comment-heart.active{color:#ff3156}.comment-heart.active .icon{fill:#ff3156;stroke:#ff3156}.creator-hearted{display:inline-flex;align-items:center;gap:4px;color:#ff3156;font-size:12px;margin-left:6px}.creator-hearted .icon{width:15px;height:15px;fill:#ff3156;stroke:#ff3156}.reply-form{display:none;gap:10px;margin:10px 0 4px}.reply-form.open{display:flex}.reply-form .avatar{width:32px;height:32px}.reply-form .comment-editor{flex:1}.reply-form textarea{width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--text);padding:6px 2px;resize:none;min-height:34px;outline:0}.reply-form textarea:focus{border-bottom-color:var(--text)}.comment-replies{margin:7px 0 0 0}.comment.reply{padding:8px 0 5px}.comment.reply .avatar{width:32px;height:32px}.comment.reply .comment-author{font-size:12px}.comment.reply p{margin-top:4px}.reply-label{color:var(--blue);font-size:12px;margin-right:5px}.comment-login-hint{color:var(--muted);font-size:12px;margin-top:5px}

/* Hide cards marked as not interested without leaving layout gaps where possible */
[data-video-card][hidden]{display:none!important}

@media(max-width:1000px){.side-more{display:grid!important}.no-sidebar-header{grid-template-columns:165px minmax(220px,1fr) 165px}.tt-player{border-radius:10px}body.theater-mode .watch-grid{display:grid}body.theater-mode .watch-grid>section>.tt-player{width:auto;margin-left:0;max-height:none}body.theater-mode .side-list{display:block}}
@media(max-width:760px){.content,.nav-mini .content,.no-sidebar-content{margin-left:0!important;padding:12px 12px 88px}.no-sidebar-header{grid-template-columns:1fr auto}.tt-player{border-radius:0}.player-ui{padding-left:7px;padding-right:7px}.player-volume-group .player-volume{display:none}.player-time{font-size:11px;margin:0 3px}.player-btn{width:36px;height:36px}.player-btn .icon{width:22px}.player-center-play{width:58px;height:58px}.player-settings{right:8px;bottom:54px}.queue-bar{bottom:76px}.video-menu-popover{width:240px}.result-more{display:grid!important}}
@media(max-width:460px){.player-controls [data-player-pip],.player-controls [data-player-theater]{display:none}.player-time{max-width:86px;overflow:hidden}.player-center-play{width:52px;height:52px}.video-menu-popover{width:min(240px,calc(100vw - 16px))}}

/* === ThaiTube v1.3.0: YouTube-style replies, voice search, modern dialogs === */
body.modal-open,body.voice-open{overflow:hidden}

/* Replies: collapsed by default, clear @ target, blue thread toggle like YouTube. */
.comment-thread{position:relative}
.comment-replies{margin:2px 0 0 52px}
.comment-replies[hidden]{display:none!important}
.comment-replies.open{display:block}
.comment.reply{padding:7px 0 4px;gap:10px}
.comment.reply .comment-body{padding-top:1px}
.comment.reply p{margin:4px 0 0;line-height:1.48}
.reply-target{color:var(--blue);font-weight:700;white-space:nowrap}
.replies-toggle{height:36px;border:0;border-radius:18px;background:transparent;color:var(--blue);display:inline-flex;align-items:center;gap:7px;margin:0 0 5px 44px;padding:0 12px;font-size:14px;font-weight:700;cursor:pointer}
.replies-toggle:hover{background:rgba(62,166,255,.12)}
.replies-toggle .replies-chevron{width:20px;height:20px;display:grid;place-items:center;transition:transform .18s ease}
.replies-toggle .replies-chevron .icon{width:18px;height:18px;transform:rotate(90deg)}
.replies-toggle.open .replies-chevron{transform:rotate(180deg)}
.reply-form{padding-right:4px}
.comment.reply .reply-form{margin-left:0}

/* Voice search overlay. */
.voice-overlay{position:fixed;inset:0;z-index:420;background:rgba(0,0,0,.58);display:flex;align-items:flex-start;justify-content:center;padding:64px 18px 18px;backdrop-filter:blur(2px)}
.voice-overlay[hidden]{display:none!important}
.voice-dialog{position:relative;width:min(590px,100%);min-height:390px;background:#202020;color:#fff;border:1px solid rgba(255,255,255,.06);border-radius:2px;box-shadow:0 24px 70px rgba(0,0,0,.55);padding:38px 34px 32px;overflow:hidden}
.voice-close{position:absolute;top:7px;right:8px;width:40px;height:40px;border:0;border-radius:50%;display:grid;place-items:center;background:transparent;color:#fff;cursor:pointer}
.voice-close:hover{background:rgba(255,255,255,.1)}
.voice-close .icon{width:25px;height:25px}
.voice-copy h2{margin:0;font-size:25px;line-height:1.35;font-weight:700}
.voice-copy p{margin:9px 0 0;color:#aaa;font-size:14px}
.voice-transcript{min-height:56px;margin-top:17px;font-size:20px;line-height:1.5;color:#f1f1f1;word-break:break-word}
.voice-mic-stage{position:absolute;left:50%;bottom:55px;transform:translateX(-50%);width:128px;height:128px;display:grid;place-items:center}
.voice-mic-main{position:relative;z-index:3;width:68px;height:68px;border:0;border-radius:50%;background:#ff003b;color:#fff;display:grid;place-items:center;cursor:pointer;box-shadow:0 0 0 1px rgba(255,255,255,.03)}
.voice-mic-main .icon{width:32px;height:32px;stroke-width:2.2}
.voice-ring{position:absolute;inset:21px;border:1px solid rgba(255,255,255,.06);border-radius:50%;opacity:.6}
.voice-ring.ring-two{inset:7px;opacity:.26}
.voice-mic-stage.listening .ring-one{animation:voicePulse 1.6s ease-out infinite}
.voice-mic-stage.listening .ring-two{animation:voicePulse 1.6s .4s ease-out infinite}
.voice-mic-stage.listening .voice-mic-main{box-shadow:0 0 0 12px rgba(255,0,59,.08)}
@keyframes voicePulse{0%{transform:scale(.78);opacity:.55}70%,100%{transform:scale(1.18);opacity:0}}

/* Modern confirmation dialog for delete/destructive actions. */
.tt-confirm-backdrop{z-index:430;background:rgba(0,0,0,.64);backdrop-filter:blur(3px)}
.tt-confirm{width:min(420px,100%);background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 22px 70px rgba(0,0,0,.55);padding:24px 24px 20px;animation:ttDialogIn .16s ease-out}
.tt-confirm-icon{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:rgba(255,78,78,.12);color:var(--danger);margin-bottom:16px}
.tt-confirm-icon .icon{width:23px;height:23px}
.tt-confirm h3{font-size:20px;line-height:1.35;margin:0 0 9px}
.tt-confirm p{font-size:14px;line-height:1.6;color:var(--muted);margin:0;white-space:pre-line}
.tt-confirm-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}
.tt-confirm-actions .btn{min-width:88px}
@keyframes ttDialogIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}

/* App toast: no browser alert UI. */
.toast{left:auto;right:24px;bottom:24px;transform:translateY(18px);min-width:260px;max-width:min(430px,calc(100vw - 32px));min-height:52px;padding:10px 14px 10px 10px;border-radius:12px;border:1px solid var(--line);background:var(--surface-3);color:var(--text);display:flex;align-items:center;gap:10px;box-shadow:0 16px 50px rgba(0,0,0,.38);font-size:14px;z-index:500}
.toast.show{opacity:1;transform:translateY(0)}
.toast-symbol{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(32,196,122,.14);color:var(--success);flex:0 0 30px}
.toast-symbol .icon{width:18px;height:18px}
.toast[data-type="error"] .toast-symbol{background:rgba(255,78,78,.14);color:var(--danger)}
.toast[data-type="info"] .toast-symbol{background:rgba(62,166,255,.14);color:var(--blue)}
.toast-message{line-height:1.45;font-weight:600}
.flash{left:auto;right:24px;bottom:86px;transform:none;min-width:280px;max-width:min(430px,calc(100vw - 32px));border-radius:12px;border:1px solid var(--line);background:var(--surface-3);color:var(--text);padding:12px 14px;box-shadow:0 16px 50px rgba(0,0,0,.38)}
.flash button{color:var(--text)}

@media(max-width:760px){
  .mobile-search-panel>form{min-width:0}
  .mobile-voice-button{display:grid;flex:0 0 40px}
  .voice-overlay{padding:0;background:#202020}
  .voice-dialog{width:100%;min-height:100dvh;border:0;border-radius:0;padding:48px 28px 30px;box-shadow:none}
  .voice-copy h2{font-size:24px}
  .voice-mic-stage{bottom:20vh}
  .comment-replies{margin-left:42px}
  .replies-toggle{margin-left:34px}
  .toast{right:12px;left:12px;bottom:78px;max-width:none;min-width:0}
  .flash{right:12px;left:12px;bottom:142px;max-width:none;min-width:0}
  .tt-confirm{padding:22px 20px 18px;border-radius:16px}
}

/* === ThaiTube v1.3.2: custom share sheet + delete hotfix === */
.share-backdrop{z-index:435;background:rgba(0,0,0,.64);backdrop-filter:blur(3px)}
.share-modal{width:min(520px,100%);background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.58);padding:0 0 18px;overflow:hidden;animation:ttDialogIn .16s ease-out}
.share-modal-head{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 22px}.share-modal-head h3{font-size:20px;margin:0}.share-modal-head .icon-button{width:40px;height:40px}
.share-destinations{display:flex;gap:18px;overflow-x:auto;padding:12px 22px 18px;scrollbar-width:none}.share-destinations::-webkit-scrollbar{display:none}.share-destination{min-width:72px;border:0;background:transparent;color:var(--text);display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;font-size:12px}.share-app{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:800;font-size:22px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}.share-app.facebook{background:#1877f2}.share-app.line{background:#06c755;font-size:11px;letter-spacing:-.4px}.share-app.xapp{background:#000;border:1px solid #333}.share-app.email{background:#5f6368}.share-app.email .icon{width:24px;height:24px}
.share-link-box{margin:0 22px;min-height:46px;border:1px solid var(--line);border-radius:12px;background:var(--bg);display:flex;align-items:center;overflow:hidden}.share-link-box input{min-width:0;flex:1;height:44px;border:0;outline:0;background:transparent;color:var(--text);padding:0 12px;font-size:14px}.share-link-box button{height:34px;margin-right:6px;border:0;border-radius:18px;background:var(--blue);color:#081018;padding:0 16px;font-weight:800;cursor:pointer}.share-link-box button:hover{filter:brightness(1.08)}
.share-start{margin:14px 22px 0;display:flex;align-items:center;gap:8px;color:var(--text);font-size:14px;cursor:pointer}.share-start[hidden]{display:none!important}.share-start input{width:18px;height:18px;accent-color:var(--blue)}
@media(max-width:560px){.share-backdrop{align-items:flex-end;padding:0}.share-modal{width:100%;border-radius:18px 18px 0 0;border-left:0;border-right:0;border-bottom:0;padding-bottom:max(18px,env(safe-area-inset-bottom))}.share-destinations{gap:14px;padding-left:18px;padding-right:18px}.share-link-box,.share-start{margin-left:18px;margin-right:18px}}

/* v1.3.3 large-upload progress */
.upload-chunk-hint{color:var(--accent)!important;font-weight:700}.upload-progress-card{margin:14px 0 16px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.upload-progress-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.upload-progress-head>div{display:flex;flex-direction:column;gap:3px;min-width:0}.upload-progress-head strong{font-size:14px}.upload-progress-head span{font-size:12px;color:var(--muted)}.upload-progress-head>b{font-size:18px}.upload-progress-track{height:8px;margin-top:12px;border-radius:999px;background:var(--line);overflow:hidden}.upload-progress-track>span{display:block;width:0;height:100%;border-radius:inherit;background:var(--accent);transition:width .16s linear}.upload-progress-card p{margin:9px 0 0;color:var(--muted);font-size:12px}

/* === ThaiTube v1.4.0: verified views + protected player context menu === */
.verified-view-note{color:var(--muted);font-weight:500}
.player-context-menu{position:fixed;z-index:420;width:270px;max-width:calc(100vw - 16px);padding:7px 0;border-radius:4px;background:rgba(28,28,28,.98);border:1px solid rgba(255,255,255,.14);box-shadow:0 12px 34px rgba(0,0,0,.55);color:#fff;display:none;overflow:hidden}.player-context-menu.open{display:block}.player-context-menu>button{width:100%;min-height:40px;border:0;background:transparent;color:#fff;display:grid;grid-template-columns:24px 1fr 24px;align-items:center;gap:12px;padding:7px 13px;text-align:left;cursor:pointer;font-size:13px}.player-context-menu>button:hover{background:rgba(255,255,255,.12)}.player-context-menu .icon,.player-context-menu .brand-logo-svg{width:22px;height:22px}.player-context-menu .context-check{text-align:center;font-size:16px}.player-context-menu .video-menu-separator{background:rgba(255,255,255,.15)}
.player-nerd-stats{position:absolute;z-index:11;left:10px;top:10px;width:min(390px,calc(100% - 20px));padding:10px 12px;background:rgba(0,0,0,.82);color:#fff;border:1px solid rgba(255,255,255,.35);font:12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;pointer-events:none}.player-nerd-stats[hidden]{display:none}.player-nerd-stats>b{display:block;margin-bottom:7px;font-family:Arial,Tahoma,sans-serif;font-size:13px}.player-nerd-stats>div{display:grid;grid-template-columns:120px 1fr;gap:8px}.player-nerd-stats span{color:#bbb}.player-nerd-stats code{color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tt-player video{-webkit-user-drag:none;user-select:none;-webkit-user-select:none}
@media(max-width:560px){.player-context-menu{width:250px}.player-nerd-stats{font-size:10px}.player-nerd-stats>div{grid-template-columns:100px 1fr}}

/* v1.5.0 Auto-generated / external YouTube embed */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.autogen-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:20px}.autogen-notice{display:flex;gap:10px;align-items:flex-start;background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin-bottom:18px}.autogen-notice b{white-space:nowrap}.autogen-notice span{color:var(--muted);line-height:1.55}.autogen-mini,.autogen-inline{display:block;color:var(--muted);font-size:11px;margin-top:3px}.autogen-channel-label{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;background:var(--surface-2);border-radius:8px;padding:6px 9px;margin:5px 0 7px;font-size:12px;color:var(--muted)}.autogen-channel-label .icon{width:15px}.autogen-channel-label b{color:var(--text)}.autogen-owner-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(320px,.7fr);gap:18px}.owner-actions{display:flex;gap:8px;flex-wrap:wrap}.youtube-external-player{aspect-ratio:16/9;position:relative;background:#000}.youtube-placeholder,.youtube-embed-host,.youtube-embed-frame{position:absolute;inset:0;width:100%;height:100%}.youtube-placeholder{background:#111 center/cover no-repeat;display:grid;place-items:center}.youtube-placeholder::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.1),rgba(0,0,0,.25))}.youtube-play-button{position:relative;z-index:2;width:72px;height:52px;border:0;border-radius:15px;background:#ff0033;color:#fff;display:grid;place-items:center;cursor:pointer;box-shadow:0 8px 30px rgba(0,0,0,.35)}.youtube-play-button:hover{transform:scale(1.04)}.youtube-play-button .icon{width:28px;margin-left:3px}.youtube-source-badge{position:absolute;z-index:2;right:10px;bottom:10px;background:rgba(0,0,0,.72);color:#fff;font-size:11px;padding:5px 8px;border-radius:6px}.youtube-embed-frame{border:0;background:#000}.video-menu-popover [hidden]{display:none!important}
@media(max-width:900px){.autogen-grid,.autogen-owner-grid{grid-template-columns:1fr}.grid-2{grid-template-columns:1fr}}

.autogen-consent{display:flex;align-items:flex-start;gap:10px;margin:14px 0;color:var(--text);font-size:14px;line-height:1.45}.autogen-consent input{margin-top:3px;accent-color:var(--accent)}

.youtube-api-legal{margin:32px auto 90px;max-width:1180px;padding:0 18px;color:var(--muted);font-size:12px;line-height:1.55}.youtube-api-legal a{color:inherit;text-decoration:underline}.youtube-api-legal a:hover{color:var(--text)}
