*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;background:#f4f4f4;color:#151515;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
header{height:58px;position:fixed;z-index:20;top:0;left:0;right:0;background:#fff;border-bottom:1px solid #ddd;display:flex;align-items:center;justify-content:space-between;padding:0 14px}
.public-header{height:58px;display:flex;align-items:center;gap:10px;padding:0 10px}.public-header .brand{flex:0 0 auto}.public-header #menu{flex:0 0 auto}.public-search{flex:1 1 auto;min-width:76px}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:#111;font-size:20px}.brand img{width:34px;height:34px;object-fit:cover;object-position:center;border-radius:6px}
button{border:0;background:transparent;font-size:26px;cursor:pointer}
#drawer{position:fixed;z-index:30;right:10px;top:64px;background:#fff;padding:16px;border-radius:12px;box-shadow:0 8px 30px #0003;display:none;min-width:190px}
#drawer.open{display:grid;gap:14px}
select,input,textarea{width:100%;padding:10px;border:1px solid #bbb;border-radius:8px;background:#fff;font:inherit}
main{max-width:760px;margin:0 auto;padding:70px 10px 58px}
.search-box{position:relative;display:block;width:100%}.search-box input{height:36px;border-radius:999px;padding-left:36px;background:#f8fafc}.search-box span:before{content:"";position:absolute;left:14px;top:11px;width:10px;height:10px;border:2px solid #667085;border-radius:50%;z-index:1}.search-box span:after{content:"";position:absolute;left:25px;top:23px;width:8px;height:2px;background:#667085;transform:rotate(45deg);border-radius:2px;z-index:1}
.card{background:#fff;border-radius:12px;overflow:hidden;margin-bottom:14px;box-shadow:0 1px 5px #0001}
.thumb{aspect-ratio:16/9;background:#111;position:relative;cursor:pointer}.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.play{position:absolute;inset:0;display:grid;place-items:center;font-size:56px;color:white;text-shadow:0 2px 8px #000}
.copy{padding:12px}.copy h2{font-size:17px;margin:0 0 6px}.copy p{font-size:14px;color:#555;margin:0;white-space:pre-line;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.player{width:100%;aspect-ratio:16/9;border:0;display:block;background:#000}
.player-wrap{position:relative;background:#000}.close-player{position:absolute;right:10px;top:10px;background:#ffffffe8;color:#111;border:1px solid #ddd;border-radius:999px;font-size:13px;font-weight:750;padding:7px 10px}.card.playing{scroll-margin-top:66px}
#empty{text-align:center;color:#666;padding:50px 10px}
.top-link{color:#333;text-decoration:none;font-size:14px}
.site-footer{position:fixed;z-index:25;left:0;right:0;bottom:0;height:32px;background:#fff;border-top:1px solid #ddd;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 14px;color:#667085;font-size:12px}
.site-footer nav{display:flex;justify-content:flex-end;gap:14px}.site-footer a{color:#333;text-decoration:none}.site-footer a:hover{text-decoration:underline}
.text-page{max-width:760px;color:#26313d;line-height:1.6}.text-page h1{font-size:30px;line-height:1.15;margin:10px 0 18px}.text-page h2{font-size:18px;margin:24px 0 8px}.text-page p{margin:0 0 14px}

.admin-page{background:#eef1f4}
.admin-shell{max-width:1180px;padding:82px 16px 58px}
.admin-panel{background:#fff;border:1px solid #dde2e7;border-radius:8px;box-shadow:0 1px 4px #0000000d}
.signin-screen{min-height:calc(100vh - 118px);display:grid;place-items:center}
.signin-card{width:min(420px,100%);padding:28px;text-align:center}
.signin-card h1{font-size:26px;margin:0 0 8px}.signin-card p{color:#667085;margin:0 0 18px}
#signin{display:flex;justify-content:center}
.admin-console{display:grid;gap:16px}
.console-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.console-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px}.admin-search{width:min(360px,38vw)}
.console-head h1,.dialog-head h1{font-size:24px;line-height:1.15;margin:0 0 5px}
.console-head p,.dialog-head p{color:#667085;font-size:14px;margin:0}
.primary-btn,.ghost-btn,.danger-btn,.icon-btn{border-radius:8px;font-size:14px;font-weight:700;padding:10px 12px}
.primary-btn{background:#151515;color:#fff}.blue-btn{background:#1d4ed8}.primary-btn:disabled{opacity:.55;cursor:wait}
.ghost-btn{background:#f3f5f7;color:#1f2937;border:1px solid #d9e0e7}
.danger-btn{background:#fff1f0;color:#b42318;border:1px solid #ffd0cc}
.icon-btn{width:34px;height:34px;padding:0;background:#f3f5f7;color:#475467}
.table-panel{overflow:auto}
.video-table{width:100%;border-collapse:collapse;min-width:820px}
.video-table th{background:#f8fafc;color:#475467;font-size:12px;text-align:left;text-transform:uppercase;letter-spacing:.04em;padding:12px;border-bottom:1px solid #e4e7ec}
.video-table td{padding:13px 12px;border-bottom:1px solid #edf0f2;vertical-align:middle;font-size:14px}
.video-table td strong{display:block;max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.video-table td span{display:block;color:#667085;font-size:12px;margin-top:3px}
.row-actions{display:flex;gap:8px;white-space:nowrap}
.status-pill{display:inline-block;border-radius:999px;font-size:12px;font-weight:750;padding:4px 8px}.status-pill.ok{background:#e8f7ee;color:#067647}.status-pill.muted{background:#f2f4f7;color:#667085}
.empty-state{padding:34px;text-align:center;color:#667085}
.modal-backdrop{position:fixed;z-index:40;inset:0;background:#11182780;display:grid;place-items:center;padding:18px}
.add-dialog{width:min(620px,100%);display:grid;gap:14px;padding:18px}
.dialog-head{display:flex;justify-content:space-between;gap:12px;align-items:start}
.add-dialog label{display:grid;gap:6px;color:#344054;font-size:13px;font-weight:650}
.add-dialog input,.add-dialog select,.add-dialog textarea{border-color:#cfd6df}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px}

@media(min-width:800px){main{padding-left:0;padding-right:0}.admin-shell{padding-left:16px;padding-right:16px}}
@media(max-width:700px){.console-head{align-items:stretch;display:grid}.console-tools{display:grid;justify-content:stretch}.admin-search{width:100%}.row-actions{display:grid}.modal-backdrop{align-items:start;padding-top:74px}.site-footer{height:auto;min-height:36px;align-items:flex-start;padding:6px 10px}.site-footer nav{gap:10px}}
