/* source-style-1 */
:root{
    --ink:#211d2a;--muted:#756f7e;--paper:#f5f1ea;--panel:#fffdf9;--line:#e2d9cc;
    --purple:#6d3ed1;--purple-dark:#4f28a4;--sidebar:#18131f;--sidebar-soft:#251c30;
    --danger:#c93f4b;--success:#237c5b;--shadow:0 18px 50px rgba(43,31,57,.13);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--paper);color:var(--ink)}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
a{color:inherit}
body{min-height:100vh}
.login-page{min-height:100vh;display:grid;grid-template-columns:minmax(320px,1fr) minmax(420px,1.05fr);background:#17131f}
.login-art{position:relative;overflow:hidden;padding:clamp(32px,6vw,90px);display:flex;flex-direction:column;justify-content:space-between;color:white;background:radial-gradient(circle at 15% 20%,rgba(136,86,232,.6),transparent 32%),radial-gradient(circle at 85% 85%,rgba(198,130,69,.35),transparent 32%),linear-gradient(145deg,#17131f,#2d1c3d)}
.login-art:after{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:40px 40px;pointer-events:none}
.login-copy,.login-demo{position:relative;z-index:1}
.brand-mark{width:70px;height:70px;border:1px solid rgba(255,255,255,.22);border-radius:22px;display:grid;place-items:center;background:rgba(255,255,255,.08);font-size:34px;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.login-copy h1{font-family:Georgia,serif;font-size:clamp(44px,6vw,86px);line-height:.95;margin:32px 0 20px;max-width:760px}
.login-copy p{font-size:clamp(17px,1.6vw,22px);max-width:680px;line-height:1.65;color:rgba(255,255,255,.75)}
.login-demo{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:650px}
.demo-card{padding:18px;border:1px solid rgba(255,255,255,.15);border-radius:18px;background:rgba(255,255,255,.07);backdrop-filter:blur(12px)}
.demo-card strong{display:block;margin-bottom:6px}.demo-card code{font-size:13px;color:#eadcff}
.login-panel{display:grid;place-items:center;background:#fbf8f3;padding:26px}
.login-box{width:min(510px,100%);background:white;border:1px solid var(--line);border-radius:30px;padding:clamp(28px,5vw,54px);box-shadow:var(--shadow)}
.login-box h2{font-family:Georgia,serif;font-size:40px;margin:0 0 10px}.login-box>p{color:var(--muted);line-height:1.6;margin:0 0 30px}
.field{display:grid;gap:8px;margin-bottom:18px}.field label{font-weight:750;font-size:14px}.field input,.field textarea,.field select{width:100%;border:1px solid #d7cec2;background:#fff;padding:13px 14px;border-radius:13px;outline:none;color:var(--ink)}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--purple);box-shadow:0 0 0 4px rgba(109,62,209,.12)}
.primary,.secondary,.danger-button,.ghost-button{border:0;border-radius:13px;min-height:44px;padding:10px 16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.primary{background:var(--purple);color:#fff}.primary:hover{background:var(--purple-dark)}
.secondary{background:#eee7f9;color:#4f28a4}.secondary:hover{background:#e1d4f6}
.ghost-button{background:#f3eee7;color:#403947}.ghost-button:hover{background:#e9e1d7}
.danger-button{background:#ffeaec;color:#a52632}.danger-button:hover{background:#ffdce0}
.wide{width:100%}.flash{padding:13px 15px;border-radius:13px;margin:0 0 18px;font-weight:700}.flash.success{background:#e5f5ee;color:#176447}.flash.error{background:#ffe8ea;color:#a52632}
.app-shell{min-height:100vh;display:grid;grid-template-columns:280px minmax(0,1fr)}
.sidebar{position:sticky;top:0;height:100vh;background:var(--sidebar);color:#fff;padding:22px 18px;display:flex;flex-direction:column;gap:20px;overflow:auto}
.side-brand{display:flex;gap:12px;align-items:center;padding:8px}.side-brand .brand-mark{width:48px;height:48px;border-radius:15px;font-size:24px}.side-brand strong{display:block;font-family:Georgia,serif;font-size:21px}.side-brand span{font-size:12px;color:rgba(255,255,255,.55)}
.side-brand .brand-mark{overflow:hidden}.side-brand .brand-mark img{display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit}.side-brand .brand-mark.has-custom-logo{padding:0;background:rgba(255,255,255,.12)}
.role-chip{margin:0 8px;padding:10px 12px;border:1px solid rgba(255,255,255,.12);border-radius:13px;background:rgba(255,255,255,.06);font-size:12px;color:#d8cce6}.role-chip b{color:white}
.nav{display:grid;gap:7px}.nav a{display:flex;align-items:center;gap:11px;text-decoration:none;padding:13px 14px;border-radius:13px;color:rgba(255,255,255,.72);font-weight:730}.nav a:hover,.nav a.active{background:var(--sidebar-soft);color:#fff}.nav-icon{width:26px;text-align:center}
.sidebar-bottom{margin-top:auto}.user-card{padding:14px;border-radius:15px;background:rgba(255,255,255,.07);display:grid;gap:4px}.user-card strong{font-size:14px}.user-card span{font-size:12px;color:rgba(255,255,255,.58)}.user-card a{font-size:12px;color:rgba(255,255,255,.78);text-decoration:none;overflow-wrap:anywhere}.user-card a:hover{text-decoration:underline}.user-card .user-email-text{font-size:12px;color:rgba(255,255,255,.78);overflow-wrap:anywhere;word-break:break-word}.logout-form{margin-top:10px}.logout-form button{width:100%;background:transparent;border:1px solid rgba(255,255,255,.15);color:white;border-radius:12px;padding:11px;font-weight:750}
.workspace{min-width:0;min-height:100vh;padding:18px;background:linear-gradient(180deg,#f8f4ee,#f1ece4)}
.topbar{min-height:78px;background:rgba(255,253,249,.9);border:1px solid var(--line);border-radius:20px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;top:12px;z-index:20;backdrop-filter:blur(16px);box-shadow:0 8px 25px rgba(43,31,57,.07)}
.topbar h1{font-family:Georgia,serif;font-size:30px;margin:0}.topbar p{margin:3px 0 0;color:var(--muted);font-size:13px}.top-actions{display:flex;gap:9px;flex-wrap:wrap}
.content{padding-top:18px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:22px;box-shadow:0 12px 30px rgba(43,31,57,.07);padding:20px}.panel+.panel{margin-top:16px}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.stat{padding:22px;border-radius:19px;border:1px solid var(--line);background:linear-gradient(145deg,#fff,#f8f2ea)}.stat span{color:var(--muted);font-weight:700;font-size:13px}.stat strong{display:block;font-family:Georgia,serif;font-size:38px;margin-top:8px}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,.7fr);gap:16px;margin-top:16px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.panel-head h2{font-family:Georgia,serif;font-size:25px;margin:0}.panel-head p{margin:4px 0 0;color:var(--muted);font-size:13px}
.activity{display:grid;gap:10px}.activity-item{padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;display:flex;justify-content:space-between;gap:18px}.activity-item span{color:var(--muted);font-size:12px;white-space:nowrap}
.quick-actions{display:grid;gap:10px}.quick-actions button,.quick-actions a{text-decoration:none;width:100%}
.library-panel{min-height:calc(100vh - 114px)}.library-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:18px}.search-box{min-width:min(420px,100%);flex:1;max-width:600px}.search-box input{width:100%;border:1px solid var(--line);border-radius:13px;padding:12px 14px;background:#fff}
.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:18px}.book-card{position:relative;border:1px solid var(--line);border-radius:20px;background:#fff;padding:16px;display:flex;flex-direction:column;min-height:395px;box-shadow:0 9px 22px rgba(43,31,57,.06);transition:transform .2s ease,box-shadow .2s ease}.book-card:hover{transform:translateY(-4px);box-shadow:0 18px 34px rgba(43,31,57,.12)}
.book-cover{position:relative;width:100%;height:235px;border:0;border-radius:8px 18px 18px 8px;padding:25px 21px;color:#fff;text-align:left;display:flex;flex-direction:column;justify-content:space-between;box-shadow:inset 10px 0 0 rgba(0,0,0,.16),inset 12px 0 0 rgba(255,255,255,.08),0 15px 24px rgba(25,18,35,.22);overflow:hidden;transform-origin:left center}.book-cover:before{content:"";position:absolute;inset:0;background:linear-gradient(110deg,rgba(255,255,255,.2),transparent 28%,rgba(0,0,0,.12));pointer-events:none}.book-cover:after{content:"";position:absolute;right:8px;top:8px;bottom:8px;width:5px;border-radius:4px;background:rgba(255,255,255,.28)}.book-cover:hover{filter:brightness(1.06)}
.book-cover small{position:relative;z-index:1;text-transform:uppercase;letter-spacing:.14em;font-weight:800;font-size:10px;opacity:.8}.book-cover strong{position:relative;z-index:1;font-family:Georgia,serif;font-size:26px;line-height:1.05}.book-cover em{position:relative;z-index:1;font-style:normal;font-size:13px;opacity:.85}.book-meta{padding:17px 2px 5px;display:grid;gap:6px}.book-meta h3{font-size:18px;margin:0}.book-meta p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}.book-tags{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px}.tag{padding:5px 8px;border-radius:999px;background:#f0e9f8;color:#54308d;font-size:11px;font-weight:800}.tag.published{background:#e2f5ec;color:#176447}.tag.draft{background:#fff1d7;color:#8a5a00}.admin-book-actions{display:flex;align-items:stretch;gap:8px;margin-top:auto;padding-top:12px;flex-wrap:wrap}.admin-book-actions>button{flex:1 1 145px}.admin-book-actions form{margin:0;display:flex}.admin-book-actions .publish-button{background:#237c5b;color:#fff}.admin-book-actions .publish-button:hover{background:#196648}.admin-book-actions .unpublish-button{background:#fff1d7;color:#7a5000}.admin-book-actions .unpublish-button:hover{background:#ffe7ba}
.empty{display:grid;place-items:center;min-height:330px;text-align:center;color:var(--muted);border:2px dashed var(--line);border-radius:18px}.empty strong{display:block;color:var(--ink);font-family:Georgia,serif;font-size:24px;margin-bottom:7px}
.members-grid{display:grid;grid-template-columns:minmax(340px,.7fr) minmax(0,1.3fr);gap:16px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid .field{margin:0}.span-2{grid-column:1/-1}.member-list{display:grid;gap:10px}.member-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:15px;background:#fff}.member-info{display:flex;align-items:center;gap:12px;min-width:0}.avatar{width:42px;height:42px;border-radius:13px;background:#eee5f8;color:#54308d;display:grid;place-items:center;font-weight:900}.member-info strong,.member-info span{display:block}.member-info span{font-size:12px;color:var(--muted);margin-top:3px}.member-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.member-actions form{display:flex;gap:7px}.member-actions input{width:160px;border:1px solid var(--line);border-radius:10px;padding:9px}
.settings-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.55fr);gap:16px}.settings-grid.settings-grid-single{grid-template-columns:1fr}
dialog{border:0;padding:0;background:transparent;max-width:none;max-height:none}dialog::backdrop{background:rgba(20,14,28,.76);backdrop-filter:blur(7px)}
.modal{width:min(900px,calc(100vw - 28px));max-height:calc(100vh - 28px);overflow:auto;background:#fffdf9;border:1px solid var(--line);border-radius:24px;box-shadow:0 30px 90px rgba(0,0,0,.34)}.modal-head{position:sticky;top:0;z-index:3;background:rgba(255,253,249,.96);backdrop-filter:blur(12px);padding:18px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}.modal-head h2{font-family:Georgia,serif;margin:0}.modal-body{padding:20px}.close-button{width:40px;height:40px;border:0;border-radius:12px;background:#eee8df;font-size:23px}.editor-section[hidden]{display:none!important}.page-editor{display:grid;gap:12px}.page-editor-item{border:1px solid var(--line);border-radius:15px;background:#faf6f0;padding:13px}.page-editor-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.page-editor-head strong{font-size:13px}.page-editor-item textarea{width:100%;min-height:160px;resize:vertical;border:1px solid #d7cec2;border-radius:12px;padding:13px;line-height:1.6}.remove-page{border:0;border-radius:9px;background:#ffe4e7;color:#a52632;padding:7px 9px;font-weight:800}.editor-toolbar{display:flex;justify-content:space-between;gap:10px;position:sticky;bottom:0;background:#fffdf9;border-top:1px solid var(--line);padding:14px 0 0;margin-top:16px}
.reader-dialog{width:100vw;height:100vh;background:transparent}.reader-stage{width:100%;height:100%;display:grid;place-items:center;padding:8px}.reader-shell{position:relative;width:min(1500px,99vw);height:min(1040px,98vh);display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:#2a202f;border:1px solid rgba(255,255,255,.16);border-radius:22px;overflow:hidden;box-shadow:0 35px 100px rgba(0,0,0,.52)}.reader-top{padding:12px 18px;display:flex;align-items:center;justify-content:space-between;gap:15px;color:white;background:#211927}.reader-top h2{font-family:Georgia,serif;margin:0;font-size:22px}.reader-top p{margin:3px 0 0;color:rgba(255,255,255,.6);font-size:12px}.reader-close{background:rgba(255,255,255,.1);color:white;border:1px solid rgba(255,255,255,.14)}
.book-opening{position:absolute;z-index:5;inset:62px 0 58px;display:grid;place-items:center;pointer-events:none;perspective:1600px;transition:opacity .35s ease .65s,visibility .35s ease .65s}.book-opening-cover{width:min(430px,70vw);height:min(610px,67vh);border-radius:9px 25px 25px 9px;padding:40px;color:white;display:flex;flex-direction:column;justify-content:space-between;box-shadow:inset 16px 0 rgba(0,0,0,.18),0 35px 65px rgba(0,0,0,.42);transform-origin:left center;transition:transform .85s cubic-bezier(.2,.7,.2,1)}.book-opening-cover strong{font-family:Georgia,serif;font-size:clamp(34px,5vw,58px);line-height:1}.book-opening-cover span{font-size:17px;opacity:.8}.reader-shell.opened .book-opening{opacity:0;visibility:hidden}.reader-shell.opened .book-opening-cover{transform:rotateY(-112deg)}
.spread-wrap{min-height:0;padding:22px;display:grid;place-items:center;opacity:0;transform:scale(.97);transition:opacity .4s ease .48s,transform .4s ease .48s}.reader-shell.opened .spread-wrap{opacity:1;transform:scale(1)}.book-spread{width:min(760px,100%);height:100%;max-height:760px;display:grid;grid-template-columns:1fr;filter:drop-shadow(0 25px 25px rgba(0,0,0,.28))}.reader-page{position:relative;width:100%;border:0;border-radius:18px;background:#fffaf0;color:#2a2430;padding:42px clamp(24px,4vw,58px) 48px;text-align:left;overflow:auto;white-space:pre-wrap;line-height:1.8;font-family:Georgia,serif;font-size:clamp(16px,1.35vw,20px);box-shadow:inset 0 0 30px rgba(74,55,35,.08)}.reader-page:hover{background:#fffdf8}.reader-page:disabled{cursor:default;color:#8d847a}.page-number{position:absolute;bottom:17px;left:0;right:0;text-align:center;font-family:Inter,sans-serif;font-size:11px;color:#958a7d}.reader-controls{padding:9px 18px;background:#211927;color:#fff;display:flex;align-items:center;justify-content:center;gap:12px}.reader-counter{min-width:150px;text-align:center;font-weight:800;font-size:13px;color:rgba(255,255,255,.74)}

.stream-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.65fr);gap:16px;min-height:calc(100vh - 114px)}
.stream-layout.member-stream-only{grid-template-columns:minmax(0,1fr)}
.stream-stage-panel{display:flex;flex-direction:column;min-height:calc(100vh - 114px)}
.stream-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:16px}
.live-badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:8px 12px;background:#eee8f2;color:#635b69;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.live-badge:before{content:"";width:9px;height:9px;border-radius:50%;background:#968c9d}
.live-badge.live{background:#ffe4e7;color:#a52632}.live-badge.live:before{background:#e02435;box-shadow:0 0 0 5px rgba(224,36,53,.12);animation:livePulse 1.4s infinite}
@keyframes livePulse{50%{box-shadow:0 0 0 9px rgba(224,36,53,0)}}
.video-frame{position:relative;flex:1;min-height:420px;border-radius:20px;overflow:hidden;background:radial-gradient(circle at 50% 25%,#342644,#15111b 68%);border:1px solid rgba(255,255,255,.08);display:grid;place-items:center}
.video-frame video{width:100%;height:100%;min-height:420px;object-fit:contain;background:#0e0b12}
.video-frame.host video{transform:none}
.video-frame.host.recording-playback video{transform:none}
.video-placeholder{position:absolute;inset:0;display:grid;place-items:center;padding:30px;text-align:center;color:#d8cce3;background:radial-gradient(circle at 50% 30%,rgba(109,62,209,.23),transparent 42%)}
.video-placeholder .camera-icon{width:88px;height:88px;border-radius:28px;display:grid;place-items:center;background:rgba(255,255,255,.08);font-size:42px;margin:0 auto 18px;border:1px solid rgba(255,255,255,.12)}
.video-placeholder strong{display:block;font-family:Georgia,serif;font-size:26px;color:white;margin-bottom:8px}.video-placeholder p{max-width:520px;margin:0;color:rgba(255,255,255,.63);line-height:1.6}
.video-frame.has-video .video-placeholder{display:none}
.video-frame.has-stream-background .video-placeholder{
    background-image:linear-gradient(rgba(31,15,22,.28),rgba(31,15,22,.28)),var(--stream-background-image);
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
}
.video-frame.has-stream-background .video-placeholder>div{padding:18px 22px;border-radius:18px;background:rgba(33,17,24,.52);backdrop-filter:blur(5px);box-shadow:0 12px 30px rgba(0,0,0,.22)}
.stream-controls{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:14px}.stream-controls .danger-button{margin-left:auto}
.stream-side{display:grid;align-content:start;gap:16px}.stream-info{display:grid;gap:12px}.stream-info-row{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid var(--line)}.stream-info-row:last-child{border-bottom:0}.stream-info-row span{color:var(--muted);font-size:13px}.stream-info-row strong{text-align:right;font-size:13px}
.viewer-list{display:grid;gap:9px;max-height:380px;overflow:auto}.viewer-pill{display:flex;align-items:center;gap:10px;padding:11px;border:1px solid var(--line);border-radius:13px;background:#fff}.viewer-pill:before{content:"";width:9px;height:9px;border-radius:50%;background:#e0a72f}.viewer-pill.connected:before{background:#27a36f}.viewer-pill span{font-size:13px;font-weight:750}
.stream-notice{padding:13px 14px;border-radius:14px;background:#f3edf9;color:#56358e;font-size:13px;line-height:1.55}.stream-error{padding:12px 14px;border-radius:13px;background:#ffe8ea;color:#a52632;font-weight:700;display:none}.stream-error.show{display:block}
.member-watch-button{min-width:170px}
.stream-title-editor{display:grid;gap:6px;margin:0 0 12px}
.stream-title-editor label{font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.stream-title-editor input{width:100%;min-height:48px;padding:10px 14px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--ink);font:700 clamp(18px,2vw,24px)/1.2 Georgia,serif;outline:none;box-shadow:0 8px 22px rgba(128,65,83,.06)}
.stream-title-editor input:focus{border-color:#d86d83;box-shadow:0 0 0 3px rgba(216,109,131,.14),0 8px 22px rgba(128,65,83,.06)}
.stream-title-editor input:disabled{opacity:.72;cursor:not-allowed;background:#fff7f9}
.stream-recordings{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,#fffdfd,#fff4f7);display:grid;gap:10px;overflow:hidden}
.stream-recordings-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.stream-recordings-head strong{display:block;font-family:Georgia,serif;font-size:18px;color:var(--ink)}
.stream-recordings-head span{display:block;margin-top:3px;color:var(--muted);font-size:12px}
.stream-recording-refresh{flex:0 0 auto;padding:8px 11px;border-radius:10px}
.stream-recording-gallery{display:flex;direction:ltr;gap:12px;width:100%;overflow-x:auto;overflow-y:hidden;padding:3px 3px 10px;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#d9a7b4 transparent;outline:none}
.stream-recording-gallery:focus-visible{border-radius:13px;box-shadow:0 0 0 3px rgba(216,109,131,.14)}
.stream-recording-gallery::-webkit-scrollbar{height:8px}
.stream-recording-gallery::-webkit-scrollbar-thumb{background:#d9a7b4;border-radius:20px}
.stream-recording-gallery::-webkit-scrollbar-track{background:transparent}
.stream-recording-card{appearance:none;flex:0 0 264px;scroll-snap-align:start;display:grid;gap:8px;padding:8px;border:1px solid #ecd0d7;border-radius:14px;background:#fff;color:var(--ink);text-align:left;cursor:pointer;box-shadow:0 8px 22px rgba(128,65,83,.07);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.stream-recording-card:hover{transform:translateY(-2px);border-color:#d98ba0;box-shadow:0 12px 26px rgba(128,65,83,.13)}
.stream-recording-card.selected{border-color:#c5546c;box-shadow:0 0 0 3px rgba(216,109,131,.16),0 12px 26px rgba(128,65,83,.13)}
.stream-recording-card:focus-visible{outline:none;border-color:#c5546c;box-shadow:0 0 0 3px rgba(216,109,131,.2)}
.stream-recording-thumb{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border:1px solid rgba(81,44,55,.14);border-radius:10px;background:linear-gradient(135deg,#6f3d4b,#24161c)}
.stream-recording-thumb img{display:block;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .18s ease}
.stream-recording-thumb img.is-ready{opacity:1}
.stream-recording-thumb-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:31px;font-weight:900;background:radial-gradient(circle at 50% 42%,rgba(255,255,255,.16),transparent 38%)}
.stream-recording-thumb-placeholder[hidden]{display:none}
.stream-recording-play-mark{position:absolute;left:10px;bottom:9px;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.9);color:#9f425a;font-size:15px;line-height:1;box-shadow:0 5px 16px rgba(0,0,0,.2)}
.stream-recording-card-copy{display:grid;gap:3px;min-width:0;padding:1px 2px 3px}
.stream-recording-card-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:900;color:var(--ink)}
.stream-recording-card-meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--muted)}
.stream-recording-empty{flex:1;min-height:142px;display:grid;place-items:center;border:1px dashed #ddabb8;border-radius:13px;background:rgba(255,255,255,.58);color:var(--muted);font-size:13px;font-weight:800;text-align:center;padding:20px}
.stream-recording-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.stream-recording-actions button{min-width:145px}
.stream-recording-message{flex:1;min-width:180px;color:var(--muted);font-size:12px;text-align:right}
.stream-recording-message.error{color:#aa3e54;font-weight:700}
.stream-recording-message.success{color:#25715b;font-weight:700}
.stream-recording-player{width:100%;aspect-ratio:16/9;max-height:520px;object-fit:contain;border-radius:13px;background:#171117;border:1px solid rgba(81,44,55,.18)}
.stream-recording-player[hidden]{display:none}
@media(max-width:520px){.stream-recordings{padding:10px;border-radius:12px}.stream-recordings-head{align-items:flex-start}.stream-recording-gallery{gap:9px;padding-bottom:8px}.stream-recording-card{flex-basis:224px;padding:7px;border-radius:12px}.stream-recording-actions{display:grid;grid-template-columns:1fr 1fr}.stream-recording-actions button{min-width:0;width:100%}.stream-recording-message{grid-column:1/-1;min-width:0;text-align:left}.stream-recording-player{border-radius:11px}}
@media(max-width:1050px){.stream-layout{grid-template-columns:1fr}.stream-stage-panel{min-height:auto}.video-frame,.video-frame video{min-height:480px}}
@media(max-width:520px){.stream-layout{min-height:auto}.stream-stage-panel{min-height:auto}.video-frame,.video-frame video{min-height:300px}.stream-heading{display:block}.live-badge{margin-top:10px}.stream-controls>*{flex:1}.stream-controls .danger-button{margin-left:0}.stream-side{grid-template-columns:1fr}}

.mobile-menu{display:none}
@media(max-width:1050px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid,.members-grid,.settings-grid{grid-template-columns:1fr}.app-shell{grid-template-columns:230px}.sidebar{padding-inline:12px}.member-actions input{width:135px}}
@media(max-width:520px){.login-page{grid-template-columns:1fr}.login-art{min-height:42vh;padding:32px 24px}.login-copy h1{font-size:48px}.login-demo{grid-template-columns:1fr}.login-panel{padding:14px}.app-shell{display:block}.sidebar{position:sticky;height:auto;z-index:40;display:block;padding:10px 12px}.side-brand{padding:3px}.side-brand .brand-mark{width:40px;height:40px}.role-chip,.sidebar-bottom{display:none}.mobile-menu{display:flex;gap:7px;overflow:auto;padding-top:9px}.mobile-menu a{white-space:nowrap;text-decoration:none;background:rgba(255,255,255,.08);color:#d9cce7;border-radius:10px;padding:9px 11px;font-size:12px;font-weight:800}.mobile-menu a.active{background:#6d3ed1;color:#fff}.nav{display:none}.workspace{padding:10px}.topbar{top:6px;border-radius:16px;min-height:auto;padding:12px}.topbar h1{font-size:23px}.topbar p{display:none}.top-actions>a.secondary{display:none}.panel{padding:14px;border-radius:17px}.stats{gap:9px}.stat{padding:16px}.stat strong{font-size:30px}.book-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}.book-card{min-height:350px;padding:12px}.book-cover{height:205px}.book-cover strong{font-size:22px}.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.member-row{grid-template-columns:1fr}.member-actions{align-items:stretch}.member-actions form{width:100%}.member-actions input{width:100%;min-width:0}.modal-body{padding:14px}.book-spread{grid-template-columns:1fr}.reader-page{display:block;border-radius:15px!important}.spread-wrap{padding:10px}.reader-shell{height:98vh;width:99vw}.reader-stage{padding:7px}.reader-controls{gap:6px}.reader-counter{min-width:105px}.book-opening{inset:60px 0 55px}.book-opening-cover{height:65vh}.library-tools{align-items:stretch}.search-box{min-width:100%}}
@media(max-width:470px){.stats{grid-template-columns:1fr 1fr}.book-grid{grid-template-columns:1fr}.book-cover{height:245px}.top-actions .primary{padding-inline:11px}.activity-item{display:block}.activity-item span{display:block;margin-top:6px}.reader-page{padding:30px 24px 45px}.reader-counter{font-size:11px;min-width:80px}}


/* Clean interface refresh */
:root{
    --ink:#201b27;
    --muted:#746d7b;
    --paper:#f4f2f6;
    --panel:#ffffff;
    --line:#e5e0e9;
    --purple:#6842c2;
    --purple-dark:#53329f;
    --sidebar:#17131d;
    --sidebar-soft:#292032;
    --danger:#bb3442;
    --success:#1f7655;
    --shadow-sm:0 2px 10px rgba(33,24,43,.055);
    --shadow:0 12px 34px rgba(33,24,43,.08);
    --radius-sm:10px;
    --radius:15px;
    --radius-lg:20px;
}
html{scroll-behavior:smooth}
body{background:var(--paper);font-size:15px;line-height:1.5}
button,a,input,textarea,select{transition:border-color .16s ease,background-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid rgba(104,66,194,.23);outline-offset:2px}
button:active{transform:translateY(1px)}

/* Login */
.login-page{grid-template-columns:minmax(380px,1.08fr) minmax(400px,.92fr)}
.login-art{padding:clamp(38px,5vw,76px);background:radial-gradient(circle at 15% 15%,rgba(123,77,219,.52),transparent 35%),radial-gradient(circle at 80% 88%,rgba(208,145,83,.23),transparent 32%),linear-gradient(145deg,#17131d,#2a1f34)}
.login-art:after{opacity:.55;background-size:48px 48px}
.brand-mark{border-radius:18px;box-shadow:0 12px 32px rgba(0,0,0,.2)}
.login-copy h1{font-size:clamp(44px,5.2vw,74px);letter-spacing:-.035em;margin:28px 0 18px}
.login-copy p{font-size:clamp(16px,1.35vw,20px);line-height:1.65}
.login-demo{gap:10px}
.demo-card{padding:15px 16px;border-radius:14px;background:rgba(255,255,255,.055)}
.login-panel{padding:clamp(18px,3vw,36px);background:#f7f5f8}
.login-box{width:min(480px,100%);border-radius:22px;padding:clamp(26px,4vw,44px);box-shadow:0 18px 55px rgba(35,25,45,.11)}
.login-box h2{font-size:34px;letter-spacing:-.02em}
.login-box>p{margin-bottom:24px}

/* Inputs and buttons */
.field{gap:7px;margin-bottom:16px}
.field label{font-size:12px;letter-spacing:.025em;text-transform:uppercase;color:#514a59}
.field input,.field textarea,.field select,.search-box input,.member-actions input,.page-editor-item textarea{
    border:1px solid #ddd7e2;
    background:#fff;
    border-radius:11px;
    min-height:44px;
    padding:11px 13px;
    box-shadow:0 1px 0 rgba(255,255,255,.8) inset;
}
.field textarea,.page-editor-item textarea{min-height:120px}
.field input:hover,.field textarea:hover,.field select:hover,.search-box input:hover,.member-actions input:hover,.page-editor-item textarea:hover{border-color:#c9c0d2}
.field input:focus,.field textarea:focus,.field select:focus,.search-box input:focus,.member-actions input:focus,.page-editor-item textarea:focus{border-color:var(--purple);box-shadow:0 0 0 3px rgba(104,66,194,.11);outline:none}
.primary,.secondary,.danger-button,.ghost-button{
    min-height:42px;
    border-radius:10px;
    padding:9px 14px;
    font-size:13px;
    font-weight:780;
    letter-spacing:.005em;
    box-shadow:none;
}
.primary{background:var(--purple)}
.primary:hover{background:var(--purple-dark);box-shadow:0 5px 14px rgba(83,50,159,.18)}
.secondary{background:#eee9f7;color:#523393}
.secondary:hover{background:#e5ddf2}
.ghost-button{background:#f3f0f4;color:#46404c}
.ghost-button:hover{background:#eae6ec}
.danger-button{background:#fbe9eb;color:#a42d39}
.danger-button:hover{background:#f7dadd}
.flash{border:1px solid transparent;border-radius:11px;padding:11px 13px;font-size:13px}
.flash.success{border-color:#c9e8da}.flash.error{border-color:#f3cbd0}

/* Main application shell */
.app-shell{grid-template-columns:252px minmax(0,1fr);background:var(--paper)}
.sidebar{padding:18px 14px;gap:16px;background:linear-gradient(180deg,#17131d 0%,#1c1623 100%);border-right:1px solid rgba(255,255,255,.055)}
.side-brand{padding:5px 7px;gap:11px}
.side-brand .brand-mark{width:43px;height:43px;border-radius:12px;font-size:21px}
.side-brand strong{font-size:18px;letter-spacing:-.01em}
.side-brand span{font-size:11px}
.role-chip{margin:0 6px;padding:9px 10px;border-radius:10px;background:rgba(255,255,255,.045)}
.nav{gap:4px}
.nav a{position:relative;padding:11px 12px;border-radius:10px;font-size:13px;color:rgba(255,255,255,.67)}
.nav a:hover{background:rgba(255,255,255,.055)}
.nav a.active{background:#30243c;color:#fff;box-shadow:inset 3px 0 0 #9a73e6}
.nav-icon{width:22px;font-size:15px;opacity:.9}
.user-card{padding:12px;border-radius:11px;background:rgba(255,255,255,.05)}
.logout-form button{min-height:40px;border-radius:9px;font-size:12px}
.logout-form button:hover{background:rgba(255,255,255,.07)}

.workspace{padding:12px;min-width:0;background:linear-gradient(180deg,#f6f4f7 0%,#f1eff3 100%)}
.topbar{top:8px;min-height:68px;border-radius:15px;padding:11px 15px;background:rgba(255,255,255,.93);box-shadow:var(--shadow-sm)}
.topbar h1{font-size:25px;letter-spacing:-.025em}
.topbar p{font-size:12px}
.top-actions{gap:7px}
.content{padding-top:12px}
.panel{border-radius:var(--radius);padding:17px;border-color:var(--line);box-shadow:var(--shadow-sm);background:#fff}
.panel+.panel{margin-top:12px}
.panel-head{margin-bottom:14px;gap:10px}
.panel-head h2{font-size:21px;letter-spacing:-.02em}
.panel-head p{font-size:12px;line-height:1.45}

/* Dashboard */
.stats{gap:10px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
.stat{position:relative;overflow:hidden;padding:17px 18px;border-radius:13px;background:#fff;box-shadow:var(--shadow-sm)}
.stat:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#8a63d4}
.stat span{font-size:11px;text-transform:uppercase;letter-spacing:.045em}
.stat strong{font-size:32px;margin-top:5px;line-height:1}
.dashboard-grid{gap:12px;margin-top:12px;grid-template-columns:minmax(0,1.5fr) minmax(270px,.5fr)}
.activity{gap:7px}
.activity-item{padding:11px 12px;border-radius:10px;background:#faf9fb;font-size:13px}
.quick-actions{gap:8px}

/* Library */
.library-panel{min-height:calc(100vh - 92px);padding:17px}
.library-tools{gap:10px;margin-bottom:15px;padding-bottom:14px;border-bottom:1px solid #eeeaf0}
.search-box{max-width:520px}
.search-box input{padding-left:14px}
.book-grid{grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:14px;align-items:stretch}
.book-card{min-height:365px;padding:12px;border-radius:14px;box-shadow:var(--shadow-sm);background:#fff}
.book-card:hover{transform:translateY(-2px);box-shadow:0 9px 24px rgba(33,24,43,.1);border-color:#d8d0df}
.book-cover{height:220px;border-radius:7px 14px 14px 7px;padding:21px 18px;box-shadow:inset 8px 0 0 rgba(0,0,0,.14),inset 10px 0 0 rgba(255,255,255,.07),0 10px 19px rgba(25,18,35,.18)}
.book-cover strong{font-size:23px;line-height:1.08}
.book-cover em{font-size:12px}
.book-meta{padding:14px 2px 3px;gap:4px}
.book-meta h3{font-size:16px;line-height:1.25}
.book-meta p{font-size:12px;line-height:1.42}
.book-tags{gap:5px;margin-top:6px}
.tag{padding:4px 7px;font-size:10px}
.admin-book-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding-top:10px}
.admin-book-actions>button,.admin-book-actions form,.admin-book-actions form button{width:100%;min-width:0}
.admin-book-actions>button{flex:auto}
.admin-book-actions .publish-button{background:var(--success)}
.admin-book-actions .unpublish-button{background:#f8eed8;color:#73500a}
.empty{min-height:280px;border-width:1px;border-radius:13px;background:#faf9fb}

/* Admin forms and accounts */
.members-grid,.settings-grid,.stream-layout{gap:12px}
.members-grid{grid-template-columns:minmax(310px,.62fr) minmax(0,1.38fr)}
.settings-grid{grid-template-columns:minmax(0,1.2fr) minmax(280px,.55fr)}
.form-grid{gap:11px}
.member-list{gap:7px}
.member-row{padding:11px 12px;border-radius:11px;background:#faf9fb}
.avatar{width:38px;height:38px;border-radius:10px}
.member-info strong{font-size:13px}
.member-actions{gap:6px}
.member-actions form{gap:6px}
.member-actions input{width:145px;min-height:40px;padding:8px 10px}

/* Book editor */
dialog::backdrop{background:rgba(20,14,28,.66);backdrop-filter:blur(5px)}
.modal{width:min(940px,calc(100vw - 24px));max-height:calc(100vh - 24px);border-radius:18px;box-shadow:0 26px 75px rgba(0,0,0,.3)}
.modal-head{padding:14px 17px;background:rgba(255,255,255,.96)}
.modal-head h2{font-size:23px}
.modal-body{padding:17px}
.close-button{width:36px;height:36px;border-radius:9px;background:#f0edf2}
.page-editor{gap:9px}
.page-editor-item{padding:11px;border-radius:11px;background:#f8f6f9}
.page-editor-item textarea{min-height:140px;line-height:1.55}
.remove-page{border-radius:8px;padding:6px 8px;font-size:12px}
.editor-toolbar{padding-top:12px;margin-top:12px}

/* Reader */
.reader-shell{border-radius:16px;box-shadow:0 28px 80px rgba(0,0,0,.48)}
.reader-top{padding:10px 15px}
.reader-top h2{font-size:20px}
.reader-controls{padding:8px 14px;gap:8px}
.reader-page{line-height:1.75}

/* Streaming */
.stream-layout{grid-template-columns:minmax(0,1.62fr) minmax(285px,.58fr);min-height:calc(100vh - 92px)}
.stream-stage-panel{min-height:calc(100vh - 92px)}
.stream-heading{margin-bottom:12px}
.video-frame{border-radius:14px;min-height:390px}
.video-frame video{min-height:390px}
.video-placeholder .camera-icon{width:72px;height:72px;border-radius:20px;font-size:34px}
.video-placeholder strong{font-size:23px}
.stream-controls{gap:7px;margin-top:11px}
.stream-side{gap:12px}
.stream-info{gap:6px}
.stream-info-row{padding:9px 0}
.viewer-pill{padding:9px 10px;border-radius:10px;background:#faf9fb}
.stream-notice{border-radius:10px;padding:11px 12px;font-size:12px}

/* Neat scrollbars */
*{scrollbar-width:thin;scrollbar-color:#c8c0ce transparent}
*::-webkit-scrollbar{width:9px;height:9px}
*::-webkit-scrollbar-thumb{background:#c8c0ce;border:2px solid transparent;background-clip:padding-box;border-radius:999px}
*::-webkit-scrollbar-track{background:transparent}

@media(max-width:1180px){
    .app-shell{grid-template-columns:225px minmax(0,1fr)}
    .sidebar{padding-inline:11px}
    .dashboard-grid,.members-grid,.settings-grid{grid-template-columns:1fr}
    .book-grid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr))}
}
@media(max-width:520px){
    .login-art{min-height:36vh;padding:28px 22px}
    .login-copy h1{font-size:42px;margin:22px 0 14px}
    .login-copy p{font-size:15px}
    .login-demo{display:none}
    .login-panel{padding:12px}
    .login-box{border-radius:17px;padding:24px 20px}
    .login-box h2{font-size:29px}
    .sidebar{padding:9px 10px;box-shadow:0 4px 16px rgba(0,0,0,.15)}
    .mobile-menu{gap:5px;padding-top:7px}
    .mobile-menu a{padding:8px 10px;border-radius:8px}
    .workspace{padding:7px}
    .topbar{top:4px;border-radius:12px;padding:10px 11px}
    .topbar h1{font-size:21px}
    .panel{padding:12px;border-radius:12px}
    .library-panel{padding:12px;min-height:calc(100vh - 76px)}
    .library-tools{padding-bottom:11px;margin-bottom:12px}
    .book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .book-card{min-height:315px;padding:8px;border-radius:11px}
    .book-cover{height:185px;padding:17px 14px}
    .book-cover strong{font-size:19px}
    .book-meta{padding-top:10px}
    .book-meta h3{font-size:14px}
    .admin-book-actions{grid-template-columns:1fr;gap:5px}
    .member-row{padding:10px}
    .modal{width:calc(100vw - 12px);max-height:calc(100vh - 12px);border-radius:13px}
    .modal-head,.modal-body{padding:12px}
    .stream-layout,.stream-stage-panel{min-height:auto}
    .video-frame,.video-frame video{min-height:280px}
}
@media(max-width:480px){
    .book-grid{grid-template-columns:1fr}
    .book-card{min-height:0}
    .book-cover{height:230px}
    .stats{grid-template-columns:1fr 1fr}
    .stat{padding:14px}
    .stat strong{font-size:27px}
    .top-actions{width:100%}
    .top-actions>*{flex:1}
}


/* Complete phone and tablet compatibility */
html{overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden;min-width:0}
img,svg,video,canvas{max-width:100%}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
.mobile-logout-form{display:none;margin:0;flex:0 0 auto}
.mobile-logout-form button{white-space:nowrap;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.07);color:#fff;border-radius:8px;min-height:38px;padding:8px 11px;font-size:12px;font-weight:800}

@supports(height:100dvh){
    body,.login-page,.app-shell{min-height:100dvh}
    .sidebar{height:100dvh}
    .reader-dialog,.reader-stage{height:100dvh}
}

@media(max-width:900px){
    .app-shell{grid-template-columns:205px minmax(0,1fr)}
    .sidebar{padding-inline:10px}
    .dashboard-grid,.members-grid,.settings-grid,.stream-layout{grid-template-columns:1fr}
    .stream-stage-panel{min-height:auto}
    .stream-side{grid-template-columns:repeat(2,minmax(0,1fr))}
    .book-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
}

@media(max-width:520px){
    html{scroll-padding-top:0}
    body{background:#f2eff4}
    .login-page{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
    .login-art{min-height:auto;padding:calc(22px + env(safe-area-inset-top)) 18px 24px;flex:0 0 auto}
    .login-art:after{background-size:28px 28px}
    .login-copy{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:14px}
    .login-copy .brand-mark{width:54px;height:54px;border-radius:16px;font-size:27px;margin:0}
    .login-copy h1{font-size:clamp(32px,10vw,44px);margin:0;line-height:1}
    .login-copy p{grid-column:1/-1;font-size:14px;line-height:1.5;margin:0}
    .login-panel{display:flex;align-items:flex-start;justify-content:center;flex:1;padding:14px 10px calc(14px + env(safe-area-inset-bottom))}
    .login-box{width:100%;max-width:560px;border-radius:16px;padding:21px 17px;box-shadow:0 8px 28px rgba(33,24,43,.1)}
    .login-box h2{font-size:29px}
    .login-box>p{font-size:14px;margin-bottom:21px}
    .field{gap:6px;margin-bottom:14px}
    .field input,.field textarea,.field select,.search-box input,.member-actions input{font-size:16px;min-height:46px;padding:11px 12px}
    .primary,.secondary,.danger-button,.ghost-button{min-height:44px;padding:10px 12px}

    .app-shell{display:block;min-width:0}
    .sidebar{position:relative;top:auto;height:auto;max-height:none;padding:calc(9px + env(safe-area-inset-top)) 9px 9px;gap:7px;overflow:visible;border-right:0;box-shadow:0 4px 15px rgba(0,0,0,.16)}
    .side-brand{padding:0 3px 4px}
    .side-brand .brand-mark{width:38px;height:38px;border-radius:10px;font-size:19px}
    .side-brand strong{font-size:16px}
    .side-brand span{font-size:10px}
    .role-chip,.nav,.sidebar-bottom{display:none}
    .mobile-menu{display:flex;align-items:center;gap:6px;width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none;padding:3px 1px 1px;-webkit-overflow-scrolling:touch}
    .mobile-menu::-webkit-scrollbar{display:none}
    .mobile-menu a,.mobile-logout-form button{display:inline-flex;align-items:center;justify-content:center;min-height:39px;padding:8px 11px;border-radius:8px;font-size:12px;white-space:nowrap;flex:0 0 auto}
    .mobile-menu a{background:rgba(255,255,255,.075);color:#e0d6e8;text-decoration:none;font-weight:800}
    .mobile-menu a.active{background:#6842c2;color:#fff}
    .mobile-logout-form{display:block}

    .workspace{padding:7px 7px calc(10px + env(safe-area-inset-bottom));min-height:0}
    .topbar{position:relative;top:auto;z-index:5;display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:11px;border-radius:12px;gap:10px}
    .topbar h1{font-size:21px;line-height:1.1;overflow-wrap:anywhere}
    .topbar p{display:block;font-size:11px;line-height:1.35}
    .top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:6px}
    .top-actions>*{width:100%;min-width:0;text-align:center}
    .top-actions>a.secondary{display:inline-flex}
    .content{padding-top:7px}
    .panel{padding:12px;border-radius:12px;min-width:0}
    .panel-head{display:flex;align-items:flex-start;gap:8px;margin-bottom:12px}
    .panel-head h2{font-size:20px;line-height:1.15;overflow-wrap:anywhere}
    .panel-head p{font-size:12px;line-height:1.4}

    .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
    .stat{min-width:0;padding:14px 12px;border-radius:11px}
    .stat span{font-size:10px;line-height:1.25;overflow-wrap:anywhere}
    .stat strong{font-size:27px}
    .dashboard-grid{display:grid;grid-template-columns:1fr;gap:8px;margin-top:8px}
    .activity-item{display:grid;grid-template-columns:1fr;gap:4px;padding:10px}
    .activity-item span{white-space:normal;margin:0}
    .quick-actions{gap:7px}

    .library-panel{min-height:0;padding:11px}
    .library-tools{display:grid;grid-template-columns:1fr;align-items:stretch;gap:10px;padding-bottom:10px;margin-bottom:10px}
    .library-tools .panel-head{margin:0!important}
    .search-box{min-width:0;max-width:none;width:100%}
    .book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .book-card{min-width:0;min-height:0;padding:8px;border-radius:11px}
    .book-cover{height:clamp(178px,39vw,225px);padding:16px 13px;border-radius:6px 12px 12px 6px}
    .book-cover strong{font-size:clamp(18px,4.8vw,22px);overflow-wrap:anywhere}
    .book-cover em{font-size:11px;overflow-wrap:anywhere}
    .book-meta{padding:10px 1px 2px;min-width:0}
    .book-meta h3{font-size:14px;line-height:1.22;overflow-wrap:anywhere}
    .book-meta p{font-size:11px;overflow-wrap:anywhere}
    .book-tags{align-items:flex-start}
    .tag{white-space:normal;line-height:1.25}
    .admin-book-actions{grid-template-columns:1fr;gap:5px}
    .admin-book-actions form,.admin-book-actions button{width:100%}
    .empty{min-height:220px;padding:20px}

    .form-grid{grid-template-columns:1fr;gap:9px}
    .span-2{grid-column:auto}
    .members-grid,.settings-grid{display:grid;grid-template-columns:1fr;gap:8px}
    .member-list{gap:7px}
    .member-row{grid-template-columns:1fr;align-items:stretch;gap:10px;padding:10px;min-width:0}
    .member-info{align-items:flex-start;min-width:0}
    .member-info>div:last-child{min-width:0}
    .member-info strong,.member-info span{overflow-wrap:anywhere}
    .member-actions{display:grid;grid-template-columns:1fr;width:100%;gap:6px}
    .member-actions form{width:100%;min-width:0;margin:0}
    .password-reset-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:6px}
    .password-reset-form input{width:100%;min-width:0}
    .password-reset-form button{min-width:76px}
    .remove-account-form{display:block!important}
    .remove-account-form button{width:100%}
    .settings-grid p,.settings-grid strong{overflow-wrap:anywhere;word-break:break-word}

    #bookEditorDialog{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;margin:0}
    .modal{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;border-radius:0;border:0;display:flex;flex-direction:column}
    .modal-head{flex:0 0 auto;padding:calc(11px + env(safe-area-inset-top)) 12px 11px;align-items:flex-start}
    .modal-head h2{font-size:21px}
    .modal-head p{font-size:11px!important;line-height:1.35}
    .close-button{width:44px;height:44px;min-width:44px;flex:0 0 44px}
    #bookEditorForm{display:flex;flex-direction:column;min-height:0;flex:1}
    .modal-body{display:flex;flex-direction:column;min-height:0;flex:1;overflow:auto;padding:12px 11px calc(10px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}
    .editor-section .panel-head{display:grid;grid-template-columns:1fr;gap:8px;margin-top:16px!important}
    #addPageButton{width:100%}
    .page-editor-item{padding:9px}
    .page-editor-item textarea{min-height:180px;font-size:16px;resize:vertical}
    .page-editor-head{gap:8px}
    .editor-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px;padding:10px 0 0;bottom:0;padding-bottom:env(safe-area-inset-bottom)}
    .editor-toolbar button{width:100%}

    .reader-dialog{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;margin:0}
    .reader-stage{width:100%;height:100vh;height:100dvh;padding:0}
    .reader-shell{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;border-radius:0;border:0;grid-template-rows:auto minmax(0,1fr) auto}
    .reader-top{padding:calc(8px + env(safe-area-inset-top)) 10px 8px;gap:8px}
    .reader-top>div{min-width:0}
    .reader-top h2{font-size:18px;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .reader-top p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .book-opening{inset:58px 0 58px}
    .book-opening-cover{width:min(78vw,360px);height:min(64dvh,520px);padding:26px}
    .book-opening-cover strong{font-size:clamp(30px,10vw,45px);overflow-wrap:anywhere}
    .book-opening-cover span{font-size:14px;overflow-wrap:anywhere}
    .spread-wrap{min-height:0;padding:6px}
    .book-spread{display:block;width:100%;height:100%;max-height:none}
    .reader-page{display:block;width:100%;height:100%;min-height:0;padding:25px 19px 42px;border-radius:13px!important;font-size:clamp(16px,4.3vw,19px);line-height:1.65;overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y}
    .reader-controls{display:grid;grid-template-columns:minmax(80px,1fr) auto minmax(80px,1fr);gap:5px;padding:7px 7px calc(7px + env(safe-area-inset-bottom))}
    
    .reader-counter{min-width:0;font-size:11px;white-space:nowrap}

    .stream-layout{display:grid;grid-template-columns:1fr;gap:8px;min-height:0}
    .stream-stage-panel{min-height:0}
    .stream-heading{display:flex;align-items:flex-start;gap:8px;margin-bottom:10px}
    .stream-heading .panel-head{flex:1;min-width:0;margin:0!important}
    .live-badge{flex:0 0 auto;margin:0;padding:7px 9px;font-size:10px}
    .video-frame,.video-frame video{width:100%;min-height:0;height:auto;aspect-ratio:16/9}
    .video-frame{flex:none;border-radius:11px}
    .video-frame video{display:block;object-fit:contain}
    .video-placeholder{padding:18px 12px}
    .video-placeholder .camera-icon{width:58px;height:58px;border-radius:16px;font-size:27px;margin-bottom:12px}
    .video-placeholder strong{font-size:19px}
    .video-placeholder p{font-size:12px;line-height:1.4}
    .stream-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}
    .stream-controls>*{width:100%;min-width:0;margin:0!important}
    .stream-side{display:grid;grid-template-columns:1fr;gap:8px}
    .stream-info-row{gap:8px;padding:8px 0}
    .stream-info-row span,.stream-info-row strong{font-size:12px;overflow-wrap:anywhere}
    .viewer-list{max-height:none}
}

@media(max-width:520px){
    .top-actions{grid-template-columns:1fr}
    .book-grid{grid-template-columns:1fr}
    .book-cover{height:min(62vw,270px)}
    .stream-controls{grid-template-columns:1fr}
}

@media(max-width:360px){
    .stats{grid-template-columns:1fr}
    .password-reset-form{grid-template-columns:1fr}
    .password-reset-form button{width:100%}
    .reader-controls{grid-template-columns:1fr 1fr}
    .reader-counter{grid-column:1/-1;grid-row:1;text-align:center}
}

@media(max-height:560px) and (orientation:landscape) and (max-width:900px){
    .login-art{display:none}
    .login-panel{padding-top:calc(8px + env(safe-area-inset-top))}
    .reader-top{padding-top:calc(5px + env(safe-area-inset-top))}
    .reader-page{padding-top:16px;padding-bottom:34px;font-size:15px}
    .book-opening{display:none}
    .reader-shell.opened .spread-wrap{transition:none}
    .video-frame,.video-frame video{max-height:calc(100dvh - 190px)}
}


/* Panel-free, draggable two-page real-book reader */
.reader-dialog{
    width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;
    overflow:hidden;background:transparent;
}
.reader-dialog::backdrop{background:rgba(18,12,24,.84);backdrop-filter:blur(10px)}
.reader-stage{
    position:relative;width:100%;height:100%;display:grid;place-items:center;
    padding:clamp(58px,7vh,88px) clamp(54px,5vw,96px) clamp(60px,8vh,92px);
    overflow:hidden;perspective:2600px;
}
.reader-shell{
    position:static;width:auto;height:auto;display:contents;background:transparent!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible;
}
.reader-top{
    position:fixed;z-index:50;top:max(14px,env(safe-area-inset-top));left:clamp(16px,3vw,42px);
    right:clamp(16px,3vw,42px);display:flex;align-items:flex-start;justify-content:space-between;
    gap:16px;padding:0;background:transparent!important;color:#fff;pointer-events:none;
}
.reader-top>div{min-width:0;text-shadow:0 2px 18px rgba(0,0,0,.72)}
.reader-top h2{font-family:Georgia,serif;margin:0;font-size:clamp(20px,2.4vw,32px);line-height:1.08}
.reader-top p{margin:5px 0 0;color:rgba(255,255,255,.72);font-size:13px}
.reader-close{
    pointer-events:auto;flex:0 0 auto;width:44px;height:44px;border-radius:50%!important;
    border:1px solid rgba(255,255,255,.22)!important;background:rgba(20,14,28,.48)!important;
    color:#fff!important;box-shadow:0 10px 30px rgba(0,0,0,.25);backdrop-filter:blur(10px);
}
.reader-close:hover{background:rgba(255,255,255,.17)!important}
.book-opening{
    position:absolute;z-index:35;inset:0;display:grid;place-items:center;pointer-events:none;
    perspective:2400px;transition:opacity .24s ease .82s,visibility .24s ease .82s;
}
.book-opening-cover{
    width:min(560px,46vw);height:min(760px,78vh);border-radius:10px 31px 31px 10px;
    padding:clamp(32px,5vw,58px);color:#fff;display:flex;flex-direction:column;justify-content:space-between;
    box-shadow:inset 18px 0 rgba(0,0,0,.2),inset 22px 0 rgba(255,255,255,.07),0 42px 80px rgba(0,0,0,.48);
    transform-origin:left center;transition:transform .95s cubic-bezier(.18,.78,.14,1),filter .95s ease;
    backface-visibility:hidden;transform-style:preserve-3d;position:relative;overflow:hidden;
}
.book-opening-cover:after{content:"";position:absolute;right:13px;top:12px;bottom:12px;width:7px;border-radius:8px;background:rgba(255,255,255,.28)}
.reader-shell.opened .book-opening{opacity:0;visibility:hidden}
.reader-shell.opened .book-opening-cover{transform:rotateY(-168deg) translateZ(2px);filter:brightness(.62)}
.spread-wrap{
    position:relative;z-index:8;width:min(1180px,92vw);height:min(760px,78vh);min-height:340px;
    padding:0;display:block;opacity:0;transform:translateY(14px) scale(.975);
    transition:opacity .34s ease .56s,transform .42s cubic-bezier(.2,.8,.2,1) .56s;
}
.reader-shell.opened .spread-wrap{opacity:1;transform:none}
.book-spread{
    position:relative;width:100%;height:100%;display:block;max-height:none;filter:none;
    perspective:2800px;transform-style:preserve-3d;user-select:none;-webkit-user-select:none;
    touch-action:pan-y;cursor:default;isolation:isolate;
}
.book-spread:before{
    content:"";position:absolute;z-index:0;inset:10px 7px -10px;border-radius:24px;
    background:#d7c9b5;box-shadow:0 34px 70px rgba(0,0,0,.42);transform:translateZ(-10px);
}
.book-spread:after{
    content:"";position:absolute;z-index:1;left:50%;top:0;bottom:0;width:20px;transform:translateX(-50%);
    background:radial-gradient(ellipse at center,rgba(38,24,16,.42),rgba(65,43,28,.2) 28%,transparent 72%);
    pointer-events:none;filter:blur(.3px);
}
.reader-static-page,.reader-leaf{
    position:absolute;top:0;bottom:0;width:50%;transform-style:preserve-3d;
}
.reader-static-page{
    z-index:2;background:#fffaf0;color:#2a2430;overflow:auto;white-space:pre-wrap;
    line-height:1.8;font-family:Georgia,serif;font-size:clamp(16px,1.35vw,20px);
    scrollbar-width:thin;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    transform-style:preserve-3d;backface-visibility:hidden;isolation:isolate;
}
.reader-static-page.left{
    left:0;border-radius:30px 7px 7px 30px;padding:clamp(32px,4.6vw,58px) clamp(28px,4.2vw,54px) clamp(48px,5vw,66px) clamp(32px,4.7vw,60px);
    transform-origin:right center;transform:perspective(2400px) rotateY(1.6deg) translateZ(3px);
    box-shadow:inset -34px 0 52px rgba(70,45,28,.15),inset 12px 0 30px rgba(255,255,255,.52),0 8px 18px rgba(26,17,12,.12);
}
.reader-static-page.right{
    right:0;border-radius:7px 30px 30px 7px;padding:clamp(32px,4.6vw,58px) clamp(32px,4.7vw,60px) clamp(48px,5vw,66px) clamp(28px,4.2vw,54px);
    transform-origin:left center;transform:perspective(2400px) rotateY(-1.6deg) translateZ(3px);
    box-shadow:inset 34px 0 52px rgba(70,45,28,.15),inset -12px 0 30px rgba(255,255,255,.52),0 8px 18px rgba(26,17,12,.12);
}
.reader-static-page:before{
    content:"";position:absolute;z-index:0;inset:0;pointer-events:none;border-radius:inherit;
    opacity:.9;mix-blend-mode:multiply;
}
.reader-static-page.left:before{
    background:linear-gradient(90deg,rgba(111,76,44,.11) 0,rgba(255,255,255,.16) 5%,transparent 18%,transparent 69%,rgba(78,49,28,.08) 87%,rgba(48,29,18,.17) 100%);
}
.reader-static-page.right:before{
    background:linear-gradient(270deg,rgba(111,76,44,.11) 0,rgba(255,255,255,.16) 5%,transparent 18%,transparent 69%,rgba(78,49,28,.08) 87%,rgba(48,29,18,.17) 100%);
}
.reader-static-page:after{
    content:"";position:absolute;z-index:1;top:1.5%;bottom:1.5%;width:18px;pointer-events:none;filter:blur(5px);opacity:.44;
}
.reader-static-page.left:after{right:2px;border-radius:50%;background:linear-gradient(90deg,transparent,rgba(54,34,21,.27))}
.reader-static-page.right:after{left:2px;border-radius:50%;background:linear-gradient(270deg,transparent,rgba(54,34,21,.27))}
.reader-static-page.blank .reader-page-text{opacity:.38}
.reader-static-page:hover{background:#fffdf7}
.reader-page-text{position:relative;z-index:2;display:block;min-height:100%}
.reader-page-number{
    position:absolute;z-index:3;bottom:19px;left:0;right:0;text-align:center;font-family:Inter,sans-serif;
    font-size:11px;font-weight:800;letter-spacing:.08em;color:#958a7d;pointer-events:none;
}
.reader-leaf{
    --page-bulge:10px;--page-scale:.988;--curl-wave:.28;--curl-band:25px;--curl-radius:42px;
    --curl-blur:.35px;--curl-inset-blur:20px;--curl-inset-alpha:.055;
    z-index:10;display:none;will-change:transform,filter,clip-path;transition:transform .82s cubic-bezier(.18,.78,.16,1),filter .82s ease,clip-path .82s ease,border-radius .82s ease;
    transform:rotateY(var(--turn-angle,0deg)) translateZ(var(--page-bulge,10px)) rotateZ(var(--page-tilt,0deg)) scaleX(var(--page-scale,.988)) scaleY(var(--page-scale-y,1));
    filter:drop-shadow(var(--leaf-shadow-x,0px) var(--leaf-shadow-y,18px) var(--leaf-shadow-blur,22px) rgba(0,0,0,var(--leaf-shadow-alpha,.28)));
    clip-path:var(--page-clip,inset(0 1.5% 0 0 round 0 28px 28px 0));
    -webkit-clip-path:var(--page-clip,inset(0 1.5% 0 0 round 0 28px 28px 0));
    overflow:visible;
}
.reader-leaf.active{display:block}
.reader-leaf.dragging{transition:none}
.reader-leaf.forward{left:50%;transform-origin:left center;border-radius:5px var(--edge-radius,80px) var(--edge-radius,80px) 5px}
.reader-leaf.backward{left:0;transform-origin:right center;border-radius:var(--edge-radius,80px) 5px 5px var(--edge-radius,80px)}
.reader-leaf-face{
    position:absolute;inset:0;background:#fffaf0;color:#2a2430;overflow:auto;white-space:pre-wrap;
    line-height:1.8;font-family:Georgia,serif;font-size:clamp(16px,1.35vw,20px);
    backface-visibility:hidden;-webkit-backface-visibility:hidden;transform-style:preserve-3d;
    background-clip:padding-box;isolation:isolate;
    scrollbar-width:thin;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
}
.reader-leaf:before{
    content:"";position:absolute;inset:0;z-index:0;background:#fffaf0;
    transform:translateZ(0);backface-visibility:visible;-webkit-backface-visibility:visible;
    border-radius:inherit;pointer-events:none;
    box-shadow:inset var(--curl-inset-x,0px) 0 var(--curl-inset-blur,0px) rgba(80,50,28,var(--curl-inset-alpha,0));
}
.reader-leaf:after{
    content:"";position:absolute;z-index:4;top:0;bottom:0;width:var(--curl-band,0px);
    opacity:var(--curl-wave,0);pointer-events:none;transform:translateZ(5px);
    border-radius:var(--curl-radius,4px);filter:blur(var(--curl-blur,0px));
}
.reader-leaf.forward:after{
    right:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.78) 34%,rgba(113,76,48,.32) 72%,rgba(42,26,16,.2) 100%);
    box-shadow:-10px 0 22px rgba(67,42,25,.16);
}
.reader-leaf.backward:after{
    left:0;background:linear-gradient(270deg,transparent 0%,rgba(255,255,255,.78) 34%,rgba(113,76,48,.32) 72%,rgba(42,26,16,.2) 100%);
    box-shadow:10px 0 22px rgba(67,42,25,.16);
}
.reader-leaf-face{z-index:1;contain:paint;background-color:#fffaf0!important}
/* The moving leaf is a single fully opaque sheet. Hiding the two internal
   faces avoids browser GPU flattening that can mirror text through a 3D page
   when clip-path/filter and backface compositing are combined. */
.reader-leaf{
    background:#fffaf0!important;
    background-color:#fffaf0!important;
    opacity:1!important;
    mix-blend-mode:normal!important;
    -webkit-backface-visibility:visible!important;
    backface-visibility:visible!important;
}
.reader-leaf .reader-leaf-face{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    content-visibility:hidden!important;
    pointer-events:none!important;
}
/* The destination page remains plain paper until the moving sheet lands.
   This guarantees that no underlying writing can appear inverted through the
   turning page on Safari, Chrome, Android WebView, or other GPU compositors. */
.reader-static-page.turn-underlay .reader-page-text,
.reader-static-page.turn-underlay .reader-page-number{
    visibility:hidden!important;
    opacity:0!important;
    color:transparent!important;
    text-shadow:none!important;
}
.reader-leaf-face:before{
    content:"";position:absolute;inset:-1px;z-index:0;pointer-events:none;border-radius:inherit;
    opacity:var(--surface-curve-opacity,.22);
    background:
        radial-gradient(ellipse var(--surface-bow-width,42%) 115% at var(--surface-bow-x,100%) 50%,rgba(255,255,255,.92) 0 14%,rgba(255,255,255,.42) 34%,rgba(137,91,55,.17) 61%,rgba(52,31,19,.2) 82%,transparent 100%),
        linear-gradient(var(--surface-gradient-angle,90deg),rgba(64,39,23,.12),transparent 21%,rgba(255,255,255,.22) 49%,transparent 76%,rgba(55,33,20,.12));
    box-shadow:
        inset var(--surface-shadow-x,-24px) 0 var(--surface-shadow-blur,44px) rgba(69,42,25,var(--surface-shadow-alpha,.16)),
        inset 0 1px rgba(255,255,255,.75),inset 0 -1px rgba(70,42,24,.1);
    transform:translateZ(2px) scaleX(var(--surface-scale-x,1));
}
.reader-leaf.forward .reader-leaf-face:before{--surface-bow-x:100%;--surface-gradient-angle:90deg}
.reader-leaf.backward .reader-leaf-face:before{--surface-bow-x:0%;--surface-gradient-angle:270deg}
.reader-leaf-front,.reader-leaf-back{opacity:1}
/* The moving sheet is intentionally blank for the entire turn. Text remains
   only on stationary pages and is painted on the destination spread after the
   animation lands. This prevents mirrored, inverted or ghosted writing on all
   browser and mobile GPU compositors. */
.reader-leaf.active .reader-page-text,
.reader-leaf.active .reader-page-number{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    color:transparent!important;
    text-shadow:none!important;
}
/* Never let a text-bearing face rotate beyond the centre spine. Some mobile
   browsers can composite a backface even when backface-visibility is hidden,
   so the front face is both removed from layout and emptied at the crossing. */
.reader-leaf-back .reader-page-text,
.reader-leaf-back .reader-page-number{display:none!important;visibility:hidden!important;opacity:0!important}
.reader-leaf-back{background:#fffaf0!important;color:transparent!important}
.reader-leaf:not(.show-back) .reader-leaf-back{
    display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
.reader-leaf.show-back .reader-leaf-front{
    display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
.reader-leaf.show-back .reader-leaf-back{
    display:block!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;
}
.reader-leaf.forward .reader-leaf-front{
    transform:rotateY(0deg) translateZ(1px);border-radius:4px var(--curl-radius,22px) var(--curl-radius,22px) 4px;
    padding:clamp(32px,4.6vw,58px) clamp(32px,4.7vw,60px) clamp(48px,5vw,66px) clamp(28px,4.2vw,54px);
    box-shadow:inset 28px 0 42px rgba(70,45,28,.12);
}
.reader-leaf.forward .reader-leaf-back{
    transform:rotateY(180deg) translateZ(1px);border-radius:var(--curl-radius,22px) 4px 4px var(--curl-radius,22px);
    padding:clamp(32px,4.6vw,58px) clamp(28px,4.2vw,54px) clamp(48px,5vw,66px) clamp(32px,4.7vw,60px);
    box-shadow:inset -28px 0 42px rgba(70,45,28,.12);
}
.reader-leaf.backward .reader-leaf-front{
    transform:rotateY(0deg) translateZ(1px);border-radius:var(--curl-radius,22px) 4px 4px var(--curl-radius,22px);
    padding:clamp(32px,4.6vw,58px) clamp(28px,4.2vw,54px) clamp(48px,5vw,66px) clamp(32px,4.7vw,60px);
    box-shadow:inset -28px 0 42px rgba(70,45,28,.12);
}
.reader-leaf.backward .reader-leaf-back{
    transform:rotateY(180deg) translateZ(1px);border-radius:4px var(--curl-radius,22px) var(--curl-radius,22px) 4px;
    padding:clamp(32px,4.6vw,58px) clamp(32px,4.7vw,60px) clamp(48px,5vw,66px) clamp(28px,4.2vw,54px);
    box-shadow:inset 28px 0 42px rgba(70,45,28,.12);
}
.reader-leaf-front:after,.reader-leaf-back:after{
    content:"";position:fixed;inset:0;border-radius:inherit;pointer-events:none;opacity:var(--fold-opacity,0);
}
.reader-leaf-front:after{background:linear-gradient(90deg,rgba(42,27,17,.22),transparent 18%,transparent 66%,rgba(255,255,255,.76) 84%,rgba(35,22,14,.2))}
.reader-leaf-back:after{background:linear-gradient(270deg,rgba(42,27,17,.2),transparent 19%,transparent 68%,rgba(255,255,255,.72) 86%,rgba(35,22,14,.18))}
.book-spine{
    position:absolute;z-index:20;left:50%;top:0;bottom:0;width:7px;transform:translateX(-50%);pointer-events:none;
    background:linear-gradient(90deg,transparent,rgba(50,31,20,.3) 46%,rgba(255,255,255,.2) 52%,transparent);
    box-shadow:0 0 18px rgba(52,34,22,.22);
}
.reader-controls{
    position:fixed;z-index:45;inset:0;display:block;padding:0;background:transparent!important;
    pointer-events:none;color:#fff;
}







.reader-counter{
    pointer-events:none;position:absolute;left:50%;bottom:max(16px,env(safe-area-inset-bottom));
    transform:translateX(-50%);min-width:0;padding:8px 13px;border-radius:999px;
    background:rgba(20,14,28,.48);border:1px solid rgba(255,255,255,.16);backdrop-filter:blur(10px);
    color:rgba(255,255,255,.82);font-size:12px;font-weight:800;white-space:nowrap;
}
.reader-drag-hint{
    position:fixed;z-index:44;left:50%;bottom:max(53px,calc(env(safe-area-inset-bottom) + 50px));
    transform:translateX(-50%);color:rgba(255,255,255,.58);font-size:11px;letter-spacing:.02em;
    text-shadow:0 2px 12px rgba(0,0,0,.6);pointer-events:none;transition:opacity .25s ease;
}
.reader-shell.interacted .reader-drag-hint{opacity:0}

/* Permanent corner-only page curl. The middle of each page edge remains flat
   while the book is resting; a full fold appears only during an active turn. */
.reader-static-page.left{
    clip-path:polygon(2.35% 0,100% 0,100% 100%,2.35% 100%,0 94.5%,0 5.5%);
}
.reader-static-page.right{
    clip-path:polygon(0 0,97.65% 0,100% 5.5%,100% 94.5%,97.65% 100%,0 100%);
}
.reader-static-page.left:before{
    background:
        radial-gradient(ellipse 42px 34px at 0 0,rgba(255,255,255,.8) 0 24%,rgba(111,76,44,.16) 52%,transparent 72%),
        radial-gradient(ellipse 42px 34px at 0 100%,rgba(255,255,255,.72) 0 24%,rgba(111,76,44,.15) 52%,transparent 72%),
        linear-gradient(90deg,rgba(111,76,44,.11) 0,rgba(255,255,255,.16) 5%,transparent 18%,transparent 69%,rgba(78,49,28,.08) 87%,rgba(48,29,18,.17) 100%);
}
.reader-static-page.right:before{
    background:
        radial-gradient(ellipse 42px 34px at 100% 0,rgba(255,255,255,.8) 0 24%,rgba(111,76,44,.16) 52%,transparent 72%),
        radial-gradient(ellipse 42px 34px at 100% 100%,rgba(255,255,255,.72) 0 24%,rgba(111,76,44,.15) 52%,transparent 72%),
        linear-gradient(270deg,rgba(111,76,44,.11) 0,rgba(255,255,255,.16) 5%,transparent 18%,transparent 69%,rgba(78,49,28,.08) 87%,rgba(48,29,18,.17) 100%);
}
.reader-leaf:after{
    opacity:1;
    transform:translateZ(9px) scaleX(var(--curl-stretch,1));
    will-change:width,border-radius,filter,transform,opacity;
}
.reader-leaf.forward:after{transform-origin:right center}
.reader-leaf.backward:after{transform-origin:left center}
.reader-leaf.forward:after{
    background:
        radial-gradient(ellipse 90% 22% at 100% 0,rgba(255,255,255,var(--corner-wave,.34)) 0 24%,rgba(113,76,48,.2) 50%,transparent 73%),
        radial-gradient(ellipse 90% 22% at 100% 100%,rgba(255,255,255,var(--corner-wave,.34)) 0 24%,rgba(113,76,48,.2) 50%,transparent 73%),
        linear-gradient(90deg,transparent 0%,rgba(255,255,255,calc(var(--edge-wave,0) * .88)) 34%,rgba(113,76,48,calc(var(--edge-wave,0) * .38)) 72%,rgba(42,26,16,calc(var(--edge-wave,0) * .25)) 100%);
}
.reader-leaf.backward:after{
    background:
        radial-gradient(ellipse 90% 22% at 0 0,rgba(255,255,255,var(--corner-wave,.34)) 0 24%,rgba(113,76,48,.2) 50%,transparent 73%),
        radial-gradient(ellipse 90% 22% at 0 100%,rgba(255,255,255,var(--corner-wave,.34)) 0 24%,rgba(113,76,48,.2) 50%,transparent 73%),
        linear-gradient(270deg,transparent 0%,rgba(255,255,255,calc(var(--edge-wave,0) * .88)) 34%,rgba(113,76,48,calc(var(--edge-wave,0) * .38)) 72%,rgba(42,26,16,calc(var(--edge-wave,0) * .25)) 100%);
}

/* The moving sheet and both blank faces inherit the same continuous bowed
   silhouette, so no layer can expose a straight rectangular side mid-turn. */
.reader-leaf>.reader-leaf-face,
.reader-leaf:before{border-radius:inherit!important}
.reader-leaf.forward>.reader-leaf-face{border-radius:5px var(--edge-radius,80px) var(--edge-radius,80px) 5px!important}
.reader-leaf.backward>.reader-leaf-face{border-radius:var(--edge-radius,80px) 5px 5px var(--edge-radius,80px)!important}

@media(max-width:520px){
    .reader-stage{padding:58px 7px 66px}
    .spread-wrap{width:98vw;height:min(70dvh,660px);min-height:300px}
    .reader-top{left:12px;right:12px;top:max(8px,env(safe-area-inset-top))}
    .reader-top h2{font-size:18px;max-width:70vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .reader-top p{font-size:11px;max-width:66vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .reader-close{width:40px;height:40px}
    .reader-static-page,.reader-leaf-face{font-size:clamp(13px,2.8vw,17px);line-height:1.58}
    .reader-static-page.left,.reader-leaf.backward .reader-leaf-front,.reader-leaf.forward .reader-leaf-back{padding:24px 15px 40px 18px}
    .reader-static-page.right,.reader-leaf.forward .reader-leaf-front,.reader-leaf.backward .reader-leaf-back{padding:24px 18px 40px 15px}
    .reader-page-number{bottom:13px;font-size:9px}
    
    
    .reader-counter{bottom:max(16px,calc(env(safe-area-inset-bottom) + 4px));font-size:11px}
    .reader-drag-hint{bottom:max(58px,calc(env(safe-area-inset-bottom) + 52px))}
    .book-opening-cover{width:min(49vw,430px);height:min(70dvh,650px)}
}
@media(max-width:430px){
    .spread-wrap{width:99vw;height:68dvh}
    .reader-static-page,.reader-leaf-face{font-size:12.5px;line-height:1.52}
    .reader-static-page.left,.reader-leaf.backward .reader-leaf-front,.reader-leaf.forward .reader-leaf-back{padding:19px 10px 35px 13px}
    .reader-static-page.right,.reader-leaf.forward .reader-leaf-front,.reader-leaf.backward .reader-leaf-back{padding:19px 13px 35px 10px}
    .reader-drag-hint{display:none}
}
@media(prefers-reduced-motion:reduce){
    .reader-leaf,.book-opening-cover,.book-opening,.spread-wrap{transition-duration:.01ms!important;transition-delay:0ms!important}
}




/* Straight, rigid page-turn motion. The moving sheet remains rectangular and
   flat from edge to edge while it rotates across the centre spine. */
.reader-leaf{
    overflow:hidden!important;
    clip-path:none!important;
    -webkit-clip-path:none!important;
    border-radius:5px!important;
    transform:rotateY(var(--turn-angle,0deg)) translateZ(4px)!important;
    transition:transform .72s cubic-bezier(.2,.72,.18,1),filter .72s ease!important;
    will-change:transform,filter!important;
}
.reader-leaf.dragging{transition:none!important}
.reader-leaf.forward,
.reader-leaf.backward{border-radius:5px!important}
.reader-leaf:before{border-radius:5px!important;box-shadow:inset var(--straight-inset-x,0px) 0 28px rgba(75,48,30,var(--straight-inset-alpha,.08))!important}
.reader-leaf:after{
    width:14px!important;
    border-radius:0!important;
    filter:none!important;
    opacity:var(--straight-edge-opacity,.28)!important;
}
.reader-leaf.forward:after{
    right:0!important;
    background:linear-gradient(90deg,transparent,rgba(65,42,27,.2))!important;
    box-shadow:-8px 0 18px rgba(57,37,24,.14)!important;
}
.reader-leaf.backward:after{
    left:0!important;
    background:linear-gradient(270deg,transparent,rgba(65,42,27,.2))!important;
    box-shadow:8px 0 18px rgba(57,37,24,.14)!important;
}


/* Keep all book text aligned to the top and contained inside the physical page.
   The page itself never grows or overflows; long content scrolls only within
   the printable text area above the fixed page number. */
.reader-static-page{
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    overflow:hidden!important;
}
.reader-page-text{
    position:relative!important;
    z-index:2!important;
    display:block!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-height:100%!important;
    margin:0!important;
    padding:0 5px 8px 0!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    align-self:stretch!important;
    text-align:left!important;
    white-space:pre-wrap!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    scrollbar-width:thin!important;
    scrollbar-gutter:stable!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
}
.reader-page-text::-webkit-scrollbar{width:6px}
.reader-page-text::-webkit-scrollbar-thumb{background:rgba(90,67,48,.24);border-radius:999px}
.reader-page-text::-webkit-scrollbar-track{background:transparent}
.reader-static-page.left,
.reader-static-page.right{
    padding-top:clamp(22px,3vw,34px)!important;
}
@media(max-width:520px){
    .reader-static-page.left,
    .reader-static-page.right{padding-top:17px!important}
    .reader-page-text{padding-right:3px!important;padding-bottom:5px!important}
}
@media(max-width:430px){
    .reader-static-page.left,
    .reader-static-page.right{padding-top:13px!important}
}

/* Continuous book text: one Admin input automatically paginates into fixed,
   scrollbar-free reader pages at the current screen size. */
.full-book-field{margin-top:14px}
.full-book-field textarea{min-height:clamp(360px,58vh,720px);resize:vertical;line-height:1.7;font-family:Georgia,serif}
.full-book-field small{display:block;text-align:right;color:var(--muted);font-size:12px;font-weight:700}
.reader-static-page{overflow:hidden!important}
.reader-page-text{
    overflow:hidden!important;
    scrollbar-width:none!important;
    scrollbar-gutter:auto!important;
    padding-right:0!important;
    padding-bottom:0!important;
}
.reader-page-text::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.reader-pagination-probe{
    z-index:-20!important;visibility:hidden!important;pointer-events:none!important;opacity:0!important;
    transform:none!important;box-shadow:none!important;background:#fffaf0!important;
}
.reader-pagination-probe:before,.reader-pagination-probe:after{display:none!important}
@media(max-width:520px){.full-book-field textarea{min-height:52vh}}

/* Phone reader: one full page at a time only on true phone-width screens.
   Foldables opened beyond phone width, tablets and desktops retain the full
   two-page webpage spread. Horizontal swipes turn one page forward or backward. */
@media(max-width:520px){
    .spread-wrap{width:min(94vw,560px)!important;height:min(74dvh,720px)!important;min-height:320px!important}
    .book-spread{width:100%!important;height:100%!important;touch-action:pan-y!important}
    .book-spread:after,.book-spine{display:none!important}
    .book-spread:before{inset:8px 5px -8px!important;border-radius:22px!important}
    .reader-static-page,.reader-leaf{width:100%!important;left:0!important;right:auto!important}
    .reader-static-page.left:not(.reader-pagination-probe){display:none!important}
    .reader-static-page.right{
        display:flex!important;left:0!important;right:auto!important;
        border-radius:22px!important;clip-path:none!important;-webkit-clip-path:none!important;
        transform:none!important;padding:22px 24px 44px!important;
        box-shadow:inset 0 0 32px rgba(70,45,28,.1),0 8px 18px rgba(26,17,12,.14)!important
    }
    .reader-static-page.right:after{display:none!important}
    .reader-static-page.right:before{
        background:linear-gradient(90deg,rgba(111,76,44,.08),transparent 10%,transparent 90%,rgba(78,49,28,.08))!important
    }
    .reader-pagination-probe{
        display:flex!important;width:100%!important;left:0!important;right:auto!important;
        border-radius:22px!important;clip-path:none!important;-webkit-clip-path:none!important;
        transform:none!important;padding:22px 24px 44px!important
    }
    .reader-leaf.forward{left:0!important;transform-origin:left center!important}
    .reader-leaf.backward{left:0!important;transform-origin:right center!important}
    .reader-leaf{border-radius:22px!important}
    .reader-drag-hint{display:block!important;bottom:max(59px,calc(env(safe-area-inset-bottom) + 52px))!important}
    .reader-drag-hint::before{content:"Swipe left or right to turn the page";font-size:11px}
    .reader-drag-hint{font-size:0!important}
}
@media(max-width:430px){
    .spread-wrap{width:96vw!important;height:min(72dvh,680px)!important}
    .reader-static-page.right,.reader-pagination-probe{padding:18px 19px 40px!important}
    .reader-static-page,.reader-leaf-face{font-size:clamp(15px,4vw,18px)!important;line-height:1.62!important}
}


/* Open foldable view: keep the full two-page webpage reader, but stretch the
   opened spread to the physical left and right screen edges. Phone mode at
   520px and below remains a single swipe page. */
@media (min-width:521px) and (max-width:1024px){
    .reader-stage{
        padding-left:0!important;
        padding-right:0!important;
    }
    .spread-wrap{
        width:100vw!important;
        max-width:none!important;
        margin-left:0!important;
        margin-right:0!important;
    }
    .book-spread{
        width:100vw!important;
        max-width:none!important;
    }
    .book-spread:before{
        inset:8px 0 -8px!important;
        border-radius:0!important;
    }
    .reader-static-page.left{
        left:0!important;
        border-radius:0 7px 7px 0!important;
        clip-path:none!important;
        -webkit-clip-path:none!important;
        transform:none!important;
    }
    .reader-static-page.right{
        right:0!important;
        border-radius:7px 0 0 7px!important;
        clip-path:none!important;
        -webkit-clip-path:none!important;
        transform:none!important;
    }
}



/* Library view switcher and dual layouts */
.library-tools-right{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:1;flex-wrap:wrap}
.library-add-book{white-space:nowrap;min-height:44px}
.library-view-controls{display:inline-flex;align-items:center;gap:6px;padding:4px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}
.library-view-button{appearance:none;border:0;background:transparent;color:var(--muted);padding:10px 14px;border-radius:10px;font-size:12px;font-weight:800;letter-spacing:.01em;cursor:pointer;transition:background .2s ease,color .2s ease,box-shadow .2s ease}
.library-view-button:hover{background:#f4eefb;color:#4f2e86}
.library-view-button.active{background:#6d3ed1;color:#fff;box-shadow:0 8px 18px rgba(109,62,209,.18)}
.book-grid.bookshelf-view{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:flex-start;gap:0;padding:18px 14px 36px;border-radius:18px;position:relative;background:
    linear-gradient(to bottom,transparent 0,transparent calc(100% - 22px),rgba(124,89,47,.14) calc(100% - 22px),rgba(124,89,47,.14) calc(100% - 19px),rgba(83,57,28,.42) calc(100% - 19px),rgba(83,57,28,.42) calc(100% - 10px),transparent calc(100% - 10px),transparent 100%),
    linear-gradient(180deg,#fcfbfd 0%,#f8f4ef 100%);
}
.book-grid.bookshelf-view .book-card{display:block;flex:0 0 auto;width:auto;min-height:0;margin:0;padding:0;border:0;background:transparent;box-shadow:none;border-radius:0;transform:none}
.book-grid.bookshelf-view .book-card:hover{transform:none;box-shadow:none;border-color:transparent}
.book-grid.bookshelf-view .book-cover{width:56px;min-width:56px;max-width:56px;height:278px;margin:0;border-radius:5px 5px 2px 2px;padding:14px 7px 18px;display:flex;align-items:center;justify-content:center;justify-self:auto;box-shadow:inset 1px 0 0 rgba(255,255,255,.18),inset 8px 0 0 rgba(255,255,255,.08),inset -10px 0 0 rgba(0,0,0,.15),3px 8px 14px rgba(28,20,35,.14);transform:none;transition:transform .18s ease,filter .18s ease,box-shadow .18s ease;position:relative;overflow:hidden}
.book-grid.bookshelf-view .book-card:hover .book-cover{transform:translateY(-5px);box-shadow:inset 1px 0 0 rgba(255,255,255,.18),inset 8px 0 0 rgba(255,255,255,.08),inset -10px 0 0 rgba(0,0,0,.15),4px 12px 18px rgba(28,20,35,.18)}
.book-grid.bookshelf-view .book-cover:before{content:"";position:absolute;left:0;top:0;bottom:0;width:10px;background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05));pointer-events:none}
.book-grid.bookshelf-view .book-cover:after{content:"";position:absolute;left:10px;right:8px;top:11px;height:1px;background:rgba(255,255,255,.18);box-shadow:0 22px 0 rgba(255,255,255,.08),0 44px 0 rgba(255,255,255,.08),0 66px 0 rgba(255,255,255,.08),0 88px 0 rgba(255,255,255,.08),0 110px 0 rgba(255,255,255,.08),0 132px 0 rgba(255,255,255,.08),0 154px 0 rgba(255,255,255,.08),0 176px 0 rgba(255,255,255,.08),0 198px 0 rgba(255,255,255,.08),0 220px 0 rgba(255,255,255,.08);pointer-events:none}
.book-grid.bookshelf-view .book-cover small,.book-grid.bookshelf-view .book-cover em{display:none}
.book-grid.bookshelf-view .book-cover strong{position:relative;z-index:1;display:block;margin:0;max-height:100%;font-size:15px;line-height:1.08;font-family:Georgia,serif;text-align:center;writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg);letter-spacing:.02em;text-shadow:0 1px 1px rgba(0,0,0,.18);overflow:hidden}
.book-grid.bookshelf-view .book-card:nth-child(6n+1) .book-cover{width:46px;min-width:46px;max-width:46px}
.book-grid.bookshelf-view .book-card:nth-child(6n+2) .book-cover{width:52px;min-width:52px;max-width:52px}
.book-grid.bookshelf-view .book-card:nth-child(6n+3) .book-cover{width:60px;min-width:60px;max-width:60px}
.book-grid.bookshelf-view .book-card:nth-child(6n+4) .book-cover{width:50px;min-width:50px;max-width:50px}
.book-grid.bookshelf-view .book-card:nth-child(6n+5) .book-cover{width:66px;min-width:66px;max-width:66px}
.book-grid.bookshelf-view .book-card:nth-child(6n+6) .book-cover{width:56px;min-width:56px;max-width:56px}
.book-grid.bookshelf-view .book-meta,.book-grid.bookshelf-view .admin-book-actions{display:none !important}
.book-grid.side-view{grid-template-columns:1fr;gap:12px;padding:4px 0}
.book-grid.side-view .book-card{display:grid;grid-template-columns:170px minmax(0,1fr);gap:16px;align-items:start;min-height:0;padding:14px 15px;border-radius:16px;background:#fff;box-shadow:var(--shadow-sm)}
.book-grid.side-view .book-card:hover{transform:translateY(-1px)}
.book-grid.side-view .book-cover{height:210px;max-width:170px}
.book-grid.side-view .book-meta{padding:4px 0;align-self:start}
.book-meta.admin-status-only{padding-top:8px}
.book-meta.admin-status-only .book-tags{margin-top:0}
.book-grid.side-view .book-meta h3{font-size:18px}
.book-grid.side-view .book-meta p{font-size:13px}
.book-grid.side-view .admin-book-actions{grid-column:2;display:flex;flex-wrap:wrap;gap:8px;padding-top:4px}
.book-grid.side-view .admin-book-actions form{display:flex}
@media(max-width:980px){
    .book-grid.side-view .book-card{grid-template-columns:150px minmax(0,1fr)}
    .book-grid.side-view .book-cover{height:195px;max-width:150px}
}
@media(max-width:700px){
    .library-tools-right{width:100%;justify-content:stretch}
    .library-view-controls{width:100%;justify-content:space-between}
    .library-view-button{flex:1 1 0;text-align:center;padding-inline:10px}
    .book-grid.side-view .book-card{grid-template-columns:1fr;gap:12px}
    .book-grid.side-view .book-cover{max-width:none;width:100%;height:225px}
    .book-grid.side-view .admin-book-actions{grid-column:auto}
}
@media(max-width:520px){
    .library-tools-right{display:grid;grid-template-columns:1fr;gap:8px}
    .library-view-controls{width:100%;gap:4px;padding:4px}
    .library-view-button{font-size:11px;padding:9px 8px}
    .book-grid.bookshelf-view{display:flex;flex-wrap:wrap;align-items:flex-end;gap:0;padding:10px 2px 28px;background:
        linear-gradient(to bottom,transparent 0,transparent calc(100% - 20px),rgba(124,89,47,.15) calc(100% - 20px),rgba(124,89,47,.15) calc(100% - 17px),rgba(83,57,28,.40) calc(100% - 17px),rgba(83,57,28,.40) calc(100% - 10px),transparent calc(100% - 10px),transparent 100%),
        linear-gradient(180deg,#fcfbfd 0%,#f8f4ef 100%)
    }
    .book-grid.bookshelf-view .book-cover{height:210px;padding:12px 5px 14px}
    .book-grid.bookshelf-view .book-cover strong{font-size:12px}
    .book-grid.bookshelf-view .book-card:nth-child(6n+1) .book-cover{width:36px;min-width:36px;max-width:36px}
    .book-grid.bookshelf-view .book-card:nth-child(6n+2) .book-cover{width:40px;min-width:40px;max-width:40px}
    .book-grid.bookshelf-view .book-card:nth-child(6n+3) .book-cover{width:46px;min-width:46px;max-width:46px}
    .book-grid.bookshelf-view .book-card:nth-child(6n+4) .book-cover{width:38px;min-width:38px;max-width:38px}
    .book-grid.bookshelf-view .book-card:nth-child(6n+5) .book-cover{width:50px;min-width:50px;max-width:50px}
    .book-grid.bookshelf-view .book-card:nth-child(6n+6) .book-cover{width:42px;min-width:42px;max-width:42px}
    .book-grid.side-view .book-card{padding:10px}
    .book-grid.side-view .book-cover{height:200px}
}


.cover-builder{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}
.cover-preview-shell{display:grid;place-items:center;padding:8px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#fbf7f1,#f3ede5)}
.cover-preview-card{width:170px;height:245px;cursor:default}
.cover-builder-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cover-mode-switch{display:flex;flex-wrap:wrap;gap:8px}
.cover-mode-switch label{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:13px;font-weight:700;cursor:pointer}
.cover-mode-switch input{accent-color:#6d3ed1}
.cover-preset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;max-height:320px;overflow:auto;padding-right:4px}
.cover-preset-option{display:grid;gap:8px;padding:9px;border:1px solid var(--line);border-radius:14px;background:#fff;cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}
.cover-preset-option:hover{border-color:#cbb9eb;box-shadow:0 8px 18px rgba(56,33,96,.08);transform:translateY(-1px)}
.cover-preset-option input{accent-color:#6d3ed1}
.cover-preset-swatch{display:block;height:100px;border-radius:10px;box-shadow:inset 8px 0 rgba(255,255,255,.10),inset -8px 0 rgba(0,0,0,.10)}
.cover-preset-name{font-size:12px;font-weight:800;line-height:1.3}
.cover-image-note{margin-top:8px;padding:10px 12px;border:1px dashed var(--line);border-radius:12px;background:#faf9fb;color:var(--muted);font-size:12px}
.cover-image-remove{display:flex;align-items:center;gap:9px;margin-top:9px;padding:10px 12px;border:1px solid #f0c9d1;border-radius:11px;background:#fff3f5;color:#9a4054;font-size:12px;font-weight:750;cursor:pointer}
.cover-image-remove input{width:18px;height:18px;flex:0 0 auto;accent-color:#c5546c}
.cover-image-remove[hidden]{display:none!important}
#coverImagePanel input[type=file]{display:block;width:100%;padding:12px;border:1px dashed #d7cde3;border-radius:12px;background:#fff}
@media(max-width:900px){.cover-builder{grid-template-columns:1fr}.cover-preview-shell{justify-items:start}.cover-preview-card{width:160px;height:230px}.cover-builder-fields{grid-template-columns:1fr}}
@media(max-width:520px){.cover-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}.cover-mode-switch{display:grid;grid-template-columns:1fr}.cover-preview-card{width:145px;height:210px}}



/* Clean centred login page */
.login-page{
    display:block;
    min-height:100vh;
    min-height:100dvh;
    background:#17131f;
}
.login-art{
    position:relative;
    isolation:isolate;
    min-height:100vh;
    min-height:100dvh;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:20px;
    padding:clamp(28px,5vw,64px) 20px;
    color:#fff;
    overflow:hidden;
    background:
        radial-gradient(circle at 18% 12%,rgba(126,79,221,.45),transparent 34%),
        radial-gradient(circle at 83% 88%,rgba(202,137,75,.19),transparent 32%),
        linear-gradient(145deg,#17131d 0%,#261c31 56%,#211827 100%);
}
.login-art:before{
    content:"";
    position:absolute;
    z-index:-2;
    inset:0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
    background-size:54px 54px;
    mask-image:linear-gradient(to bottom,rgba(0,0,0,.7),transparent 86%);
}
.login-art:after{
    content:"";
    position:absolute;
    z-index:-1;
    width:min(760px,92vw);
    height:min(760px,92vw);
    border-radius:50%;
    background:radial-gradient(circle,rgba(124,77,218,.12),transparent 67%);
    filter:blur(12px);
    pointer-events:none;
}
.login-stack{
    position:relative;
    z-index:1;
    width:min(590px,100%);
    display:grid;
    justify-items:center;
    gap:22px;
}
.login-copy{
    display:grid;
    justify-items:center;
    gap:12px;
    width:100%;
    text-align:center;
}
.login-copy .brand-mark{
    width:62px;
    height:62px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.18);
    background:rgba(255,255,255,.08);
    box-shadow:0 18px 42px rgba(0,0,0,.2);
    font-size:29px;
    backdrop-filter:blur(12px);
}
.login-copy h1{
    max-width:none;
    margin:2px 0 0;
    font-family:Georgia,serif;
    font-size:clamp(42px,6vw,68px);
    line-height:1;
    letter-spacing:-.045em;
    text-wrap:balance;
}
.login-copy p{
    max-width:570px;
    margin:0;
    color:rgba(255,255,255,.72);
    font-size:clamp(15px,1.4vw,18px);
    line-height:1.62;
    text-wrap:balance;
}
.login-panel{
    display:block;
    width:100%;
    padding:0;
    background:transparent;
}
.login-box{
    width:100%;
    box-sizing:border-box;
    padding:clamp(24px,4vw,38px);
    border:1px solid rgba(255,255,255,.72);
    border-radius:24px;
    background:rgba(255,255,255,.97);
    box-shadow:0 28px 75px rgba(0,0,0,.32);
    color:var(--ink);
    backdrop-filter:blur(18px);
}
.login-box h2{
    margin:0 0 7px;
    font-family:Georgia,serif;
    font-size:32px;
    line-height:1.15;
    letter-spacing:-.025em;
}
.login-box>p{
    margin:0 0 24px;
    color:var(--muted);
    font-size:14px;
    line-height:1.55;
}
.login-box .field{
    gap:7px;
    margin-bottom:14px;
}
.login-box .field label{
    color:#514a59;
    font-size:12px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.login-box .field input{
    min-height:50px;
    padding:13px 14px;
    border:1px solid #dcd5e2;
    border-radius:12px;
    background:#fff;
    box-shadow:inset 0 1px 2px rgba(34,24,43,.03);
    font-size:16px;
}
.login-box .field input:focus{
    border-color:#7b4ddb;
    box-shadow:0 0 0 4px rgba(123,77,219,.12);
}
.login-box .primary.wide{
    min-height:50px;
    margin-top:4px;
    border-radius:12px;
    box-shadow:0 10px 22px rgba(109,62,209,.22);
}
.login-demo{
    position:relative;
    z-index:1;
    width:min(590px,100%);
    max-width:none;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
}
.demo-card{
    min-width:0;
    padding:12px 14px;
    border:1px solid rgba(255,255,255,.11);
    border-radius:13px;
    background:rgba(255,255,255,.055);
    color:rgba(255,255,255,.82);
    box-shadow:none;
    backdrop-filter:blur(12px);
}
.demo-card strong{
    display:block;
    margin-bottom:4px;
    font-size:12px;
    color:#fff;
}
.demo-card code{
    display:block;
    overflow-wrap:anywhere;
    color:#ddcff7;
    font-size:11px;
}
@media(max-width:520px){
    .login-page{display:block;min-height:100vh;min-height:100dvh}
    .login-art{
        display:flex;
        min-height:100vh;
        min-height:100dvh;
        justify-content:flex-start;
        padding:calc(22px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
        gap:14px;
        overflow:auto;
    }
    .login-stack{gap:16px}
    .login-copy{display:grid;grid-template-columns:auto minmax(0,1fr);justify-items:start;align-items:center;gap:10px 12px;text-align:left}
    .login-copy .brand-mark{width:50px;height:50px;border-radius:15px;font-size:24px}
    .login-copy h1{font-size:35px;margin:0;letter-spacing:-.035em}
    .login-copy p{grid-column:1/-1;font-size:14px;line-height:1.5;text-align:left}
    .login-box{padding:21px 17px;border-radius:17px;box-shadow:0 18px 48px rgba(0,0,0,.27)}
    .login-box h2{font-size:28px}
    .login-box>p{margin-bottom:19px;font-size:13px}
    .login-box .field input,.login-box .primary.wide{min-height:48px}
    .login-demo{grid-template-columns:1fr;gap:7px}
    .demo-card{padding:10px 12px;border-radius:11px}
}



/* Admin-controlled full-page login background */
.login-art.has-login-background{
    background-color:#17131f;
    background-image:
        linear-gradient(135deg,rgba(16,10,23,.76),rgba(24,15,32,.58)),
        var(--login-background-image);
    background-size:cover,cover;
    background-position:center,center;
    background-repeat:no-repeat,no-repeat;
}
.login-art.has-login-background:before{
    background-image:linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);
}
.club-logo-upload{padding:12px;border:1px dashed #e8bfc9;border-radius:13px;background:#fff6f8}.club-logo-upload input[type=file]{display:block;width:100%;min-height:46px;padding:10px;border:1px solid #edcbd4;border-radius:10px;background:#fffafb;color:var(--ink)}.club-logo-upload p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.5}.club-logo-preview{width:92px;height:92px;margin-top:10px;border:1px solid #ead5dc;border-radius:18px;background:#fff;display:grid;place-items:center;overflow:hidden;box-shadow:0 8px 22px rgba(91,31,48,.10);font-size:42px}.club-logo-preview img{display:block;width:100%;height:100%;object-fit:contain}.club-logo-preview-default{background:#fff8fa}.club-logo-remove{display:flex;align-items:flex-start;gap:8px;margin-top:10px;font-size:12px;line-height:1.4;color:var(--muted)}
.login-background-upload{padding:12px;border:1px dashed #d5c9e4;border-radius:13px;background:#faf8fc}
.login-background-upload input[type=file]{display:block;width:100%;min-height:46px;padding:10px;border:1px solid #ddd5e5;border-radius:10px;background:#fff;color:var(--ink)}
.login-background-upload p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.login-background-preview{width:100%;height:190px;margin-top:10px;border:1px solid var(--line);border-radius:14px;background-color:#241a2d;background-size:cover;background-position:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.login-background-remove{display:flex;align-items:center;gap:9px;margin-top:10px;padding:10px 12px;border:1px solid #ead8d8;border-radius:11px;background:#fff8f8;color:#7c3434;font-size:12px;font-weight:750}
.login-background-remove input{width:18px;height:18px;flex:0 0 auto}
.stream-background-upload{padding:12px;border:1px dashed #e8bfc9;border-radius:13px;background:#fff6f8}
.stream-background-upload input[type=file]{display:block;width:100%;min-height:46px;padding:10px;border:1px solid #edcbd4;border-radius:10px;background:#fffafb;color:var(--ink)}
.stream-background-upload p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.stream-background-preview{width:min(100%,620px);aspect-ratio:16/9;margin-top:10px;border:1px solid var(--line);border-radius:14px;background-color:#241a2d;background-size:cover;background-position:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.stream-background-remove{display:flex;align-items:center;gap:9px;margin-top:10px;padding:10px 12px;border:1px solid #f0c9d1;border-radius:11px;background:#fff3f5;color:#9a4054;font-size:12px;font-weight:750}
.stream-background-remove input{width:18px;height:18px;flex:0 0 auto}
.stream-video-backing-upload{padding:12px;border:1px dashed #e8bfc9;border-radius:13px;background:#fff6f8}
.stream-video-backing-upload input[type=file]{display:block;width:100%;min-height:46px;padding:10px;border:1px solid #edcbd4;border-radius:10px;background:#fffafb;color:var(--ink)}
.stream-video-backing-upload p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.stream-video-backing-preview{width:min(100%,620px);aspect-ratio:16/9;margin-top:10px;border:1px solid var(--line);border-radius:14px;background-color:#241a2d;background-size:cover;background-position:center;background-repeat:no-repeat;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.stream-video-backing-remove{display:flex;align-items:center;gap:9px;margin-top:10px;padding:10px 12px;border:1px solid #f0c9d1;border-radius:11px;background:#fff3f5;color:#9a4054;font-size:12px;font-weight:750}
.stream-video-backing-remove input{width:18px;height:18px;flex:0 0 auto}
@media(max-width:520px){.login-background-preview{height:145px}}



/* Pastel rose, white and soft red theme */
:root{
    --ink:#512c37;
    --muted:#8d6872;
    --paper:#fff4f7;
    --panel:#fffdfd;
    --line:#f0ccd5;
    --purple:#d86d83;
    --purple-dark:#c5546c;
    --sidebar:#ad5268;
    --sidebar-soft:rgba(255,255,255,.18);
    --danger:#d85e70;
    --success:#77a88c;
    --shadow-sm:0 3px 12px rgba(136,65,83,.08);
    --shadow:0 16px 42px rgba(136,65,83,.12);
}
html,body{background:#fff4f7;color:var(--ink)}
body{background:linear-gradient(180deg,#fff8fa 0%,#fff0f4 100%)}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline-color:rgba(216,109,131,.32)}

/* Login */
.login-page{background:#fff2f5}
.login-art{
    color:#5a2e3a;
    background:
        radial-gradient(circle at 14% 12%,rgba(255,194,207,.9),transparent 34%),
        radial-gradient(circle at 86% 84%,rgba(255,221,225,.92),transparent 36%),
        linear-gradient(145deg,#fff7f9 0%,#ffdfe6 48%,#f8cbd5 100%);
}
.login-art:before{background-image:linear-gradient(rgba(181,82,105,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(181,82,105,.045) 1px,transparent 1px)}
.login-art:after{background:radial-gradient(circle,rgba(255,255,255,.55),transparent 68%)}
.login-copy h1{color:#6d3544;text-shadow:0 2px 0 rgba(255,255,255,.5)}
.login-copy p{color:#805664}
.login-box{border-color:rgba(255,255,255,.9);background:rgba(255,253,254,.96);box-shadow:0 28px 70px rgba(126,57,75,.2)}
.login-box h2{color:#6b3443}
.login-box .field label{color:#82515f}
.login-box .field input{border-color:#edcbd4;background:#fffafb;color:#512c37}
.login-box .field input:focus{border-color:#d86d83;box-shadow:0 0 0 4px rgba(216,109,131,.15)}
.login-box .primary.wide{box-shadow:0 10px 24px rgba(197,84,108,.24)}
.demo-card{border-color:rgba(144,65,84,.12);background:rgba(255,255,255,.58);color:#744653;box-shadow:0 7px 20px rgba(126,57,75,.07)}
.demo-card strong{color:#653340}.demo-card code{color:#a7465e}
.login-art.has-login-background{
    color:#fff;
    background-color:#8d4255;
    background-image:linear-gradient(135deg,rgba(91,30,48,.64),rgba(181,83,106,.42)),var(--login-background-image);
}
.login-art.has-login-background .login-copy h1{color:#fff;text-shadow:0 2px 14px rgba(70,18,34,.55)}
.login-art.has-login-background .login-copy p{color:rgba(255,255,255,.88)}
.login-art.has-login-background .demo-card{border-color:rgba(255,255,255,.24);background:rgba(111,38,59,.34);color:#fff}
.login-art.has-login-background .demo-card strong{color:#fff}.login-art.has-login-background .demo-card code{color:#ffdce5}

/* Main app shell */
.sidebar{background:linear-gradient(180deg,#a94d64 0%,#bd6175 50%,#cf7b8d 100%);box-shadow:8px 0 28px rgba(119,43,63,.12)}
.side-brand span,.user-card span{color:rgba(255,255,255,.72)}
.role-chip{border-color:rgba(255,255,255,.24);background:rgba(255,255,255,.12);color:#fff5f7}
.nav a{color:rgba(255,255,255,.84)}
.nav a:hover,.nav a.active{background:rgba(255,255,255,.2);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.user-card{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.16)}
.logout-form button{border-color:rgba(255,255,255,.34);background:rgba(255,255,255,.08)}
.logout-form button:hover{background:rgba(255,255,255,.2)}
.workspace{background:linear-gradient(180deg,#fff8fa 0%,#fff0f4 100%)}
.topbar{background:rgba(255,253,254,.92);border-color:#efcbd4;box-shadow:0 9px 26px rgba(141,66,85,.08)}
.topbar h1,.panel-head h2,.stat strong,.empty strong{color:#653642}
.panel{background:#fffdfd;border-color:#f0ccd5;box-shadow:0 11px 28px rgba(139,64,84,.075)}
.stat{background:linear-gradient(145deg,#fffefe,#ffeef2);border-color:#f0ccd5}
.activity-item,.member-row,.viewer-pill{background:#fff9fb;border-color:#f1d2d9}

/* Controls */
.primary{background:#d86d83;color:#fff}.primary:hover{background:#c5546c}
.secondary{background:#fde3e9;color:#a13f57}.secondary:hover{background:#f9d1db}
.ghost-button{background:#fff0f3;color:#7a4653}.ghost-button:hover{background:#f8dfe5}
.danger-button{background:#ffe1e6;color:#b64056}.danger-button:hover{background:#ffd0d9}
.field label{color:#81515e}
.field input,.field textarea,.field select,.search-box input,.member-actions input,.page-editor-item textarea{border-color:#eecbd4;background:#fffafb;color:#512c37}
.field input:focus,.field textarea:focus,.field select:focus,.search-box input:focus,.member-actions input:focus,.page-editor-item textarea:focus{border-color:#d86d83;box-shadow:0 0 0 4px rgba(216,109,131,.13)}
.flash.success{background:#e9f5ee;color:#43725a}.flash.error{background:#ffe5ea;color:#ad4056}

/* Library */
.library-tools{border-bottom-color:#f2d6dd}
.library-view-controls{border-color:#efcbd4;background:#fffafb}
.library-view-button{color:#8d5966}.library-view-button:hover{background:#fde4ea;color:#9e3f56}
.library-view-button.active{background:#d86d83;color:#fff;box-shadow:0 8px 18px rgba(197,84,108,.2)}
.book-card{border-color:#f0cfd7;background:#fffdfd;box-shadow:0 8px 22px rgba(135,60,80,.07)}
.book-card:hover{border-color:#e6aebb;box-shadow:0 15px 30px rgba(135,60,80,.12)}
.book-grid.bookshelf-view{background:linear-gradient(to bottom,transparent 0,transparent calc(100% - 22px),rgba(202,128,145,.16) calc(100% - 22px),rgba(202,128,145,.16) calc(100% - 19px),rgba(141,66,85,.36) calc(100% - 19px),rgba(141,66,85,.36) calc(100% - 10px),transparent calc(100% - 10px),transparent 100%),linear-gradient(180deg,#fffafc 0%,#ffeef2 100%)}
.book-grid.side-view .book-card{background:#fffdfd}
.tag{background:#fde5eb;color:#9b4056}.tag.published{background:#e8f4ed;color:#47765d}.tag.draft{background:#fff0df;color:#996037}
.admin-book-actions .publish-button{background:#77a88c}.admin-book-actions .publish-button:hover{background:#658f79}
.admin-book-actions .unpublish-button{background:#fff0df;color:#8f5934;border:0;border-radius:13px;min-height:44px;padding:10px 12px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;line-height:1.2;white-space:nowrap;overflow:visible;text-overflow:clip}.admin-book-actions .unpublish-button:hover{background:#ffe4ca}
.empty{border-color:#ecc8d1;background:#fff9fb}

/* Forms, dialogs and settings */
.modal{background:#fffafb;border-color:#efcbd4}.modal-head{background:rgba(255,250,251,.97);border-color:#efd2d9}
.close-button{background:#fde6eb;color:#8f4859}.page-editor-item{background:#fff3f6;border-color:#efcbd4}
.editor-toolbar{background:#fffafb;border-color:#efd2d9}
.avatar{background:#fde1e8;color:#a44259}
.cover-preview-shell{background:linear-gradient(180deg,#fff9fb,#ffeef2)}
.cover-mode-switch label,.cover-preset-option{border-color:#efcbd4;background:#fffafb}
.cover-preset-option:hover{border-color:#dd94a5;box-shadow:0 8px 18px rgba(140,61,82,.1)}
.cover-mode-switch input,.cover-preset-option input{accent-color:#d86d83}
.login-background-upload{border-color:#e8bfc9;background:#fff6f8}.login-background-upload input[type=file]{border-color:#edcbd4;background:#fffafb}
.login-background-remove{border-color:#f0c9d1;background:#fff3f5;color:#9a4054}

/* Reader and streaming */
.reader-shell{background:#71394a;border-color:rgba(255,255,255,.22)}
.reader-top,.reader-controls{background:#783d4e}
.reader-page{background:#fff9f7;color:#502e38;box-shadow:inset 0 0 30px rgba(152,83,99,.08)}
.reader-page:hover{background:#fffdfc}
.live-badge{background:#fbe4e9;color:#8b5360}.live-badge.live{background:#ffdce4;color:#ab3e54}
.video-frame{background:radial-gradient(circle at 50% 25%,#7d4555,#2f1d24 70%)}
.video-placeholder{background:radial-gradient(circle at 50% 30%,rgba(230,126,148,.25),transparent 44%);color:#fbdde5}
.stream-notice{background:#fde8ed;color:#98435a}.stream-error{background:#ffe2e8;color:#aa3e54}

/* Mobile navigation */
@media(max-width:520px){
    .sidebar{background:linear-gradient(135deg,#a94d64,#cf7b8d)}
    .mobile-menu a{background:rgba(255,255,255,.14);color:#fff7f9}
    .mobile-menu a.active{background:#fff;color:#a9475f}
    .book-grid.bookshelf-view{background:linear-gradient(to bottom,transparent 0,transparent calc(100% - 20px),rgba(202,128,145,.18) calc(100% - 20px),rgba(202,128,145,.18) calc(100% - 17px),rgba(141,66,85,.36) calc(100% - 17px),rgba(141,66,85,.36) calc(100% - 10px),transparent calc(100% - 10px),transparent 100%),linear-gradient(180deg,#fffafc 0%,#ffeef2 100%)}
}



/* Phone Side-by-side Library: compact, realistic portrait books */
@media(max-width:520px){
    .book-grid.side-view{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:12px 9px;
        align-items:start;
        padding:2px 0 8px;
    }
    .book-grid.side-view .book-card{
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:flex-start;
        gap:8px;
        min-width:0;
        width:100%;
        padding:8px;
        border-radius:12px;
        background:#fffdfd;
    }
    .book-grid.side-view .book-cover{
        width:min(100%,132px);
        min-width:0;
        max-width:132px;
        height:auto;
        aspect-ratio:2 / 3;
        margin:0 auto;
        padding:16px 12px;
        border-radius:6px 13px 13px 6px;
        box-shadow:inset 7px 0 0 rgba(0,0,0,.14),inset 9px 0 0 rgba(255,255,255,.08),0 9px 17px rgba(95,43,59,.18);
    }
    .book-grid.side-view .book-cover small{font-size:8px;letter-spacing:.1em}
    .book-grid.side-view .book-cover strong{font-size:clamp(15px,4.3vw,19px);line-height:1.05;overflow-wrap:anywhere}
    .book-grid.side-view .book-cover em{font-size:10px;overflow-wrap:anywhere}
    .book-grid.side-view .book-meta.admin-status-only{
        width:100%;
        padding:0;
        text-align:center;
    }
    .book-grid.side-view .book-meta.admin-status-only .book-tags{
        justify-content:center;
        margin-top:0;
    }
    .book-grid.side-view .admin-book-actions{
        grid-column:auto;
        display:grid;
        grid-template-columns:1fr;
        gap:5px;
        width:100%;
        padding-top:0;
    }
    .book-grid.side-view .admin-book-actions form,
    .book-grid.side-view .admin-book-actions button{
        width:100%;
        min-width:0;
    }
}
@media(max-width:360px){
    .book-grid.side-view{gap:10px 7px}
    .book-grid.side-view .book-card{padding:7px}
    .book-grid.side-view .book-cover{max-width:116px;padding:13px 9px}
    .book-grid.side-view .book-cover strong{font-size:14px}
}


/* Refined left-panel navigation buttons */
.sidebar .nav{display:grid;gap:8px;padding:4px 0}
.sidebar .nav a{
    position:relative;
    min-height:50px;
    padding:8px 38px 8px 9px;
    border:1px solid rgba(255,255,255,.13);
    border-radius:15px;
    background:rgba(255,255,255,.09);
    color:rgba(255,255,255,.92);
    font-size:13px;
    font-weight:800;
    line-height:1.25;
    box-shadow:0 5px 14px rgba(97,34,52,.08);
    transition:transform .18s ease,background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease;
}
.sidebar .nav a::after{
    content:"›";
    position:absolute;
    right:14px;
    top:50%;
    transform:translateY(-52%);
    font-size:22px;
    line-height:1;
    color:rgba(255,255,255,.48);
    transition:transform .18s ease,color .18s ease;
}
.sidebar .nav a:hover{
    transform:translateX(3px);
    background:rgba(255,255,255,.17);
    border-color:rgba(255,255,255,.28);
    color:#fff;
    box-shadow:0 9px 20px rgba(97,34,52,.13);
}
.sidebar .nav a:hover::after{transform:translate(2px,-52%);color:#fff}
.sidebar .nav a.active{
    background:#fff8fa;
    border-color:#fff;
    color:#a9475f;
    box-shadow:0 10px 24px rgba(91,31,48,.22),inset 0 0 0 1px rgba(205,102,124,.08);
}
.sidebar .nav a.active::after{color:#c85c73}
.sidebar .nav-icon{
    display:grid;
    place-items:center;
    flex:0 0 34px;
    width:34px;
    height:34px;
    margin-right:1px;
    border-radius:11px;
    background:rgba(255,255,255,.14);
    color:#fff;
    font-size:16px;
    line-height:1;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);
    transition:background .18s ease,color .18s ease,transform .18s ease;
}
.sidebar .nav a:hover .nav-icon{background:rgba(255,255,255,.24);transform:scale(1.04)}
.sidebar .nav a.active .nav-icon{background:#f8dce3;color:#a9475f;box-shadow:inset 0 0 0 1px #efc5cf}
.sidebar .role-chip{
    border-radius:14px;
    padding:11px 13px;
    background:rgba(255,255,255,.13);
    border-color:rgba(255,255,255,.2);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.04);
}
.sidebar .user-card{border-radius:15px;padding:13px 14px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.04)}
.sidebar-subscription-renewal{margin-top:10px;padding:10px 12px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.10);color:rgba(255,255,255,.86);font-size:11px;font-weight:750;line-height:1.35;text-align:center}
.sidebar-subscription-renewal b{display:block;margin-top:3px;color:#fff;font-size:12px;font-variant-numeric:tabular-nums;letter-spacing:.01em}
.sidebar .logout-form button{
    min-height:46px;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.3);
    background:rgba(255,255,255,.12);
    color:#fff;
    font-weight:850;
    letter-spacing:.01em;
    transition:transform .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.sidebar .logout-form button:hover{
    transform:translateY(-1px);
    background:#fff8fa;
    border-color:#fff;
    color:#a9475f;
    box-shadow:0 9px 20px rgba(91,31,48,.18);
}
@media(max-width:520px){
    .mobile-menu a,.mobile-logout-form button{
        min-height:42px;
        border:1px solid rgba(255,255,255,.2);
        border-radius:12px;
        background:rgba(255,255,255,.13);
        box-shadow:0 4px 10px rgba(91,31,48,.08);
        transition:background .18s ease,color .18s ease,border-color .18s ease;
    }
    .mobile-menu a.active{
        background:#fff8fa;
        color:#a9475f;
        border-color:#fff;
        box-shadow:0 7px 16px rgba(91,31,48,.16);
    }
    .mobile-logout-form button{color:#fff;background:rgba(255,255,255,.13)}
}



/* Admin editing remains available in every Library view. */
.bookshelf-edit-button{display:none}
.book-grid.bookshelf-view .book-card{position:relative}
.book-grid.bookshelf-view .bookshelf-edit-button{display:grid;place-items:center;position:absolute;z-index:8;left:50%;top:8px;transform:translateX(-50%);min-width:38px;height:29px;padding:0 8px;border:1px solid rgba(255,255,255,.78);border-radius:999px;background:rgba(255,255,255,.94);color:#9b4057;font-size:10px;font-weight:900;line-height:1;box-shadow:0 5px 13px rgba(88,31,50,.2);cursor:pointer;opacity:.9;transition:opacity .18s ease,transform .18s ease,background .18s ease,color .18s ease}
.book-grid.bookshelf-view .bookshelf-edit-button:hover,.book-grid.bookshelf-view .bookshelf-edit-button:focus-visible{opacity:1;transform:translateX(-50%) translateY(-2px);background:#c95872;color:#fff;outline:2px solid #fff;outline-offset:2px}
.book-grid.side-view .bookshelf-edit-button{display:none!important}
@media(max-width:520px){
    .book-grid.bookshelf-view .bookshelf-edit-button{top:6px;min-width:34px;height:27px;padding-inline:6px;font-size:9px}
}



/* Compact, clean Side-by-side Library view */
.book-grid.side-view{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:14px;
    align-items:start;
    padding:2px 0 10px;
}
.book-grid.side-view .book-card{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:9px;
    min-width:0;
    min-height:0;
    padding:12px;
    border:1px solid #f0dce2;
    border-radius:15px;
    background:#fffdfd;
    box-shadow:0 5px 14px rgba(111,54,70,.07);
    transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.book-grid.side-view .book-card:hover{
    transform:translateY(-2px);
    border-color:#e6bdc8;
    box-shadow:0 9px 20px rgba(111,54,70,.11);
}
.book-grid.side-view .book-cover{
    width:min(100%,128px);
    min-width:0;
    max-width:128px;
    height:auto;
    aspect-ratio:2 / 3;
    margin:0 auto;
    padding:17px 12px;
    border-radius:6px 13px 13px 6px;
    box-shadow:inset 7px 0 0 rgba(0,0,0,.13),inset 9px 0 0 rgba(255,255,255,.08),0 9px 17px rgba(95,43,59,.16);
}
.book-grid.side-view .book-cover small{font-size:8px;letter-spacing:.1em}
.book-grid.side-view .book-cover strong{font-size:18px;line-height:1.05;overflow-wrap:anywhere}
.book-grid.side-view .book-cover em{font-size:10px;overflow-wrap:anywhere}
.book-grid.side-view .book-meta.admin-status-only{
    width:100%;
    padding:0;
    text-align:center;
}
.book-grid.side-view .book-meta.admin-status-only .book-tags{
    justify-content:center;
    margin:0;
}
.book-grid.side-view .book-meta.admin-status-only .tag{
    max-width:100%;
    padding:5px 8px;
    font-size:10px;
    line-height:1.2;
}
.book-grid.side-view .admin-book-actions{
    grid-column:auto;
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:6px;
    width:100%;
    padding-top:1px;
}
.book-grid.side-view .admin-book-actions>button,
.book-grid.side-view .admin-book-actions form,
.book-grid.side-view .admin-book-actions form button{
    width:100%;
    min-width:0;
    margin:0;
}
.book-grid.side-view .admin-book-actions button{
    min-height:36px;
    padding:8px 7px;
    border-radius:9px;
    font-size:11px;
    white-space:nowrap;
}
.book-grid.side-view .admin-book-actions .danger-button{
    width:36px;
    min-width:36px;
    padding:0;
    font-size:18px;
}
@media(max-width:900px){
    .book-grid.side-view{grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:12px}
    .book-grid.side-view .book-cover{max-width:120px}
}
@media(max-width:520px){
    .book-grid.side-view{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px;padding-bottom:6px}
    .book-grid.side-view .book-card{gap:7px;padding:8px;border-radius:12px}
    .book-grid.side-view .book-cover{width:min(100%,116px);max-width:116px;padding:14px 9px}
    .book-grid.side-view .book-cover strong{font-size:15px}
    .book-grid.side-view .admin-book-actions{grid-template-columns:1fr;gap:5px}
    .book-grid.side-view .admin-book-actions .danger-button{width:100%;min-width:0}
}
@media(max-width:360px){
    .book-grid.side-view{gap:8px 6px}
    .book-grid.side-view .book-card{padding:7px}
    .book-grid.side-view .book-cover{max-width:105px}
    .book-grid.side-view .book-cover strong{font-size:14px}
}



/* Keep every book closed when the reader first opens. The cover remains fully
   visible and interactive until the reader deliberately opens it. */
.book-opening{pointer-events:auto!important;transition:opacity .28s ease .7s,visibility .28s ease .7s!important}
.book-opening-cover{cursor:pointer;pointer-events:auto;outline:none;user-select:none;-webkit-user-select:none}
.book-opening-cover:focus-visible{box-shadow:inset 18px 0 rgba(0,0,0,.2),inset 22px 0 rgba(255,255,255,.07),0 42px 80px rgba(0,0,0,.48),0 0 0 4px rgba(255,255,255,.9),0 0 0 8px rgba(216,109,131,.72)}
.book-opening-cover>strong{position:relative;z-index:2}
.book-opening-footer{position:relative;z-index:2;display:grid;gap:12px;align-items:end}
.book-opening-footer>span{font-size:17px;opacity:.88}
.book-opening-action{display:inline-flex;width:max-content;max-width:100%;padding:9px 13px;border:1px solid rgba(255,255,255,.36);border-radius:999px;background:rgba(25,15,22,.28);color:#fff;font:800 12px/1 Inter,system-ui,sans-serif;letter-spacing:.02em;box-shadow:0 8px 20px rgba(0,0,0,.18);backdrop-filter:blur(8px)}
.reader-shell:not(.opened) .spread-wrap{pointer-events:none}
.reader-shell:not(.opened) .reader-drag-hint{opacity:.9}
.reader-shell:not(.opened) .reader-drag-hint{font-size:0!important}
@media(max-width:520px){
    .book-opening{display:grid!important}
    .book-opening-cover{width:min(78vw,360px)!important;height:min(66dvh,540px)!important;padding:28px!important}
    .book-opening-footer>span{font-size:14px}
    .book-opening-action{font-size:11px;padding:8px 11px}
    .reader-shell:not(.opened) .reader-drag-hint{display:block!important}
}


/* Clean reader overlay: the book is the only visible object. Closing is done
   by clicking or tapping anywhere outside the cover/open pages. */
.reader-top{display:none!important}
.reader-counter:empty{display:none!important}
.reader-shell:not(.opened) .reader-drag-hint{display:none!important}
.book-opening-action{display:none!important}
.book-opening{cursor:default}
.reader-stage{cursor:pointer}
.book-opening-cover,.book-spread{cursor:auto}


/* Login registration system */
.login-art{overflow:auto}
.auth-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
    margin:-8px 0 24px;
    padding:5px;
    border:1px solid #f0ccd5;
    border-radius:14px;
    background:#fff1f4;
}
.auth-tab{
    min-height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:9px 14px;
    border-radius:10px;
    color:#965064;
    font-size:13px;
    font-weight:850;
    text-decoration:none;
    transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.auth-tab:hover{background:#ffe3e9;color:#7b3b4d;transform:translateY(-1px)}
.auth-tab.active{background:#fff;color:#a14158;box-shadow:0 5px 15px rgba(126,57,75,.12)}
.login-box .field small{display:block;margin-top:5px;color:#98717c;font-size:11px;line-height:1.4}
.auth-switch-copy{margin:16px 0 0!important;text-align:center;color:#8d6872!important;font-size:13px!important}
.auth-switch-copy a{color:#b44760;font-weight:850;text-decoration:none}
.auth-switch-copy a:hover{text-decoration:underline}
.registration-trap{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
@media(max-width:520px){
    .auth-tabs{margin:-4px 0 20px}
    .auth-tab{min-height:40px;padding:8px 10px}
}




/* Recording controls: per-card Admin delete and Member sidebar library. */
.stream-recording-card{position:relative}
.stream-recording-remove{
    position:absolute;
    top:7px;
    right:7px;
    z-index:4;
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    padding:0;
    border:1px solid rgba(255,255,255,.76);
    border-radius:9px;
    background:rgba(139,43,66,.9);
    color:#fff;
    font:900 22px/1 Arial,sans-serif;
    cursor:pointer;
    box-shadow:0 5px 15px rgba(53,16,27,.24);
    backdrop-filter:blur(5px);
}
.stream-recording-remove:hover{background:#a73853;transform:translateY(-1px)}
.stream-recording-remove:focus-visible{outline:3px solid rgba(255,255,255,.82);outline-offset:2px}
.stream-recording-remove:disabled{opacity:.6;cursor:wait;transform:none}
.admin-stream-recordings>.stream-recording-message{display:block;min-height:16px;text-align:left}
.member-sidebar-recordings{
    min-height:0;
    flex:1 1 auto;
    display:grid;
    grid-template-rows:minmax(0,1fr) auto;
    gap:7px;
    padding:9px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:15px;
    background:rgba(255,255,255,.1);
    overflow:hidden;
}
.member-recording-gallery{
    min-height:120px;
    max-height:calc(100vh - 410px);
    display:flex;
    flex-direction:column;
    gap:8px;
    overflow-x:hidden;
    overflow-y:auto;
    padding:1px 4px 4px 1px;
    scroll-snap-type:y proximity;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.48) transparent;
}
.member-recording-gallery::-webkit-scrollbar{width:7px;height:0}
.member-recording-gallery::-webkit-scrollbar-thumb{background:rgba(255,255,255,.48);border-radius:20px}
.member-recording-gallery .stream-recording-card{
    flex:0 0 auto;
    width:100%;
    grid-template-columns:minmax(0,1fr);
    align-items:start;
    gap:7px;
    padding:8px;
    border-color:rgba(255,255,255,.34);
    border-radius:12px;
    background:rgba(255,255,255,.94);
    scroll-snap-align:start;
    box-shadow:0 5px 14px rgba(72,22,38,.12);
}
.member-recording-gallery .stream-recording-card:hover{transform:none;border-color:#fff;box-shadow:0 7px 17px rgba(72,22,38,.18)}
.member-recording-gallery .stream-recording-card.selected{border-color:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.62),0 7px 18px rgba(72,22,38,.2)}
.member-recording-gallery .stream-recording-thumb{width:100%;border-radius:9px}
.member-recording-gallery .stream-recording-play-mark{left:6px;bottom:5px;width:24px;height:24px;font-size:10px}
.member-recording-gallery .stream-recording-card-copy{gap:2px;padding:0 1px 1px}
.member-recording-gallery .stream-recording-card-title{display:block;width:100%;padding:0 2px;font-size:12px;line-height:1.25;white-space:normal}
.member-recording-gallery .stream-recording-card-meta{font-size:9px}
.member-recording-gallery .stream-recording-empty{flex:0 0 auto;min-height:96px;color:#fff;border-color:rgba(255,255,255,.4);background:rgba(255,255,255,.09)}
.member-sidebar-recordings>.stream-recording-message{min-width:0;min-height:14px;color:rgba(255,255,255,.84);font-size:10px;text-align:left}
.member-sidebar-recordings>.stream-recording-message.error{color:#ffe3e9}
.member-sidebar-recordings>.stream-recording-message.success{color:#e9fff6}
@media(max-width:700px){
    .member-sidebar-recordings{flex:none;max-height:340px;margin-top:2px;padding:8px}
    .member-sidebar-recordings.mobile-recordings-collapsed{display:none}
    .member-sidebar-recordings.mobile-recordings-open{display:grid;animation:mobileVidsOpen .18s ease-out}
    .member-recording-gallery{max-height:285px;min-height:95px;overflow-y:auto;overscroll-behavior:contain}
    .member-recording-gallery .stream-recording-card{grid-template-columns:minmax(0,1fr)}
    .member-recording-gallery .stream-recording-thumb{width:100%}
}
@keyframes mobileVidsOpen{
    from{opacity:0;transform:translateY(-5px)}
    to{opacity:1;transform:translateY(0)}
}

/* Mobile navigation: show only Library, Live Stream and Logout. */
@media(max-width:700px){
    .app-shell{display:block;min-width:0}
    .sidebar{position:relative;top:auto;height:auto;max-height:none;padding:calc(9px + env(safe-area-inset-top)) 9px 9px;gap:7px;overflow:visible;border-right:0;box-shadow:0 4px 15px rgba(91,31,48,.16)}
    .sidebar .role-chip,.sidebar .nav,.sidebar .sidebar-bottom{display:none!important}
    .sidebar .mobile-menu{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:7px;width:100%;overflow:visible;padding:4px 1px 1px}
    .sidebar .mobile-menu.has-vids{grid-template-columns:repeat(4,minmax(0,1fr))}
    .sidebar .mobile-menu>a,.sidebar .mobile-recordings-toggle,.sidebar .mobile-logout-form button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:42px;padding:9px 7px;border:1px solid rgba(255,255,255,.2);border-radius:12px;background:rgba(255,255,255,.13);color:#fff;text-decoration:none;font-size:12px;font-weight:850;line-height:1.15;text-align:center;box-shadow:0 4px 10px rgba(91,31,48,.08)}
    .sidebar .mobile-recordings-toggle{cursor:pointer;font-family:inherit}
    .sidebar .mobile-menu>a.active,.sidebar .mobile-recordings-toggle[aria-expanded="true"]{background:#fff8fa;color:#a9475f;border-color:#fff;box-shadow:0 7px 16px rgba(91,31,48,.16)}
    .sidebar .mobile-logout-form{display:block!important;margin:0;min-width:0}
    .sidebar .mobile-logout-form button{cursor:pointer}
    .workspace{min-width:0}
}


/* Smaller fixed-size stream player. */
.stream-stage-panel{min-height:auto}
.video-frame{
    flex:0 0 auto;
    width:min(720px,100%);
    height:405px;
    min-height:405px;
    max-height:405px;
    margin-left:auto;
    margin-right:auto;
    aspect-ratio:16 / 9;
}
.video-frame video{
    width:100%;
    height:100%;
    min-height:0;
    max-height:100%;
}
@media(max-width:760px){
    .video-frame{
        width:100%;
        height:auto;
        min-height:0;
        max-height:none;
        aspect-ratio:16 / 9;
    }
    .video-frame video{
        width:100%;
        height:100%;
        min-height:0;
    }
}


/* Polished Member Live Stream panel. */
.member-stream-workspace{
    position:relative;
    overflow:hidden;
    background-color:#fff8fb;
    background-image:
        linear-gradient(135deg,rgba(255,255,255,.72) 0 24%,transparent 24% 76%,rgba(244,171,193,.17) 76% 100%),
        linear-gradient(45deg,rgba(255,220,231,.72) 0 24%,transparent 24% 76%,rgba(255,255,255,.82) 76% 100%),
        linear-gradient(90deg,rgba(225,151,174,.18) 1px,transparent 1px),
        linear-gradient(0deg,rgba(225,151,174,.18) 1px,transparent 1px),
        conic-gradient(from 45deg at 50% 50%,#fff 0 25%,#ffe8ef 0 50%,#fffafb 0 75%,#ffdce7 0 100%);
    background-size:48px 48px,48px 48px,48px 48px,48px 48px,48px 48px;
    background-position:0 0,24px 24px,0 0,0 0,0 0;
    box-shadow:inset 0 0 70px rgba(213,124,152,.12);
}
.member-stream-workspace::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    z-index:0;
    background:
        linear-gradient(135deg,rgba(255,255,255,.55),transparent 24%) 0 0/48px 48px,
        linear-gradient(315deg,rgba(198,119,145,.12),transparent 26%) 0 0/48px 48px;
}
.member-stream-workspace > *{position:relative;z-index:1}
.member-stream-content{
    min-height:calc(100vh - 36px);
    display:flex;
    align-items:flex-start;
    justify-content:center;
    padding:18px;
    border-radius:24px;
    background:rgba(255,255,255,.10);
}
.member-stream-only{
    width:100%;
    align-items:start;
}
.member-viewer-panel{
    position:relative;
    isolation:isolate;
    width:min(940px,100%);
    margin:0 auto;
    padding:clamp(20px,3vw,34px);
    overflow:visible;
    border:1px solid rgba(225,154,171,.72);
    border-radius:30px;
    background:
        radial-gradient(circle at 8% 4%,rgba(255,224,232,.92),transparent 31%),
        radial-gradient(circle at 94% 92%,rgba(248,201,212,.62),transparent 34%),
        linear-gradient(145deg,#fffefe 0%,#fff6f8 58%,#ffedf2 100%);
    box-shadow:0 24px 60px rgba(123,49,70,.14),0 2px 8px rgba(123,49,70,.06);
}
.member-viewer-panel:before,
.member-viewer-panel:after{
    content:"";
    position:absolute;
    z-index:-1;
    border-radius:50%;
    pointer-events:none;
}
.member-viewer-panel:before{
    width:210px;
    height:210px;
    top:-125px;
    right:-70px;
    background:rgba(216,109,131,.12);
}
.member-viewer-panel:after{
    width:150px;
    height:150px;
    left:-80px;
    bottom:-85px;
    background:rgba(197,84,108,.09);
}
.member-viewer-panel .stream-heading{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin:0 0 20px;
    padding:16px 18px;
    border:1px solid rgba(235,185,197,.8);
    border-radius:20px;
    background:rgba(255,255,255,.72);
    box-shadow:0 10px 28px rgba(133,58,78,.07);
    backdrop-filter:blur(12px);
}
.member-viewer-panel .stream-heading .panel-head{min-width:0}
.member-viewer-panel .stream-heading h2{
    margin:0;
    color:#6f3546;
    font-size:clamp(24px,3vw,34px);
    letter-spacing:-.025em;
}
.member-viewer-panel .stream-heading p{
    max-width:620px;
    margin:6px 0 0;
    color:#966776;
    font-size:13px;
    line-height:1.5;
}
.member-viewer-panel .stream-heading-status-only .live-badge{margin-left:auto}
.member-viewer-panel .live-badge{
    flex:0 0 auto;
    min-width:92px;
    justify-content:center;
    padding:9px 13px;
    border:1px solid #eed0d8;
    background:#fff5f7;
    color:#8d5b69;
    box-shadow:0 7px 18px rgba(132,57,77,.08);
}
.member-viewer-panel .live-badge.live{
    border-color:#f0b5c2;
    background:#ffe5eb;
    color:#ab3d55;
}
.member-viewer-panel .stream-error.show{margin:0 0 14px}
.member-viewer-panel .video-frame{
    width:min(720px,100%);
    margin:0 auto;
    border:8px solid rgba(255,255,255,.94);
    border-radius:24px;
    background:#25171d;
    box-shadow:
        0 0 0 1px rgba(180,91,113,.2),
        0 22px 48px rgba(87,34,50,.22),
        inset 0 0 0 1px rgba(255,255,255,.06);
}
.member-viewer-panel .video-frame:after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    border-radius:16px;
    box-shadow:inset 0 0 34px rgba(0,0,0,.22);
}
.member-viewer-panel .video-frame video{border-radius:16px}
.member-viewer-panel > *{position:relative;z-index:1}
.member-viewer-panel .member-glitter-rain{
    position:absolute;
    inset:-42px -34px;
    z-index:-1;
    overflow:visible;
    pointer-events:none;
    border-radius:42px;
    mix-blend-mode:normal;
}
.member-viewer-panel .member-glitter-rain::before{
    content:"";
    position:absolute;
    inset:25px;
    border-radius:38px;
    background:conic-gradient(from 0deg,#ff1744,#ff7a00,#ffd700,#16ff00,#00e5ff,#2962ff,#8a2be2,#ff00cc,#ff1744);
    filter:blur(24px);
    opacity:.5;
}
.member-viewer-panel .member-glitter-piece{
    position:absolute;
    top:-40px;
    width:var(--size,15px);
    height:var(--size,15px);
    left:var(--left,10%);
    border-radius:50%;
    background:var(--glitter-color,#ffd54a);
    opacity:0;
    filter:none;
    box-shadow:0 0 5px #fff,0 0 12px var(--glitter-color,#ffd54a),0 0 24px var(--glitter-color,#ffd54a);
    animation:memberGlitterFall var(--duration,11s) linear infinite;
    animation-delay:var(--delay,0s);
}
.member-viewer-panel .member-glitter-piece::before{
    content:"";
    position:absolute;
    inset:-35%;
    border-radius:50%;
    background:radial-gradient(circle,rgba(255,255,255,.95) 0 18%,transparent 19% 100%);
    opacity:.75;
}
.member-viewer-panel .member-glitter-piece:nth-child(3n){
    border-radius:20% 80% 65% 35%/35% 30% 70% 65%;
}
.member-viewer-panel .member-glitter-piece:nth-child(4n){
    border-radius:0;
    transform:rotate(45deg);
}
@keyframes memberGlitterFall{
    0%{top:-40px;transform:translate3d(0,0,0) rotate(0deg) scale(.8);opacity:0}
    5%{opacity:1}
    50%{opacity:.95}
    92%{opacity:1}
    100%{top:calc(100% + 45px);transform:translate3d(var(--drift,18px),0,0) rotate(540deg) scale(1.2);opacity:0}
}
.member-viewer-panel .member-glitter-piece:nth-child(1){--left:4%;--size:14px;--duration:7.2s;--delay:-1.8s;--drift:22px;--glitter-color:#ff1493}
.member-viewer-panel .member-glitter-piece:nth-child(2){--left:10%;--size:13px;--duration:6.5s;--delay:-4.7s;--drift:-18px;--glitter-color:#00bfff}
.member-viewer-panel .member-glitter-piece:nth-child(3){--left:16%;--size:15px;--duration:6.9s;--delay:-2.1s;--drift:14px;--glitter-color:#ffd700}
.member-viewer-panel .member-glitter-piece:nth-child(4){--left:22%;--size:15px;--duration:7.4s;--delay:-6.2s;--drift:-26px;--glitter-color:#7b2cff}
.member-viewer-panel .member-glitter-piece:nth-child(5){--left:28%;--size:16px;--duration:7.8s;--delay:-3.2s;--drift:25px;--glitter-color:#00e85c}
.member-viewer-panel .member-glitter-piece:nth-child(6){--left:34%;--size:14px;--duration:6.8s;--delay:-5.4s;--drift:-15px;--glitter-color:#ff5a00}
.member-viewer-panel .member-glitter-piece:nth-child(7){--left:40%;--size:14px;--duration:6.7s;--delay:-1.4s;--drift:18px;--glitter-color:#ff1744}
.member-viewer-panel .member-glitter-piece:nth-child(8){--left:46%;--size:13px;--duration:7.7s;--delay:-7.1s;--drift:-22px;--glitter-color:#00ffff}
.member-viewer-panel .member-glitter-piece:nth-child(9){--left:52%;--size:16px;--duration:7.4s;--delay:-2.6s;--drift:12px;--glitter-color:#ffcc00}
.member-viewer-panel .member-glitter-piece:nth-child(10){--left:58%;--size:15px;--duration:6.9s;--delay:-5.8s;--drift:24px;--glitter-color:#ff00cc}
.member-viewer-panel .member-glitter-piece:nth-child(11){--left:64%;--size:16px;--duration:7.6s;--delay:-3.9s;--drift:-17px;--glitter-color:#00ff9d}
.member-viewer-panel .member-glitter-piece:nth-child(12){--left:70%;--size:14px;--duration:7.8s;--delay:-6.9s;--drift:28px;--glitter-color:#2962ff}
.member-viewer-panel .member-glitter-piece:nth-child(13){--left:76%;--size:14px;--duration:6.5s;--delay:-2.5s;--drift:-12px;--glitter-color:#fff200}
.member-viewer-panel .member-glitter-piece:nth-child(14){--left:82%;--size:15px;--duration:6.4s;--delay:-4.2s;--drift:20px;--glitter-color:#ff7a00}
.member-viewer-panel .member-glitter-piece:nth-child(15){--left:88%;--size:13px;--duration:7.1s;--delay:-1.9s;--drift:-24px;--glitter-color:#00e5ff}
.member-viewer-panel .member-glitter-piece:nth-child(16){--left:94%;--size:15px;--duration:6.1s;--delay:-5.1s;--drift:16px;--glitter-color:#ff2d95}

.member-viewer-panel .member-glitter-piece:nth-child(17){--left:7%;--size:14px;--duration:6.2s;--delay:-4.1s;--drift:-20px;--glitter-color:#e600ff}
.member-viewer-panel .member-glitter-piece:nth-child(18){--left:13%;--size:10px;--duration:7.1s;--delay:-1.1s;--drift:24px;--glitter-color:#00ffff}
.member-viewer-panel .member-glitter-piece:nth-child(19){--left:19%;--size:13px;--duration:6.6s;--delay:-5.5s;--drift:-14px;--glitter-color:#ffee00}
.member-viewer-panel .member-glitter-piece:nth-child(20){--left:25%;--size:11px;--duration:7.3s;--delay:-2.7s;--drift:22px;--glitter-color:#8a2be2}
.member-viewer-panel .member-glitter-piece:nth-child(21){--left:31%;--size:15px;--duration:6.4s;--delay:-3.8s;--drift:-28px;--glitter-color:#16ff00}
.member-viewer-panel .member-glitter-piece:nth-child(22){--left:37%;--size:12px;--duration:7.6s;--delay:-6.2s;--drift:17px;--glitter-color:#ff3d00}
.member-viewer-panel .member-glitter-piece:nth-child(23){--left:43%;--size:10px;--duration:6.1s;--delay:-2.2s;--drift:-19px;--glitter-color:#ff004c}
.member-viewer-panel .member-glitter-piece:nth-child(24){--left:49%;--size:16px;--duration:7.2s;--delay:-4.8s;--drift:26px;--glitter-color:#0099ff}
.member-viewer-panel .member-glitter-piece:nth-child(25){--left:55%;--size:11px;--duration:6.8s;--delay:-1.7s;--drift:-12px;--glitter-color:#ffc400}
.member-viewer-panel .member-glitter-piece:nth-child(26){--left:61%;--size:14px;--duration:7.4s;--delay:-5.9s;--drift:20px;--glitter-color:#ff00a8}
.member-viewer-panel .member-glitter-piece:nth-child(27){--left:67%;--size:12px;--duration:6.3s;--delay:-3.1s;--drift:-23px;--glitter-color:#00f5a0}
.member-viewer-panel .member-glitter-piece:nth-child(28){--left:73%;--size:15px;--duration:7.7s;--delay:-6.7s;--drift:16px;--glitter-color:#304ffe}
.member-viewer-panel .member-glitter-piece:nth-child(29){--left:79%;--size:10px;--duration:6.5s;--delay:-2.5s;--drift:-16px;--glitter-color:#ffff00}
.member-viewer-panel .member-glitter-piece:nth-child(30){--left:85%;--size:13px;--duration:7s;--delay:-4.4s;--drift:25px;--glitter-color:#ff6d00}
.member-viewer-panel .member-glitter-piece:nth-child(31){--left:91%;--size:11px;--duration:6.7s;--delay:-1.4s;--drift:-21px;--glitter-color:#00d4ff}
.member-viewer-panel .member-glitter-piece:nth-child(32){--left:97%;--size:14px;--duration:7.5s;--delay:-5.2s;--drift:-18px;--glitter-color:#ff0090}
.member-viewer-panel .video-placeholder{
    border-radius:16px;
    background:radial-gradient(circle at 50% 34%,rgba(221,109,134,.25),transparent 43%);
}
@media(max-width:760px){
    .member-stream-workspace{background-size:40px 40px,40px 40px,40px 40px,40px 40px,40px 40px;background-position:0 0,20px 20px,0 0,0 0,0 0}
    .member-stream-workspace::before{background-size:40px 40px,40px 40px}
    .member-stream-content{min-height:0;display:block;padding:10px}
    .member-viewer-panel{padding:15px;border-radius:22px}
    .member-viewer-panel .stream-heading{align-items:flex-start;padding:13px 14px;border-radius:16px;margin-bottom:14px}
    .member-viewer-panel .stream-heading h2{font-size:24px}
    .member-viewer-panel .stream-heading p{font-size:12px}
    .member-viewer-panel .live-badge{min-width:76px;padding:7px 9px;font-size:10px}
    .member-viewer-panel .video-frame{border-width:5px;border-radius:17px}
    .member-viewer-panel .video-frame video,
    .member-viewer-panel .video-placeholder{border-radius:12px}
}
@media(max-width:430px){
    .member-viewer-panel{padding:11px;border-radius:18px}
    .member-viewer-panel .stream-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:11px 12px}
    .member-viewer-panel .stream-heading h2{font-size:21px}
    .member-viewer-panel .stream-heading p{display:none}
    .member-viewer-panel .video-frame{border-width:4px}
}


/* Connected Member accounts + Admin moderation controls. */
.viewer-identities-panel{padding:14px}
.viewer-identities-panel .viewer-list{gap:8px}
.viewer-identities-panel .viewer-pill{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:10px 11px;border-radius:12px}
.viewer-identities-panel .viewer-pill:before{display:none}
.viewer-identities-panel .viewer-account-name{min-width:0;font-size:13px;font-weight:900;color:#6d3546;overflow-wrap:anywhere}
.viewer-identities-panel .viewer-moderation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.viewer-identities-panel .viewer-moderation button{min-width:0;padding:6px 7px;border:1px solid #e5b8c3;border-radius:8px;background:#fff7f9;color:#8b4357;font:inherit;font-size:9px;font-weight:900;line-height:1.1;cursor:pointer}
.viewer-identities-panel .viewer-moderation button:hover{background:#f5dce3;color:#713849}
.viewer-identities-panel .viewer-moderation button[data-viewer-action="ban"],.viewer-identities-panel .viewer-moderation button[data-viewer-action="unban"]{border-color:#e5a4b4;color:#ad334e}
.viewer-identities-panel .viewer-moderation button:disabled{opacity:.5;cursor:wait}

/* Stream countdown controls and shared pre-live display */
.stream-start-group{display:flex;align-items:stretch;gap:9px;flex-wrap:wrap}
.stream-start-group>#rtcStart{min-width:210px}
.stream-countdown-input{display:grid;grid-template-columns:auto 78px auto;align-items:center;gap:8px;min-height:44px;padding:5px 10px;border:1px solid #e5bcc7;border-radius:13px;background:#fff8fa;color:var(--ink);font-size:12px;font-weight:850}
.stream-countdown-input span{white-space:nowrap}
.stream-countdown-input input{width:78px;height:34px;border:1px solid #ddb1bd;border-radius:9px;background:#fff;padding:5px 8px;text-align:center;font-weight:900;color:var(--ink);outline:none}
.stream-countdown-input input:focus{border-color:var(--purple);box-shadow:0 0 0 3px rgba(216,109,131,.14)}
.stream-countdown-input input:disabled{opacity:.65;background:#f6e9ed}
.stream-countdown-input small{color:var(--muted);font-size:11px;font-weight:750}
.stream-countdown{position:absolute;inset:0;z-index:8;display:grid;place-content:center;justify-items:center;gap:8px;padding:24px;text-align:center;background:radial-gradient(circle at center,rgba(91,37,54,.3),rgba(28,14,20,.62));color:#fff;backdrop-filter:blur(2px)}
.stream-countdown[hidden]{display:none}
.stream-countdown span{font-size:13px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;text-shadow:0 2px 10px rgba(0,0,0,.35)}
.stream-countdown strong{display:grid;place-items:center;min-width:150px;padding:12px 20px;border:2px solid rgba(255,255,255,.72);border-radius:20px;background:rgba(173,82,104,.88);font-family:Georgia,serif;font-size:46px;line-height:1;box-shadow:0 14px 34px rgba(0,0,0,.25)}
.stream-player-live-indicator{position:absolute;left:14px;bottom:14px;z-index:12;display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:6px 11px;border-radius:9px;background:rgba(12,12,14,.78);color:#fff;font-size:13px;font-weight:950;letter-spacing:.08em;line-height:1;pointer-events:none;box-shadow:0 5px 18px rgba(0,0,0,.24);backdrop-filter:blur(4px)}
.stream-player-live-indicator[hidden]{display:none!important}
.stream-player-live-dot{width:10px;height:10px;border-radius:50%;background:#ed1c24;box-shadow:0 0 0 3px rgba(237,28,36,.16)}
.stream-player-live-indicator strong{font:950 13px/1 system-ui,-apple-system,"Segoe UI",sans-serif;color:#fff}
.live-badge.countdown{background:#fff0c9;color:#7b5410}
.live-badge.countdown:before{background:#d9961c;box-shadow:0 0 0 5px rgba(217,150,28,.14);animation:livePulse 1.4s infinite}
@media(max-width:700px){.stream-start-group{display:grid;grid-template-columns:1fr}.stream-start-group>#rtcStart{min-width:0;width:100%}.stream-countdown-input{grid-template-columns:auto minmax(64px,1fr) auto;width:100%}.stream-countdown-input input{width:100%}.stream-countdown strong{min-width:126px;font-size:38px}}



.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* Live Stream chat for Admins and Members. */
.stream-chat-panel{
    width:min(720px,100%);
    margin:14px auto 0;
    padding:14px;
    border:1px solid #edc8d1;
    border-radius:18px;
    background:rgba(255,255,255,.88);
    box-shadow:0 10px 28px rgba(111,45,65,.08);
}
.member-viewer-panel .stream-chat-panel{width:100%;background:rgba(255,255,255,.76);backdrop-filter:blur(10px)}
.stream-chat-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.stream-chat-head h3{margin:0;color:#713849;font-size:17px;line-height:1.2}
.stream-chat-head span{color:#9a6977;font-size:11px;font-weight:800}
.member-viewer-panel .stream-chat-head{justify-content:flex-end}
.stream-chat-messages{
    height:230px;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:9px;
    border:1px solid #f0d6dc;
    border-radius:14px;
    background:#fff9fb;
    scrollbar-width:thin;
    scrollbar-color:#dfaab7 transparent;
}
.stream-chat-messages::-webkit-scrollbar{width:7px}
.stream-chat-messages::-webkit-scrollbar-thumb{background:#dfaab7;border-radius:20px}
.stream-chat-empty{display:grid;place-items:center;min-height:100%;color:#a27682;font-size:12px;text-align:center}
.stream-chat-message{position:relative;align-self:flex-start;max-width:min(82%,620px);padding:9px 11px;border:1px solid #efd0d8;border-radius:13px 13px 13px 4px;background:#fff;color:#56313c;box-shadow:0 3px 9px rgba(96,38,56,.05)}
.stream-chat-message.mine{align-self:flex-end;border-color:#e5aebc;border-radius:13px 13px 4px 13px;background:#ffe9ee}
.stream-chat-message.admin-message{box-shadow:inset 3px 0 0 #c95670,0 3px 9px rgba(96,38,56,.05)}
.stream-chat-message-head{display:flex;align-items:center;gap:7px;padding-right:20px;margin-bottom:3px}
.stream-chat-message-head strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#a3465d;font-size:11px;font-weight:900}
.stream-chat-message-head time{flex:0 0 auto;color:#aa7c88;font-size:9px;font-weight:700}
.stream-chat-message p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.42}
.stream-chat-delete{position:absolute;top:6px;right:6px;width:22px;height:22px;padding:0;border:0;border-radius:8px;background:#f8dce3;color:#a13e56;font-size:15px;font-weight:900;line-height:22px;cursor:pointer}
.stream-chat-delete:hover{background:#c6536d;color:#fff}
.stream-chat-delete:disabled{opacity:.55;cursor:wait}
.stream-chat-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:9px}
.stream-chat-form input{min-width:0;height:42px;padding:9px 12px;border:1px solid #e5b8c3;border-radius:12px;background:#fff;color:#512c37;font:inherit;outline:none}
.stream-chat-form input:focus{border-color:#cf6078;box-shadow:0 0 0 3px rgba(207,96,120,.13)}
.stream-chat-form button{min-width:82px}
.stream-chat-feedback{display:block;min-height:15px;margin-top:5px;color:#9a6977;font-size:10px}
.stream-chat-feedback.error{color:#b23350}
.stream-chat-feedback.success{color:#39785d}
.stream-book-vote{margin:0 0 8px;padding:8px 9px;border:1px solid #ecc5cf;border-radius:13px;background:linear-gradient(145deg,#fff9fb,#fff0f4)}
.stream-book-vote-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.stream-book-vote-head strong{color:#713849;font-size:12px}
.stream-book-vote-head span{color:#9a6977;font-size:9px;font-weight:800}
.stream-book-vote-books{display:flex;align-items:flex-start;gap:8px;overflow-x:auto;overflow-y:hidden;padding:2px 2px 5px;scrollbar-width:thin;scroll-snap-type:x proximity}
.stream-book-vote-choice{flex:0 0 82px;display:grid;gap:4px;min-width:0;padding:0;border:0;background:transparent;color:#56313c;text-align:center;cursor:pointer;scroll-snap-align:start}
.stream-book-vote-choice:disabled{cursor:default}
.stream-book-vote-cover{position:relative;display:block;width:54px;height:80px;margin:0 auto;border:1px solid rgba(92,39,55,.16);border-radius:7px;overflow:hidden;box-shadow:0 4px 10px rgba(92,39,55,.12)}
.stream-book-vote-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.14),transparent 12%,transparent 90%,rgba(255,255,255,.12));pointer-events:none}
.stream-book-vote-count{position:absolute;left:50%;top:50%;z-index:2;transform:translate(-50%,-50%);display:grid;place-items:center;min-width:30px;height:30px;padding:0 7px;border-radius:999px;background:rgba(255,255,255,.94);border:2px solid rgba(143,62,82,.28);color:#8d3e55;font-size:13px;font-weight:900;box-shadow:0 3px 9px rgba(80,28,44,.16);backdrop-filter:blur(4px)}
.stream-book-vote-choice.selected .stream-book-vote-cover{outline:2px solid #cb6078;outline-offset:2px}
.stream-book-vote-title{display:block;width:100%;min-width:0;overflow:visible;white-space:normal;overflow-wrap:anywhere;word-break:normal;font-size:9px;line-height:1.2;font-weight:900;color:#713849;text-align:center}
.stream-book-vote-author{display:block;width:100%;min-width:0;overflow:visible;white-space:normal;overflow-wrap:anywhere;font-size:8px;line-height:1.15;color:#a27682;text-align:center}
.book-vote-modal{width:min(680px,calc(100vw - 24px))}
.book-vote-admin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:9px}
.book-vote-admin-choice{position:relative;display:grid;gap:4px;cursor:pointer}
.book-vote-admin-choice input{position:absolute;top:5px;right:5px;z-index:3;width:16px;height:16px;accent-color:#c95d76}
.book-vote-admin-cover{position:relative;display:flex;min-height:118px;aspect-ratio:2/3;flex-direction:column;justify-content:flex-end;gap:2px;padding:8px 7px;border:2px solid transparent;border-radius:9px;color:#fff;overflow:hidden;box-shadow:0 5px 12px rgba(78,28,43,.12)}
.book-vote-admin-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 30%,rgba(0,0,0,.58));pointer-events:none}
.book-vote-admin-cover strong,.book-vote-admin-cover small{position:relative;z-index:1;text-shadow:0 1px 4px rgba(0,0,0,.5)}
.book-vote-admin-cover strong{font-family:Georgia,serif;font-size:11px;line-height:1.05}
.book-vote-admin-cover small{font-size:8px}
.book-vote-admin-choice input:checked + .book-vote-admin-cover{border-color:#fff;outline:3px solid #c95d76;outline-offset:2px}
.book-vote-admin-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:17px;padding-top:14px;border-top:1px solid #efd0d8}
.book-vote-admin-actions>span{color:#9a6977;font-size:11px;font-weight:700}
.book-vote-admin-actions>div{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:700px){
    .stream-chat-panel{padding:10px;border-radius:15px}
    .stream-chat-messages{height:190px;padding:7px}
    .stream-chat-message{max-width:90%}
    .stream-chat-form{grid-template-columns:minmax(0,1fr) 72px}
    .stream-chat-form button{min-width:0;padding-left:10px;padding-right:10px}
    .stream-book-vote{padding:8px}
    .stream-book-vote-books{gap:7px}
    .stream-book-vote-choice{flex-basis:78px}
    .stream-book-vote-cover{width:50px;height:74px}
    .book-vote-admin-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
    .book-vote-admin-actions{align-items:stretch;flex-direction:column}
    .book-vote-admin-actions>div{display:grid;grid-template-columns:1fr 1fr}
}

/* Member Stream Player matches the full Live Stream panel width. */
.member-viewer-panel .video-frame{
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
    aspect-ratio:16 / 9;
}
.member-viewer-panel .video-frame video{
    width:100%;
    height:100%;
}



/* Member stream: connect status, player, chat and composer into one continuous panel. */
.member-viewer-panel{
    padding:0!important;
    border-radius:30px;
}
.member-viewer-panel .stream-heading{
    width:100%;
    margin:0!important;
    padding:14px 18px;
    border:0;
    border-bottom:1px solid #edc8d1;
    border-radius:29px 29px 0 0!important;
    box-shadow:none;
    background:rgba(255,255,255,.90);
}
.member-viewer-panel .stream-error.show{
    margin:0;
    border-radius:0;
}
.member-viewer-panel .video-frame{
    width:100%;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
}
.member-viewer-panel .video-frame:after,
.member-viewer-panel .video-frame video,
.member-viewer-panel .video-placeholder{
    border-radius:0!important;
}
.member-viewer-panel .stream-chat-panel{
    width:100%;
    margin:0!important;
    padding:0!important;
    overflow:hidden;
    border:0;
    border-top:1px solid #edc8d1;
    border-radius:0 0 29px 29px!important;
    box-shadow:none;
    background:rgba(255,255,255,.91);
    backdrop-filter:blur(10px);
}
.member-viewer-panel .stream-chat-head:empty{
    display:none;
}
.member-viewer-panel .stream-chat-head{
    margin:0;
    padding:8px 12px;
    border-bottom:1px solid #f0d6dc;
}
.member-viewer-panel .stream-book-vote{
    margin:0;
    border:0;
    border-bottom:1px solid #f0d6dc;
    border-radius:0;
}
.member-viewer-panel .stream-chat-messages{
    height:230px;
    margin:0;
    padding:11px 13px;
    border:0;
    border-radius:0;
    background:rgba(255,249,251,.96);
}
.member-viewer-panel .stream-chat-form{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:0;
    margin:0;
    padding:0;
    border-top:1px solid #edc8d1;
    background:#fff;
}
.member-viewer-panel .stream-chat-form input{
    height:50px;
    margin:0;
    padding:0 15px;
    border:0;
    border-radius:0 0 0 28px;
    box-shadow:none;
    background:#fff;
}
.member-viewer-panel .stream-chat-form input:focus{
    border:0;
    box-shadow:inset 0 0 0 2px rgba(207,96,120,.22);
}
.member-viewer-panel .stream-chat-form button{
    min-width:92px;
    margin:0;
    border-radius:0 0 28px 0;
}
.member-viewer-panel .stream-chat-feedback:empty{
    display:none;
}
.member-viewer-panel .stream-chat-feedback:not(:empty){
    margin:0;
    padding:6px 12px 9px;
    border-top:1px solid #f0d6dc;
    background:#fff;
}
@media(max-width:760px){
    .member-viewer-panel{padding:0!important;border-radius:22px}
    .member-viewer-panel .stream-heading{border-radius:21px 21px 0 0!important;margin:0!important}
    .member-viewer-panel .stream-chat-panel{border-radius:0 0 21px 21px!important}
    .member-viewer-panel .stream-chat-form input{border-radius:0 0 0 20px}
    .member-viewer-panel .stream-chat-form button{border-radius:0 0 20px 0}
}
@media(max-width:520px){
    .member-viewer-panel{padding:0!important;border-radius:18px}
    .member-viewer-panel .stream-heading{border-radius:17px 17px 0 0!important;margin:0!important}
    .member-viewer-panel .stream-chat-panel{border-radius:0 0 17px 17px!important}
    .member-viewer-panel .stream-chat-messages{height:190px;padding:9px 10px}
    .member-viewer-panel .stream-chat-form{grid-template-columns:minmax(0,1fr) 76px}
    .member-viewer-panel .stream-chat-form input{border-radius:0 0 0 16px;padding:0 11px}
    .member-viewer-panel .stream-chat-form button{min-width:0;border-radius:0 0 16px 0;padding-left:8px;padding-right:8px}
}


/* Admin stream: mirror the clean connected Member stream theme. */
.admin-viewer-panel{
    width:min(940px,100%);
    margin:0 auto;
    padding:0!important;
    overflow:hidden;
    border:1px solid #edc8d1;
    border-radius:30px;
    background:#fff;
    box-shadow:0 18px 42px rgba(102,48,65,.11);
}
.admin-viewer-panel .stream-heading{
    width:100%;
    margin:0!important;
    padding:14px 18px;
    border:0;
    border-bottom:1px solid #edc8d1;
    border-radius:29px 29px 0 0!important;
    box-shadow:none;
    background:#fff;
}
.admin-viewer-panel .stream-heading-status-only .live-badge{margin-left:auto}
.admin-viewer-panel .stream-error.show{
    margin:0;
    border-radius:0;
}
.admin-viewer-panel .stream-title-editor{
    gap:6px;
    margin:0;
    padding:13px 16px;
    border-bottom:1px solid #edc8d1;
    background:#fff;
}
.admin-viewer-panel .stream-title-editor label{
    margin:0;
    color:#7f5965;
}
.admin-viewer-panel .stream-title-editor input{
    min-height:44px;
    border:1px solid #ead0d6;
    border-radius:10px;
    box-shadow:none;
    background:#fff;
    font-size:18px;
}
.admin-viewer-panel .video-frame{
    width:100%;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
}
.admin-viewer-panel .video-frame:after,
.admin-viewer-panel .video-frame video,
.admin-viewer-panel .video-placeholder{
    border-radius:0!important;
}
.admin-viewer-panel .stream-controls{
    display:flex;
    align-items:center;
    gap:8px;
    margin:0;
    padding:12px 14px;
    border-top:1px solid #edc8d1;
    border-bottom:1px solid #edc8d1;
    background:#fff;
}
.admin-viewer-panel .stream-start-group{
    gap:8px;
    margin:0;
}
.admin-viewer-panel .stream-controls button,
.admin-viewer-panel .stream-countdown-input{
    min-height:42px;
    border-radius:10px;
    box-shadow:none;
}
.admin-viewer-panel .stream-countdown-input{
    border-color:#ead0d6;
    background:#fff9fb;
}
.admin-viewer-panel .stream-countdown-input input{
    border-color:#ead0d6;
    border-radius:8px;
    box-shadow:none;
}
.admin-viewer-panel .stream-chat-panel{
    width:100%;
    margin:0!important;
    padding:0!important;
    overflow:hidden;
    border:0;
    border-radius:0!important;
    box-shadow:none;
    background:#fff;
    backdrop-filter:none;
}
.admin-viewer-panel .stream-chat-head:empty{display:none}
.admin-viewer-panel .stream-chat-head{
    margin:0;
    padding:8px 12px;
    border-bottom:1px solid #f0d6dc;
    background:#fff;
}
.admin-viewer-panel .stream-book-vote{
    margin:0;
    border:0;
    border-bottom:1px solid #f0d6dc;
    border-radius:0;
}
.admin-viewer-panel .stream-chat-messages{
    height:230px;
    margin:0;
    padding:11px 13px;
    border:0;
    border-radius:0;
    background:#fff;
}
.admin-viewer-panel .stream-chat-form{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:0;
    margin:0;
    padding:0;
    border-top:1px solid #edc8d1;
    background:#fff;
}
.admin-viewer-panel .stream-chat-form input{
    height:50px;
    margin:0;
    padding:0 15px;
    border:0;
    border-radius:0;
    box-shadow:none;
    background:#fff;
}
.admin-viewer-panel .stream-chat-form input:focus{
    border:0;
    box-shadow:inset 0 0 0 2px rgba(207,96,120,.18);
}
.admin-viewer-panel .stream-chat-form button{
    min-width:92px;
    margin:0;
    border-radius:0;
}
.admin-viewer-panel .stream-chat-feedback:empty{display:none}
.admin-viewer-panel .stream-chat-feedback:not(:empty){
    margin:0;
    padding:6px 12px 9px;
    border-top:1px solid #f0d6dc;
    background:#fff;
}
.admin-viewer-panel .admin-stream-recordings{
    margin:0;
    padding:14px;
    border:0;
    border-top:1px solid #edc8d1;
    border-radius:0 0 29px 29px;
    background:#fff;
}
@media(max-width:760px){
    .admin-viewer-panel{border-radius:22px}
    .admin-viewer-panel .stream-heading{border-radius:21px 21px 0 0!important}
    .admin-viewer-panel .stream-controls{display:grid;grid-template-columns:1fr 1fr}
    .admin-viewer-panel .stream-start-group{grid-column:1/-1}
    .admin-viewer-panel .admin-stream-recordings{border-radius:0 0 21px 21px}
}
@media(max-width:520px){
    .admin-viewer-panel{border-radius:18px}
    .admin-viewer-panel .stream-heading{border-radius:17px 17px 0 0!important}
    .admin-viewer-panel .stream-title-editor{padding:11px 12px}
    .admin-viewer-panel .stream-controls{grid-template-columns:1fr;padding:10px}
    .admin-viewer-panel .stream-start-group{grid-column:auto}
    .admin-viewer-panel .stream-chat-messages{height:190px;padding:9px 10px}
    .admin-viewer-panel .stream-chat-form{grid-template-columns:minmax(0,1fr) 76px}
    .admin-viewer-panel .stream-chat-form input{padding:0 11px}
    .admin-viewer-panel .stream-chat-form button{min-width:0;padding-left:8px;padding-right:8px}
    .admin-viewer-panel .admin-stream-recordings{border-radius:0 0 17px 17px;padding:10px}
}

/* Member subscription and secure card checkout. */
.subscription-nav-link{position:relative}
.subscription-nav-link .subscription-dot{width:8px;height:8px;border-radius:50%;background:#ffe4eb;box-shadow:0 0 0 3px rgba(255,255,255,.12)}
.subscription-nav-link.subscription-active .subscription-dot{background:#8fe0b7}
.subscription-page{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.62fr);gap:14px;align-items:start}
.subscription-card-panel,.subscription-status-panel{min-width:0}
.subscription-credit-card{position:relative;min-height:255px;border-radius:25px;padding:24px;overflow:hidden;color:#fff;background:linear-gradient(135deg,#8e3e57 0%,#bd6076 48%,#e09aac 100%);box-shadow:0 22px 45px rgba(123,49,69,.22);isolation:isolate}
.subscription-credit-card::before,.subscription-credit-card::after{content:"";position:absolute;border-radius:50%;z-index:-1;background:rgba(255,255,255,.12)}
.subscription-credit-card::before{width:220px;height:220px;right:-80px;top:-90px}.subscription-credit-card::after{width:170px;height:170px;left:-75px;bottom:-85px}
.subscription-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.subscription-card-chip{width:46px;height:35px;border-radius:9px;background:linear-gradient(135deg,#f4dfaa,#c7a963);box-shadow:inset 0 0 0 1px rgba(83,54,16,.18)}
.subscription-card-brand{font-weight:900;letter-spacing:.08em;font-size:12px;text-transform:uppercase}
.subscription-card-price{margin-top:40px;font-size:clamp(36px,5vw,52px);font-weight:950;letter-spacing:-.045em;line-height:1}.subscription-card-period{margin-top:8px;font-size:14px;font-weight:800;color:rgba(255,255,255,.82)}
.subscription-card-number{margin-top:34px;font:800 18px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.16em}.subscription-card-footer{display:flex;justify-content:space-between;gap:16px;margin-top:18px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.78)}
.subscription-benefits{display:grid;gap:9px;margin:16px 0}.subscription-benefit{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border:1px solid #f0d4dc;border-radius:13px;background:#fff9fb}.subscription-benefit b{color:#a94860}
.subscription-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}.subscription-actions form{margin:0}.subscription-actions button{min-height:44px}
.subscription-checkout-status{margin-top:10px;padding:10px 12px;border:1px solid #cfe5d9;border-radius:12px;background:#eef8f2;color:#2d6848;font-size:12px;font-weight:800;line-height:1.45;overflow-wrap:anywhere}.subscription-checkout-status.is-error{border-color:#f0c6ce;background:#fff0f3;color:#9d3048}.subscription-checkout-status[hidden]{display:none!important}
.subscription-status-badge{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:8px 11px;font-size:12px;font-weight:900;background:#f5e8ed;color:#9d4059}.subscription-status-badge.active{background:#e2f5ea;color:#237449}.subscription-status-badge.warning{background:#fff2d8;color:#90610b}
.subscription-detail-list{display:grid;gap:0;margin-top:12px;border-top:1px solid #f0d9df}.subscription-detail-row{display:flex;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid #f0d9df}.subscription-detail-row span{color:var(--muted);font-size:12px}.subscription-detail-row strong{text-align:right;font-size:12px;overflow-wrap:anywhere}
.subscription-setup-note{margin-top:13px;padding:12px 13px;border-radius:13px;background:#fff3d8;color:#795711;font-size:12px;line-height:1.5;border:1px solid #efd7a7}
.settings-subscription-box{margin:18px 0;padding:16px;border:1px solid #efcbd4;border-radius:16px;background:#fff8fa}.settings-subscription-box .panel-head{margin-bottom:12px}.subscription-settings-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.55fr);gap:10px}.subscription-enable{display:flex;align-items:center;gap:9px;margin:8px 0 14px;font-weight:800}.subscription-enable input{width:18px;height:18px;accent-color:#c45f76}.stripe-connection{display:inline-flex;align-items:center;gap:7px;margin-top:8px;padding:8px 10px;border-radius:999px;font-size:11px;font-weight:850;background:#f5e8ed;color:#9d4059}.stripe-connection.connected{background:#e2f5ea;color:#237449}
@media(max-width:900px){.subscription-page{grid-template-columns:1fr}.subscription-settings-row{grid-template-columns:1fr}}
@media(max-width:520px){.subscription-credit-card{min-height:220px;padding:19px}.subscription-card-price{margin-top:30px}.subscription-card-number{font-size:15px;letter-spacing:.11em}.subscription-actions{display:grid}.subscription-actions form,.subscription-actions button{width:100%}.sidebar .mobile-menu.has-subscribe{grid-template-columns:repeat(4,minmax(0,1fr))!important}.sidebar .mobile-menu.has-subscribe.has-vids{grid-template-columns:repeat(5,minmax(0,1fr))!important}}


/* Registered Accounts page: stacked panels with a footer-height scroll list. */
.members-grid.members-page-stack{
    display:flex;
    flex-direction:column;
    gap:12px;
    height:calc(100vh - 104px);
    height:calc(100dvh - 104px);
    min-height:560px;
    overflow:hidden;
}
.members-page-stack>.panel+.panel{margin-top:0}
.create-account-panel{flex:0 0 auto}
.registered-accounts-panel{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}
.registered-accounts-panel .panel-head{flex:0 0 auto}
.account-search-box{flex:0 0 auto;margin:0 0 10px}
.account-search-box input{
    width:100%;
    min-height:44px;
    border:1px solid #eecbd4;
    border-radius:12px;
    padding:10px 13px;
    background:#fffafb;
    color:#512c37;
    outline:none;
}
.account-search-box input:focus{border-color:#d86d83;box-shadow:0 0 0 4px rgba(216,109,131,.13)}
.registered-accounts-panel .member-list{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    align-content:start;
    padding-right:5px;
    scrollbar-gutter:stable;
}
.registered-accounts-panel .member-list::-webkit-scrollbar{width:8px}
.registered-accounts-panel .member-list::-webkit-scrollbar-thumb{background:#e2b5c0;border-radius:999px}
.registered-accounts-panel .member-list::-webkit-scrollbar-track{background:#fff2f5;border-radius:999px}
.account-search-empty{padding:18px;border:1px dashed #e6b9c4;border-radius:12px;background:#fff8fa;color:#8c5966;text-align:center;font-size:13px;font-weight:750}
.member-info .account-subscription-renewal{margin-top:5px;color:#9a5264;font-size:11px;font-weight:750}
.member-info .account-subscription-renewal b{display:inline;font-variant-numeric:tabular-nums;color:#6f3343;font-size:11px}
.account-type-control{display:grid;grid-template-columns:auto minmax(92px,118px);align-items:center;gap:4px 7px;min-width:0;margin:0;padding:0}
.account-type-control>span{font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:#8b5a67;white-space:nowrap}
.account-type-select{width:118px;min-width:92px;min-height:40px;padding:7px 28px 7px 9px;border:1px solid #e6c8d0;border-radius:9px;background:#fff;color:#4c2e37;font:inherit;font-size:12px;font-weight:850;cursor:pointer}
.account-type-select:focus{outline:none;border-color:#d86d83;box-shadow:0 0 0 3px rgba(216,109,131,.12)}
.account-type-select[disabled]{cursor:wait;opacity:.65}
.account-type-save-status{grid-column:1/-1;min-height:12px;font-size:10px;font-weight:800;color:#8f5b68;line-height:1.2}
.account-type-save-status.is-error{color:#a93043}
.account-presence{display:inline-flex;align-items:center;gap:6px;margin-left:8px;padding:3px 8px;border:1px solid rgba(111,79,88,.14);border-radius:999px;background:#fff;font-size:10px;font-weight:900;line-height:1;white-space:nowrap;vertical-align:middle;color:#8d5966}
.account-presence-dot{display:block;width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#d64b55;box-shadow:0 0 0 2px rgba(214,75,85,.12)}
.account-presence.is-online{color:#28764a;border-color:rgba(40,118,74,.18);background:#f6fff9}
.account-presence.is-online .account-presence-dot{background:#2eaa61;box-shadow:0 0 0 2px rgba(46,170,97,.14)}
.account-presence-label{display:inline-block;min-width:34px;text-align:left}
@media(max-width:900px){
    .members-grid.members-page-stack{height:auto;min-height:0;overflow:visible}
    .registered-accounts-panel{overflow:visible}
    .registered-accounts-panel .member-list{min-height:260px;max-height:55vh;max-height:55dvh}
}
@media(max-width:520px){
    .account-search-box input{min-height:46px;font-size:16px}
    .registered-accounts-panel .member-list{max-height:58vh;max-height:58dvh}
}

/* source-style-2 */
/* Role-based chat layout: Admin left, Members right. */
.stream-chat-messages .stream-chat-message.admin-message{
    align-self:flex-start!important;
    margin-left:0!important;
    margin-right:auto!important;
    text-align:left!important;
}
.stream-chat-messages .stream-chat-message:not(.admin-message){
    align-self:flex-end!important;
    margin-left:auto!important;
    margin-right:0!important;
    text-align:right!important;
}
.stream-chat-messages .stream-chat-message.admin-message .stream-chat-message-line{
    flex-direction:row!important;
    justify-content:flex-start!important;
    text-align:left!important;
}
.stream-chat-messages .stream-chat-message:not(.admin-message) .stream-chat-message-line{
    flex-direction:row-reverse!important;
    justify-content:flex-start!important;
    text-align:right!important;
}

/* source-style-3 */
/* Member sidebar stability: keep the left column identical while only the
   workspace view changes. This block lives in <head> so it is applied before
   the sidebar is first painted. */
.sidebar,
.sidebar *,
.sidebar *::before,
.sidebar *::after{
    animation:none!important;
    transition:none!important;
}
.sidebar .side-brand,
.sidebar .nav,
.sidebar .sidebar-bottom,
.sidebar .user-card,
.sidebar-subscription-renewal{
    transform:none!important;
}
.sidebar-subscription-renewal b,
.mobile-subscription-renewal b{
    display:inline-block!important;
    min-width:118px!important;
    text-align:right!important;
    font-variant-numeric:tabular-nums!important;
    font-feature-settings:"tnum" 1!important;
}
@media(min-width:761px){
    .sidebar{
        position:sticky!important;
        top:0!important;
        height:100vh!important;
        height:100dvh!important;
        min-height:100vh!important;
        min-height:100dvh!important;
        overflow:hidden!important;
        scrollbar-gutter:stable!important;
    }
    .sidebar .side-brand{
        flex:0 0 64px!important;
        min-height:64px!important;
        max-height:64px!important;
        width:100%!important;
        overflow:hidden!important;
    }
    .sidebar .side-brand .brand-mark{
        flex:0 0 42px!important;
        width:42px!important;
        height:42px!important;
    }
    .sidebar .side-brand>div:last-child{
        min-width:0!important;
        overflow:hidden!important;
    }
    .sidebar .side-brand strong{
        display:-webkit-box!important;
        -webkit-box-orient:vertical!important;
        -webkit-line-clamp:2!important;
        overflow:hidden!important;
        line-height:1.15!important;
    }
    .sidebar .nav{
        flex:0 0 auto!important;
        width:100%!important;
        min-height:0!important;
        overflow:visible!important;
    }
    .sidebar .nav a{
        flex:0 0 auto!important;
        width:100%!important;
        min-height:48px!important;
        max-height:58px!important;
        margin:0!important;
        line-height:1.2!important;
        overflow:hidden!important;
    }
    .sidebar .nav-icon{
        flex:0 0 28px!important;
        width:28px!important;
        min-width:28px!important;
    }
    .sidebar .sidebar-bottom{
        flex:0 0 auto!important;
        width:100%!important;
        min-height:145px!important;
        margin-top:auto!important;
        overflow:hidden!important;
    }
    .sidebar .user-card{
        min-height:62px!important;
        max-height:72px!important;
        overflow:hidden!important;
    }
    .sidebar-subscription-renewal{
        min-height:46px!important;
        max-height:52px!important;
        display:flex!important;
        align-items:center!important;
        justify-content:space-between!important;
        gap:8px!important;
        overflow:hidden!important;
    }
    /* The recordings library is stream-specific content. Keeping it out of the
       desktop sidebar prevents the whole left panel from changing size between
       Member views. */
    .sidebar .member-sidebar-recordings{
        display:none!important;
        flex:0 0 0!important;
        width:0!important;
        height:0!important;
        min-height:0!important;
        max-height:0!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
        overflow:hidden!important;
    }
}

/* source-style-4 */
/* Keep Member chat messages simple: Name | time | message. */
.member-viewer-panel .stream-chat-messages{
    background:#fff!important;
    background-image:none!important;
    border:0!important;
    box-shadow:none!important;
    padding:10px 12px!important;
    gap:0!important;
}
.member-viewer-panel .stream-chat-message,
.member-viewer-panel .stream-chat-message.mine,
.member-viewer-panel .stream-chat-message.admin-message,
.member-viewer-panel .stream-chat-message:nth-child(even){
    align-self:stretch!important;
    width:100%!important;
    max-width:none!important;
    display:grid!important;
    grid-template-columns:minmax(90px,auto) auto minmax(0,1fr)!important;
    align-items:center!important;
    column-gap:12px!important;
    margin:0!important;
    padding:9px 28px 9px 2px!important;
    border:0!important;
    border-bottom:1px solid #eee!important;
    border-radius:0!important;
    background:#fff!important;
    background-image:none!important;
    box-shadow:none!important;
    color:#333!important;
}
.member-viewer-panel .stream-chat-message:last-child{border-bottom:0!important}
.member-viewer-panel .stream-chat-message::before,
.member-viewer-panel .stream-chat-message::after{content:none!important;display:none!important}
.member-viewer-panel .stream-chat-message-head{
    display:contents!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:none!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-message-head strong{
    grid-column:1!important;
    color:#222!important;
    font-size:13px!important;
    font-weight:700!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
}
.member-viewer-panel .stream-chat-message-head time{
    grid-column:2!important;
    color:#888!important;
    font-size:12px!important;
    font-weight:500!important;
    white-space:nowrap!important;
}
.member-viewer-panel .stream-chat-message p{
    grid-column:3!important;
    margin:0!important;
    color:#333!important;
    font-size:13px!important;
    line-height:1.35!important;
    white-space:pre-wrap!important;
    overflow-wrap:anywhere!important;
}
.member-viewer-panel .stream-chat-delete{
    position:absolute!important;
    right:4px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
}
@media(max-width:600px){
    .member-viewer-panel .stream-chat-message,
    .member-viewer-panel .stream-chat-message.mine,
    .member-viewer-panel .stream-chat-message.admin-message{
        grid-template-columns:minmax(72px,auto) auto minmax(0,1fr)!important;
        column-gap:7px!important;
        padding-right:24px!important;
    }
    .member-viewer-panel .stream-chat-message-head strong,
    .member-viewer-panel .stream-chat-message p{font-size:12px!important}
    .member-viewer-panel .stream-chat-message-head time{font-size:11px!important}
}

/* source-style-5 */
/* Member Stream: solid 4D hardback-book cover treatment. */
.member-viewer-panel{
    border:3px solid #b85b73!important;
    background:#e99aae!important;
    box-shadow:
        0 5px 0 #c96e85,
        0 10px 0 #aa5068,
        0 18px 28px rgba(91,37,55,.28),
        inset 7px 0 0 #b9546d,
        inset -5px 0 0 #f5c5d0!important;
}
.member-viewer-panel::before{
    content:""!important;
    position:absolute!important;
    z-index:2!important;
    top:12px!important;
    bottom:12px!important;
    left:8px!important;
    width:8px!important;
    height:auto!important;
    border-radius:5px!important;
    background:#9e4059!important;
    box-shadow:4px 0 0 #d98298,7px 0 0 #f7ccd6!important;
    pointer-events:none;
}
.member-viewer-panel::after{
    content:""!important;
    position:absolute!important;
    z-index:2!important;
    inset:8px!important;
    width:auto!important;
    height:auto!important;
    border:2px solid rgba(255,255,255,.72)!important;
    border-radius:22px!important;
    background:transparent!important;
    box-shadow:inset 0 0 0 2px rgba(153,63,85,.18)!important;
    pointer-events:none;
}
.member-viewer-panel .stream-heading{
    position:relative;
    padding-left:28px!important;
    border-bottom:3px solid #bd6077!important;
    background:#fff5f7!important;
    box-shadow:
        inset 0 -5px 0 #f3c6d1,
        inset 0 4px 0 #ffffff!important;
}
.member-viewer-panel .stream-heading::before{
    content:"";
    position:absolute;
    left:25px;
    top:9px;
    bottom:9px;
    width:5px;
    border-radius:4px;
    background:#cf7188;
    box-shadow:5px 0 0 #f1bdc9;
}
.member-viewer-panel .live-badge{
    border:2px solid #a84a62!important;
    background:#f3b6c5!important;
    color:#6b263a!important;
    box-shadow:inset 0 3px 0 rgba(255,255,255,.7),0 4px 0 #a84a62!important;
}
.member-viewer-panel .live-badge.live{
    border-color:#8d334a!important;
    background:#ef6d8c!important;
    color:#fff!important;
    box-shadow:inset 0 3px 0 rgba(255,255,255,.28),0 4px 0 #8d334a!important;
}
.member-viewer-panel .video-frame{
    position:relative;
    border-left:14px solid #ad4d65!important;
    border-right:8px solid #d77d92!important;
    border-top:8px solid #f5c4cf!important;
    border-bottom:9px solid #9e4058!important;
    background:#2a1720!important;
    box-shadow:
        inset 0 0 0 4px #fff1f4,
        inset 0 0 0 7px #be657c!important;
}
.member-viewer-panel .video-frame::before{
    content:"";
    position:absolute;
    z-index:4;
    top:18px;
    bottom:18px;
    left:-10px;
    width:5px;
    border-radius:4px;
    background:#7f3047;
    box-shadow:5px 0 0 #e49bae;
    pointer-events:none;
}
.member-viewer-panel .stream-chat-panel{
    position:relative;
    border-top:3px solid #9f4058!important;
    background:#f8cad5!important;
    box-shadow:
        inset 10px 0 0 #b6536b,
        inset -6px 0 0 #fbe2e8,
        inset 0 -7px 0 #c76d83!important;
}
.member-viewer-panel .stream-chat-head{
    padding-left:27px!important;
    border-bottom:3px solid #d9879a!important;
    background:#fff6f8!important;
    box-shadow:inset 0 -4px 0 #efbfca!important;
}
.member-viewer-panel .stream-chat-messages{
    padding:14px 16px 16px 28px!important;
    background:#f9e3e8!important;
    box-shadow:
        inset 9px 0 0 #c56a80,
        inset -5px 0 0 #fff,
        inset 0 5px 0 #e5a6b5!important;
}
.member-viewer-panel .stream-chat-message{
    position:relative;
    margin:0 0 10px!important;
    padding:10px 12px 10px 16px!important;
    border:2px solid #bd6077!important;
    border-left:9px solid #934057!important;
    border-radius:5px 11px 11px 5px!important;
    background:#fff8fa!important;
    box-shadow:
        3px 3px 0 #d88498,
        6px 6px 0 rgba(143,57,79,.20)!important;
}
.member-viewer-panel .stream-chat-message:nth-child(even){
    border-color:#d18598!important;
    border-left-color:#c26079!important;
    background:#f5c8d3!important;
}
.member-viewer-panel .stream-chat-message::before{
    content:"";
    position:absolute;
    left:4px;
    top:5px;
    bottom:5px;
    width:2px;
    background:rgba(255,255,255,.82);
}
.member-viewer-panel .stream-chat-message-head{
    padding-bottom:4px;
    border-bottom:2px solid rgba(161,65,89,.18);
}
.member-viewer-panel .stream-chat-form{
    border-top:4px solid #9f4058!important;
    background:#c86f85!important;
    box-shadow:inset 0 5px 0 #efb2c1!important;
}
.member-viewer-panel .stream-chat-form input{
    border-right:3px solid #9f4058!important;
    background:#fff7f9!important;
    box-shadow:inset 7px 0 0 #efb3c2,inset 0 4px 0 #fff!important;
}
.member-viewer-panel .stream-chat-form button{
    border:0!important;
    border-left:3px solid #f2b4c3!important;
    background:#b94f69!important;
    color:#fff!important;
    box-shadow:inset 0 4px 0 #e69aab,inset -5px 0 0 #8f354d!important;
}
.member-viewer-panel .stream-chat-form button:hover{
    background:#a9425b!important;
}
.member-viewer-panel .stream-book-vote{
    border-bottom:3px solid #a94b63!important;
    background:#f3c3cf!important;
    box-shadow:inset 8px 0 0 #b6536b,inset -5px 0 0 #fff0f4!important;
}
@media(max-width:760px){
    .member-viewer-panel{border-width:2px!important;box-shadow:0 4px 0 #c96e85,0 8px 0 #aa5068,0 14px 22px rgba(91,37,55,.24),inset 5px 0 0 #b9546d,inset -4px 0 0 #f5c5d0!important}
    .member-viewer-panel::after{inset:6px!important;border-radius:17px!important}
    .member-viewer-panel .stream-chat-messages{padding-left:23px!important}
}

/* source-style-6 */
/* Member Stream: solid faceted tile patterns for a deeper stacked 4D/block look. */
.member-viewer-panel{
    border:1px solid #e7aebe!important;
    background:
        linear-gradient(135deg,rgba(255,255,255,.96) 0 23%,transparent 23% 50%,rgba(235,169,188,.22) 50% 73%,transparent 73%) 0 0/34px 34px,
        linear-gradient(45deg,rgba(255,220,230,.58) 0 24%,transparent 24% 50%,rgba(255,255,255,.82) 50% 74%,transparent 74%) 17px 17px/34px 34px,
        #f9dfe7!important;
    box-shadow:
        0 18px 0 rgba(169,77,100,.16),
        0 26px 46px rgba(91,40,56,.22),
        inset 0 2px 0 rgba(255,255,255,.98),
        inset -2px -2px 0 rgba(190,112,134,.22)!important;
}
.member-viewer-panel .stream-heading{
    position:relative;
    background:
        linear-gradient(135deg,rgba(255,255,255,.98) 0 25%,transparent 25% 50%,rgba(239,190,202,.42) 50% 75%,transparent 75%) 0 0/30px 30px,
        linear-gradient(45deg,#fff9fb 0 25%,#f8dbe4 25% 50%,#fff 50% 75%,#f1c8d4 75%) 0 0/30px 30px!important;
    border-bottom:2px solid #d997aa!important;
    box-shadow:
        inset 0 3px 0 rgba(255,255,255,.98),
        inset 0 -5px 0 rgba(188,104,128,.16),
        inset -3px 0 0 rgba(188,104,128,.12)!important;
}
.member-viewer-panel .stream-heading::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:repeating-linear-gradient(90deg,transparent 0 28px,rgba(164,78,101,.10) 28px 30px);
}
.member-viewer-panel .live-badge{
    position:relative;
    z-index:1;
    border:1px solid #d997aa;
    background:linear-gradient(145deg,#fff 0 48%,#f5ccd8 49% 100%)!important;
    box-shadow:
        3px 4px 0 rgba(156,74,96,.22),
        inset 2px 2px 0 rgba(255,255,255,.98),
        inset -2px -2px 0 rgba(178,88,113,.16)!important;
}
.member-viewer-panel .live-badge.live{
    background:linear-gradient(145deg,#fff0f4 0 48%,#f4b6c6 49% 100%)!important;
}
.member-viewer-panel .video-frame{
    position:relative;
    outline:0;
    box-shadow:
        inset 0 4px 0 rgba(255,255,255,.34),
        inset 0 -7px 0 rgba(63,21,34,.34),
        inset 5px 0 0 rgba(255,220,230,.16),
        inset -5px 0 0 rgba(79,28,43,.24)!important;
}
.member-viewer-panel .video-frame::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:3;
    pointer-events:none;
    border-top:5px solid rgba(255,235,241,.60);
    border-left:5px solid rgba(255,223,232,.34);
    border-right:5px solid rgba(101,45,62,.20);
    border-bottom:6px solid rgba(74,29,43,.28);
}
.member-viewer-panel .stream-chat-panel{
    background:
        linear-gradient(135deg,rgba(255,255,255,.95) 0 25%,transparent 25% 50%,rgba(239,190,202,.34) 50% 75%,transparent 75%) 0 0/32px 32px,
        #fff5f8!important;
    box-shadow:
        inset 0 3px 0 rgba(255,255,255,.96),
        inset 0 -5px 0 rgba(178,91,116,.12)!important;
}
.member-viewer-panel .stream-chat-head{
    background:
        linear-gradient(135deg,#fff 0 25%,#f7d7e0 25% 50%,#fff8fa 50% 75%,#edc0ce 75%) 0 0/28px 28px!important;
    border-bottom:2px solid #dfa5b5!important;
    box-shadow:inset 0 3px 0 rgba(255,255,255,.98),inset 0 -4px 0 rgba(177,89,113,.14);
}
.member-viewer-panel .stream-chat-messages{
    background:
        linear-gradient(135deg,rgba(255,255,255,.96) 0 25%,rgba(250,226,233,.82) 25% 50%,rgba(255,248,250,.98) 50% 75%,rgba(243,207,217,.72) 75%) 0 0/36px 36px!important;
    box-shadow:
        inset 0 4px 7px rgba(151,71,94,.10),
        inset 0 -4px 7px rgba(255,255,255,.84)!important;
}
.member-viewer-panel .stream-chat-message{
    border:1px solid rgba(214,147,165,.62);
    background:linear-gradient(145deg,rgba(255,255,255,.96) 0 48%,rgba(249,222,230,.94) 49% 100%);
    box-shadow:
        3px 4px 0 rgba(166,78,102,.14),
        inset 2px 2px 0 rgba(255,255,255,.98),
        inset -2px -2px 0 rgba(190,111,133,.12);
}
.member-viewer-panel .stream-chat-form{
    position:relative;
    border-top:2px solid #dfa5b5!important;
    background:
        linear-gradient(135deg,#fff 0 25%,#f8dce4 25% 50%,#fff9fb 50% 75%,#efc6d2 75%) 0 0/30px 30px!important;
    box-shadow:inset 0 3px 0 rgba(255,255,255,.98),inset 0 -5px 0 rgba(176,88,112,.13);
}
.member-viewer-panel .stream-chat-form input{
    background:rgba(255,255,255,.88)!important;
    box-shadow:inset 3px 3px 5px rgba(139,65,85,.11),inset -2px -2px 0 rgba(255,255,255,.95)!important;
}
.member-viewer-panel .stream-chat-form button{
    border-left:1px solid #d99aaa!important;
    box-shadow:
        inset 3px 3px 0 rgba(255,255,255,.22),
        inset -3px -3px 0 rgba(117,43,62,.18)!important;
}
@media(max-width:760px){
    .member-viewer-panel{
        box-shadow:0 10px 0 rgba(169,77,100,.14),0 18px 30px rgba(91,40,56,.18),inset 0 2px 0 #fff!important;
    }
    .member-viewer-panel .stream-heading,
    .member-viewer-panel .stream-chat-head,
    .member-viewer-panel .stream-chat-form{background-size:24px 24px!important}
    .member-viewer-panel .stream-chat-messages{background-size:30px 30px!important}
}

/* source-style-7 */
/* Strong solid faceted depth for the connected Member Stream interface. */
.member-viewer-panel .stream-heading,
.member-viewer-panel .stream-chat-head,
.member-viewer-panel .stream-chat-form,
.member-viewer-panel .stream-book-vote{
    isolation:isolate;
    overflow:hidden;
}
.member-viewer-panel .stream-heading::after,
.member-viewer-panel .stream-chat-head::after,
.member-viewer-panel .stream-chat-form::after,
.member-viewer-panel .stream-book-vote::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background:
        linear-gradient(135deg,transparent 0 48%,rgba(140,52,78,.22) 49% 52%,transparent 53% 100%) 0 0/28px 28px,
        linear-gradient(45deg,rgba(255,255,255,.72) 0 24%,transparent 25% 74%,rgba(177,74,102,.18) 75% 100%) 0 0/28px 28px;
    opacity:.75;
}
.member-viewer-panel .stream-heading{
    background:#ffdbe5!important;
    border-top:3px solid #fff!important;
    border-left:3px solid #f6b9c8!important;
    border-right:3px solid #a84460!important;
    border-bottom:5px solid #91384f!important;
}
.member-viewer-panel .stream-chat-panel{
    background:#f4b9c8!important;
    border-left:5px solid #ffdce5!important;
    border-right:6px solid #a94460!important;
    border-bottom:7px solid #8d354d!important;
}
.member-viewer-panel .stream-chat-head{
    position:relative;
    background:#ffe7ed!important;
    border-top:3px solid #fff!important;
    border-bottom:5px solid #bb5d75!important;
}
.member-viewer-panel .stream-chat-messages{
    position:relative;
    background-color:#f9d5df!important;
    background-image:
        linear-gradient(45deg,rgba(255,255,255,.76) 25%,transparent 25%,transparent 75%,rgba(167,67,95,.16) 75%),
        linear-gradient(45deg,rgba(255,255,255,.5) 25%,transparent 25%,transparent 75%,rgba(167,67,95,.12) 75%)!important;
    background-position:0 0,18px 18px!important;
    background-size:36px 36px!important;
    border-left:5px solid #fff1f5!important;
    border-right:5px solid #ad4965!important;
    box-shadow:
        inset 0 6px 0 #d98aa0,
        inset 0 -7px 0 #9b3d57,
        inset 7px 0 0 rgba(255,255,255,.48),
        inset -7px 0 0 rgba(124,45,68,.16)!important;
}
.member-viewer-panel .stream-chat-message{
    background-color:#fff7f9!important;
    background-image:
        linear-gradient(135deg,rgba(255,255,255,.96) 0 47%,rgba(237,181,195,.34) 48% 52%,transparent 53%),
        linear-gradient(45deg,transparent 0 72%,rgba(159,62,89,.11) 73% 100%)!important;
    border-top:3px solid #fff!important;
    border-left:8px solid #99405a!important;
    border-right:3px solid #bd6078!important;
    border-bottom:5px solid #a44862!important;
    box-shadow:5px 6px 0 rgba(119,42,64,.22)!important;
}
.member-viewer-panel .stream-chat-message.mine{
    background-color:#f5bfd0!important;
    background-image:
        linear-gradient(135deg,rgba(255,255,255,.55) 0 47%,rgba(182,78,108,.20) 48% 52%,transparent 53%),
        linear-gradient(45deg,transparent 0 72%,rgba(126,42,67,.14) 73% 100%)!important;
}
.member-viewer-panel .stream-chat-form{
    position:relative;
    background:#d97f96!important;
    border-top:5px solid #f7bdcb!important;
    border-bottom:6px solid #8e344d!important;
}
.member-viewer-panel .stream-chat-form input{
    border-top:3px solid #fff!important;
    border-left:4px solid #f5bfcc!important;
    border-right:4px solid #a84360!important;
    border-bottom:5px solid #8f354d!important;
    background:#fff4f7!important;
    box-shadow:inset 4px 4px 0 rgba(218,129,151,.18)!important;
}
.member-viewer-panel .stream-chat-form button{
    border-top:3px solid #ef9fb3!important;
    border-right:4px solid #7f2c44!important;
    border-bottom:5px solid #74243c!important;
    background:#b94d68!important;
    box-shadow:inset 3px 3px 0 rgba(255,255,255,.24)!important;
}
.member-viewer-panel .video-frame{
    border-top:12px solid #ffd5df!important;
    border-left:16px solid #b84f6a!important;
    border-right:10px solid #8c334c!important;
    border-bottom:14px solid #74263e!important;
    box-shadow:
        7px 9px 0 #c56880,
        13px 16px 0 rgba(107,34,57,.22),
        inset 0 0 0 5px #fff0f4!important;
}
.member-viewer-panel .video-frame::after{
    border-radius:0!important;
    box-shadow:
        inset 6px 6px 0 rgba(255,255,255,.24),
        inset -7px -7px 0 rgba(0,0,0,.26)!important;
}
.member-viewer-panel .live-badge{
    border-top:3px solid #fff!important;
    border-left:3px solid #f6b6c6!important;
    border-right:4px solid #9c3e58!important;
    border-bottom:5px solid #843148!important;
    border-radius:8px!important;
}
@media(max-width:760px){
    .member-viewer-panel .stream-heading::after,
    .member-viewer-panel .stream-chat-head::after,
    .member-viewer-panel .stream-chat-form::after,
    .member-viewer-panel .stream-book-vote::after{background-size:22px 22px,22px 22px}
    .member-viewer-panel .stream-chat-messages{background-size:28px 28px!important;background-position:0 0,14px 14px!important}
    .member-viewer-panel .video-frame{border-left-width:10px!important;border-right-width:7px!important;border-top-width:8px!important;border-bottom-width:10px!important;box-shadow:5px 6px 0 #c56880,9px 11px 0 rgba(107,34,57,.20),inset 0 0 0 4px #fff0f4!important}
}

/* source-style-8 */
/* Keep the solid dimensional styling, but remove decorative overlay line layers. */
.member-viewer-panel::before,
.member-viewer-panel::after,
.member-viewer-panel .stream-heading::before,
.member-viewer-panel .stream-heading::after,
.member-viewer-panel .video-frame::before,
.member-viewer-panel .video-frame::after,
.member-viewer-panel .stream-chat-head::after,
.member-viewer-panel .stream-chat-form::after,
.member-viewer-panel .stream-book-vote::after,
.member-viewer-panel .stream-chat-message::before{
    content:none!important;
    display:none!important;
}
.member-viewer-panel{
    outline:0!important;
}
.member-viewer-panel .stream-heading,
.member-viewer-panel .video-frame,
.member-viewer-panel .stream-chat-panel,
.member-viewer-panel .stream-chat-head,
.member-viewer-panel .stream-chat-messages,
.member-viewer-panel .stream-chat-form{
    outline:0!important;
}

/* source-style-9 */
.member-viewer-panel .stream-chat-panel,
.member-viewer-panel .stream-chat-head,
.member-viewer-panel .stream-chat-messages,
.member-viewer-panel .stream-chat-form{
    background:#fff!important;
}
.member-viewer-panel .stream-chat-form input{
    background:#fff!important;
}

/* source-style-10 */
/* Plain Member chat rows: Name: message */
.member-viewer-panel .stream-chat-messages{
    background:#fff!important;
    background-image:none!important;
    border:0!important;
    box-shadow:none!important;
    padding:10px 12px!important;
    gap:0!important;
}
.member-viewer-panel .stream-chat-message,
.member-viewer-panel .stream-chat-message.mine,
.member-viewer-panel .stream-chat-message.admin-message,
.member-viewer-panel .stream-chat-message:nth-child(even){
    position:relative!important;
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:7px 30px 7px 0!important;
    border:0!important;
    border-bottom:1px solid #eeeeee!important;
    border-radius:0!important;
    background:#fff!important;
    background-image:none!important;
    box-shadow:none!important;
    color:#222!important;
}
.member-viewer-panel .stream-chat-message:last-child{border-bottom:0!important}
.member-viewer-panel .stream-chat-message::before,
.member-viewer-panel .stream-chat-message::after{content:none!important;display:none!important}
.member-viewer-panel .stream-chat-message-line{
    display:block!important;
    margin:0!important;
    padding:0!important;
    color:#222!important;
    font-size:14px!important;
    line-height:1.45!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
}
.member-viewer-panel .stream-chat-message-name{
    color:#222!important;
    font:inherit!important;
    font-weight:700!important;
}
.member-viewer-panel .stream-chat-message-separator,
.member-viewer-panel .stream-chat-message-text{
    color:#222!important;
    font:inherit!important;
}
.member-viewer-panel .stream-chat-message-head,
.member-viewer-panel .stream-chat-message > p,
.member-viewer-panel .stream-chat-message time{display:none!important}
.member-viewer-panel .stream-chat-delete{
    position:absolute!important;
    right:3px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
}
@media(max-width:600px){
    .member-viewer-panel .stream-chat-message-line{font-size:13px!important}
}

/* source-style-11 */
/* Member Stream: clean, professional panel system */
.member-stream-only{
    align-items:flex-start!important;
    justify-content:center!important;
}
.member-viewer-panel{
    width:min(920px,100%)!important;
    padding:18px!important;
    border:1px solid rgba(30,41,59,.10)!important;
    border-radius:22px!important;
    background:rgba(255,255,255,.94)!important;
    box-shadow:0 18px 45px rgba(28,35,48,.13)!important;
}
.member-viewer-panel .stream-heading{
    min-height:52px!important;
    margin:0 0 12px!important;
    padding:10px 12px!important;
    border:1px solid #e6e9ee!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-heading-status-only{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
}
.member-viewer-panel .live-badge{
    position:relative!important;
    min-width:0!important;
    padding:7px 11px 7px 25px!important;
    border:1px solid #e1e5ea!important;
    border-radius:999px!important;
    background:#f7f8fa!important;
    color:#586170!important;
    box-shadow:none!important;
    font-size:12px!important;
    font-weight:700!important;
    letter-spacing:.01em!important;
    text-transform:none!important;
}
.member-viewer-panel .live-badge::before{
    content:""!important;
    display:block!important;
    position:absolute!important;
    left:10px!important;
    top:50%!important;
    width:7px!important;
    height:7px!important;
    transform:translateY(-50%)!important;
    border-radius:50%!important;
    background:#98a1ad!important;
    box-shadow:none!important;
}
.member-viewer-panel .live-badge.live{
    border-color:#f0c5d0!important;
    background:#fff4f7!important;
    color:#a34059!important;
}
.member-viewer-panel .live-badge.live::before{background:#d64d6b!important}
.member-viewer-panel .stream-error.show{
    margin:0 0 12px!important;
    border-radius:12px!important;
}
.member-viewer-panel .video-frame{
    width:100%!important;
    margin:0!important;
    border:1px solid #dfe3e8!important;
    border-radius:16px!important;
    background:#17191d!important;
    box-shadow:none!important;
    overflow:hidden!important;
}
.member-viewer-panel .video-frame video,
.member-viewer-panel .video-placeholder{
    border-radius:15px!important;
}
.member-viewer-panel .stream-chat-panel{
    width:100%!important;
    margin:12px 0 0!important;
    padding:0!important;
    overflow:hidden!important;
    border:1px solid #e0e4e9!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 7px 22px rgba(33,43,54,.06)!important;
    backdrop-filter:none!important;
}
.member-viewer-panel .stream-chat-head{
    display:none!important;
}
.member-viewer-panel .stream-book-vote:not([hidden]){
    margin:12px!important;
    border-radius:12px!important;
}
.member-viewer-panel .stream-chat-messages{
    min-height:160px!important;
    max-height:300px!important;
    padding:8px 16px!important;
    overflow-y:auto!important;
    background:#fff!important;
    background-image:none!important;
    border:0!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-message,
.member-viewer-panel .stream-chat-message.mine,
.member-viewer-panel .stream-chat-message.admin-message,
.member-viewer-panel .stream-chat-message:nth-child(even){
    min-height:38px!important;
    padding:9px 32px 9px 0!important;
    border:0!important;
    border-bottom:1px solid #edf0f2!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-message:last-child{border-bottom:0!important}
.member-viewer-panel .stream-chat-message-line{
    display:flex!important;
    align-items:baseline!important;
    gap:5px!important;
    color:#333b45!important;
    font-size:14px!important;
    line-height:1.45!important;
}
.member-viewer-panel .stream-chat-message-name{
    flex:0 0 auto!important;
    color:#202832!important;
    font-weight:650!important;
}
.member-viewer-panel .stream-chat-message-separator{
    flex:0 0 auto!important;
    color:#202832!important;
    font-weight:650!important;
}
.member-viewer-panel .stream-chat-message-text{
    min-width:0!important;
    color:#454e59!important;
    font-weight:400!important;
    overflow-wrap:anywhere!important;
}
.member-viewer-panel .stream-chat-delete{
    right:8px!important;
    width:24px!important;
    height:24px!important;
    border-radius:7px!important;
    background:#f7f8fa!important;
    color:#69727e!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
    margin:0!important;
    padding:10px!important;
    border:0!important;
    border-top:1px solid #e6e9ed!important;
    border-radius:0!important;
    background:#fafbfc!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-form input{
    width:100%!important;
    min-height:42px!important;
    margin:0!important;
    padding:10px 13px!important;
    border:1px solid #d8dde3!important;
    border-radius:10px!important;
    background:#fff!important;
    color:#222b35!important;
    box-shadow:none!important;
    font-size:14px!important;
}
.member-viewer-panel .stream-chat-form input:focus{
    border-color:#c06a80!important;
    box-shadow:0 0 0 3px rgba(192,106,128,.12)!important;
    outline:0!important;
}
.member-viewer-panel .stream-chat-form button{
    min-width:84px!important;
    min-height:42px!important;
    margin:0!important;
    padding:9px 16px!important;
    border:1px solid #aa5068!important;
    border-radius:10px!important;
    background:#b95a73!important;
    color:#fff!important;
    box-shadow:none!important;
    font-size:14px!important;
    font-weight:700!important;
}
.member-viewer-panel .stream-chat-form button:hover{
    background:#a94e66!important;
    transform:none!important;
}
.member-viewer-panel .stream-chat-feedback{
    display:block!important;
    min-height:0!important;
    padding:0 12px!important;
    background:#fafbfc!important;
    font-size:12px!important;
}
.member-viewer-panel .stream-chat-feedback:empty{display:none!important}
@media(max-width:600px){
    .member-viewer-panel{padding:10px!important;border-radius:16px!important}
    .member-viewer-panel .stream-heading{min-height:46px!important;margin-bottom:8px!important;border-radius:12px!important}
    .member-viewer-panel .video-frame{border-radius:12px!important}
    .member-viewer-panel .stream-chat-panel{margin-top:8px!important;border-radius:12px!important}
    .member-viewer-panel .stream-chat-messages{min-height:130px!important;max-height:240px!important;padding:6px 12px!important}
    .member-viewer-panel .stream-chat-message-line{font-size:13px!important}
    .member-viewer-panel .stream-chat-form{grid-template-columns:minmax(0,1fr) auto!important;padding:8px!important}
    .member-viewer-panel .stream-chat-form button{min-width:70px!important;padding:8px 12px!important}
}

/* source-style-12 */
.member-viewer-panel .member-glitter-rain,
.member-viewer-panel .member-glitter-piece{display:none!important}
.member-viewer-panel{
    width:min(920px,100%)!important;
    padding:0!important;
    overflow:hidden!important;
    border:1px solid #dde2e8!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 14px 34px rgba(25,32,44,.10)!important;
}
.member-viewer-panel::before,
.member-viewer-panel::after{content:none!important;display:none!important}
.member-viewer-panel .stream-heading{
    min-height:48px!important;
    margin:0!important;
    padding:9px 14px!important;
    border:0!important;
    border-bottom:1px solid #e6e9ed!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-heading::before,
.member-viewer-panel .stream-heading::after{content:none!important;display:none!important}
.member-viewer-panel .stream-heading-status-only{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
}
.member-viewer-panel .live-badge{
    min-width:0!important;
    padding:6px 10px 6px 24px!important;
    border:1px solid #e0e4e9!important;
    border-radius:999px!important;
    background:#f8f9fa!important;
    color:#505965!important;
    box-shadow:none!important;
    font-size:12px!important;
    font-weight:700!important;
    text-transform:none!important;
}
.member-viewer-panel .stream-error.show{margin:0!important;border-radius:0!important}
.member-viewer-panel .video-frame{
    width:100%!important;
    margin:0!important;
    border:0!important;
    border-bottom:1px solid #e1e5e9!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#17191d!important;
    overflow:hidden!important;
}
.member-viewer-panel .video-frame::before,
.member-viewer-panel .video-frame::after{content:none!important;display:none!important}
.member-viewer-panel .video-frame video,
.member-viewer-panel .video-placeholder{border-radius:0!important}
.member-viewer-panel .stream-chat-panel{
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    overflow:hidden!important;
}
.member-viewer-panel .stream-chat-head{display:none!important}
.member-viewer-panel .stream-book-vote:not([hidden]){
    margin:0!important;
    padding:12px 14px!important;
    border:0!important;
    border-bottom:1px solid #e7eaee!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-messages{
    min-height:170px!important;
    max-height:310px!important;
    margin:0!important;
    padding:8px 16px!important;
    overflow-y:auto!important;
    border:0!important;
    border-radius:0!important;
    background:#fff!important;
    background-image:none!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-message,
.member-viewer-panel .stream-chat-message.mine,
.member-viewer-panel .stream-chat-message.admin-message,
.member-viewer-panel .stream-chat-message:nth-child(even){
    min-height:34px!important;
    margin:0!important;
    padding:8px 30px 8px 0!important;
    border:0!important;
    border-bottom:1px solid #f0f2f4!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-message:last-child{border-bottom:0!important}
.member-viewer-panel .stream-chat-message::before,
.member-viewer-panel .stream-chat-message::after{content:none!important;display:none!important}
.member-viewer-panel .stream-chat-message-line{
    display:flex!important;
    align-items:baseline!important;
    gap:4px!important;
    color:#2f3741!important;
    font-size:14px!important;
    line-height:1.45!important;
}
.member-viewer-panel .stream-chat-message-name,
.member-viewer-panel .stream-chat-message-separator{color:#222a33!important;font-weight:650!important}
.member-viewer-panel .stream-chat-message-text{color:#3f4853!important;font-weight:400!important}
.member-viewer-panel .stream-chat-form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-top:1px solid #e3e7eb!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
}
.member-viewer-panel .stream-chat-form::before,
.member-viewer-panel .stream-chat-form::after{content:none!important;display:none!important}
.member-viewer-panel .stream-chat-form input{
    width:100%!important;
    min-height:48px!important;
    margin:0!important;
    padding:11px 14px!important;
    border:0!important;
    border-radius:0!important;
    background:#fff!important;
    color:#202832!important;
    box-shadow:none!important;
    font-size:14px!important;
    outline:0!important;
}
.member-viewer-panel .stream-chat-form input:focus{border:0!important;box-shadow:inset 0 0 0 2px rgba(185,90,115,.14)!important}
.member-viewer-panel .stream-chat-form button{
    min-width:88px!important;
    min-height:48px!important;
    margin:0!important;
    padding:10px 18px!important;
    border:0!important;
    border-left:1px solid #a84d65!important;
    border-radius:0!important;
    background:#b95a73!important;
    color:#fff!important;
    box-shadow:none!important;
    font-size:14px!important;
    font-weight:700!important;
}
.member-viewer-panel .stream-chat-form button:hover{background:#a94e66!important;transform:none!important}
.member-viewer-panel .stream-chat-feedback{margin:0!important;padding:0 14px!important;border:0!important;background:#fff!important}
.member-viewer-panel .stream-chat-feedback:not(:empty){padding-top:7px!important;padding-bottom:7px!important;border-top:1px solid #eef0f2!important}
@media(max-width:600px){
    .member-viewer-panel{border-radius:14px!important}
    .member-viewer-panel .stream-heading{min-height:44px!important;padding:8px 10px!important}
    .member-viewer-panel .stream-chat-messages{min-height:140px!important;max-height:250px!important;padding:7px 12px!important}
    .member-viewer-panel .stream-chat-form input{min-height:46px!important;padding:10px 12px!important}
    .member-viewer-panel .stream-chat-form button{min-width:72px!important;min-height:46px!important;padding:9px 12px!important}
}

/* source-style-13 */
/* Keep Admin and Member chat messages on opposite sides without themed bubbles. */
.stream-chat-messages .stream-chat-message{
    width:fit-content;
    max-width:min(82%,620px);
}
.stream-chat-messages .stream-chat-message:not(.mine){
    align-self:flex-start!important;
    margin-left:0!important;
    margin-right:auto!important;
    text-align:left!important;
}
.stream-chat-messages .stream-chat-message.mine{
    align-self:flex-end!important;
    margin-left:auto!important;
    margin-right:0!important;
    text-align:right!important;
}
.stream-chat-messages .stream-chat-message.mine .stream-chat-message-line{
    justify-content:flex-end!important;
    text-align:right!important;
}
.stream-chat-messages .stream-chat-message:not(.mine) .stream-chat-message-line{
    justify-content:flex-start!important;
    text-align:left!important;
}
.member-viewer-panel .stream-chat-message,
.member-viewer-panel .stream-chat-message.mine,
.member-viewer-panel .stream-chat-message.admin-message,
.member-viewer-panel .stream-chat-message:nth-child(even){
    width:fit-content!important;
    max-width:82%!important;
    padding:7px 0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
}

/* source-style-14 */
/* Final chat layout safety: reserve a dedicated delete-button column and allow all text to wrap. */
.stream-chat-messages .stream-chat-message,
.member-viewer-panel .stream-chat-message,
.admin-viewer-panel .stream-chat-message{
    position:relative!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 26px!important;
    align-items:start!important;
    column-gap:8px!important;
    width:min(82%,620px)!important;
    max-width:82%!important;
    min-width:0!important;
    margin-top:0!important;
    margin-bottom:0!important;
    padding:8px 0!important;
    border:0!important;
    border-bottom:1px solid #f0f2f4!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
}
.stream-chat-messages .stream-chat-message:last-child{border-bottom:0!important}
.stream-chat-messages .stream-chat-message:not(:has(.stream-chat-delete)),
.member-viewer-panel .stream-chat-message:not(:has(.stream-chat-delete)),
.admin-viewer-panel .stream-chat-message:not(:has(.stream-chat-delete)){
    grid-template-columns:minmax(0,1fr)!important;
}
.stream-chat-messages .stream-chat-message.admin-message{
    align-self:flex-start!important;
    margin-left:0!important;
    margin-right:auto!important;
    text-align:left!important;
}
.stream-chat-messages .stream-chat-message:not(.admin-message){
    align-self:flex-end!important;
    margin-left:auto!important;
    margin-right:0!important;
    text-align:right!important;
}
.stream-chat-messages .stream-chat-message-line,
.member-viewer-panel .stream-chat-message-line,
.admin-viewer-panel .stream-chat-message-line{
    grid-column:1!important;
    min-width:0!important;
    width:100%!important;
    display:block!important;
    margin:0!important;
    padding:0!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    line-height:1.45!important;
}
.stream-chat-messages .stream-chat-message.admin-message .stream-chat-message-line{
    text-align:left!important;
}
.stream-chat-messages .stream-chat-message:not(.admin-message) .stream-chat-message-line{
    text-align:right!important;
}
.stream-chat-messages .stream-chat-message-name,
.stream-chat-messages .stream-chat-message-separator,
.stream-chat-messages .stream-chat-message-text{
    display:inline!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}
.stream-chat-messages .stream-chat-message-name{
    font-weight:700!important;
}
.stream-chat-messages .stream-chat-delete,
.member-viewer-panel .stream-chat-delete,
.admin-viewer-panel .stream-chat-delete{
    position:static!important;
    grid-column:2!important;
    grid-row:1!important;
    align-self:start!important;
    justify-self:end!important;
    transform:none!important;
    flex:0 0 26px!important;
    width:26px!important;
    min-width:26px!important;
    height:26px!important;
    min-height:26px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #e2e6ea!important;
    border-radius:7px!important;
    background:#f7f8fa!important;
    color:#626b76!important;
    box-shadow:none!important;
    font-size:16px!important;
    line-height:24px!important;
    text-align:center!important;
    z-index:1!important;
}
.stream-chat-messages .stream-chat-delete:hover{
    background:#eef0f3!important;
    color:#202832!important;
}
@media(max-width:600px){
    .stream-chat-messages .stream-chat-message,
    .member-viewer-panel .stream-chat-message,
    .admin-viewer-panel .stream-chat-message{
        width:94%!important;
        max-width:94%!important;
        grid-template-columns:minmax(0,1fr) 26px!important;
        column-gap:6px!important;
        padding:7px 0!important;
    }
    .stream-chat-messages .stream-chat-message:not(:has(.stream-chat-delete)),
    .member-viewer-panel .stream-chat-message:not(:has(.stream-chat-delete)),
    .admin-viewer-panel .stream-chat-message:not(:has(.stream-chat-delete)){
        grid-template-columns:minmax(0,1fr)!important;
    }
    .stream-chat-messages .stream-chat-message-line{font-size:13px!important}
}

/* Admin chat row order: × Admin Name: message */
.stream-chat-messages .stream-chat-message.admin-message:has(.stream-chat-delete),
.member-viewer-panel .stream-chat-message.admin-message:has(.stream-chat-delete),
.admin-viewer-panel .stream-chat-message.admin-message:has(.stream-chat-delete){
    grid-template-columns:26px minmax(0,1fr)!important;
    column-gap:7px!important;
}
.stream-chat-messages .stream-chat-message.admin-message .stream-chat-delete,
.member-viewer-panel .stream-chat-message.admin-message .stream-chat-delete,
.admin-viewer-panel .stream-chat-message.admin-message .stream-chat-delete{
    grid-column:1!important;
    grid-row:1!important;
    justify-self:start!important;
    align-self:start!important;
}
.stream-chat-messages .stream-chat-message.admin-message .stream-chat-message-line,
.member-viewer-panel .stream-chat-message.admin-message .stream-chat-message-line,
.admin-viewer-panel .stream-chat-message.admin-message .stream-chat-message-line{
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
    text-align:left!important;
}
@media(max-width:600px){
    .stream-chat-messages .stream-chat-message.admin-message:has(.stream-chat-delete),
    .member-viewer-panel .stream-chat-message.admin-message:has(.stream-chat-delete),
    .admin-viewer-panel .stream-chat-message.admin-message:has(.stream-chat-delete){
        grid-template-columns:26px minmax(0,1fr)!important;
        column-gap:6px!important;
    }
}



/* Clean left sidebar theme — Admin + Member */
.sidebar{
    width:auto;
    padding:18px 16px 18px;
    gap:14px;
    border-radius:0!important;
    background:linear-gradient(180deg,#a94f66 0%,#b95e73 48%,#a54a61 100%)!important;
    box-shadow:8px 0 24px rgba(92,35,52,.12)!important;
    color:#fff!important;
}
.sidebar::before,
.sidebar::after{display:none!important}
.sidebar > *{position:relative;z-index:1}
.side-brand{
    display:flex;
    align-items:center;
    gap:11px;
    margin:0!important;
    padding:12px!important;
    border:1px solid rgba(255,255,255,.18)!important;
    border-radius:16px!important;
    background:rgba(255,255,255,.10)!important;
    box-shadow:none!important;
    backdrop-filter:blur(8px);
}
.side-brand .brand-mark{
    flex:0 0 44px;
    width:44px!important;
    height:44px!important;
    display:grid;
    place-items:center;
    border:0!important;
    border-radius:12px!important;
    background:#fff!important;
    color:#a94f66!important;
    box-shadow:none!important;
    font-size:21px;
}
.side-brand strong{
    color:#fff!important;
    font-family:inherit!important;
    font-size:15px!important;
    font-weight:850!important;
    line-height:1.25!important;
    letter-spacing:0!important;
    text-shadow:none!important;
}
.sidebar .role-chip{
    margin:0!important;
    padding:9px 11px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    border-radius:11px!important;
    background:rgba(255,255,255,.08)!important;
    box-shadow:none!important;
    color:rgba(255,255,255,.82)!important;
    font-size:11px!important;
    line-height:1.3;
}
.sidebar .role-chip b{color:#fff!important}
.sidebar .nav{
    display:grid!important;
    gap:7px!important;
    padding:0!important;
}
.sidebar .nav a{
    position:relative;
    min-height:46px!important;
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    padding:9px 12px!important;
    border:1px solid transparent!important;
    border-radius:12px!important;
    background:transparent!important;
    color:rgba(255,255,255,.86)!important;
    box-shadow:none!important;
    font-size:13px!important;
    font-weight:760!important;
    line-height:1.25!important;
    transition:background .16s ease,color .16s ease,border-color .16s ease,transform .16s ease!important;
}
.sidebar .nav a::after{display:none!important}
.sidebar .nav a:hover{
    transform:translateX(2px);
    background:rgba(255,255,255,.11)!important;
    border-color:rgba(255,255,255,.10)!important;
    color:#fff!important;
}
.sidebar .nav a.active{
    transform:none;
    background:#fff!important;
    border-color:#fff!important;
    color:#9e435a!important;
    box-shadow:0 6px 15px rgba(77,25,41,.10)!important;
}
.sidebar .nav-icon{
    flex:0 0 30px!important;
    width:30px!important;
    height:30px!important;
    display:grid!important;
    place-items:center!important;
    margin:0!important;
    border:0!important;
    border-radius:9px!important;
    background:rgba(255,255,255,.12)!important;
    color:#fff!important;
    box-shadow:none!important;
    font-size:14px!important;
    transition:none!important;
}
.sidebar .nav a:hover .nav-icon{
    transform:none!important;
    background:rgba(255,255,255,.17)!important;
}
.sidebar .nav a.active .nav-icon{
    background:#f8e7ec!important;
    color:#a44960!important;
    box-shadow:none!important;
}
.sidebar .subscription-dot{margin-left:-5px}
.sidebar .sidebar-bottom{
    margin-top:auto!important;
    padding-top:12px;
    border-top:1px solid rgba(255,255,255,.14);
}
.sidebar .user-card{
    display:grid!important;
    gap:4px!important;
    padding:11px 12px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.09)!important;
    box-shadow:none!important;
}
.sidebar .user-card strong{
    color:#fff!important;
    font-size:12px!important;
    font-weight:800!important;
}
.sidebar .user-card a{
    color:rgba(255,255,255,.84)!important;
    font-size:11px!important;
    line-height:1.35;
    text-decoration:none!important;
}
.sidebar .user-card a:hover{color:#fff!important;text-decoration:underline!important}
.sidebar-subscription-renewal{
    margin-top:8px!important;
    padding:9px 10px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    border-radius:11px!important;
    background:rgba(255,255,255,.08)!important;
    box-shadow:none!important;
    color:rgba(255,255,255,.82)!important;
    font-size:10px!important;
    font-weight:700!important;
}
.sidebar-subscription-renewal b{
    margin-top:2px!important;
    color:#fff!important;
    font-size:11px!important;
    font-weight:850!important;
}
.sidebar .logout-form{margin-top:8px!important}
.sidebar .logout-form button{
    min-height:42px;
    width:100%;
    padding:9px 12px!important;
    border:1px solid rgba(255,255,255,.22)!important;
    border-radius:11px!important;
    background:rgba(255,255,255,.10)!important;
    box-shadow:none!important;
    color:#fff!important;
    font-size:12px!important;
    font-weight:800!important;
    cursor:pointer;
}
.sidebar .logout-form button:hover{
    background:#fff!important;
    border-color:#fff!important;
    color:#9e435a!important;
}
.member-sidebar-recordings{
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.07)!important;
    box-shadow:none!important;
}
@media(max-width:1050px){
    .sidebar{padding-inline:12px!important}
}
@media(max-width:520px){
    .sidebar{
        padding:9px 10px!important;
        gap:7px!important;
        border-radius:0!important;
        background:linear-gradient(135deg,#a94f66,#bb6579)!important;
        box-shadow:0 4px 14px rgba(91,31,48,.14)!important;
    }
    .side-brand{
        min-height:52px;
        padding:8px 10px!important;
        border-radius:12px!important;
    }
    .side-brand .brand-mark{
        flex-basis:38px!important;
        width:38px!important;
        height:38px!important;
        border-radius:10px!important;
        font-size:18px!important;
    }
    .side-brand strong{font-size:13px!important}
    .sidebar .mobile-menu{gap:6px!important;padding-top:0!important}
    .sidebar .mobile-menu>a,
    .sidebar .mobile-recordings-toggle,
    .sidebar .mobile-logout-form button{
        min-height:40px!important;
        padding:8px 6px!important;
        border:1px solid rgba(255,255,255,.16)!important;
        border-radius:10px!important;
        background:rgba(255,255,255,.10)!important;
        box-shadow:none!important;
        font-size:11px!important;
        font-weight:800!important;
    }
    .sidebar .mobile-menu>a.active,
    .sidebar .mobile-recordings-toggle[aria-expanded="true"]{
        background:#fff!important;
        color:#9e435a!important;
        border-color:#fff!important;
        box-shadow:none!important;
    }
}


/* Final stable left navigation — Admin + Member */
.sidebar{
    background:#a95167!important;
    border-right:1px solid rgba(92,35,52,.10)!important;
    box-shadow:6px 0 22px rgba(92,35,52,.10)!important;
}
.side-brand{
    background:rgba(255,255,255,.11)!important;
    border-color:rgba(255,255,255,.20)!important;
    border-radius:14px!important;
}
.sidebar .role-chip{
    background:rgba(255,255,255,.075)!important;
    border-color:rgba(255,255,255,.14)!important;
}
.sidebar .nav{
    gap:6px!important;
}
.sidebar .nav a{
    min-height:48px!important;
    padding:8px 10px!important;
    border:1px solid rgba(255,255,255,.12)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.075)!important;
    color:rgba(255,255,255,.92)!important;
    box-shadow:none!important;
    transform:none!important;
    transition:none!important;
    animation:none!important;
    -webkit-tap-highlight-color:transparent;
    outline:none;
}
.sidebar .nav a::before{
    content:"";
    flex:0 0 3px;
    align-self:stretch;
    width:3px;
    border-radius:999px;
    background:transparent;
}
.sidebar .nav a:hover,
.sidebar .nav a:focus,
.sidebar .nav a:active{
    transform:none!important;
    background:rgba(255,255,255,.13)!important;
    border-color:rgba(255,255,255,.18)!important;
    color:#fff!important;
    box-shadow:none!important;
}
.sidebar .nav a.active,
.sidebar .nav a.active:hover,
.sidebar .nav a.active:focus,
.sidebar .nav a.active:active{
    background:#fff!important;
    border-color:#fff!important;
    color:#954057!important;
    box-shadow:0 4px 12px rgba(76,24,39,.10)!important;
    transform:none!important;
}
.sidebar .nav a.active::before{background:#bd6076}
.sidebar .nav-icon{
    flex:0 0 32px!important;
    width:32px!important;
    height:32px!important;
    border-radius:9px!important;
    background:rgba(255,255,255,.13)!important;
    transition:none!important;
    transform:none!important;
}
.sidebar .nav a:hover .nav-icon,
.sidebar .nav a:focus .nav-icon,
.sidebar .nav a:active .nav-icon{
    background:rgba(255,255,255,.18)!important;
    transform:none!important;
}
.sidebar .nav a.active .nav-icon,
.sidebar .nav a.active:hover .nav-icon,
.sidebar .nav a.active:focus .nav-icon,
.sidebar .nav a.active:active .nav-icon{
    background:#f7e8ec!important;
    color:#a44960!important;
    transform:none!important;
}
.sidebar .subscription-dot{flex:0 0 7px;width:7px;height:7px;margin-left:-4px!important}
.sidebar .sidebar-bottom{
    padding-top:11px!important;
    border-top:1px solid rgba(255,255,255,.16)!important;
}
.sidebar .user-card,
.sidebar-subscription-renewal{
    background:rgba(255,255,255,.075)!important;
    border-color:rgba(255,255,255,.15)!important;
    box-shadow:none!important;
}
.sidebar .logout-form button{
    background:rgba(255,255,255,.10)!important;
    border-color:rgba(255,255,255,.20)!important;
    transition:none!important;
    animation:none!important;
    transform:none!important;
    -webkit-tap-highlight-color:transparent;
}
.sidebar .logout-form button:hover,
.sidebar .logout-form button:focus,
.sidebar .logout-form button:active{
    background:#fff!important;
    border-color:#fff!important;
    color:#954057!important;
    transform:none!important;
    box-shadow:none!important;
}
.sidebar .mobile-menu>a,
.sidebar .mobile-recordings-toggle,
.sidebar .mobile-logout-form button{
    transition:none!important;
    animation:none!important;
    transform:none!important;
    -webkit-tap-highlight-color:transparent;
}
.sidebar .mobile-menu>a:hover,
.sidebar .mobile-menu>a:focus,
.sidebar .mobile-menu>a:active,
.sidebar .mobile-recordings-toggle:hover,
.sidebar .mobile-recordings-toggle:focus,
.sidebar .mobile-recordings-toggle:active,
.sidebar .mobile-logout-form button:hover,
.sidebar .mobile-logout-form button:focus,
.sidebar .mobile-logout-form button:active{
    transform:none!important;
}
@media(max-width:520px){
    .sidebar{
        background:#a95167!important;
        box-shadow:0 4px 14px rgba(91,31,48,.12)!important;
    }
    .sidebar .mobile-menu>a,
    .sidebar .mobile-recordings-toggle,
    .sidebar .mobile-logout-form button{
        background:rgba(255,255,255,.10)!important;
        border-color:rgba(255,255,255,.16)!important;
        color:#fff!important;
        box-shadow:none!important;
    }
    .sidebar .mobile-menu>a.active,
    .sidebar .mobile-menu>a.active:hover,
    .sidebar .mobile-menu>a.active:focus,
    .sidebar .mobile-menu>a.active:active,
    .sidebar .mobile-recordings-toggle[aria-expanded="true"]{
        background:#fff!important;
        border-color:#fff!important;
        color:#954057!important;
        box-shadow:none!important;
    }
}


.sidebar .nav a.nav-pressed:not(.active){
    background:rgba(255,255,255,.13)!important;
    border-color:rgba(255,255,255,.18)!important;
    color:#fff!important;
}

/* Final mobile stabilization — all application views */
.mobile-subscription-renewal{display:none}
@media(max-width:760px){
    html,body{width:100%;max-width:100%;overflow-x:hidden!important}
    body{font-size:14px}
    *,*::before,*::after{max-width:100%;box-sizing:border-box}
    input,textarea,select,button{font-size:16px}
    button,a{touch-action:manipulation}

    .app-shell{display:block!important;width:100%;min-width:0!important;min-height:100dvh}
    .sidebar{
        position:sticky!important;top:0!important;z-index:80!important;
        width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
        padding:calc(8px + env(safe-area-inset-top)) 9px 8px!important;
        gap:7px!important;border:0!important;border-radius:0!important;
        box-shadow:0 4px 14px rgba(91,31,48,.13)!important;
        overflow:visible!important;
    }
    .side-brand{min-height:46px!important;padding:6px 8px!important;gap:8px!important}
    .side-brand .brand-mark{width:34px!important;height:34px!important;flex-basis:34px!important;border-radius:9px!important;font-size:16px!important}
    .side-brand strong{font-size:13px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere}
    .side-brand span{display:none!important}
    .sidebar .nav,.sidebar .role-chip,.sidebar .sidebar-bottom{display:none!important}

    .sidebar .mobile-menu,
    .sidebar .mobile-menu.has-subscribe,
    .sidebar .mobile-menu.has-subscribe.has-vids,
    .sidebar .mobile-menu.has-vids{
        display:flex!important;grid-template-columns:none!important;align-items:stretch!important;
        gap:6px!important;width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;
        padding:1px 0 2px!important;scrollbar-width:none!important;overscroll-behavior-x:contain;
        -webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;
    }
    .sidebar .mobile-menu::-webkit-scrollbar{display:none!important}
    .sidebar .mobile-menu>a,
    .sidebar .mobile-recordings-toggle,
    .sidebar .mobile-logout-form button{
        flex:0 0 auto!important;width:auto!important;min-width:82px!important;min-height:42px!important;
        padding:9px 11px!important;border-radius:10px!important;white-space:nowrap!important;
        font-size:12px!important;line-height:1!important;scroll-snap-align:start;
    }
    .sidebar .mobile-logout-form{display:block!important;flex:0 0 auto!important;margin:0!important}
    .mobile-subscription-renewal{
        display:flex!important;align-items:center;justify-content:space-between;gap:10px;
        margin-top:1px;padding:7px 9px;border:1px solid rgba(255,255,255,.16);border-radius:9px;
        background:rgba(255,255,255,.08);color:rgba(255,255,255,.88);font-size:10px;font-weight:700;
    }
    .mobile-subscription-renewal b{color:#fff;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
    .member-sidebar-recordings{width:100%!important;max-height:44dvh!important;margin-top:2px!important;overflow:hidden!important}
    .member-sidebar-recordings.mobile-recordings-collapsed{display:none!important}
    .member-sidebar-recordings:not(.mobile-recordings-collapsed){display:block!important;padding:8px!important}
    .member-sidebar-recordings .stream-recording-gallery{max-height:34dvh;overflow-x:auto!important}

    .workspace,.member-stream-workspace{width:100%!important;min-width:0!important;max-width:100%!important;padding:8px 8px calc(12px + env(safe-area-inset-bottom))!important;overflow:visible!important}
    .content,.member-stream-content{width:100%!important;min-width:0!important;max-width:100%!important;padding-top:0!important;overflow:visible!important}
    .content>*{min-width:0!important;max-width:100%!important}
    .flash{margin:0 0 8px!important;overflow-wrap:anywhere}

    .topbar{position:relative!important;top:auto!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;padding:11px!important;border-radius:12px!important;min-width:0!important}
    .topbar>div{min-width:0!important}
    .topbar h1{font-size:21px!important;line-height:1.15!important;overflow-wrap:anywhere!important}
    .topbar p{display:block!important;font-size:11px!important;line-height:1.4!important;overflow-wrap:anywhere!important}
    .top-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;width:100%!important}
    .top-actions>*{width:100%!important;min-width:0!important;justify-content:center!important;text-align:center!important}

    .panel{width:100%!important;min-width:0!important;padding:12px!important;border-radius:12px!important}
    .panel-head{display:flex!important;align-items:flex-start!important;flex-wrap:wrap!important;gap:8px!important;margin-bottom:11px!important}
    .panel-head>div{min-width:0!important;flex:1 1 190px!important}
    .panel-head h2{font-size:20px!important;line-height:1.18!important;overflow-wrap:anywhere!important}
    .panel-head p{font-size:12px!important;line-height:1.4!important;overflow-wrap:anywhere!important}
    .panel-head>button,.panel-head>a{flex:0 0 auto!important;max-width:100%!important}

    .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
    .stat{min-width:0!important;padding:13px 11px!important;border-radius:11px!important}
    .stat strong{font-size:26px!important}
    .stat span{font-size:10px!important;line-height:1.25!important;overflow-wrap:anywhere!important}
    .dashboard-grid,.members-grid,.settings-grid,.subscription-page{grid-template-columns:1fr!important;gap:8px!important}
    .activity-item,.quick-actions>*{min-width:0!important}
    .activity-item{grid-template-columns:1fr!important;gap:4px!important}

    .library-tools{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;align-items:stretch!important}
    .search-box,.search-box input{width:100%!important;min-width:0!important}
    .book-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
    .book-card{min-width:0!important;min-height:0!important;padding:8px!important}
    .book-cover{height:clamp(168px,40vw,230px)!important;padding:14px 11px!important}
    .book-cover strong,.book-meta h3,.book-meta p,.book-tags{overflow-wrap:anywhere!important;word-break:normal!important}
    .admin-book-actions{grid-template-columns:1fr!important;gap:5px!important}
    .admin-book-actions form,.admin-book-actions button{width:100%!important;min-width:0!important}

    .form-grid,.subscription-settings-row{grid-template-columns:1fr!important;gap:9px!important}
    .span-2{grid-column:auto!important}
    .field{min-width:0!important;margin-bottom:12px!important}
    .field input,.field textarea,.field select,.account-search-box input,.member-actions input{width:100%!important;min-width:0!important;min-height:46px!important}
    .field textarea{min-height:120px!important}

    .members-grid.members-page-stack{height:auto!important;min-height:0!important;overflow:visible!important;gap:8px!important}
    .registered-accounts-panel{min-height:0!important;overflow:hidden!important}
    .registered-accounts-panel .member-list{min-height:220px!important;max-height:52dvh!important;overflow-y:auto!important;padding-right:2px!important}
    .member-row{grid-template-columns:1fr!important;gap:9px!important;padding:10px!important;min-width:0!important}
    .member-info,.member-info>div{min-width:0!important}
    .member-info strong,.member-info span,.member-info a{overflow-wrap:anywhere!important;word-break:break-word!important}
    .member-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:6px!important}
    .member-actions form,.member-actions button{width:100%!important;min-width:0!important;margin:0!important}
    .account-type-control{width:100%!important;grid-template-columns:1fr!important;gap:5px!important}
    .account-type-select{width:100%!important;min-width:0!important;min-height:46px!important}
    .password-reset-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important}
    .password-reset-form button{width:auto!important;min-width:78px!important}

    .subscription-credit-card{min-height:210px!important;padding:17px!important;border-radius:18px!important}
    .subscription-card-price{margin-top:26px!important;font-size:38px!important}
    .subscription-card-number{margin-top:24px!important;font-size:14px!important;letter-spacing:.08em!important;overflow-wrap:anywhere}
    .subscription-card-footer{gap:8px!important;flex-wrap:wrap!important}
    .subscription-actions{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
    .subscription-actions form,.subscription-actions button{width:100%!important}
    .subscription-detail-row{align-items:flex-start!important;gap:8px!important}
    .subscription-detail-row strong{max-width:58%!important}

    .stream-layout,.member-stream-only{display:block!important;width:100%!important;min-height:0!important;margin:0!important}
    .stream-stage-panel,.member-viewer-panel,.admin-viewer-panel{width:100%!important;max-width:100%!important;min-height:0!important;margin:0!important;padding:0!important;border-radius:14px!important;overflow:hidden!important}
    .stream-heading,.member-viewer-panel .stream-heading,.admin-viewer-panel .stream-heading{min-height:46px!important;padding:9px 11px!important;margin:0!important;border-radius:0!important}
    .stream-heading-status-only{display:flex!important;align-items:center!important;justify-content:flex-end!important}
    .live-badge{margin:0!important;min-width:72px!important;padding:7px 10px!important;font-size:10px!important}
    .stream-title-editor,.admin-viewer-panel .stream-title-editor{padding:10px 11px!important;margin:0!important;border-radius:0!important}
    .stream-title-editor input{min-height:44px!important;font-size:17px!important}
    .video-frame,.member-viewer-panel .video-frame,.admin-viewer-panel .video-frame{width:100%!important;min-height:0!important;height:auto!important;aspect-ratio:16/9!important;margin:0!important;border-radius:0!important;border-left:0!important;border-right:0!important}
    .video-frame video,.member-viewer-panel .video-frame video,.admin-viewer-panel .video-frame video{display:block!important;width:100%!important;height:100%!important;min-height:0!important;aspect-ratio:16/9!important;object-fit:contain!important;border-radius:0!important}
    .stream-countdown{padding:12px!important}
    .stream-countdown strong{min-width:0!important;font-size:clamp(28px,9vw,38px)!important}
    .stream-controls,.admin-viewer-panel .stream-controls{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:0!important;padding:9px!important}
    .stream-controls>*,.admin-viewer-panel .stream-controls>*{width:100%!important;min-width:0!important;margin:0!important}
    .stream-start-group,.admin-viewer-panel .stream-start-group{display:grid!important;grid-template-columns:1fr!important;grid-column:1/-1!important;gap:6px!important}
    .stream-start-group>#rtcStart{min-width:0!important;width:100%!important}
    .stream-countdown-input{width:100%!important;grid-template-columns:auto minmax(0,1fr) auto!important}
    .stream-countdown-input input{width:100%!important;min-width:0!important}
    .stream-side{grid-template-columns:1fr!important;gap:8px!important}

    .stream-chat-panel,.member-viewer-panel .stream-chat-panel,.admin-viewer-panel .stream-chat-panel{width:100%!important;min-width:0!important;margin:0!important;border-radius:0!important}
    .stream-book-vote{max-width:100%!important;margin:0!important;border-left:0!important;border-right:0!important;border-radius:0!important}
    .stream-book-vote-books{max-width:100%!important;overflow-x:auto!important}
    .stream-chat-messages,.member-viewer-panel .stream-chat-messages,.admin-viewer-panel .stream-chat-messages{width:100%!important;min-width:0!important;min-height:150px!important;max-height:34dvh!important;height:auto!important;padding:8px 9px!important;overflow-y:auto!important;overflow-x:hidden!important}
    .stream-chat-message{max-width:94%!important;min-width:0!important}
    .stream-chat-message-line{min-width:0!important;max-width:100%!important;font-size:13px!important;line-height:1.45!important;overflow-wrap:anywhere!important;word-break:break-word!important}
    .stream-chat-delete{flex:0 0 28px!important;width:28px!important;height:28px!important;min-width:28px!important}
    .stream-chat-form,.member-viewer-panel .stream-chat-form,.admin-viewer-panel .stream-chat-form{display:grid!important;grid-template-columns:minmax(0,1fr) 76px!important;gap:0!important;width:100%!important;margin:0!important;padding:0!important}
    .stream-chat-form input,.member-viewer-panel .stream-chat-form input,.admin-viewer-panel .stream-chat-form input{width:100%!important;min-width:0!important;min-height:48px!important;padding:10px 11px!important;border-radius:0!important;font-size:16px!important}
    .stream-chat-form button,.member-viewer-panel .stream-chat-form button,.admin-viewer-panel .stream-chat-form button{width:76px!important;min-width:76px!important;min-height:48px!important;padding:9px 7px!important;border-radius:0!important;font-size:12px!important}
    .stream-chat-feedback{overflow-wrap:anywhere!important}

    .stream-recordings,.admin-stream-recordings{padding:9px!important;border-radius:0 0 14px 14px!important}
    .stream-recordings-head{align-items:flex-start!important;flex-wrap:wrap!important;gap:7px!important}
    .stream-recording-card{flex-basis:min(72vw,230px)!important;min-width:0!important}
    .stream-recording-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;width:100%!important}
    .stream-recording-actions button{width:100%!important;min-width:0!important}
    .stream-recording-message{grid-column:1/-1!important;min-width:0!important;text-align:left!important;overflow-wrap:anywhere!important}

    dialog{max-width:100vw!important;max-height:100dvh!important}
    .modal{width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;border-radius:0!important;border:0!important;display:flex!important;flex-direction:column!important}
    .modal-head{flex:0 0 auto!important;padding:calc(10px + env(safe-area-inset-top)) 11px 10px!important;gap:8px!important}
    .modal-head>div{min-width:0!important}
    .modal-head h2{font-size:20px!important;overflow-wrap:anywhere!important}
    .modal-head p{font-size:11px!important;line-height:1.35!important;overflow-wrap:anywhere!important}
    .close-button{flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important}
    .modal-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:11px 10px calc(12px + env(safe-area-inset-bottom))!important}
    .book-vote-admin-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
    .book-vote-admin-actions{align-items:stretch!important;flex-direction:column!important;gap:8px!important}
    .book-vote-admin-actions>div{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
    .book-vote-admin-actions button{width:100%!important;min-width:0!important}

    .reader-dialog,.reader-stage,.reader-shell{width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;margin:0!important;border-radius:0!important}
    .reader-stage{padding:0!important}
    .reader-top{padding:calc(8px + env(safe-area-inset-top)) 9px 8px!important;gap:7px!important}
    .reader-top>div{min-width:0!important}
    .reader-top h2,.reader-top p{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
    .reader-page{padding:22px 17px 40px!important;font-size:17px!important;line-height:1.65!important;overflow-y:auto!important}
    .reader-controls{grid-template-columns:minmax(72px,1fr) auto minmax(72px,1fr)!important;gap:5px!important;padding:7px 6px calc(7px + env(safe-area-inset-bottom))!important}
    .reader-controls button{min-width:0!important;padding-inline:7px!important}

    .editor-toolbar{grid-template-columns:1fr 1fr!important;gap:6px!important}
    .editor-toolbar button{width:100%!important;min-width:0!important}
}

@media(max-width:430px){
    .workspace,.member-stream-workspace{padding-left:6px!important;padding-right:6px!important}
    .side-brand strong{font-size:12px!important}
    .sidebar .mobile-menu>a,.sidebar .mobile-recordings-toggle,.sidebar .mobile-logout-form button{min-width:76px!important;padding-inline:9px!important;font-size:11px!important}
    .top-actions{grid-template-columns:1fr!important}
    .stats{grid-template-columns:1fr 1fr!important}
    .book-grid{grid-template-columns:1fr!important}
    .book-cover{height:235px!important}
    .stream-controls,.admin-viewer-panel .stream-controls{grid-template-columns:1fr!important}
    .stream-start-group,.admin-viewer-panel .stream-start-group{grid-column:auto!important}
    .stream-chat-form,.member-viewer-panel .stream-chat-form,.admin-viewer-panel .stream-chat-form{grid-template-columns:minmax(0,1fr) 70px!important}
    .stream-chat-form button,.member-viewer-panel .stream-chat-form button,.admin-viewer-panel .stream-chat-form button{width:70px!important;min-width:70px!important}
    .stream-recording-actions{grid-template-columns:1fr!important}
    .stream-recording-message{grid-column:auto!important}
    .book-vote-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .book-vote-admin-actions>div{grid-template-columns:1fr!important}
    .password-reset-form{grid-template-columns:1fr!important}
    .password-reset-form button{width:100%!important}
    .subscription-detail-row{display:grid!important;grid-template-columns:1fr!important;gap:3px!important}
    .subscription-detail-row strong{max-width:100%!important;text-align:left!important}
}


/* Full-edge mobile Stream app */
@media(max-width:760px){
    .stream-workspace{
        width:100%!important;
        max-width:100%!important;
        min-height:calc(100dvh - 96px)!important;
        padding:0 0 env(safe-area-inset-bottom)!important;
        margin:0!important;
        overflow-x:hidden!important;
    }
    .stream-content{
        width:100%!important;
        max-width:100%!important;
        min-height:calc(100dvh - 96px)!important;
        padding:0!important;
        margin:0!important;
    }
    .stream-content>.flash{margin:6px!important;border-radius:8px!important}
    #rtcStreamApp{
        width:100%!important;
        max-width:100%!important;
        min-height:calc(100dvh - 96px)!important;
        margin:0!important;
        padding:0!important;
        gap:0!important;
    }
    #rtcStreamApp>.stream-stage-panel{
        display:flex!important;
        flex-direction:column!important;
        width:100%!important;
        max-width:100%!important;
        min-height:calc(100dvh - 96px)!important;
        margin:0!important;
        padding:0!important;
        border-left:0!important;
        border-right:0!important;
        border-radius:0!important;
        box-shadow:none!important;
        overflow:hidden!important;
    }
    #rtcStreamApp .stream-heading,
    #rtcStreamApp .stream-title-editor,
    #rtcStreamApp .video-frame,
    #rtcStreamApp .stream-controls,
    #rtcStreamApp .stream-chat-panel,
    #rtcStreamApp .stream-recordings{
        width:100%!important;
        max-width:100%!important;
        margin-left:0!important;
        margin-right:0!important;
        border-left:0!important;
        border-right:0!important;
        border-radius:0!important;
    }
    #rtcStreamApp .stream-chat-panel{
        display:flex!important;
        flex-direction:column!important;
        flex:1 1 auto!important;
        min-height:240px!important;
        padding:0!important;
        overflow:hidden!important;
        background:#fff!important;
    }
    #rtcStreamApp .stream-chat-head:empty{display:none!important}
    #rtcStreamApp .stream-chat-messages{
        flex:1 1 auto!important;
        width:100%!important;
        min-height:190px!important;
        max-height:none!important;
        padding:10px!important;
        overflow-y:auto!important;
        overscroll-behavior:contain!important;
    }
    #rtcStreamApp .stream-chat-form{
        flex:0 0 auto!important;
        margin-top:auto!important;
        padding-bottom:env(safe-area-inset-bottom)!important;
        background:#fff!important;
        border-top:1px solid #ead8dd!important;
    }
    #rtcStreamApp .stream-chat-feedback:empty{display:none!important}
    #rtcStreamApp .stream-chat-feedback{flex:0 0 auto!important;margin:0!important}
    #rtcStreamApp .admin-stream-recordings{order:15!important}
    #rtcStreamApp .stream-chat-panel{order:20!important}
    #rtcStreamApp>.stream-side{
        width:100%!important;
        margin:0!important;
        padding:0!important;
        gap:0!important;
    }
    #rtcStreamApp>.stream-side>.panel{
        margin:0!important;
        border-radius:0!important;
        border-left:0!important;
        border-right:0!important;
        box-shadow:none!important;
    }
}

@media(max-width:430px){
    .stream-workspace,.stream-content{padding-left:0!important;padding-right:0!important}
    #rtcStreamApp>.stream-stage-panel{border-radius:0!important}
    #rtcStreamApp .stream-chat-messages{min-height:210px!important;padding:9px!important}
}


/* Mobile Stream viewport: full-edge panels with chat composer pinned to the bottom. */
@media(max-width:760px){
    html:has(body.stream-mobile-page),
    body.stream-mobile-page{
        width:100%!important;
        height:100dvh!important;
        min-height:100dvh!important;
        overflow:hidden!important;
        overscroll-behavior:none!important;
    }
    body.stream-mobile-page .app-shell{
        display:flex!important;
        flex-direction:column!important;
        width:100%!important;
        height:100dvh!important;
        min-height:0!important;
        overflow:hidden!important;
    }
    body.stream-mobile-page .sidebar{
        position:relative!important;
        top:auto!important;
        flex:0 0 auto!important;
        width:100%!important;
        margin:0!important;
        border-radius:0!important;
    }
    body.stream-mobile-page .stream-workspace{
        display:flex!important;
        flex:1 1 auto!important;
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        padding:0!important;
        overflow:hidden!important;
    }
    body.stream-mobile-page .stream-content{
        display:flex!important;
        flex:1 1 auto!important;
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        padding:0!important;
        overflow:hidden!important;
    }
    body.stream-mobile-page .stream-content>.flash{
        position:absolute!important;
        z-index:95!important;
        left:6px!important;
        right:6px!important;
        top:6px!important;
        width:auto!important;
        margin:0!important;
    }
    body.stream-mobile-page #rtcStreamApp{
        display:flex!important;
        flex:1 1 auto!important;
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        padding:0!important;
        overflow:hidden!important;
    }
    body.stream-mobile-page #rtcStreamApp>.stream-stage-panel{
        display:flex!important;
        flex-direction:column!important;
        flex:1 1 auto!important;
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
        border-radius:0!important;
        box-shadow:none!important;
        overflow:hidden!important;
    }
    body.stream-mobile-page #rtcStreamApp>.stream-side{
        display:none!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-heading{
        flex:0 0 auto!important;
        min-height:38px!important;
        padding:6px 9px!important;
    }
    body.stream-mobile-page #rtcStreamApp .live-badge{
        min-width:68px!important;
        padding:6px 9px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-error:empty{display:none!important}
    body.stream-mobile-page #rtcStreamApp .stream-error:not(:empty){
        flex:0 0 auto!important;
        margin:0!important;
        padding:6px 9px!important;
        border-radius:0!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-title-editor{
        flex:0 0 auto!important;
        padding:6px 9px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-title-editor label{
        margin-bottom:3px!important;
        font-size:10px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-title-editor input{
        min-height:38px!important;
        height:38px!important;
        padding:7px 9px!important;
        font-size:14px!important;
    }
    body.stream-mobile-page #rtcStreamApp .video-frame{
        flex:0 1 auto!important;
        width:100%!important;
        height:clamp(118px,24dvh,210px)!important;
        min-height:118px!important;
        max-height:210px!important;
        aspect-ratio:auto!important;
        margin:0!important;
        border-radius:0!important;
    }
    body.stream-mobile-page #rtcStreamApp .video-frame video{
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        aspect-ratio:auto!important;
        object-fit:contain!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-controls{
        flex:0 0 auto!important;
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:5px!important;
        width:100%!important;
        margin:0!important;
        padding:6px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-controls>*{
        min-width:0!important;
        min-height:38px!important;
        margin:0!important;
        padding:6px 7px!important;
        font-size:11px!important;
        line-height:1.15!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-start-group{
        display:grid!important;
        grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
        grid-column:1/-1!important;
        gap:5px!important;
        width:100%!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-start-group>#rtcStart{
        min-height:38px!important;
        padding:6px!important;
        font-size:11px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-countdown-input{
        min-height:38px!important;
        padding:4px 6px!important;
        grid-template-columns:auto minmax(42px,1fr) auto!important;
        gap:4px!important;
        font-size:9px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-countdown-input input{
        min-height:30px!important;
        height:30px!important;
        padding:3px 5px!important;
        font-size:13px!important;
    }
    body.stream-mobile-page #rtcStreamApp .admin-stream-recordings{
        flex:0 0 auto!important;
        max-height:66px!important;
        margin:0!important;
        padding:4px 6px!important;
        overflow:hidden!important;
        border-radius:0!important;
    }
    body.stream-mobile-page #rtcStreamApp .admin-stream-recordings .stream-recording-gallery{
        max-height:54px!important;
        padding:0!important;
        overflow-x:auto!important;
        overflow-y:hidden!important;
    }
    body.stream-mobile-page #rtcStreamApp .admin-stream-recordings .stream-recording-card{
        flex-basis:140px!important;
        min-height:46px!important;
        max-height:50px!important;
        overflow:hidden!important;
        padding:3px!important;
    }
    body.stream-mobile-page #rtcStreamApp .admin-stream-recordings .stream-recording-message:empty{display:none!important}
    body.stream-mobile-page #rtcStreamApp .stream-chat-panel{
        display:flex!important;
        flex-direction:column!important;
        flex:1 1 auto!important;
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
        border-radius:0!important;
        background:#fff!important;
        overflow:hidden!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-book-vote:not([hidden]){
        flex:0 1 120px!important;
        max-height:120px!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-chat-head{
        flex:0 0 auto!important;
        min-height:0!important;
        padding:0 8px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-chat-head:empty{display:none!important}
    body.stream-mobile-page #rtcStreamApp .stream-chat-messages{
        flex:1 1 auto!important;
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        padding:8px 9px!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        overscroll-behavior:contain!important;
        -webkit-overflow-scrolling:touch;
    }
    body.stream-mobile-page #rtcStreamApp .stream-chat-form{
        position:relative!important;
        inset:auto!important;
        flex:0 0 auto!important;
        display:grid!important;
        grid-template-columns:minmax(0,1fr) 74px!important;
        width:100%!important;
        margin:0!important;
        padding:0 0 env(safe-area-inset-bottom)!important;
        border-top:1px solid #ead8dd!important;
        background:#fff!important;
        z-index:5!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-chat-form input,
    body.stream-mobile-page #rtcStreamApp .stream-chat-form button{
        min-height:48px!important;
        height:48px!important;
        margin:0!important;
        border-radius:0!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-chat-form button{
        width:74px!important;
        min-width:74px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-chat-feedback:empty{display:none!important}
    body.stream-mobile-page #rtcStreamApp .stream-chat-feedback:not(:empty){
        flex:0 0 auto!important;
        max-height:34px!important;
        margin:0!important;
        padding:4px 8px!important;
        overflow:hidden!important;
    }
}

@media(max-width:430px){
    body.stream-mobile-page .sidebar{padding:7px 8px!important;gap:5px!important}
    body.stream-mobile-page .side-brand{min-height:40px!important;padding:4px 6px!important}
    body.stream-mobile-page .side-brand .brand-mark{width:30px!important;height:30px!important;flex-basis:30px!important}
    body.stream-mobile-page .sidebar .mobile-menu>a,
    body.stream-mobile-page .sidebar .mobile-recordings-toggle,
    body.stream-mobile-page .sidebar .mobile-logout-form button{
        min-height:36px!important;
        padding:7px 8px!important;
        font-size:10px!important;
    }
    body.stream-mobile-page .mobile-subscription-renewal{padding:5px 7px!important;font-size:9px!important}
    body.stream-mobile-page #rtcStreamApp .video-frame{
        height:clamp(108px,22dvh,175px)!important;
        min-height:108px!important;
        max-height:175px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-chat-form{grid-template-columns:minmax(0,1fr) 68px!important}
    body.stream-mobile-page #rtcStreamApp .stream-chat-form button{width:68px!important;min-width:68px!important}
}

/* source-style-15 */
/* Remove the visible Offline/Live strip above the stream player while keeping
   the status element available to the RTC script in the DOM. */
#rtcStreamApp .stream-heading-status-only{
    display:none!important;
}

/* Keep Book Vote in normal document flow above the chat messages so the
   message list can never slide underneath or overlap it. */
#rtcStreamApp .stream-chat-panel{
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    min-height:0!important;
    overflow:hidden!important;
}
#rtcStreamApp .stream-book-vote:not([hidden]){
    position:relative!important;
    inset:auto!important;
    order:1!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    overflow:visible!important;
    z-index:2!important;
}
#rtcStreamApp .stream-chat-head{
    order:0!important;
    flex:0 0 auto!important;
}
#rtcStreamApp .stream-chat-messages{
    position:relative!important;
    inset:auto!important;
    order:2!important;
    flex:1 1 0!important;
    min-height:0!important;
    z-index:1!important;
}
#rtcStreamApp .stream-chat-form{
    order:3!important;
    flex:0 0 auto!important;
}
#rtcStreamApp .stream-chat-feedback{
    order:4!important;
    flex:0 0 auto!important;
}

@media(max-width:760px){
    body.stream-mobile-page #rtcStreamApp .stream-heading-status-only{
        display:none!important;
        height:0!important;
        min-height:0!important;
        margin:0!important;
        padding:0!important;
        border:0!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-book-vote:not([hidden]){
        flex:0 0 auto!important;
        width:100%!important;
        max-height:min(28dvh,190px)!important;
        padding:9px!important;
        overflow-x:hidden!important;
        overflow-y:auto!important;
        border-bottom:1px solid #ead8dd!important;
        background:#fff!important;
        z-index:3!important;
        -webkit-overflow-scrolling:touch;
    }
    body.stream-mobile-page #rtcStreamApp .stream-chat-messages{
        flex:1 1 0!important;
        min-height:0!important;
        max-height:none!important;
        overflow-y:auto!important;
        z-index:1!important;
    }
}

/* source-style-16 */
@media (max-width:760px){
    body.stream-mobile-page #rtcStreamApp .video-frame,
    body.stream-mobile-page #rtcStreamApp .video-frame video,
    body.stream-mobile-page #rtcStreamApp .stream-chat-panel,
    body.stream-mobile-page #rtcStreamApp .stream-chat-head,
    body.stream-mobile-page #rtcStreamApp .stream-chat-messages,
    body.stream-mobile-page #rtcStreamApp .stream-chat-form,
    body.stream-mobile-page #rtcStreamApp .stream-chat-form input,
    body.stream-mobile-page #rtcStreamApp .stream-chat-form button{
        border-radius:0!important;
    }
}

/* source-style-17 */
/* Desktop/web view: give both Admin and Member Stream Chat substantially more
   vertical room. Mobile keeps its full-viewport chat layout unchanged. */
@media (min-width:761px){
    #rtcStreamApp .member-viewer-panel .stream-chat-panel,
    #rtcStreamApp .admin-viewer-panel .stream-chat-panel{
        min-height:430px!important;
        height:auto!important;
        max-height:none!important;
    }

    #rtcStreamApp .member-viewer-panel .stream-chat-messages,
    #rtcStreamApp .admin-viewer-panel .stream-chat-messages{
        flex:0 0 clamp(360px,46vh,520px)!important;
        width:100%!important;
        height:clamp(360px,46vh,520px)!important;
        min-height:360px!important;
        max-height:520px!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
    }
}

/* source-style-18 */
/* Final page-layer safety: keep normal application pages in document flow and
   prevent old/new navigation snapshots or compositor layers from overlapping. */
@view-transition{navigation:none}

html,body{
    max-width:100%;
    overflow-x:hidden;
}
.app-shell{
    position:relative!important;
    isolation:isolate!important;
    overflow:visible!important;
}
.sidebar{
    contain:none!important;
    transform:none!important;
    -webkit-transform:none!important;
    backface-visibility:visible!important;
    -webkit-backface-visibility:visible!important;
    isolation:auto!important;
    view-transition-name:none!important;
}
.workspace,
.content{
    position:relative!important;
    min-width:0!important;
    max-width:100%!important;
}
.workspace{
    z-index:0!important;
}
.content{
    z-index:auto!important;
}
.topbar{
    z-index:3!important;
}
.flash{
    position:relative!important;
    inset:auto!important;
    z-index:auto!important;
}

/* Desktop/tablet: sidebar stays in its grid column instead of painting across
   the main webpage. */
@media(min-width:761px){
    .app-shell{
        display:grid!important;
        grid-template-columns:minmax(205px,252px) minmax(0,1fr)!important;
        align-items:start!important;
    }
    .sidebar{
        grid-column:1!important;
        width:100%!important;
        max-width:252px!important;
        min-width:0!important;
        z-index:2!important;
    }
    .workspace{
        grid-column:2!important;
        width:100%!important;
        min-width:0!important;
        z-index:1!important;
    }
}

/* Standard mobile webpages remain one normal vertical flow. Stream keeps its
   dedicated full-height layout, but alerts no longer float over the player. */
@media(max-width:760px){
    body:not(.stream-mobile-page) .app-shell{
        display:block!important;
        min-height:100dvh!important;
        overflow:visible!important;
    }
    body:not(.stream-mobile-page) .sidebar{
        position:sticky!important;
        top:0!important;
        width:100%!important;
        max-width:none!important;
        z-index:20!important;
    }
    body:not(.stream-mobile-page) .workspace{
        width:100%!important;
        min-width:0!important;
        overflow:visible!important;
        z-index:1!important;
    }
    body.stream-mobile-page .stream-content>.flash{
        position:relative!important;
        left:auto!important;
        right:auto!important;
        top:auto!important;
        width:100%!important;
        margin:0!important;
        flex:0 0 auto!important;
        z-index:4!important;
    }
}

/* source-style-19 */
/* Member Live Stream: keep the current Stream title centered directly above the player. */
#rtcStreamApp[data-role="member"] .member-viewer-panel .stream-heading{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:50px!important;
    margin:0!important;
    padding:11px 18px!important;
    border:0!important;
    border-radius:0!important;
    background:#17191d!important;
    box-shadow:none!important;
}
#rtcStreamApp[data-role="member"] .member-viewer-panel .stream-heading #rtcDisplayTitle{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    color:#fff!important;
    text-align:center!important;
    font-size:clamp(18px,2.2vw,25px)!important;
    line-height:1.2!important;
    font-weight:750!important;
    letter-spacing:.01em!important;
    overflow-wrap:anywhere!important;
}
#rtcStreamApp[data-role="member"] .member-viewer-panel .stream-heading #rtcDisplayTitle[hidden]{
    display:block!important;
}
#rtcStreamApp[data-role="member"] .member-viewer-panel .stream-heading .live-badge{
    display:none!important;
}
@media(max-width:760px){
    #rtcStreamApp[data-role="member"] .member-viewer-panel .stream-heading{
        min-height:44px!important;
        padding:9px 12px!important;
    }
    #rtcStreamApp[data-role="member"] .member-viewer-panel .stream-heading #rtcDisplayTitle{
        font-size:17px!important;
    }
}

/* source-style-20 */
/* COURTREADZ Library: make Bookshelf View fill the available page area,
   wrap books into real shelf rows, and keep excess books inside the shelf. */
.library-panel{
    display:flex!important;
    flex-direction:column!important;
    min-width:0!important;
    overflow:hidden!important;
}
.library-panel .library-tools{
    flex:0 0 auto!important;
}
.library-panel .book-grid{
    min-width:0!important;
    min-height:0!important;
}

/* Desktop/tablet library stays inside the viewport instead of growing below it. */
@media(min-width:761px){
    .library-panel{
        height:calc(100dvh - 132px)!important;
        min-height:0!important;
        max-height:calc(100dvh - 132px)!important;
    }
    .library-panel>.book-grid.bookshelf-view,
    .library-panel>.book-grid.side-view{
        flex:1 1 auto!important;
        min-height:0!important;
        max-height:100%!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        scrollbar-gutter:stable;
    }
}

/* Bookshelf View: every wrapped line is a real shelf row. Empty shelf rows
   continue to the bottom so the bookshelf visually fills the Library panel. */
.book-grid.bookshelf-view{
    --courtreadz-shelf-row:310px;
    --courtreadz-shelf-lip:28px;
    display:flex!important;
    flex-flow:row wrap!important;
    align-content:flex-start!important;
    align-items:flex-end!important;
    justify-content:flex-start!important;
    column-gap:0!important;
    row-gap:0!important;
    width:100%!important;
    padding:0 12px 0!important;
    border-radius:14px!important;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent calc(var(--courtreadz-shelf-row) - var(--courtreadz-shelf-lip)),
            rgba(202,128,145,.20) calc(var(--courtreadz-shelf-row) - var(--courtreadz-shelf-lip)),
            rgba(202,128,145,.20) calc(var(--courtreadz-shelf-row) - 23px),
            rgba(141,66,85,.42) calc(var(--courtreadz-shelf-row) - 23px),
            rgba(141,66,85,.42) calc(var(--courtreadz-shelf-row) - 12px),
            rgba(255,255,255,.72) calc(var(--courtreadz-shelf-row) - 12px),
            rgba(255,255,255,.72) calc(var(--courtreadz-shelf-row) - 9px),
            transparent calc(var(--courtreadz-shelf-row) - 9px),
            transparent var(--courtreadz-shelf-row)
        ),
        linear-gradient(180deg,#fffafc 0%,#fff0f4 100%)!important;
    background-position:0 0!important;
}
.book-grid.bookshelf-view .book-card{
    position:relative!important;
    flex:0 0 auto!important;
    width:auto!important;
    height:var(--courtreadz-shelf-row)!important;
    min-height:var(--courtreadz-shelf-row)!important;
    margin:0!important;
    padding:0 0 var(--courtreadz-shelf-lip)!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:flex-start!important;
    overflow:visible!important;
}
.book-grid.bookshelf-view .book-cover{
    height:258px!important;
    margin:0!important;
    align-self:flex-end!important;
}
.book-grid.bookshelf-view .bookshelf-edit-button{
    top:22px!important;
}

/* Keep the last visible row fully inside the shelf viewport. */
.book-grid.bookshelf-view::after{
    content:"";
    flex:1 0 100%;
    height:0;
}

/* Mobile gets shorter shelf rows while still showing multiple books per row.
   The shelf itself scrolls when needed, so cards never run off the page width. */
@media(max-width:760px){
    .library-panel{
        overflow:hidden!important;
    }
    .library-panel>.book-grid.bookshelf-view,
    .library-panel>.book-grid.side-view{
        width:100%!important;
        max-width:100%!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        overscroll-behavior:contain;
    }
    .library-panel>.book-grid.bookshelf-view{
        --courtreadz-shelf-row:238px;
        --courtreadz-shelf-lip:24px;
        min-height:clamp(300px,52dvh,560px)!important;
        max-height:clamp(300px,58dvh,620px)!important;
        padding-inline:4px!important;
        border-radius:10px!important;
    }
    .book-grid.bookshelf-view .book-card{
        height:var(--courtreadz-shelf-row)!important;
        min-height:var(--courtreadz-shelf-row)!important;
        padding-bottom:var(--courtreadz-shelf-lip)!important;
    }
    .book-grid.bookshelf-view .book-cover{
        height:194px!important;
    }
    .book-grid.bookshelf-view .bookshelf-edit-button{
        top:16px!important;
    }
}

@media(max-width:430px){
    .library-panel>.book-grid.bookshelf-view{
        --courtreadz-shelf-row:220px;
        --courtreadz-shelf-lip:22px;
        min-height:300px!important;
        max-height:54dvh!important;
    }
    .book-grid.bookshelf-view .book-cover{
        height:180px!important;
    }
}

/* source-style-21 */
/* Final responsive navigation sizing: keep links looking like buttons while resizing. */
.sidebar .nav a{
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    text-decoration:none!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
}

@media(min-width:761px){
    .sidebar .mobile-menu{display:none!important}
    .sidebar .nav{display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important}
    .sidebar .nav a{
        min-height:48px!important;
        padding:8px 10px!important;
        border:1px solid rgba(255,255,255,.12)!important;
        border-radius:12px!important;
        background:rgba(255,255,255,.075)!important;
        color:rgba(255,255,255,.92)!important;
        gap:8px!important;
    }
    .sidebar .nav a.active{
        background:#fff!important;
        border-color:#fff!important;
        color:#954057!important;
    }
}

@media(max-width:760px){
    .sidebar .mobile-menu,
    .sidebar .mobile-menu.has-subscribe,
    .sidebar .mobile-menu.has-subscribe.has-vids,
    .sidebar .mobile-menu.has-vids{
        display:grid!important;
        grid-template-columns:repeat(auto-fit,minmax(92px,1fr))!important;
        align-items:stretch!important;
        gap:6px!important;
        width:100%!important;
        min-width:0!important;
        overflow:visible!important;
        padding:1px 0 2px!important;
        scroll-snap-type:none!important;
    }
    .sidebar .mobile-menu>a,
    .sidebar .mobile-recordings-toggle,
    .sidebar .mobile-logout-form,
    .sidebar .mobile-logout-form button{
        width:100%!important;
        min-width:0!important;
        max-width:none!important;
        box-sizing:border-box!important;
    }
    .sidebar .mobile-menu>a,
    .sidebar .mobile-recordings-toggle,
    .sidebar .mobile-logout-form button{
        display:flex!important;
        align-items:center!important;
        justify-content:center!important;
        min-height:42px!important;
        padding:8px 8px!important;
        border:1px solid rgba(255,255,255,.16)!important;
        border-radius:10px!important;
        background:rgba(255,255,255,.10)!important;
        color:#fff!important;
        text-decoration:none!important;
        text-align:center!important;
        font-size:12px!important;
        font-weight:800!important;
        line-height:1.15!important;
        white-space:normal!important;
        overflow-wrap:normal!important;
        word-break:keep-all!important;
        box-shadow:none!important;
        flex:none!important;
    }
    .sidebar .mobile-menu>a.active,
    .sidebar .mobile-recordings-toggle[aria-expanded="true"]{
        background:#fff!important;
        border-color:#fff!important;
        color:#954057!important;
    }
}

@media(max-width:430px){
    .sidebar .mobile-menu,
    .sidebar .mobile-menu.has-subscribe,
    .sidebar .mobile-menu.has-subscribe.has-vids,
    .sidebar .mobile-menu.has-vids{
        grid-template-columns:repeat(auto-fit,minmax(82px,1fr))!important;
    }
    .sidebar .mobile-menu>a,
    .sidebar .mobile-recordings-toggle,
    .sidebar .mobile-logout-form button{
        min-height:40px!important;
        padding:7px 6px!important;
        font-size:11px!important;
    }
}

@media(max-width:350px){
    .sidebar .mobile-menu,
    .sidebar .mobile-menu.has-subscribe,
    .sidebar .mobile-menu.has-subscribe.has-vids,
    .sidebar .mobile-menu.has-vids{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}

/* source-style-22 */
/* Desktop/web Stream view: keep the entire Stream + Vote + Chat composition
   inside the browser viewport. Book Vote uses reserved space and the messages
   area gives up height instead of pushing the page below the fold. */
@media (min-width:761px){
    html:has(body.stream-mobile-page),
    body.stream-mobile-page{
        width:100%!important;
        height:100dvh!important;
        min-height:100dvh!important;
        overflow:hidden!important;
        overscroll-behavior:none!important;
    }

    body.stream-mobile-page .app-shell{
        height:100dvh!important;
        min-height:0!important;
        max-height:100dvh!important;
        overflow:hidden!important;
        align-items:stretch!important;
    }

    body.stream-mobile-page .sidebar{
        height:100dvh!important;
        min-height:0!important;
        max-height:100dvh!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        overscroll-behavior:contain!important;
    }

    body.stream-mobile-page .stream-workspace{
        display:flex!important;
        width:100%!important;
        height:100dvh!important;
        min-height:0!important;
        max-height:100dvh!important;
        margin:0!important;
        padding:10px!important;
        overflow:hidden!important;
    }

    body.stream-mobile-page .stream-content{
        display:flex!important;
        flex:1 1 auto!important;
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        max-height:100%!important;
        margin:0!important;
        padding:0!important;
        overflow:hidden!important;
    }

    body.stream-mobile-page .stream-content>.flash{
        flex:0 0 auto!important;
        max-height:54px!important;
        overflow:auto!important;
    }

    body.stream-mobile-page #rtcStreamApp{
        flex:1 1 auto!important;
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        max-height:100%!important;
        margin:0!important;
        overflow:hidden!important;
        align-items:stretch!important;
    }

    body.stream-mobile-page #rtcStreamApp>.stream-stage-panel,
    body.stream-mobile-page #rtcStreamApp>.member-viewer-panel,
    body.stream-mobile-page #rtcStreamApp>.admin-viewer-panel{
        display:flex!important;
        flex-direction:column!important;
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        max-height:100%!important;
        overflow:hidden!important;
    }

    body.stream-mobile-page #rtcStreamApp .stream-heading,
    body.stream-mobile-page #rtcStreamApp .stream-title-editor,
    body.stream-mobile-page #rtcStreamApp .stream-error,
    body.stream-mobile-page #rtcStreamApp .stream-controls{
        flex:0 0 auto!important;
    }

    /* The player adapts to the available viewport instead of forcing the chat
       below the page. Admin gets a slightly shorter player because it also has
       title and broadcast-control rows. */
    body.stream-mobile-page #rtcStreamApp .member-viewer-panel .video-frame{
        flex:0 1 auto!important;
        width:min(720px,100%)!important;
        height:clamp(190px,36dvh,405px)!important;
        min-height:190px!important;
        max-height:405px!important;
        aspect-ratio:auto!important;
    }
    body.stream-mobile-page #rtcStreamApp .admin-viewer-panel .video-frame{
        flex:0 1 auto!important;
        width:100%!important;
        height:clamp(175px,30dvh,340px)!important;
        min-height:175px!important;
        max-height:340px!important;
        aspect-ratio:auto!important;
    }
    body.stream-mobile-page #rtcStreamApp .video-frame video{
        width:100%!important;
        height:100%!important;
        min-height:0!important;
        max-height:100%!important;
        object-fit:contain!important;
    }

    /* Override the older desktop 430px / 360px chat minimums. The chat owns
       whatever viewport space remains after the player and controls. */
    body.stream-mobile-page #rtcStreamApp .member-viewer-panel .stream-chat-panel,
    body.stream-mobile-page #rtcStreamApp .admin-viewer-panel .stream-chat-panel{
        display:flex!important;
        flex-direction:column!important;
        flex:1 1 0!important;
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        overflow:hidden!important;
    }

    body.stream-mobile-page #rtcStreamApp .stream-book-vote:not([hidden]){
        position:relative!important;
        inset:auto!important;
        flex:0 1 auto!important;
        width:100%!important;
        min-height:0!important;
        max-height:min(25dvh,220px)!important;
        margin:0!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        overscroll-behavior:contain!important;
        -webkit-overflow-scrolling:touch;
    }

    body.stream-mobile-page #rtcStreamApp .member-viewer-panel .stream-chat-messages,
    body.stream-mobile-page #rtcStreamApp .admin-viewer-panel .stream-chat-messages,
    body.stream-mobile-page #rtcStreamApp .stream-chat-messages{
        flex:1 1 0!important;
        width:100%!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        overscroll-behavior:contain!important;
    }

    body.stream-mobile-page #rtcStreamApp .stream-chat-form,
    body.stream-mobile-page #rtcStreamApp .stream-chat-feedback{
        flex:0 0 auto!important;
    }

    /* Admin recordings and right-side status panels stay inside the same
       viewport rather than adding document height. */
    body.stream-mobile-page #rtcStreamApp .admin-stream-recordings{
        flex:0 0 auto!important;
        max-height:104px!important;
        margin:0!important;
        overflow:hidden!important;
    }
    body.stream-mobile-page #rtcStreamApp .admin-stream-recordings .stream-recording-gallery{
        max-height:72px!important;
        overflow-y:auto!important;
        overflow-x:auto!important;
    }
    body.stream-mobile-page #rtcStreamApp>.stream-side{
        height:100%!important;
        min-height:0!important;
        max-height:100%!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        overscroll-behavior:contain!important;
    }
}

/* Short desktop/laptop screens need a little more compression so the composer
   remains visible even with Book Vote open. */
@media (min-width:761px) and (max-height:760px){
    body.stream-mobile-page .stream-workspace{padding:6px!important}
    body.stream-mobile-page #rtcStreamApp .member-viewer-panel .video-frame{
        height:clamp(170px,31dvh,300px)!important;
        min-height:170px!important;
    }
    body.stream-mobile-page #rtcStreamApp .admin-viewer-panel .video-frame{
        height:clamp(150px,25dvh,250px)!important;
        min-height:150px!important;
    }
    body.stream-mobile-page #rtcStreamApp .stream-book-vote:not([hidden]){
        max-height:min(22dvh,165px)!important;
    }
    body.stream-mobile-page #rtcStreamApp .admin-stream-recordings{
        max-height:78px!important;
    }
}

/* source-style-23 */
/* Members: the Stream player must span the complete connected panel width. */
#rtcStreamApp[data-role="member"] .member-viewer-panel .video-frame{
    display:block!important;
    align-self:stretch!important;
    width:100%!important;
    min-width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
}
#rtcStreamApp[data-role="member"] .member-viewer-panel .video-frame video{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    box-sizing:border-box!important;
}
#rtcStreamApp[data-role="member"] .member-viewer-panel .video-placeholder{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    box-sizing:border-box!important;
}
#rtcStreamApp[data-role="member"] .member-viewer-panel .video-frame.has-video .video-placeholder{
    display:none!important;
}

/* source-style-24 */
/* Keep every bookshelf spine physically planted on its shelf line. */
.book-grid.bookshelf-view .book-card,
.book-grid.bookshelf-view .book-card:hover{
    transform:none!important;
}
.book-grid.bookshelf-view .book-cover,
.book-grid.bookshelf-view .book-card:hover .book-cover,
.book-grid.bookshelf-view .book-cover:hover{
    transform:none!important;
    margin-top:auto!important;
    margin-bottom:0!important;
    filter:none!important;
    box-shadow:
        inset 1px 0 0 rgba(255,255,255,.18),
        inset 8px 0 0 rgba(255,255,255,.08),
        inset -10px 0 0 rgba(0,0,0,.15),
        2px 2px 4px rgba(28,20,35,.16)!important;
}
.book-grid.bookshelf-view .book-card{
    align-items:flex-end!important;
}

/* source-style-25 */
/* Bookshelf View: keep books seated on the shelf, with a small desktop hover lift. */
.book-grid.bookshelf-view .book-cover{
    transition:transform .16s ease, box-shadow .16s ease!important;
    transform:translateY(0)!important;
}
@media (hover:hover) and (pointer:fine){
    .book-grid.bookshelf-view .book-card:hover .book-cover,
    .book-grid.bookshelf-view .book-cover:hover{
        transform:translateY(-6px)!important;
        box-shadow:
            inset 1px 0 0 rgba(255,255,255,.18),
            inset 8px 0 0 rgba(255,255,255,.08),
            inset -10px 0 0 rgba(0,0,0,.15),
            2px 5px 7px rgba(28,20,35,.20)!important;
    }
}

/* source-style-26 */
/* Book reader: make the saved book cover the physical first leaf. */
@media (min-width:521px){
    .reader-dialog .book-opening{
        inset:auto!important;
        left:50%!important;
        top:50%!important;
        width:min(1180px,92vw)!important;
        height:min(760px,78vh)!important;
        transform:translate(-50%,-50%)!important;
        display:block!important;
        perspective:2800px!important;
        pointer-events:none!important;
    }
    .reader-dialog .book-opening::before{
        content:"";
        position:absolute;
        z-index:0;
        right:0;
        top:0;
        width:50%;
        height:100%;
        border-radius:7px 30px 30px 7px;
        background:#d7c9b5;
        box-shadow:0 30px 64px rgba(0,0,0,.42);
        transform:translateZ(-8px);
        pointer-events:none;
    }
    .reader-dialog .book-opening-cover{
        position:absolute!important;
        z-index:2!important;
        right:0!important;
        top:0!important;
        width:50%!important;
        height:100%!important;
        max-width:none!important;
        max-height:none!important;
        margin:0!important;
        border-radius:7px 30px 30px 7px!important;
        transform-origin:left center!important;
        pointer-events:auto!important;
    }
    .reader-shell.opened .book-opening-cover{
        transform:rotateY(-178deg) translateZ(3px)!important;
    }
    .reader-shell:not(.opened) .spread-wrap{
        opacity:0!important;
        transform:none!important;
        pointer-events:none!important;
    }
    .reader-shell.opened .spread-wrap{
        opacity:1!important;
        transform:none!important;
    }
}
@media (max-width:520px){
    .reader-dialog .book-opening{
        inset:auto!important;
        left:50%!important;
        top:50%!important;
        width:98vw!important;
        height:min(70dvh,660px)!important;
        min-height:300px!important;
        transform:translate(-50%,-50%)!important;
        display:block!important;
        pointer-events:none!important;
    }
    .reader-dialog .book-opening-cover{
        position:absolute!important;
        inset:0!important;
        width:100%!important;
        height:100%!important;
        max-width:none!important;
        max-height:none!important;
        margin:0!important;
        border-radius:22px!important;
        transform-origin:left center!important;
        pointer-events:auto!important;
    }
    .reader-shell.opened .book-opening-cover{
        transform:rotateY(-178deg) translateZ(3px)!important;
    }
    .reader-shell:not(.opened) .spread-wrap{opacity:0!important;pointer-events:none!important}
    .reader-shell.opened .spread-wrap{opacity:1!important;transform:none!important}
}

/* source-style-27 */
/* Real-book opening sequence:
   closed = cover only;
   opening = cover turns while the paper block opens underneath;
   opened = physical pages remain present for all page turns. */
.reader-dialog .book-spread{
    isolation:isolate!important;
}
.reader-dialog .book-spread::before{
    content:""!important;
    position:absolute!important;
    z-index:0!important;
    inset:7px 5px -12px!important;
    border-radius:25px!important;
    background:#eee4d4!important;
    box-shadow:
        0 2px 0 #fffaf0,
        0 5px 0 #e8dece,
        0 8px 0 #fffaf0,
        0 11px 0 #ddd1bf,
        0 15px 24px rgba(32,22,16,.22),
        0 34px 70px rgba(0,0,0,.36)!important;
    transform:translateZ(-12px)!important;
    pointer-events:none!important;
}
.reader-dialog .reader-static-page{
    display:block;
    opacity:1!important;
    visibility:visible!important;
    background-color:#fffaf0!important;
}
.reader-dialog .reader-static-page.blank{
    background-color:#fffaf0!important;
}
.reader-dialog .reader-static-page.blank .reader-page-text{
    min-height:100%!important;
}
.reader-dialog .reader-static-page.left{
    border-left:1px solid rgba(121,91,64,.15)!important;
}
.reader-dialog .reader-static-page.right{
    border-right:1px solid rgba(121,91,64,.15)!important;
}

/* A closed book shows only the front cover. No open spread or page block is
   visible until the user actually opens the cover. */
.reader-shell:not(.opened) .spread-wrap{
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
}
.reader-shell:not(.opened) .book-opening::before{
    display:none!important;
    content:none!important;
}

@media (min-width:521px){
    .reader-dialog .book-opening{
        transition:opacity .18s ease .80s,visibility 0s linear .98s!important;
    }
    .reader-dialog .book-opening-cover{
        transform:translateX(0) rotateY(0deg)!important;
        transition:transform .96s cubic-bezier(.16,.82,.12,1),filter .96s ease!important;
        will-change:transform,filter!important;
    }
    .reader-shell.opened .book-opening-cover{
        transform:translateX(-2.5%) rotateY(-178deg) translateZ(3px)!important;
        filter:brightness(.68)!important;
    }

    /* The paper block begins under the closed front cover, then reveals toward
       the left at the same time the cover turns. This creates the closed-book
       to open-book motion instead of displaying an already-open book. */
    .reader-dialog .spread-wrap{
        transform-origin:right center!important;
        clip-path:inset(0 0 0 50%)!important;
        -webkit-clip-path:inset(0 0 0 50%)!important;
        transform:translateX(5.5%) scale(.985)!important;
        transition:
            opacity .10s ease 0s,
            transform .94s cubic-bezier(.16,.82,.12,1) 0s,
            clip-path .94s cubic-bezier(.16,.82,.12,1) 0s,
            -webkit-clip-path .94s cubic-bezier(.16,.82,.12,1) 0s!important;
        will-change:transform,clip-path,opacity!important;
    }
    .reader-shell.opened .spread-wrap{
        opacity:1!important;
        visibility:visible!important;
        pointer-events:auto!important;
        clip-path:inset(0 0 0 0)!important;
        -webkit-clip-path:inset(0 0 0 0)!important;
        transform:translateX(0) scale(1)!important;
    }
}

@media (max-width:520px){
    .reader-dialog .book-opening{
        transition:opacity .16s ease .72s,visibility 0s linear .90s!important;
    }
    .reader-dialog .book-opening-cover{
        transform:translateX(0) rotateY(0deg)!important;
        transition:transform .88s cubic-bezier(.16,.82,.12,1),filter .88s ease!important;
        will-change:transform,filter!important;
    }
    .reader-shell.opened .book-opening-cover{
        transform:translateX(-4%) rotateY(-176deg) translateZ(3px)!important;
        filter:brightness(.68)!important;
    }
    .reader-dialog .spread-wrap{
        opacity:0!important;
        visibility:hidden!important;
        transform-origin:left center!important;
        transform:translateX(10%) scale(.92)!important;
        transition:opacity .10s ease 0s,transform .86s cubic-bezier(.16,.82,.12,1) 0s!important;
        will-change:transform,opacity!important;
    }
    .reader-shell.opened .spread-wrap{
        opacity:1!important;
        visibility:visible!important;
        pointer-events:auto!important;
        transform:translateX(0) scale(1)!important;
    }
    .reader-dialog .book-spread::before{
        inset:5px 4px -10px!important;
        border-radius:22px!important;
        box-shadow:
            0 2px 0 #fffaf0,
            0 5px 0 #e6dccd,
            0 8px 0 #fffaf0,
            0 13px 22px rgba(32,22,16,.20),
            0 25px 48px rgba(0,0,0,.30)!important;
    }
}

/* source-style-28 */
/* Reader 3D: keep the book straight; create depth from the physical paper stack. */
.reader-shell.opened .book-spread{
    transform-style:preserve-3d!important;
    filter:drop-shadow(0 22px 24px rgba(24,16,12,.28))!important;
}

/* The visible block underneath the open pages is made from thin paper layers,
   so the book has thickness without tilting the whole reader. */
.reader-dialog .book-spread::before{
    inset:5px 3px -16px!important;
    border:1px solid rgba(105,78,54,.18)!important;
    border-radius:25px 25px 28px 28px!important;
    background:
        repeating-linear-gradient(
            to bottom,
            #fffaf0 0,
            #fffaf0 2px,
            #e9dfd0 2px,
            #e9dfd0 3px,
            #f7efe4 3px,
            #f7efe4 5px
        )!important;
    box-shadow:
        0 2px 0 #f7efe4,
        0 4px 0 #e2d6c5,
        0 6px 0 #fffaf0,
        0 8px 0 #ded1bf,
        0 11px 0 #f8f0e5,
        0 14px 0 #d7cab8,
        0 20px 24px rgba(45,31,22,.24),
        0 34px 55px rgba(0,0,0,.28)!important;
    transform:translateZ(-16px)!important;
}

/* Each open sheet sits slightly above the block. The outer edge shows a few
   tiny paper layers, while the centre edge sinks naturally into the gutter. */
.reader-dialog .reader-static-page.left{
    transform:perspective(2400px) rotateY(1.2deg) translateZ(7px)!important;
    border-bottom:1px solid rgba(112,82,56,.18)!important;
    box-shadow:
        inset -38px 0 56px rgba(67,43,27,.16),
        inset 11px 0 24px rgba(255,255,255,.62),
        -1px 1px 0 #f7efe4,
        -2px 2px 0 #e9ddcc,
        -3px 3px 0 #f8f1e6,
        -4px 4px 0 #ddd0bd,
        0 10px 18px rgba(31,21,15,.12)!important;
}
.reader-dialog .reader-static-page.right{
    transform:perspective(2400px) rotateY(-1.2deg) translateZ(7px)!important;
    border-bottom:1px solid rgba(112,82,56,.18)!important;
    box-shadow:
        inset 38px 0 56px rgba(67,43,27,.16),
        inset -11px 0 24px rgba(255,255,255,.62),
        1px 1px 0 #f7efe4,
        2px 2px 0 #e9ddcc,
        3px 3px 0 #f8f1e6,
        4px 4px 0 #ddd0bd,
        0 10px 18px rgba(31,21,15,.12)!important;
}

/* Deeper physical spine between the two raised page blocks. */
.reader-dialog .book-spine{
    width:12px!important;
    background:
        linear-gradient(90deg,
            transparent 0%,
            rgba(45,28,17,.18) 18%,
            rgba(40,24,15,.46) 43%,
            rgba(255,255,255,.18) 51%,
            rgba(42,26,16,.39) 60%,
            rgba(45,28,17,.14) 82%,
            transparent 100%)!important;
    box-shadow:0 0 22px rgba(50,31,19,.30), inset 0 0 5px rgba(255,255,255,.12)!important;
}

/* A turning sheet has its own thin edge and lifts above both page stacks. */
.reader-dialog .reader-leaf.active{
    transform-style:preserve-3d!important;
    filter:drop-shadow(var(--leaf-shadow-x,0px) var(--leaf-shadow-y,18px) var(--leaf-shadow-blur,24px) rgba(0,0,0,var(--leaf-shadow-alpha,.30)))!important;
}
.reader-dialog .reader-leaf.active::before{
    border:1px solid rgba(118,88,62,.14)!important;
    box-shadow:
        inset 0 -1px 0 rgba(109,79,53,.14),
        inset var(--curl-inset-x,0px) 0 var(--curl-inset-blur,0px) rgba(80,50,28,var(--curl-inset-alpha,0)),
        0 1px 0 #f5ecdf,
        0 2px 0 #e1d5c4,
        0 4px 7px rgba(42,29,20,.16)!important;
}

/* Give the closed cover physical thickness without showing an already-open book. */
.reader-dialog .book-opening-cover{
    box-shadow:
        inset 18px 0 rgba(0,0,0,.20),
        inset 22px 0 rgba(255,255,255,.07),
        2px 2px 0 rgba(237,225,209,.72),
        4px 4px 0 rgba(207,191,170,.82),
        0 24px 34px rgba(0,0,0,.26),
        0 42px 80px rgba(0,0,0,.44)!important;
}

@media (max-width:520px){
    .reader-shell.opened .book-spread{
        filter:drop-shadow(0 14px 16px rgba(24,16,12,.24))!important;
    }
    .reader-dialog .book-spread::before{
        inset:4px 3px -10px!important;
        box-shadow:
            0 2px 0 #f7efe4,
            0 4px 0 #e2d6c5,
            0 6px 0 #fffaf0,
            0 8px 0 #d9ccba,
            0 14px 19px rgba(45,31,22,.22),
            0 23px 36px rgba(0,0,0,.24)!important;
    }
    .reader-dialog .reader-static-page.left{
        box-shadow:
            inset -24px 0 38px rgba(67,43,27,.14),
            -1px 1px 0 #f7efe4,
            -2px 2px 0 #e7dac8,
            0 7px 12px rgba(31,21,15,.10)!important;
    }
    .reader-dialog .reader-static-page.right{
        box-shadow:
            inset 24px 0 38px rgba(67,43,27,.14),
            1px 1px 0 #f7efe4,
            2px 2px 0 #e7dac8,
            0 7px 12px rgba(31,21,15,.10)!important;
    }
    .reader-dialog .book-spine{width:8px!important}
}

/* source-style-29 */
/* Stable first cover + real 3D paper. This final layer intentionally replaces
   the older clip-path/visibility cover transitions, which could leave the
   first leaf in a half-composited state when the reader was opened again. */
.reader-dialog .reader-stage{
    perspective:3000px!important;
}
.reader-shell.cover-reset .book-opening,
.reader-shell.cover-reset .book-opening-cover,
.reader-shell.cover-reset .spread-wrap{
    transition:none!important;
    animation:none!important;
}
.reader-shell:not(.opened) .book-opening{
    opacity:1!important;
    visibility:visible!important;
    transition:none!important;
}
.reader-shell:not(.opened) .book-opening-cover{
    transform:translate3d(0,0,0) rotateY(0deg)!important;
    filter:none!important;
}
/* Keep the page block painted but invisible behind the closed cover. Using
   scale instead of clip-path avoids the cover/page flash seen on GPU layers. */
.reader-shell:not(.opened) .spread-wrap{
    visibility:visible!important;
    opacity:0!important;
    pointer-events:none!important;
    clip-path:none!important;
    -webkit-clip-path:none!important;
    transform-origin:right center!important;
    transform:translate3d(4.5%,0,-12px) scaleX(.52) scaleY(.985)!important;
}
.reader-shell.opened .spread-wrap{
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    clip-path:none!important;
    -webkit-clip-path:none!important;
    transform-origin:right center!important;
    transform:translate3d(0,0,0) scaleX(1) scaleY(1)!important;
    transition:transform .92s cubic-bezier(.16,.82,.12,1),opacity .16s ease .04s!important;
}
.reader-shell.opened .book-opening{
    opacity:1!important;
    visibility:hidden!important;
    /* Keep the cover layer alive for the full turn, then remove it in one
       discrete step. Fading the parent during rotateY caused the first-cover
       flicker on some browsers. */
    transition:visibility 0s linear 1s!important;
}
.reader-shell.opened .book-opening-cover{
    transform:translate3d(-2.5%,0,14px) rotateY(-177deg)!important;
    filter:brightness(.70)!important;
    transition:transform .96s cubic-bezier(.16,.82,.12,1),filter .96s ease!important;
    backface-visibility:hidden!important;
    -webkit-backface-visibility:hidden!important;
    transform-style:preserve-3d!important;
}

/* Physical paper stack: visible sheets stay under the two readable pages. */
.reader-dialog .book-spread::before{
    inset:4px 2px -18px!important;
    border:1px solid rgba(103,77,53,.18)!important;
    border-radius:26px 26px 30px 30px!important;
    background:
        repeating-linear-gradient(to bottom,
            #fffaf0 0,#fffaf0 2px,
            #e7dccb 2px,#e7dccb 3px,
            #f9f1e6 3px,#f9f1e6 5px)!important;
    box-shadow:
        0 2px 0 #fff9ef,
        0 4px 0 #eadfce,
        0 6px 0 #fffaf0,
        0 8px 0 #dfd2c0,
        0 10px 0 #f8efe3,
        0 12px 0 #d8cab7,
        0 15px 0 #f7eee2,
        0 18px 0 #d2c3af,
        0 24px 28px rgba(45,31,22,.25),
        0 42px 62px rgba(0,0,0,.30)!important;
    transform:translateZ(-18px)!important;
}
.reader-dialog .reader-static-page.left{
    transform:perspective(2600px) rotateY(1.35deg) translateZ(9px)!important;
    box-shadow:
        inset -40px 0 58px rgba(67,43,27,.17),
        inset 12px 0 24px rgba(255,255,255,.62),
        -1px 1px 0 #fff8ed,
        -2px 2px 0 #e9ddcc,
        -3px 3px 0 #f7eee2,
        -4px 4px 0 #d9cbb8,
        -5px 5px 0 #f6ecdf,
        0 12px 20px rgba(31,21,15,.13)!important;
}
.reader-dialog .reader-static-page.right{
    transform:perspective(2600px) rotateY(-1.35deg) translateZ(9px)!important;
    box-shadow:
        inset 40px 0 58px rgba(67,43,27,.17),
        inset -12px 0 24px rgba(255,255,255,.62),
        1px 1px 0 #fff8ed,
        2px 2px 0 #e9ddcc,
        3px 3px 0 #f7eee2,
        4px 4px 0 #d9cbb8,
        5px 5px 0 #f6ecdf,
        0 12px 20px rgba(31,21,15,.13)!important;
}
.reader-dialog .book-spine{
    width:14px!important;
    transform:translateX(-50%) translateZ(12px)!important;
    background:linear-gradient(90deg,
        transparent 0%,rgba(47,29,18,.16) 12%,rgba(39,23,14,.52) 43%,
        rgba(255,255,255,.18) 50%,rgba(39,23,14,.48) 58%,
        rgba(47,29,18,.14) 88%,transparent 100%)!important;
    box-shadow:0 0 24px rgba(49,30,18,.34),inset 0 0 5px rgba(255,255,255,.12)!important;
}
/* Turning page rises above the stack and exposes a thin paper edge. */
.reader-dialog .reader-leaf.active{
    --page-bulge:18px!important;
    transform-style:preserve-3d!important;
    backface-visibility:visible!important;
    filter:drop-shadow(var(--leaf-shadow-x,0px) var(--leaf-shadow-y,18px) var(--leaf-shadow-blur,26px) rgba(0,0,0,var(--leaf-shadow-alpha,.31)))!important;
}
.reader-dialog .reader-leaf.active::before{
    border:1px solid rgba(116,86,59,.17)!important;
    box-shadow:
        inset 0 -1px 0 rgba(106,76,51,.17),
        inset var(--curl-inset-x,0px) 0 var(--curl-inset-blur,0px) rgba(80,50,28,var(--curl-inset-alpha,0)),
        0 1px 0 #fff8ed,
        0 2px 0 #e9ddcc,
        0 3px 0 #f6ecdf,
        0 6px 10px rgba(42,29,20,.18)!important;
}
/* Closed cover has its own hard-cover thickness, but no page stack is visible
   until the opening starts. */
.reader-dialog .book-opening-cover{
    box-shadow:
        inset 18px 0 rgba(0,0,0,.20),
        inset 22px 0 rgba(255,255,255,.07),
        1px 1px 0 #f2e7d8,
        3px 3px 0 #d9c8b1,
        5px 5px 0 #cbb99f,
        0 26px 36px rgba(0,0,0,.28),
        0 44px 82px rgba(0,0,0,.43)!important;
}
@media (max-width:520px){
    .reader-shell:not(.opened) .spread-wrap{
        transform-origin:left center!important;
        transform:translate3d(7%,0,-9px) scale(.94)!important;
    }
    .reader-shell.opened .spread-wrap{
        transform-origin:left center!important;
        transform:translate3d(0,0,0) scale(1)!important;
        transition:transform .86s cubic-bezier(.16,.82,.12,1),opacity .14s ease .04s!important;
    }
    .reader-shell.opened .book-opening-cover{
        transform:translate3d(-4%,0,11px) rotateY(-176deg)!important;
        transition-duration:.90s!important;
    }
    .reader-shell.opened .book-opening{transition:visibility 0s linear .94s!important}
    .reader-dialog .book-spread::before{
        inset:3px 2px -11px!important;
        box-shadow:
            0 2px 0 #fff9ef,0 4px 0 #e8ddcc,0 6px 0 #fffaf0,
            0 8px 0 #d9cbb8,0 11px 0 #f4eadc,
            0 17px 21px rgba(45,31,22,.22),0 28px 42px rgba(0,0,0,.25)!important;
    }
    .reader-dialog .reader-static-page.left,
    .reader-dialog .reader-static-page.right{
        transform:translateZ(7px)!important;
    }
    .reader-dialog .book-spine{width:8px!important}
}
@media (prefers-reduced-motion:reduce){
    .reader-dialog .book-opening,
    .reader-dialog .book-opening-cover,
    .reader-dialog .spread-wrap{transition-duration:.01ms!important;transition-delay:0ms!important}
}

/* source-style-30 */
/* Keep the reader anchored while the cover opens. The book's footprint never
   translates left or right; only the cover rotates and the paper stack fades/
   lifts into depth in place. */
.reader-dialog .spread-wrap,
.reader-shell:not(.opened) .spread-wrap,
.reader-shell.opened .spread-wrap{
    transform-origin:center center!important;
    margin-left:auto!important;
    margin-right:auto!important;
}
.reader-shell:not(.opened) .spread-wrap{
    transform:translate3d(0,0,-12px) scaleX(1) scaleY(.985)!important;
    opacity:0!important;
}
.reader-shell.opened .spread-wrap{
    transform:translate3d(0,0,0) scaleX(1) scaleY(1)!important;
    opacity:1!important;
    transition:opacity .18s ease .05s,transform .92s cubic-bezier(.16,.82,.12,1)!important;
}
.reader-shell:not(.opened) .book-opening-cover{
    transform:translate3d(0,0,0) rotateY(0deg)!important;
}
.reader-shell.opened .book-opening-cover{
    transform:translate3d(0,0,14px) rotateY(-177deg)!important;
}
@media(max-width:520px){
    .reader-shell:not(.opened) .spread-wrap{
        transform:translate3d(0,0,-9px) scale(1)!important;
    }
    .reader-shell.opened .spread-wrap{
        transform:translate3d(0,0,0) scale(1)!important;
    }
    .reader-shell.opened .book-opening-cover{
        transform:translate3d(0,0,11px) rotateY(-176deg)!important;
    }
}

/* source-style-31 */
/* Bookshelf View: spine width follows the actual amount of written book content.
   This intentionally overrides the old decorative nth-child/random widths. */
.book-grid.bookshelf-view .book-cover,
.book-grid.bookshelf-view .book-card:nth-child(6n+1) .book-cover,
.book-grid.bookshelf-view .book-card:nth-child(6n+2) .book-cover,
.book-grid.bookshelf-view .book-card:nth-child(6n+3) .book-cover,
.book-grid.bookshelf-view .book-card:nth-child(6n+4) .book-cover,
.book-grid.bookshelf-view .book-card:nth-child(6n+5) .book-cover,
.book-grid.bookshelf-view .book-card:nth-child(6n+6) .book-cover{
    width:var(--book-spine-width,60px)!important;
    min-width:var(--book-spine-width,60px)!important;
    max-width:var(--book-spine-width,60px)!important;
    box-sizing:border-box!important;
}

/* Keep every title centred on the physical spine regardless of thickness. */
.book-grid.bookshelf-view .book-cover strong{
    position:relative!important;
    z-index:1!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    writing-mode:vertical-rl!important;
    text-orientation:mixed!important;
    transform:rotate(180deg)!important;
    transform-origin:center center!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
}

@media(max-width:760px){
    .book-grid.bookshelf-view .book-cover,
    .book-grid.bookshelf-view .book-card:nth-child(6n+1) .book-cover,
    .book-grid.bookshelf-view .book-card:nth-child(6n+2) .book-cover,
    .book-grid.bookshelf-view .book-card:nth-child(6n+3) .book-cover,
    .book-grid.bookshelf-view .book-card:nth-child(6n+4) .book-cover,
    .book-grid.bookshelf-view .book-card:nth-child(6n+5) .book-cover,
    .book-grid.bookshelf-view .book-card:nth-child(6n+6) .book-cover{
        width:var(--book-spine-width-mobile,46px)!important;
        min-width:var(--book-spine-width-mobile,46px)!important;
        max-width:var(--book-spine-width-mobile,46px)!important;
    }
}

/* source-style-32 */
/* Phone reader: every page lives on one physical left-side stack. The right
   static page is never used. Forward turns move from the book out to the left;
   backward turns come from the left back into the book. */
@media(max-width:520px){
    .reader-dialog .reader-static-page.left:not(.reader-pagination-probe){
        display:flex!important;
        left:0!important;
        right:auto!important;
        width:100%!important;
        border-radius:22px!important;
        clip-path:none!important;
        -webkit-clip-path:none!important;
        transform:translateZ(7px)!important;
        padding:22px 24px 44px!important;
        box-shadow:
            inset 18px 0 34px rgba(70,45,28,.11),
            inset -8px 0 20px rgba(255,255,255,.42),
            -1px 1px 0 #fff8ed,
            -2px 2px 0 #e9ddcc,
            -3px 3px 0 #f7eee2,
            0 8px 18px rgba(26,17,12,.14)!important;
    }
    .reader-dialog .reader-static-page.left:not(.reader-pagination-probe)::after{display:none!important}
    .reader-dialog .reader-static-page.left:not(.reader-pagination-probe)::before{
        background:linear-gradient(90deg,rgba(111,76,44,.10),transparent 11%,transparent 91%,rgba(78,49,28,.06))!important;
    }
    .reader-dialog .reader-static-page.right{
        display:none!important;
    }
    .reader-dialog .reader-leaf.forward,
    .reader-dialog .reader-leaf.backward{
        left:0!important;
        right:auto!important;
        width:100%!important;
        transform-origin:left center!important;
        border-radius:22px!important;
    }
    .reader-dialog .reader-leaf.forward>.reader-leaf-face,
    .reader-dialog .reader-leaf.backward>.reader-leaf-face{
        border-radius:22px!important;
    }
    .reader-dialog .reader-drag-hint::before{
        content:"Swipe left to turn out · swipe right to bring a page back"!important;
    }
}
@media(max-width:430px){
    .reader-dialog .reader-static-page.left:not(.reader-pagination-probe){
        padding:18px 19px 40px!important;
    }
}

/* source-style-33 */
/* Keep shelf titles readable even when page-count logic makes a book very thin.
   The physical spine width is unchanged; only the title layer adapts to it. */
.book-grid.bookshelf-view .book-cover{
    padding:0!important;
}
.book-grid.bookshelf-view .book-cover strong{
    position:absolute!important;
    z-index:4!important;
    inset:12px 2px 16px 2px!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    writing-mode:vertical-rl!important;
    text-orientation:mixed!important;
    transform:rotate(180deg)!important;
    transform-origin:center center!important;
    font-size:clamp(10px,calc(var(--book-spine-width,60px) * .36),15px)!important;
    line-height:1!important;
    letter-spacing:0!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    pointer-events:none!important;
    box-sizing:border-box!important;
    text-shadow:0 1px 1px rgba(0,0,0,.22),0 0 2px rgba(255,255,255,.18)!important;
}
/* Decorative spine highlights always remain behind the title. */
.book-grid.bookshelf-view .book-cover::before,
.book-grid.bookshelf-view .book-cover::after{
    z-index:0!important;
}
@media(max-width:760px){
    .book-grid.bookshelf-view .book-cover strong{
        inset:10px 2px 13px 2px!important;
        font-size:clamp(9px,calc(var(--book-spine-width-mobile,46px) * .38),12px)!important;
        line-height:1!important;
    }
}

/* source-style-34 */
/* Per-book presentation settings saved from Edit Book. */
.book-cover strong,
.book-vote-admin-cover strong{
    color:var(--book-title-color,#ffffff)!important;
}
.reader-dialog .reader-static-page,
.reader-dialog .reader-leaf-face{
    font-size:var(--book-text-size,18px)!important;
}
.book-text-options{
    display:grid;
    grid-template-columns:minmax(0,420px);
    gap:12px;
    margin-top:14px;
}
.book-text-size-field label{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.book-text-size-field label strong{
    min-width:48px;
    text-align:center;
    color:#8f3f55;
    font-size:12px;
    border:1px solid #edcbd4;
    border-radius:999px;
    padding:4px 8px;
    background:#fff8fa;
}
.book-text-size-field input[type="range"]{
    width:100%;
    accent-color:#c9667d;
}
#bookTitleColor{
    width:100%;
    min-height:46px;
    padding:4px;
    cursor:pointer;
}
@media(max-width:520px){
    .book-text-options{grid-template-columns:1fr}
}

/* source-style-35 */
/* Sidebar first-paint lock.
   All sidebar visuals are final before <body> is painted, so full navigations
   cannot briefly show an older theme, overlay, transformed layer or pressed state. */
@view-transition{navigation:none}
::view-transition-old(root),
::view-transition-new(root){animation:none!important;mix-blend-mode:normal!important}

html body .app-shell > aside.sidebar{
    transform:none!important;
    -webkit-transform:none!important;
    filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    contain:none!important;
    isolation:auto!important;
    view-transition-name:none!important;
    background:#a95167!important;
    border-radius:0!important;
}
html body .app-shell > aside.sidebar::before,
html body .app-shell > aside.sidebar::after{
    content:none!important;
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
    background:none!important;
    box-shadow:none!important;
}
html body .app-shell > aside.sidebar,
html body .app-shell > aside.sidebar *{
    animation:none!important;
    transition:none!important;
}
html body .app-shell > aside.sidebar .side-brand{
    transform:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    background:rgba(255,255,255,.11)!important;
    border-color:rgba(255,255,255,.20)!important;
    box-shadow:none!important;
}
html body .app-shell > aside.sidebar .nav a,
html body .app-shell > aside.sidebar .nav a.nav-pressed{
    transform:none!important;
    background:rgba(255,255,255,.075)!important;
    border-color:rgba(255,255,255,.12)!important;
    color:rgba(255,255,255,.92)!important;
    box-shadow:none!important;
    outline:none!important;
}
html body .app-shell > aside.sidebar .nav a::after{
    content:none!important;
    display:none!important;
}
html body .app-shell > aside.sidebar .nav a::before{
    content:""!important;
    display:block!important;
    flex:0 0 3px!important;
    align-self:stretch!important;
    width:3px!important;
    border-radius:999px!important;
    background:transparent!important;
    box-shadow:none!important;
}
html body .app-shell > aside.sidebar .nav a:not(.active):hover,
html body .app-shell > aside.sidebar .nav a:not(.active):focus,
html body .app-shell > aside.sidebar .nav a:not(.active):active,
html body .app-shell > aside.sidebar .nav a.nav-pressed:not(.active){
    transform:none!important;
    background:rgba(255,255,255,.075)!important;
    border-color:rgba(255,255,255,.12)!important;
    color:rgba(255,255,255,.92)!important;
    box-shadow:none!important;
}
html body .app-shell > aside.sidebar .nav a.active,
html body .app-shell > aside.sidebar .nav a.active:hover,
html body .app-shell > aside.sidebar .nav a.active:focus,
html body .app-shell > aside.sidebar .nav a.active:active{
    transform:none!important;
    background:#fff!important;
    border-color:#fff!important;
    color:#954057!important;
    box-shadow:0 4px 12px rgba(76,24,39,.10)!important;
}
html body .app-shell > aside.sidebar .nav a.active::before{
    background:#bd6076!important;
}
html body .app-shell > aside.sidebar .nav-icon,
html body .app-shell > aside.sidebar .nav a:not(.active):hover .nav-icon,
html body .app-shell > aside.sidebar .nav a:not(.active):focus .nav-icon,
html body .app-shell > aside.sidebar .nav a:not(.active):active .nav-icon{
    transform:none!important;
    background:rgba(255,255,255,.13)!important;
    color:#fff!important;
    box-shadow:none!important;
}
html body .app-shell > aside.sidebar .nav a.active .nav-icon,
html body .app-shell > aside.sidebar .nav a.active:hover .nav-icon,
html body .app-shell > aside.sidebar .nav a.active:focus .nav-icon,
html body .app-shell > aside.sidebar .nav a.active:active .nav-icon{
    transform:none!important;
    background:#f7e8ec!important;
    color:#a44960!important;
    box-shadow:none!important;
}
html body .app-shell > aside.sidebar .role-chip,
html body .app-shell > aside.sidebar .user-card,
html body .app-shell > aside.sidebar .sidebar-subscription-renewal{
    box-shadow:none!important;
}
@media(max-width:760px){
    html body .app-shell > aside.sidebar .mobile-menu>a,
    html body .app-shell > aside.sidebar .mobile-recordings-toggle,
    html body .app-shell > aside.sidebar .mobile-logout-form button{
        transform:none!important;
        box-shadow:none!important;
    }
    html body .app-shell > aside.sidebar .mobile-menu>a:not(.active):hover,
    html body .app-shell > aside.sidebar .mobile-menu>a:not(.active):focus,
    html body .app-shell > aside.sidebar .mobile-menu>a:not(.active):active{
        background:rgba(255,255,255,.10)!important;
        border-color:rgba(255,255,255,.16)!important;
        color:#fff!important;
    }
    html body .app-shell > aside.sidebar .mobile-menu>a.active,
    html body .app-shell > aside.sidebar .mobile-menu>a.active:hover,
    html body .app-shell > aside.sidebar .mobile-menu>a.active:focus,
    html body .app-shell > aside.sidebar .mobile-menu>a.active:active{
        background:#fff!important;
        border-color:#fff!important;
        color:#954057!important;
    }
}

/* source-style-36 */
/* Registered Accounts: compact inline cards with predictable wrapping and no overlap. */
.registered-accounts-panel .member-list{gap:8px!important}
.registered-accounts-panel .member-row{
    display:grid!important;
    grid-template-columns:minmax(250px,1fr) minmax(0,auto)!important;
    align-items:center!important;
    gap:12px!important;
    width:100%!important;
    min-width:0!important;
    padding:10px 11px!important;
    border:1px solid #edd5db!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:0 2px 8px rgba(94,51,62,.035)!important;
    overflow:hidden!important;
}
.registered-accounts-panel .account-identity{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    min-width:0!important;
}
.registered-accounts-panel .account-identity .avatar{
    flex:0 0 38px!important;
    width:38px!important;
    height:38px!important;
    border-radius:10px!important;
    font-size:14px!important;
}
.registered-accounts-panel .account-summary{
    flex:1 1 auto!important;
    display:grid!important;
    gap:3px!important;
    min-width:0!important;
}
.registered-accounts-panel .account-name-line{
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    min-width:0!important;
}
.registered-accounts-panel .account-name-line>strong{
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:13px!important;
    line-height:1.25!important;
}
.registered-accounts-panel .account-presence{
    display:inline-flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    gap:5px!important;
    margin:0!important;
    padding:3px 7px!important;
    font-size:9px!important;
}
.registered-accounts-panel .account-presence-dot{width:8px!important;height:8px!important;flex-basis:8px!important}
.registered-accounts-panel .account-presence-label{display:inline!important;min-width:0!important}
.registered-accounts-panel .account-meta-line,
.registered-accounts-panel .account-subscription-renewal{
    display:block!important;
    min-width:0!important;
    margin:0!important;
    color:#86606a!important;
    font-size:10.5px!important;
    line-height:1.35!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
}
.registered-accounts-panel .account-subscription-renewal{color:#9a5264!important}
.registered-accounts-panel .member-actions{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    align-content:center!important;
    gap:6px!important;
    min-width:0!important;
    max-width:100%!important;
}
.registered-accounts-panel .member-actions form{
    display:inline-flex!important;
    align-items:center!important;
    gap:5px!important;
    min-width:0!important;
    margin:0!important;
}
.registered-accounts-panel .member-actions button{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    min-height:38px!important;
    margin:0!important;
    padding:7px 10px!important;
    border-radius:9px!important;
    font-size:11px!important;
    line-height:1!important;
    white-space:nowrap!important;
}
.registered-accounts-panel .account-type-control{
    display:flex!important;
    flex:0 1 auto!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    gap:5px!important;
    min-width:0!important;
    margin:0!important;
}
.registered-accounts-panel .account-type-control>span{
    flex:0 0 auto!important;
    font-size:9px!important;
    line-height:1!important;
}
.registered-accounts-panel .account-type-select{
    flex:0 0 102px!important;
    width:102px!important;
    min-width:102px!important;
    min-height:38px!important;
    padding:6px 25px 6px 8px!important;
    border-radius:9px!important;
    font-size:11px!important;
}
.registered-accounts-panel .account-type-save-status{
    display:inline-block!important;
    grid-column:auto!important;
    flex:0 0 42px!important;
    width:42px!important;
    min-width:42px!important;
    min-height:0!important;
    margin:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:9px!important;
    line-height:1.1!important;
}
.registered-accounts-panel .password-reset-form{
    display:grid!important;
    grid-template-columns:minmax(118px,156px) auto!important;
    gap:5px!important;
    flex:0 1 225px!important;
    width:min(225px,100%)!important;
}
.registered-accounts-panel .password-reset-form input{
    width:100%!important;
    min-width:0!important;
    min-height:38px!important;
    padding:7px 9px!important;
    border-radius:9px!important;
    font-size:11px!important;
}
@media(max-width:1180px){
    .registered-accounts-panel .member-row{grid-template-columns:1fr!important;align-items:stretch!important;gap:8px!important}
    .registered-accounts-panel .member-actions{justify-content:flex-start!important}
}
@media(max-width:700px){
    .registered-accounts-panel .member-row{padding:9px!important}
    .registered-accounts-panel .account-name-line{align-items:flex-start!important;flex-wrap:wrap!important}
    .registered-accounts-panel .account-name-line>strong{flex:1 1 150px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
    .registered-accounts-panel .member-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;width:100%!important}
    .registered-accounts-panel .member-actions>form:not(.password-reset-form),
    .registered-accounts-panel .member-actions>form:not(.password-reset-form) button{width:100%!important}
    .registered-accounts-panel .account-type-control,
    .registered-accounts-panel .password-reset-form{grid-column:1/-1!important;width:100%!important;max-width:none!important}
    .registered-accounts-panel .account-type-control{display:grid!important;grid-template-columns:auto minmax(0,1fr) 42px!important}
    .registered-accounts-panel .account-type-select{width:100%!important;min-width:0!important;flex:1 1 auto!important}
    .registered-accounts-panel .password-reset-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;flex:none!important}
    .registered-accounts-panel .member-actions button{min-height:42px!important}
}
@media(max-width:430px){
    .registered-accounts-panel .member-actions{grid-template-columns:1fr!important}
    .registered-accounts-panel .account-type-control,
    .registered-accounts-panel .password-reset-form{grid-column:auto!important}
    .registered-accounts-panel .account-type-control{grid-template-columns:1fr!important;gap:4px!important}
    .registered-accounts-panel .account-type-save-status{width:100%!important;min-width:0!important}
    .registered-accounts-panel .password-reset-form{grid-template-columns:minmax(0,1fr) auto!important}
}

/* source-style-37 */
.recordings-dialog::backdrop{background:rgba(21,15,22,.72)!important;backdrop-filter:blur(8px)!important}
.recordings-modal{
    width:min(1080px,calc(100vw - 32px))!important;
    max-height:min(860px,calc(100dvh - 32px))!important;
    overflow:hidden!important;
    border:1px solid #eadde1!important;
    border-radius:24px!important;
    background:#fbf8f9!important;
    box-shadow:0 34px 100px rgba(28,17,22,.34)!important;
}
.recordings-modal .modal-head{
    position:relative!important;
    top:auto!important;
    min-height:96px!important;
    padding:20px 22px!important;
    align-items:flex-start!important;
    border-bottom:1px solid #eadde1!important;
    background:linear-gradient(180deg,#fff 0%,#fff9fb 100%)!important;
    backdrop-filter:none!important;
}
.recordings-modal-heading{min-width:0;display:grid;gap:7px}
.recordings-modal-titleline{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}
.recordings-modal-icon{
    width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;
    border-radius:12px;background:#231d22;color:#fff;font-size:13px;
    box-shadow:0 7px 18px rgba(35,29,34,.16)
}
.recordings-modal .modal-head h2{margin:0!important;font:800 25px/1.1 Georgia,serif!important;color:#251f24!important}
.recordings-modal-admin-chip{
    display:inline-flex;align-items:center;min-height:26px;padding:5px 9px;border-radius:999px;
    background:#f5e9ed;color:#8b4b5c;font-size:10px;font-weight:900;letter-spacing:.055em;text-transform:uppercase
}
.recordings-modal .modal-head p{max-width:700px;margin:0!important;color:#756a70!important;font-size:12px!important;line-height:1.5!important}
.recordings-modal .close-button{
    flex:0 0 40px;width:40px;height:40px;margin:0!important;border:1px solid #e6d9dd!important;
    border-radius:12px!important;background:#fff!important;color:#4a3c42!important;font-size:24px!important;
    line-height:1!important;cursor:pointer!important;box-shadow:0 4px 12px rgba(47,31,38,.06)!important
}
.recordings-modal .close-button:hover{background:#f8edef!important;border-color:#dcc5cd!important;color:#963e57!important}
.recordings-modal-body{
    min-height:320px!important;max-height:calc(100dvh - 130px)!important;overflow:auto!important;
    padding:18px 20px 22px!important;background:#f7f3f5!important
}
.recordings-summary{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 14px
}
.recordings-summary-item{
    min-width:0;display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:12px 14px;border:1px solid #e8dde1;border-radius:14px;background:#fff;
    box-shadow:0 6px 18px rgba(74,42,53,.045)
}
.recordings-summary-item span{min-width:0;color:#7b6f75;font-size:11px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recordings-summary-item strong{flex:0 0 auto;color:#2c2529;font-size:18px;line-height:1;font-weight:900}
.recordings-summary-item.published strong{color:#247455}
.recordings-summary-item.draft strong{color:#a04a5e}
.admin-recordings-dialog-panel{
    margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;overflow:visible!important;display:grid!important;gap:12px!important
}
.admin-recordings-dialog-panel .stream-recording-gallery{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;
    overflow:visible!important;padding:0!important;scroll-snap-type:none!important;outline:none!important
}
.admin-recordings-dialog-panel .stream-recording-card{
    position:relative!important;width:100%!important;min-width:0!important;max-width:none!important;
    display:grid!important;grid-template-rows:auto auto auto auto!important;align-content:start!important;gap:0!important;
    padding:0!important;overflow:hidden!important;border:1px solid #e8dce0!important;border-radius:18px!important;
    background:#fff!important;color:#2b2428!important;box-shadow:0 9px 26px rgba(70,42,52,.075)!important;
    transform:none!important;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease!important
}
@media(hover:hover) and (pointer:fine){
    .admin-recordings-dialog-panel .stream-recording-card:hover{
        transform:translateY(-3px)!important;border-color:#d9b7c1!important;
        box-shadow:0 15px 34px rgba(70,42,52,.12)!important
    }
}
.admin-recordings-dialog-panel .stream-recording-card.selected{
    border-color:#c86980!important;box-shadow:0 0 0 3px rgba(200,105,128,.12),0 13px 30px rgba(70,42,52,.1)!important
}
.admin-recordings-dialog-panel .stream-recording-thumb{
    width:100%!important;aspect-ratio:16/9!important;border:0!important;border-radius:0!important;
    background:linear-gradient(135deg,#3a2b31,#171215)!important
}
.admin-recordings-dialog-panel .stream-recording-thumb::after{
    content:"";position:absolute;inset:auto 0 0;height:48%;pointer-events:none;
    background:linear-gradient(180deg,transparent,rgba(17,12,14,.38))
}
.admin-recordings-dialog-panel .stream-recording-play-mark{
    z-index:2;left:12px;bottom:11px;width:38px;height:38px;border-radius:12px!important;
    background:rgba(255,255,255,.94)!important;color:#98465d!important;font-size:14px!important;
    box-shadow:0 6px 18px rgba(0,0,0,.2)!important
}
.admin-recordings-dialog-panel .stream-recording-card-copy{
    display:grid!important;gap:5px!important;min-width:0!important;padding:13px 14px 11px!important
}
.admin-recordings-dialog-panel .stream-recording-card-title{
    display:block!important;min-width:0!important;color:#292226!important;font-size:14px!important;line-height:1.3!important;
    font-weight:900!important;white-space:normal!important;overflow-wrap:anywhere!important
}
.admin-recordings-dialog-panel .stream-recording-card-meta{
    display:block!important;min-width:0!important;color:#80737a!important;font-size:10.5px!important;line-height:1.35!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
}
.stream-recording-publish{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;
    min-width:0!important;margin:0 14px!important;padding:11px 0 13px!important;border-top:1px solid #eee3e6!important
}
.stream-recording-publish-status{
    display:inline-flex!important;align-items:center!important;gap:7px!important;min-width:0!important;
    color:#9c5365!important;font-size:10.5px!important;font-weight:900!important;white-space:nowrap!important
}
.stream-recording-publish-status::before{
    content:"";width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#c9576b;
    box-shadow:0 0 0 4px rgba(201,87,107,.10)
}
.stream-recording-publish-status.is-published{color:#237253!important}
.stream-recording-publish-status.is-published::before{background:#2a986b!important;box-shadow:0 0 0 4px rgba(42,152,107,.11)!important}
.stream-recording-publish-toggle{
    flex:0 0 auto!important;min-width:94px!important;min-height:34px!important;padding:7px 11px!important;
    border:1px solid #dcbec7!important;border-radius:10px!important;background:#fff7f9!important;color:#94465a!important;
    font-family:inherit!important;font-size:10.5px!important;font-weight:900!important;line-height:1.1!important;cursor:pointer!important;box-shadow:none!important
}
.stream-recording-publish-toggle:hover{background:#faedf1!important;border-color:#cf9dac!important}
.stream-recording-publish-toggle.is-published{border-color:#acd6c5!important;background:#f1fbf6!important;color:#237253!important}
.stream-recording-publish-toggle.is-published:hover{background:#e8f7ef!important;border-color:#91c9b3!important}
.stream-recording-publish-toggle:disabled{opacity:.55!important;cursor:wait!important}
.admin-recordings-dialog-panel .stream-recording-remove{
    position:static!important;inset:auto!important;z-index:auto!important;display:flex!important;align-items:center!important;justify-content:center!important;
    width:auto!important;height:34px!important;min-height:34px!important;margin:0 14px 14px!important;padding:7px 10px!important;
    border:1px solid #ecd2d9!important;border-radius:10px!important;background:#fff!important;color:#a34458!important;
    font-family:inherit!important;font-size:10.5px!important;font-weight:850!important;line-height:1!important;cursor:pointer!important;box-shadow:none!important;backdrop-filter:none!important
}
.admin-recordings-dialog-panel .stream-recording-remove:hover{background:#fff0f3!important;border-color:#dcadb9!important;transform:none!important}
.admin-recordings-dialog-panel .stream-recording-message{
    display:block!important;min-height:18px!important;margin:0!important;padding:0 2px!important;text-align:left!important;
    color:#7d7076!important;font-size:11px!important;line-height:1.4!important
}
.admin-recordings-dialog-panel .stream-recording-message.error{color:#ad4057!important;font-weight:800!important}
.admin-recordings-dialog-panel .stream-recording-message.success{color:#277355!important;font-weight:800!important}
.admin-recordings-dialog-panel .stream-recording-empty{
    grid-column:1/-1!important;min-height:210px!important;display:grid!important;place-items:center!important;
    padding:26px!important;border:1px dashed #d9c1c8!important;border-radius:18px!important;background:#fff!important;
    color:#7d7076!important;font-size:13px!important;font-weight:850!important;text-align:center!important
}
@media(max-width:940px){
    .admin-recordings-dialog-panel .stream-recording-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
    .recordings-modal{width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;border-radius:0!important;border:0!important}
    .recordings-modal .modal-head{min-height:0!important;padding:calc(12px + env(safe-area-inset-top)) 12px 12px!important}
    .recordings-modal-icon{width:34px;height:34px;flex-basis:34px;border-radius:10px}
    .recordings-modal .modal-head h2{font-size:21px!important}
    .recordings-modal-admin-chip{display:none}
    .recordings-modal .modal-head p{font-size:10.5px!important;line-height:1.4!important}
    .recordings-modal-body{max-height:none!important;min-height:0!important;flex:1 1 auto!important;padding:11px 10px calc(14px + env(safe-area-inset-bottom))!important}
    .recordings-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px}
    .recordings-summary-item{display:grid;gap:4px;justify-items:start;padding:9px 9px;border-radius:11px}
    .recordings-summary-item span{font-size:9px;white-space:normal;line-height:1.2}
    .recordings-summary-item strong{font-size:16px}
    .admin-recordings-dialog-panel .stream-recording-gallery{grid-template-columns:1fr!important;gap:10px!important}
    .admin-recordings-dialog-panel .stream-recording-card{min-height:0!important;border-radius:14px!important}
    .admin-recordings-dialog-panel .stream-recording-card-copy{padding:11px 12px 9px!important}
    .stream-recording-publish{margin:0 12px!important;padding:10px 0 11px!important}
    .admin-recordings-dialog-panel .stream-recording-remove{margin:0 12px 12px!important}
}
@media(max-width:390px){
    .recordings-summary{grid-template-columns:1fr!important}
    .recordings-summary-item{display:flex!important;align-items:center!important;justify-content:space-between!important}
}
.admin-recordings-dialog-panel .stream-recording-edit{
    position:absolute!important;top:10px!important;right:10px!important;z-index:6!important;
    min-width:58px!important;height:32px!important;padding:6px 10px!important;
    border:1px solid rgba(255,255,255,.88)!important;border-radius:10px!important;
    background:rgba(255,255,255,.94)!important;color:#7f3d50!important;
    font-family:inherit!important;font-size:10.5px!important;font-weight:900!important;line-height:1!important;cursor:pointer!important;
    box-shadow:0 6px 18px rgba(25,12,17,.18)!important;backdrop-filter:blur(7px)!important
}
.admin-recordings-dialog-panel .stream-recording-edit:hover{background:#fff!important;color:#a03f58!important;transform:none!important}
.admin-recordings-dialog-panel .stream-recording-edit:focus-visible{outline:3px solid rgba(255,255,255,.9)!important;outline-offset:2px!important}
.recording-thumbnail-dialog .modal{width:min(560px,calc(100vw - 28px));max-height:min(760px,calc(100dvh - 28px));overflow:hidden}
.recording-thumbnail-dialog .modal-body{display:grid;gap:16px;overflow:auto}
.recording-thumbnail-preview{
    position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border:1px solid #e4cbd2;border-radius:16px;
    background:linear-gradient(135deg,#51333c,#20151a);box-shadow:0 10px 28px rgba(73,38,49,.09)
}
.recording-thumbnail-preview img{display:block;width:100%;height:100%;object-fit:cover}
.recording-thumbnail-preview img[hidden]{display:none}
.recording-thumbnail-preview-placeholder{position:absolute;inset:0;display:grid;place-items:center;padding:20px;text-align:center;color:rgba(255,255,255,.88);font-size:13px;font-weight:850}
.recording-thumbnail-preview-placeholder[hidden]{display:none}
.recording-thumbnail-edit-name{margin:-4px 0 0;color:#34292e;font-size:14px;font-weight:900}
.recording-thumbnail-dialog .field small{display:block;margin-top:6px;color:var(--muted);font-size:11px;line-height:1.45}
.recording-thumbnail-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding-top:2px}
.recording-thumbnail-actions-right{display:flex;gap:9px;margin-left:auto}
.recording-thumbnail-remove{border-color:#e5b8c2!important;color:#a43d55!important;background:#fff7f9!important}
.recording-thumbnail-edit-message{min-height:18px;color:var(--muted);font-size:11px;font-weight:750}
.recording-thumbnail-edit-message.error{color:#ad4057}
.recording-thumbnail-edit-message.success{color:#277355}
@media(max-width:520px){
    .recording-thumbnail-dialog .modal{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:0}
    .recording-thumbnail-dialog .modal-body{padding:14px 12px calc(18px + env(safe-area-inset-bottom))}
    .recording-thumbnail-actions{display:grid;grid-template-columns:1fr 1fr}
    .recording-thumbnail-actions-right{display:contents}
    .recording-thumbnail-actions button{width:100%}
    .recording-thumbnail-remove{grid-column:1/-1}
}

/* source-style-38 */
.sidebar .nav .member-stream-videos-nav{display:flex!important;align-items:center!important;gap:11px!important;width:100%!important;min-width:0!important;min-height:48px!important;padding:8px 10px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:12px!important;background:rgba(255,255,255,.075)!important;color:rgba(255,255,255,.92)!important;box-shadow:none!important;font-family:inherit!important;font-size:13px!important;font-weight:730!important;line-height:1.2!important;text-align:left!important;cursor:pointer!important;transform:none!important;transition:none!important;animation:none!important;-webkit-tap-highlight-color:transparent!important}
.sidebar .nav .member-stream-videos-nav::before{content:"";flex:0 0 3px;align-self:stretch;width:3px;border-radius:999px;background:transparent}
.sidebar .nav .member-stream-videos-nav:hover,.sidebar .nav .member-stream-videos-nav:focus,.sidebar .nav .member-stream-videos-nav:active{background:rgba(255,255,255,.13)!important;border-color:rgba(255,255,255,.18)!important;color:#fff!important;box-shadow:none!important;transform:none!important;outline:none!important}
.sidebar .nav .member-stream-videos-nav .nav-icon{display:grid!important;place-items:center!important;flex:0 0 32px!important;width:32px!important;height:32px!important;border-radius:9px!important;background:rgba(255,255,255,.13)!important;color:#fff!important;font-size:11px!important;transform:none!important;transition:none!important}
.sidebar .nav .member-stream-videos-nav:hover .nav-icon,.sidebar .nav .member-stream-videos-nav:focus .nav-icon{background:rgba(255,255,255,.18)!important}
.member-stream-videos-dialog .recordings-modal{width:min(980px,calc(100vw - 32px))!important}
.member-stream-videos-dialog .recordings-modal-admin-chip.member-chip{background:#edf8f2!important;color:#287356!important}
.member-recordings-dialog-panel{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;overflow:visible!important;display:grid!important;gap:12px!important}
.member-recordings-dialog-panel .stream-recording-gallery{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;overflow:visible!important;padding:0!important;scroll-snap-type:none!important;outline:none!important}
.member-recordings-dialog-panel .stream-recording-card{position:relative!important;width:100%!important;min-width:0!important;max-width:none!important;display:grid!important;grid-template-rows:auto auto!important;align-content:start!important;gap:0!important;padding:0!important;overflow:hidden!important;border:1px solid #e8dce0!important;border-radius:18px!important;background:#fff!important;color:#2b2428!important;box-shadow:0 9px 26px rgba(70,42,52,.075)!important;transform:none!important;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;cursor:pointer!important}
@media(hover:hover) and (pointer:fine){.member-recordings-dialog-panel .stream-recording-card:hover{transform:translateY(-3px)!important;border-color:#d9b7c1!important;box-shadow:0 15px 34px rgba(70,42,52,.12)!important}}
.member-recordings-dialog-panel .stream-recording-card.selected{border-color:#c86980!important;box-shadow:0 0 0 3px rgba(200,105,128,.12),0 13px 30px rgba(70,42,52,.1)!important}
.member-recordings-dialog-panel .stream-recording-thumb{position:relative!important;display:block!important;width:100%!important;aspect-ratio:16/9!important;border:0!important;border-radius:0!important;overflow:hidden!important;background:linear-gradient(135deg,#3a2b31,#171215)!important}
.member-recordings-dialog-panel .stream-recording-thumb img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important}
.member-recordings-dialog-panel .stream-recording-thumb::after{content:"";position:absolute;inset:auto 0 0;height:48%;pointer-events:none;background:linear-gradient(180deg,transparent,rgba(17,12,14,.38))}
.member-recordings-dialog-panel .stream-recording-play-mark{z-index:2!important;position:absolute!important;left:12px!important;bottom:11px!important;width:38px!important;height:38px!important;display:grid!important;place-items:center!important;border-radius:12px!important;background:rgba(255,255,255,.94)!important;color:#98465d!important;font-size:14px!important;box-shadow:0 6px 18px rgba(0,0,0,.2)!important}
.member-recordings-dialog-panel .stream-recording-card-copy{display:grid!important;gap:5px!important;min-width:0!important;padding:13px 14px 14px!important}
.member-recordings-dialog-panel .stream-recording-card-title{display:block!important;min-width:0!important;color:#292226!important;font-size:14px!important;line-height:1.3!important;font-weight:900!important;white-space:normal!important;overflow-wrap:anywhere!important}
.member-recordings-dialog-panel .stream-recording-card-meta{display:block!important;min-width:0!important;color:#80737a!important;font-size:10.5px!important;line-height:1.35!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.member-recordings-dialog-panel .stream-recording-message{display:block!important;min-height:18px!important;margin:0!important;padding:0 2px!important;text-align:left!important;color:#7d7076!important;font-size:11px!important;line-height:1.4!important}
.member-recordings-dialog-panel .stream-recording-message.error{color:#ad4057!important;font-weight:800!important}
.member-recordings-dialog-panel .stream-recording-empty{grid-column:1/-1!important;min-height:220px!important;display:grid!important;place-items:center!important;padding:28px!important;border:1px dashed #d9c1c8!important;border-radius:18px!important;background:#fff!important;color:#7d7076!important;font-size:13px!important;font-weight:850!important;text-align:center!important}
@media(max-width:940px){.member-recordings-dialog-panel .stream-recording-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:760px){.member-stream-videos-dialog .recordings-modal{width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;border-radius:0!important;border:0!important}.member-recordings-dialog-panel .stream-recording-gallery{grid-template-columns:1fr!important;gap:10px!important}.member-recordings-dialog-panel .stream-recording-card{border-radius:14px!important}.member-recordings-dialog-panel .stream-recording-card-copy{padding:11px 12px 13px!important}}

/* source-style-39 */
/* Recording playback is an interactive media surface. Keep the native video
   controls above every live-stream placeholder/countdown/decorative layer. */
#rtcVideoFrame.recording-playback{
    position:relative!important;
    isolation:isolate!important;
}
#rtcVideoFrame.recording-playback video#rtcVideo{
    position:relative!important;
    z-index:50!important;
    pointer-events:auto!important;
    touch-action:auto!important;
    cursor:auto!important;
}
#rtcVideoFrame.recording-playback .video-placeholder,
#rtcVideoFrame.recording-playback .stream-countdown,
#rtcVideoFrame.recording-playback::before,
#rtcVideoFrame.recording-playback::after,
#rtcVideoFrame.recording-playback ~ *::before,
#rtcVideoFrame.recording-playback ~ *::after{
    pointer-events:none!important;
}

/* source-style-40 */
/* Member mobile navigation: compact COURTREADZ header with a hamburger-controlled
   dropdown. The menu floats over the workspace so opening it never resizes the
   Stream Player or chat. */
.member-mobile-menu-toggle,
.member-mobile-dropdown{display:none}
@media(max-width:760px){
    .sidebar .side-brand{
        position:relative!important;
        display:flex!important;
        align-items:center!important;
        width:100%!important;
        min-width:0!important;
    }
    .sidebar .side-brand>div:nth-child(2){min-width:0!important;flex:1 1 auto!important}
    .sidebar .member-mobile-menu-toggle{
        display:inline-flex!important;
        flex:0 0 42px!important;
        width:42px!important;
        height:42px!important;
        min-width:42px!important;
        min-height:42px!important;
        margin-left:auto!important;
        padding:9px!important;
        border:1px solid rgba(255,255,255,.24)!important;
        border-radius:10px!important;
        background:rgba(255,255,255,.12)!important;
        align-items:center!important;
        justify-content:center!important;
        flex-direction:column!important;
        gap:4px!important;
        box-shadow:none!important;
        cursor:pointer!important;
        touch-action:manipulation!important;
        -webkit-tap-highlight-color:transparent!important;
    }
    .sidebar .member-mobile-menu-toggle span{
        display:block!important;
        width:21px!important;
        height:2px!important;
        min-height:2px!important;
        border-radius:999px!important;
        background:#fff!important;
        pointer-events:none!important;
    }
    .sidebar .member-mobile-menu-toggle[aria-expanded="true"]{
        background:#fff!important;
        border-color:#fff!important;
    }
    .sidebar .member-mobile-menu-toggle[aria-expanded="true"] span{background:#a95167!important}
    .sidebar .member-mobile-dropdown{
        display:none!important;
        position:absolute!important;
        z-index:160!important;
        top:calc(100% - 5px)!important;
        left:9px!important;
        right:9px!important;
        width:auto!important;
        max-width:none!important;
        margin:0!important;
        padding:9px!important;
        border:1px solid rgba(255,255,255,.22)!important;
        border-radius:0 0 14px 14px!important;
        background:#a95167!important;
        box-shadow:0 14px 28px rgba(65,23,35,.24)!important;
        overflow:visible!important;
    }
    .sidebar .member-mobile-dropdown.is-open{display:block!important}
    .sidebar .member-mobile-dropdown .mobile-menu,
    .sidebar .member-mobile-dropdown .mobile-menu.has-subscribe,
    .sidebar .member-mobile-dropdown .mobile-menu.has-subscribe.has-vids,
    .sidebar .member-mobile-dropdown .mobile-menu.has-vids{
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:7px!important;
        width:100%!important;
        overflow:visible!important;
        padding:0!important;
    }
    .sidebar .member-mobile-dropdown .mobile-menu>a,
    .sidebar .member-mobile-dropdown .mobile-recordings-toggle,
    .sidebar .member-mobile-dropdown .mobile-logout-form,
    .sidebar .member-mobile-dropdown .mobile-logout-form button{
        width:100%!important;
        min-width:0!important;
        max-width:none!important;
        box-sizing:border-box!important;
    }
    .sidebar .member-mobile-dropdown .mobile-menu>a,
    .sidebar .member-mobile-dropdown .mobile-recordings-toggle,
    .sidebar .member-mobile-dropdown .mobile-logout-form button{
        display:flex!important;
        align-items:center!important;
        justify-content:center!important;
        min-height:42px!important;
        padding:9px 8px!important;
        border:1px solid rgba(255,255,255,.18)!important;
        border-radius:10px!important;
        background:rgba(255,255,255,.11)!important;
        color:#fff!important;
        font-size:12px!important;
        font-weight:850!important;
        line-height:1.15!important;
        text-align:center!important;
        text-decoration:none!important;
        white-space:normal!important;
        box-shadow:none!important;
        touch-action:manipulation!important;
        -webkit-tap-highlight-color:transparent!important;
        transition:none!important;
    }
    .sidebar .member-mobile-dropdown .mobile-menu>a.is-navigation-pending,
    .sidebar .member-mobile-dropdown .mobile-menu>a[aria-busy="true"]{
        background:#fff!important;
        border-color:#fff!important;
        color:#954057!important;
        opacity:1!important;
        transform:none!important;
    }
    .sidebar .member-mobile-dropdown .mobile-menu>a.active{
        background:#fff!important;
        border-color:#fff!important;
        color:#954057!important;
    }
    .sidebar .member-mobile-dropdown .mobile-subscription-renewal{
        display:flex!important;
        width:100%!important;
        margin:8px 0 0!important;
        padding:8px 9px!important;
        border:1px solid rgba(255,255,255,.18)!important;
        border-radius:10px!important;
        background:rgba(255,255,255,.09)!important;
    }
}
@media(max-width:390px){
    .sidebar .member-mobile-dropdown .mobile-menu,
    .sidebar .member-mobile-dropdown .mobile-menu.has-subscribe,
    .sidebar .member-mobile-dropdown .mobile-menu.has-subscribe.has-vids,
    .sidebar .member-mobile-dropdown .mobile-menu.has-vids{grid-template-columns:1fr!important}
}

/* source-style-41 */
/* Members only: make the Stream Player another 150px taller. Desktop now uses
   +450px over the original responsive base, while mobile is increased separately
   by the same additional 150px in the resize helper below. */
@media (min-width:761px){
    #rtcStreamApp[data-role="member"] .member-viewer-panel{
        overflow-y:auto!important;
        overflow-x:hidden!important;
    }
    #rtcStreamApp[data-role="member"] .member-viewer-panel .video-frame{
        flex:0 0 clamp(640px,calc(36dvh + 450px),855px)!important;
        height:clamp(640px,calc(36dvh + 450px),855px)!important;
        min-height:clamp(640px,calc(36dvh + 450px),855px)!important;
        max-height:clamp(640px,calc(36dvh + 450px),855px)!important;
        aspect-ratio:auto!important;
    }
}
@media (max-width:760px){
    #rtcStreamApp[data-role="member"] .member-viewer-panel .video-frame{
        height:var(--member-stream-player-expanded-height)!important;
        min-height:var(--member-stream-player-expanded-height)!important;
        max-height:var(--member-stream-player-expanded-height)!important;
        aspect-ratio:auto!important;
    }
}

/* source-style-42 */
/* Members: Stream videos / Published library fills the viewport while keeping
   a consistent 20px gap from every screen edge. The header stays visible and
   the recordings area scrolls inside the panel so cards never run off-page. */
.member-stream-videos-dialog .recordings-modal{
    width:calc(100vw - 40px)!important;
    max-width:none!important;
    height:calc(100dvh - 40px)!important;
    max-height:calc(100dvh - 40px)!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    border-radius:20px!important;
}
.member-stream-videos-dialog .recordings-modal>.modal-head{
    flex:0 0 auto!important;
}
.member-stream-videos-dialog .recordings-modal>.recordings-modal-body{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
}
.member-stream-videos-dialog .member-recordings-dialog-panel{
    min-height:0!important;
    overflow:visible!important;
}
.member-stream-videos-dialog .member-recordings-dialog-panel .stream-recording-gallery{
    overflow:visible!important;
}
@media(max-width:760px){
    .member-stream-videos-dialog .recordings-modal{
        width:calc(100vw - 40px)!important;
        max-width:calc(100vw - 40px)!important;
        height:calc(100dvh - 40px)!important;
        max-height:calc(100dvh - 40px)!important;
        border:1px solid #eadde1!important;
        border-radius:16px!important;
    }
}

/* source-style-43 */
/* Admin: Recordings / Admin library matches the full-page Published library.
   Keep a 20px gap from every viewport edge and let the modal body scroll so
   all recording cards and controls remain reachable without leaving the panel. */
.recordings-dialog:not(.member-stream-videos-dialog) .recordings-modal{
    width:calc(100vw - 40px)!important;
    max-width:none!important;
    height:calc(100dvh - 40px)!important;
    max-height:calc(100dvh - 40px)!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    border-radius:20px!important;
}
.recordings-dialog:not(.member-stream-videos-dialog) .recordings-modal>.modal-head{
    flex:0 0 auto!important;
}
.recordings-dialog:not(.member-stream-videos-dialog) .recordings-modal>.recordings-modal-body{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
}
.recordings-dialog:not(.member-stream-videos-dialog) .admin-recordings-dialog-panel{
    min-height:0!important;
    overflow:visible!important;
}
.recordings-dialog:not(.member-stream-videos-dialog) .admin-recordings-dialog-panel .stream-recording-gallery{
    overflow:visible!important;
}
@media(max-width:760px){
    .recordings-dialog:not(.member-stream-videos-dialog) .recordings-modal{
        width:calc(100vw - 40px)!important;
        max-width:calc(100vw - 40px)!important;
        height:calc(100dvh - 40px)!important;
        max-height:calc(100dvh - 40px)!important;
        border:1px solid #eadde1!important;
        border-radius:16px!important;
    }
}

/* source-style-44 */
/* Keep live RTC feeds and recording playback in the original camera orientation. */
#rtcStreamApp[data-role="member"] #rtcVideoFrame.viewer:not(.recording-playback) video#rtcVideo{
    transform:none!important;
    transform-origin:center center!important;
}
#rtcStreamApp[data-role="member"] #rtcVideoFrame.recording-playback video#rtcVideo{
    transform:none!important;
}

/* source-style-45 */
/* Desktop/webpage Subscribe view: keep both subscription panels at a stable
   content size instead of allowing the grid tracks to stretch across the page. */
@media (min-width:1101px){
    .subscription-page{
        grid-template-columns:600px 340px!important;
        justify-content:start!important;
        align-items:start!important;
        align-content:start!important;
        width:954px!important;
        max-width:954px!important;
        gap:14px!important;
    }
    .subscription-page>.subscription-card-panel{
        width:600px!important;
        min-width:600px!important;
        max-width:600px!important;
        height:max-content!important;
        min-height:0!important;
        align-self:start!important;
    }
    .subscription-page>.subscription-status-panel{
        width:340px!important;
        min-width:340px!important;
        max-width:340px!important;
        height:max-content!important;
        min-height:0!important;
        align-self:start!important;
    }
    .subscription-page .subscription-credit-card{
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        min-height:255px!important;
        height:255px!important;
        max-height:255px!important;
    }
}
/* Smaller desktop/tablet widths remain responsive rather than overflowing. */
@media (min-width:761px) and (max-width:1100px){
    .subscription-page{
        grid-template-columns:minmax(0,1fr) 320px!important;
        align-items:start!important;
    }
    .subscription-card-panel,.subscription-status-panel{
        height:max-content!important;
        align-self:start!important;
    }
}

/* source-style-46 */
/* Live Stream navigation signal: the red dot and expanding rings appear only
   while the broadcast is genuinely LIVE (not during countdown/offline). */
.stream-nav-link .stream-live-indicator{
    position:relative!important;
    display:inline-grid!important;
    place-items:center!important;
    width:22px!important;
    min-width:22px!important;
    height:22px!important;
    overflow:visible!important;
    isolation:isolate;
}
.stream-nav-link .stream-live-dot{
    position:relative;
    z-index:3;
    width:9px;
    height:9px;
    border-radius:50%;
    background:rgba(255,255,255,.58);
    box-shadow:0 0 0 1px rgba(255,255,255,.12);
    transition:background .2s ease,box-shadow .2s ease;
}
.stream-nav-link .stream-live-ring{
    position:absolute;
    z-index:1;
    left:50%;
    top:50%;
    width:12px;
    height:12px;
    margin:-6px 0 0 -6px;
    border:2px solid #ef3340;
    border-radius:50%;
    opacity:0;
    pointer-events:none;
    transform:scale(.65);
}
.stream-nav-link.stream-nav-live .stream-live-dot{
    background:#f02235!important;
    box-shadow:0 0 0 3px rgba(240,34,53,.18),0 0 12px rgba(240,34,53,.62)!important;
}
.stream-nav-link.stream-nav-live .stream-live-ring-one{
    animation:streamNavSignalPing 1.55s cubic-bezier(.2,.65,.3,1) infinite;
}
.stream-nav-link.stream-nav-live .stream-live-ring-two{
    animation:streamNavSignalPing 1.55s .58s cubic-bezier(.2,.65,.3,1) infinite;
}
@keyframes streamNavSignalPing{
    0%{opacity:.78;transform:scale(.7)}
    70%{opacity:.12}
    100%{opacity:0;transform:scale(2.35)}
}
.mobile-menu .stream-nav-link{
    display:inline-flex!important;
    align-items:center!important;
    gap:7px!important;
}
.mobile-menu .stream-nav-link .stream-live-indicator{
    width:16px!important;
    min-width:16px!important;
    height:16px!important;
}
.mobile-menu .stream-nav-link .stream-live-dot{width:7px;height:7px}
.mobile-menu .stream-nav-link .stream-live-ring{width:10px;height:10px;margin:-5px 0 0 -5px;border-width:1.5px}
@media (prefers-reduced-motion:reduce){
    .stream-nav-link.stream-nav-live .stream-live-ring{animation:none!important}
    .stream-nav-link.stream-nav-live .stream-live-dot{box-shadow:0 0 0 4px rgba(240,34,53,.2)!important}
}


/* COURTREADZ instant page navigation — 8.0.43 */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.14s;animation-timing-function:ease-out}

/* source-style-47 */
/* Mobile RTCWebcam: make the complete camera surface full-bleed and fill it
   with the live picture so no left or right gutters remain. */
@media (max-width:760px){
    body.stream-mobile-page #rtcStreamApp #rtcVideoFrame{
        align-self:center!important;
        width:100vw!important;
        min-width:100vw!important;
        max-width:100vw!important;
        margin-left:calc(50% - 50vw)!important;
        margin-right:calc(50% - 50vw)!important;
        border-left:0!important;
        border-right:0!important;
        border-radius:0!important;
        box-sizing:border-box!important;
        overflow:hidden!important;
    }
    body.stream-mobile-page #rtcStreamApp #rtcVideoFrame video{
        display:block!important;
        width:100%!important;
        min-width:100%!important;
        max-width:none!important;
        height:100%!important;
        margin:0!important;
        object-fit:cover!important;
        object-position:center!important;
        border-radius:0!important;
    }
}
