/* Stable reader controls, move/resize handles and independent media tab. */
#v18ReadLaunch.nyugi-reading-launch{display:inline-flex;position:relative;margin:0 0 12px;z-index:1;min-height:48px;font-size:.93rem;border:2px solid var(--primary);background:var(--tint);color:var(--ink)}
#v18Reader{min-width:300px;min-height:240px;max-width:98vw;max-height:94dvh;resize:both;box-sizing:border-box}
#v18Reader #nyugiReaderDrag{cursor:grab;user-select:none;touch-action:none;gap:9px}
#v18Reader #nyugiReaderDrag:active{cursor:grabbing}
#v18Reader #nyugiReaderDrag button{cursor:pointer;touch-action:auto;min-height:36px}
#v18Reader .v18-reader-controls{gap:9px;align-items:flex-end;flex-wrap:wrap}
#v18Reader .v18-reader-controls label{flex:1 1 140px;min-width:0;font-size:.83rem}
#v18Reader .v18-reader-controls input[type=url],#v18Reader .v18-reader-controls input[type=text]{width:100%;font-size:16px}
#v18Reader .v18-reader-body iframe{width:100%;height:auto;aspect-ratio:16/9;min-height:190px;max-height:none;flex:none}
#v18Reader.split{right:10px;top:9px;bottom:auto;height:min(86dvh,700px);width:min(48vw,650px);min-width:320px;border-radius:16px}
#v18Reader.full{inset:0!important;width:100vw!important;height:100dvh!important;max-width:none;max-height:none;resize:none;border-radius:0}
#v18Reader.moved{resize:both;position:fixed;z-index:180}
#v18Reader.minimized{position:fixed!important;right:15px!important;left:auto!important;bottom:83px!important;top:auto!important;width:min(320px,calc(100vw - 30px))!important;height:230px!important;min-height:0;max-height:40dvh;resize:none;z-index:180;border-radius:16px;pointer-events:auto}
#v18Reader.minimized #nyugiReaderDrag{cursor:default}
#v18Reader.minimized .v18-reader-controls{display:none}
#v18Reader.minimized .v18-reader-body{padding:5px;min-height:0;flex:1;overflow:hidden}
#v18Reader.minimized .v18-reader-body iframe{width:100%;height:100%;min-height:0;aspect-ratio:unset}
#v18Reader.minimized .v18-reader-body pre{font-size:.78rem;max-height:150px;overflow:auto}
#v18Reader.minimized [data-v18-reader=split]{display:none}
.nyugi-media-tab{position:fixed;z-index:189;right:137px;bottom:19px;display:flex;gap:3px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 6px 22px #0002;padding:3px}
.nyugi-media-tab[hidden]{display:none!important}.nyugi-media-tab button{min-height:42px;font-size:.77rem;padding:7px 10px}
#nyugiTextStudio label{font-size:.83rem;font-weight:600}
#nyugiTextStudio .nyugi-text-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
#nyugiTextStudio .nyugi-text-options label{font-weight:500;display:flex;gap:8px;align-items:center}
.nyugi-text-colors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.nyugi-text-colors label{display:grid;gap:3px}
.nyugi-text-colors input{width:100%;height:40px}
.nyugi-palette-choices{margin:11px 0}.nyugi-palette-choices summary{cursor:pointer;font-weight:700;padding:7px}
.nyugi-presence-count{min-height:38px;border:1px solid var(--line);border-radius:18px;background:var(--subtle);color:var(--ink);font-size:.73rem;padding:5px 9px;white-space:nowrap;cursor:pointer}
.nyugi-presence-pop{position:fixed;right:15px;top:64px;z-index:300;border-radius:18px;max-width:min(330px,calc(100vw - 30px));max-height:min(70dvh,600px);overflow:auto;background:var(--surface);padding:20px;box-shadow:0 8px 30px #0004;border:1px solid var(--line)}
.nyugi-presence-pop[hidden]{display:none}.nyugi-presence-pop ul{max-height:140px;overflow:auto}
#nyugiFieldCard{margin-bottom:18px}
@media(max-width:800px){
 body.nyugi-reader-split .main-column{height:50dvh;overflow:auto}
 #v18Reader.split{top:50dvh;bottom:0;right:0;width:100vw;min-width:0;height:50dvh;max-height:50dvh;resize:none;border-radius:14px 14px 0 0}
 #v18Reader.moved{width:min(95vw,600px);max-height:75dvh;resize:both}
 #v18Reader.minimized{bottom:calc(140px + env(safe-area-inset-bottom));height:205px}
 .nyugi-media-tab{right:65px;bottom:calc(82px + env(safe-area-inset-bottom))}
 .nyugi-presence-count{font-size:.67rem;max-width:90px;overflow:hidden;text-overflow:ellipsis}
}
@media(prefers-reduced-motion:reduce){#v18Reader,.nyugi-media-tab{transition:none}}

#v18Reader .nyugi-video-slider{flex:1 1 100px;min-width:95px}#v18Reader .nyugi-video-slider input{width:100%}
